mpi4py-3.0.3/0000775000175000017500000000000013560002767014005 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/conf/0000775000175000017500000000000013560002767014732 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/conf/epydoc.cfg0000644000175000017500000001055013200562156016667 0ustar dalcinldalcinl00000000000000[epydoc] # Epydoc section marker (required by ConfigParser) # The list of objects to document. Objects can be named using # dotted names, module filenames, or package directory names. # Alases for this option include "objects" and "values". modules: mpi4py # The type of output that should be generated. Should be one # of: html, text, latex, dvi, ps, pdf. #output: html # The path to the output directory. May be relative or absolute. #target: docs/html/ # An integer indicating how verbose epydoc should be. The default # value is 0; negative values will supress warnings and errors; # positive values will give more verbose output. verbosity: 0 # A boolean value indicating that Epydoc should show a tracaback # in case of unexpected error. By default don't show tracebacks #debug: 0 # If True, don't try to use colors or cursor control when doing # textual output. The default False assumes a rich text prompt #simple-term: 0 ### Generation options # The default markup language for docstrings, for modules that do # not define __docformat__. Defaults to epytext. docformat: reStructuredText # Whether or not parsing should be used to examine objects. parse: yes # Whether or not introspection should be used to examine objects. introspect: yes # Don't examine in any way the modules whose dotted name match this # regular expression pattern. exclude: mpi4py\.(?!MPI) # Don't perform introspection on the modules whose dotted name match this # regular expression pattern. #exclude-introspect # Don't perform parsing on the modules whose dotted name match this # regular expression pattern. #exclude-parse # The format for showing inheritance objects. # It should be one of: 'grouped', 'listed', 'included'. inheritance: listed # Whether or not to inclue private variables. (Even if included, # private variables will be hidden by default.) private: yes # Whether or not to list each module's imports. imports: no # Whether or not to include syntax highlighted source code in # the output (HTML only). sourcecode: yes # Whether or not to include a a page with Epydoc log, containing # effective option at the time of generation and the reported logs. include-log: no ### Output options # The documented project's name. name: MPI for Python # The documented project's URL. url: https://bitbucket.org/mpi4py/mpi4py # The CSS stylesheet for HTML output. Can be the name of a builtin # stylesheet, or the name of a file. css: white # HTML code for the project link in the navigation bar. If left # unspecified, the project link will be generated based on the # project's name and URL. #link: My Cool Project # The "top" page for the documentation. Can be a URL, the name # of a module or class, or one of the special names "trees.html", # "indices.html", or "help.html" #top: os.path # An alternative help file. The named file should contain the # body of an HTML file; navigation bars will be added to it. #help: my_helpfile.html # Whether or not to include a frames-based table of contents. frames: yes # Whether each class should be listed in its own section when # generating LaTeX or PDF output. separate-classes: no ### API linking options # Define a new API document. A new interpreted text role # will be created #external-api: epydoc # Use the records in this file to resolve objects in the API named NAME. #external-api-file: epydoc:api-objects.txt # Use this URL prefix to configure the string returned for external API. #external-api-root: epydoc:http://epydoc.sourceforge.net/api ### Graph options # The list of graph types that should be automatically included # in the output. Graphs are generated using the Graphviz "dot" # executable. Graph types include: "classtree", "callgraph", # "umlclasstree". Use "all" to include all graph types graph: classtree # The path to the Graphviz "dot" executable, used to generate # graphs. #dotpath: /usr/local/bin/dot # The name of one or more pstat files (generated by the profile # or hotshot module). These are used to generate call graphs. #pstat: profile.out # Specify the font used to generate Graphviz graphs. # (e.g., helvetica or times). graph-font: Helvetica # Specify the font size used to generate Graphviz graphs. graph-font-size: 10 ### Return value options # The condition upon which Epydoc should exit with a non-zero # exit status. Possible values are error, warning, docstring_warning #fail-on: error mpi4py-3.0.3/conf/epydocify.py0000755000175000017500000000652413200540202017265 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python # -------------------------------------------------------------------- from mpi4py import MPI try: from signal import signal, SIGPIPE, SIG_IGN signal(SIGPIPE, SIG_IGN) except ImportError: pass # -------------------------------------------------------------------- try: from docutils.nodes import NodeVisitor NodeVisitor.unknown_visit = lambda self, node: None NodeVisitor.unknown_departure = lambda self, node: None except ImportError: pass try: # epydoc 3.0.1 + docutils 0.6 from docutils.nodes import Text try: from collections import UserString except ImportError: from UserString import UserString if not isinstance(Text, UserString): def Text_get_data(s): try: return s._data except AttributeError: return s.astext() def Text_set_data(s, d): s.astext = lambda: d s._data = d Text.data = property(Text_get_data, Text_set_data) except ImportError: pass # -------------------------------------------------------------------- from epydoc.docwriter import dotgraph import re dotgraph._DOT_VERSION_RE = \ re.compile(r'dot (?:- Graphviz )version ([\d\.]+)') try: dotgraph.DotGraph.DEFAULT_HTML_IMAGE_FORMAT dotgraph.DotGraph.DEFAULT_HTML_IMAGE_FORMAT = 'png' except AttributeError: DotGraph_to_html = dotgraph.DotGraph.to_html DotGraph_run_dot = dotgraph.DotGraph._run_dot def to_html(self, image_file, image_url, center=True): if image_file[-4:] == '.gif': image_file = image_file[:-4] + '.png' if image_url[-4:] == '.gif': image_url = image_url[:-4] + '.png' return DotGraph_to_html(self, image_file, image_url) def _run_dot(self, *options): if '-Tgif' in options: opts = list(options) for i, o in enumerate(opts): if o == '-Tgif': opts[i] = '-Tpng' options = type(options)(opts) return DotGraph_run_dot(self, *options) dotgraph.DotGraph.to_html = to_html dotgraph.DotGraph._run_dot = _run_dot # -------------------------------------------------------------------- from epydoc import docstringparser as dp dp.STANDARD_FIELDS += [ dp.DocstringField(['credits'], 'Credits', multivalue=0, varnames=['__credits__']), ] from epydoc import docintrospecter as di di.UNDOCUMENTED_MODULE_VARS += ('__package__',) # -------------------------------------------------------------------- import re _SIGNATURE_RE = re.compile( # Class name (for builtin methods) r'^\s*((?P\w+)\.)?' + # The function name r'(?P\w+)' + # The parameters r'\(((?P(?:self|cls|mcs)),?)?(?P.*)\)' + # The return value (optional) r'(\s*(->)\s*(?P\S.*?))?'+ # The end marker r'\s*(\n|\s+(--|<=+>)\s+|$|\.\s+|\.\n)') from epydoc import docstringparser as dsp dsp._SIGNATURE_RE = _SIGNATURE_RE # -------------------------------------------------------------------- import sys, os import epydoc.cli def epydocify(): dirname = os.path.dirname(__file__) config = os.path.join(dirname, 'epydoc.cfg') sys.argv.append('--config=' + config) epydoc.cli.cli() if __name__ == '__main__': epydocify() # -------------------------------------------------------------------- mpi4py-3.0.3/conf/mpiconfig.py0000644000175000017500000004031213200562156017247 0ustar dalcinldalcinl00000000000000import sys, os, platform from distutils.util import split_quoted from distutils.spawn import find_executable from distutils import log as dulog try: from collections import OrderedDict except ImportError: OrderedDict = dict try: from configparser import ConfigParser from configparser import Error as ConfigParserError except ImportError: from ConfigParser import ConfigParser from ConfigParser import Error as ConfigParserError class Config(object): def __init__(self, logger=None): self.log = logger or dulog self.section = None self.filename = None self.compiler_info = OrderedDict(( ('mpicc' , None), ('mpicxx' , None), ('mpifort', None), ('mpif90' , None), ('mpif77' , None), ('mpild' , None), )) self.library_info = OrderedDict(( ('define_macros' , []), ('undef_macros' , []), ('include_dirs' , []), ('libraries' , []), ('library_dirs' , []), ('runtime_library_dirs' , []), ('extra_compile_args' , []), ('extra_link_args' , []), ('extra_objects' , []), )) def __bool__(self): for v in self.compiler_info.values(): if v: return True for v in self.library_info.values(): if v: return True return False __nonzero__ = __bool__ def get(self, k, d=None): if k in self.compiler_info: return self.compiler_info[k] if k in self.library_info: return self.library_info[k] return d def info(self, log=None): if log is None: log = self.log mpicc = self.compiler_info.get('mpicc') mpicxx = self.compiler_info.get('mpicxx') mpifort = self.compiler_info.get('mpifort') mpif90 = self.compiler_info.get('mpif90') mpif77 = self.compiler_info.get('mpif77') mpild = self.compiler_info.get('mpild') if mpicc: log.info("MPI C compiler: %s", mpicc) if mpicxx: log.info("MPI C++ compiler: %s", mpicxx) if mpifort: log.info("MPI F compiler: %s", mpifort) if mpif90: log.info("MPI F90 compiler: %s", mpif90) if mpif77: log.info("MPI F77 compiler: %s", mpif77) if mpild: log.info("MPI linker: %s", mpild) def update(self, config, **more): if hasattr(config, 'keys'): config = config.items() for option, value in config: if option in self.compiler_info: self.compiler_info[option] = value if option in self.library_info: self.library_info[option] = value if more: self.update(more) def setup(self, options, environ=None): if environ is None: environ = os.environ self.setup_library_info(options, environ) self.setup_compiler_info(options, environ) def setup_library_info(self, options, environ): filename = section = None mpiopt = getattr(options, 'mpi', None) mpiopt = environ.get('MPICFG', mpiopt) if mpiopt: if ',' in mpiopt: section, filename = mpiopt.split(',', 1) elif os.path.isfile(mpiopt): filename = mpiopt else: section = mpiopt if not filename: filename = "mpi.cfg" if not section: section = "mpi" mach = platform.machine() arch = platform.architecture()[0] plat = sys.platform osnm = os.name if 'linux' == plat[:5]: plat = 'linux' elif 'sunos' == plat[:5]: plat = 'solaris' elif 'win' == plat[:3]: plat = 'windows' suffixes = [] suffixes.append(plat+'-'+mach) suffixes.append(plat+'-'+arch) suffixes.append(plat) suffixes.append(osnm+'-'+mach) suffixes.append(osnm+'-'+arch) suffixes.append(osnm) suffixes.append(mach) suffixes.append(arch) sections = [section+"-"+s for s in suffixes] sections += [section] self.load(filename, sections) if not self: if os.name == 'posix': self._setup_posix() if sys.platform == 'win32': self._setup_windows() def _setup_posix(self): pass def _setup_windows(self): # Microsoft MPI (v7, v6, v5, v4) def msmpi_ver(): try: try: import winreg except ImportError: import _winreg as winreg HKLM = winreg.HKEY_LOCAL_MACHINE subkey = "SOFTWARE\Microsoft\MPI" with winreg.OpenKey(HKLM, subkey) as key: for i in range(winreg.QueryInfoKey(key)[1]): name, value, type = winreg.EnumValue(key, i) if name != "Version": continue major, minor = value.split('.')[:2] return (int(major), int(minor)) except: pass return (1, 0) def setup_msmpi(MSMPI_INC, MSMPI_LIB): from os.path import join, isfile ok = (MSMPI_INC and isfile(join(MSMPI_INC, 'mpi.h')) and MSMPI_LIB and isfile(join(MSMPI_LIB, 'msmpi.lib'))) if not ok: return False MSMPI_VER = '0x%d%02d' % msmpi_ver() MSMPI_INC = os.path.normpath(MSMPI_INC) MSMPI_LIB = os.path.normpath(MSMPI_LIB) self.library_info.update( define_macros=[('MSMPI_VER', MSMPI_VER)], include_dirs=[MSMPI_INC], library_dirs=[MSMPI_LIB], libraries=['msmpi']) self.section = 'msmpi' self.filename = [os.path.dirname(MSMPI_INC)] return True arch = platform.architecture()[0][:2] # Look for Microsoft MPI in the environment MSMPI_INC = os.environ.get('MSMPI_INC') MSMPI_LIB = os.environ.get('MSMPI_LIB'+arch) if setup_msmpi(MSMPI_INC, MSMPI_LIB): return # Look for Microsoft MPI v7/v6/v5 in default install path for ProgramFiles in ('ProgramFiles', 'ProgramFiles(x86)'): ProgramFiles = os.environ.get(ProgramFiles, '') archdir = {'32':'x86', '64':'x64'}[arch] MSMPI_DIR = os.path.join(ProgramFiles, 'Microsoft SDKs', 'MPI') MSMPI_INC = os.path.join(MSMPI_DIR, 'Include') MSMPI_LIB = os.path.join(MSMPI_DIR, 'Lib', archdir) if setup_msmpi(MSMPI_INC, MSMPI_LIB): return # Look for Microsoft HPC Pack 2012 R2 in default install path for ProgramFiles in ('ProgramFiles', 'ProgramFiles(x86)'): ProgramFiles = os.environ.get(ProgramFiles, '') archdir = {'32':'i386', '64':'amd64'}[arch] MSMPI_DIR = os.path.join(ProgramFiles, 'Microsoft MPI') MSMPI_INC = os.path.join(MSMPI_DIR, 'Inc') MSMPI_LIB = os.path.join(MSMPI_DIR, 'Lib', archdir) if setup_msmpi(MSMPI_INC, MSMPI_LIB): return # Microsoft MPI (legacy) and others from glob import glob ProgramFiles = os.environ.get('ProgramFiles', '') CCP_HOME = os.environ.get('CCP_HOME', '') for (name, prefix, suffix) in ( ('msmpi', CCP_HOME, ''), ('msmpi', ProgramFiles, 'Microsoft HPC Pack 2012 R2'), ('msmpi', ProgramFiles, 'Microsoft HPC Pack 2012'), ('msmpi', ProgramFiles, 'Microsoft HPC Pack 2012 SDK'), ('msmpi', ProgramFiles, 'Microsoft HPC Pack 2008 R2'), ('msmpi', ProgramFiles, 'Microsoft HPC Pack 2008'), ('msmpi', ProgramFiles, 'Microsoft HPC Pack 2008 SDK'), ): mpi_dir = os.path.join(prefix, suffix) if not mpi_dir or not os.path.isdir(mpi_dir): continue define_macros = [] include_dir = os.path.join(mpi_dir, 'include') library = 'mpi' library_dir = os.path.join(mpi_dir, 'lib') if name == 'msmpi': include_dir = os.path.join(mpi_dir, 'inc') library = 'msmpi' arch = platform.architecture()[0] if arch == '32bit': library_dir = os.path.join(library_dir, 'i386') if arch == '64bit': library_dir = os.path.join(library_dir, 'amd64') if not os.path.isdir(include_dir): include_dir = os.path.join(mpi_dir, 'include') self.library_info.update( define_macros=define_macros, include_dirs=[include_dir], libraries=[library], library_dirs=[library_dir], ) self.section = name self.filename = [mpi_dir] break def setup_compiler_info(self, options, environ): def find_exe(cmd, path=None): if not cmd: return None parts = split_quoted(cmd) exe, args = parts[0], parts[1:] if not os.path.isabs(exe) and path: exe = os.path.basename(exe) exe = find_executable(exe, path) if not exe: return None return ' '.join([exe]+args) COMPILERS = ( ('mpicc', ['mpicc', 'mpcc_r']), ('mpicxx', ['mpicxx', 'mpic++', 'mpiCC', 'mpCC_r']), ('mpifort', ['mpifort', 'mpif90', 'mpif77', 'mpfort_r']), ('mpif90', ['mpif90', 'mpf90_r']), ('mpif77', ['mpif77', 'mpf77_r']), ('mpild', []), ) # compiler_info = {} PATH = environ.get('PATH', '') for name, _ in COMPILERS: cmd = (environ.get(name.upper()) or getattr(options, name, None) or self.compiler_info.get(name) or None) if cmd: exe = find_exe(cmd, path=PATH) if exe: path = os.path.dirname(exe) PATH = path + os.path.pathsep + PATH compiler_info[name] = exe else: self.log.error("error: '%s' not found", cmd) # if not self and not compiler_info: for name, candidates in COMPILERS: for cmd in candidates: cmd = find_exe(cmd) if cmd: compiler_info[name] = cmd break # self.compiler_info.update(compiler_info) def load(self, filename="mpi.cfg", section='mpi'): if isinstance(filename, str): filenames = filename.split(os.path.pathsep) else: filenames = list(filename) if isinstance(section, str): sections = section.split(',') else: sections = list(section) # try: parser = ConfigParser(dict_type=OrderedDict) except TypeError: parser = ConfigParser() try: read_ok = parser.read(filenames) except ConfigParserError: self.log.error( "error: parsing configuration file/s '%s'", os.path.pathsep.join(filenames)) return None for section in sections: if parser.has_section(section): break section = None if not section: self.log.error( "error: section/s '%s' not found in file/s '%s'", ','.join(sections), os.path.pathsep.join(filenames)) return None parser_items = list(parser.items(section, vars=None)) # compiler_info = type(self.compiler_info)() for option, value in parser_items: if option in self.compiler_info: compiler_info[option] = value # pathsep = os.path.pathsep expanduser = os.path.expanduser expandvars = os.path.expandvars library_info = type(self.library_info)() for k, v in parser_items: if k in ('define_macros', 'undef_macros', ): macros = [e.strip() for e in v.split(',')] if k == 'define_macros': for i, m in enumerate(macros): try: # -DFOO=bar idx = m.index('=') macro = (m[:idx], m[idx+1:] or None) except ValueError: # -DFOO macro = (m, None) macros[i] = macro library_info[k] = macros elif k in ('include_dirs', 'library_dirs', 'runtime_dirs', 'runtime_library_dirs', ): if k == 'runtime_dirs': k = 'runtime_library_dirs' pathlist = [p.strip() for p in v.split(pathsep)] library_info[k] = [expanduser(expandvars(p)) for p in pathlist if p] elif k == 'libraries': library_info[k] = [e.strip() for e in split_quoted(v)] elif k in ('extra_compile_args', 'extra_link_args', ): library_info[k] = split_quoted(v) elif k == 'extra_objects': library_info[k] = [expanduser(expandvars(e)) for e in split_quoted(v)] elif hasattr(self, k): library_info[k] = v.strip() else: pass # self.section = section self.filename = read_ok self.compiler_info.update(compiler_info) self.library_info.update(library_info) return compiler_info, library_info, section, read_ok def dump(self, filename=None, section='mpi'): # prepare configuration values compiler_info = self.compiler_info.copy() library_info = self.library_info.copy() for k in library_info: if k in ('define_macros', 'undef_macros', ): macros = library_info[k] if k == 'define_macros': for i, (m, v) in enumerate(macros): if v is None: macros[i] = m else: macros[i] = '%s=%s' % (m, v) library_info[k] = ','.join(macros) elif k in ('include_dirs', 'library_dirs', 'runtime_library_dirs', ): library_info[k] = os.path.pathsep.join(library_info[k]) elif isinstance(library_info[k], list): library_info[k] = ' '.join(library_info[k]) # fill configuration parser try: parser = ConfigParser(dict_type=OrderedDict) except TypeError: parser = ConfigParser() parser.add_section(section) for option, value in compiler_info.items(): if not value: continue parser.set(section, option, value) for option, value in library_info.items(): if not value: continue parser.set(section, option, value) # save configuration file if filename is None: parser.write(sys.stdout) elif hasattr(filename, 'write'): parser.write(filename) elif isinstance(filename, str): with open(filename, 'w') as f: parser.write(f) return parser if __name__ == '__main__': import optparse parser = optparse.OptionParser() parser.add_option("--mpi", type="string") parser.add_option("--mpicc", type="string") parser.add_option("--mpicxx", type="string") parser.add_option("--mpifort", type="string") parser.add_option("--mpif90", type="string") parser.add_option("--mpif77", type="string") parser.add_option("--mpild", type="string") (opts, args) = parser.parse_args() log = dulog.Log(dulog.INFO) cfg = Config(log) cfg.setup(opts) cfg.dump() mpi4py-3.0.3/conf/mpiregexes.py0000644000175000017500000000525712750576064017471 0ustar dalcinldalcinl00000000000000import re def anyof(*args): return r'(?:%s)' % '|'.join(args) def join(*args): tokens = [] for tok in args: if isinstance(tok, (list, tuple)): tok = '(%s)' % r'\s*'.join(tok) tokens.append(tok) return r'\s*'.join(tokens) lparen = r'\(' rparen = r'\)' colon = r'\:' asterisk = r'\*' ws = r'\s*' sol = r'^' eol = r'$' enum = join('enum', colon) typedef = 'ctypedef' pointer = asterisk struct = join(typedef, 'struct') basic_type = r'(?:void|int|char\s*\*{1,3})' integral_type = r'MPI_(?:Aint|Offset|Count|Fint)' struct_type = r'MPI_(?:Status)' opaque_type = r'MPI_(?:Datatype|Request|Message|Op|Info|Group|Errhandler|Comm|Win|File)' any_mpi_type = r'(?:%s|%s|%s)' % (struct_type, integral_type, opaque_type) upper_name = r'MPI_[A-Z0-9_]+' camel_name = r'MPI_[A-Z][a-z0-9_]+' usrfun_name = camel_name + r'_(?:function|fn)' arg_list = r'.*' ret_type = r'void|int|double|MPI_Aint' canyint = anyof(r'int', r'long(?:\s+long)?') canyptr = join(r'\w+', pointer+'?') annotation = r'\#\:\=' fallback_value = r'\(?[A-Za-z0-9_\+\-\(\)\*]+\)?' fallback = r'(?:%s)?' % join (annotation, [fallback_value]) INTEGRAL_TYPE = join( typedef, [canyint], [integral_type], fallback, eol) STRUCT_TYPE = join( struct, [struct_type], colon, eol) OPAQUE_TYPE = join( typedef, canyptr, [opaque_type], eol) FUNCTION_TYPE = join( typedef, [ret_type], [camel_name], lparen, [arg_list], rparen, fallback, eol) ENUM_VALUE = join(sol, enum, [upper_name], fallback, eol) HANDLE_VALUE = join(sol, [opaque_type], [upper_name], fallback, eol) BASIC_PTRVAL = join(sol, [basic_type, pointer], [upper_name], fallback, eol) INTEGRAL_PTRVAL = join(sol, [integral_type, pointer], [upper_name], fallback, eol) STRUCT_PTRVAL = join(sol, [struct_type, pointer], [upper_name], fallback, eol) FUNCT_PTRVAL = join(sol, [usrfun_name, pointer], [upper_name], fallback, eol) FUNCTION_PROTO = join(sol, [ret_type], [camel_name], lparen, [arg_list], rparen, fallback, eol) fint_type = r'MPI_Fint' fmpi_type = opaque_type.replace('Datatype', 'Type') c2f_name = fmpi_type+'_c2f' f2c_name = fmpi_type+'_f2c' FUNCTION_C2F = join(sol, [fint_type], [c2f_name], lparen, [opaque_type], rparen, fallback, eol) FUNCTION_F2C = join(sol, [opaque_type], [f2c_name], lparen, [fint_type], rparen, fallback, eol) IGNORE = anyof(join(sol, r'cdef.*', eol), join(sol, struct, r'_mpi_\w+_t', eol), join(sol, 'int', r'MPI_(?:SOURCE|TAG|ERROR)', eol), join(sol, r'#.*', eol), join(sol, eol)) # compile the RE's glb = globals() all = [key for key in dict(glb) if key.isupper()] for key in all: glb[key] = re.compile(glb[key]) mpi4py-3.0.3/conf/CMakeLists.txt0000644000175000017500000001463413200562156017472 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(mpi4py) SET(PythonInterp_FIND_VERSION ${PYTHON_VERSION}) SET(PythonLibs_FIND_VERSION ${PYTHON_VERSION_STRING}) FIND_PACKAGE(PythonInterp) FIND_PACKAGE(PythonLibs) FIND_PACKAGE(MPI) SET(mpi4py_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") SET(mpi4py_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/mpi4py") FILE(GLOB mpi4py_PYTHON_FILES RELATIVE ${mpi4py_SOURCE_DIR} ${mpi4py_SOURCE_DIR}/mpi4py/*.py ${mpi4py_SOURCE_DIR}/mpi4py/futures/*.py ) FILE(GLOB mpi4py_HEADER_FILES RELATIVE ${mpi4py_SOURCE_DIR} ${mpi4py_SOURCE_DIR}/mpi4py/*.pxd ${mpi4py_SOURCE_DIR}/mpi4py/include/mpi4py/*.[hi] ${mpi4py_SOURCE_DIR}/mpi4py/include/mpi4py/*.px[di] ) FOREACH(file ${mpi4py_PYTHON_FILES} ${mpi4py_HEADER_FILES} ) SET(src "${mpi4py_SOURCE_DIR}/${file}") SET(tgt "${mpi4py_BINARY_DIR}/${file}") ADD_CUSTOM_COMMAND( DEPENDS ${src} OUTPUT ${tgt} COMMAND ${CMAKE_COMMAND} ARGS -E copy ${src} ${tgt} COMMENT "copy: ${file}" ) SET(mpi4py_OUTPUT_FILES ${mpi4py_OUTPUT_FILES} ${tgt}) ENDFOREACH(file) ##FOREACH(file ${mpi4py_PYTHON_FILES}) ## SET(mpi4py_py ${mpi4py_py} "${mpi4py_BINARY_DIR}/${file}") ## SET(mpi4py_pyc ${mpi4py_pyc} "${mpi4py_BINARY_DIR}/${file}c") ## SET(mpi4py_pyo ${mpi4py_pyo} "${mpi4py_BINARY_DIR}/${file}o") ##ENDFOREACH(file) ##ADD_CUSTOM_COMMAND( ## COMMAND ${CMAKE_COMMAND} ARGS -E echo 'from compileall import compile_dir' > compile_py ## COMMAND ${CMAKE_COMMAND} ARGS -E echo 'compile_dir(\"${mpi4py_BINARY_DIR}\")' >> compile_py ## COMMAND ${PYTHON_EXECUTABLE} ARGS compile_py ## COMMAND ${PYTHON_EXECUTABLE} ARGS -O compile_py ## COMMAND ${CMAKE_COMMAND} ARGS -E remove compile_py ## DEPENDS ${mpi4py_py} ## OUTPUT ${mpi4py_pyc} ${mpi4py_pyo} ## ) ##SET(mpi4py_OUTPUT_FILES ${mpi4py_OUTPUT_FILES} ${mpi4py_pyc} ${mpi4py_pyo}) FIND_PROGRAM(MPI_COMPILER_CC NAMES mpicc HINTS "${MPI_BASE_DIR}" PATH_SUFFIXES bin DOC "MPI C compiler wrapper") MARK_AS_ADVANCED(MPI_COMPILER_CC) FIND_PROGRAM(MPI_COMPILER_CXX NAMES mpicxx mpic++ mpiCC HINTS "${MPI_BASE_DIR}" PATH_SUFFIXES bin DOC "MPI C++ compiler wrapper") MARK_AS_ADVANCED(MPI_COMPILER_CXX) find_program(MPI_COMPILER_FC NAMES mpifort mpif90 mpif77 HINTS "${MPI_BASE_DIR}" PATH_SUFFIXES bin DOC "MPI Fortran compiler wrapper") MARK_AS_ADVANCED(MPI_COMPILER_FC) FIND_PROGRAM(MPI_COMPILER_F90 NAMES mpif90 HINTS "${MPI_BASE_DIR}" PATH_SUFFIXES bin DOC "MPI Fortran 90 compiler wrapper") MARK_AS_ADVANCED(MPI_COMPILER_F90) find_program(MPI_COMPILER_F77 NAMES mpif77 HINTS "${MPI_BASE_DIR}" PATH_SUFFIXES bin DOC "MPI Fortran 77 compiler wrapper") MARK_AS_ADVANCED(MPI_COMPILER_F77) FOREACH(file "mpi.cfg") SET(tgt "${mpi4py_BINARY_DIR}/${file}") ADD_CUSTOM_COMMAND( OUTPUT ${tgt} COMMAND ${CMAKE_COMMAND} ARGS -E echo '[mpi]' > "${tgt}" COMMAND ${CMAKE_COMMAND} ARGS -E echo 'mpicc = ${MPI_COMPILER_CC}' >> ${tgt} COMMAND ${CMAKE_COMMAND} ARGS -E echo 'mpicxx = ${MPI_COMPILER_CXX}' >> ${tgt} COMMAND ${CMAKE_COMMAND} ARGS -E echo 'mpifort = ${MPI_COMPILER_FC}' >> ${tgt} COMMAND ${CMAKE_COMMAND} ARGS -E echo 'mpif90 = ${MPI_COMPILER_F90}' >> ${tgt} COMMAND ${CMAKE_COMMAND} ARGS -E echo 'mpif77 = ${MPI_COMPILER_F77}' >> ${tgt} COMMENT "write: ${file}" ) SET(mpi4py_OUTPUT_FILES ${mpi4py_OUTPUT_FILES} ${tgt}) ENDFOREACH(file) ADD_CUSTOM_TARGET(mpi4py ALL DEPENDS ${mpi4py_OUTPUT_FILES}) INCLUDE_DIRECTORIES( ${MPI_INCLUDE_PATH} ${PYTHON_INCLUDE_PATH} "${mpi4py_SOURCE_DIR}" ) # --- mpi4py.MPI --- PYTHON_ADD_MODULE(mpi4py.MPI MODULE "${mpi4py_SOURCE_DIR}/MPI.c") SET_TARGET_PROPERTIES( mpi4py.MPI PROPERTIES OUTPUT_NAME "MPI" PREFIX "" COMPILE_FLAGS "${MPI_COMPILE_FLAGS}" LINK_FLAGS "${MPI_LINK_FLAGS}" LIBRARY_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}" RUNTIME_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}" LINKER_LANGUAGE C ) TARGET_LINK_LIBRARIES(mpi4py.MPI ${PYTHON_LIBRARY}) TARGET_LINK_LIBRARIES(mpi4py.MPI ${MPI_LIBRARIES}) # --- mpi4py.dl --- PYTHON_ADD_MODULE(mpi4py.dl MODULE "${mpi4py_SOURCE_DIR}/dynload.c") SET_TARGET_PROPERTIES( mpi4py.dl PROPERTIES OUTPUT_NAME "dl" PREFIX "" LIBRARY_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}" RUNTIME_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}" LINKER_LANGUAGE C ) TARGET_LINK_LIBRARIES(mpi4py.dl ${PYTHON_LIBRARY}) TARGET_LINK_LIBRARIES(mpi4py.dl ${CMAKE_DL_LIBS}) # --- mpi4py/bin/python-mpi --- ADD_EXECUTABLE(python-mpi "${mpi4py_SOURCE_DIR}/python.c") SET_TARGET_PROPERTIES( python-mpi PROPERTIES COMPILE_FLAGS "${MPI_COMPILE_FLAGS}" LINK_FLAGS "${MPI_LINK_FLAGS}" RUNTIME_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}/bin" LINKER_LANGUAGE C ) TARGET_LINK_LIBRARIES(python-mpi ${PYTHON_LIBRARY}) TARGET_LINK_LIBRARIES(python-mpi ${MPI_LIBRARIES}) # --- mpi4py/lib-pmpi/libmpe.so --- ADD_LIBRARY(pmpi-mpe MODULE "${mpi4py_SOURCE_DIR}/lib-pmpi/mpe.c") SET_TARGET_PROPERTIES( pmpi-mpe PROPERTIES OUTPUT_NAME "mpe" LIBRARY_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}/lib-pmpi" RUNTIME_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}/lib-pmpi" LINKER_LANGUAGE C ) TARGET_LINK_LIBRARIES(pmpi-mpe ${MPE_LIBRARIES}) TARGET_LINK_LIBRARIES(pmpi-mpe ${MPI_LIBRARIES}) # --- mpi4py/lib-pmpi/libvt.so --- ADD_LIBRARY(pmpi-vt MODULE "${mpi4py_SOURCE_DIR}/lib-pmpi/vt.c") SET_TARGET_PROPERTIES( pmpi-vt PROPERTIES OUTPUT_NAME "vt" LIBRARY_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}/lib-pmpi" RUNTIME_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}/lib-pmpi" LINKER_LANGUAGE C ) TARGET_LINK_LIBRARIES(pmpi-vt ${VT_LIBRARIES}) TARGET_LINK_LIBRARIES(pmpi-vt ${MPI_LIBRARIES}) # --- mpi4py/lib-pmpi/libvt-mpi.so --- ADD_LIBRARY(pmpi-vt-mpi MODULE "${mpi4py_SOURCE_DIR}/lib-pmpi/vt-mpi.c") SET_TARGET_PROPERTIES( pmpi-vt-mpi PROPERTIES OUTPUT_NAME "vt-mpi" LIBRARY_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}/lib-pmpi" RUNTIME_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}/lib-pmpi" LINKER_LANGUAGE C ) TARGET_LINK_LIBRARIES(pmpi-vt-mpi ${VT_MPI_LIBRARIES}) TARGET_LINK_LIBRARIES(pmpi-vt-mpi ${MPI_LIBRARIES}) # --- mpi4py/lib-pmpi/libvt-hyb.so --- ADD_LIBRARY(pmpi-vt-hyb MODULE "${mpi4py_SOURCE_DIR}/lib-pmpi/vt-hyb.c") SET_TARGET_PROPERTIES( pmpi-vt-hyb PROPERTIES OUTPUT_NAME "vt-hyb" LIBRARY_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}/lib-pmpi" RUNTIME_OUTPUT_DIRECTORY "${mpi4py_BINARY_DIR}/lib-pmpi" LINKER_LANGUAGE C ) TARGET_LINK_LIBRARIES(pmpi-vt-hyb ${VT_HYB_LIBRARIES}) TARGET_LINK_LIBRARIES(pmpi-vt-hyb ${MPI_LIBRARIES}) mpi4py-3.0.3/conf/cythonize.py0000644000175000017500000000374413200562156017320 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python import sys, os def cythonize(source, includes=(), destdir_c=None, destdir_h=None, wdir=None): from Cython.Compiler.Main import \ CompilationOptions, default_options, \ compile, \ PyrexError from Cython.Compiler import Options cwd = os.getcwd() try: name, ext = os.path.splitext(source) outputs_c = [name+'.c'] outputs_h = [name+'.h', name+'_api.h'] # change working directory if wdir: os.chdir(wdir) # run Cython on source options = CompilationOptions(default_options) options.output_file = outputs_c[0] options.include_path = list(includes) Options.generate_cleanup_code = 3 any_failures = 0 try: result = compile(source, options) if result.num_errors > 0: any_failures = 1 except (EnvironmentError, PyrexError): e = sys.exc_info()[1] sys.stderr.write(str(e) + '\n') any_failures = 1 if any_failures: for output in outputs_c + outputs_h: try: os.remove(output) except OSError: pass return 1 # move ouputs for destdir, outputs in ( (destdir_c, outputs_c), (destdir_h, outputs_h)): if destdir is None: continue for output in outputs: dest = os.path.join( destdir, os.path.basename(output)) try: os.remove(dest) except OSError: pass os.rename(output, dest) # return 0 # finally: os.chdir(cwd) if __name__ == "__main__": sys.exit( cythonize('mpi4py.MPI.pyx', destdir_h=os.path.join('mpi4py', 'include', 'mpi4py'), wdir='src') ) mpi4py-3.0.3/conf/mpiscanner.py0000644000175000017500000002575613200562156017452 0ustar dalcinldalcinl00000000000000# Very, very naive RE-based way for collecting declarations inside # 'cdef extern from *' Cython blocks in in source files, and next # generate compatibility headers for MPI-2 partially implemented or # built, or MPI-1 implementations, perhaps providing a subset of MPI-2 from textwrap import dedent from warnings import warn import mpiregexes as Re class Node(object): REGEX = None def match(self, line): m = self.REGEX.search(line) if m: return m.groups() match = classmethod(match) HEADER = None CONFIG = None MISSING = None MISSING_HEAD = """\ #ifndef PyMPI_HAVE_%(name)s #undef %(cname)s """ MISSING_TAIL = """ #endif """ def init(self, name, **kargs): assert name is not None self.name = name self.__dict__.update(kargs) def header(self): line = dedent(self.HEADER) % vars(self) line = line.replace('\n', '') line = line.replace(' ', ' ') return line + '\n' def config(self): return dedent(self.CONFIG) % vars(self) def missing(self, guard=True): if guard: head = dedent(self.MISSING_HEAD) tail = dedent(self.MISSING_TAIL) else: head = '#undef %(cname)s\n' tail = '\n\n' body = dedent(self.MISSING) return (head+body+tail) % vars(self) class NodeType(Node): CONFIG = """\ %(ctype)s v; %(ctype)s* p; (void)v; (void)p;""" def __init__(self, ctype): self.init(name=ctype, cname=ctype, ctype=ctype,) class NodeStructType(NodeType): HEADER = """\ typedef struct {%(cfields)s ...; } %(ctype)s;""" MISSING = """\ typedef struct PyMPI_%(ctype)s { %(cfields)s } PyMPI_%(ctype)s; #define %(ctype)s PyMPI_%(ctype)s""" def __init__(self, ctype, cfields): super(NodeStructType, self).__init__(ctype) self.cfields = '\n'.join([' %s %s;' % field for field in cfields]) class NodeFuncType(NodeType): HEADER = """\ typedef %(crett)s (%(cname)s)(%(cargs)s);""" MISSING = """\ typedef %(crett)s (MPIAPI PyMPI_%(cname)s)(%(cargs)s); #define %(cname)s PyMPI_%(cname)s""" def __init__(self, crett, cname, cargs, calias=None): self.init(name=cname, cname=cname, ctype=cname+'*',) self.crett = crett self.cargs = cargs or 'void' if calias is not None: self.MISSING = '#define %(cname)s %(calias)s' self.calias = calias class NodeValue(Node): HEADER = """\ const %(ctype)s %(cname)s;""" CONFIG = """\ %(ctype)s v; v = %(cname)s; (void)v;""" MISSING = '#define %(cname)s (%(calias)s)' def __init__(self, ctype, cname, calias): self.init(name=cname, cname=cname, ctype=ctype, calias=calias) if ctype.endswith('*'): ctype = ctype + ' const' self.HEADER = ctype + ' %(cname)s;' def ctypefix(ct): ct = ct.strip() ct = ct.replace('[][3]',' (*)[3]') ct = ct.replace('[]','*') return ct class NodeFuncProto(Node): HEADER = """\ %(crett)s %(cname)s(%(cargs)s);""" CONFIG = """\ %(crett)s v; v = %(cname)s(%(cargscall)s); (void)v;""" MISSING = ' '. join(['#define %(cname)s(%(cargsnamed)s)', 'PyMPI_UNAVAILABLE("%(name)s"%(comma)s%(cargsnamed)s)']) def __init__(self, crett, cname, cargs, calias=None): self.init(name=cname, cname=cname) self.crett = crett self.cargs = cargs or 'void' if cargs == 'void': cargs = '' if cargs: cargs = cargs.split(',') if cargs[-1].strip() == '...': del cargs[-1] else: cargs = [] self.cargstype = cargs nargs = len(cargs) if nargs: self.comma = ',' else: self.comma = '' cargscall = ['(%s)0' % ctypefix(a) for a in cargs] self.cargscall = ','.join(cargscall) cargsnamed = ['a%d' % (a+1) for a in range(nargs)] self.cargsnamed = ','.join(cargsnamed) if calias is not None: self.MISSING = '#define %(cname)s %(calias)s' self.calias = calias class IntegralType(NodeType): REGEX = Re.INTEGRAL_TYPE HEADER = """\ typedef %(cbase)s... %(ctype)s;""" MISSING = """\ typedef %(ctdef)s PyMPI_%(ctype)s; #define %(ctype)s PyMPI_%(ctype)s""" def __init__(self, cbase, ctype, calias=None): super(IntegralType, self).__init__(ctype) self.cbase = cbase if calias is not None: self.ctdef = calias else: self.ctdef = cbase class StructType(NodeStructType): REGEX = Re.STRUCT_TYPE def __init__(self, ctype): cnames = ['MPI_SOURCE', 'MPI_TAG', 'MPI_ERROR'] cfields = list(zip(['int']*3, cnames)) super(StructType, self).__init__(ctype, cfields) class OpaqueType(NodeType): REGEX = Re.OPAQUE_TYPE HEADER = """\ typedef struct{...;} %(ctype)s;""" MISSING = """\ typedef void *PyMPI_%(ctype)s; #define %(ctype)s PyMPI_%(ctype)s""" class FunctionType(NodeFuncType): REGEX = Re.FUNCTION_TYPE class EnumValue(NodeValue): REGEX = Re.ENUM_VALUE def __init__(self, cname, calias): self.init(name=cname, cname=cname, ctype='int', calias=calias) class HandleValue(NodeValue): REGEX = Re.HANDLE_VALUE MISSING = '#define %(cname)s ((%(ctype)s)%(calias)s)' class BasicPtrVal(NodeValue): REGEX = Re.BASIC_PTRVAL MISSING = '#define %(cname)s ((%(ctype)s)%(calias)s)' class IntegralPtrVal(NodeValue): REGEX = Re.INTEGRAL_PTRVAL MISSING = '#define %(cname)s ((%(ctype)s)%(calias)s)' class StructPtrVal(NodeValue): REGEX = Re.STRUCT_PTRVAL class FunctionPtrVal(NodeValue): REGEX = Re.FUNCT_PTRVAL class FunctionProto(NodeFuncProto): REGEX = Re.FUNCTION_PROTO class FunctionC2F(NodeFuncProto): REGEX = Re.FUNCTION_C2F MISSING = ' '.join(['#define %(cname)s(%(cargsnamed)s)', '((%(crett)s)0)']) class FunctionF2C(NodeFuncProto): REGEX = Re.FUNCTION_F2C MISSING = ' '.join(['#define %(cname)s(%(cargsnamed)s)', '%(cretv)s']) def __init__(self, *a, **k): NodeFuncProto.__init__(self, *a, **k) self.cretv = self.crett.upper() + '_NULL' class Scanner(object): NODE_TYPES = [ IntegralType, StructType, OpaqueType, HandleValue, EnumValue, BasicPtrVal, IntegralPtrVal, StructPtrVal, FunctionType, FunctionPtrVal, FunctionProto, FunctionC2F, FunctionF2C, ] def __init__(self): self.nodes = [] self.nodemap = {} def parse_file(self, filename): with open(filename) as f: self.parse_lines(f) def parse_lines(self, lines): for line in lines: self.parse_line(line) def parse_line(self, line): if Re.IGNORE.match(line): return nodemap = self.nodemap nodelist = self.nodes for nodetype in self.NODE_TYPES: args = nodetype.match(line) if args: node = nodetype(*args) assert node.name not in nodemap, node.name nodemap[node.name] = len(nodelist) nodelist.append(node) break if not args: warn('unmatched line:\n%s' % line) def __iter__(self): return iter(self.nodes) def __getitem__(self, name): return self.nodes[self.nodemap[name]] def dump_header_h(self, fileobj): if isinstance(fileobj, str): with open(fileobj, 'w') as f: self.dump_header_h(f) return for node in self: fileobj.write(node.header()) CONFIG_HEAD = """\ #ifndef PyMPI_CONFIG_H #define PyMPI_CONFIG_H """ CONFIG_MACRO = 'PyMPI_HAVE_%s' CONFIG_TAIL = """\ #endif /* !PyMPI_CONFIG_H */ """ def dump_config_h(self, fileobj, suite): if isinstance(fileobj, str): with open(fileobj, 'w') as f: self.dump_config_h(f, suite) return head = dedent(self.CONFIG_HEAD) macro = dedent(self.CONFIG_MACRO) tail = dedent(self.CONFIG_TAIL) fileobj.write(head) if suite is None: for node in self: line = '#undef %s\n' % ((macro % node.name)) fileobj.write(line) else: for name, result in suite: assert name in self.nodemap if result: line = '#define %s 1\n' % ((macro % name)) else: line = '#undef %s\n' % ((macro % name)) fileobj.write(line) fileobj.write(tail) MISSING_HEAD = """\ #ifndef PyMPI_MISSING_H #define PyMPI_MISSING_H #ifndef PyMPI_UNUSED # if defined(__GNUC__) # if !defined(__cplusplus) || (__GNUC__>3||(__GNUC__==3&&__GNUC_MINOR__>=4)) # define PyMPI_UNUSED __attribute__ ((__unused__)) # else # define PyMPI_UNUSED # endif # elif defined(__INTEL_COMPILER) || defined(__ICC) # define PyMPI_UNUSED __attribute__ ((__unused__)) # else # define PyMPI_UNUSED # endif #endif #define PyMPI_ERR_UNAVAILABLE (-1431655766) /*0xaaaaaaaa*/ static PyMPI_UNUSED int PyMPI_UNAVAILABLE(const char *name,...) { (void)name; return PyMPI_ERR_UNAVAILABLE; } """ MISSING_TAIL = """\ #endif /* !PyMPI_MISSING_H */ """ def dump_missing_h(self, fileobj, suite): if isinstance(fileobj, str): with open(fileobj, 'w') as f: self.dump_missing_h(f, suite) return head = dedent(self.MISSING_HEAD) tail = dedent(self.MISSING_TAIL) # fileobj.write(head) if suite is None: for node in self: fileobj.write(node.missing()) else: for name, result in suite: node = self[name] if not result: fileobj.write(node.missing()) fileobj.write(tail) # ----------------------------------------- if __name__ == '__main__': import sys, os sources = [os.path.join('src', 'mpi4py', 'libmpi.pxd')] log = lambda msg: sys.stderr.write(msg + '\n') scanner = Scanner() for filename in sources: log('parsing file %s' % filename) scanner.parse_file(filename) log('processed %d definitions' % len(scanner.nodes)) config_h = os.path.join('src', 'lib-mpi', 'config', 'config.h') log('writing file %s' % config_h) scanner.dump_config_h(config_h, None) missing_h = os.path.join('src', 'lib-mpi', 'missing.h') log('writing file %s' % missing_h) scanner.dump_missing_h(missing_h, None) #libmpi_h = os.path.join('.', 'libmpi.h') #log('writing file %s' % libmpi_h) #scanner.dump_header_h(libmpi_h) # ----------------------------------------- mpi4py-3.0.3/conf/cythonize.sh0000755000175000017500000000016413200562156017276 0ustar dalcinldalcinl00000000000000#!/bin/sh python -m cython --cleanup 3 -w src $@ mpi4py.MPI.pyx && \ mv src/mpi4py.MPI*.h src/mpi4py/include/mpi4py mpi4py-3.0.3/conf/coverage.sh0000775000175000017500000001632313426006675017074 0ustar dalcinldalcinl00000000000000#!/bin/bash MPIEXEC=${MPIEXEC-mpiexec} PYTHON=${1-${PYTHON-python}} export PYTHONDONTWRITEBYTECODE=1 $PYTHON -m coverage erase $MPIEXEC -n 1 $PYTHON -m coverage run "$(dirname "$0")/coverage-helper.py" > /dev/null || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench --help > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench --threads helloworld -q $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench --no-threads helloworld -q $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench --thread-level=single helloworld -q $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench helloworld > /dev/null $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.bench helloworld > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench helloworld > /dev/null $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.bench helloworld -q $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench ringtest > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench ringtest -q -l 2 -s 1 $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.bench ringtest -q -l 2 -s 1 $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench > /dev/null 2>&1 || true $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.bench > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench qwerty > /dev/null 2>&1 || true $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.bench qwerty > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench --mpe qwerty > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.bench --vt qwerty > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.run --help > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py --version > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py --help > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py - < /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -c "42" > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -m this > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py "$(dirname "$0")/coverage-helper.py" > /dev/null || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -rc threads=0 --rc=thread_level=single -c "" > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -p mpe -profile mpe -c "" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py --profile mpe --profile=mpe -c "" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -vt --vt -mpe --mpe -c "" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -m > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -c > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -p > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -bad > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py --bad=a > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -rc= > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py --rc=a > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py --rc=a= > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py --rc==a > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -c "import sys; sys.exit()" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -c "import sys; sys.exit(0)" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -c "import sys; sys.exit(1)" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -c "import sys; sys.exit('error')" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py -c "from mpi4py import MPI; 1/0;" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run demo/futures/test_futures.py -q 2> /dev/null $MPIEXEC -n 2 $PYTHON -m coverage run demo/futures/test_futures.py -q 2> /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures demo/futures/test_futures.py -q 2> /dev/null $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.futures demo/futures/test_futures.py -q ProcessPoolPickleTest 2> /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures -h > /dev/null $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.futures -h > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures -m this > /dev/null $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.futures -m this > /dev/null $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures -c "42" $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.futures -c "42" $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures - /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures xy > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures -c > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures -m > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures -x > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures -c "1/0" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures -c "raise SystemExit(11)" > /dev/null 2>&1 || true $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures -c "raise SystemExit('')" > /dev/null 2>&1 || true if [ $(command -v mpichversion) ]; then testdir=demo/futures $MPIEXEC -n 1 $PYTHON -m coverage run -m mpi4py.futures.server --xyz > /dev/null 2>&1 || true $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.futures.server --bind localhost & mpi4pyserver=$!; sleep 1; $MPIEXEC -n 1 $PYTHON -m coverage run $testdir/test_service.py --host localhost wait $mpi4pyserver $MPIEXEC -n 2 $PYTHON -m coverage run -m mpi4py.futures.server --port 31414 --info "a=x,b=y" & mpi4pyserver=$!; sleep 1; $MPIEXEC -n 1 $PYTHON -m coverage run $testdir/test_service.py --port 31414 --info "a=x,b=y" wait $mpi4pyserver fi if [ $(command -v mpichversion) ] && [ $(command -v hydra_nameserver) ]; then testdir=demo/futures hydra_nameserver & nameserver=$!; sleep 1; $MPIEXEC -nameserver localhost -n 2 $PYTHON -m coverage run -m mpi4py.futures.server & mpi4pyserver=$!; sleep 1; $MPIEXEC -nameserver localhost -n 1 $PYTHON -m coverage run $testdir/test_service.py wait $mpi4pyserver kill -TERM $nameserver wait $nameserver 2>/dev/null || true fi $PYTHON -m coverage combine mpi4py-3.0.3/conf/coverage-helper.py0000644000175000017500000000272113200562156020346 0ustar dalcinldalcinl00000000000000# --- import mpi4py try: mpi4py.get_include() except: pass try: mpi4py.get_config() except: pass # --- def test_mpi4py_rc(): import mpi4py.rc mpi4py.rc( initialize = True, threads = True, thread_level = 'multiple', finalize = None, fast_reduce = True, recv_mprobe = True, errors = 'exception', ) try: mpi4py.rc(qwerty=False) except TypeError: pass else: raise RuntimeError test_mpi4py_rc() # --- def test_mpi4py_profile(): import mpi4py def mpi4py_profile(*args, **kargs): try: mpi4py.profile(*args, **kargs) except ValueError: pass import warnings warnings.simplefilter('ignore') mpi4py_profile('mpe') mpi4py_profile('mpe', path="/usr/lib") mpi4py_profile('mpe', path=["/usr/lib"]) mpi4py_profile('mpe', logfile="mpi4py") mpi4py_profile('mpe', logfile="mpi4py") mpi4py_profile('vt') mpi4py_profile('vt', path="/usr/lib") mpi4py_profile('vt', path=["/usr/lib"]) mpi4py_profile('vt', logfile="mpi4py") mpi4py_profile('vt', logfile="mpi4py") mpi4py_profile('@querty') mpi4py_profile('c', path=["/usr/lib", "/usr/lib64"]) mpi4py_profile('m', path=["/usr/lib", "/usr/lib64"]) mpi4py_profile('dl', path=["/usr/lib", "/usr/lib64"]) mpi4py_profile('hosts', path=["/etc"]) test_mpi4py_profile() # --- import mpi4py.__main__ import mpi4py.bench import mpi4py.futures import mpi4py.futures.__main__ import mpi4py.futures.server import mpi4py.run mpi4py-3.0.3/conf/cythonize.bat0000644000175000017500000000016213200562156017425 0ustar dalcinldalcinl00000000000000@echo off python -m cython --cleanup 3 -w src %* mpi4py.MPI.pyx move src\mpi4py.MPI*.h src\mpi4py\include\mpi4pympi4py-3.0.3/conf/mpidistutils.py0000664000175000017500000015322713477641753020063 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """ Support for building mpi4py with distutils/setuptools. """ # ----------------------------------------------------------------------------- import sys, os, platform from distutils import sysconfig from distutils.util import convert_path from distutils.util import split_quoted from distutils import log # Fix missing variables PyPy's distutils.sysconfig if hasattr(sys, 'pypy_version_info'): config_vars = sysconfig.get_config_vars() for name in ('prefix', 'exec_prefix'): if name not in config_vars: config_vars[name] = os.path.normpath(getattr(sys, name)) if sys.platform == 'darwin' and 'LDSHARED' in config_vars: if '-undefined' not in config_vars['LDSHARED']: config_vars['LDSHARED'] += ' -undefined dynamic_lookup' # Workaround distutils.cygwinccompiler.get_versions() # failing when the compiler path contains spaces from distutils import cygwinccompiler as cygcc cygcc_get_versions = cygcc.get_versions def get_versions(): import distutils.spawn find_executable_orig = distutils.spawn.find_executable def find_executable(exe): exe = find_executable_orig(exe) if exe and ' ' in exe: exe = '"' + exe + '"' return exe distutils.spawn.find_executable = find_executable versions = cygcc_get_versions() distutils.spawn.find_executable = find_executable_orig return versions cygcc.get_versions = get_versions # Normalize linker flags for runtime library dirs from distutils.unixccompiler import UnixCCompiler rpath_option_orig = UnixCCompiler.runtime_library_dir_option def rpath_option(compiler, dir): option = rpath_option_orig(compiler, dir) if sys.platform.startswith('linux'): if option.startswith('-R'): option = option.replace('-R', '-Wl,-rpath,', 1) elif option.startswith('-Wl,-R,'): option = option.replace('-Wl,-R,', '-Wl,-rpath,', 1) return option UnixCCompiler.runtime_library_dir_option = rpath_option def fix_compiler_cmd(cc, mpicc): if not mpicc: return i = 0 while os.path.basename(cc[i]) == 'env': i = i + 1 while '=' in cc[i]: i = i + 1 while os.path.basename(cc[i]) == 'ccache': i = i + 1 cc[i:i+1] = split_quoted(mpicc) def fix_linker_cmd(ld, mpild): if not mpild: return i = 0 if (sys.platform.startswith('aix') and os.path.basename(ld[i]) == 'ld_so_aix'): i = 1 while os.path.basename(ld[i]) == 'env': i = i + 1 while '=' in ld[i]: i = i + 1 while os.path.basename(ld[i]) == 'ccache': del ld[i] ld[i:i+1] = split_quoted(mpild) def customize_compiler(compiler, lang=None, mpicc=None, mpicxx=None, mpild=None, ): sysconfig.customize_compiler(compiler) if compiler.compiler_type == 'unix': ld = compiler.linker_exe for envvar in ('LDFLAGS', 'CFLAGS', 'CPPFLAGS'): if envvar in os.environ: ld += split_quoted(os.environ[envvar]) if sys.platform == 'darwin': badcflags = ['-mno-fused-madd'] for attr in ('preprocessor', 'compiler', 'compiler_cxx', 'compiler_so', 'linker_so', 'linker_exe'): compiler_cmd = getattr(compiler, attr, None) if compiler_cmd is None: continue for flag in badcflags: while flag in compiler_cmd: compiler_cmd.remove(flag) if compiler.compiler_type == 'unix': # Compiler command overriding if mpicc: fix_compiler_cmd(compiler.compiler, mpicc) if lang in ('c', None): fix_compiler_cmd(compiler.compiler_so, mpicc) if mpicxx: fix_compiler_cmd(compiler.compiler_cxx, mpicxx) if lang == 'c++': fix_compiler_cmd(compiler.compiler_so, mpicxx) if mpild: for ld in [compiler.linker_so, compiler.linker_exe]: fix_linker_cmd(ld, mpild) if compiler.compiler_type == 'cygwin': compiler.set_executables( preprocessor = 'gcc -mcygwin -E', ) if compiler.compiler_type == 'mingw32': compiler.set_executables( preprocessor = 'gcc -mno-cygwin -E', ) if compiler.compiler_type in ('unix', 'cygwin', 'mingw32'): badcxxflags = [ '-Wimplicit', '-Wstrict-prototypes'] for flag in badcxxflags: while flag in compiler.compiler_cxx: compiler.compiler_cxx.remove(flag) if lang == 'c++': while flag in compiler.compiler_so: compiler.compiler_so.remove(flag) if compiler.compiler_type == 'mingw32': # Remove msvcrXX.dll del compiler.dll_libraries[:] # http://bugs.python.org/issue12641 if compiler.gcc_version >= '4.4': for attr in ( 'preprocessor', 'compiler', 'compiler_cxx', 'compiler_so', 'linker_so', 'linker_exe'): try: getattr(compiler, attr).remove('-mno-cygwin') except: pass # Add required define and compiler flags for AMD64 if platform.architecture()[0] == '64bit': for attr in ( 'preprocessor', 'compiler', 'compiler_cxx', 'compiler_so', 'linker_so', 'linker_exe'): getattr(compiler, attr).insert(1, '-DMS_WIN64') getattr(compiler, attr).insert(1, '-m64') if compiler.compiler_type == 'msvc': if not compiler.initialized: compiler.initialize() compiler.ldflags_shared.append('/MANIFEST') compiler.ldflags_shared_debug.append('/MANIFEST') compile_options = (compiler.compile_options, compiler.compile_options_debug) from distutils.msvc9compiler import VERSION if VERSION < 10.0: for options in compile_options: options.append('/D_USE_DECLSPECS_FOR_SAL=0') options.append('/D_USE_ATTRIBUTES_FOR_SAL=0') options.append('/DMSMPI_NO_SAL') if VERSION <= 10.0: topdir = os.path.dirname(os.path.dirname(__file__)) srcdir = os.path.abspath(os.path.join(topdir, 'src')) header = os.path.join(srcdir, 'msvcfix.h') if os.path.exists(header): for options in compile_options: options.append('/FI%s' % header) # ----------------------------------------------------------------------------- from mpiconfig import Config def configuration(command_obj, verbose=True): config = Config() config.setup(command_obj) if verbose: if config.section and config.filename: log.info("MPI configuration: [%s] from '%s'", config.section, ','.join(config.filename)) config.info(log) return config def configure_compiler(compiler, config, lang=None): # mpicc = config.get('mpicc') mpicxx = config.get('mpicxx') mpild = config.get('mpild') if not mpild and (mpicc or mpicxx): if lang == 'c': mpild = mpicc if lang == 'c++': mpild = mpicxx if not mpild: mpild = mpicc or mpicxx # customize_compiler(compiler, lang, mpicc=mpicc, mpicxx=mpicxx, mpild=mpild) # for k, v in config.get('define_macros', []): compiler.define_macro(k, v) for v in config.get('undef_macros', []): compiler.undefine_macro(v) for v in config.get('include_dirs', []): compiler.add_include_dir(v) for v in config.get('libraries', []): compiler.add_library(v) for v in config.get('library_dirs', []): compiler.add_library_dir(v) for v in config.get('runtime_library_dirs', []): compiler.add_runtime_library_dir(v) for v in config.get('extra_objects', []): compiler.add_link_object(v) if compiler.compiler_type in \ ('unix', 'intel', 'cygwin', 'mingw32'): cc_args = config.get('extra_compile_args', []) ld_args = config.get('extra_link_args', []) compiler.compiler += cc_args compiler.compiler_so += cc_args compiler.compiler_cxx += cc_args compiler.linker_so += ld_args compiler.linker_exe += ld_args return compiler # ----------------------------------------------------------------------------- try: from mpiscanner import Scanner except ImportError: class Scanner(object): def parse_file(self, *args): raise NotImplementedError( "You forgot to grab 'mpiscanner.py'") class ConfigureMPI(object): SRCDIR = 'src' SOURCES = [os.path.join('mpi4py', 'libmpi.pxd')] DESTDIR = os.path.join('src', 'lib-mpi') CONFIG_H = os.path.join('config', 'config.h') MISSING_H = 'missing.h' CONFIGTEST_H = """\ /* _configtest.h */ #if !defined(MPIAPI) # define MPIAPI #endif """ def __init__(self, config_cmd): self.scanner = Scanner() for filename in self.SOURCES: fullname = os.path.join(self.SRCDIR, filename) self.scanner.parse_file(fullname) self.config_cmd = config_cmd def run(self): results = [] with open('_configtest.h', 'w') as f: f.write(self.CONFIGTEST_H) for node in self.scanner: name = node.name testcode = node.config() confcode = node.missing(guard=False) log.info("checking for '%s' ..." % name) ok = self.run_test(testcode) if not ok: log.info("**** failed check for '%s'" % name) with open('_configtest.h', 'a') as f: f.write(confcode) results.append((name, ok)) try: os.remove('_configtest.h') except OSError: pass return results def gen_test(self, code): body = ['#include "_configtest.h"', 'int main(int argc, char **argv) {', '\n'.join([' ' + line for line in code.split('\n')]), ' (void)argc; (void)argv;', ' return 0;', '}'] body = '\n'.join(body) + '\n' return body def run_test(self, code, lang='c'): body = self.gen_test(code) headers = ['stdlib.h', 'mpi.h'] ok = self.config_cmd.try_link(body, headers=headers, lang=lang) return ok def dump(self, results): destdir = self.DESTDIR config_h = os.path.join(destdir, self.CONFIG_H) missing_h = os.path.join(destdir, self.MISSING_H) log.info("writing '%s'", config_h) self.scanner.dump_config_h(config_h, results) log.info("writing '%s'", missing_h) self.scanner.dump_missing_h(missing_h, None) # ----------------------------------------------------------------------------- cmd_mpi_opts = [ ('mpild=', None, "MPI linker command, " "overridden by environment variable 'MPILD' " "(defaults to 'mpicc' or 'mpicxx' if any is available)"), ('mpif77=', None, "MPI F77 compiler command, " "overridden by environment variable 'MPIF77' " "(defaults to 'mpif77' if available)"), ('mpif90=', None, "MPI F90 compiler command, " "overridden by environment variable 'MPIF90' " "(defaults to 'mpif90' if available)"), ('mpifort=', None, "MPI Fortran compiler command, " "overridden by environment variable 'MPIFORT' " "(defaults to 'mpifort' if available)"), ('mpicxx=', None, "MPI C++ compiler command, " "overridden by environment variable 'MPICXX' " "(defaults to 'mpicxx', 'mpiCC', or 'mpic++' if any is available)"), ('mpicc=', None, "MPI C compiler command, " "overridden by environment variables 'MPICC' " "(defaults to 'mpicc' if available)"), ('mpi=', None, "specify a configuration section, " "and an optional list of configuration files " + "(e.g. --mpi=section,file1" + os.path.pathsep + "file2), " + "to look for MPI includes/libraries, " "overridden by environment variable 'MPICFG' " "(defaults to section 'mpi' in configuration file 'mpi.cfg')"), ('configure', None, "exhaustive test for checking missing MPI constants/types/functions"), ] def cmd_get_mpi_options(cmd_opts): optlist = [] for (option, _, _) in cmd_opts: if option[-1] == '=': option = option[:-1] option = option.replace('-','_') optlist.append(option) return optlist def cmd_initialize_mpi_options(cmd): mpiopts = cmd_get_mpi_options(cmd_mpi_opts) for op in mpiopts: setattr(cmd, op, None) def cmd_set_undefined_mpi_options(cmd, basecmd): mpiopts = cmd_get_mpi_options(cmd_mpi_opts) optlist = tuple(zip(mpiopts, mpiopts)) cmd.set_undefined_options(basecmd, *optlist) # ----------------------------------------------------------------------------- try: import setuptools except ImportError: setuptools = None def import_command(cmd): try: from importlib import import_module except ImportError: import_module = lambda n: __import__(n, fromlist=[None]) try: if not setuptools: raise ImportError return import_module('setuptools.command.' + cmd) except ImportError: return import_module('distutils.command.' + cmd) if setuptools: from setuptools import Distribution as cls_Distribution from setuptools import Extension as cls_Extension from setuptools import Command else: from distutils.core import Distribution as cls_Distribution from distutils.core import Extension as cls_Extension from distutils.core import Command cmd_config = import_command('config') cmd_build = import_command('build') cmd_install = import_command('install') cmd_sdist = import_command('sdist') cmd_clean = import_command('clean') cmd_build_clib = import_command('build_clib') cmd_build_ext = import_command('build_ext') cmd_install_lib = import_command('install_lib') cmd_install_data = import_command('install_data') from distutils.errors import DistutilsError from distutils.errors import DistutilsSetupError from distutils.errors import DistutilsPlatformError from distutils.errors import DistutilsOptionError from distutils.errors import CCompilerError # ----------------------------------------------------------------------------- # Distribution class supporting a 'executables' keyword class Distribution(cls_Distribution): def __init__ (self, attrs=None): # support for pkg data self.package_data = {} # PEP 314 self.provides = None self.requires = None self.obsoletes = None # supports 'executables' keyword self.executables = None cls_Distribution.__init__(self, attrs) def has_executables(self): return self.executables and len(self.executables) > 0 def is_pure (self): return (cls_Distribution.is_pure(self) and not self.has_executables()) # Extension class class Extension(cls_Extension): def __init__ (self, **kw): optional = kw.pop('optional', None) configure = kw.pop('configure', None) cls_Extension.__init__(self, **kw) self.optional = optional self.configure = configure # Library class class Library(Extension): def __init__ (self, **kw): kind = kw.pop('kind', "static") package = kw.pop('package', None) dest_dir = kw.pop('dest_dir', None) Extension.__init__(self, **kw) self.kind = kind self.package = package self.dest_dir = dest_dir # Executable class class Executable(Extension): def __init__ (self, **kw): package = kw.pop('package', None) dest_dir = kw.pop('dest_dir', None) Extension.__init__(self, **kw) self.package = package self.dest_dir = dest_dir # setup function def setup(**attrs): if setuptools: from setuptools import setup as fcn_setup else: from distutils.core import setup as fcn_setup if 'distclass' not in attrs: attrs['distclass'] = Distribution if 'cmdclass' not in attrs: attrs['cmdclass'] = {} cmdclass = attrs['cmdclass'] for cmd in (config, build, install, test, clean, sdist, build_src, build_clib, build_ext, build_exe, install_lib, install_data, install_exe, ): if cmd.__name__ not in cmdclass: cmdclass[cmd.__name__] = cmd return fcn_setup(**attrs) # ----------------------------------------------------------------------------- # A minimalistic MPI program :-) ConfigTest = """\ int main(int argc, char **argv) { int ierr; (void)argc; (void)argv; ierr = MPI_Init(&argc, &argv); if (ierr) return -1; ierr = MPI_Finalize(); if (ierr) return -1; return 0; } """ class config(cmd_config.config): user_options = cmd_config.config.user_options + cmd_mpi_opts def initialize_options (self): cmd_config.config.initialize_options(self) cmd_initialize_mpi_options(self) self.noisy = 0 def finalize_options (self): cmd_config.config.finalize_options(self) if not self.noisy: self.dump_source = 0 def _clean(self, *a, **kw): if sys.platform.startswith('win'): for fn in ('_configtest.exe.manifest', ): if os.path.exists(fn): self.temp_files.append(fn) cmd_config.config._clean(self, *a, **kw) def check_header (self, header, headers=None, include_dirs=None): if headers is None: headers = [] log.info("checking for header '%s' ..." % header) body = "int main(int n, char**v) { (void)n; (void)v; return 0; }" ok = self.try_compile(body, list(headers) + [header], include_dirs) log.info(ok and 'success!' or 'failure.') return ok def check_macro (self, macro, headers=None, include_dirs=None): log.info("checking for macro '%s' ..." % macro) body = ("#ifndef %s\n" "#error macro '%s' not defined\n" "#endif\n") % (macro, macro) body += "int main(int n, char**v) { (void)n; (void)v; return 0; }" ok = self.try_compile(body, headers, include_dirs) return ok def check_library (self, library, library_dirs=None, headers=None, include_dirs=None, other_libraries=[], lang="c"): if sys.platform == "darwin": self.compiler.linker_exe.append('-flat_namespace') self.compiler.linker_exe.append('-undefined') self.compiler.linker_exe.append('suppress') log.info("checking for library '%s' ..." % library) body = "int main(int n, char**v) { (void)n; (void)v; return 0; }" ok = self.try_link(body, headers, include_dirs, [library]+other_libraries, library_dirs, lang=lang) if sys.platform == "darwin": self.compiler.linker_exe.remove('-flat_namespace') self.compiler.linker_exe.remove('-undefined') self.compiler.linker_exe.remove('suppress') return ok def check_function (self, function, headers=None, include_dirs=None, libraries=None, library_dirs=None, decl=0, call=0, lang="c"): log.info("checking for function '%s' ..." % function) body = [] if decl: if call: proto = "int %s (void);" else: proto = "int %s;" if lang == "c": proto = "\n".join([ "#ifdef __cplusplus", "extern \"C\"", "#endif", proto]) body.append(proto % function) body.append( "int main (int n, char**v) {") if call: body.append(" (void)%s();" % function) else: body.append(" %s;" % function) body.append( " (void)n; (void)v;") body.append( " return 0;") body.append( "}") body = "\n".join(body) + "\n" ok = self.try_link(body, headers, include_dirs, libraries, library_dirs, lang=lang) return ok def check_symbol (self, symbol, type="int", headers=None, include_dirs=None, libraries=None, library_dirs=None, decl=0, lang="c"): log.info("checking for symbol '%s' ..." % symbol) body = [] if decl: body.append("%s %s;" % (type, symbol)) body.append("int main (int n, char**v) {") body.append(" %s s; s = %s; (void)s;" % (type, symbol)) body.append(" (void)n; (void)v;") body.append(" return 0;") body.append("}") body = "\n".join(body) + "\n" ok = self.try_link(body, headers, include_dirs, libraries, library_dirs, lang=lang) return ok def check_function_call (self, function, args='', headers=None, include_dirs=None, libraries=None, library_dirs=None, lang="c"): log.info("checking for function '%s' ..." % function) body = [] body.append("int main (int n, char**v) {") body.append(" (void)%s(%s);" % (function, args)) body.append(" (void)n; (void)v;") body.append(" return 0;") body.append("}") body = "\n".join(body) + "\n" ok = self.try_link(body, headers, include_dirs, libraries, library_dirs, lang=lang) return ok check_hdr = check_header check_lib = check_library check_func = check_function check_sym = check_symbol def run (self): # config = configuration(self, verbose=True) # test MPI C compiler self.compiler = getattr( self.compiler, 'compiler_type', self.compiler) self._check_compiler() configure_compiler(self.compiler, config, lang='c') self.try_link(ConfigTest, headers=['mpi.h'], lang='c') # test MPI C++ compiler self.compiler = getattr( self.compiler, 'compiler_type', self.compiler) self._check_compiler() configure_compiler(self.compiler, config, lang='c++') self.try_link(ConfigTest, headers=['mpi.h'], lang='c++') class build(cmd_build.build): user_options = cmd_build.build.user_options + cmd_mpi_opts def initialize_options(self): cmd_build.build.initialize_options(self) cmd_initialize_mpi_options(self) def finalize_options(self): cmd_build.build.finalize_options(self) config_cmd = self.get_finalized_command('config') if isinstance(config_cmd, config): cmd_set_undefined_mpi_options(self, 'config') def has_executables (self): return self.distribution.has_executables() sub_commands = \ [('build_src', lambda *args: True)] + \ cmd_build.build.sub_commands + \ [('build_exe', has_executables)] # XXX disable build_exe subcommand !!! del sub_commands[-1] class build_src(Command): description = "build C sources from Cython files" user_options = [ ('force', 'f', "forcibly build everything (ignore file timestamps)"), ] boolean_options = ['force'] def initialize_options(self): self.force = False def finalize_options(self): self.set_undefined_options('build', ('force', 'force'), ) def run(self): pass # Command class to build libraries class build_clib(cmd_build_clib.build_clib): user_options = [ ('build-clib-a=', 's', "directory to build C/C++ static libraries to"), ('build-clib-so=', 's', "directory to build C/C++ shared libraries to"), ] user_options += cmd_build_clib.build_clib.user_options + cmd_mpi_opts def initialize_options (self): self.libraries = None self.libraries_a = [] self.libraries_so = [] self.library_dirs = None self.rpath = None self.link_objects = None self.build_lib = None self.build_clib_a = None self.build_clib_so = None cmd_build_clib.build_clib.initialize_options(self) cmd_initialize_mpi_options(self) def finalize_options (self): cmd_build_clib.build_clib.finalize_options(self) build_cmd = self.get_finalized_command('build') if isinstance(build_cmd, build): cmd_set_undefined_mpi_options(self, 'build') # self.set_undefined_options('build', ('build_lib', 'build_lib'), ('build_lib', 'build_clib_a'), ('build_lib', 'build_clib_so')) # if self.libraries: libraries = self.libraries[:] self.libraries = [] self.check_library_list (libraries) for i, lib in enumerate(libraries): if isinstance(lib, Library): if lib.kind == "static": self.libraries_a.append(lib) else: self.libraries_so.append(lib) else: self.libraries.append(lib) def check_library_list (self, libraries): ListType, TupleType = type([]), type(()) if not isinstance(libraries, ListType): raise DistutilsSetupError( "'libraries' option must be a list of " "Library instances or 2-tuples") for lib in libraries: # if isinstance(lib, Library): lib_name = lib.name build_info = lib.__dict__ elif isinstance(lib, TupleType) and len(lib) == 2: lib_name, build_info = lib else: raise DistutilsSetupError( "each element of 'libraries' option must be an " "Library instance or 2-tuple") # if not isinstance(lib_name, str): raise DistutilsSetupError( "first element of each tuple in 'libraries' " "must be a string (the library name)") if '/' in lib_name or (os.sep != '/' and os.sep in lib_name): raise DistutilsSetupError( "bad library name '%s': " "may not contain directory separators" % lib[0]) if not isinstance(build_info, dict): raise DistutilsSetupError( "second element of each tuple in 'libraries' " "must be a dictionary (build info)") lib_type = build_info.get('kind', 'static') if lib_type not in ('static', 'shared', 'dylib'): raise DistutilsSetupError( "in 'kind' option (library '%s'), " "'kind' must be one of " " \"static\", \"shared\", \"dylib\"" % lib_name) sources = build_info.get('sources') if (sources is None or type(sources) not in (ListType, TupleType)): raise DistutilsSetupError( "in 'libraries' option (library '%s'), " "'sources' must be present and must be " "a list of source filenames" % lib_name) depends = build_info.get('depends') if (depends is not None and type(depends) not in (ListType, TupleType)): raise DistutilsSetupError( "in 'libraries' option (library '%s'), " "'depends' must be a list " "of source filenames" % lib_name) def run (self): cmd_build_clib.build_clib.run(self) if (not self.libraries_a and not self.libraries_so): return # from distutils.ccompiler import new_compiler self.compiler = new_compiler(compiler=self.compiler, dry_run=self.dry_run, force=self.force) # if self.define is not None: for (name, value) in self.define: self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: self.compiler.undefine_macro(macro) if self.include_dirs is not None: self.compiler.set_include_dirs(self.include_dirs) if self.library_dirs is not None: self.compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: self.compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: self.compiler.set_link_objects(self.link_objects) # config = configuration(self, verbose=True) configure_compiler(self.compiler, config) if self.compiler.compiler_type == "unix": try: del self.compiler.shared_lib_extension except: pass # self.build_libraries(self.libraries) self.build_libraries(self.libraries_a) self.build_libraries(self.libraries_so) def build_libraries (self, libraries): for lib in libraries: # old-style if not isinstance(lib, Library): cmd_build_clib.build_clib.build_libraries(self, [lib]) continue # new-style try: self.build_library(lib) except (DistutilsError, CCompilerError): if not lib.optional: raise e = sys.exc_info()[1] self.warn('%s' % e) self.warn('building optional library "%s" failed' % lib.name) def config_library (self, lib): if lib.configure: config_cmd = self.get_finalized_command('config') config_cmd.compiler = self.compiler # fix compiler return lib.configure(lib, config_cmd) def build_library(self, lib): from distutils.dep_util import newer_group sources = [convert_path(p) for p in lib.sources] depends = [convert_path(p) for p in lib.depends] depends = sources + depends if lib.kind == "static": build_dir = self.build_clib_a else: build_dir = self.build_clib_so lib_fullpath = self.get_lib_fullpath(lib, build_dir) if not (self.force or newer_group(depends, lib_fullpath, 'newer')): log.debug("skipping '%s' %s library (up-to-date)", lib.name, lib.kind) return ok = self.config_library(lib) log.info("building '%s' %s library", lib.name, lib.kind) # First, compile the source code to object files in the library # directory. (This should probably change to putting object # files in a temporary build directory.) macros = lib.define_macros[:] for undef in lib.undef_macros: macros.append((undef,)) objects = self.compiler.compile( sources, depends=lib.depends, output_dir=self.build_temp, macros=macros, include_dirs=lib.include_dirs, extra_preargs=None, extra_postargs=lib.extra_compile_args, debug=self.debug, ) if lib.kind == "static": # Now "link" the object files together # into a static library. self.compiler.create_static_lib( objects, lib.name, output_dir=os.path.dirname(lib_fullpath), debug=self.debug, ) else: extra_objects = lib.extra_objects[:] export_symbols = lib.export_symbols[:] extra_link_args = lib.extra_link_args[:] extra_preargs = None objects.extend(extra_objects) if (self.compiler.compiler_type == 'msvc' and export_symbols is not None): output_dir = os.path.dirname(lib_fullpath) implib_filename = self.compiler.library_filename(lib.name) implib_file = os.path.join(output_dir, lib_fullpath) extra_link_args.append ('/IMPLIB:' + implib_file) # Detect target language, if not provided src_language = self.compiler.detect_language(sources) language = (lib.language or src_language) # Now "link" the object files together # into a shared library. if sys.platform == 'darwin': linker_so = self.compiler.linker_so[:] while '-bundle' in self.compiler.linker_so: pos = self.compiler.linker_so.index('-bundle') self.compiler.linker_so[pos] = '-shared' install_name = os.path.basename(lib_fullpath) extra_preargs = ['-install_name', install_name] if sys.platform.startswith('linux'): extra_preargs = ['-Wl,--no-as-needed'] self.compiler.link( self.compiler.SHARED_LIBRARY, objects, lib_fullpath, # libraries=lib.libraries, library_dirs=lib.library_dirs, runtime_library_dirs=lib.runtime_library_dirs, export_symbols=export_symbols, extra_preargs=extra_preargs, extra_postargs=extra_link_args, debug=self.debug, target_lang=language, ) if sys.platform == 'darwin': self.compiler.linker_so = linker_so return def get_lib_fullpath (self, lib, build_dir): package_dir = (lib.package or '').split('.') dest_dir = convert_path(lib.dest_dir or '') output_dir = os.path.join(build_dir, *package_dir+[dest_dir]) lib_type = lib.kind if sys.platform != 'darwin': if lib_type == 'dylib': lib_type = 'shared' lib_fullpath = self.compiler.library_filename( lib.name, lib_type=lib_type, output_dir=output_dir) return lib_fullpath def get_source_files (self): filenames = cmd_build_clib.build_clib.get_source_files(self) self.check_library_list(self.libraries) self.check_library_list(self.libraries_a) self.check_library_list(self.libraries_so) for (lib_name, build_info) in self.libraries: filenames.extend(build_info.get(sources, [])) for lib in self.libraries_so + self.libraries_a: filenames.extend(lib.sources) return filenames def get_outputs (self): outputs = [] for lib in self.libraries_a: lib_fullpath = self.get_lib_fullpath(lib, self.build_clib_a) outputs.append(lib_fullpath) for lib in self.libraries_so: lib_fullpath = self.get_lib_fullpath(lib, self.build_clib_so) outputs.append(lib_fullpath) return outputs # Command class to build extension modules class build_ext(cmd_build_ext.build_ext): user_options = cmd_build_ext.build_ext.user_options + cmd_mpi_opts def initialize_options(self): cmd_build_ext.build_ext.initialize_options(self) cmd_initialize_mpi_options(self) def finalize_options(self): cmd_build_ext.build_ext.finalize_options(self) build_cmd = self.get_finalized_command('build') if isinstance(build_cmd, build): cmd_set_undefined_mpi_options(self, 'build') # if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') or sys.platform.startswith('sunos')) and sysconfig.get_config_var('Py_ENABLE_SHARED')): # Remove /lib[64]/pythonX.Y/config libdir = os.path.dirname(sysconfig.get_makefile_filename()) if libdir in self.library_dirs: self.library_dirs.remove(bad_libdir) # Add /lib[64] libdir = sysconfig.get_config_var("LIBDIR") if libdir not in self.library_dirs: self.library_dirs.append(libdir) if libdir not in self.rpath: self.rpath.append(libdir) # Special-case if sys.exec_prefix == '/usr': self.library_dirs.remove(libdir) self.rpath.remove(libdir) def run (self): if self.distribution.has_c_libraries(): build_clib = self.get_finalized_command('build_clib') if build_clib.libraries: build_clib.run() cmd_build_ext.build_ext.run(self) def build_extensions(self): from copy import deepcopy # First, sanity-check the 'extensions' list self.check_extensions_list(self.extensions) # customize compiler self.compiler_sys = deepcopy(self.compiler) customize_compiler(self.compiler_sys) # parse configuration file and configure compiler self.compiler_mpi = self.compiler self.config = configuration(self, verbose=True) configure_compiler(self.compiler, self.config) # extra configuration, check for all MPI symbols if self.configure: log.info('testing for missing MPI symbols') config_cmd = self.get_finalized_command('config') config_cmd.compiler = self.compiler # fix compiler configure = ConfigureMPI(config_cmd) results = configure.run() configure.dump(results) # macro = 'HAVE_CONFIG_H' log.info("defining preprocessor macro '%s'" % macro) self.compiler.define_macro(macro, 1) # build extensions for ext in self.extensions: try: self.build_extension(ext) except (DistutilsError, CCompilerError): if not ext.optional: raise e = sys.exc_info()[1] self.warn('%s' % e) exe = isinstance(ext, Executable) knd = 'executable' if exe else 'extension' self.warn('building optional %s "%s" failed' % (knd, ext.name)) def config_extension (self, ext): configure = getattr(ext, 'configure', None) if configure: config_cmd = self.get_finalized_command('config') config_cmd.compiler = self.compiler # fix compiler configure(ext, config_cmd) def build_extension (self, ext): from distutils.dep_util import newer_group fullname = self.get_ext_fullname(ext.name) filename = os.path.join( self.build_lib, self.get_ext_filename(fullname)) depends = ext.sources + ext.depends if not (self.force or newer_group(depends, filename, 'newer')): log.debug("skipping '%s' extension (up-to-date)", ext.name) return # # XXX -- this is a Vile HACK! self.compiler = self.compiler_mpi if ext.name == 'mpi4py.dl': self.compiler = self.compiler_sys # self.config_extension(ext) cmd_build_ext.build_ext.build_extension(self, ext) # # XXX -- this is a Vile HACK! if ext.name == 'mpi4py.MPI': dest_dir = os.path.dirname(filename) self.mkpath(dest_dir) mpi_cfg = os.path.join(dest_dir, 'mpi.cfg') log.info("writing %s" % mpi_cfg) if not self.dry_run: self.config.dump(filename=mpi_cfg) def get_outputs(self): outputs = cmd_build_ext.build_ext.get_outputs(self) for ext in self.extensions: # XXX -- this is a Vile HACK! if ext.name == 'mpi4py.MPI': fullname = self.get_ext_fullname(ext.name) filename = os.path.join( self.build_lib, self.get_ext_filename(fullname)) dest_dir = os.path.dirname(filename) mpi_cfg = os.path.join(dest_dir, 'mpi.cfg') outputs.append(mpi_cfg) return outputs # Command class to build executables class build_exe(build_ext): description = "build binary executable components" user_options = [ ('build-exe=', None, "build directory for executable components"), ] + build_ext.user_options def initialize_options (self): build_ext.initialize_options(self) self.build_base = None self.build_exe = None def finalize_options (self): build_ext.finalize_options(self) self.configure = None self.set_undefined_options('build', ('build_base','build_base'), ('build_lib', 'build_exe')) self.executables = self.distribution.executables # XXX This is a hack self.extensions = self.distribution.executables self.check_extensions_list = self.check_executables_list self.build_extension = self.build_executable self.get_ext_filename = self.get_exe_filename self.build_lib = self.build_exe def check_executables_list (self, executables): ListType, TupleType = type([]), type(()) if type(executables) is not ListType: raise DistutilsSetupError( "'executables' option must be a list of Executable instances") for exe in executables: if not isinstance(exe, Executable): raise DistutilsSetupError( "'executables' items must be Executable instances") if (exe.sources is None or type(exe.sources) not in (ListType, TupleType)): raise DistutilsSetupError( ("in 'executables' option (executable '%s'), " + "'sources' must be present and must be " + "a list of source filenames") % exe.name) def get_exe_filename(self, exe_name): exe_ext = sysconfig.get_config_var('EXE') or '' return exe_name + exe_ext def get_exe_fullpath(self, exe, build_dir=None): build_dir = build_dir or self.build_exe package_dir = (exe.package or '').split('.') dest_dir = convert_path(exe.dest_dir or '') output_dir = os.path.join(build_dir, *package_dir+[dest_dir]) exe_filename = self.get_exe_filename(exe.name) return os.path.join(output_dir, exe_filename) def config_executable (self, exe): build_ext.config_extension(self, exe) def build_executable (self, exe): from distutils.dep_util import newer_group sources = list(exe.sources) depends = list(exe.depends) exe_fullpath = self.get_exe_fullpath(exe) depends = sources + depends if not (self.force or newer_group(depends, exe_fullpath, 'newer')): log.debug("skipping '%s' executable (up-to-date)", exe.name) return self.config_executable(exe) log.info("building '%s' executable", exe.name) # Next, compile the source code to object files. # XXX not honouring 'define_macros' or 'undef_macros' -- the # CCompiler API needs to change to accommodate this, and I # want to do one thing at a time! macros = exe.define_macros[:] for undef in exe.undef_macros: macros.append((undef,)) # Two possible sources for extra compiler arguments: # - 'extra_compile_args' in Extension object # - CFLAGS environment variable (not particularly # elegant, but people seem to expect it and I # guess it's useful) # The environment variable should take precedence, and # any sensible compiler will give precedence to later # command line args. Hence we combine them in order: extra_args = exe.extra_compile_args[:] objects = self.compiler.compile( sources, output_dir=self.build_temp, macros=macros, include_dirs=exe.include_dirs, debug=self.debug, extra_postargs=extra_args, depends=exe.depends) self._built_objects = objects[:] # Now link the object files together into a "shared object" -- # of course, first we have to figure out all the other things # that go into the mix. if exe.extra_objects: objects.extend(exe.extra_objects) extra_args = exe.extra_link_args[:] # Get special linker flags for building a executable with # bundled Python library, also fix location of needed # python.exp file on AIX ldshflag = sysconfig.get_config_var('LINKFORSHARED') or '' ldshflag = ldshflag.replace('-Xlinker ', '-Wl,') if sys.platform == 'darwin': # fix wrong framework paths fwkprefix = sysconfig.get_config_var('PYTHONFRAMEWORKPREFIX') fwkdir = sysconfig.get_config_var('PYTHONFRAMEWORKDIR') if fwkprefix and fwkdir and fwkdir != 'no-framework': for flag in split_quoted(ldshflag): if flag.startswith(fwkdir): fwkpath = os.path.join(fwkprefix, flag) ldshflag = ldshflag.replace(flag, fwkpath) if sys.platform.startswith('aix'): python_lib = sysconfig.get_python_lib(standard_lib=1) python_exp = os.path.join(python_lib, 'config', 'python.exp') ldshflag = ldshflag.replace('Modules/python.exp', python_exp) # Detect target language, if not provided language = exe.language or self.compiler.detect_language(sources) self.compiler.link( self.compiler.EXECUTABLE, objects, exe_fullpath, output_dir=None, libraries=self.get_libraries(exe), library_dirs=exe.library_dirs, runtime_library_dirs=exe.runtime_library_dirs, extra_preargs=split_quoted(ldshflag), extra_postargs=extra_args, debug=self.debug, target_lang=language) def get_outputs (self): outputs = [] for exe in self.executables: outputs.append(self.get_exe_fullpath(exe)) return outputs class install(cmd_install.install): def run(self): cmd_install.install.run(self) def has_lib (self): return (cmd_install.install.has_lib(self) and self.has_exe()) def has_exe (self): return self.distribution.has_executables() sub_commands = \ cmd_install.install.sub_commands[:] + \ [('install_exe', has_exe)] # XXX disable install_exe subcommand !!! del sub_commands[-1] class install_lib(cmd_install_lib.install_lib): def get_outputs(self): outputs = cmd_install_lib.install_lib.get_outputs(self) for (build_cmd, build_dir) in (('build_clib', 'build_lib'), ('build_exe', 'build_exe')): outs = self._mutate_outputs(1, build_cmd, build_dir, self.install_dir) build_cmd = self.get_finalized_command(build_cmd) build_files = build_cmd.get_outputs() for out in outs: if os.path.exists(out): outputs.append(out) return outputs class install_data (cmd_install_data.install_data): def finalize_options (self): self.set_undefined_options('install', ('install_lib', 'install_dir'), ('root', 'root'), ('force', 'force'), ) class install_exe(cmd_install_lib.install_lib): description = "install binary executable components" user_options = [ ('install-dir=', 'd', "directory to install to"), ('build-dir=','b', "build directory (where to install from)"), ('force', 'f', "force installation (overwrite existing files)"), ('skip-build', None, "skip the build steps"), ] boolean_options = ['force', 'skip-build'] negative_opt = { } def initialize_options (self): self.install_dir = None self.build_dir = None self.force = 0 self.skip_build = None def finalize_options (self): self.set_undefined_options('build_exe', ('build_exe', 'build_dir')) self.set_undefined_options('install', ('force', 'force'), ('skip_build', 'skip_build'), ('install_scripts', 'install_dir')) def run (self): self.build() self.install() def build (self): if not self.skip_build: if self.distribution.has_executables(): self.run_command('build_exe') def install (self): self.outfiles = [] if self.distribution.has_executables(): build_exe = self.get_finalized_command('build_exe') for exe in build_exe.executables: exe_fullpath = build_exe.get_exe_fullpath(exe) exe_filename = os.path.basename(exe_fullpath) if (os.name == "posix" and exe_filename.startswith("python-")): install_name = exe_filename.replace( "python-","python%s-" % sys.version[:3]) link = None else: install_name = exe_fullpath link = None source = exe_fullpath target = os.path.join(self.install_dir, install_name) self.mkpath(self.install_dir) out, done = self.copy_file(source, target, link=link) self.outfiles.append(out) def get_outputs (self): return self.outfiles def get_inputs (self): inputs = [] if self.distribution.has_executables(): build_exe = self.get_finalized_command('build_exe') inputs.extend(build_exe.get_outputs()) return inputs class test(Command): description = "run the test suite" user_options = [ ('args=', 'a', "options"), ] def initialize_options(self): self.args = None def finalize_options(self): if self.args: self.args = split_quoted(self.args) else: self.args = [] def run(self): pass class sdist(cmd_sdist.sdist): def run (self): build_src = self.get_finalized_command('build_src') build_src.run() cmd_sdist.sdist.run(self) class clean(cmd_clean.clean): description = "clean up temporary files from 'build' command" user_options = \ cmd_clean.clean.user_options[:2] + [ ('build-exe=', None, "build directory for executable components " "(default: 'build_exe.build-exe')"), ] + cmd_clean.clean.user_options[2:] def initialize_options(self): cmd_clean.clean.initialize_options(self) self.build_exe = None def finalize_options(self): cmd_clean.clean.finalize_options(self) self.set_undefined_options('build_exe', ('build_exe', 'build_exe')) def run(self): from distutils.dir_util import remove_tree # remove the build/temp. directory # (unless it's already gone) if os.path.exists(self.build_temp): remove_tree(self.build_temp, dry_run=self.dry_run) else: log.debug("'%s' does not exist -- can't clean it", self.build_temp) if self.all: # remove build directories for directory in (self.build_lib, self.build_exe, self.build_scripts, self.bdist_base, ): if os.path.exists(directory): remove_tree(directory, dry_run=self.dry_run) else: log.debug("'%s' does not exist -- can't clean it", directory) # just for the heck of it, try to remove the base build directory: # we might have emptied it right now, but if not we don't care if not self.dry_run: try: os.rmdir(self.build_base) log.info("removing '%s'", self.build_base) except OSError: pass if self.all: # remove the .egg_info directory try: egg_info = self.get_finalized_command('egg_info').egg_info if os.path.exists(egg_info): remove_tree(egg_info, dry_run=self.dry_run) else: log.debug("'%s' does not exist -- can't clean it", egg_info) except DistutilsError: pass # ----------------------------------------------------------------------------- if setuptools: try: from setuptools.command import egg_info as mod_egg_info _FileList = mod_egg_info.FileList class FileList(_FileList): def process_template_line(self, line): level = log.set_threshold(log.ERROR) try: _FileList.process_template_line(self, line) finally: log.set_threshold(level) mod_egg_info.FileList = FileList except: pass # ----------------------------------------------------------------------------- try: import msilib if not hasattr(msilib, 'Win64'): if hasattr(msilib, 'AMD64'): msilib.Win64 = msilib.AMD64 Directory_make_short = msilib.Directory.make_short def make_short(self, file): parts = file.split('.') if len(parts) > 1: file = '_'.join(parts[:-1])+'.'+parts[-1] return Directory_make_short(self, file) msilib.Directory.make_short = make_short except: pass # ----------------------------------------------------------------------------- mpi4py-3.0.3/test/0000775000175000017500000000000013560002767014764 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/test/test_cco_obj_inter.py0000644000175000017500000001701213200562156021165 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest from functools import reduce cumsum = lambda seq: reduce(lambda x, y: x+y, seq, 0) cumprod = lambda seq: reduce(lambda x, y: x*y, seq, 1) _basic = [None, True, False, -7, 0, 7, 2**31, -2**63+1, 2**63-1, -2.17, 0.0, 3.14, 1+2j, 2-3j, 'mpi4py', ] messages = _basic messages += [ list(_basic), tuple(_basic), dict([('k%d' % key, val) for key, val in enumerate(_basic)]) ] @unittest.skipMPI('openmpi(<1.6.0)') @unittest.skipMPI('MPICH1') @unittest.skipIf(MPI.ROOT == MPI.PROC_NULL, 'mpi-root') @unittest.skipIf(MPI.COMM_WORLD.Get_size() < 2, 'mpi-world-size<2') class BaseTestCCOObjInter(object): BASECOMM = MPI.COMM_NULL INTRACOMM = MPI.COMM_NULL INTERCOMM = MPI.COMM_NULL def setUp(self): size = self.BASECOMM.Get_size() rank = self.BASECOMM.Get_rank() if rank < size // 2 : self.COLOR = 0 self.LOCAL_LEADER = 0 self.REMOTE_LEADER = size // 2 else: self.COLOR = 1 self.LOCAL_LEADER = 0 self.REMOTE_LEADER = 0 self.INTRACOMM = self.BASECOMM.Split(self.COLOR, key=0) Create_intercomm = MPI.Intracomm.Create_intercomm self.INTERCOMM = Create_intercomm(self.INTRACOMM, self.LOCAL_LEADER, self.BASECOMM, self.REMOTE_LEADER) def tearDown(self): self.INTRACOMM.Free() self.INTERCOMM.Free() @unittest.skipMPI('MPICH2(<1.0.8)') def testBarrier(self): self.INTERCOMM.Barrier() def testBcast(self): rank = self.INTERCOMM.Get_rank() size = self.INTERCOMM.Get_size() rsize = self.INTERCOMM.Get_remote_size() for smess in messages + [messages]: for color in [0, 1]: if self.COLOR == color: for root in range(size): if root == rank: rmess = self.INTERCOMM.bcast(smess, root=MPI.ROOT) else: rmess = self.INTERCOMM.bcast(None, root=MPI.PROC_NULL) self.assertEqual(rmess, None) else: for root in range(rsize): rmess = self.INTERCOMM.bcast(None, root=root) self.assertEqual(rmess, smess) def testGather(self): rank = self.INTERCOMM.Get_rank() size = self.INTERCOMM.Get_size() rsize = self.INTERCOMM.Get_remote_size() for smess in messages + [messages]: for color in [0, 1]: if self.COLOR == color: for root in range(size): if root == rank: rmess = self.INTERCOMM.gather(smess, root=MPI.ROOT) self.assertEqual(rmess, [smess] * rsize) else: rmess = self.INTERCOMM.gather(None, root=MPI.PROC_NULL) self.assertEqual(rmess, None) else: for root in range(rsize): rmess = self.INTERCOMM.gather(smess, root=root) self.assertEqual(rmess, None) def testScatter(self): rank = self.INTERCOMM.Get_rank() size = self.INTERCOMM.Get_size() rsize = self.INTERCOMM.Get_remote_size() for smess in messages + [messages]: for color in [0, 1]: if self.COLOR == color: for root in range(size): if root == rank: rmess = self.INTERCOMM.scatter([smess] * rsize, root=MPI.ROOT) else: rmess = self.INTERCOMM.scatter(None, root=MPI.PROC_NULL) self.assertEqual(rmess, None) else: for root in range(rsize): rmess = self.INTERCOMM.scatter(None, root=root) self.assertEqual(rmess, smess) @unittest.skipMPI('MPICH2(<1.0.8)') def testAllgather(self): rank = self.INTERCOMM.Get_rank() size = self.INTERCOMM.Get_size() rsize = self.INTERCOMM.Get_remote_size() for smess in messages + [messages]: rmess = self.INTERCOMM.allgather(smess) self.assertEqual(rmess, [smess] * rsize) def testAlltoall(self): rank = self.INTERCOMM.Get_rank() size = self.INTERCOMM.Get_size() rsize = self.INTERCOMM.Get_remote_size() for smess in messages + [messages]: rmess = self.INTERCOMM.alltoall([smess] * rsize) self.assertEqual(rmess, [smess] * rsize) def testReduce(self): rank = self.INTERCOMM.Get_rank() size = self.INTERCOMM.Get_size() rsize = self.INTERCOMM.Get_remote_size() for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): for color in [0, 1]: if self.COLOR == color: for root in range(size): if root == rank: value = self.INTERCOMM.reduce(None, op=op, root=MPI.ROOT) if op == MPI.SUM: self.assertEqual(value, cumsum(range(rsize))) elif op == MPI.PROD: self.assertEqual(value, cumprod(range(rsize))) elif op == MPI.MAX: self.assertEqual(value, rsize-1) elif op == MPI.MIN: self.assertEqual(value, 0) else: value = self.INTERCOMM.reduce(None, op=op, root=MPI.PROC_NULL) self.assertEqual(value, None) else: for root in range(rsize): value = self.INTERCOMM.reduce(rank, op=op, root=root) self.assertEqual(value, None) @unittest.skipMPI('MPICH2(<1.0.8)') def testAllreduce(self): rank = self.INTERCOMM.Get_rank() size = self.INTERCOMM.Get_size() rsize = self.INTERCOMM.Get_remote_size() for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): value = self.INTERCOMM.allreduce(rank, op) if op == MPI.SUM: self.assertEqual(value, cumsum(range(rsize))) elif op == MPI.PROD: self.assertEqual(value, cumprod(range(rsize))) elif op == MPI.MAX: self.assertEqual(value, rsize-1) elif op == MPI.MIN: self.assertEqual(value, 0) class TestCCOObjInter(BaseTestCCOObjInter, unittest.TestCase): BASECOMM = MPI.COMM_WORLD class TestCCOObjInterDup(TestCCOObjInter): def setUp(self): self.BASECOMM = self.BASECOMM.Dup() super(TestCCOObjInterDup, self).setUp() def tearDown(self): self.BASECOMM.Free() super(TestCCOObjInterDup, self).tearDown() class TestCCOObjInterDupDup(TestCCOObjInterDup): BASECOMM = MPI.COMM_WORLD INTERCOMM_ORIG = MPI.COMM_NULL def setUp(self): super(TestCCOObjInterDupDup, self).setUp() self.INTERCOMM_ORIG = self.INTERCOMM self.INTERCOMM = self.INTERCOMM.Dup() def tearDown(self): super(TestCCOObjInterDupDup, self).tearDown() self.INTERCOMM_ORIG.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_comm_inter.py0000644000175000017500000000561113200562156020524 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest @unittest.skipIf(MPI.COMM_WORLD.Get_size() < 2, 'mpi-world-size<2') class BaseTestIntercomm(object): BASECOMM = MPI.COMM_NULL INTRACOMM = MPI.COMM_NULL INTERCOMM = MPI.COMM_NULL def setUp(self): size = self.BASECOMM.Get_size() rank = self.BASECOMM.Get_rank() if rank < size // 2 : self.COLOR = 0 self.LOCAL_LEADER = 0 self.REMOTE_LEADER = size // 2 else: self.COLOR = 1 self.LOCAL_LEADER = 0 self.REMOTE_LEADER = 0 self.INTRACOMM = self.BASECOMM.Split(self.COLOR, key=0) Create_intercomm = MPI.Intracomm.Create_intercomm self.INTERCOMM = Create_intercomm(self.INTRACOMM, self.LOCAL_LEADER, self.BASECOMM, self.REMOTE_LEADER) def tearDown(self): self.INTRACOMM.Free() self.INTERCOMM.Free() def testFortran(self): intercomm = self.INTERCOMM fint = intercomm.py2f() newcomm = MPI.Comm.f2py(fint) self.assertEqual(newcomm, intercomm) self.assertTrue(type(newcomm) is MPI.Intercomm) def testLocalGroupSizeRank(self): intercomm = self.INTERCOMM local_group = intercomm.Get_group() self.assertEqual(local_group.size, intercomm.Get_size()) self.assertEqual(local_group.size, intercomm.size) self.assertEqual(local_group.rank, intercomm.Get_rank()) self.assertEqual(local_group.rank, intercomm.rank) local_group.Free() def testRemoteGroupSize(self): intercomm = self.INTERCOMM remote_group = intercomm.Get_remote_group() self.assertEqual(remote_group.size, intercomm.Get_remote_size()) self.assertEqual(remote_group.size, intercomm.remote_size) remote_group.Free() def testMerge(self): basecomm = self.BASECOMM intercomm = self.INTERCOMM if basecomm.rank < basecomm.size // 2: high = False else: high = True intracomm = intercomm.Merge(high) self.assertEqual(intracomm.size, basecomm.size) self.assertEqual(intracomm.rank, basecomm.rank) intracomm.Free() class TestIntercomm(BaseTestIntercomm, unittest.TestCase): BASECOMM = MPI.COMM_WORLD class TestIntercommDup(TestIntercomm): def setUp(self): self.BASECOMM = self.BASECOMM.Dup() super(TestIntercommDup, self).setUp() def tearDown(self): self.BASECOMM.Free() super(TestIntercommDup, self).tearDown() class TestIntercommDupDup(TestIntercomm): def setUp(self): super(TestIntercommDupDup, self).setUp() INTERCOMM = self.INTERCOMM self.INTERCOMM = self.INTERCOMM.Dup() INTERCOMM.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_spawn.py0000664000175000017500000002066413426010662017527 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys, os, mpi4py MPI4PYPATH = os.path.abspath(os.path.dirname(mpi4py.__path__[0])) CHILDSCRIPT = os.path.abspath( os.path.join(os.path.dirname(__file__), 'spawn_child.py') ) HAVE_MPE = 'MPE_LOGFILE_PREFIX' in os.environ HAVE_VT = 'VT_FILE_PREFIX' in os.environ def childscript(): from tempfile import mkstemp from textwrap import dedent fd, script = mkstemp(suffix='.py', prefix="mpi4py-") os.close(fd) with open(script, "w") as f: f.write(dedent("""\ #!%(python)s import sys; sys.path.insert(0, "%(path)s") import mpi4py if %(mpe)s: mpi4py.profile('mpe', logfile="%(logfile)s") if %(vt)s: mpi4py.profile('vt', logfile="%(logfile)s") from mpi4py import MPI parent = MPI.Comm.Get_parent() parent.Barrier() parent.Disconnect() assert parent == MPI.COMM_NULL parent = MPI.Comm.Get_parent() assert parent == MPI.COMM_NULL """ % dict(python=sys.executable, path=MPI4PYPATH, mpe=HAVE_MPE, vt=HAVE_VT, logfile="runtests-mpi4py-child"))) os.chmod(script, int("770", 8)) return script def appnum(): if MPI.APPNUM == MPI.KEYVAL_INVALID: return None return MPI.COMM_WORLD.Get_attr(MPI.APPNUM) @unittest.skipMPI('MPI(<2.0)') @unittest.skipMPI('openmpi(<3.0.0)') @unittest.skipMPI('openmpi(==4.0.0)') @unittest.skipMPI('mpich', appnum() is None) @unittest.skipMPI('msmpi(<8.1.0)') @unittest.skipMPI('msmpi', appnum() is None) @unittest.skipMPI('MVAPICH2') @unittest.skipMPI('MPICH2') @unittest.skipMPI('MPICH1') @unittest.skipMPI('PlatformMPI') class BaseTestSpawn(object): COMM = MPI.COMM_NULL COMMAND = sys.executable ARGS = [CHILDSCRIPT, MPI4PYPATH, "mpe" if HAVE_MPE else "vt" if HAVE_VT else ""] MAXPROCS = 1 INFO = MPI.INFO_NULL ROOT = 0 def testCommSpawn(self): self.COMM.Barrier() child = self.COMM.Spawn(self.COMMAND, self.ARGS, self.MAXPROCS, info=self.INFO, root=self.ROOT) local_size = child.Get_size() remote_size = child.Get_remote_size() child.Barrier() child.Disconnect() self.COMM.Barrier() self.assertEqual(local_size, self.COMM.Get_size()) self.assertEqual(remote_size, self.MAXPROCS) @unittest.skipMPI('msmpi') def testErrcodes(self): self.COMM.Barrier() errcodes = [] child = self.COMM.Spawn(self.COMMAND, self.ARGS, self.MAXPROCS, info=self.INFO, root=self.ROOT, errcodes=errcodes) child.Barrier() child.Disconnect() self.COMM.Barrier() self.assertEqual(len(errcodes), self.MAXPROCS) for errcode in errcodes: self.assertEqual(errcode, MPI.SUCCESS) @unittest.skipMPI('msmpi') def testArgsOnlyAtRoot(self): self.COMM.Barrier() if self.COMM.Get_rank() == self.ROOT: child = self.COMM.Spawn(self.COMMAND, self.ARGS, self.MAXPROCS, info=self.INFO, root=self.ROOT) else: child = self.COMM.Spawn(None, None, -1, info=MPI.INFO_NULL, root=self.ROOT) child.Barrier() child.Disconnect() self.COMM.Barrier() @unittest.skipIf(os.name != 'posix', 'posix') def testNoArgs(self): self.COMM.Barrier() script = None if self.COMM.Get_rank() == self.ROOT: script = childscript() self.COMM.Barrier() script = self.COMM.bcast(script, root=self.ROOT) child = self.COMM.Spawn(script, None, self.MAXPROCS, info=self.INFO, root=self.ROOT) child.Barrier() child.Disconnect() self.COMM.Barrier() if self.COMM.Get_rank() == self.ROOT: os.remove(script) self.COMM.Barrier() def testCommSpawnMultiple(self): self.COMM.Barrier() count = 2 + (self.COMM.Get_size() == 0) COMMAND = [self.COMMAND] * count ARGS = [self.ARGS] * len(COMMAND) MAXPROCS = [self.MAXPROCS] * len(COMMAND) INFO = [self.INFO] * len(COMMAND) child = self.COMM.Spawn_multiple( COMMAND, ARGS, MAXPROCS, info=INFO, root=self.ROOT) local_size = child.Get_size() remote_size = child.Get_remote_size() child.Barrier() child.Disconnect() self.COMM.Barrier() self.assertEqual(local_size, self.COMM.Get_size()) self.assertEqual(remote_size, sum(MAXPROCS)) def testCommSpawnMultipleDefaults1(self): self.COMM.Barrier() count = 2 + (self.COMM.Get_size() == 0) COMMAND = [self.COMMAND] * count ARGS = [self.ARGS] * len(COMMAND) child = self.COMM.Spawn_multiple(COMMAND, ARGS) local_size = child.Get_size() remote_size = child.Get_remote_size() child.Barrier() child.Disconnect() self.COMM.Barrier() self.assertEqual(local_size, self.COMM.Get_size()) self.assertEqual(remote_size, len(COMMAND)) def testCommSpawnMultipleDefaults2(self): self.COMM.Barrier() count = 2 + (self.COMM.Get_size() == 0) COMMAND = [self.COMMAND] * count ARGS = [self.ARGS] * len(COMMAND) child = self.COMM.Spawn_multiple(COMMAND, ARGS, 1, MPI.INFO_NULL) local_size = child.Get_size() remote_size = child.Get_remote_size() child.Barrier() child.Disconnect() self.COMM.Barrier() self.assertEqual(local_size, self.COMM.Get_size()) self.assertEqual(remote_size, len(COMMAND)) @unittest.skipMPI('msmpi') def testErrcodesMultiple(self): self.COMM.Barrier() count = 2 + (self.COMM.Get_size() == 0) COMMAND = [self.COMMAND] * count ARGS = [self.ARGS]*len(COMMAND) MAXPROCS = list(range(1, len(COMMAND)+1)) INFO = MPI.INFO_NULL errcodelist = [] child = self.COMM.Spawn_multiple( COMMAND, ARGS, MAXPROCS, info=INFO, root=self.ROOT, errcodes=errcodelist) child.Barrier() child.Disconnect() self.COMM.Barrier() self.assertEqual(len(errcodelist), len(COMMAND)) for i, errcodes in enumerate(errcodelist): self.assertEqual(len(errcodes), MAXPROCS[i]) for errcode in errcodes: self.assertEqual(errcode, MPI.SUCCESS) @unittest.skipMPI('msmpi') def testArgsOnlyAtRootMultiple(self): self.COMM.Barrier() if self.COMM.Get_rank() == self.ROOT: count = 2 + (self.COMM.Get_size() == 0) COMMAND = [self.COMMAND] * count ARGS = [self.ARGS] * len(COMMAND) MAXPROCS = list(range(1, len(COMMAND)+1)) INFO = [MPI.INFO_NULL] * len(COMMAND) child = self.COMM.Spawn_multiple( COMMAND, ARGS, MAXPROCS, info=INFO, root=self.ROOT) else: child = self.COMM.Spawn_multiple( None, None, -1, info=MPI.INFO_NULL, root=self.ROOT) child.Barrier() child.Disconnect() self.COMM.Barrier() @unittest.skipIf(os.name != 'posix', 'posix') def testNoArgsMultiple(self): self.COMM.Barrier() script = None if self.COMM.Get_rank() == self.ROOT: script = childscript() self.COMM.Barrier() script = self.COMM.bcast(script, root=self.ROOT) count = 2 + (self.COMM.Get_size() == 0) COMMAND = [script] * count MAXPROCS = list(range(1, len(COMMAND)+1)) INFO = [self.INFO] * len(COMMAND) child = self.COMM.Spawn_multiple(COMMAND, None, MAXPROCS, info=INFO, root=self.ROOT) child.Barrier() child.Disconnect() self.COMM.Barrier() if self.COMM.Get_rank() == self.ROOT: os.remove(script) self.COMM.Barrier() class TestSpawnSelf(BaseTestSpawn, unittest.TestCase): COMM = MPI.COMM_SELF class TestSpawnWorld(BaseTestSpawn, unittest.TestCase): COMM = MPI.COMM_WORLD class TestSpawnSelfMany(BaseTestSpawn, unittest.TestCase): COMM = MPI.COMM_SELF MAXPROCS = MPI.COMM_WORLD.Get_size() class TestSpawnWorldMany(BaseTestSpawn, unittest.TestCase): COMM = MPI.COMM_WORLD MAXPROCS = MPI.COMM_WORLD.Get_size() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_p2p_obj_matched.py0000644000175000017500000001260713200562156021413 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest _basic = [None, True, False, -7, 0, 7, -2**63+1, 2**63-1, -2.17, 0.0, 3.14, 1+2j, 2-3j, 'mpi4py', ] messages = list(_basic) messages += [ list(_basic), tuple(_basic), dict([('k%d' % key, val) for key, val in enumerate(_basic)]) ] @unittest.skipIf(MPI.MESSAGE_NULL == MPI.MESSAGE_NO_PROC, 'mpi-message') class TestMessage(unittest.TestCase): def testMessageNull(self): null = MPI.MESSAGE_NULL self.assertFalse(null) null2 = MPI.Message() self.assertEqual(null, null2) null3 = MPI.Message(null) self.assertEqual(null, null3) def testMessageNoProc(self): # noproc = MPI.MESSAGE_NO_PROC self.assertTrue(noproc) noproc.recv() self.assertTrue(noproc) noproc.irecv().wait() self.assertTrue(noproc) # noproc2 = MPI.Message(MPI.MESSAGE_NO_PROC) self.assertTrue(noproc2) self.assertEqual(noproc2, noproc) self.assertNotEqual(noproc, MPI.MESSAGE_NULL) # message = MPI.Message(MPI.MESSAGE_NO_PROC) message.recv() self.assertEqual(message, MPI.MESSAGE_NULL) # message = MPI.Message(MPI.MESSAGE_NO_PROC) request = message.irecv() self.assertEqual(message, MPI.MESSAGE_NULL) self.assertNotEqual(request, MPI.REQUEST_NULL) request.wait() self.assertEqual(request, MPI.REQUEST_NULL) # comm = MPI.COMM_SELF message = comm.mprobe(MPI.PROC_NULL) self.assertNotEqual(message, MPI.MESSAGE_NULL) self.assertEqual(message, MPI.MESSAGE_NO_PROC) noproc = comm.improbe(MPI.PROC_NULL) self.assertNotEqual(message, MPI.MESSAGE_NULL) self.assertEqual(message, MPI.MESSAGE_NO_PROC) @unittest.skipIf(MPI.MESSAGE_NULL == MPI.MESSAGE_NO_PROC, 'mpi-message') class BaseTestP2PMatched(object): COMM = MPI.COMM_NULL def testIMProbe(self): comm = self.COMM.Dup() try: m = comm.improbe() self.assertEqual(m, None) m = comm.improbe(MPI.ANY_SOURCE) self.assertEqual(m, None) m = comm.improbe(MPI.ANY_SOURCE, MPI.ANY_TAG) self.assertEqual(m, None) status = MPI.Status() m = comm.improbe(MPI.ANY_SOURCE, MPI.ANY_TAG, status) self.assertEqual(m, None) self.assertEqual(status.source, MPI.ANY_SOURCE) self.assertEqual(status.tag, MPI.ANY_TAG) self.assertEqual(status.error, MPI.SUCCESS) m = MPI.Message.iprobe(comm) self.assertEqual(m, None) # Open MPI <= 1.8.4 s = comm.isend(None, comm.rank, 0) r = comm.mprobe(comm.rank, 0).irecv() MPI.Request.waitall([s,r]) finally: comm.Free() def testProbeRecv(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() for smsg in messages: if size == 1: sr = comm.isend(smsg, 0, 0) m = comm.mprobe(0, 0) self.assertTrue(isinstance(m, MPI.Message)) self.assertTrue(m) rr = m.irecv() self.assertFalse(m) self.assertTrue(sr) self.assertTrue(rr) MPI.Request.Waitall([sr,rr]) self.assertFalse(sr) self.assertFalse(rr) # r = comm.isend(smsg, 0, 0) m = MPI.Message.probe(comm, 0, 0) self.assertTrue(isinstance(m, MPI.Message)) self.assertTrue(m) rmsg = m.recv() self.assertFalse(m) r.wait() elif rank == 0: comm.send(smsg, 1, 0) m = comm.mprobe(1, 0) self.assertTrue(m) rmsg = m.recv() self.assertFalse(m) # comm.send(smsg, 1, 1) m = None while not m: m = MPI.Message.iprobe(comm, 1, 1) rmsg = m.irecv().wait() elif rank == 1: m = comm.mprobe(0, 0) self.assertTrue(m) rmsg = m.recv() self.assertFalse(m) comm.send(rmsg, 0, 0) # m = None while not m: m = MPI.Message.iprobe(comm, 0, 1) rmsg = m.irecv().wait() comm.send(smsg, 0, 1) else: rmsg = smsg self.assertEqual(smsg, rmsg) class TestP2PMatchedSelf(BaseTestP2PMatched, unittest.TestCase): COMM = MPI.COMM_SELF class TestP2PMatchedWorld(BaseTestP2PMatched, unittest.TestCase): COMM = MPI.COMM_WORLD @unittest.skipMPI('openmpi(<1.8.5)', MPI.COMM_WORLD.Get_size() > 1) class TestP2PMatchedSelfDup(TestP2PMatchedSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() @unittest.skipMPI('openmpi(<1.8.5)', MPI.COMM_WORLD.Get_size() > 1) class TestP2PMatchedWorldDup(TestP2PMatchedWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_ctypes.py0000664000175000017500000000351113426006675017707 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys pypy_lt_510 = (hasattr(sys, 'pypy_version_info') and sys.pypy_version_info < (5, 10)) try: if pypy_lt_510: ctypes = None else: import ctypes except ImportError: ctypes = None @unittest.skipIf(ctypes is None, 'ctypes') class TestCTYPES(unittest.TestCase): objects = [ MPI.DATATYPE_NULL, MPI.INT, MPI.DOUBLE, MPI.REQUEST_NULL, MPI.INFO_NULL, MPI.INFO_ENV, MPI.ERRHANDLER_NULL, MPI.ERRORS_RETURN, MPI.ERRORS_ARE_FATAL, MPI.GROUP_NULL, MPI.GROUP_EMPTY, MPI.WIN_NULL, MPI.OP_NULL, MPI.SUM, MPI.MIN, MPI.MAX, MPI.FILE_NULL, MPI.MESSAGE_NULL, MPI.MESSAGE_NO_PROC, MPI.COMM_NULL, MPI.COMM_SELF, MPI.COMM_WORLD, ] def testHandleAdress(self): typemap = {ctypes.sizeof(ctypes.c_int): ctypes.c_int, ctypes.sizeof(ctypes.c_void_p): ctypes.c_void_p} for obj in self.objects: handle_t = typemap[MPI._sizeof(obj)] oldobj = obj newobj = type(obj)() handle_old = handle_t.from_address(MPI._addressof(oldobj)) handle_new = handle_t.from_address(MPI._addressof(newobj)) handle_new.value = handle_old.value self.assertEqual(obj, newobj) def testHandleValue(self): typemap = {ctypes.sizeof(ctypes.c_uint32): ctypes.c_uint32, ctypes.sizeof(ctypes.c_uint64): ctypes.c_uint64} for obj in self.objects: uintptr_t = typemap[MPI._sizeof(obj)] handle = uintptr_t.from_address(MPI._addressof(obj)) self.assertEqual(handle.value, MPI._handleof(obj)) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_dl.py0000664000175000017500000000454513426006675017007 0ustar dalcinldalcinl00000000000000import mpiunittest as unittest import sys, os try: from mpi4py import dl except ImportError: dl = None pypy_lt_510 = (hasattr(sys, 'pypy_version_info') and sys.pypy_version_info < (5, 10)) @unittest.skipIf(dl is None, 'mpi4py-dl') class TestDL(unittest.TestCase): def testDL1(self): if sys.platform == 'darwin': libm = 'libm.dylib' else: libm = 'libm.so' handle = dl.dlopen(libm, dl.RTLD_LOCAL|dl.RTLD_LAZY) if handle == 0 and sys.platform.startswith('linux'): self.assertTrue(dl.dlerror() is not None) handle = dl.dlopen('libm.so.6', dl.RTLD_LOCAL|dl.RTLD_LAZY) self.assertTrue(handle != 0) self.assertTrue(dl.dlerror() is None) symbol = dl.dlsym(handle, 'sqrt') self.assertTrue(symbol != 0) self.assertTrue(dl.dlerror() is None) symbol = dl.dlsym(handle, 'xxxxx') self.assertTrue(symbol == 0) self.assertTrue(dl.dlerror() is not None) ierr = dl.dlclose(handle) self.assertTrue(ierr == 0) self.assertTrue(dl.dlerror() is None) @unittest.skipIf(pypy_lt_510 and sys.platform == 'darwin', 'pypy(<5.10)|darwin') def testDL2(self): handle = dl.dlopen(None, dl.RTLD_GLOBAL|dl.RTLD_NOW) self.assertTrue(handle != 0) self.assertTrue(dl.dlerror() is None) symbol = dl.dlsym(handle, 'malloc') self.assertTrue(symbol != 0) self.assertTrue(dl.dlerror() is None) symbol = dl.dlsym(handle, '!@#$%^&*()') self.assertTrue(symbol == 0) self.assertTrue(dl.dlerror() is not None) ierr = dl.dlclose(handle) self.assertTrue(ierr == 0) self.assertTrue(dl.dlerror() is None) def testDL3(self): symbol = dl.dlsym(None, 'malloc') self.assertTrue(symbol != 0) self.assertTrue(dl.dlerror() is None) symbol = dl.dlsym(None, '!@#$%^&*()') self.assertTrue(symbol == 0) self.assertTrue(dl.dlerror() is not None) ierr = dl.dlclose(None) self.assertTrue(ierr == 0) self.assertTrue(dl.dlerror() is None) def testDL4(self): handle = dl.dlopen('xxxxx', dl.RTLD_LOCAL|dl.RTLD_LAZY) self.assertTrue(handle == 0) self.assertTrue(dl.dlerror() is not None) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_msgspec.py0000664000175000017500000005327013557770163020055 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest from arrayimpl import allclose import sys typemap = MPI._typedict try: import array except ImportError: array = None try: import numpy except ImportError: numpy = None pypy2 = (hasattr(sys, 'pypy_version_info') and sys.version_info[0] == 2) pypy_lt_53 = (hasattr(sys, 'pypy_version_info') and sys.pypy_version_info < (5, 3)) def Sendrecv(smsg, rmsg): MPI.COMM_SELF.Sendrecv(sendbuf=smsg, dest=0, sendtag=0, recvbuf=rmsg, source=0, recvtag=0, status=MPI.Status()) class TestMessageSimple(unittest.TestCase): TYPECODES = "hil"+"HIL"+"fd" def check1(self, equal, zero, s, r, t): r[:] = zero Sendrecv(s, r) self.assertTrue(equal(s, r)) def check21(self, equal, zero, s, r, typecode): datatype = typemap[typecode] for type in (None, typecode, datatype): r[:] = zero Sendrecv([s, type], [r, type]) self.assertTrue(equal(s, r)) def check22(self, equal, zero, s, r, typecode): size = len(r) for count in range(size): r[:] = zero Sendrecv([s, count], [r, count]) for i in range(count): self.assertTrue(equal(r[i], s[i])) for i in range(count, size): self.assertTrue(equal(r[i], zero[0])) for count in range(size): r[:] = zero Sendrecv([s, (count, None)], [r, (count, None)]) for i in range(count): self.assertTrue(equal(r[i], s[i])) for i in range(count, size): self.assertTrue(equal(r[i], zero[0])) for disp in range(size): r[:] = zero Sendrecv([s, (None, disp)], [r, (None, disp)]) for i in range(disp): self.assertTrue(equal(r[i], zero[0])) for i in range(disp, size): self.assertTrue(equal(r[i], s[i])) for disp in range(size): for count in range(size-disp): r[:] = zero Sendrecv([s, (count, disp)], [r, (count, disp)]) for i in range(0, disp): self.assertTrue(equal(r[i], zero[0])) for i in range(disp, disp+count): self.assertTrue(equal(r[i], s[i])) for i in range(disp+count, size): self.assertTrue(equal(r[i], zero[0])) def check31(self, equal, z, s, r, typecode): datatype = typemap[typecode] for type in (None, typecode, datatype): for count in (None, len(s)): r[:] = z Sendrecv([s, count, type], [r, count, type]) self.assertTrue(equal(s, r)) def check32(self, equal, z, s, r, typecode): datatype = typemap[typecode] for type in (None, typecode, datatype): for p in range(0, len(s)): r[:] = z Sendrecv([s, (p, None), type], [r, (p, None), type]) self.assertTrue(equal(s[:p], r[:p])) for q in range(p, len(s)): count, displ = q-p, p r[:] = z Sendrecv([s, (count, displ), type], [r, (count, displ), type]) self.assertTrue(equal(s[p:q], r[p:q])) self.assertTrue(equal(z[:p], r[:p])) self.assertTrue(equal(z[q:], r[q:])) def check4(self, equal, z, s, r, typecode): datatype = typemap[typecode] for type in (None, typecode, datatype): for p in range(0, len(s)): r[:] = z Sendrecv([s, p, None, type], [r, p, None, type]) self.assertTrue(equal(s[:p], r[:p])) for q in range(p, len(s)): count, displ = q-p, p r[:] = z Sendrecv([s, count, displ, type], [r, count, displ, type]) self.assertTrue(equal(s[p:q], r[p:q])) self.assertTrue(equal(z[:p], r[:p])) self.assertTrue(equal(z[q:], r[q:])) def testMessageBad(self): buf = MPI.Alloc_mem(5) empty = [None, 0, "B"] def f(): Sendrecv([buf, 0, 0, "i", None], empty) self.assertRaises(ValueError, f) def f(): Sendrecv([buf, 0, "\0"], empty) self.assertRaises(KeyError, f) def f(): Sendrecv([buf, -1, "i"], empty) self.assertRaises(ValueError, f) def f(): Sendrecv([buf, 0, -1, "i"], empty) self.assertRaises(ValueError, f) def f(): Sendrecv([buf, 0, +2, "i"], empty) self.assertRaises(ValueError, f) def f(): Sendrecv([None, 1, 0, "i"], empty) self.assertRaises(ValueError, f) def f(): Sendrecv([buf, None, 0, "i"], empty) self.assertRaises(ValueError, f) def f(): Sendrecv([buf, 0, 1, MPI.DATATYPE_NULL], empty) self.assertRaises(ValueError, f) def f(): Sendrecv([buf, None, 0, MPI.DATATYPE_NULL], empty) self.assertRaises(ValueError, f) try: t = MPI.INT.Create_resized(0, -4).Commit() def f(): Sendrecv([buf, None, t], empty) self.assertRaises(ValueError, f) def f(): Sendrecv([buf, 0, 1, t], empty) self.assertRaises(ValueError, f) t.Free() except NotImplementedError: pass MPI.Free_mem(buf) buf = [1,2,3,4] def f(): Sendrecv([buf, 4, 0, "i"], empty) self.assertRaises(TypeError, f) buf = {1:2,3:4} def f(): Sendrecv([buf, 4, 0, "i"], empty) self.assertRaises(TypeError, f) def f(): Sendrecv(b"abc", b"abc") self.assertRaises((BufferError, TypeError, ValueError), f) def testMessageNone(self): empty = [None, 0, "B"] Sendrecv(empty, empty) empty = [None, "B"] Sendrecv(empty, empty) def testMessageBottom(self): empty = [MPI.BOTTOM, 0, "B"] Sendrecv(empty, empty) empty = [MPI.BOTTOM, "B"] Sendrecv(empty, empty) @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageBytes(self): sbuf = b"abc" rbuf = bytearray(3) Sendrecv([sbuf, "c"], [rbuf, MPI.CHAR]) self.assertEqual(sbuf, rbuf) @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageBytearray(self): sbuf = bytearray(b"abc") rbuf = bytearray(3) Sendrecv([sbuf, "c"], [rbuf, MPI.CHAR]) self.assertEqual(sbuf, rbuf) @unittest.skipIf(pypy2, 'pypy2') @unittest.skipIf(sys.version_info[0] >= 3, 'python3') @unittest.skipIf(hasattr(MPI, 'ffi'), 'mpi4py-cffi') def testMessageUnicode(self): # Test for Issue #120 sbuf = unicode("abc") rbuf = bytearray(len(buffer(sbuf))) Sendrecv([sbuf, MPI.BYTE], [rbuf, MPI.BYTE]) @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageBuffer(self): if sys.version_info[0] != 2: return sbuf = buffer(b"abc") rbuf = bytearray(3) Sendrecv([sbuf, "c"], [rbuf, MPI.CHAR]) self.assertEqual(sbuf, rbuf) self.assertRaises((BufferError, TypeError, ValueError), Sendrecv, [rbuf, "c"], [sbuf, "c"]) @unittest.skipIf(pypy2, 'pypy2') @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageMemoryView(self): if sys.version_info[:2] < (2, 7): return sbuf = memoryview(b"abc") rbuf = bytearray(3) Sendrecv([sbuf, "c"], [rbuf, MPI.CHAR]) self.assertEqual(sbuf, rbuf) self.assertRaises((BufferError, TypeError, ValueError), Sendrecv, [rbuf, "c"], [sbuf, "c"]) @unittest.skipIf(array is None, 'array') def checkArray(self, test): from operator import eq as equal for t in tuple(self.TYPECODES): for n in range(1, 10): z = array.array(t, [0]*n) s = array.array(t, list(range(n))) r = array.array(t, [0]*n) test(equal, z, s, r, t) def testArray1(self): self.checkArray(self.check1) def testArray21(self): self.checkArray(self.check21) def testArray22(self): self.checkArray(self.check22) def testArray31(self): self.checkArray(self.check31) def testArray32(self): self.checkArray(self.check32) def testArray4(self): self.checkArray(self.check4) @unittest.skipIf(numpy is None, 'numpy') def checkNumPy(self, test): from numpy import zeros, arange, empty for t in tuple(self.TYPECODES): for n in range(10): z = zeros (n, dtype=t) s = arange(n, dtype=t) r = empty (n, dtype=t) test(allclose, z, s, r, t) def testNumPy1(self): self.checkNumPy(self.check1) def testNumPy21(self): self.checkNumPy(self.check21) def testNumPy22(self): self.checkNumPy(self.check22) def testNumPy31(self): self.checkNumPy(self.check31) def testNumPy32(self): self.checkNumPy(self.check32) def testNumPy4(self): self.checkNumPy(self.check4) @unittest.skipIf(numpy is None, 'numpy') def testNumPyBad(self): from numpy import zeros wbuf = zeros([1]) rbuf = zeros([1]) rbuf.flags.writeable = False self.assertRaises((BufferError, ValueError), Sendrecv, wbuf, rbuf) wbuf = zeros([3,2])[:,0] rbuf = zeros([3]) rbuf.flags.writeable = False self.assertRaises((BufferError, ValueError), Sendrecv, rbuf, wbuf) @unittest.skipMPI('msmpi(<8.0.0)') class TestMessageBlock(unittest.TestCase): @unittest.skipIf(MPI.COMM_WORLD.Get_size() < 2, 'mpi-world-size<2') def testMessageBad(self): comm = MPI.COMM_WORLD buf = MPI.Alloc_mem(4) empty = [None, 0, "B"] def f(): comm.Alltoall([buf, None, "i"], empty) self.assertRaises(ValueError, f) MPI.Free_mem(buf) def Alltoallv(smsg, rmsg): comm = MPI.COMM_SELF comm.Alltoallv(smsg, rmsg) @unittest.skipMPI('msmpi(<8.0.0)') class TestMessageVector(unittest.TestCase): TYPECODES = "hil"+"HIL"+"fd" def check1(self, equal, zero, s, r, t): r[:] = zero Alltoallv(s, r) self.assertTrue(equal(s, r)) def check21(self, equal, zero, s, r, typecode): datatype = typemap[typecode] for type in (None, typecode, datatype): r[:] = zero Alltoallv([s, type], [r, type]) self.assertTrue(equal(s, r)) def check22(self, equal, zero, s, r, typecode): size = len(r) for count in range(size): r[:] = zero Alltoallv([s, count], [r, count]) for i in range(count): self.assertTrue(equal(r[i], s[i])) for i in range(count, size): self.assertTrue(equal(r[i], zero[0])) for count in range(size): r[:] = zero Alltoallv([s, (count, None)], [r, (count, None)]) for i in range(count): self.assertTrue(equal(r[i], s[i])) for i in range(count, size): self.assertTrue(equal(r[i], zero[0])) for disp in range(size): for count in range(size-disp): r[:] = zero Alltoallv([s, ([count], [disp])], [r, ([count], [disp])]) for i in range(0, disp): self.assertTrue(equal(r[i], zero[0])) for i in range(disp, disp+count): self.assertTrue(equal(r[i], s[i])) for i in range(disp+count, size): self.assertTrue(equal(r[i], zero[0])) def check31(self, equal, z, s, r, typecode): datatype = typemap[typecode] for type in (None, typecode, datatype): for count in (None, len(s)): r[:] = z Alltoallv([s, count, type], [r, count, type]) self.assertTrue(equal(s, r)) def check32(self, equal, z, s, r, typecode): datatype = typemap[typecode] for type in (None, typecode, datatype): for p in range(len(s)): r[:] = z Alltoallv([s, (p, None), type], [r, (p, None), type]) self.assertTrue(equal(s[:p], r[:p])) for q in range(p, len(s)): count, displ = q-p, p r[:] = z Alltoallv([s, (count, [displ]), type], [r, (count, [displ]), type]) self.assertTrue(equal(s[p:q], r[p:q])) self.assertTrue(equal(z[:p], r[:p])) self.assertTrue(equal(z[q:], r[q:])) def check4(self, equal, z, s, r, typecode): datatype = typemap[typecode] for type in (None, typecode, datatype): for p in range(0, len(s)): r[:] = z Alltoallv([s, p, None, type], [r, p, None, type]) self.assertTrue(equal(s[:p], r[:p])) for q in range(p, len(s)): count, displ = q-p, p r[:] = z Alltoallv([s, count, [displ], type], [r, count, [displ], type]) self.assertTrue(equal(s[p:q], r[p:q])) self.assertTrue(equal(z[:p], r[:p])) self.assertTrue(equal(z[q:], r[q:])) def testMessageBad(self): buf = MPI.Alloc_mem(5) empty = [None, 0, [0], "B"] def f(): Alltoallv([buf, 0, [0], "i", None], empty) self.assertRaises(ValueError, f) def f(): Alltoallv([buf, 0, [0], "\0"], empty) self.assertRaises(KeyError, f) def f(): Alltoallv([buf, None, [0], MPI.DATATYPE_NULL], empty) self.assertRaises(ValueError, f) def f(): Alltoallv([buf, None, [0], "i"], empty) self.assertRaises(ValueError, f) try: t = MPI.INT.Create_resized(0, -4).Commit() def f(): Alltoallv([buf, None, [0], t], empty) self.assertRaises(ValueError, f) t.Free() except NotImplementedError: pass MPI.Free_mem(buf) buf = [1,2,3,4] def f(): Alltoallv([buf, 0, 0, "i"], empty) self.assertRaises(TypeError, f) buf = {1:2,3:4} def f(): Alltoallv([buf, 0, 0, "i"], empty) self.assertRaises(TypeError, f) def testMessageNone(self): empty = [None, 0, "B"] Alltoallv(empty, empty) empty = [None, "B"] Alltoallv(empty, empty) def testMessageBottom(self): empty = [MPI.BOTTOM, 0, [0], "B"] Alltoallv(empty, empty) empty = [MPI.BOTTOM, 0, "B"] Alltoallv(empty, empty) empty = [MPI.BOTTOM, "B"] Alltoallv(empty, empty) @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageBytes(self): sbuf = b"abc" rbuf = bytearray(3) Alltoallv([sbuf, "c"], [rbuf, MPI.CHAR]) self.assertEqual(sbuf, rbuf) @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageBytearray(self): sbuf = bytearray(b"abc") rbuf = bytearray(3) Alltoallv([sbuf, "c"], [rbuf, MPI.CHAR]) self.assertEqual(sbuf, rbuf) @unittest.skipIf(array is None, 'array') def checkArray(self, test): from operator import eq as equal for t in tuple(self.TYPECODES): for n in range(1, 10): z = array.array(t, [0]*n) s = array.array(t, list(range(n))) r = array.array(t, [0]*n) test(equal, z, s, r, t) def testArray1(self): self.checkArray(self.check1) def testArray21(self): self.checkArray(self.check21) def testArray22(self): self.checkArray(self.check22) def testArray31(self): self.checkArray(self.check31) def testArray32(self): self.checkArray(self.check32) def testArray4(self): self.checkArray(self.check4) @unittest.skipIf(numpy is None, 'numpy') def checkNumPy(self, test): from numpy import zeros, arange, empty for t in tuple(self.TYPECODES): for n in range(10): z = zeros (n, dtype=t) s = arange(n, dtype=t) r = empty (n, dtype=t) test(allclose, z, s, r, t) def testNumPy1(self): self.checkNumPy(self.check1) def testNumPy21(self): self.checkNumPy(self.check21) def testNumPy22(self): self.checkNumPy(self.check22) def testNumPy31(self): self.checkNumPy(self.check31) def testNumPy32(self): self.checkNumPy(self.check32) def testNumPy4(self): self.checkNumPy(self.check4) def Alltoallw(smsg, rmsg): try: MPI.COMM_SELF.Alltoallw(smsg, rmsg) except NotImplementedError: if isinstance(smsg, (list, tuple)): smsg = smsg[0] if isinstance(rmsg, (list, tuple)): rmsg = rmsg[0] try: rmsg[:] = smsg except: pass class TestMessageVectorW(unittest.TestCase): def testMessageBad(self): sbuf = MPI.Alloc_mem(4) rbuf = MPI.Alloc_mem(4) def f(): Alltoallw([sbuf],[rbuf]) self.assertRaises(ValueError, f) def f(): Alltoallw([sbuf, [0], [0], [MPI.BYTE], None], [rbuf, [0], [0], [MPI.BYTE]]) self.assertRaises(ValueError, f) def f(): Alltoallw([sbuf, [0], [0], [MPI.BYTE]], [rbuf, [0], [0], [MPI.BYTE], None]) self.assertRaises(ValueError, f) MPI.Free_mem(sbuf) MPI.Free_mem(rbuf) @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageBytes(self): sbuf = b"abc" rbuf = bytearray(3) smsg = [sbuf, [3], [0], [MPI.CHAR]] rmsg = [rbuf, ([3], [0]), [MPI.CHAR]] Alltoallw(smsg, rmsg) self.assertEqual(sbuf, rbuf) @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageBytearray(self): sbuf = bytearray(b"abc") rbuf = bytearray(3) smsg = [sbuf, [3], [0], [MPI.CHAR]] rmsg = [rbuf, ([3], [0]), [MPI.CHAR]] Alltoallw(smsg, rmsg) self.assertEqual(sbuf, rbuf) sbuf = bytearray(b"abc") rbuf = bytearray(3) smsg = [sbuf, None, None, [MPI.CHAR]] rmsg = [rbuf, [MPI.CHAR]] Alltoallw(smsg, rmsg) self.assertEqual(sbuf[0], rbuf[0]) self.assertEqual(bytearray(2), rbuf[1:]) def PutGet(smsg, rmsg, target): try: win = MPI.Win.Allocate(256, 1, MPI.INFO_NULL, MPI.COMM_SELF) except NotImplementedError: win = MPI.WIN_NULL try: try: win.Fence() except NotImplementedError: pass try: win.Put(smsg, 0, target) except NotImplementedError: pass try: win.Fence() except NotImplementedError: pass try: win.Get(rmsg, 0, target) except NotImplementedError: if isinstance(smsg, (list, tuple)): smsg = smsg[0] if isinstance(rmsg, (list, tuple)): rmsg = rmsg[0] try: rmsg[:] = smsg except: pass try: win.Fence() except NotImplementedError: pass finally: if win != MPI.WIN_NULL: win.Free() class TestMessageRMA(unittest.TestCase): def testMessageBad(self): sbuf = [None, 0, 0, "B", None] rbuf = [None, 0, 0, "B"] target = (0, 0, MPI.BYTE) def f(): PutGet(sbuf, rbuf, target) self.assertRaises(ValueError, f) sbuf = [None, 0, 0, "B"] rbuf = [None, 0, 0, "B", None] target = (0, 0, MPI.BYTE) def f(): PutGet(sbuf, rbuf, target) self.assertRaises(ValueError, f) sbuf = [None, 0, "B"] rbuf = [None, 0, "B"] target = (0, 0, MPI.BYTE, None) def f(): PutGet(sbuf, rbuf, target) self.assertRaises(ValueError, f) sbuf = [None, 0, "B"] rbuf = [None, 0, "B"] target = {1:2,3:4} def f(): PutGet(sbuf, rbuf, target) self.assertRaises(ValueError, f) def testMessageNone(self): for empty in ([None, 0, 0, MPI.BYTE], [None, 0, MPI.BYTE], [None, MPI.BYTE]): for target in (None, 0, [0, 0, MPI.BYTE]): PutGet(empty, empty, target) def testMessageBottom(self): for empty in ([MPI.BOTTOM, 0, 0, MPI.BYTE], [MPI.BOTTOM, 0, MPI.BYTE], [MPI.BOTTOM, MPI.BYTE]): for target in (None, 0, [0, 0, MPI.BYTE]): PutGet(empty, empty, target) @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageBytes(self): for target in (None, 0, [0, 3, MPI.BYTE]): sbuf = b"abc" rbuf = bytearray(3) PutGet(sbuf, rbuf, target) self.assertEqual(sbuf, rbuf) @unittest.skipIf(pypy_lt_53, 'pypy(<5.3)') def testMessageBytearray(self): for target in (None, 0, [0, 3, MPI.BYTE]): sbuf = bytearray(b"abc") rbuf = bytearray(3) PutGet(sbuf, rbuf, target) self.assertEqual(sbuf, rbuf) @unittest.skipIf(pypy2, 'pypy2') @unittest.skipIf(sys.version_info[0] >= 3, 'python3') @unittest.skipIf(hasattr(MPI, 'ffi'), 'mpi4py-cffi') def testMessageUnicode(self): # Test for Issue #120 sbuf = unicode("abc") rbuf = bytearray(len(buffer(sbuf))) PutGet([sbuf, MPI.BYTE], [rbuf, MPI.BYTE], None) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_fortran.py0000644000175000017500000000472113200562156020044 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class BaseTestFortran(object): HANDLES = [] def testFortran(self): for handle1 in self.HANDLES: try: fint = handle1.py2f() except NotImplementedError: continue handle2 = type(handle1).f2py(fint) self.assertEqual(handle1, handle2) class TestFortranStatus(BaseTestFortran, unittest.TestCase): def setUp(self): s1 = MPI.Status() s2 = MPI.Status() s2.source = 1 s2.tag = 2 s2.error = MPI.ERR_OTHER s3 = MPI.Status() s3.source = 0 s3.tag = 0 s3.error = MPI.SUCCESS self.HANDLES = [s1, s2, s3] @unittest.skipMPI('MPICH1') def testFortran(self): super(TestFortranStatus, self).testFortran() class TestFortranDatatype(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.DATATYPE_NULL, MPI.CHAR, MPI.SHORT, MPI.INT, MPI.LONG, MPI.FLOAT, MPI.DOUBLE, ] class TestFortranOp(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.OP_NULL, MPI.MAX, MPI.MIN, MPI.SUM, MPI.PROD, MPI.LAND, MPI.BAND, MPI.LOR, MPI.BOR, MPI.LXOR, MPI.BXOR, MPI.MAXLOC, MPI.MINLOC, ] class TestFortranRequest(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.REQUEST_NULL, ] class TestFortranMessage(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.MESSAGE_NULL, MPI.MESSAGE_NO_PROC, ] class TestFortranErrhandler(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.ERRHANDLER_NULL, MPI.ERRORS_RETURN, MPI.ERRORS_ARE_FATAL, ] class TestFortranInfo(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.INFO_NULL, ] class TestFortranGroup(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.GROUP_NULL, MPI.GROUP_EMPTY, ] class TestFortranComm(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.COMM_NULL, MPI.COMM_SELF, MPI.COMM_WORLD, ] class TestFortranWin(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.WIN_NULL, ] class TestFortranFile(BaseTestFortran, unittest.TestCase): HANDLES = [MPI.FILE_NULL, ] if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_errorcode.py0000644000175000017500000000756513200562156020366 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class TestErrorCode(unittest.TestCase): errorclasses = [item[1] for item in vars(MPI).items() if item[0].startswith('ERR_')] errorclasses.insert(0, MPI.SUCCESS) errorclasses.remove(MPI.ERR_LASTCODE) def testGetErrorClass(self): self.assertEqual(self.errorclasses[0], 0) for ierr in self.errorclasses: errcls = MPI.Get_error_class(ierr) self.assertTrue(errcls >= MPI.SUCCESS) self.assertTrue(errcls <= MPI.ERR_LASTCODE) self.assertEqual(errcls, ierr) def testGetErrorStrings(self): for ierr in self.errorclasses: errstr = MPI.Get_error_string(ierr) def testException(self): from sys import version_info as py_version success = MPI.Exception(MPI.SUCCESS) lasterr = MPI.Exception(MPI.ERR_LASTCODE) for ierr in self.errorclasses: errstr = MPI.Get_error_string(ierr) errcls = MPI.Get_error_class(ierr) errexc = MPI.Exception(ierr) if py_version >= (2,5): self.assertEqual(errexc.error_code, ierr) self.assertEqual(errexc.error_class, ierr) self.assertEqual(errexc.error_string, errstr) self.assertEqual(repr(errexc), "MPI.Exception(%d)" % ierr) self.assertEqual(str(errexc), errstr) self.assertEqual(int(errexc), ierr) self.assertEqual(hash(errexc), hash(errexc.error_code)) self.assertTrue(errexc == ierr) self.assertTrue(errexc == errexc) self.assertFalse(errexc != ierr) self.assertFalse(errexc != errexc) self.assertTrue(success <= ierr <= lasterr) self.assertTrue(success <= errexc <= lasterr) self.assertTrue(errexc >= ierr) self.assertTrue(errexc >= success) self.assertTrue(lasterr >= ierr) self.assertTrue(lasterr >= errexc) if errexc == success: self.assertFalse(errexc) else: self.assertTrue(errexc) self.assertTrue(errexc > success) self.assertTrue(success < errexc) exc = MPI.Exception(MPI.SUCCESS-1) self.assertTrue(exc, MPI.ERR_UNKNOWN) exc = MPI.Exception(MPI.ERR_LASTCODE+1) self.assertTrue(exc, MPI.ERR_UNKNOWN) @unittest.skipMPI('openmpi(<1.10.0)') def testAddErrorClass(self): try: errclass = MPI.Add_error_class() except NotImplementedError: self.skipTest('mpi-add_error_class') self.assertTrue(errclass >= MPI.ERR_LASTCODE) @unittest.skipMPI('openmpi(<1.10.0)') def testAddErrorClassCodeString(self): try: errclass = MPI.Add_error_class() except NotImplementedError: self.skipTest('mpi-add_error_class') lastused = MPI.COMM_WORLD.Get_attr(MPI.LASTUSEDCODE) self.assertTrue(errclass == lastused) errstr = MPI.Get_error_string(errclass) self.assertEqual(errstr, "") MPI.Add_error_string(errclass, "error class") self.assertEqual(MPI.Get_error_string(errclass), "error class") errcode1 = MPI.Add_error_code(errclass) errstr = MPI.Get_error_string(errcode1) self.assertEqual(errstr, "") MPI.Add_error_string(errcode1, "error code 1") self.assertEqual(MPI.Get_error_class(errcode1), errclass) self.assertEqual(MPI.Get_error_string(errcode1), "error code 1") errcode2 = MPI.Add_error_code(errclass) errstr = MPI.Get_error_string(errcode2) self.assertEqual(errstr, "") MPI.Add_error_string(errcode2, "error code 2") self.assertEqual(MPI.Get_error_class(errcode2), errclass) self.assertEqual(MPI.Get_error_string(errcode2), "error code 2") if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_file.py0000644000175000017500000001430713200562156017311 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys, os, tempfile class BaseTestFile(object): COMM = MPI.COMM_NULL FILE = MPI.FILE_NULL prefix = 'mpi4py' def setUp(self): fd, self.fname = tempfile.mkstemp(prefix=self.prefix) os.close(fd) self.amode = MPI.MODE_RDWR | MPI.MODE_CREATE #self.amode |= MPI.MODE_DELETE_ON_CLOSE try: self.FILE = MPI.File.Open(self.COMM, self.fname, self.amode, MPI.INFO_NULL) #self.fname=None except Exception: os.remove(self.fname) raise def tearDown(self): if self.FILE == MPI.FILE_NULL: return amode = self.FILE.amode self.FILE.Close() if not (amode & MPI.MODE_DELETE_ON_CLOSE): MPI.File.Delete(self.fname, MPI.INFO_NULL) @unittest.skipMPI('openmpi(==2.0.0)') @unittest.skipMPI('MPICH2(<1.1.0)') def testPreallocate(self): size = self.FILE.Get_size() self.assertEqual(size, 0) self.FILE.Preallocate(1) size = self.FILE.Get_size() self.assertEqual(size, 1) self.FILE.Preallocate(100) size = self.FILE.Get_size() self.assertEqual(size, 100) self.FILE.Preallocate(10) size = self.FILE.Get_size() self.assertEqual(size, 100) self.FILE.Preallocate(200) size = self.FILE.Get_size() self.assertEqual(size, 200) def testGetSetSize(self): size = self.FILE.Get_size() self.assertEqual(size, 0) size = self.FILE.size self.assertEqual(size, 0) self.FILE.Set_size(100) size = self.FILE.Get_size() self.assertEqual(size, 100) size = self.FILE.size self.assertEqual(size, 100) def testGetGroup(self): fgroup = self.FILE.Get_group() cgroup = self.COMM.Get_group() gcomp = MPI.Group.Compare(fgroup, cgroup) self.assertEqual(gcomp, MPI.IDENT) fgroup.Free() cgroup.Free() def testGetAmode(self): amode = self.FILE.Get_amode() self.assertEqual(self.amode, amode) self.assertEqual(self.FILE.amode, self.amode) def testGetSetInfo(self): #info = MPI.INFO_NULL #self.FILE.Set_info(info) info = MPI.Info.Create() self.FILE.Set_info(info) info.Free() info = self.FILE.Get_info() self.FILE.Set_info(info) info.Free() def testGetSetView(self): fsize = 100 * MPI.DOUBLE.size self.FILE.Set_size(fsize) displacements = range(100) datatypes = [MPI.SHORT, MPI.INT, MPI.LONG, MPI.FLOAT, MPI.DOUBLE] datareps = ['native'] #['native', 'internal', 'external32'] for disp in displacements: for dtype in datatypes: for datarep in datareps: etype, ftype = dtype, dtype self.FILE.Set_view(disp, etype, ftype, datarep, MPI.INFO_NULL) of, et, ft, dr = self.FILE.Get_view() self.assertEqual(disp, of) self.assertEqual(etype.Get_extent(), et.Get_extent()) self.assertEqual(ftype.Get_extent(), ft.Get_extent()) self.assertEqual(datarep, dr) try: if not et.is_predefined: et.Free() except NotImplementedError: if et != etype: et.Free() try: if not ft.is_predefined: ft.Free() except NotImplementedError: if ft != ftype: ft.Free() def testGetSetAtomicity(self): atom = self.FILE.Get_atomicity() self.assertFalse(atom) for atomicity in [True, False] * 4: self.FILE.Set_atomicity(atomicity) atom = self.FILE.Get_atomicity() self.assertEqual(atom, atomicity) def testSync(self): self.FILE.Sync() def testSeekGetPosition(self): offset = 0 self.FILE.Seek(offset, MPI.SEEK_END) self.FILE.Seek(offset, MPI.SEEK_CUR) self.FILE.Seek(offset, MPI.SEEK_SET) pos = self.FILE.Get_position() self.assertEqual(pos, offset) def testSeekGetPositionShared(self): offset = 0 self.FILE.Seek_shared(offset, MPI.SEEK_END) self.FILE.Seek_shared(offset, MPI.SEEK_CUR) self.FILE.Seek_shared(offset, MPI.SEEK_SET) pos = self.FILE.Get_position_shared() self.assertEqual(pos, offset) @unittest.skipMPI('openmpi(==2.0.0)') def testGetByteOffset(self): for offset in range(10): disp = self.FILE.Get_byte_offset(offset) self.assertEqual(disp, offset) def testGetTypeExtent(self): extent = self.FILE.Get_type_extent(MPI.BYTE) self.assertEqual(extent, 1) def testGetErrhandler(self): eh = self.FILE.Get_errhandler() self.assertEqual(eh, MPI.ERRORS_RETURN) eh.Free() class TestFileNull(unittest.TestCase): def setUp(self): self.eh_save = MPI.FILE_NULL.Get_errhandler() def tearDown(self): MPI.FILE_NULL.Set_errhandler(self.eh_save) self.eh_save.Free() def testGetSetErrhandler(self): eh = MPI.FILE_NULL.Get_errhandler() self.assertEqual(eh, MPI.ERRORS_RETURN) eh.Free() MPI.FILE_NULL.Set_errhandler(MPI.ERRORS_ARE_FATAL) eh = MPI.FILE_NULL.Get_errhandler() self.assertEqual(eh, MPI.ERRORS_ARE_FATAL) eh.Free() MPI.FILE_NULL.Set_errhandler(MPI.ERRORS_RETURN) eh = MPI.FILE_NULL.Get_errhandler() self.assertEqual(eh, MPI.ERRORS_RETURN) eh.Free() class TestFileSelf(BaseTestFile, unittest.TestCase): COMM = MPI.COMM_SELF prefix = BaseTestFile.prefix + ('-%d' % MPI.COMM_WORLD.Get_rank()) def have_feature(): case = BaseTestFile() case.COMM = TestFileSelf.COMM case.prefix = TestFileSelf.prefix case.setUp() case.tearDown() try: have_feature() except NotImplementedError: unittest.disable(BaseTestFile, 'mpi-file') unittest.disable(TestFileNull, 'mpi-file') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_p2p_obj.py0000664000175000017500000005251313426006675017741 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys pypy_lt_53 = (hasattr(sys, 'pypy_version_info') and sys.pypy_version_info < (5, 3)) def allocate(n): if pypy_lt_53: try: import array return array.array('B', [0]) * n except ImportError: return None return bytearray(n) _basic = [None, True, False, -7, 0, 7, -2**63+1, 2**63-1, -2.17, 0.0, 3.14, 1+2j, 2-3j, 'mpi4py', ] messages = list(_basic) messages += [ list(_basic), tuple(_basic), set(_basic), frozenset(_basic), dict([('k%d' % key, val) for key, val in enumerate(_basic)]) ] class BaseTestP2PObj(object): COMM = MPI.COMM_NULL def testSendAndRecv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages: self.COMM.send(smess, MPI.PROC_NULL) rmess = self.COMM.recv(None, MPI.PROC_NULL, 0) self.assertEqual(rmess, None) if size == 1: return for smess in messages: if rank == 0: self.COMM.send(smess, rank+1, 0) rmess = smess elif rank == size - 1: rmess = self.COMM.recv(None, rank-1, 0) else: rmess = self.COMM.recv(None, rank-1, 0) self.COMM.send(rmess, rank+1, 0) self.assertEqual(rmess, smess) def testISendAndRecv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() buf = None for smess in messages: req = self.COMM.isend(smess, MPI.PROC_NULL) self.assertTrue(req) req.Wait() self.assertFalse(req) rmess = self.COMM.recv(buf, MPI.PROC_NULL, 0) self.assertEqual(rmess, None) for smess in messages: req = self.COMM.isend(smess, rank, 0) self.assertTrue(req) rmess = self.COMM.recv(buf, rank, 0) self.assertTrue(req) flag = req.Test() self.assertTrue(flag) self.assertFalse(req) self.assertEqual(rmess, smess) for smess in messages: dst = (rank+1)%size src = (rank-1)%size req = self.COMM.isend(smess, dst, 0) self.assertTrue(req) rmess = self.COMM.recv(buf, src, 0) req.Wait() self.assertFalse(req) self.assertEqual(rmess, smess) def testIRecvAndSend(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() for smess in messages: req = comm.irecv(0, MPI.PROC_NULL) self.assertTrue(req) comm.send(smess, MPI.PROC_NULL) rmess = req.wait() self.assertFalse(req) self.assertEqual(rmess, None) for smess in messages: buf = allocate(512) req = comm.irecv(buf, rank, 0) self.assertTrue(req) flag, rmess = req.test() self.assertTrue(req) self.assertFalse(flag) self.assertEqual(rmess, None) comm.send(smess, rank, 0) self.assertTrue(req) flag, rmess = req.test() while not flag: flag, rmess = req.test() self.assertTrue(flag) self.assertFalse(req) self.assertEqual(rmess, smess) tmp = allocate(1024) for buf in (None, 1024, tmp): for smess in messages + [messages]: dst = (rank+1)%size src = (rank-1)%size req = comm.irecv(buf, src, 0) self.assertTrue(req) comm.send(smess, dst, 0) rmess = req.wait() self.assertFalse(req) self.assertEqual(rmess, smess) for smess in messages: src = dst = rank rreq1 = comm.irecv(None, src, 1) rreq2 = comm.irecv(None, src, 2) rreq3 = comm.irecv(None, src, 3) rreqs = [rreq1, rreq2, rreq3] for i in range(len(rreqs)): self.assertTrue(rreqs[i]) comm.send(smess, dst, i+1) index, obj = MPI.Request.waitany(rreqs) self.assertEqual(index, i) self.assertEqual(obj, smess) self.assertFalse(rreqs[index]) index, obj = MPI.Request.waitany(rreqs) self.assertEqual(index, MPI.UNDEFINED) self.assertEqual(obj, None) for smess in messages: src = dst = rank rreq1 = comm.irecv(None, src, 1) rreq2 = comm.irecv(None, src, 2) rreq3 = comm.irecv(None, src, 3) rreqs = [rreq1, rreq2, rreq3] index, flag, obj = MPI.Request.testany(rreqs) self.assertEqual(index, MPI.UNDEFINED) self.assertEqual(flag, False) self.assertEqual(obj, None) for i in range(len(rreqs)): self.assertTrue(rreqs[i]) comm.send(smess, dst, i+1) index, flag, obj = MPI.Request.testany(rreqs) while not flag: index, flag, obj = MPI.Request.testany(rreqs) self.assertEqual(index, i) self.assertEqual(flag, True) self.assertEqual(obj, smess) self.assertFalse(rreqs[i]) index, flag, obj = MPI.Request.testany(rreqs) self.assertEqual(index, MPI.UNDEFINED) self.assertEqual(flag, True) self.assertEqual(obj, None) def testIRecvAndISend(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() tmp = allocate(512) for smess in messages: dst = (rank+1)%size src = (rank-1)%size rreq = comm.irecv(None, src, 0) self.assertTrue(rreq) sreq = comm.isend(smess, dst, 0) self.assertTrue(sreq) index1, mess1 = MPI.Request.waitany([sreq,rreq]) self.assertTrue(index1 in (0, 1)) if index1 == 0: self.assertFalse(sreq) self.assertTrue (rreq) self.assertEqual(mess1, None) else: self.assertTrue (sreq) self.assertFalse(rreq) self.assertEqual(mess1, smess) index2, mess2 = MPI.Request.waitany([sreq,rreq]) self.assertTrue(index2 in (0, 1)) self.assertNotEqual(index2, index1) self.assertFalse(sreq) self.assertFalse(rreq) if index2 == 0: self.assertEqual(mess2, None) else: self.assertEqual(mess2, smess) for smess in messages: dst = (rank+1)%size src = (rank-1)%size rreq = comm.irecv(None, src, 0) self.assertTrue(rreq) sreq = comm.isend(smess, dst, 0) self.assertTrue(sreq) index1, flag1, mess1 = MPI.Request.testany([sreq,rreq]) while not flag1: index1, flag1, mess1 = MPI.Request.testany([sreq,rreq]) self.assertTrue(index1 in (0, 1)) if index1 == 0: self.assertFalse(sreq) self.assertTrue (rreq) self.assertEqual(mess1, None) else: self.assertTrue (sreq) self.assertFalse(rreq) self.assertEqual(mess1, smess) index2, flag2, mess2 = MPI.Request.testany([sreq,rreq]) while not flag2: index2, flag2, mess2 = MPI.Request.testany([sreq,rreq]) self.assertTrue(index2 in (0, 1)) self.assertNotEqual(index2, index1) self.assertFalse(sreq) self.assertFalse(rreq) if index2 == 0: self.assertEqual(mess2, None) else: self.assertEqual(mess2, smess) for buf in (None, 512, tmp): for smess in messages: dst = (rank+1)%size src = (rank-1)%size rreq = comm.irecv(buf, src, 0) self.assertTrue(rreq) sreq = comm.isend(smess, dst, 0) self.assertTrue(sreq) dummy, rmess = MPI.Request.waitall([sreq,rreq], []) self.assertFalse(sreq) self.assertFalse(rreq) self.assertEqual(dummy, None) self.assertEqual(rmess, smess) for buf in (None, 512, tmp): for smess in messages: src = dst = rank rreq = comm.irecv(buf, src, 1) flag, msg = MPI.Request.testall([rreq]) self.assertEqual(flag, False) self.assertEqual(msg, None) sreq = comm.isend(smess, dst, 1) while True: flag, msg = MPI.Request.testall([sreq,rreq], []) if not flag: self.assertEqual(msg, None) continue (dummy, rmess) = msg self.assertEqual(dummy, None) self.assertEqual(rmess, smess) break def testManyISendAndRecv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages: reqs = [] for k in range(6): r = self.COMM.isend(smess, rank, 0) reqs.append(r) flag = MPI.Request.Testall(reqs) if not flag: index, flag = MPI.Request.Testany(reqs) indices = MPI.Request.Testsome(reqs) if indices is None: count = MPI.UNDEFINED indices = [] else: count = len(indices) self.assertTrue(count in [0, MPI.UNDEFINED]) for k in range(3): rmess = self.COMM.recv(None, rank, 0) self.assertEqual(rmess, smess) flag = MPI.Request.Testall(reqs) if not flag: index, flag = MPI.Request.Testany(reqs) self.assertEqual(index, 0) self.assertTrue(flag) indices = MPI.Request.Testsome(reqs) if indices is None: count = MPI.UNDEFINED indices = [] else: count = len(indices) self.assertTrue(count >= 2) indices = list(indices) indices.sort() self.assertTrue(indices[:2] == [1, 2]) for k in range(3): rmess = self.COMM.recv(None, rank, 0) self.assertEqual(rmess, smess) flag = MPI.Request.Testall(reqs) self.assertTrue(flag) for smess in messages: reqs = [] for k in range(6): r = self.COMM.isend(smess, rank, 0) reqs.append(r) for k in range(3): rmess = self.COMM.recv(None, rank, 0) self.assertEqual(rmess, smess) index = MPI.Request.Waitany(reqs) self.assertTrue(index == 0) self.assertTrue(flag) indices1 = MPI.Request.Waitsome(reqs) if indices1 is None: count1 = MPI.UNDEFINED indices1 = [] else: count1 = len(indices1) for k in range(3): rmess = self.COMM.recv(None, rank, 0) self.assertEqual(rmess, smess) indices2 = MPI.Request.Waitsome(reqs) if indices2 is None: count2 = MPI.UNDEFINED indices2 = [] else: count2 = len(indices2) if count1 == MPI.UNDEFINED: count1 = 0 if count2 == MPI.UNDEFINED: count2 = 0 self.assertEqual(6, 1+count1+count2) indices = [0]+list(indices1)+list(indices2) indices.sort() self.assertEqual(indices, list(range(6))) MPI.Request.Waitall(reqs) def testSSendAndRecv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages: self.COMM.ssend(smess, MPI.PROC_NULL) rmess = self.COMM.recv(None, MPI.PROC_NULL, 0) self.assertEqual(rmess, None) if size == 1: return for smess in messages: if rank == 0: self.COMM.ssend(smess, rank+1, 0) rmess = smess elif rank == size - 1: rmess = self.COMM.recv(None, rank-1, 0) else: rmess = self.COMM.recv(None, rank-1, 0) self.COMM.ssend(rmess, rank+1, 0) self.assertEqual(rmess, smess) def testISSendAndRecv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages: req = self.COMM.issend(smess, MPI.PROC_NULL) self.assertTrue(req) req.Wait() self.assertFalse(req) rmess = self.COMM.recv(None, MPI.PROC_NULL, 0) self.assertEqual(rmess, None) for smess in messages: req = self.COMM.issend(smess, rank, 0) self.assertTrue(req) flag = req.Test() self.assertFalse(flag) self.assertTrue(req) rmess = self.COMM.recv(None, rank, 0) self.assertTrue(req) flag = req.Test() self.assertTrue(flag) self.assertFalse(req) self.assertEqual(rmess, smess) for smess in messages: dst = (rank+1)%size src = (rank-1)%size req = self.COMM.issend(smess, dst, 0) self.assertTrue(req) rmess = self.COMM.recv(None, src, 0) req.Wait() self.assertFalse(req) self.assertEqual(rmess, smess) def testIRecvAndBSend(self): comm = self.COMM rank = comm.Get_rank() buf = MPI.Alloc_mem((1<<16)+MPI.BSEND_OVERHEAD) MPI.Attach_buffer(buf) try: for smess in messages: src = dst = rank req1 = comm.irecv(None, src, 1) req2 = comm.irecv(None, src, 2) req3 = comm.irecv(None, src, 3) comm.bsend(smess, dst, 3) comm.bsend(smess, dst, 2) comm.bsend(smess, dst, 1) self.assertEqual(smess, req3.wait()) self.assertEqual(smess, req2.wait()) self.assertEqual(smess, req1.wait()) comm.bsend(smess, MPI.PROC_NULL, 3) finally: MPI.Detach_buffer() MPI.Free_mem(buf) def testIRecvAndIBSend(self): comm = self.COMM rank = comm.Get_rank() buf = MPI.Alloc_mem((1<<16)+MPI.BSEND_OVERHEAD) MPI.Attach_buffer(buf) try: for smess in messages: src = dst = rank req1 = comm.irecv(None, src, 1) req2 = comm.irecv(None, src, 2) req3 = comm.irecv(None, src, 3) req4 = comm.ibsend(smess, dst, 3) req5 = comm.ibsend(smess, dst, 2) req6 = comm.ibsend(smess, dst, 1) MPI.Request.waitall([req4, req5, req6]) self.assertEqual(smess, req3.wait()) self.assertEqual(smess, req2.wait()) self.assertEqual(smess, req1.wait()) comm.ibsend(smess, MPI.PROC_NULL, 3).wait() finally: MPI.Detach_buffer() MPI.Free_mem(buf) def testIRecvAndSSend(self): comm = self.COMM rank = comm.Get_rank() for smess in messages: src = dst = rank req1 = comm.irecv(None, src, 1) req2 = comm.irecv(None, src, 2) req3 = comm.irecv(None, src, 3) comm.ssend(smess, dst, 3) comm.ssend(smess, dst, 2) comm.ssend(smess, dst, 1) self.assertEqual(smess, req3.wait()) self.assertEqual(smess, req2.wait()) self.assertEqual(smess, req1.wait()) comm.ssend(smess, MPI.PROC_NULL, 3) def testIRecvAndISSend(self): comm = self.COMM rank = comm.Get_rank() for smess in messages: src = dst = rank req1 = comm.irecv(None, src, 1) req2 = comm.irecv(None, src, 2) req3 = comm.irecv(None, src, 3) req4 = comm.issend(smess, dst, 3) req5 = comm.issend(smess, dst, 2) req6 = comm.issend(smess, dst, 1) MPI.Request.waitall([req4, req5, req6]) self.assertEqual(smess, req3.wait()) self.assertEqual(smess, req2.wait()) self.assertEqual(smess, req1.wait()) comm.issend(smess, MPI.PROC_NULL, 3).wait() def testSendrecv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages: dest = (rank + 1) % size source = (rank - 1) % size rmess = self.COMM.sendrecv(smess, dest, 0, None, source, 0) continue self.assertEqual(rmess, smess) rmess = self.COMM.sendrecv(None, dest, 0, None, source, 0) self.assertEqual(rmess, None) rmess = self.COMM.sendrecv(smess, MPI.PROC_NULL, 0, None, MPI.PROC_NULL, 0) self.assertEqual(rmess, None) def testMixed(self): comm = self.COMM rank = comm.Get_rank() # sreq = comm.Isend([None, 0, 'B'], rank) obj = comm.recv(None, rank) sreq.Wait() self.assertTrue(obj is None) for smess in messages: buf = MPI.pickle.dumps(smess) sreq = comm.Isend([buf, 'B'], rank) rmess = comm.recv(None, rank) sreq.Wait() self.assertTrue(rmess == smess) # sreq = comm.Isend([None, 0, 'B'], rank) rreq = comm.irecv(None, rank) sreq.Wait() obj = rreq.wait() self.assertTrue(obj is None) for smess in messages: buf = MPI.pickle.dumps(smess) sreq = comm.Isend([buf, 'B'], rank) rreq = comm.irecv(None, rank) sreq.Wait() rmess = rreq.wait() self.assertTrue(rmess == smess) def testPingPong01(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages: self.COMM.send(smess, MPI.PROC_NULL) rmess = self.COMM.recv(None, MPI.PROC_NULL, 0) self.assertEqual(rmess, None) if size == 1: return smess = None if rank == 0: self.COMM.send(smess, rank+1, 0) rmess = self.COMM.recv(None, rank+1, 0) elif rank == 1: rmess = self.COMM.recv(None, rank-1, 0) self.COMM.send(smess, rank-1, 0) else: rmess = smess self.assertEqual(rmess, smess) for smess in messages: if rank == 0: self.COMM.send(smess, rank+1, 0) rmess = self.COMM.recv(None, rank+1, 0) elif rank == 1: rmess = self.COMM.recv(None, rank-1, 0) self.COMM.send(smess, rank-1, 0) else: rmess = smess self.assertEqual(rmess, smess) @unittest.skipMPI('MPICH1') def testProbe(self): comm = self.COMM.Dup() try: status = MPI.Status() flag = comm.iprobe(MPI.ANY_SOURCE, MPI.ANY_TAG, status) self.assertFalse(flag) for smess in messages: request = comm.issend(smess, comm.rank, 123) self.assertTrue(request) flag = comm.iprobe(MPI.ANY_SOURCE, MPI.ANY_TAG, status) self.assertEqual(status.source, comm.rank) self.assertEqual(status.tag, 123) self.assertTrue(flag) comm.probe(MPI.ANY_SOURCE, MPI.ANY_TAG, status) self.assertEqual(status.source, comm.rank) self.assertEqual(status.tag, 123) self.assertTrue(request) flag, obj = request.test() self.assertTrue(request) self.assertFalse(flag) self.assertEqual(obj, None) obj = comm.recv(None, comm.rank, 123) self.assertEqual(obj, smess) self.assertTrue(request) flag, obj = request.test() self.assertFalse(request) self.assertTrue(flag) self.assertEqual(obj, None) finally: comm.Free() class TestP2PObjSelf(BaseTestP2PObj, unittest.TestCase): COMM = MPI.COMM_SELF class TestP2PObjWorld(BaseTestP2PObj, unittest.TestCase): COMM = MPI.COMM_WORLD class TestP2PObjSelfDup(TestP2PObjSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() @unittest.skipMPI('openmpi(<1.4.0)', MPI.Query_thread() > MPI.THREAD_SINGLE) class TestP2PObjWorldDup(TestP2PObjWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_request.py0000644000175000017500000001126213200562156020057 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class TestRequest(unittest.TestCase): def setUp(self): self.REQUEST = MPI.Request() self.STATUS = MPI.Status() def testWait(self): self.REQUEST.Wait() self.REQUEST.Wait(None) self.REQUEST.Wait(self.STATUS) self.assertTrue(self.REQUEST.Wait() is True) self.REQUEST.wait() self.REQUEST.wait(None) self.REQUEST.wait(self.STATUS) self.assertTrue(self.REQUEST.wait() is None) def testTest(self): self.REQUEST.Test() self.REQUEST.Test(None) self.REQUEST.Test(self.STATUS) self.assertTrue(self.REQUEST.Test() is True) self.REQUEST.test() self.REQUEST.test(None) self.REQUEST.test(self.STATUS) self.assertTrue(self.REQUEST.test() == (True, None)) @unittest.skipMPI('MPICH1') @unittest.skipMPI('LAM/MPI') def testGetStatus(self): try: flag = self.REQUEST.Get_status() except NotImplementedError: self.skipTest('mpi-request-get_status') self.assertTrue(flag) flag = self.REQUEST.Get_status(self.STATUS) self.assertTrue(flag) self.assertEqual(self.STATUS.Get_source(), MPI.ANY_SOURCE) self.assertEqual(self.STATUS.Get_tag(), MPI.ANY_TAG) self.assertEqual(self.STATUS.Get_error(), MPI.SUCCESS) self.assertEqual(self.STATUS.Get_count(MPI.BYTE), 0) self.assertEqual(self.STATUS.Get_elements(MPI.BYTE), 0) try: self.assertFalse(self.STATUS.Is_cancelled()) except NotImplementedError: self.skipTest('mpi-status-is_cancelled') class TestRequestArray(unittest.TestCase): def setUp(self): self.REQUESTS = [MPI.Request() for i in range(5)] self.STATUSES = [MPI.Status() for i in range(5)] def testWaitany(self): MPI.Request.Waitany(self.REQUESTS) MPI.Request.Waitany(self.REQUESTS, None) MPI.Request.Waitany(self.REQUESTS, self.STATUSES[0]) MPI.Request.waitany(self.REQUESTS) MPI.Request.waitany(self.REQUESTS, None) MPI.Request.waitany(self.REQUESTS, self.STATUSES[0]) def testTestany(self): MPI.Request.Testany(self.REQUESTS) MPI.Request.Testany(self.REQUESTS, None) MPI.Request.Testany(self.REQUESTS, self.STATUSES[0]) MPI.Request.testany(self.REQUESTS) MPI.Request.testany(self.REQUESTS, None) MPI.Request.testany(self.REQUESTS, self.STATUSES[0]) def testWaitall(self): MPI.Request.Waitall(self.REQUESTS) MPI.Request.Waitall(self.REQUESTS, None) self.assertTrue(MPI.Request.Waitall(self.REQUESTS) is True) for statuses in (tuple(self.STATUSES), (self.STATUSES[0],), ()): MPI.Request.Waitall(self.REQUESTS, statuses) for statuses in (self.STATUSES, []): MPI.Request.Waitall(self.REQUESTS, statuses) self.assertEqual(len(statuses), len(self.REQUESTS)) MPI.Request.waitall(self.REQUESTS) MPI.Request.waitall(self.REQUESTS, None) for statuses in (self.STATUSES, []): MPI.Request.waitall(self.REQUESTS, statuses) self.assertEqual(len(statuses), len(self.REQUESTS)) def testTestall(self): MPI.Request.Testall(self.REQUESTS) MPI.Request.Testall(self.REQUESTS, None) self.assertTrue(MPI.Request.Testall(self.REQUESTS) is True) for statuses in (self.STATUSES, []): MPI.Request.Testall(self.REQUESTS, statuses) self.assertEqual(len(statuses), len(self.REQUESTS)) MPI.Request.testall(self.REQUESTS) MPI.Request.testall(self.REQUESTS, None) for statuses in (self.STATUSES, []): MPI.Request.testall(self.REQUESTS, statuses) self.assertEqual(len(statuses), len(self.REQUESTS)) def testWaitsome(self): ret = MPI.Request.Waitsome(self.REQUESTS) self.assertEqual(ret, None) ret = MPI.Request.Waitsome(self.REQUESTS, None) self.assertEqual(ret, None) for statuses in (self.STATUSES, []): ret = MPI.Request.Waitsome(self.REQUESTS, statuses) self.assertEqual(ret, None) self.assertEqual(len(statuses), len(self.REQUESTS)) def testTestsome(self): ret = MPI.Request.Testsome(self.REQUESTS) self.assertEqual(ret, None) ret = MPI.Request.Testsome(self.REQUESTS, None) self.assertEqual(ret, None) for statuses in (self.STATUSES, []): ret = MPI.Request.Testsome(self.REQUESTS, statuses) self.assertEqual(ret, None) self.assertEqual(len(statuses), len(self.REQUESTS)) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_status.py0000644000175000017500000000621713200562156017716 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class TestStatus(unittest.TestCase): def setUp(self): self.STATUS = MPI.Status() def tearDown(self): self.STATUS = None def testDefaultFieldValues(self): self.assertEqual(self.STATUS.Get_source(), MPI.ANY_SOURCE) self.assertEqual(self.STATUS.Get_tag(), MPI.ANY_TAG) self.assertEqual(self.STATUS.Get_error(), MPI.SUCCESS) def testGetCount(self): count = self.STATUS.Get_count(MPI.BYTE) self.assertEqual(count, 0) def testGetElements(self): elements = self.STATUS.Get_elements(MPI.BYTE) self.assertEqual(elements, 0) def testSetElements(self): try: self.STATUS.Set_elements(MPI.BYTE, 7) count = self.STATUS.Get_count(MPI.BYTE) self.assertEqual(count, 7) elements = self.STATUS.Get_elements(MPI.BYTE) self.assertEqual(elements, 7) except NotImplementedError: if MPI.Get_version() >= (2,0): raise self.skipTest('mpi-status-set_elements') def testIsCancelled(self): flag = self.STATUS.Is_cancelled() self.assertTrue(type(flag) is bool) self.assertFalse(flag) def testSetCancelled(self): try: self.STATUS.Set_cancelled(True) flag = self.STATUS.Is_cancelled() self.assertTrue(flag) except NotImplementedError: if MPI.Get_version() >= (2,0): raise self.skipTest('mpi-status-set_cancelled') def testPyProps(self): self.assertEqual(self.STATUS.Get_source(), self.STATUS.source) self.assertEqual(self.STATUS.Get_tag(), self.STATUS.tag) self.assertEqual(self.STATUS.Get_error(), self.STATUS.error) self.STATUS.source = 1 self.STATUS.tag = 2 self.STATUS.error = MPI.ERR_ARG self.assertEqual(self.STATUS.source, 1) self.assertEqual(self.STATUS.tag, 2) self.assertEqual(self.STATUS.error, MPI.ERR_ARG) def testConstructor(self): self.assertRaises(TypeError, MPI.Status, 123) self.assertRaises(TypeError, MPI.Status, "abc") def testCopyConstructor(self): self.STATUS.source = 1 self.STATUS.tag = 2 self.STATUS.error = MPI.ERR_ARG status = MPI.Status(self.STATUS) self.assertEqual(status.source, 1) self.assertEqual(status.tag, 2) self.assertEqual(status.error, MPI.ERR_ARG) try: self.STATUS.Set_elements(MPI.BYTE, 7) except NotImplementedError: pass try: self.STATUS.Set_cancelled(True) except NotImplementedError: pass status = MPI.Status(self.STATUS) try: count = status.Get_count(MPI.BYTE) elems = status.Get_elements(MPI.BYTE) self.assertEqual(count, 7) self.assertEqual(elems, 7) except NotImplementedError: pass try: flag = status.Is_cancelled() self.assertTrue(flag) except NotImplementedError: pass if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_errhandler.py0000664000175000017500000000553213426006675020533 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class TestErrhandler(unittest.TestCase): def testPredefined(self): self.assertFalse(MPI.ERRHANDLER_NULL) self.assertTrue(MPI.ERRORS_ARE_FATAL) self.assertTrue(MPI.ERRORS_RETURN) def testCommGetSetErrhandler(self): for COMM in [MPI.COMM_SELF, MPI.COMM_WORLD]: for ERRHANDLER in [MPI.ERRORS_ARE_FATAL, MPI.ERRORS_RETURN, MPI.ERRORS_ARE_FATAL, MPI.ERRORS_RETURN, ]: errhdl_1 = COMM.Get_errhandler() self.assertNotEqual(errhdl_1, MPI.ERRHANDLER_NULL) COMM.Set_errhandler(ERRHANDLER) errhdl_2 = COMM.Get_errhandler() self.assertEqual(errhdl_2, ERRHANDLER) errhdl_2.Free() self.assertEqual(errhdl_2, MPI.ERRHANDLER_NULL) COMM.Set_errhandler(errhdl_1) errhdl_1.Free() self.assertEqual(errhdl_1, MPI.ERRHANDLER_NULL) def testGetErrhandler(self): errhdls = [] for i in range(100): e = MPI.COMM_WORLD.Get_errhandler() errhdls.append(e) for e in errhdls: e.Free() for e in errhdls: self.assertEqual(e, MPI.ERRHANDLER_NULL) @unittest.skipMPI('MPI(<2.0)') def testCommCallErrhandler(self): errhdl = MPI.COMM_SELF.Get_errhandler() comm = MPI.COMM_SELF.Dup() comm.Set_errhandler(MPI.ERRORS_RETURN) comm.Call_errhandler(MPI.ERR_OTHER) comm.Free() @unittest.skipMPI('MPI(<2.0)') @unittest.skipMPI('SpectrumMPI') def testWinCallErrhandler(self): try: win = MPI.Win.Create(MPI.BOTTOM, 1, MPI.INFO_NULL, MPI.COMM_SELF) except NotImplementedError: self.skipTest('mpi-win') win.Set_errhandler(MPI.ERRORS_RETURN) win.Call_errhandler(MPI.ERR_OTHER) win.Free() @unittest.skipMPI('MPI(<2.0)') @unittest.skipMPI('msmpi') def testFileCallErrhandler(self): import os, tempfile rank = MPI.COMM_WORLD.Get_rank() fd, filename = tempfile.mkstemp(prefix='mpi4py-', suffix="-%d"%rank) os.close(fd) amode = MPI.MODE_WRONLY | MPI.MODE_CREATE | MPI.MODE_DELETE_ON_CLOSE try: file = MPI.File.Open(MPI.COMM_SELF, filename, amode, MPI.INFO_NULL) except NotImplementedError: self.skipTest('mpi-file') file.Set_errhandler(MPI.ERRORS_RETURN) #file.Call_errhandler(MPI.ERR_OTHER) file.Call_errhandler(MPI.SUCCESS) file.Close() try: MPI.Win.Create(MPI.BOTTOM, 1, MPI.INFO_NULL, MPI.COMM_SELF).Free() except (NotImplementedError, MPI.Exception): TestErrhandler.testWinCallErrhandler = \ unittest.disable(TestErrhandler.testWinCallErrhandler, 'mpi-win') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_cco_ngh_obj.py0000644000175000017500000000667213200562156020632 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest _basic = [None, True, False, -7, 0, 7, 2**31, -2**63+1, 2**63-1, -2.17, 0.0, 3.14, 1+2j, 2-3j, 'mpi4py', ] messages = _basic messages += [ list(_basic), tuple(_basic), dict([('k%d' % key, val) for key, val in enumerate(_basic)]) ] messages = messages + [messages] def create_topo_comms(comm): size = comm.Get_size() rank = comm.Get_rank() # Cartesian n = int(size**1/2.0) m = int(size**1/3.0) if m*m*m == size: dims = [m, m, m] elif n*n == size: dims = [n, n] else: dims = [size] periods = [True] * len(dims) yield comm.Create_cart(dims, periods=periods) # Graph index, edges = [0], [] for i in range(size): pos = index[-1] index.append(pos+2) edges.append((i-1)%size) edges.append((i+1)%size) yield comm.Create_graph(index, edges) # Dist Graph sources = [(rank-2)%size, (rank-1)%size] destinations = [(rank+1)%size, (rank+2)%size] yield comm.Create_dist_graph_adjacent(sources, destinations) def get_neighbors_count(comm): topo = comm.Get_topology() if topo == MPI.CART: ndim = comm.Get_dim() return 2*ndim, 2*ndim if topo == MPI.GRAPH: rank = comm.Get_rank() nneighbors = comm.Get_neighbors_count(rank) return nneighbors, nneighbors if topo == MPI.DIST_GRAPH: indeg, outdeg, w = comm.Get_dist_neighbors_count() return indeg, outdeg return 0, 0 def have_feature(): cartcomm = MPI.COMM_SELF.Create_cart([1], periods=[0]) try: cartcomm.neighbor_allgather(None) return True except NotImplementedError: return False finally: cartcomm.Free() @unittest.skipIf(not have_feature(), 'mpi-neighbor') class BaseTestCCONghObj(object): COMM = MPI.COMM_NULL @unittest.skipMPI('openmpi(<2.2.0)') def testNeighborAllgather(self): for comm in create_topo_comms(self.COMM): rsize, ssize = get_neighbors_count(comm) for smess in messages: rmess = comm.neighbor_allgather(smess) self.assertEqual(rmess, [smess] * rsize) comm.Free() def testNeighborAlltoall(self): for comm in create_topo_comms(self.COMM): rsize, ssize = get_neighbors_count(comm) for smess in messages: rmess = comm.neighbor_alltoall([smess] * ssize) self.assertEqual(rmess, [smess] * rsize) comm.Free() class TestCCONghObjSelf(BaseTestCCONghObj, unittest.TestCase): COMM = MPI.COMM_SELF class TestCCONghObjWorld(BaseTestCCONghObj, unittest.TestCase): COMM = MPI.COMM_WORLD class TestCCONghObjSelfDup(TestCCONghObjSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() class TestCCONghObjWorldDup(TestCCONghObjWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() name, version = MPI.get_vendor() if name == 'Open MPI' and version < (1,8,4): _create_topo_comms = create_topo_comms def create_topo_comms(comm): for c in _create_topo_comms(comm): if c.size * 2 < sum(c.degrees): c.Free(); continue yield c if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_pickle.py0000644000175000017500000001214613200562156017640 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys try: import cPickle except ImportError: cPickle = None try: import pickle as pyPickle except ImportError: pyPickle = None try: import dill except ImportError: dill = None try: import marshal except ImportError: marshal = None try: import simplejson except ImportError: simplejson = None try: import json except ImportError: json = None try: import yaml yaml.dump(None) except ImportError: yaml = None OBJS = [ None, True, False, 7, 1<<32, 3.14, 1+2j, 'qwerty', (0, 1, 2), [0, 1, 2], {'a':0, 'b':1}, ] try: memoryview tobytes = lambda s: memoryview(s).tobytes() except NameError: tobytes = lambda s: buffer(s)[:] class TestPickle(unittest.TestCase): def setUp(self): self.pickle = MPI.pickle def tearDown(self): self.pickle.__init__() def do_pickle(self, obj, pickle): comm = MPI.COMM_SELF o = comm.sendrecv(obj, 0, 0, None, 0, 0) self.assertEqual(obj, o) s = pickle.dumps(obj) o = pickle.loads(s) self.assertEqual(obj, o) def testDefault(self): pickle = self.pickle protocols = [0, 1, 2] if sys.version_info[:2] >= (3, 0): protocols.append(3) if sys.version_info[:2] >= (3, 4): protocols.append(4) protocols.append(-1) protocols.append(None) for proto in protocols: pickle.__init__(protocol=proto) for obj in OBJS: self.do_pickle(obj, pickle) self.do_pickle(OBJS, pickle) def testCPickle(self): if cPickle is None: return pickle = self.pickle dumps = cPickle.dumps loads = cPickle.loads protocols = [0, 1, 2] if sys.version_info[:2] >= (3, 0): protocols.append(3) if sys.version_info[:2] >= (3, 4): protocols.append(4) protocols.append(-1) protocols.append(None) for proto in protocols: pickle.__init__(dumps, loads, proto) for obj in OBJS: self.do_pickle(obj, pickle) self.do_pickle(OBJS, pickle) def testPyPickle(self): pickle = self.pickle dumps = pyPickle.dumps loads = pyPickle.loads protocols = [0, 1, 2] if sys.version_info[:2] >= (3, 0): protocols.append(3) if sys.version_info[:2] >= (3, 4): protocols.append(4) protocols.append(-1) protocols.append(None) for proto in protocols: pickle.__init__(dumps, loads, proto) for obj in OBJS: self.do_pickle(obj, pickle) self.do_pickle(OBJS, pickle) @unittest.skipIf(dill is None, 'dill') def testDill(self): pickle = self.pickle dumps = dill.dumps loads = dill.loads protocols = list(range(dill.HIGHEST_PROTOCOL+1)) protocols.append(-1) protocols.append(None) for proto in protocols: pickle.__init__(dumps, loads, proto) for obj in OBJS: self.do_pickle(obj, pickle) self.do_pickle(OBJS, pickle) @unittest.skipIf(marshal is None, 'marshal') def testMarshal(self): pickle = self.pickle dumps = marshal.dumps loads = marshal.loads protocols = [0, 1, 2] if sys.version_info[:2] >= (3, 4): protocols.append(3) protocols.append(4) protocols.append(None) for protocol in protocols: pickle.__init__(dumps, loads, protocol) for obj in OBJS: self.do_pickle(obj, pickle) self.do_pickle(OBJS, pickle) @unittest.skipIf(simplejson is None, 'simplejson') def testSimpleJson(self): pickle = self.pickle dumps = lambda o: simplejson.dumps(o).encode() loads = lambda s: simplejson.loads(tobytes(s).decode()) pickle.__init__(dumps, loads) OBJS2 = [o for o in OBJS if not isinstance(o, (float, complex, tuple))] for obj in OBJS2: self.do_pickle(obj, pickle) self.do_pickle(OBJS2, pickle) @unittest.skipIf(json is None, 'json') def testJson(self): pickle = self.pickle dumps = lambda o: json.dumps(o).encode() loads = lambda s: json.loads(tobytes(s).decode()) pickle.__init__(dumps, loads) OBJS2 = [o for o in OBJS if not isinstance(o, (float, complex, tuple))] for obj in OBJS2: self.do_pickle(obj, pickle) self.do_pickle(OBJS2, pickle) @unittest.skipIf(yaml is None, 'yaml') def testYAML(self): pickle = self.pickle dumps = lambda o: yaml.dump(o).encode() loads = lambda s: yaml.load(tobytes(s).decode()) pickle.__init__(dumps, loads) OBJS2 = [o for o in OBJS if not isinstance(o, (complex, tuple))] for obj in OBJS2: self.do_pickle(obj, pickle) self.do_pickle(OBJS2, pickle) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_environ.py0000644000175000017500000000665213200562156020056 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest def appnum(): if MPI.APPNUM == MPI.KEYVAL_INVALID: return None return MPI.COMM_WORLD.Get_attr(MPI.APPNUM) class TestEnviron(unittest.TestCase): def testIsInitialized(self): flag = MPI.Is_initialized() self.assertTrue(type(flag) is bool) self.assertTrue(flag) def testIsFinalized(self): flag = MPI.Is_finalized() self.assertTrue(type(flag) is bool) self.assertFalse(flag) def testGetVersion(self): version = MPI.Get_version() self.assertEqual(len(version), 2) major, minor = version self.assertTrue(type(major) is int) self.assertTrue(major >= 1) self.assertTrue(type(minor) is int) self.assertTrue(minor >= 0) def testGetLibraryVersion(self): version = MPI.Get_library_version() self.assertTrue(isinstance(version, str)) self.assertTrue(len(version) > 0) def testGetProcessorName(self): procname = MPI.Get_processor_name() self.assertTrue(isinstance(procname, str)) def testWTime(self): time1 = MPI.Wtime() self.assertTrue(type(time1) is float) time2 = MPI.Wtime() self.assertTrue(type(time2) is float) self.assertTrue(time2 >= time1) def testWTick(self): tick = MPI.Wtick() self.assertTrue(type(tick) is float) self.assertTrue(tick > 0.0) def testPControl(self): for level in (2, 1, 0): MPI.Pcontrol(level) MPI.Pcontrol(1) class TestWorldAttrs(unittest.TestCase): def testWTimeIsGlobal(self): wtg = MPI.COMM_WORLD.Get_attr(MPI.WTIME_IS_GLOBAL) if wtg is not None: self.assertTrue(wtg in (True, False)) def testWTimeIsGlobal(self): wtg = MPI.COMM_WORLD.Get_attr(MPI.WTIME_IS_GLOBAL) if wtg is not None: self.assertTrue(wtg in (True, False)) def testHostPorcessor(self): size = MPI.COMM_WORLD.Get_size() vals = list(range(size)) + [MPI.PROC_NULL] hostproc = MPI.COMM_WORLD.Get_attr(MPI.HOST) if hostproc is not None: self.assertTrue(hostproc in vals) def testIOProcessor(self): size = MPI.COMM_WORLD.Get_size() vals = list(range(size)) + [MPI.UNDEFINED, MPI.ANY_SOURCE, MPI.PROC_NULL] ioproc = MPI.COMM_WORLD.Get_attr(MPI.IO) if ioproc is not None: self.assertTrue(ioproc in vals) @unittest.skipIf(MPI.APPNUM == MPI.KEYVAL_INVALID, 'mpi-appnum') def testAppNum(self): appnum = MPI.COMM_WORLD.Get_attr(MPI.APPNUM) if appnum is not None: self.assertTrue(appnum == MPI.UNDEFINED or appnum >= 0) @unittest.skipMPI('MPICH(>1.2.0)', appnum() is None) @unittest.skipMPI('MVAPICH2', appnum() is None) @unittest.skipMPI('MPICH2', appnum() is None) @unittest.skipIf(MPI.UNIVERSE_SIZE == MPI.KEYVAL_INVALID, 'mpi-universe-size') def testUniverseSize(self): univsz = MPI.COMM_WORLD.Get_attr(MPI.UNIVERSE_SIZE) if univsz is not None: self.assertTrue(univsz == MPI.UNDEFINED or univsz >= 0) @unittest.skipIf(MPI.LASTUSEDCODE == MPI.KEYVAL_INVALID, 'mpi-lastusedcode') def testLastUsedCode(self): lastuc = MPI.COMM_WORLD.Get_attr(MPI.LASTUSEDCODE) self.assertTrue(lastuc >= 0) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_rma_nb.py0000664000175000017500000001573013426006675017644 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl import sys pypy_lt_53 = (hasattr(sys, 'pypy_version_info') and sys.pypy_version_info < (5, 3)) def mkzeros(n): if pypy_lt_53: return b'\0' * n return bytearray(n) def memzero(m): try: m[:] = 0 except IndexError: # cffi buffer m[0:len(m)] = b'\0'*len(m) class BaseTestRMA(object): COMM = MPI.COMM_NULL INFO = MPI.INFO_NULL COUNT_MIN = 0 def setUp(self): nbytes = 100*MPI.DOUBLE.size try: self.mpi_memory = MPI.Alloc_mem(nbytes) self.memory = self.mpi_memory memzero(self.memory) except MPI.Exception: import array self.mpi_memory = None self.memory = array.array('B',[0]*nbytes) self.WIN = MPI.Win.Create(self.memory, 1, self.INFO, self.COMM) def tearDown(self): self.WIN.Free() if self.mpi_memory: MPI.Free_mem(self.mpi_memory) def testPutGet(self): group = self.WIN.Get_group() size = group.Get_size() group.Free() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(self.COUNT_MIN, 10): for rank in range(size): sbuf = array([rank]*count, typecode) rbuf = array(-1, typecode, count+1) self.WIN.Fence() self.WIN.Lock(rank) r = self.WIN.Rput(sbuf.as_mpi(), rank) r.Wait() self.WIN.Flush(rank) r = self.WIN.Rget(rbuf.as_mpi_c(count), rank) r.Wait() self.WIN.Unlock(rank) for i in range(count): self.assertEqual(sbuf[i], rank) self.assertEqual(rbuf[i], rank) self.assertEqual(rbuf[-1], -1) @unittest.skipMPI('openmpi(>=1.10.0,<1.11.0)') def testAccumulate(self): group = self.WIN.Get_group() size = group.Get_size() group.Free() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(self.COUNT_MIN, 10): for rank in range(size): ones = array([1]*count, typecode) sbuf = array(range(count), typecode) rbuf = array(-1, typecode, count+1) for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN, MPI.REPLACE): self.WIN.Lock(rank) self.WIN.Put(ones.as_mpi(), rank) self.WIN.Flush(rank) r = self.WIN.Raccumulate(sbuf.as_mpi(), rank, op=op) r.Wait() self.WIN.Flush(rank) r = self.WIN.Rget(rbuf.as_mpi_c(count), rank) r.Wait() self.WIN.Unlock(rank) # for i in range(count): self.assertEqual(sbuf[i], i) self.assertEqual(rbuf[i], op(1, i)) self.assertEqual(rbuf[-1], -1) @unittest.skipMPI('openmpi(>=1.10,<1.11)') def testGetAccumulate(self): group = self.WIN.Get_group() size = group.Get_size() group.Free() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(self.COUNT_MIN, 10): for rank in range(size): ones = array([1]*count, typecode) sbuf = array(range(count), typecode) rbuf = array(-1, typecode, count+1) gbuf = array(-1, typecode, count+1) for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN, MPI.REPLACE, MPI.NO_OP): self.WIN.Lock(rank) self.WIN.Put(ones.as_mpi(), rank) self.WIN.Flush(rank) r = self.WIN.Rget_accumulate(sbuf.as_mpi(), rbuf.as_mpi_c(count), rank, op=op) r.Wait() self.WIN.Flush(rank) r = self.WIN.Rget(gbuf.as_mpi_c(count), rank) r.Wait() self.WIN.Unlock(rank) # for i in range(count): self.assertEqual(sbuf[i], i) self.assertEqual(rbuf[i], 1) self.assertEqual(gbuf[i], op(1, i)) self.assertEqual(rbuf[-1], -1) self.assertEqual(gbuf[-1], -1) def testPutProcNull(self): rank = self.COMM.Get_rank() self.WIN.Lock(rank) r = self.WIN.Rput(None, MPI.PROC_NULL, None) r.Wait() self.WIN.Unlock(rank) def testGetProcNull(self): rank = self.COMM.Get_rank() self.WIN.Lock(rank) r = self.WIN.Rget(None, MPI.PROC_NULL, None) r.Wait() self.WIN.Unlock(rank) def testAccumulateProcNullReplace(self): rank = self.COMM.Get_rank() zeros = mkzeros(8) self.WIN.Lock(rank) r = self.WIN.Raccumulate([zeros, MPI.INT], MPI.PROC_NULL, None, MPI.REPLACE) r.Wait() r = self.WIN.Raccumulate([zeros, MPI.INT], MPI.PROC_NULL, None, MPI.REPLACE) r.Wait() self.WIN.Unlock(rank) def testAccumulateProcNullSum(self): rank = self.COMM.Get_rank() zeros = mkzeros(8) self.WIN.Lock(rank) r = self.WIN.Raccumulate([zeros, MPI.INT], MPI.PROC_NULL, None, MPI.SUM) r.Wait() r = self.WIN.Raccumulate([None, MPI.INT], MPI.PROC_NULL, None, MPI.SUM) r.Wait() self.WIN.Unlock(rank) @unittest.skipMPI('MPI(<3.0)') @unittest.skipMPI('openmpi(<1.8.1)') @unittest.skipMPI('MPICH2(<1.5.0)') class TestRMASelf(BaseTestRMA, unittest.TestCase): COMM = MPI.COMM_SELF @unittest.skipMPI('MPI(<3.0)') @unittest.skipMPI('openmpi(<1.8.1)') @unittest.skipMPI('MPICH2(<1.5.0)') class TestRMAWorld(BaseTestRMA, unittest.TestCase): COMM = MPI.COMM_WORLD SpectrumMPI = MPI.get_vendor()[0] == 'Spectrum MPI' try: if SpectrumMPI: raise NotImplementedError MPI.Win.Create(None, 1, MPI.INFO_NULL, MPI.COMM_SELF).Free() except (NotImplementedError, MPI.Exception): unittest.disable(BaseTestRMA, 'mpi-rma-nb') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/runtests.py0000644000175000017500000002237113200562156017222 0ustar dalcinldalcinl00000000000000import sys, os import optparse import unittest def getoptionparser(): parser = optparse.OptionParser() parser.add_option("-q", "--quiet", action="store_const", const=0, dest="verbose", default=1, help="minimal output") parser.add_option("-v", "--verbose", action="store_const", const=2, dest="verbose", default=1, help="verbose output") parser.add_option("-i", "--include", type="string", action="append", dest="include", default=[], help="include tests matching PATTERN", metavar="PATTERN") parser.add_option("-e", "--exclude", type="string", action="append", dest="exclude", default=[], help="exclude tests matching PATTERN", metavar="PATTERN") parser.add_option("-f", "--failfast", action="store_true", dest="failfast", default=False, help="stop on first failure") parser.add_option("-c", "--catch", action="store_true", dest="catchbreak", default=False, help="catch Control-C and display results") parser.add_option("--no-builddir", action="store_false", dest="builddir", default=True, help="disable testing from build directory") parser.add_option("--path", type="string", action="append", dest="path", default=[], help="prepend PATH to sys.path", metavar="PATH") parser.add_option("--refleaks", type="int", action="store", dest="repeats", default=3, help="run tests REPEAT times in a loop to catch leaks", metavar="REPEAT") parser.add_option("--threads", action="store_true", dest="threads", default=None, help="initialize MPI with thread support") parser.add_option("--no-threads", action="store_false", dest="threads", default=None, help="initialize MPI without thread support") parser.add_option("--thread-level", type="choice", choices=["single", "funneled", "serialized", "multiple"], action="store", dest="thread_level", default=None, help="initialize MPI with required thread support") parser.add_option("--mpe", action="store_true", dest="mpe", default=False, help="use MPE for MPI profiling") parser.add_option("--vt", action="store_true", dest="vt", default=False, help="use VampirTrace for MPI profiling") parser.add_option("--no-numpy", action="store_false", dest="numpy", default=True, help="disable testing with NumPy arrays") parser.add_option("--no-array", action="store_false", dest="array", default=True, help="disable testing with builtin array module") parser.add_option("--no-skip-mpi", action="store_false", dest="skip_mpi", default=True, help="disable known failures with backend MPI") return parser def getbuilddir(): from distutils.util import get_platform s = os.path.join("build", "lib.%s-%.3s" % (get_platform(), sys.version)) if hasattr(sys, 'gettotalrefcount'): s += '-pydebug' return s def setup_python(options): rootdir = os.path.dirname(os.path.dirname(__file__)) builddir = os.path.join(rootdir, getbuilddir()) if options.builddir and os.path.exists(builddir): sys.path.insert(0, builddir) if options.path: path = options.path[:] path.reverse() for p in path: sys.path.insert(0, p) def setup_unittest(options): from unittest import TestSuite try: from unittest.runner import _WritelnDecorator except ImportError: from unittest import _WritelnDecorator # writeln_orig = _WritelnDecorator.writeln def writeln(self, message=''): try: self.stream.flush() except: pass writeln_orig(self, message) try: self.stream.flush() except: pass _WritelnDecorator.writeln = writeln def import_package(options, pkgname): # if not options.numpy: sys.modules['numpy'] = None if not options.array: sys.modules['array'] = None # package = __import__(pkgname) # import mpi4py.rc if options.threads is not None: mpi4py.rc.threads = options.threads if options.thread_level is not None: mpi4py.rc.thread_level = options.thread_level if options.mpe: mpi4py.profile('mpe', logfile='runtests-mpi4py') if options.vt: mpi4py.profile('vt', logfile='runtests-mpi4py') import mpi4py.MPI # return package def getprocessorinfo(): from mpi4py import MPI rank = MPI.COMM_WORLD.Get_rank() name = MPI.Get_processor_name() return (rank, name) def getlibraryinfo(): from mpi4py import MPI info = "MPI %d.%d" % MPI.Get_version() name, version = MPI.get_vendor() if name != "unknown": info += (" (%s %s)" % (name, '%d.%d.%d' % version)) return info def getpythoninfo(): x, y = sys.version_info[:2] return ("Python %d.%d (%s)" % (x, y, sys.executable)) def getpackageinfo(pkg): return ("%s %s (%s)" % (pkg.__name__, pkg.__version__, pkg.__path__[0])) def writeln(message='', endl='\n'): sys.stderr.flush() sys.stderr.write(message+endl) sys.stderr.flush() def print_banner(options, package): r, n = getprocessorinfo() fmt = "[%d@%s] %s" if options.verbose: writeln(fmt % (r, n, getpythoninfo())) writeln(fmt % (r, n, getlibraryinfo())) writeln(fmt % (r, n, getpackageinfo(package))) def load_tests(options, args): # Find tests import re, glob testsuitedir = os.path.dirname(__file__) sys.path.insert(0, testsuitedir) pattern = 'test_*.py' wildcard = os.path.join(testsuitedir, pattern) testfiles = glob.glob(wildcard) include = exclude = None if options.include: include = re.compile('|'.join(options.include)).search if options.exclude: exclude = re.compile('|'.join(options.exclude)).search testnames = [] for testfile in testfiles: filename = os.path.basename(testfile) testname = os.path.splitext(filename)[0] if ((exclude and exclude(testname)) or (include and not include(testname))): continue testnames.append(testname) testnames.sort() # Handle options if not options.numpy: sys.modules['numpy'] = None if not options.array: sys.modules['array'] = None if not options.skip_mpi: import mpiunittest mpiunittest.skipMPI = lambda p, *c: lambda f: f # Load tests and populate suite testloader = unittest.TestLoader() testsuite = unittest.TestSuite() for testname in testnames: module = __import__(testname) for arg in args: try: cases = testloader.loadTestsFromNames((arg,), module) except AttributeError: continue testsuite.addTests(cases) if not args: cases = testloader.loadTestsFromModule(module) testsuite.addTests(cases) return testsuite def run_tests(options, testsuite, runner=None): if runner is None: runner = unittest.TextTestRunner() runner.verbosity = options.verbose runner.failfast = options.failfast if options.catchbreak: unittest.installHandler() result = runner.run(testsuite) return result.wasSuccessful() def test_refleaks(options, args): from sys import gettotalrefcount from gc import collect testsuite = load_tests(options, args) testsuite._cleanup = False for case in testsuite: case._cleanup = False class EmptyIO(object): def write(self, *args): pass runner = unittest.TextTestRunner(stream=EmptyIO(), verbosity=0) rank, name = getprocessorinfo() r1 = r2 = 0 repeats = options.repeats while repeats: collect() r1 = gettotalrefcount() run_tests(options, testsuite, runner) collect() r2 = gettotalrefcount() leaks = r2-r1 if leaks and repeats < options.repeats: writeln('[%d@%s] refleaks: (%d - %d) --> %d' % (rank, name, r2, r1, leaks)) repeats -= 1 def abort(code=1): from mpi4py import MPI MPI.COMM_WORLD.Abort(code) def shutdown(success): from mpi4py import MPI def main(args=None): pkgname = 'mpi4py' parser = getoptionparser() (options, args) = parser.parse_args(args) setup_python(options) setup_unittest(options) package = import_package(options, pkgname) print_banner(options, package) testsuite = load_tests(options, args) success = run_tests(options, testsuite) if not success and options.failfast: abort() if success and hasattr(sys, 'gettotalrefcount'): test_refleaks(options, args) shutdown(success) return not success if __name__ == '__main__': import sys sys.dont_write_bytecode = True sys.exit(main()) mpi4py-3.0.3/test/test_threads.py0000644000175000017500000000407513200562156020025 0ustar dalcinldalcinl00000000000000import sys try: import threading HAVE_THREADING = True except ImportError: import dummy_threading as threading HAVE_THREADING = False VERBOSE = False #VERBOSE = True import mpi4py.rc mpi4py.rc.thread_level = 'multiple' from mpi4py import MPI import mpiunittest as unittest pypy3_lt_50 = (hasattr(sys, 'pypy_version_info') and sys.version_info[0] == 3 and sys.pypy_version_info < (5, 0)) class TestMPIThreads(unittest.TestCase): def testThreadLevels(self): levels = [MPI.THREAD_SINGLE, MPI.THREAD_FUNNELED, MPI.THREAD_SERIALIZED, MPI.THREAD_MULTIPLE] for i in range(len(levels)-1): self.assertTrue(levels[i] < levels[i+1]) try: provided = MPI.Query_thread() self.assertTrue(provided in levels) except NotImplementedError: self.skipTest('mpi-query_thread') def testIsThreadMain(self): try: flag = MPI.Is_thread_main() except NotImplementedError: self.skipTest('mpi-is_thread_main') name = threading.current_thread().name main = (name == 'MainThread') or not HAVE_THREADING self.assertEqual(flag, main) if VERBOSE: log = lambda m: sys.stderr.write(m+'\n') log("%s: MPI.Is_thread_main() -> %s" % (name, flag)) @unittest.skipIf(pypy3_lt_50, 'pypy3(<5.0)') def testIsThreadMainInThread(self): try: provided = MPI.Query_thread() except NotImplementedError: self.skipTest('mpi-query_thread') self.testIsThreadMain() T = [threading.Thread(target=self.testIsThreadMain) for _ in range(5)] if provided == MPI.THREAD_MULTIPLE: for t in T: t.start() for t in T: t.join() elif provided == MPI.THREAD_SERIALIZED: for t in T: t.start() t.join() else: self.skipTest('mpi-thread_level') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_subclass.py0000664000175000017500000001753113426006675020226 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys # --- class MyBaseComm(object): def free(self): if self != MPI.COMM_NULL: MPI.Comm.Free(self) class BaseTestBaseComm(object): def setUp(self): self.comm = self.CommType(self.COMM_BASE) def testSubType(self): self.assertTrue(type(self.comm) not in [ MPI.Comm, MPI.Intracomm, MPI.Cartcomm, MPI.Graphcomm, MPI.Distgraphcomm, MPI.Intercomm]) self.assertTrue(isinstance(self.comm, self.CommType)) def testCloneFree(self): if self.COMM_BASE != MPI.COMM_NULL: comm = self.comm.Clone() else: comm = self.CommType() self.assertTrue(isinstance(comm, MPI.Comm)) self.assertTrue(isinstance(comm, self.CommType)) comm.free() def tearDown(self): self.comm.free() # --- class MyComm(MPI.Comm, MyBaseComm): def __new__(cls, comm=None): if comm is not None: if comm != MPI.COMM_NULL: comm = comm.Clone() return super(MyComm, cls).__new__(cls, comm) class BaseTestMyComm(BaseTestBaseComm): CommType = MyComm class TestMyCommNULL(BaseTestMyComm, unittest.TestCase): COMM_BASE = MPI.COMM_NULL class TestMyCommSELF(BaseTestMyComm, unittest.TestCase): COMM_BASE = MPI.COMM_SELF class TestMyCommWORLD(BaseTestMyComm, unittest.TestCase): COMM_BASE = MPI.COMM_WORLD # --- class MyIntracomm(MPI.Intracomm, MyBaseComm): def __new__(cls, comm=None): if comm is not None: if comm != MPI.COMM_NULL: comm = comm.Dup() return super(MyIntracomm, cls).__new__(cls, comm) class BaseTestMyIntracomm(BaseTestBaseComm): CommType = MyIntracomm class TestMyIntracommNULL(BaseTestMyIntracomm, unittest.TestCase): COMM_BASE = MPI.COMM_NULL class TestMyIntracommSELF(BaseTestMyIntracomm, unittest.TestCase): COMM_BASE = MPI.COMM_SELF class TestMyIntracommWORLD(BaseTestMyIntracomm, unittest.TestCase): COMM_BASE = MPI.COMM_WORLD # --- class MyCartcomm(MPI.Cartcomm, MyBaseComm): def __new__(cls, comm=None): if comm is not None: if comm != MPI.COMM_NULL: dims = [comm.size] comm = comm.Create_cart(dims) return super(MyCartcomm, cls).__new__(cls, comm) class BaseTestMyCartcomm(BaseTestBaseComm): CommType = MyCartcomm class TestMyCartcommNULL(BaseTestMyCartcomm, unittest.TestCase): COMM_BASE = MPI.COMM_NULL class TestMyCartcommSELF(BaseTestMyCartcomm, unittest.TestCase): COMM_BASE = MPI.COMM_SELF class TestMyCartcommWORLD(BaseTestMyCartcomm, unittest.TestCase): COMM_BASE = MPI.COMM_WORLD # --- class MyGraphcomm(MPI.Graphcomm, MyBaseComm): def __new__(cls, comm=None): if comm is not None: if comm != MPI.COMM_NULL: index = list(range(0, comm.size+1)) edges = list(range(0, comm.size)) comm = comm.Create_graph(index, edges) return super(MyGraphcomm, cls).__new__(cls, comm) class BaseTestMyGraphcomm(BaseTestBaseComm): CommType = MyGraphcomm class TestMyGraphcommNULL(BaseTestMyGraphcomm, unittest.TestCase): COMM_BASE = MPI.COMM_NULL class TestMyGraphcommSELF(BaseTestMyGraphcomm, unittest.TestCase): COMM_BASE = MPI.COMM_SELF class TestMyGraphcommWORLD(BaseTestMyGraphcomm, unittest.TestCase): COMM_BASE = MPI.COMM_WORLD # --- class MyRequest(MPI.Request): def __new__(cls, request=None): return super(MyRequest, cls).__new__(cls, request) def test(self): return super(type(self), self).Test() def wait(self): return super(type(self), self).Wait() class MyPrequest(MPI.Prequest): def __new__(cls, request=None): return super(MyPrequest, cls).__new__(cls, request) def test(self): return super(type(self), self).Test() def wait(self): return super(type(self), self).Wait() def start(self): return super(type(self), self).Start() class MyGrequest(MPI.Grequest): def __new__(cls, request=None): return super(MyGrequest, cls).__new__(cls, request) def test(self): return super(type(self), self).Test() def wait(self): return super(type(self), self).Wait() class BaseTestMyRequest(object): def setUp(self): self.req = self.MyRequestType(MPI.REQUEST_NULL) def testSubType(self): self.assertTrue(type(self.req) is not self.MPIRequestType) self.assertTrue(isinstance(self.req, self.MPIRequestType)) self.assertTrue(isinstance(self.req, self.MyRequestType)) self.req.test() class TestMyRequest(BaseTestMyRequest, unittest.TestCase): MPIRequestType = MPI.Request MyRequestType = MyRequest class TestMyPrequest(BaseTestMyRequest, unittest.TestCase): MPIRequestType = MPI.Prequest MyRequestType = MyPrequest class TestMyGrequest(BaseTestMyRequest, unittest.TestCase): MPIRequestType = MPI.Grequest MyRequestType = MyGrequest class TestMyRequest2(TestMyRequest): def setUp(self): req = MPI.COMM_SELF.Isend( [MPI.BOTTOM, 0, MPI.BYTE], dest=MPI.PROC_NULL, tag=0) self.req = MyRequest(req) class TestMyPrequest2(TestMyPrequest): def setUp(self): req = MPI.COMM_SELF.Send_init( [MPI.BOTTOM, 0, MPI.BYTE], dest=MPI.PROC_NULL, tag=0) self.req = MyPrequest(req) def tearDown(self): self.req.Free() def testStart(self): for i in range(5): self.req.start() self.req.test() self.req.start() self.req.wait() # --- class MyWin(MPI.Win): def __new__(cls, win=None): return MPI.Win.__new__(cls, win) def free(self): if self != MPI.WIN_NULL: MPI.Win.Free(self) class BaseTestMyWin(object): def setUp(self): w = MPI.Win.Create(MPI.BOTTOM) self.win = MyWin(w) def tearDown(self): self.win.free() def testSubType(self): self.assertTrue(type(self.win) is not MPI.Win) self.assertTrue(isinstance(self.win, MPI.Win)) self.assertTrue(isinstance(self.win, MyWin)) def testFree(self): self.assertTrue(self.win) self.win.free() self.assertFalse(self.win) class TestMyWin(BaseTestMyWin, unittest.TestCase): pass SpectrumMPI = MPI.get_vendor()[0] == 'Spectrum MPI' try: if SpectrumMPI: raise NotImplementedError MPI.Win.Create(MPI.BOTTOM).Free() except (NotImplementedError, MPI.Exception): unittest.disable(BaseTestMyWin, 'mpi-win') # --- import os, tempfile class MyFile(MPI.File): def __new__(cls, file=None): return MPI.File.__new__(cls, file) def close(self): if self != MPI.FILE_NULL: MPI.File.Close(self) class BaseTestMyFile(object): def openfile(self): fd, fname = tempfile.mkstemp(prefix='mpi4py') os.close(fd) amode = MPI.MODE_RDWR | MPI.MODE_CREATE | MPI.MODE_DELETE_ON_CLOSE try: self.file = MPI.File.Open(MPI.COMM_SELF, fname, amode, MPI.INFO_NULL) return self.file except Exception: os.remove(fname) raise def setUp(self): f = self.openfile() self.file = MyFile(f) def tearDown(self): self.file.close() def testSubType(self): self.assertTrue(type(self.file) is not MPI.File) self.assertTrue(isinstance(self.file, MPI.File)) self.assertTrue(isinstance(self.file, MyFile)) def testFree(self): self.assertTrue(self.file) self.file.close() self.assertFalse(self.file) class TestMyFile(BaseTestMyFile, unittest.TestCase): pass try: BaseTestMyFile().openfile().Close() except NotImplementedError: unittest.disable(BaseTestMyFile, 'mpi-file') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_p2p_buf_matched.py0000644000175000017500000001556313200562156021421 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl @unittest.skipIf(MPI.MESSAGE_NULL == MPI.MESSAGE_NO_PROC, 'mpi-message') class TestMessage(unittest.TestCase): def testMessageNull(self): null = MPI.MESSAGE_NULL self.assertFalse(null) null2 = MPI.Message() self.assertEqual(null, null2) null3 = MPI.Message(null) self.assertEqual(null, null3) def testMessageNoProc(self): # noproc = MPI.MESSAGE_NO_PROC self.assertTrue(noproc) noproc.Recv(None) self.assertTrue(noproc) noproc.Irecv(None).Wait() self.assertTrue(noproc) # noproc2 = MPI.Message(MPI.MESSAGE_NO_PROC) self.assertTrue(noproc2) self.assertEqual(noproc2, noproc) self.assertNotEqual(noproc, MPI.MESSAGE_NULL) # message = MPI.Message(MPI.MESSAGE_NO_PROC) message.Recv(None) self.assertEqual(message, MPI.MESSAGE_NULL) # message = MPI.Message(MPI.MESSAGE_NO_PROC) request = message.Irecv(None) self.assertEqual(message, MPI.MESSAGE_NULL) self.assertNotEqual(request, MPI.REQUEST_NULL) request.Wait() self.assertEqual(request, MPI.REQUEST_NULL) @unittest.skipIf(MPI.MESSAGE_NULL == MPI.MESSAGE_NO_PROC, 'mpi-message') class BaseTestP2PMatched(object): COMM = MPI.COMM_NULL def testIMProbe(self): comm = self.COMM.Dup() try: m = comm.Improbe() self.assertEqual(m, None) m = comm.Improbe(MPI.ANY_SOURCE) self.assertEqual(m, None) m = comm.Improbe(MPI.ANY_SOURCE, MPI.ANY_TAG) self.assertEqual(m, None) status = MPI.Status() m = comm.Improbe(MPI.ANY_SOURCE, MPI.ANY_TAG, status) self.assertEqual(m, None) self.assertEqual(status.source, MPI.ANY_SOURCE) self.assertEqual(status.tag, MPI.ANY_TAG) self.assertEqual(status.error, MPI.SUCCESS) m = MPI.Message.Iprobe(comm) self.assertEqual(m, None) # Open MPI <= 1.8.4 buf = [None, 0, MPI.BYTE] s = comm.Isend(buf, comm.rank, 0) r = comm.Mprobe(comm.rank, 0).Irecv(buf) MPI.Request.Waitall([s,r]) finally: comm.Free() def testProbeRecv(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for s in range(0, size+1): sbuf = array( s, typecode, s) rbuf = array(-1, typecode, s) if size == 1: n = comm.Improbe(0, 0) self.assertEqual(n, None) sr = comm.Isend(sbuf.as_mpi(), 0, 0) m = comm.Mprobe(0, 0) self.assertTrue(isinstance(m, MPI.Message)) self.assertTrue(m) rr = m.Irecv(rbuf.as_raw()) self.assertFalse(m) self.assertTrue(sr) self.assertTrue(rr) MPI.Request.Waitall([sr,rr]) self.assertFalse(sr) self.assertFalse(rr) # n = comm.Improbe(0, 0) self.assertEqual(n, None) r = comm.Isend(sbuf.as_mpi(), 0, 0) m = MPI.Message.Probe(comm, 0, 0) self.assertTrue(isinstance(m, MPI.Message)) self.assertTrue(m) m.Recv(rbuf.as_raw()) self.assertFalse(m) r.Wait() # n = MPI.Message.Iprobe(comm, 0, 0) self.assertEqual(n, None) r = comm.Isend(sbuf.as_mpi(), 0, 0) m = MPI.Message.Iprobe(comm, 0, 0) self.assertTrue(isinstance(m, MPI.Message)) self.assertTrue(m) m.Recv(rbuf.as_raw()) self.assertFalse(m) r.Wait() # n = MPI.Message.Iprobe(comm, 0, 0) self.assertEqual(n, None) r = comm.Isend(sbuf.as_mpi(), 0, 0) m = comm.Mprobe(0, 0) self.assertTrue(isinstance(m, MPI.Message)) self.assertTrue(m) m.Recv(rbuf.as_raw()) self.assertFalse(m) r.Wait() elif rank == 0: n = comm.Improbe(0, 0) self.assertEqual(n, None) # comm.Send(sbuf.as_mpi(), 1, 0) m = comm.Mprobe(1, 0) self.assertTrue(m) m.Recv(rbuf.as_raw()) self.assertFalse(m) # n = comm.Improbe(0, 0) self.assertEqual(n, None) comm.Send(sbuf.as_mpi(), 1, 1) m = None while not m: m = comm.Improbe(1, 1) m.Irecv(rbuf.as_raw()).Wait() elif rank == 1: n = comm.Improbe(1, 0) self.assertEqual(n, None) # m = comm.Mprobe(0, 0) self.assertTrue(m) m.Recv(rbuf.as_raw()) self.assertFalse(m) # n = comm.Improbe(1, 0) self.assertEqual(n, None) comm.Send(sbuf.as_mpi(), 0, 0) m = None while not m: m = comm.Improbe(0, 1) m.Irecv(rbuf.as_mpi()).Wait() comm.Send(sbuf.as_mpi(), 0, 1) else: rbuf = sbuf for value in rbuf: self.assertEqual(value, s) class TestP2PMatchedSelf(BaseTestP2PMatched, unittest.TestCase): COMM = MPI.COMM_SELF class TestP2PMatchedWorld(BaseTestP2PMatched, unittest.TestCase): COMM = MPI.COMM_WORLD class TestP2PMatchedSelfDup(TestP2PMatchedSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() class TestP2PMatchedWorldDup(TestP2PMatchedWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_cco_nb_vec.py0000644000175000017500000004014413200562156020450 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl def maxvalue(a): try: typecode = a.typecode except AttributeError: typecode = a.dtype.char if typecode == ('f'): return 1e30 elif typecode == ('d'): return 1e300 else: return 2 ** (a.itemsize * 7) - 1 @unittest.skipMPI('msmpi(<8.1.0)') class BaseTestCCOVec(object): COMM = MPI.COMM_NULL skip = [] @unittest.skipMPI('openmpi(==1.10.1)') def testGatherv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): if (count, '*') in self.skip: continue if (count, typecode) in self.skip: continue sbuf = array(root, typecode, count) rbuf = array( -1, typecode, size*size) counts = [count] * size displs = list(range(0, size*size, size)) recvbuf = rbuf.as_mpi_v(counts, displs) if rank != root: recvbuf=None self.COMM.Igatherv(sbuf.as_mpi(), recvbuf, root).Wait() if recvbuf is not None: for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) @unittest.skipMPI('openmpi(==1.10.1)') def testGatherv2(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): if (count, '*') in self.skip: continue if (count, typecode) in self.skip: continue sbuf = array(root, typecode, size) rbuf = array( -1, typecode, size*size) sendbuf = sbuf.as_mpi_c(count) recvbuf = rbuf.as_mpi_v(count, size) if rank != root: recvbuf=None self.COMM.Igatherv(sendbuf, recvbuf, root).Wait() if recvbuf is not None: for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) @unittest.skipMPI('openmpi(==1.10.1)') def testGatherv3(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size+1): if (count, '*') in self.skip: continue if (count, typecode) in self.skip: continue # sbuf = array(root, typecode, count).as_raw() rbuf = array( -1, typecode, count*size).as_raw() sendbuf = sbuf recvbuf = [rbuf, count] if rank != root: recvbuf=None self.COMM.Igatherv(sendbuf, recvbuf, root).Wait() if recvbuf is not None: for v in rbuf: self.assertEqual(v, root) # sbuf = array(root, typecode, count).as_raw() if rank == root: rbuf = array( -1, typecode, count*size).as_raw() else: rbuf = None self.COMM.Gatherv(sbuf, rbuf, root) self.COMM.Barrier() if rank == root: for v in rbuf: self.assertEqual(v, root) @unittest.skipMPI('openmpi(==1.10.1)') def testScatterv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): if (count, '*') in self.skip: continue if (count, typecode) in self.skip: continue sbuf = array(root, typecode, size*size) rbuf = array( -1, typecode, count) counts = [count] * size displs = list(range(0, size*size, size)) sendbuf = sbuf.as_mpi_v(counts, displs) if rank != root: sendbuf = None self.COMM.Iscatterv(sendbuf, rbuf.as_mpi(), root).Wait() for vr in rbuf: self.assertEqual(vr, root) @unittest.skipMPI('openmpi(==1.10.1)') def testScatterv2(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): if (count, '*') in self.skip: continue if (count, typecode) in self.skip: continue sbuf = array(root, typecode, size*size) rbuf = array( -1, typecode, size) sendbuf = sbuf.as_mpi_v(count, size) recvbuf = rbuf.as_mpi_c(count) if rank != root: sendbuf = None self.COMM.Iscatterv(sendbuf, recvbuf, root).Wait() a, b = rbuf[:count], rbuf[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) @unittest.skipMPI('openmpi(==1.10.1)') def testScatterv3(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size+1): if (count, '*') in self.skip: continue if (count, typecode) in self.skip: continue # sbuf = array(root, typecode, count*size).as_raw() rbuf = array( -1, typecode, count).as_raw() sendbuf = [sbuf, count] recvbuf = rbuf if rank != root: sendbuf = None self.COMM.Iscatterv(sendbuf, recvbuf, root).Wait() for v in rbuf: self.assertEqual(v, root) # if rank == root: sbuf = array(root, typecode, count*size).as_raw() else: sbuf = None rbuf = array( -1, typecode, count).as_raw() self.COMM.Scatterv(sbuf, rbuf, root) for v in rbuf: self.assertEqual(v, root) @unittest.skipMPI('openmpi(==1.10.1)') def testAllgatherv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): if (count, '*') in self.skip: continue if (count, typecode) in self.skip: continue sbuf = array(root, typecode, count) rbuf = array( -1, typecode, size*size) counts = [count] * size displs = list(range(0, size*size, size)) sendbuf = sbuf.as_mpi() recvbuf = rbuf.as_mpi_v(counts, displs) self.COMM.Iallgatherv(sendbuf, recvbuf).Wait() for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) @unittest.skipMPI('openmpi(==1.10.1)') def testAllgatherv2(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): if (count, '*') in self.skip: continue if (count, typecode) in self.skip: continue sbuf = array(root, typecode, size) rbuf = array( -1, typecode, size*size) sendbuf = sbuf.as_mpi_c(count) recvbuf = rbuf.as_mpi_v(count, size) self.COMM.Iallgatherv(sendbuf, recvbuf).Wait() for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) @unittest.skipMPI('openmpi(==1.10.1)') def testAllgatherv3(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size+1): if (count, '*') in self.skip: continue if (count, typecode) in self.skip: continue # sbuf = array(root, typecode, count).as_raw() rbuf = array( -1, typecode, count*size).as_raw() sendbuf = sbuf recvbuf = [rbuf, count] self.COMM.Iallgatherv(sendbuf, recvbuf).Wait() for v in rbuf: self.assertEqual(v, root) # sbuf = array(root, typecode, count).as_raw() rbuf = array( -1, typecode, count*size).as_raw() self.COMM.Iallgatherv(sbuf, rbuf).Wait() for v in rbuf: self.assertEqual(v, root) def testAlltoallv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): sbuf = array(root, typecode, size*size) rbuf = array( -1, typecode, size*size) counts = [count] * size displs = list(range(0, size*size, size)) sendbuf = sbuf.as_mpi_v(counts, displs) recvbuf = rbuf.as_mpi_v(counts, displs) self.COMM.Ialltoallv(sendbuf, recvbuf).Wait() for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) def testAlltoallv2(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): sbuf = array(root, typecode, size*size) rbuf = array( -1, typecode, size*size) sendbuf = sbuf.as_mpi_v(count, size) recvbuf = rbuf.as_mpi_v(count, size) self.COMM.Ialltoallv(sendbuf, recvbuf).Wait() for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) def testAlltoallv3(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size+1): # sbuf = array(root, typecode, count*size).as_raw() rbuf = array( -1, typecode, count*size).as_raw() sendbuf = [sbuf, count] recvbuf = [rbuf, count] self.COMM.Ialltoallv(sendbuf, recvbuf).Wait() for v in rbuf: self.assertEqual(v, root) # sbuf = array(root, typecode, count*size).as_raw() rbuf = array( -1, typecode, count*size).as_raw() self.COMM.Ialltoallv(sbuf, rbuf).Wait() for v in rbuf: self.assertEqual(v, root) @unittest.skipMPI('openmpi(<=1.8.0)') def testAlltoallw(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for n in range(1, size+1): sbuf = array( n, typecode, (size, n)) rbuf = array(-1, typecode, (size, n)) sdt, rdt = sbuf.mpidtype, rbuf.mpidtype sdsp = list(range(0, size*n*sdt.extent, n*sdt.extent)) rdsp = list(range(0, size*n*rdt.extent, n*rdt.extent)) smsg = (sbuf.as_raw(), ([n]*size, sdsp), [sdt]*size) rmsg = (rbuf.as_raw(), ([n]*size, rdsp), [rdt]*size) try: self.COMM.Ialltoallw(smsg, rmsg).Wait() except NotImplementedError: self.skipTest('mpi-ialltoallw') for v in rbuf.flat: self.assertEqual(v, n) class TestCCOVecSelf(BaseTestCCOVec, unittest.TestCase): COMM = MPI.COMM_SELF class TestCCOVecWorld(BaseTestCCOVec, unittest.TestCase): COMM = MPI.COMM_WORLD class TestCCOVecSelfDup(TestCCOVecSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() class TestCCOVecWorldDup(TestCCOVecWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() name, version = MPI.get_vendor() if name == 'Open MPI': if version == (1,10,0): BaseTestCCOVec.skip += [(0, '*')] if version == (1,8,6): BaseTestCCOVec.skip += [(0, 'b')] try: MPI.COMM_SELF.Ibarrier().Wait() except NotImplementedError: unittest.disable(BaseTestCCOVec, 'mpi-nbc') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_msgzero.py0000644000175000017500000000342313200562156020055 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class BaseTestMessageZero(object): null_b = [None, MPI.INT] null_v = [None, (0, None), MPI.INT] def testPointToPoint(self): comm = self.COMM comm.Sendrecv(sendbuf=self.null_b, dest=comm.rank, recvbuf=self.null_b, source=comm.rank) r2 = comm.Irecv(self.null_b, comm.rank) r1 = comm.Isend(self.null_b, comm.rank) MPI.Request.Waitall([r1, r2]) def testCollectivesBlock(self): comm = self.COMM comm.Bcast(self.null_b) comm.Gather(self.null_b, self.null_b) comm.Scatter(self.null_b, self.null_b) comm.Allgather(self.null_b, self.null_b) comm.Alltoall(self.null_b, self.null_b) def testCollectivesVector(self): comm = self.COMM comm.Gatherv(self.null_b, self.null_v) comm.Scatterv(self.null_v, self.null_b) comm.Allgatherv(self.null_b, self.null_v) comm.Alltoallv(self.null_v, self.null_v) @unittest.skipMPI('openmpi') @unittest.skipMPI('SpectrumMPI') def testReductions(self): comm = self.COMM comm.Reduce(self.null_b, self.null_b) comm.Allreduce(self.null_b, self.null_b) comm.Reduce_scatter_block(self.null_b, self.null_b) rcnt = [0]*comm.Get_size() comm.Reduce_scatter(self.null_b, self.null_b, rcnt) try: comm.Scan(self.null_b, self.null_b) except NotImplementedError: pass try: comm.Exscan(self.null_b, self.null_b) except NotImplementedError: pass class TestMessageZeroSelf(BaseTestMessageZero, unittest.TestCase): COMM = MPI.COMM_SELF class TestMessageZeroWorld(BaseTestMessageZero, unittest.TestCase): COMM = MPI.COMM_WORLD if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_comm.py0000644000175000017500000001472013200562156017324 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class TestCommNull(unittest.TestCase): def testContructor(self): comm = MPI.Comm() self.assertEqual(comm, MPI.COMM_NULL) self.assertFalse(comm is MPI.COMM_NULL) def construct(): MPI.Comm((1,2,3)) self.assertRaises(TypeError, construct) def testContructorIntra(self): comm_null = MPI.Intracomm() self.assertFalse(comm_null is MPI.COMM_NULL) self.assertEqual(comm_null, MPI.COMM_NULL) def testContructorInter(self): comm_null = MPI.Intercomm() self.assertFalse(comm_null is MPI.COMM_NULL) self.assertEqual(comm_null, MPI.COMM_NULL) class BaseTestComm(object): def testContructor(self): comm = MPI.Comm(self.COMM) self.assertEqual(comm, self.COMM) self.assertFalse(comm is self.COMM) def testPyProps(self): comm = self.COMM self.assertEqual(comm.Get_size(), comm.size) self.assertEqual(comm.Get_rank(), comm.rank) self.assertEqual(comm.Is_intra(), comm.is_intra) self.assertEqual(comm.Is_inter(), comm.is_inter) self.assertEqual(comm.Get_topology(), comm.topology) def testGroup(self): comm = self.COMM group = self.COMM.Get_group() self.assertEqual(comm.Get_size(), group.Get_size()) self.assertEqual(comm.Get_rank(), group.Get_rank()) group.Free() self.assertEqual(group, MPI.GROUP_NULL) def testCloneFree(self): comm = self.COMM.Clone() comm.Free() self.assertEqual(comm, MPI.COMM_NULL) def testCompare(self): results = (MPI.IDENT, MPI.CONGRUENT, MPI.SIMILAR, MPI.UNEQUAL) ccmp = MPI.Comm.Compare(self.COMM, MPI.COMM_WORLD) self.assertTrue(ccmp in results) ccmp = MPI.Comm.Compare(self.COMM, self.COMM) self.assertEqual(ccmp, MPI.IDENT) comm = self.COMM.Dup() ccmp = MPI.Comm.Compare(self.COMM, comm) comm.Free() self.assertEqual(ccmp, MPI.CONGRUENT) def testIsInter(self): is_inter = self.COMM.Is_inter() self.assertTrue(type(is_inter) is bool) def testGetSetName(self): try: name = self.COMM.Get_name() self.COMM.Set_name('comm') self.assertEqual(self.COMM.Get_name(), 'comm') self.COMM.Set_name(name) self.assertEqual(self.COMM.Get_name(), name) except NotImplementedError: self.skipTest('mpi-comm-name') def testGetParent(self): try: parent = MPI.Comm.Get_parent() except NotImplementedError: self.skipTest('mpi-comm-get_parent') def testDupWithInfo(self): info = None self.COMM.Dup(info).Free() info = MPI.INFO_NULL self.COMM.Dup(info).Free() self.COMM.Dup_with_info(info).Free() info = MPI.Info.Create() self.COMM.Dup(info).Free() self.COMM.Dup_with_info(info).Free() info.Free() @unittest.skipMPI('mpich(<=3.1.0)', MPI.Query_thread() > MPI.THREAD_SINGLE) def testIDup(self): try: comm, request = self.COMM.Idup() except NotImplementedError: self.skipTest('mpi-comm-idup') request.Wait() ccmp = MPI.Comm.Compare(self.COMM, comm) comm.Free() self.assertEqual(ccmp, MPI.CONGRUENT) def testGetSetInfo(self): #info = MPI.INFO_NULL #self.COMM.Set_info(info) info = MPI.Info.Create() self.COMM.Set_info(info) info.Free() info = self.COMM.Get_info() self.COMM.Set_info(info) info.Free() def testCreate(self): group = self.COMM.Get_group() comm = self.COMM.Create(group) ccmp = MPI.Comm.Compare(self.COMM, comm) self.assertEqual(ccmp, MPI.CONGRUENT) comm.Free() group.Free() @unittest.skipMPI('openmpi(<=1.8.1)') def testCreateGroup(self): group = self.COMM.Get_group() try: try: comm = self.COMM.Create_group(group) ccmp = MPI.Comm.Compare(self.COMM, comm) self.assertEqual(ccmp, MPI.CONGRUENT) comm.Free() finally: group.Free() except NotImplementedError: self.skipTest('mpi-comm-create_group') @unittest.skipMPI('openmpi(==2.0.0)') def testSplitType(self): try: MPI.COMM_SELF.Split_type(MPI.COMM_TYPE_SHARED).Free() except NotImplementedError: self.skipTest('mpi-comm-split_type') #comm = self.COMM.Split_type(MPI.UNDEFINED) #self.assertEqual(comm, MPI.COMM_NULL) comm = self.COMM.Split_type(MPI.COMM_TYPE_SHARED) self.assertNotEqual(comm, MPI.COMM_NULL) size = self.COMM.Get_size() rank = self.COMM.Get_rank() if size == 1: self.assertEqual(comm.size, 1) self.assertEqual(comm.rank, 0) comm.Free() for root in range(size): if rank == root: split_type = MPI.COMM_TYPE_SHARED else: split_type = MPI.UNDEFINED comm = self.COMM.Split_type(split_type) if rank == root: self.assertNotEqual(comm, MPI.COMM_NULL) self.assertEqual(comm.size, 1) self.assertEqual(comm.rank, 0) comm.Free() else: self.assertEqual(comm, MPI.COMM_NULL) class TestCommSelf(BaseTestComm, unittest.TestCase): def setUp(self): self.COMM = MPI.COMM_SELF def testSize(self): size = self.COMM.Get_size() self.assertEqual(size, 1) def testRank(self): rank = self.COMM.Get_rank() self.assertEqual(rank, 0) class TestCommWorld(BaseTestComm, unittest.TestCase): def setUp(self): self.COMM = MPI.COMM_WORLD def testSize(self): size = self.COMM.Get_size() self.assertTrue(size >= 1) def testRank(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() self.assertTrue(rank >= 0 and rank < size) class TestCommSelfDup(TestCommSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() @unittest.skipMPI('openmpi(<1.4.0)', MPI.Query_thread() > MPI.THREAD_SINGLE) class TestCommWorldDup(TestCommWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_cco_obj.py0000644000175000017500000001713013200562156017765 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest from functools import reduce cumsum = lambda seq: reduce(lambda x, y: x+y, seq, 0) cumprod = lambda seq: reduce(lambda x, y: x*y, seq, 1) _basic = [None, True, False, -7, 0, 7, 2**31, -2**63+1, 2**63-1, -2.17, 0.0, 3.14, 1+2j, 2-3j, 'mpi4py', ] messages = _basic messages += [ list(_basic), tuple(_basic), dict([('k%d' % key, val) for key, val in enumerate(_basic)]) ] class BaseTestCCOObj(object): COMM = MPI.COMM_NULL def testBarrier(self): self.COMM.barrier() def testBcast(self): for smess in messages: for root in range(self.COMM.Get_size()): rmess = self.COMM.bcast(smess, root=root) self.assertEqual(smess, rmess) def testGather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages + [messages]: for root in range(size): rmess = self.COMM.gather(smess, root=root) if rank == root: self.assertEqual(rmess, [smess] * size) else: self.assertEqual(rmess, None) def testScatter(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages + [messages]: for root in range(size): if rank == root: rmess = self.COMM.scatter([smess] * size, root=root) else: rmess = self.COMM.scatter(None, root=root) self.assertEqual(rmess, smess) def testAllgather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages + [messages]: rmess = self.COMM.allgather(smess) self.assertEqual(rmess, [smess] * size) def testAlltoall(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for smess in messages + [messages]: rmess = self.COMM.alltoall([smess] * size) self.assertEqual(rmess, [smess] * size) def testReduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for root in range(size): for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN, MPI.MAXLOC, MPI.MINLOC, MPI.REPLACE, MPI.NO_OP): if op == MPI.OP_NULL: continue if op in (MPI.MAXLOC, MPI.MINLOC): sendobj = (rank, rank) else: sendobj = rank value = self.COMM.reduce(sendobj, op=op, root=root) if rank != root: self.assertTrue(value is None) else: if op == MPI.SUM: self.assertEqual(value, cumsum(range(size))) elif op == MPI.PROD: self.assertEqual(value, cumprod(range(size))) elif op == MPI.MAX: self.assertEqual(value, size-1) elif op == MPI.MIN: self.assertEqual(value, 0) elif op == MPI.MAXLOC: self.assertEqual(value[0], size-1) self.assertEqual(value[1], size-1) elif op == MPI.MINLOC: self.assertEqual(value[0], 0) self.assertEqual(value[1], 0) elif op == MPI.REPLACE: self.assertEqual(value, size-1) elif op == MPI.NO_OP: self.assertEqual(value, 0) def testAllreduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN, MPI.MAXLOC, MPI.MINLOC, MPI.REPLACE, MPI.NO_OP): if op == MPI.OP_NULL: continue if op in (MPI.MAXLOC, MPI.MINLOC): sendobj = (rank, rank) else: sendobj = rank value = self.COMM.allreduce(sendobj, op) if op == MPI.SUM: self.assertEqual(value, cumsum(range(size))) elif op == MPI.PROD: self.assertEqual(value, cumprod(range(size))) elif op == MPI.MAX: self.assertEqual(value, size-1) elif op == MPI.MIN: self.assertEqual(value, 0) elif op == MPI.MAXLOC: self.assertEqual(value[1], size-1) elif op == MPI.MINLOC: self.assertEqual(value[1], 0) elif op == MPI.REPLACE: self.assertEqual(value, size-1) elif op == MPI.NO_OP: self.assertEqual(value, 0) def testScan(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() # -- sscan = self.COMM.scan(size, op=MPI.SUM) self.assertEqual(sscan, cumsum([size]*(rank+1))) # -- rscan = self.COMM.scan(rank, op=MPI.SUM) self.assertEqual(rscan, cumsum(range(rank+1))) # -- minloc = self.COMM.scan((rank, rank), op=MPI.MINLOC) maxloc = self.COMM.scan((rank, rank), op=MPI.MAXLOC) self.assertEqual(minloc, (0, 0)) self.assertEqual(maxloc, (rank, rank)) # -- if MPI.REPLACE != MPI.OP_NULL: rscan = self.COMM.scan(rank, op=MPI.REPLACE) self.assertEqual(rscan, rank) # -- if MPI.NO_OP != MPI.OP_NULL: rscan = self.COMM.scan(rank, op=MPI.NO_OP) self.assertEqual(rscan, 0) def testExscan(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() # -- sscan = self.COMM.exscan(size, op=MPI.SUM) if rank == 0: self.assertTrue(sscan is None) else: self.assertEqual(sscan, cumsum([size]*(rank))) # -- rscan = self.COMM.exscan(rank, op=MPI.SUM) if rank == 0: self.assertTrue(rscan is None) else: self.assertEqual(rscan, cumsum(range(rank))) # -- minloc = self.COMM.exscan((rank, rank), op=MPI.MINLOC) maxloc = self.COMM.exscan((rank, rank), op=MPI.MAXLOC) if rank == 0: self.assertEqual(minloc, None) self.assertEqual(maxloc, None) else: self.assertEqual(minloc, (0, 0)) self.assertEqual(maxloc, (rank-1, rank-1)) # -- if MPI.REPLACE != MPI.OP_NULL: rscan = self.COMM.exscan(rank, op=MPI.REPLACE) if rank == 0: self.assertTrue(rscan is None) else: self.assertEqual(rscan, rank-1) # -- if MPI.NO_OP != MPI.OP_NULL: rscan = self.COMM.exscan(rank, op=MPI.NO_OP) if rank == 0: self.assertTrue(rscan is None) else: self.assertEqual(rscan, 0) class TestCCOObjSelf(BaseTestCCOObj, unittest.TestCase): COMM = MPI.COMM_SELF class TestCCOObjWorld(BaseTestCCOObj, unittest.TestCase): COMM = MPI.COMM_WORLD class TestCCOObjSelfDup(TestCCOObjSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() @unittest.skipMPI('openmpi(<1.4.0)', MPI.Query_thread() > MPI.THREAD_SINGLE) class TestCCOObjWorldDup(TestCCOObjWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/arrayimpl.py0000644000175000017500000000750013200562156017330 0ustar dalcinldalcinl00000000000000import sys from mpi4py import MPI try: from collections import OrderedDict except ImportError: OrderedDict = dict try: import array except ImportError: array = None try: import numpy except ImportError: numpy = None __all__ = ['TypeMap', 'ArrayTypes', 'allclose'] TypeMap = OrderedDict([ ('b', MPI.SIGNED_CHAR), ('h', MPI.SHORT), ('i', MPI.INT), ('l', MPI.LONG), ('q', MPI.LONG_LONG), ('f', MPI.FLOAT), ('d', MPI.DOUBLE), ]) if MPI.SIGNED_CHAR == MPI.DATATYPE_NULL: del TypeMap['b'] if sys.version_info[:2] < (3, 3): del TypeMap['q'] ArrayTypes = [] def allclose(a, b, rtol=1.e-5, atol=1.e-8): try: iter(a) except TypeError: a = [a] try: iter(b) except TypeError: b = [b] for x, y in zip(a, b): if abs(x-y) > (atol + rtol * abs(y)): return False return True if array is not None: def product(seq): res = 1 for s in seq: res = res * s return res def mkshape(seq): return tuple([int(s) for s in seq]) class Array(array.array): TypeMap = TypeMap.copy() def __new__(cls, arg, typecode, shape=None): if isinstance(arg, (int, float)): if shape is None: shape = () else: try: shape = mkshape(shape) except TypeError: shape = (int(shape),) size = product(shape) arg = [arg] * size else: size = len(arg) if shape is None: shape = (size,) else: shape = mkshape(shape) assert size == product(shape) ary = array.array.__new__(cls, typecode, arg) ary.shape = shape ary.size = size try: ary.mpidtype = Array.TypeMap[typecode] except KeyError: ary.mpidtype = MPI.DATATYPE_NULL return ary def flat(self): return self flat = property(flat) def as_raw(self): return self def as_mpi(self): return (self, self.mpidtype) def as_mpi_c(self, count): return (self, count, self.mpidtype) def as_mpi_v(self, cnt, dsp): return (self, (cnt, dsp), self.mpidtype) ArrayTypes.append(Array) __all__.append('Array') if numpy is not None: class NumPy(object): TypeMap = TypeMap.copy() def __init__(self, arg, typecode, shape=None): if isinstance(arg, (int, float, complex)): if shape is None: shape = () else: if shape is None: shape = len(arg) self.array = ary = numpy.zeros(shape, typecode) if isinstance(arg, (int, float, complex)): ary.fill(arg) else: ary[:] = arg try: self.mpidtype = NumPy.TypeMap[typecode] except KeyError: self.mpidtype = MPI.DATATYPE_NULL def __len__(self): return len(self.array) def __getitem__(self, i): return self.array[i] def __setitem__(self, i, v): self.array[i] = v def typecode(self): return self.array.dtype.char typecode = property(typecode) def itemsize(self): return self.array.itemsize itemsize = property(itemsize) def flat(self): return self.array.flat flat = property(flat) def as_raw(self): return self.array def as_mpi(self): return (self.array, self.mpidtype) def as_mpi_c(self, count): return (self.array, count, self.mpidtype) def as_mpi_v(self, cnt, dsp): return (self.array, (cnt, dsp), self.mpidtype) ArrayTypes.append(NumPy) __all__.append('NumPy') mpi4py-3.0.3/test/test_info.py0000644000175000017500000001321013200562156017315 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class TestInfoNull(unittest.TestCase): def testTruth(self): self.assertFalse(bool(MPI.INFO_NULL)) def testPyMethods(self): inull = MPI.INFO_NULL def getitem(): return inull['k'] def setitem(): inull['k'] = 'v' def delitem(): del inull['k'] def update(): inull.update([]) self.assertEqual(len(inull), 0) self.assertFalse('key' in inull) self.assertRaises(KeyError, getitem) self.assertRaises(KeyError, setitem) self.assertRaises(KeyError, delitem) self.assertRaises(KeyError, update) self.assertEqual(inull.get('key', None), None) self.assertEqual(inull.keys(), []) self.assertEqual(inull.values(), []) self.assertEqual(inull.items(), []) self.assertEqual(inull.copy(), inull) inull.clear() class TestInfoEnv(unittest.TestCase): def testTruth(self): self.assertTrue(bool(MPI.INFO_ENV)) def testPyMethods(self): env = MPI.INFO_ENV if env == MPI.INFO_NULL: return for key in ("command", "argv", "maxprocs", "soft", "host", "arch", "wdir", "file", "thread_level"): v = env.Get(key) class TestInfo(unittest.TestCase): def setUp(self): self.INFO = MPI.Info.Create() def tearDown(self): self.INFO.Free() self.assertEqual(self.INFO, MPI.INFO_NULL) self.INFO = None def testTruth(self): self.assertTrue(bool(self.INFO)) def testDup(self): info = self.INFO.Dup() self.assertNotEqual(self.INFO, info) self.assertEqual(info.Get_nkeys(), 0) info.Free() self.assertFalse(info) def testGet(self): value = self.INFO.Get('key') self.assertEqual(value, None) def testGetNKeys(self): self.assertEqual(self.INFO.Get_nkeys(), 0) def testGetSetDelete(self): INFO = self.INFO self.assertEqual(INFO.Get_nkeys(), 0) INFO.Set('key', 'value') nkeys = INFO.Get_nkeys() self.assertEqual(nkeys, 1) key = INFO.Get_nthkey(0) self.assertEqual(key, 'key') value = INFO.Get('key') self.assertEqual(value, 'value') INFO.Delete('key') nkeys = INFO.Get_nkeys() self.assertEqual(nkeys, 0) value = INFO.Get('key') self.assertEqual(value, None) def testPyMethods(self): INFO = self.INFO self.assertEqual(len(INFO), 0) self.assertTrue('key' not in INFO) self.assertEqual(INFO.keys(), []) self.assertEqual(INFO.values(), []) self.assertEqual(INFO.items(), []) INFO['key'] = 'value' self.assertEqual(len(INFO), 1) self.assertTrue('key' in INFO) self.assertEqual(INFO['key'], 'value') for key in INFO: self.assertEqual(key, 'key') self.assertEqual(INFO.keys(), ['key']) self.assertEqual(INFO.values(), ['value']) self.assertEqual(INFO.items(), [('key', 'value')]) self.assertEqual(key, 'key') del INFO['key'] self.assertEqual(len(INFO), 0) self.assertTrue('key' not in INFO) self.assertEqual(INFO.keys(), []) self.assertEqual(INFO.values(), []) self.assertEqual(INFO.items(), []) def getitem(): INFO['key'] self.assertRaises(KeyError, getitem) def delitem(): del INFO['key'] self.assertRaises(KeyError, delitem) INFO.clear() INFO.update([('key1','value1')]) self.assertEqual(len(INFO), 1) self.assertEqual(INFO['key1'], 'value1') self.assertEqual(INFO.get('key1'), 'value1') self.assertEqual(INFO.get('key2'), None) self.assertEqual(INFO.get('key2', 'value2'), 'value2') INFO.update(key2='value2') self.assertEqual(len(INFO), 2) self.assertEqual(INFO['key1'], 'value1') self.assertEqual(INFO['key2'], 'value2') self.assertEqual(INFO.get('key1'), 'value1') self.assertEqual(INFO.get('key2'), 'value2') self.assertEqual(INFO.get('key3'), None) self.assertEqual(INFO.get('key3', 'value3'), 'value3') INFO.update([('key1', 'newval1')], key2='newval2') self.assertEqual(len(INFO), 2) self.assertEqual(INFO['key1'], 'newval1') self.assertEqual(INFO['key2'], 'newval2') self.assertEqual(INFO.get('key1'), 'newval1') self.assertEqual(INFO.get('key2'), 'newval2') self.assertEqual(INFO.get('key3'), None) self.assertEqual(INFO.get('key3', 'newval3'), 'newval3') INFO.update(dict(key1='val1', key2='val2', key3='val3')) self.assertEqual(len(INFO), 3) self.assertEqual(INFO['key1'], 'val1') self.assertEqual(INFO['key2'], 'val2') self.assertEqual(INFO['key3'], 'val3') dupe = INFO.copy() self.assertEqual(INFO.items(), dupe.items()) dupe.Free() INFO.clear() self.assertEqual(len(INFO), 0) self.assertEqual(INFO.get('key1'), None) self.assertEqual(INFO.get('key2'), None) self.assertEqual(INFO.get('key3'), None) self.assertEqual(INFO.get('key1', 'value1'), 'value1') self.assertEqual(INFO.get('key2', 'value2'), 'value2') self.assertEqual(INFO.get('key3', 'value3'), 'value3') try: MPI.Info.Create().Free() except NotImplementedError: unittest.disable(TestInfo, 'mpi-info') unittest.disable(TestInfoNull, 'mpi-info') if (MPI.VERSION < 3 and MPI.INFO_ENV == MPI.INFO_NULL): unittest.disable(TestInfoEnv, 'mpi-info-env') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_dynproc.py0000644000175000017500000001574313200562156020055 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest try: import socket except ImportError: socket = None def appnum(): if MPI.APPNUM == MPI.KEYVAL_INVALID: return None return MPI.COMM_WORLD.Get_attr(MPI.APPNUM) @unittest.skipMPI('openmpi(<2.0.0)') @unittest.skipMPI('MVAPICH2') @unittest.skipMPI('msmpi(<8.1.0)') class TestDPM(unittest.TestCase): message = [ None, True, False, -7, 0, 7, -2**63+1, 2**63-1, -2.17, 0.0, 3.14, 1+2j, 2-3j, 'mpi4py', (1, 2, 3), [1, 2, 3], {1:2}, ] @unittest.skipMPI('mpich', appnum() is None) @unittest.skipMPI('MPICH2', appnum() is None) @unittest.skipMPI('MPICH1', appnum() is None) @unittest.skipMPI('msmpi(<8.1.0)', appnum() is None) @unittest.skipMPI('PlatformMPI') def testNamePublishing(self): rank = MPI.COMM_WORLD.Get_rank() service = "mpi4py-%d" % rank port = MPI.Open_port() MPI.Publish_name(service, port) found = MPI.Lookup_name(service) self.assertEqual(port, found) MPI.Unpublish_name(service, port) MPI.Close_port(port) @unittest.skipIf(MPI.COMM_WORLD.Get_size() < 2, 'mpi-world-size<2') def testAcceptConnect(self): comm_self = MPI.COMM_SELF comm_world = MPI.COMM_WORLD wsize = comm_world.Get_size() wrank = comm_world.Get_rank() group_world = comm_world.Get_group() group = group_world.Excl([0]) group_world.Free() comm = comm_world.Create(group) group.Free() if wrank == 0: self.assertEqual(comm, MPI.COMM_NULL) else: self.assertNotEqual(comm, MPI.COMM_NULL) self.assertEqual(comm.size, comm_world.size-1) self.assertEqual(comm.rank, comm_world.rank-1) if wrank == 0: port = MPI.Open_port() comm_world.send(port, dest=1) intercomm = comm_self.Accept(port) self.assertEqual(intercomm.remote_size, comm_world.size-1) self.assertEqual(intercomm.size, 1) self.assertEqual(intercomm.rank, 0) MPI.Close_port(port) else: if wrank == 1: port = comm_world.recv(source=0) else: port = None intercomm = comm.Connect(port, root=0) self.assertEqual(intercomm.remote_size, 1) self.assertEqual(intercomm.size, comm_world.size-1) self.assertEqual(intercomm.rank, comm.rank) comm.Free() if wrank == 0: message = TestDPM.message root = MPI.ROOT else: message = None root = 0 message = intercomm.bcast(message, root) if wrank == 0: self.assertEqual(message, None) else: self.assertEqual(message, TestDPM.message) intercomm.Free() @unittest.skipIf(MPI.COMM_WORLD.Get_size() < 2, 'mpi-world-size<2') def testConnectAccept(self): comm_self = MPI.COMM_SELF comm_world = MPI.COMM_WORLD wsize = comm_world.Get_size() wrank = comm_world.Get_rank() group_world = comm_world.Get_group() group = group_world.Excl([0]) group_world.Free() comm = comm_world.Create(group) group.Free() if wrank == 0: self.assertEqual(comm, MPI.COMM_NULL) else: self.assertNotEqual(comm, MPI.COMM_NULL) self.assertEqual(comm.size, comm_world.size-1) self.assertEqual(comm.rank, comm_world.rank-1) if wrank == 0: port = comm_world.recv(source=1) intercomm = comm_self.Connect(port) self.assertEqual(intercomm.remote_size, comm_world.size-1) self.assertEqual(intercomm.size, 1) self.assertEqual(intercomm.rank, 0) else: if wrank == 1: port = MPI.Open_port() comm_world.send(port, dest=0) else: port = None intercomm = comm.Accept(port, root=0) if wrank == 1: MPI.Close_port(port) self.assertEqual(intercomm.remote_size, 1) self.assertEqual(intercomm.size, comm_world.size-1) self.assertEqual(intercomm.rank, comm.rank) comm.Free() if wrank == 0: message = TestDPM.message root = MPI.ROOT else: message = None root = 0 message = intercomm.bcast(message, root) if wrank == 0: self.assertEqual(message, None) else: self.assertEqual(message, TestDPM.message) intercomm.Free() @unittest.skipIf(MPI.COMM_WORLD.Get_size() < 2, 'mpi-world-size<2') @unittest.skipIf(socket is None, 'socket') def testJoin(self): size = MPI.COMM_WORLD.Get_size() rank = MPI.COMM_WORLD.Get_rank() server = client = address = None # crate server/client sockets if rank == 0: # server server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = socket.gethostname() server.bind((host, 0)) server.listen(0) if rank == 1: # client client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # communicate address if rank == 0: address = server.getsockname() MPI.COMM_WORLD.ssend(address, 1) if rank == 1: address = MPI.COMM_WORLD.recv(None, 0) MPI.COMM_WORLD.Barrier() # stablish client/server connection connected = False if rank == 0: # server client = server.accept()[0] server.close() if rank == 1: # client try: client.connect(address) connected = True except socket.error: raise connected = MPI.COMM_WORLD.bcast(connected, root=1) # test Comm.Join() MPI.COMM_WORLD.Barrier() if client: fd = client.fileno() intercomm = MPI.Comm.Join(fd) client.close() if intercomm != MPI.COMM_NULL: self.assertEqual(intercomm.remote_size, 1) self.assertEqual(intercomm.size, 1) self.assertEqual(intercomm.rank, 0) if rank == 0: message = TestDPM.message root = MPI.ROOT else: message = None root = 0 message = intercomm.bcast(message, root) if rank == 0: self.assertEqual(message, None) else: self.assertEqual(message, TestDPM.message) intercomm.Free() MPI.COMM_WORLD.Barrier() MVAPICH2 = MPI.get_vendor()[0] == 'MVAPICH2' try: if MVAPICH2: raise NotImplementedError MPI.Close_port(MPI.Open_port()) except NotImplementedError: unittest.disable(TestDPM, 'mpi-dpm') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_p2p_buf.py0000644000175000017500000003372013200562156017727 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl class BaseTestP2PBuf(object): COMM = MPI.COMM_NULL def testSendrecv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() dest = (rank + 1) % size source = (rank - 1) % size for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for s in range(0, size): sbuf = array( s, typecode, s) rbuf = array(-1, typecode, s+1) self.COMM.Sendrecv(sbuf.as_mpi(), dest, 0, rbuf.as_mpi(), source, 0) for value in rbuf[:-1]: self.assertEqual(value, s) self.assertEqual(rbuf[-1], -1) def testSendrecvReplace(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() dest = (rank + 1) % size source = (rank - 1) % size for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for s in range(0, size): buf = array(rank, typecode, s); self.COMM.Sendrecv_replace(buf.as_mpi(), dest, 0, source, 0) for value in buf: self.assertEqual(value, source) def testSendRecv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for s in range(0, size): # sbuf = array( s, typecode, s) rbuf = array(-1, typecode, s) mem = array( 0, typecode, 2*(s+MPI.BSEND_OVERHEAD)).as_raw() if size == 1: MPI.Attach_buffer(mem) rbuf = sbuf MPI.Detach_buffer() elif rank == 0: MPI.Attach_buffer(mem) self.COMM.Ibsend(sbuf.as_mpi(), 1, 0).Wait() self.COMM.Bsend(sbuf.as_mpi(), 1, 0) MPI.Detach_buffer() self.COMM.Send(sbuf.as_mpi(), 1, 0) self.COMM.Ssend(sbuf.as_mpi(), 1, 0) self.COMM.Recv(rbuf.as_mpi(), 1, 0) self.COMM.Recv(rbuf.as_mpi(), 1, 0) self.COMM.Recv(rbuf.as_mpi(), 1, 0) self.COMM.Recv(rbuf.as_mpi(), 1, 0) elif rank == 1: self.COMM.Recv(rbuf.as_mpi(), 0, 0) self.COMM.Recv(rbuf.as_mpi(), 0, 0) self.COMM.Recv(rbuf.as_mpi(), 0, 0) self.COMM.Recv(rbuf.as_mpi(), 0, 0) MPI.Attach_buffer(mem) self.COMM.Ibsend(sbuf.as_mpi(), 0, 0).Wait() self.COMM.Bsend(sbuf.as_mpi(), 0, 0) MPI.Detach_buffer() self.COMM.Send(sbuf.as_mpi(), 0, 0) self.COMM.Ssend(sbuf.as_mpi(), 0, 0) else: rbuf = sbuf for value in rbuf: self.assertEqual(value, s) # rank = self.COMM.Get_rank() sbuf = array( s, typecode, s) rbuf = array(-1, typecode, s) rreq = self.COMM.Irecv(rbuf.as_mpi(), rank, 0) self.COMM.Rsend(sbuf.as_mpi(), rank, 0) rreq.Wait() for value in rbuf: self.assertEqual(value, s) rbuf = array(-1, typecode, s) rreq = self.COMM.Irecv(rbuf.as_mpi(), rank, 0) self.COMM.Irsend(sbuf.as_mpi(), rank, 0).Wait() rreq.Wait() for value in rbuf: self.assertEqual(value, s) def testProcNull(self): comm = self.COMM # comm.Sendrecv(None, MPI.PROC_NULL, 0, None, MPI.PROC_NULL, 0) comm.Sendrecv_replace(None, MPI.PROC_NULL, 0, MPI.PROC_NULL, 0) # comm.Send (None, MPI.PROC_NULL) comm.Isend (None, MPI.PROC_NULL).Wait() req = comm.Send_init(None, MPI.PROC_NULL) req.Start(); req.Wait(); req.Free() # comm.Ssend(None, MPI.PROC_NULL) comm.Issend(None, MPI.PROC_NULL).Wait() req = comm.Ssend_init(None, MPI.PROC_NULL) req.Start(); req.Wait(); req.Free() # buf = MPI.Alloc_mem(MPI.BSEND_OVERHEAD) MPI.Attach_buffer(buf) comm.Bsend(None, MPI.PROC_NULL) comm.Ibsend(None, MPI.PROC_NULL).Wait() req = comm.Bsend_init(None, MPI.PROC_NULL) req.Start(); req.Wait(); req.Free() MPI.Detach_buffer() MPI.Free_mem(buf) # comm.Rsend(None, MPI.PROC_NULL) comm.Irsend(None, MPI.PROC_NULL).Wait() req = comm.Rsend_init(None, MPI.PROC_NULL) req.Start(); req.Wait(); req.Free() # comm.Recv (None, MPI.PROC_NULL) comm.Irecv(None, MPI.PROC_NULL).Wait() req = comm.Recv_init(None, MPI.PROC_NULL) req.Start(); req.Wait(); req.Free() def testPersistent(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() dest = (rank + 1) % size source = (rank - 1) % size for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for s in range(size): for xs in range(3): # sbuf = array( s, typecode, s) rbuf = array(-1, typecode, s+xs) sendreq = self.COMM.Send_init(sbuf.as_mpi(), dest, 0) recvreq = self.COMM.Recv_init(rbuf.as_mpi(), source, 0) sendreq.Start() recvreq.Start() sendreq.Wait() recvreq.Wait() self.assertNotEqual(sendreq, MPI.REQUEST_NULL) self.assertNotEqual(recvreq, MPI.REQUEST_NULL) sendreq.Free() recvreq.Free() self.assertEqual(sendreq, MPI.REQUEST_NULL) self.assertEqual(recvreq, MPI.REQUEST_NULL) for value in rbuf[:s]: self.assertEqual(value, s) for value in rbuf[s:]: self.assertEqual(value, -1) # sbuf = array(s, typecode, s) rbuf = array(-1, typecode, s+xs) sendreq = self.COMM.Send_init(sbuf.as_mpi(), dest, 0) recvreq = self.COMM.Recv_init(rbuf.as_mpi(), source, 0) reqlist = [sendreq, recvreq] MPI.Prequest.Startall(reqlist) index1 = MPI.Prequest.Waitany(reqlist) self.assertTrue(index1 in [0, 1]) self.assertNotEqual(reqlist[index1], MPI.REQUEST_NULL) index2 = MPI.Prequest.Waitany(reqlist) self.assertTrue(index2 in [0, 1]) self.assertNotEqual(reqlist[index2], MPI.REQUEST_NULL) self.assertTrue(index1 != index2) index3 = MPI.Prequest.Waitany(reqlist) self.assertEqual(index3, MPI.UNDEFINED) for preq in reqlist: self.assertNotEqual(preq, MPI.REQUEST_NULL) preq.Free() self.assertEqual(preq, MPI.REQUEST_NULL) for value in rbuf[:s]: self.assertEqual(value, s) for value in rbuf[s:]: self.assertEqual(value, -1) # sbuf = array( s, typecode, s) rbuf = array(-1, typecode, s+xs) sendreq = self.COMM.Ssend_init(sbuf.as_mpi(), dest, 0) recvreq = self.COMM.Recv_init(rbuf.as_mpi(), source, 0) sendreq.Start() recvreq.Start() sendreq.Wait() recvreq.Wait() self.assertNotEqual(sendreq, MPI.REQUEST_NULL) self.assertNotEqual(recvreq, MPI.REQUEST_NULL) sendreq.Free() recvreq.Free() self.assertEqual(sendreq, MPI.REQUEST_NULL) self.assertEqual(recvreq, MPI.REQUEST_NULL) for value in rbuf[:s]: self.assertEqual(value, s) for value in rbuf[s:]: self.assertEqual(value, -1) # mem = array( 0, typecode, s+MPI.BSEND_OVERHEAD).as_raw() sbuf = array( s, typecode, s) rbuf = array(-1, typecode, s+xs) MPI.Attach_buffer(mem) sendreq = self.COMM.Bsend_init(sbuf.as_mpi(), dest, 0) recvreq = self.COMM.Recv_init(rbuf.as_mpi(), source, 0) sendreq.Start() recvreq.Start() sendreq.Wait() recvreq.Wait() MPI.Detach_buffer() self.assertNotEqual(sendreq, MPI.REQUEST_NULL) self.assertNotEqual(recvreq, MPI.REQUEST_NULL) sendreq.Free() recvreq.Free() self.assertEqual(sendreq, MPI.REQUEST_NULL) self.assertEqual(recvreq, MPI.REQUEST_NULL) for value in rbuf[:s]: self.assertEqual(value, s) for value in rbuf[s:]: self.assertEqual(value, -1) # rank = self.COMM.Get_rank() sbuf = array( s, typecode, s) rbuf = array(-1, typecode, s+xs) recvreq = self.COMM.Recv_init (rbuf.as_mpi(), rank, 0) sendreq = self.COMM.Rsend_init(sbuf.as_mpi(), rank, 0) recvreq.Start() sendreq.Start() recvreq.Wait() sendreq.Wait() self.assertNotEqual(sendreq, MPI.REQUEST_NULL) self.assertNotEqual(recvreq, MPI.REQUEST_NULL) sendreq.Free() recvreq.Free() self.assertEqual(sendreq, MPI.REQUEST_NULL) self.assertEqual(recvreq, MPI.REQUEST_NULL) for value in rbuf[:s]: self.assertEqual(value, s) for value in rbuf[s:]: self.assertEqual(value, -1) def testProbe(self): comm = self.COMM.Dup() try: request = comm.Issend([None, 0, MPI.BYTE], comm.rank, 123) self.assertTrue(request) status = MPI.Status() comm.Probe(MPI.ANY_SOURCE, MPI.ANY_TAG, status) self.assertEqual(status.source, comm.rank) self.assertEqual(status.tag, 123) self.assertTrue(request) flag = request.Test() self.assertTrue(request) self.assertFalse(flag) comm.Recv([None, 0, MPI.BYTE], comm.rank, 123) self.assertTrue(request) flag = request.Test() self.assertFalse(request) self.assertTrue(flag) finally: comm.Free() @unittest.skipMPI('MPICH1') @unittest.skipMPI('LAM/MPI') def testProbeCancel(self): comm = self.COMM.Dup() try: request = comm.Issend([None, 0, MPI.BYTE], comm.rank, 123) status = MPI.Status() comm.Probe(MPI.ANY_SOURCE, MPI.ANY_TAG, status) self.assertEqual(status.source, comm.rank) self.assertEqual(status.tag, 123) request.Cancel() self.assertTrue(request) status = MPI.Status() request.Get_status(status) cancelled = status.Is_cancelled() if not cancelled: comm.Recv([None, 0, MPI.BYTE], comm.rank, 123) request.Wait() else: request.Free() finally: comm.Free() def testIProbe(self): comm = self.COMM.Dup() try: f = comm.Iprobe() self.assertFalse(f) f = comm.Iprobe(MPI.ANY_SOURCE) self.assertFalse(f) f = comm.Iprobe(MPI.ANY_SOURCE, MPI.ANY_TAG) self.assertFalse(f) status = MPI.Status() f = comm.Iprobe(MPI.ANY_SOURCE, MPI.ANY_TAG, status) self.assertFalse(f) self.assertEqual(status.source, MPI.ANY_SOURCE) self.assertEqual(status.tag, MPI.ANY_TAG) self.assertEqual(status.error, MPI.SUCCESS) finally: comm.Free() class TestP2PBufSelf(BaseTestP2PBuf, unittest.TestCase): COMM = MPI.COMM_SELF class TestP2PBufWorld(BaseTestP2PBuf, unittest.TestCase): COMM = MPI.COMM_WORLD class TestP2PBufSelfDup(TestP2PBufSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() @unittest.skipMPI('openmpi(<1.4.0)', MPI.Query_thread() > MPI.THREAD_SINGLE) class TestP2PBufWorldDup(TestP2PBufWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/mpiunittest.py0000644000175000017500000000563713200562156017726 0ustar dalcinldalcinl00000000000000import os import sys import glob import unittest from distutils.versionpredicate import VersionPredicate class TestCase(unittest.TestCase): def assertRaisesMPI(self, IErrClass, callableObj, *args, **kwargs): from mpi4py.MPI import Exception as excClass, Get_version try: callableObj(*args, **kwargs) except NotImplementedError: if Get_version() >= (2, 0): raise self.failureException("raised NotImplementedError") except excClass: excValue = sys.exc_info()[1] error_class = excValue.Get_error_class() if isinstance(IErrClass, (list, tuple)): match = (error_class in IErrClass) else: match = (error_class == IErrClass) if not match: if isinstance(IErrClass, (list, tuple)): IErrClassName = [ErrClsName(e) for e in IErrClass] IErrClassName = type(IErrClass)(IErrClassName) else: IErrClassName = ErrClsName(IErrClass) raise self.failureException( "generated error class is '%s' (%d), " "but expected '%s' (%s)" % \ (ErrClsName(error_class), error_class, IErrClassName, IErrClass,) ) else: if hasattr(excClass,'__name__'): excName = excClass.__name__ else: excName = str(excClass) raise self.failureException("%s not raised" % excName) failUnlessRaisesMPI = assertRaisesMPI ErrClsMap = None def ErrClsName(ierr): global ErrClsMap if ErrClsMap is None: from mpi4py import MPI ErrClsMap = {} ErrClsMap[MPI.SUCCESS] = 'SUCCESS' for entry in dir(MPI): if entry.startswith('ERR_'): errcls = getattr(MPI, entry) ErrClsMap[errcls] = entry try: return ErrClsMap[ierr] except KeyError: return '' SkipTest = unittest.SkipTest skip = unittest.skip skipIf = unittest.skipIf skipUnless = unittest.skipUnless def skipMPI(predicate, *conditions): from mpi4py import MPI def key(s): s = s.replace(' ', '') s = s.replace('/', '') s = s.replace('-', '') s = s.replace('Microsoft', 'MS') return s.lower() vp = VersionPredicate(key(predicate)) if vp.name == 'mpi': name, version = 'mpi', MPI.Get_version() version = version + (0,) else: name, version = MPI.get_vendor() if vp.name == key(name): if vp.satisfied_by('%d.%d.%d' % version): if not conditions or any(conditions): return unittest.skip(str(vp)) return unittest.skipIf(False, '') def disable(what, reason): return unittest.skip(reason)(what) def main(*args, **kargs): try: unittest.main(*args, **kargs) except SystemExit: pass mpi4py-3.0.3/test/test_attributes.py0000664000175000017500000001625613426006675020600 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest try: import array except ImportError: array = None class BaseTestAttr(object): keyval = MPI.KEYVAL_INVALID def tearDown(self): if self.obj: self.obj.Free() if self.keyval != MPI.KEYVAL_INVALID: self.keyval = type(self.obj).Free_keyval(self.keyval) self.assertEqual(self.keyval, MPI.KEYVAL_INVALID) def testAttr(self, copy_fn=None, delete_fn=None): cls, obj = type(self.obj), self.obj self.keyval = cls.Create_keyval(copy_fn, delete_fn) self.assertNotEqual(self.keyval, MPI.KEYVAL_INVALID) attr = obj.Get_attr(self.keyval) self.assertEqual(attr, None) attrval = [1,2,3] obj.Set_attr(self.keyval, attrval) attr = obj.Get_attr(self.keyval) self.assertTrue(attr is attrval) if hasattr(obj, 'Dup'): dup = obj.Dup() attr = dup.Get_attr(self.keyval) if copy_fn is True: self.assertTrue(attr is attrval) elif not copy_fn: self.assertTrue(attr is None) dup.Free() obj.Delete_attr(self.keyval) attr = obj.Get_attr(self.keyval) self.assertTrue(attr is None) def testAttrCopyFalse(self): self.testAttr(False) def testAttrCopyTrue(self): self.testAttr(True) def testAttrNoCopy(self): cls, obj = type(self.obj), self.obj def copy_fn(o, k, v): assert k == self.keyval assert v is attrval return NotImplemented self.keyval = cls.Create_keyval(copy_fn, None) self.assertNotEqual(self.keyval, MPI.KEYVAL_INVALID) attr = obj.Get_attr(self.keyval) self.assertEqual(attr, None) attrval = [1,2,3] obj.Set_attr(self.keyval, attrval) attr = obj.Get_attr(self.keyval) self.assertTrue(attr is attrval) if hasattr(obj, 'Dup'): dup = obj.Dup() attr = dup.Get_attr(self.keyval) self.assertTrue(attr is None) dup.Free() obj.Delete_attr(self.keyval) attr = obj.Get_attr(self.keyval) self.assertTrue(attr is None) def testAttrNoPython(self, intval=123456789): cls, obj = type(self.obj), self.obj def copy_fn(o, k, v): assert k == self.keyval assert v == intval return v def del_fn(o, k, v): assert k == self.keyval assert v == intval self.keyval = cls.Create_keyval(copy_fn, del_fn, nopython=True) self.assertNotEqual(self.keyval, MPI.KEYVAL_INVALID) attr = obj.Get_attr(self.keyval) self.assertEqual(attr, None) obj.Set_attr(self.keyval, intval) attr = obj.Get_attr(self.keyval) self.assertEqual(attr, intval) if hasattr(obj, 'Dup'): dup = obj.Dup() attr = dup.Get_attr(self.keyval) self.assertEqual(attr, intval) dup.Free() obj.Delete_attr(self.keyval) attr = obj.Get_attr(self.keyval) self.assertTrue(attr is None) @unittest.skipMPI('openmpi(<=1.10.2)') def testAttrNoPythonZero(self): self.testAttrNoPython(0) @unittest.skipIf(array is None, 'array') def testAttrNoPythonArray(self): cls, obj = type(self.obj), self.obj self.keyval = cls.Create_keyval(nopython=True) # ary = array.array('i', [42]) addr, _ = ary.buffer_info() obj.Set_attr(self.keyval, addr) # attr = obj.Get_attr(self.keyval) self.assertEqual(attr, addr) class BaseTestCommAttr(BaseTestAttr): NULL = MPI.COMM_NULL @unittest.skipMPI('openmpi(<=1.5.1)') def testAttrCopyDelete(self): cls, obj, null = type(self.obj), self.obj, self.NULL # self.keyval = cls.Create_keyval( copy_fn=lambda o, k, v: cls.Dup(v), delete_fn=lambda o, k, v: cls.Free(v)) self.assertNotEqual(self.keyval, MPI.KEYVAL_INVALID) # obj1 = obj dup1 = obj1.Dup() obj1.Set_attr(self.keyval, dup1) self.assertTrue(dup1 != null) obj2 = obj1.Dup() dup2 = obj2.Get_attr(self.keyval) self.assertTrue(dup1 != dup2) obj2.Free() self.assertTrue(dup2 == null) self.obj.Delete_attr(self.keyval) self.assertTrue(dup1 == null) class TestCommAttrWorld(BaseTestCommAttr, unittest.TestCase): def setUp(self): self.obj = MPI.COMM_WORLD.Dup() class TestCommAttrSelf(BaseTestCommAttr, unittest.TestCase): def setUp(self): self.obj = MPI.COMM_SELF.Dup() class BaseTestDatatypeAttr(BaseTestAttr): NULL = MPI.DATATYPE_NULL def testAttrCopyDelete(self): cls, obj, null = type(self.obj), self.obj, self.NULL # self.keyval = cls.Create_keyval( copy_fn=lambda o, k, v: cls.Dup(v), delete_fn=lambda o, k, v: cls.Free(v)) self.assertNotEqual(self.keyval, MPI.KEYVAL_INVALID) # obj1 = obj dup1 = obj1.Dup() obj1.Set_attr(self.keyval, dup1) self.assertTrue(dup1 != null) obj2 = obj1.Dup() dup2 = obj2.Get_attr(self.keyval) self.assertTrue(dup1 != dup2) obj2.Free() self.assertTrue(dup2 == null) self.obj.Delete_attr(self.keyval) self.assertTrue(dup1 == null) class TestDatatypeAttrBYTE(BaseTestDatatypeAttr, unittest.TestCase): def setUp(self): self.obj = MPI.BYTE.Dup() class TestDatatypeAttrINT(BaseTestDatatypeAttr, unittest.TestCase): def setUp(self): self.obj = MPI.INT.Dup() class TestDatatypeAttrFLOAT(BaseTestDatatypeAttr, unittest.TestCase): def setUp(self): self.obj = MPI.FLOAT.Dup() class TestWinAttr(BaseTestAttr, unittest.TestCase): NULL = MPI.WIN_NULL def setUp(self): win = MPI.Win.Create(MPI.BOTTOM, 1, MPI.INFO_NULL, MPI.COMM_SELF) self.obj = self.win = win @unittest.skipMPI('openmpi(<=1.5.1)') @unittest.skipMPI('PlatformMPI') def testAttrCopyDelete(self): # null = self.NULL def delete_fn(o, k, v): assert isinstance(o, MPI.Win) assert k == self.keyval assert v is win MPI.Win.Free(v) self.keyval = MPI.Win.Create_keyval(delete_fn=delete_fn) self.assertNotEqual(self.keyval, MPI.KEYVAL_INVALID) # win = MPI.Win.Create(MPI.BOTTOM, 1, MPI.INFO_NULL, MPI.COMM_SELF) self.obj.Set_attr(self.keyval, win) self.assertTrue(win != null) self.obj.Delete_attr(self.keyval) self.assertTrue(win == null) try: k = MPI.Datatype.Create_keyval() k = MPI.Datatype.Free_keyval(k) except NotImplementedError: unittest.disable(BaseTestDatatypeAttr, 'mpi-type-attr') SpectrumMPI = MPI.get_vendor()[0] == 'Spectrum MPI' try: if SpectrumMPI: raise NotImplementedError MPI.Win.Create(MPI.BOTTOM, 1, MPI.INFO_NULL, MPI.COMM_SELF).Free() k = MPI.Win.Create_keyval() k = MPI.Win.Free_keyval(k) except (NotImplementedError, MPI.Exception): unittest.disable(TestWinAttr, 'mpi-win-attr') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_grequest.py0000644000175000017500000000441413200562156020227 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class GReqCtx(object): source = 3 tag = 7 completed = False cancel_called = False free_called = False def query(self, status): status.Set_source(self.source) status.Set_tag(self.tag) def free(self): self.free_called = True def cancel(self, completed): self.cancel_called = True if completed is not self.completed: raise MPI.Exception(MPI.ERR_PENDING) @unittest.skipMPI('MPI(<2.0)') class TestGrequest(unittest.TestCase): def testAll(self): ctx = GReqCtx() greq = MPI.Grequest.Start(ctx.query, ctx.free, ctx.cancel) self.assertFalse(greq.Test()) self.assertFalse(ctx.free_called) greq.Cancel() self.assertTrue(ctx.cancel_called) ctx.cancel_called = False greq.Complete() ctx.completed = True greq.Cancel() self.assertTrue(ctx.cancel_called) status = MPI.Status() self.assertTrue(greq.Test(status)) self.assertEqual(status.Get_source(), ctx.source) self.assertEqual(status.Get_tag(), ctx.tag) self.assertEqual(status.Get_error(), MPI.SUCCESS) greq.Wait() self.assertTrue(ctx.free_called) def testAll1(self): ctx = GReqCtx() greq = MPI.Grequest.Start(ctx.query, None, None) self.assertFalse(greq.Test()) greq.Cancel() greq.Complete() status = MPI.Status() self.assertTrue(greq.Test(status)) self.assertEqual(status.Get_source(), ctx.source) self.assertEqual(status.Get_tag(), ctx.tag) self.assertEqual(status.Get_error(), MPI.SUCCESS) self.assertFalse(status.Is_cancelled()) greq.Wait() def testAll2(self): greq = MPI.Grequest.Start(None, None, None) self.assertFalse(greq.Test()) greq.Cancel() greq.Complete() status = MPI.Status() self.assertTrue(greq.Test(status)) self.assertEqual(status.Get_source(), MPI.ANY_SOURCE) self.assertEqual(status.Get_tag(), MPI.ANY_TAG) self.assertEqual(status.Get_error(), MPI.SUCCESS) self.assertFalse(status.Is_cancelled()) greq.Wait() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_exceptions.py0000664000175000017500000003021713426006675020564 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys, os HAVE_MPE = 'MPE_LOGFILE_PREFIX' in os.environ HAVE_VT = 'VT_FILE_PREFIX' in os.environ # -------------------------------------------------------------------- @unittest.skipMPI('PlatformMPI') @unittest.skipMPI('MPICH2') @unittest.skipIf(HAVE_MPE or HAVE_VT, 'mpe|vt') class BaseTestCase(unittest.TestCase): def setUp(self): self.errhdl_world = MPI.COMM_WORLD.Get_errhandler() MPI.COMM_WORLD.Set_errhandler(MPI.ERRORS_RETURN) self.errhdl_self = MPI.COMM_SELF.Get_errhandler() MPI.COMM_SELF.Set_errhandler(MPI.ERRORS_RETURN) def tearDown(self): MPI.COMM_WORLD.Set_errhandler(self.errhdl_world) self.errhdl_world.Free() MPI.COMM_SELF.Set_errhandler(self.errhdl_self) self.errhdl_self.Free() # -------------------------------------------------------------------- class TestExcDatatypeNull(BaseTestCase): def testDup(self): self.assertRaisesMPI(MPI.ERR_TYPE, MPI.DATATYPE_NULL.Dup) def testCommit(self): self.assertRaisesMPI(MPI.ERR_TYPE, MPI.DATATYPE_NULL.Commit) def testFree(self): self.assertRaisesMPI(MPI.ERR_TYPE, MPI.DATATYPE_NULL.Free) class TestExcDatatype(BaseTestCase): DATATYPES = (MPI.BYTE, MPI.PACKED, MPI.CHAR, MPI.WCHAR, MPI.SIGNED_CHAR, MPI.UNSIGNED_CHAR, MPI.SHORT, MPI.UNSIGNED_SHORT, MPI.INT, MPI.UNSIGNED, MPI.UNSIGNED_INT, MPI.LONG, MPI.UNSIGNED_LONG, MPI.LONG_LONG, MPI.UNSIGNED_LONG_LONG, MPI.FLOAT, MPI.DOUBLE, MPI.LONG_DOUBLE, MPI.SHORT_INT, MPI.TWOINT, MPI.INT_INT, MPI.LONG_INT, MPI.FLOAT_INT, MPI.DOUBLE_INT, MPI.LONG_DOUBLE_INT, MPI.UB, MPI.LB,) ERR_TYPE = MPI.ERR_TYPE @unittest.skipMPI('msmpi') def testFreePredefined(self): for dtype in self.DATATYPES: if dtype != MPI.DATATYPE_NULL: self.assertRaisesMPI(self.ERR_TYPE, dtype.Free) self.assertTrue(dtype != MPI.DATATYPE_NULL) def testKeyvalInvalid(self): for dtype in self.DATATYPES: if dtype != MPI.DATATYPE_NULL: try: self.assertRaisesMPI( [MPI.ERR_KEYVAL, MPI.ERR_OTHER], dtype.Get_attr, MPI.KEYVAL_INVALID) except NotImplementedError: self.skipTest('mpi-type-get_attr') name, version = MPI.get_vendor() if name == 'Open MPI': if version < (1,4,3): TestExcDatatype.DATATYPES = TestExcDatatype.DATATYPES[1:] TestExcDatatype.ERR_TYPE = MPI.ERR_INTERN # -------------------------------------------------------------------- @unittest.skipMPI('msmpi(<=4.2.0)') class TestExcStatus(BaseTestCase): def testGetCount(self): status = MPI.Status() self.assertRaisesMPI( MPI.ERR_TYPE, status.Get_count, MPI.DATATYPE_NULL) def testGetElements(self): status = MPI.Status() self.assertRaisesMPI( MPI.ERR_TYPE, status.Get_elements, MPI.DATATYPE_NULL) @unittest.skipMPI('MPICH1') def testSetElements(self): status = MPI.Status() self.assertRaisesMPI( MPI.ERR_TYPE, status.Set_elements, MPI.DATATYPE_NULL, 0) # -------------------------------------------------------------------- class TestExcRequestNull(BaseTestCase): def testFree(self): self.assertRaisesMPI(MPI.ERR_REQUEST, MPI.REQUEST_NULL.Free) def testCancel(self): self.assertRaisesMPI(MPI.ERR_REQUEST, MPI.REQUEST_NULL.Cancel) # -------------------------------------------------------------------- class TestExcOpNull(BaseTestCase): def testFree(self): self.assertRaisesMPI([MPI.ERR_OP, MPI.ERR_ARG], MPI.OP_NULL.Free) class TestExcOp(BaseTestCase): def testFreePredefined(self): for op in (MPI.MAX, MPI.MIN, MPI.SUM, MPI.PROD, MPI.LAND, MPI.BAND, MPI.LOR, MPI.BOR, MPI.LXOR, MPI.BXOR, MPI.MAXLOC, MPI.MINLOC): self.assertRaisesMPI([MPI.ERR_OP, MPI.ERR_ARG], op.Free) if MPI.REPLACE != MPI.OP_NULL: self.assertRaisesMPI([MPI.ERR_OP, MPI.ERR_ARG], op.Free) # -------------------------------------------------------------------- class TestExcInfoNull(BaseTestCase): def testTruth(self): self.assertFalse(bool(MPI.INFO_NULL)) @unittest.skipMPI('msmpi(<8.1.0)') def testDup(self): self.assertRaisesMPI( [MPI.ERR_INFO, MPI.ERR_ARG], MPI.INFO_NULL.Dup) def testFree(self): self.assertRaisesMPI( [MPI.ERR_INFO, MPI.ERR_ARG], MPI.INFO_NULL.Free) def testGet(self): self.assertRaisesMPI( [MPI.ERR_INFO, MPI.ERR_ARG], MPI.INFO_NULL.Get, 'key') def testSet(self): self.assertRaisesMPI( [MPI.ERR_INFO, MPI.ERR_ARG], MPI.INFO_NULL.Set, 'key', 'value') def testDelete(self): self.assertRaisesMPI( [MPI.ERR_INFO, MPI.ERR_ARG], MPI.INFO_NULL.Delete, 'key') def testGetNKeys(self): self.assertRaisesMPI( [MPI.ERR_INFO, MPI.ERR_ARG], MPI.INFO_NULL.Get_nkeys) def testGetNthKey(self): self.assertRaisesMPI( [MPI.ERR_INFO, MPI.ERR_ARG], MPI.INFO_NULL.Get_nthkey, 0) class TestExcInfo(BaseTestCase): def setUp(self): super(TestExcInfo, self).setUp() self.INFO = MPI.Info.Create() def tearDown(self): self.INFO.Free() self.INFO = None super(TestExcInfo, self).tearDown() def testDelete(self): self.assertRaisesMPI( MPI.ERR_INFO_NOKEY, self.INFO.Delete, 'key') def testGetNthKey(self): self.assertRaisesMPI( [MPI.ERR_INFO_KEY, MPI.ERR_ARG], self.INFO.Get_nthkey, 0) try: MPI.Info.Create().Free() except NotImplementedError: unittest.disable(TestExcInfo, 'mpi-info') unittest.disable(TestExcInfoNull, 'mpi-info') # -------------------------------------------------------------------- class TestExcGroupNull(BaseTestCase): def testCompare(self): self.assertRaisesMPI( MPI.ERR_GROUP, MPI.Group.Compare, MPI.GROUP_NULL, MPI.GROUP_NULL) self.assertRaisesMPI( MPI.ERR_GROUP, MPI.Group.Compare, MPI.GROUP_NULL, MPI.GROUP_EMPTY) self.assertRaisesMPI( MPI.ERR_GROUP, MPI.Group.Compare, MPI.GROUP_EMPTY, MPI.GROUP_NULL) def testAccessors(self): for method in ('Get_size', 'Get_rank'): self.assertRaisesMPI( MPI.ERR_GROUP, getattr(MPI.GROUP_NULL, method)) class TestExcGroup(BaseTestCase): pass # -------------------------------------------------------------------- class TestExcCommNull(BaseTestCase): ERR_COMM = MPI.ERR_COMM def testCompare(self): self.assertRaisesMPI( self.ERR_COMM, MPI.Comm.Compare, MPI.COMM_NULL, MPI.COMM_NULL) self.assertRaisesMPI( self.ERR_COMM, MPI.Comm.Compare, MPI.COMM_SELF, MPI.COMM_NULL) self.assertRaisesMPI( self.ERR_COMM, MPI.Comm.Compare, MPI.COMM_WORLD, MPI.COMM_NULL) self.assertRaisesMPI( self.ERR_COMM, MPI.Comm.Compare, MPI.COMM_NULL, MPI.COMM_SELF) self.assertRaisesMPI( self.ERR_COMM, MPI.Comm.Compare, MPI.COMM_NULL, MPI.COMM_WORLD) def testAccessors(self): for method in ('Get_size', 'Get_rank', 'Is_inter', 'Is_intra', 'Get_group', 'Get_topology'): self.assertRaisesMPI(MPI.ERR_COMM, getattr(MPI.COMM_NULL, method)) def testFree(self): self.assertRaisesMPI(MPI.ERR_COMM, MPI.COMM_NULL.Free) def testDisconnect(self): try: self.assertRaisesMPI(MPI.ERR_COMM, MPI.COMM_NULL.Disconnect) except NotImplementedError: self.skipTest('mpi-comm-disconnect') @unittest.skipMPI('openmpi(<1.4.2)') def testGetAttr(self): self.assertRaisesMPI( MPI.ERR_COMM, MPI.COMM_NULL.Get_attr, MPI.TAG_UB) @unittest.skipMPI('openmpi(<1.4.1)') def testGetErrhandler(self): self.assertRaisesMPI( [MPI.ERR_COMM, MPI.ERR_ARG], MPI.COMM_NULL.Get_errhandler) def testSetErrhandler(self): self.assertRaisesMPI( MPI.ERR_COMM, MPI.COMM_NULL.Set_errhandler, MPI.ERRORS_RETURN) def testIntraNull(self): comm_null = MPI.Intracomm() self.assertRaisesMPI(MPI.ERR_COMM, comm_null.Dup) self.assertRaisesMPI(MPI.ERR_COMM, comm_null.Create, MPI.GROUP_EMPTY) self.assertRaisesMPI(MPI.ERR_COMM, comm_null.Split, color=0, key=0) def testInterNull(self): comm_null = MPI.Intercomm() self.assertRaisesMPI(MPI.ERR_COMM, comm_null.Get_remote_group) self.assertRaisesMPI(MPI.ERR_COMM, comm_null.Get_remote_size) self.assertRaisesMPI(MPI.ERR_COMM, comm_null.Dup) self.assertRaisesMPI(MPI.ERR_COMM, comm_null.Create, MPI.GROUP_EMPTY) self.assertRaisesMPI(MPI.ERR_COMM, comm_null.Split, color=0, key=0) self.assertRaisesMPI(MPI.ERR_COMM, comm_null.Merge, high=True) class TestExcComm(BaseTestCase): @unittest.skipMPI('MPICH1') def testFreeSelf(self): errhdl = MPI.COMM_SELF.Get_errhandler() try: MPI.COMM_SELF.Set_errhandler(MPI.ERRORS_RETURN) self.assertRaisesMPI( [MPI.ERR_COMM, MPI.ERR_ARG], MPI.COMM_SELF.Free) finally: MPI.COMM_SELF.Set_errhandler(errhdl) errhdl.Free() @unittest.skipMPI('MPICH1') def testFreeWorld(self): self.assertRaisesMPI( [MPI.ERR_COMM, MPI.ERR_ARG], MPI.COMM_WORLD.Free) def testKeyvalInvalid(self): self.assertRaisesMPI( [MPI.ERR_KEYVAL, MPI.ERR_OTHER], MPI.COMM_WORLD.Get_attr, MPI.KEYVAL_INVALID) # -------------------------------------------------------------------- class TestExcWinNull(BaseTestCase): def testFree(self): self.assertRaisesMPI( [MPI.ERR_WIN, MPI.ERR_ARG], MPI.WIN_NULL.Free) def testGetErrhandler(self): self.assertRaisesMPI( [MPI.ERR_WIN, MPI.ERR_ARG], MPI.WIN_NULL.Get_errhandler) def testSetErrhandler(self): self.assertRaisesMPI( [MPI.ERR_WIN, MPI.ERR_ARG], MPI.WIN_NULL.Set_errhandler, MPI.ERRORS_RETURN) def testCallErrhandler(self): self.assertRaisesMPI([MPI.ERR_WIN, MPI.ERR_ARG], MPI.WIN_NULL.Call_errhandler, 0) class TestExcWin(BaseTestCase): def setUp(self): super(TestExcWin, self).setUp() self.WIN = MPI.Win.Create(None, 1, MPI.INFO_NULL, MPI.COMM_SELF) self.WIN.Set_errhandler(MPI.ERRORS_RETURN) def tearDown(self): self.WIN.Free() self.WIN = None super(TestExcWin, self).tearDown() def testKeyvalInvalid(self): self.assertRaisesMPI( [MPI.ERR_KEYVAL, MPI.ERR_OTHER], self.WIN.Get_attr, MPI.KEYVAL_INVALID) SpectrumMPI = MPI.get_vendor()[0] == 'Spectrum MPI' try: if SpectrumMPI: raise NotImplementedError MPI.Win.Create(None, 1, MPI.INFO_NULL, MPI.COMM_SELF).Free() except (NotImplementedError, MPI.Exception): unittest.disable(TestExcWin, 'mpi-win') unittest.disable(TestExcWinNull, 'mpi-win') # -------------------------------------------------------------------- class TestExcErrhandlerNull(BaseTestCase): def testFree(self): self.assertRaisesMPI(MPI.ERR_ARG, MPI.ERRHANDLER_NULL.Free) def testCommSelfSetErrhandler(self): self.assertRaisesMPI( MPI.ERR_ARG, MPI.COMM_SELF.Set_errhandler, MPI.ERRHANDLER_NULL) def testCommWorldSetErrhandler(self): self.assertRaisesMPI( MPI.ERR_ARG, MPI.COMM_WORLD.Set_errhandler, MPI.ERRHANDLER_NULL) # class TestExcErrhandler(BaseTestCase): # # def testFreePredefined(self): # self.assertRaisesMPI(MPI.ERR_ARG, MPI.ERRORS_ARE_FATAL.Free) # self.assertRaisesMPI(MPI.ERR_ARG, MPI.ERRORS_RETURN.Free) # pass # -------------------------------------------------------------------- if __name__ == '__main__': unittest.main() # -------------------------------------------------------------------- mpi4py-3.0.3/test/test_objmodel.py0000644000175000017500000000725513200562156020171 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys class TestObjModel(unittest.TestCase): objects = [ MPI.Status(), MPI.DATATYPE_NULL, MPI.REQUEST_NULL, MPI.INFO_NULL, MPI.ERRHANDLER_NULL, MPI.GROUP_NULL, MPI.WIN_NULL, MPI.OP_NULL, MPI.FILE_NULL, MPI.MESSAGE_NULL, MPI.COMM_NULL, ] def testEq(self): for i, obj1 in enumerate(self.objects): objects = self.objects[:] obj2 = objects[i] self.assertTrue(obj1 == obj2) self.assertFalse(obj1 != obj2) del objects[i] for obj2 in objects: self.assertTrue(obj1 != obj2) self.assertTrue(obj2 != obj1) self.assertFalse(obj1 == obj2) self.assertFalse(obj2 == obj1) self.assertFalse(None == obj1 ) self.assertFalse(obj1 == None ) self.assertFalse(obj1 == True ) self.assertFalse(obj1 == False) self.assertFalse(obj1 == 12345) self.assertFalse(obj1 == "abc") self.assertFalse(obj1 == [123]) self.assertFalse(obj1 == (1,2)) self.assertFalse(obj1 == {0:0}) self.assertFalse(obj1 == set()) def testNe(self): for i, obj1 in enumerate(self.objects): objects = self.objects[:] obj2 = objects[i] self.assertFalse(obj1 != obj2) del objects[i] for obj2 in objects: self.assertTrue (obj1 != obj2) self.assertTrue(None != obj1 ) self.assertTrue(obj1 != None ) self.assertTrue(obj1 != True ) self.assertTrue(obj1 != False) self.assertTrue(obj1 != 12345) self.assertTrue(obj1 != "abc") self.assertTrue(obj1 != [123]) self.assertTrue(obj1 != (1,2)) self.assertTrue(obj1 != {0:0}) self.assertTrue(obj1 != set()) def testBool(self): for obj in self.objects[1:]: self.assertFalse(not not obj) self.assertTrue(not obj) self.assertFalse(obj) def testHash(self): try: hash(MPI.COMM_NULL) except TypeError: pass else: if hasattr(sys, 'pypy_version_info'): self.skipTest('pypy') for obj in self.objects: ob_hash = lambda: hash(obj) self.assertRaises(TypeError, ob_hash) def testInit(self): for i, obj in enumerate(self.objects): klass = type(obj) new = klass() self.assertEqual(new, obj) new = klass(obj) self.assertEqual(new, obj) objects = self.objects[:] del objects[i] for other in objects: ob_init = lambda: klass(other) self.assertRaises(TypeError, ob_init) ob_init = lambda: klass(1234) self.assertRaises(TypeError, ob_init) ob_init = lambda: klass("abc") self.assertRaises(TypeError, ob_init) def testSizeOf(self): for obj in self.objects: n1 = MPI._sizeof(obj) n2 = MPI._sizeof(type(obj)) self.assertEqual(n1, n2) def testAddressOf(self): for obj in self.objects: addr = MPI._addressof(obj) def testAHandleOf(self): for obj in self.objects: if isinstance(obj, MPI.Status): hdl = lambda: MPI._handleof(obj) self.assertRaises(NotImplementedError, hdl) continue hdl = MPI._handleof(obj) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_pack.py0000644000175000017500000001256213200562156017311 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl import struct class BaseTestPack(object): COMM = MPI.COMM_NULL def testPackSize(self): for array in arrayimpl.ArrayTypes: for typecode, datatype in arrayimpl.TypeMap.items(): itemsize = struct.calcsize(typecode) overhead = datatype.Pack_size(0, self.COMM) for count in range(10): pack_size = datatype.Pack_size(count, self.COMM) self.assertEqual(pack_size - overhead, count*itemsize) def testPackUnpack(self): for array in arrayimpl.ArrayTypes: for typecode1, datatype1 in arrayimpl.TypeMap.items(): for typecode2, datatype2 in arrayimpl.TypeMap.items(): for items in range(10): # input and output arrays iarray1 = array(range(items), typecode1).as_raw() iarray2 = array(range(items), typecode2).as_raw() oarray1 = array(items, typecode1, items).as_raw() oarray2 = array(items, typecode2, items).as_raw() # temp array for packing size1 = datatype1.Pack_size(len(iarray1), self.COMM) size2 = datatype2.Pack_size(len(iarray2), self.COMM) tmpbuf = array(0, 'b', size1 + size2 + 1).as_raw() # pack input arrays position = 0 position = datatype1.Pack(iarray1, tmpbuf, position, self.COMM) position = datatype2.Pack(iarray2, tmpbuf, position, self.COMM) # unpack output arrays position = 0 position = datatype1.Unpack(tmpbuf, position, oarray1, self.COMM) position = datatype2.Unpack(tmpbuf, position, oarray2, self.COMM) # test equal = arrayimpl.allclose self.assertTrue(equal(iarray1, oarray1)) self.assertTrue(equal(iarray2, oarray2)) EXT32 = 'external32' class BaseTestPackExternal(object): skipdtype = [] def testPackSize(self): for array in arrayimpl.ArrayTypes: for typecode, datatype in arrayimpl.TypeMap.items(): itemsize = struct.calcsize(typecode) overhead = datatype.Pack_external_size(EXT32, 0) for count in range(10): pack_size = datatype.Pack_external_size(EXT32, count) real_size = pack_size - overhead def testPackUnpackExternal(self): for array in arrayimpl.ArrayTypes: for typecode1, datatype1 in arrayimpl.TypeMap.items(): for typecode2, datatype2 in arrayimpl.TypeMap.items(): for items in range(1, 10): if typecode1 in self.skipdtype: continue if typecode2 in self.skipdtype: continue # input and output arrays if typecode1 == 'b': iarray1 = array(127, typecode1, items).as_raw() else: iarray1 = array(255, typecode1, items).as_raw() iarray2 = array(range(items), typecode2).as_raw() oarray1 = array(-1, typecode1, items).as_raw() oarray2 = array(-1, typecode2, items).as_raw() # temp array for packing size1 = datatype1.Pack_external_size(EXT32, iarray1.size) size2 = datatype2.Pack_external_size(EXT32, iarray2.size) tmpbuf = array(0, 'b', size1 + size2 + 1).as_raw() # pack input arrays position = 0 position = datatype1.Pack_external(EXT32, iarray1, tmpbuf, position) position = datatype2.Pack_external(EXT32, iarray2, tmpbuf, position) # unpack output arrays position = 0 position = datatype1.Unpack_external(EXT32, tmpbuf, position, oarray1) position = datatype2.Unpack_external(EXT32, tmpbuf, position, oarray2) # test result equal = arrayimpl.allclose self.assertTrue(equal(iarray1, oarray1)) self.assertTrue(equal(iarray2, oarray2)) class TestPackSelf(BaseTestPack, unittest.TestCase): COMM = MPI.COMM_SELF class TestPackWorld(BaseTestPack, unittest.TestCase): COMM = MPI.COMM_SELF @unittest.skipMPI('openmpi(<3.0.0)') class TestPackExternal(BaseTestPackExternal, unittest.TestCase): pass name, version = MPI.get_vendor() if name =='MPICH' or name == 'MPICH2': BaseTestPackExternal.skipdtype += ['l'] BaseTestPackExternal.skipdtype += ['d'] elif name == 'Intel MPI': BaseTestPackExternal.skipdtype += ['l'] BaseTestPackExternal.skipdtype += ['d'] elif name == 'MVAPICH2': BaseTestPackExternal.skipdtype += ['l'] BaseTestPackExternal.skipdtype += ['d'] else: try: MPI.BYTE.Pack_external_size(EXT32, 0) except NotImplementedError: unittest.disable(BaseTestPackExternal, 'mpi-ext32') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/spawn_child.py0000644000175000017500000000070512750576064017637 0ustar dalcinldalcinl00000000000000import sys; sys.path.insert(0, sys.argv[1]) import mpi4py if len(sys.argv) > 2: lfn = "runtests-mpi4py-child" mpe = sys.argv[2] == 'mpe' vt = sys.argv[2] == 'vt' if mpe: mpi4py.profile('mpe', logfile=lfn) if vt: mpi4py.profile('vt', logfile=lfn) from mpi4py import MPI parent = MPI.Comm.Get_parent() parent.Barrier() parent.Disconnect() assert parent == MPI.COMM_NULL parent = MPI.Comm.Get_parent() assert parent == MPI.COMM_NULL mpi4py-3.0.3/test/test_win.py0000664000175000017500000002062013426006675017175 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys try: sys.getrefcount except AttributeError: class getrefcount(object): def __init__(self, arg): pass def __eq__(self, other): return True def __add__(self, other): return self def __sub__(self, other): return self def memzero(m): try: m[:] = 0 except IndexError: # cffi buffer m[0:len(m)] = b'\0'*len(m) class BaseTestWin(object): COMM = MPI.COMM_NULL INFO = MPI.INFO_NULL CREATE_FLAVOR = MPI.UNDEFINED def testGetAttr(self): base = MPI.Get_address(self.memory) size = len(self.memory) unit = 1 self.assertEqual(size, self.WIN.Get_attr(MPI.WIN_SIZE)) self.assertEqual(unit, self.WIN.Get_attr(MPI.WIN_DISP_UNIT)) self.assertEqual(base, self.WIN.Get_attr(MPI.WIN_BASE)) def testMemory(self): memory = self.WIN.tomemory() pointer = MPI.Get_address(memory) length = len(memory) base, size, dunit = self.WIN.attrs self.assertEqual(size, length) self.assertEqual(dunit, 1) self.assertEqual(base, pointer) def testAttributes(self): base, size, unit = self.WIN.attrs self.assertEqual(base, MPI.Get_address(self.memory)) self.assertEqual(size, len(self.memory)) self.assertEqual(unit, 1) def testGetGroup(self): cgroup = self.COMM.Get_group() wgroup = self.WIN.Get_group() grpcmp = MPI.Group.Compare(cgroup, wgroup) cgroup.Free() wgroup.Free() self.assertEqual(grpcmp, MPI.IDENT) def testGetSetInfo(self): #info = MPI.INFO_NULL #self.WIN.Set_info(info) info = MPI.Info.Create() self.WIN.Set_info(info) info.Free() info = self.WIN.Get_info() self.WIN.Set_info(info) info.Free() def testGetSetErrhandler(self): for ERRHANDLER in [MPI.ERRORS_ARE_FATAL, MPI.ERRORS_RETURN, MPI.ERRORS_ARE_FATAL, MPI.ERRORS_RETURN,]: errhdl_1 = self.WIN.Get_errhandler() self.assertNotEqual(errhdl_1, MPI.ERRHANDLER_NULL) self.WIN.Set_errhandler(ERRHANDLER) errhdl_2 = self.WIN.Get_errhandler() self.assertEqual(errhdl_2, ERRHANDLER) errhdl_2.Free() self.assertEqual(errhdl_2, MPI.ERRHANDLER_NULL) self.WIN.Set_errhandler(errhdl_1) errhdl_1.Free() self.assertEqual(errhdl_1, MPI.ERRHANDLER_NULL) def testGetSetName(self): try: name = self.WIN.Get_name() self.WIN.Set_name('mywin') self.assertEqual(self.WIN.Get_name(), 'mywin') self.WIN.Set_name(name) self.assertEqual(self.WIN.Get_name(), name) except NotImplementedError: self.skipTest('mpi-win-name') @unittest.skipIf(MPI.WIN_CREATE_FLAVOR == MPI.KEYVAL_INVALID, 'mpi-win-flavor') def testCreateFlavor(self): flavors = (MPI.WIN_FLAVOR_CREATE, MPI.WIN_FLAVOR_ALLOCATE, MPI.WIN_FLAVOR_DYNAMIC, MPI.WIN_FLAVOR_SHARED,) flavor = self.WIN.Get_attr(MPI.WIN_CREATE_FLAVOR) self.assertTrue (flavor in flavors) self.assertEqual(flavor, self.WIN.flavor) self.assertEqual(flavor, self.CREATE_FLAVOR) @unittest.skipIf(MPI.WIN_MODEL == MPI.KEYVAL_INVALID, 'mpi-win-model') def testMemoryModel(self): models = (MPI.WIN_SEPARATE, MPI.WIN_UNIFIED) model = self.WIN.Get_attr(MPI.WIN_MODEL) self.assertTrue(model in models) self.assertEqual(model, self.WIN.model) class BaseTestWinCreate(BaseTestWin): CREATE_FLAVOR = MPI.WIN_FLAVOR_CREATE def setUp(self): self.memory = MPI.Alloc_mem(10) memzero(self.memory) self.WIN = MPI.Win.Create(self.memory, 1, self.INFO, self.COMM) def tearDown(self): self.WIN.Free() MPI.Free_mem(self.memory) class BaseTestWinAllocate(BaseTestWin): CREATE_FLAVOR = MPI.WIN_FLAVOR_ALLOCATE def setUp(self): self.WIN = MPI.Win.Allocate(10, 1, self.INFO, self.COMM) self.memory = self.WIN.tomemory() memzero(self.memory) def tearDown(self): self.WIN.Free() class BaseTestWinAllocateShared(BaseTestWin): CREATE_FLAVOR = MPI.WIN_FLAVOR_SHARED def setUp(self): self.WIN = MPI.Win.Allocate_shared(10, 1, self.INFO, self.COMM) self.memory = self.WIN.tomemory() memzero(self.memory) def tearDown(self): self.WIN.Free() def testSharedQuery(self): memory = self.WIN.tomemory() address = MPI.Get_address(memory) length = len(memory) memories = self.COMM.allgather((address, length)) rank = self.COMM.Get_rank() size = self.COMM.Get_size() for i in range(size): mem, disp = self.WIN.Shared_query(rank) base = MPI.Get_address(mem) size = len(mem) if i == rank: self.assertEqual(base, memories[i][0]) self.assertEqual(size, memories[i][1]) self.assertEqual(disp, 1) class BaseTestWinCreateDynamic(BaseTestWin): CREATE_FLAVOR = MPI.WIN_FLAVOR_DYNAMIC def setUp(self): self.WIN = MPI.Win.Create_dynamic(self.INFO, self.COMM) def tearDown(self): self.WIN.Free() def testGetAttr(self): base = self.WIN.Get_attr(MPI.WIN_BASE) size = self.WIN.Get_attr(MPI.WIN_SIZE) self.assertEqual(base, 0) self.assertEqual(size, 0) def testMemory(self): memory = self.WIN.tomemory() base = memory.address size = memory.nbytes self.assertEqual(base, 0) self.assertEqual(size, 0) def testAttributes(self): base, size, _ = self.WIN.attrs self.assertEqual(base, 0) self.assertEqual(size, 0) @unittest.skipMPI('msmpi(<9.1.0)') def testAttachDetach(self): mem1 = MPI.Alloc_mem(8) mem2 = MPI.Alloc_mem(16) mem3 = MPI.Alloc_mem(32) for mem in (mem1, mem2, mem3): self.WIN.Attach(mem) self.testMemory() self.WIN.Detach(mem) for mem in (mem1, mem2, mem3): self.WIN.Attach(mem) self.testMemory() for mem in (mem1, mem2, mem3): self.WIN.Detach(mem) for mem in (mem1, mem2, mem3): self.WIN.Attach(mem) self.testMemory() for mem in (mem3, mem2, mem1): self.WIN.Detach(mem) MPI.Free_mem(mem1) MPI.Free_mem(mem2) MPI.Free_mem(mem3) class TestWinCreateSelf(BaseTestWinCreate, unittest.TestCase): COMM = MPI.COMM_SELF @unittest.skipMPI('openmpi(<1.4.0)') class TestWinCreateWorld(BaseTestWinCreate, unittest.TestCase): COMM = MPI.COMM_WORLD class TestWinAllocateSelf(BaseTestWinAllocate, unittest.TestCase): COMM = MPI.COMM_SELF @unittest.skipMPI('openmpi(<1.4.0)') class TestWinAllocateWorld(BaseTestWinAllocate, unittest.TestCase): COMM = MPI.COMM_WORLD class TestWinAllocateSharedSelf(BaseTestWinAllocateShared, unittest.TestCase): COMM = MPI.COMM_SELF class TestWinAllocateSharedWorld(BaseTestWinAllocateShared, unittest.TestCase): COMM = MPI.COMM_WORLD class TestWinCreateDynamicSelf(BaseTestWinCreateDynamic, unittest.TestCase): COMM = MPI.COMM_SELF class TestWinCreateDynamicWorld(BaseTestWinCreateDynamic, unittest.TestCase): COMM = MPI.COMM_WORLD SpectrumMPI = MPI.get_vendor()[0] == 'Spectrum MPI' try: if SpectrumMPI: raise NotImplementedError MPI.Win.Create(MPI.BOTTOM, 1, MPI.INFO_NULL, MPI.COMM_SELF).Free() except (NotImplementedError, MPI.Exception): unittest.disable(BaseTestWinCreate, 'mpi-win-create') try: if SpectrumMPI: raise NotImplementedError MPI.Win.Allocate(1, 1, MPI.INFO_NULL, MPI.COMM_SELF).Free() except (NotImplementedError, MPI.Exception): unittest.disable(BaseTestWinAllocate, 'mpi-win-allocate') try: if SpectrumMPI: raise NotImplementedError MPI.Win.Allocate_shared(1, 1, MPI.INFO_NULL, MPI.COMM_SELF).Free() except (NotImplementedError, MPI.Exception): unittest.disable(BaseTestWinAllocateShared, 'mpi-win-shared') try: if SpectrumMPI: raise NotImplementedError MPI.Win.Create_dynamic(MPI.INFO_NULL, MPI.COMM_SELF).Free() except (NotImplementedError, MPI.Exception): unittest.disable(BaseTestWinCreateDynamic, 'mpi-win-dynamic') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_memory.py0000664000175000017500000002065313426006675017716 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys try: from array import array except ImportError: array = None pypy_lt_58 = (hasattr(sys, 'pypy_version_info') and sys.pypy_version_info < (5, 8)) class TestMemory(unittest.TestCase): def testNewEmpty(self): memory = MPI.memory mem = memory() self.assertEqual(mem.address, 0) self.assertEqual(mem.nbytes, 0) self.assertFalse(mem.readonly) self.assertEqual(len(mem), 0) mem[:] = 0 mem[:] = memory() if sys.version_info < (3,0): b = buffer(mem) self.assertEqual(len(b), 0) if sys.version_info >= (2,7): m = memoryview(mem) self.assertEqual(m.format, 'B') self.assertEqual(m.itemsize, 1) self.assertEqual(m.ndim, 1) if not pypy_lt_58: self.assertEqual(m.readonly, False) self.assertEqual(m.shape, (0,)) self.assertEqual(m.strides, (1,)) self.assertEqual(m.tobytes(), b"") self.assertEqual(m.tolist(), []) mem.release() self.assertEqual(mem.address, 0) self.assertEqual(mem.nbytes, 0) self.assertFalse(mem.readonly) def testFromBufferBytes(self): memory = MPI.memory mem = memory.frombuffer(b"abc", readonly=True) self.assertNotEqual(mem.address, 0) self.assertEqual(mem.nbytes, 3) self.assertTrue(mem.readonly) self.assertEqual(len(mem), 3) if sys.version_info < (3,0): b = buffer(mem) self.assertEqual(len(b), 3) if sys.version_info >= (2,7): m = memoryview(mem) self.assertEqual(m.format, 'B') self.assertEqual(m.itemsize, 1) self.assertEqual(m.ndim, 1) if not pypy_lt_58: self.assertEqual(m.readonly, True) self.assertEqual(m.shape, (3,)) self.assertEqual(m.strides, (1,)) self.assertEqual(m.tobytes(), b"abc") self.assertEqual(m.tolist(), [ord(c) for c in "abc"]) mem.release() self.assertEqual(mem.address, 0) self.assertEqual(mem.nbytes, 0) self.assertFalse(mem.readonly) @unittest.skipIf(array is None, 'array') def testFromBufferArrayRO(self): memory = MPI.memory obj = array('B', [1,2,3]) mem = memory.frombuffer(obj, readonly=True) self.assertNotEqual(mem.address, 0) self.assertEqual(mem.nbytes, 3) self.assertTrue(mem.readonly) self.assertEqual(len(mem), 3) if sys.version_info < (3,0): b = buffer(mem) self.assertEqual(len(b), 3) if sys.version_info >= (2,7): m = memoryview(mem) self.assertEqual(m.format, 'B') self.assertEqual(m.itemsize, 1) self.assertEqual(m.ndim, 1) if not pypy_lt_58: self.assertEqual(m.readonly, True) self.assertEqual(m.shape, (3,)) self.assertEqual(m.strides, (1,)) self.assertEqual(m.tobytes(), b"\1\2\3") self.assertEqual(m.tolist(), [1,2,3]) mem.release() self.assertEqual(mem.address, 0) self.assertEqual(mem.nbytes, 0) self.assertFalse(mem.readonly) @unittest.skipIf(array is None, 'array') def testFromBufferArrayRW(self): memory = MPI.memory obj = array('B', [1,2,3]) mem = memory.frombuffer(obj, readonly=False) self.assertNotEqual(mem.address, 0) self.assertEqual(mem.nbytes, 3) self.assertFalse(mem.readonly) self.assertEqual(len(mem), 3) if sys.version_info < (3,0): b = buffer(mem) self.assertEqual(len(b), 3) if sys.version_info >= (2,7): m = memoryview(mem) self.assertEqual(m.format, 'B') self.assertEqual(m.itemsize, 1) self.assertEqual(m.ndim, 1) if not pypy_lt_58: self.assertEqual(m.readonly, False) self.assertEqual(m.shape, (3,)) self.assertEqual(m.strides, (1,)) self.assertEqual(m.tobytes(), b"\1\2\3") self.assertEqual(m.tolist(), [1,2,3]) mem[:] = 1 self.assertEqual(obj, array('B', [1]*3)) mem[1:] = array('B', [7]*2) self.assertEqual(obj, array('B', [1,7,7])) mem[1:2] = array('B', [8]*1) self.assertEqual(obj, array('B', [1,8,7])) mem.release() self.assertEqual(mem.address, 0) self.assertEqual(mem.nbytes, 0) self.assertFalse(mem.readonly) @unittest.skipIf(array is None, 'array') def testFromAddress(self): memory = MPI.memory obj = array('B', [1,2,3]) addr, size = obj.buffer_info() nbytes = size * obj.itemsize mem = memory.fromaddress(addr, nbytes, readonly=False) self.assertNotEqual(mem.address, 0) self.assertEqual(mem.nbytes, 3) self.assertFalse(mem.readonly) self.assertEqual(len(mem), 3) if sys.version_info < (3,0): b = buffer(mem) self.assertEqual(len(b), 3) if sys.version_info >= (2,7): m = memoryview(mem) self.assertEqual(m.format, 'B') self.assertEqual(m.itemsize, 1) self.assertEqual(m.ndim, 1) if not pypy_lt_58: self.assertEqual(m.readonly, False) self.assertEqual(m.shape, (3,)) self.assertEqual(m.strides, (1,)) self.assertEqual(m.tobytes(), b"\1\2\3") self.assertEqual(m.tolist(), [1,2,3]) mem[:] = 1 self.assertEqual(obj, array('B', [1]*3)) mem[1:] = array('B', [7]*2) self.assertEqual(obj, array('B', [1,7,7])) mem[1:2] = array('B', [8]*1) self.assertEqual(obj, array('B', [1,8,7])) mem.release() self.assertEqual(mem.address, 0) self.assertEqual(mem.nbytes, 0) self.assertFalse(mem.readonly) def testSequence(self): n = 16 try: mem = MPI.Alloc_mem(n, MPI.INFO_NULL) except NotImplementedError: self.skipTest('mpi-alloc_mem') try: self.assertTrue(type(mem) is MPI.memory) self.assertTrue(mem.address != 0) self.assertEqual(mem.nbytes, n) self.assertFalse(mem.readonly) self.assertEqual(len(mem), n) def delitem(): del mem[n] def getitem1(): return mem[n] def getitem2(): return mem[::2] def getitem3(): return mem[None] def setitem1(): mem[n] = 0 def setitem2(): mem[::2] = 0 def setitem3(): mem[None] = 0 self.assertRaises(Exception, delitem) self.assertRaises(IndexError, getitem1) self.assertRaises(IndexError, getitem2) self.assertRaises(TypeError, getitem3) self.assertRaises(IndexError, setitem1) self.assertRaises(IndexError, setitem2) self.assertRaises(TypeError, setitem3) for i in range(n): mem[i] = i for i in range(n): self.assertEqual(mem[i], i) mem[:] = 0 for i in range(n): self.assertEqual(mem[i], 0) mem[:] = 255 for i in range(n): self.assertEqual(mem[i], 255) mem[:n//2] = 1 mem[n//2:] = 0 for i in range(n//2): self.assertEqual(mem[i], 1) for i in range(n//2, n): self.assertEqual(mem[i], 0) mem[:] = 0 mem[1:5] = b"abcd" mem[10:13] = b"xyz" self.assertEqual(mem[0], 0) for i, c in enumerate("abcd"): self.assertEqual(mem[1+i], ord(c)) for i in range(5, 10): self.assertEqual(mem[i], 0) for i, c in enumerate("xyz"): self.assertEqual(mem[10+i], ord(c)) for i in range(13, n): self.assertEqual(mem[i], 0) self.assertEqual(mem[1:5].tobytes(), b"abcd") self.assertEqual(mem[10:13].tobytes(), b"xyz") finally: MPI.Free_mem(mem) self.assertEqual(mem.address, 0) self.assertEqual(mem.nbytes, 0) self.assertFalse(mem.readonly) try: MPI.memory except AttributeError: unittest.disable(TestMemory, 'mpi4py-memory') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_datatype.py0000644000175000017500000003626713200562156020216 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys datatypes_c = [ MPI.CHAR, MPI.WCHAR, MPI.SIGNED_CHAR, MPI.SHORT, MPI.INT, MPI.LONG, MPI.UNSIGNED_CHAR, MPI.UNSIGNED_SHORT, MPI.UNSIGNED, MPI.UNSIGNED_LONG, MPI.LONG_LONG, MPI.UNSIGNED_LONG_LONG, MPI.FLOAT, MPI.DOUBLE, MPI.LONG_DOUBLE, ] datatypes_c99 = [ MPI.C_BOOL, MPI.INT8_T, MPI.INT16_T, MPI.INT32_T, MPI.INT64_T, MPI.UINT8_T, MPI.UINT16_T, MPI.UINT32_T, MPI.UINT64_T, MPI.C_COMPLEX, MPI.C_FLOAT_COMPLEX, MPI.C_DOUBLE_COMPLEX, MPI.C_LONG_DOUBLE_COMPLEX, ] datatypes_f = [ MPI.CHARACTER, MPI.LOGICAL, MPI.INTEGER, MPI.REAL, MPI.DOUBLE_PRECISION, MPI.COMPLEX, MPI.DOUBLE_COMPLEX, ] datatypes_f90 = [ MPI.LOGICAL1, MPI.LOGICAL2, MPI.LOGICAL4, MPI.LOGICAL8, MPI.INTEGER1, MPI.INTEGER2, MPI.INTEGER4, MPI.INTEGER8, MPI.INTEGER16, MPI.REAL2, MPI.REAL4, MPI.REAL8, MPI.REAL16, MPI.COMPLEX4, MPI.COMPLEX8, MPI.COMPLEX16, MPI.COMPLEX32, ] datatypes_mpi = [ MPI.PACKED, MPI.BYTE, MPI.AINT, MPI.OFFSET, ] datatypes = [] datatypes += datatypes_c datatypes += datatypes_c99 datatypes += datatypes_f datatypes += datatypes_f90 datatypes += datatypes_mpi datatypes = [t for t in datatypes if t != MPI.DATATYPE_NULL] combiner_map = {} class TestDatatype(unittest.TestCase): def testBoolEqNe(self): for dtype in datatypes: self.assertTrue (not not dtype) self.assertTrue (dtype == MPI.Datatype(dtype)) self.assertFalse(dtype != MPI.Datatype(dtype)) def testGetExtent(self): for dtype in datatypes: lb, ext = dtype.Get_extent() self.assertEqual(dtype.lb, lb) self.assertEqual(dtype.ub, lb+ext) self.assertEqual(dtype.extent, ext) def testGetSize(self): for dtype in datatypes: size = dtype.Get_size() self.assertTrue(dtype.size, size) def testGetTrueExtent(self): for dtype in datatypes: try: lb, ext = dtype.Get_true_extent() self.assertEqual(dtype.true_lb, lb) self.assertEqual(dtype.true_ub, lb+ext) self.assertEqual(dtype.true_extent, ext) except NotImplementedError: self.skipTest('mpi-type-get_true_extent') def testGetEnvelope(self): for dtype in datatypes: try: envelope = dtype.Get_envelope() except NotImplementedError: self.skipTest('mpi-type-get_envelope') if ('LAM/MPI' == MPI.get_vendor()[0] and "COMPLEX" in dtype.name): continue ni, na, nd, combiner = envelope self.assertEqual(combiner, MPI.COMBINER_NAMED) self.assertEqual(ni, 0) self.assertEqual(na, 0) self.assertEqual(nd, 0) self.assertEqual(dtype.envelope, envelope) self.assertEqual(dtype.combiner, combiner) self.assertTrue(dtype.is_named) self.assertTrue(dtype.is_predefined) otype = dtype.decode() self.assertTrue(dtype is otype) def check_datatype_contents(self, oldtype, factory, newtype): try: envelope = newtype.Get_envelope() contents = newtype.Get_contents() except NotImplementedError: self.skipTest('mpi-type-get_envelope') ni, na, nd, combiner = envelope i, a, d = contents self.assertEqual(ni, len(i)) self.assertEqual(na, len(a)) self.assertEqual(nd, len(d)) self.assertTrue(combiner != MPI.COMBINER_NAMED) self.assertEqual(newtype.envelope, envelope) self.assertEqual(newtype.contents, contents) self.assertEqual(newtype.combiner, combiner) self.assertFalse(newtype.is_named) if combiner in (MPI.COMBINER_F90_INTEGER, MPI.COMBINER_F90_REAL, MPI.COMBINER_F90_COMPLEX,): self.assertTrue(newtype.is_predefined) else: self.assertFalse(newtype.is_predefined) name = factory.__name__ NAME = name.replace('Create_', '').upper() symbol = getattr(MPI, 'COMBINER_' + NAME) if symbol == MPI.UNDEFINED: return if combiner_map is None: return symbol = combiner_map.get(symbol, symbol) if symbol is None: return self.assertEqual(symbol, combiner) decoded = newtype.decode() oldtype, constructor, kargs = decoded constructor = 'Create_' + constructor.lower() newtype2 = getattr(oldtype, constructor)(**kargs) decoded2 = newtype2.decode() self.assertEqual(decoded[1], decoded2[1]) self.assertEqual(decoded[2], decoded2[2]) if combiner not in (MPI.COMBINER_F90_INTEGER, MPI.COMBINER_F90_REAL, MPI.COMBINER_F90_COMPLEX,): self.assertFalse(newtype2.is_predefined) newtype2.Free() else: self.assertTrue(newtype2.is_predefined) def check_datatype(self, oldtype, factory, *args): try: if isinstance(oldtype, MPI.Datatype): newtype = factory(oldtype, *args) else: newtype = factory(*args) except NotImplementedError: self.skipTest('mpi-type-constructor') self.check_datatype_contents(oldtype, factory, newtype) newtype.Commit() self.check_datatype_contents(oldtype, factory, newtype) combiner = newtype.Get_envelope()[-1] if combiner not in (MPI.COMBINER_F90_INTEGER, MPI.COMBINER_F90_REAL, MPI.COMBINER_F90_COMPLEX,): newtype.Free() def testDup(self): for dtype in datatypes: factory = MPI.Datatype.Dup self.check_datatype(dtype, factory) def testCreateContiguous(self): for dtype in datatypes: for count in range(5): factory = MPI.Datatype.Create_contiguous args = (count, ) self.check_datatype(dtype, factory, *args) def testCreateVector(self): for dtype in datatypes: for count in range(5): for blocklength in range(5): for stride in range(5): factory = MPI.Datatype.Create_vector args = (count, blocklength, stride) self.check_datatype(dtype, factory, *args) def testCreateHvector(self): for dtype in datatypes: for count in range(5): for blocklength in range(5): for stride in range(5): factory = MPI.Datatype.Create_hvector args = (count, blocklength, stride) self.check_datatype(dtype, factory, *args) def testCreateIndexed(self): for dtype in datatypes: for block in range(5): blocklengths = list(range(block, block+5)) displacements = [0] for b in blocklengths[:-1]: stride = displacements[-1] + b * dtype.extent + 1 displacements.append(stride) factory = MPI.Datatype.Create_indexed args = (blocklengths, displacements) self.check_datatype(dtype, factory, *args) #args = (block, displacements) XXX #self.check_datatype(dtype, factory, *args) XXX def testCreateIndexedBlock(self): for dtype in datatypes: for block in range(5): blocklengths = list(range(block, block+5)) displacements = [0] for b in blocklengths[:-1]: stride = displacements[-1] + b * dtype.extent + 1 displacements.append(stride) factory = MPI.Datatype.Create_indexed_block args = (block, displacements) self.check_datatype(dtype, factory, *args) def testCreateHindexed(self): for dtype in datatypes: for block in range(5): blocklengths = list(range(block, block+5)) displacements = [0] for b in blocklengths[:-1]: stride = displacements[-1] + b * dtype.extent + 1 displacements.append(stride) factory = MPI.Datatype.Create_hindexed args = (blocklengths, displacements) self.check_datatype(dtype, factory, *args) #args = (block, displacements) XXX #self.check_datatype(dtype, factory, *args) XXX @unittest.skipMPI('openmpi(<=1.8.1)', MPI.VERSION == 3) def testCreateHindexedBlock(self): for dtype in datatypes: for block in range(5): displacements = [0] for i in range(5): stride = displacements[-1] + block * dtype.extent + 1 displacements.append(stride) factory = MPI.Datatype.Create_hindexed_block args = (block, displacements) self.check_datatype(dtype, factory, *args) def testCreateStruct(self): for dtype1 in datatypes: for dtype2 in datatypes: dtypes = (dtype1, dtype2) blocklengths = (2, 3) displacements = [0] for dtype in dtypes[:-1]: stride = displacements[-1] + dtype.extent displacements.append(stride) factory = MPI.Datatype.Create_struct args = (blocklengths, displacements, dtypes) self.check_datatype(dtypes, factory, *args) def testCreateSubarray(self): for dtype in datatypes: for ndim in range(1, 5): for size in range(1, 5): for subsize in range(1, size): for start in range(size-subsize): for order in [MPI.ORDER_C, MPI.ORDER_FORTRAN, MPI.ORDER_F, ]: sizes = [size] * ndim subsizes = [subsize] * ndim starts = [start] * ndim factory = MPI.Datatype.Create_subarray args = sizes, subsizes, starts, order self.check_datatype(dtype, factory, *args) def testCreateDarray(self): for dtype in datatypes: for ndim in range(1, 3+1): for size in (4, 8, 9, 27): for rank in (0, size-1): for dist in [MPI.DISTRIBUTE_BLOCK, MPI.DISTRIBUTE_CYCLIC]: for order in [MPI.ORDER_C, MPI.ORDER_F]: gsizes = [size]*ndim distribs = [dist]*ndim dargs = [MPI.DISTRIBUTE_DFLT_DARG]*ndim psizes = MPI.Compute_dims(size, [0]*ndim) factory = MPI.Datatype.Create_darray args = size, rank, gsizes, distribs, dargs, psizes, order self.check_datatype(dtype, factory, *args) def testCreateF90Integer(self): for r in (1, 2, 4): factory = MPI.Datatype.Create_f90_integer args = (r,) self.check_datatype(None, factory, *args) @unittest.skipMPI('openmpi(<3.0.0)') @unittest.skipMPI('msmpi') @unittest.skipMPI('SpectrumMPI') def testCreateF90RealSingle(self): (p, r) = (6, 30) factory = MPI.Datatype.Create_f90_real args = (p, r) self.check_datatype(None, factory, *args) @unittest.skipMPI('openmpi(<3.0.0)') @unittest.skipMPI('msmpi') @unittest.skipMPI('SpectrumMPI') def testCreateF90RealDouble(self): (p, r) = (15, 300) factory = MPI.Datatype.Create_f90_real args = (p, r) self.check_datatype(None, factory, *args) @unittest.skipMPI('openmpi(<3.0.0)') @unittest.skipMPI('msmpi') @unittest.skipMPI('SpectrumMPI') def testCreatef90ComplexSingle(self): (p, r) = (6, 30) factory = MPI.Datatype.Create_f90_complex args = (p, r) self.check_datatype(None, factory, *args) @unittest.skipMPI('openmpi(<3.0.0)') @unittest.skipMPI('msmpi') @unittest.skipMPI('SpectrumMPI') def testCreateF90ComplexDouble(self): (p, r) = (15, 300) factory = MPI.Datatype.Create_f90_complex args = (p, r) self.check_datatype(None, factory, *args) match_size_integer = [1, 2, 4, 8] match_size_real = [4, 8] match_size_complex = [8, 16] @unittest.skipMPI('MPI(<2.0)') @unittest.skipMPI('openmpi', MPI.CHARACTER.Get_size() == 0) def testMatchSize(self): typeclass = MPI.TYPECLASS_INTEGER for size in self.match_size_integer: datatype = MPI.Datatype.Match_size(typeclass, size) self.assertEqual(size, datatype.size) typeclass = MPI.TYPECLASS_REAL for size in self.match_size_real: datatype = MPI.Datatype.Match_size(typeclass, size) self.assertEqual(size, datatype.size) typeclass = MPI.TYPECLASS_COMPLEX for size in self.match_size_complex: datatype = MPI.Datatype.Match_size(typeclass, size) self.assertEqual(size, datatype.size) def testCreateResized(self): for dtype in datatypes: for lb in range(-10, 10): for extent in range(1, 10): factory = MPI.Datatype.Create_resized args = lb, extent self.check_datatype(dtype, factory, *args) def testGetSetName(self): for dtype in datatypes: try: name = dtype.Get_name() self.assertTrue(name) dtype.Set_name(name) self.assertEqual(name, dtype.Get_name()) except NotImplementedError: self.skipTest('mpi-type-name') def testCommit(self): for dtype in datatypes: dtype.Commit() name, version = MPI.get_vendor() if name == 'LAM/MPI': combiner_map[MPI.COMBINER_INDEXED_BLOCK] = MPI.COMBINER_INDEXED elif name == 'MPICH1': combiner_map[MPI.COMBINER_VECTOR] = None combiner_map[MPI.COMBINER_HVECTOR] = None combiner_map[MPI.COMBINER_INDEXED] = None combiner_map[MPI.COMBINER_HINDEXED_BLOCK] = None for t in datatypes_f: datatypes.remove(t) elif MPI.Get_version() < (2,0): combiner_map = None if name == 'Open MPI': if MPI.CHARACTER.Get_size() == 0: for dtype in datatypes_f + datatypes_f90: if dtype and dtype in datatypes: datatypes.remove(dtype) if (1,6,0) < version < (1,7,0): TestDatatype.match_size_complex[:] = [] if version < (1,5,2): for t in datatypes_f90[-4:]: if t != MPI.DATATYPE_NULL: datatypes.remove(t) if name == 'Platform MPI': combiner_map[MPI.COMBINER_INDEXED_BLOCK] = MPI.COMBINER_INDEXED combiner_map[MPI.COMBINER_DARRAY] = MPI.COMBINER_STRUCT combiner_map[MPI.COMBINER_SUBARRAY] = MPI.COMBINER_STRUCT TestDatatype.match_size_complex[:] = [] if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_group.py0000644000175000017500000001414713200562156017530 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class BaseTestGroup(object): def testProperties(self): group = self.GROUP self.assertEqual(group.Get_size(), group.size) self.assertEqual(group.Get_rank(), group.rank) def testCompare(self): results = (MPI.IDENT, MPI.SIMILAR, MPI.UNEQUAL) group = MPI.COMM_WORLD.Get_group() gcmp = MPI.Group.Compare(self.GROUP, group) group.Free() self.assertTrue(gcmp in results) gcmp = MPI.Group.Compare(self.GROUP, self.GROUP) self.assertEqual(gcmp, MPI.IDENT) def testDup(self): group = self.GROUP.Dup() self.assertEqual(MPI.Group.Compare(group, self.GROUP), MPI.IDENT) group.Free() def testUnion(self): group = MPI.Group.Union(MPI.GROUP_EMPTY, self.GROUP) self.assertEqual(MPI.Group.Compare(group, self.GROUP), MPI.IDENT) group.Free() group = MPI.Group.Union(self.GROUP, MPI.GROUP_EMPTY) self.assertEqual(MPI.Group.Compare(group, self.GROUP), MPI.IDENT) group.Free() group = MPI.Group.Union(self.GROUP, self.GROUP) self.assertEqual(MPI.Group.Compare(group, self.GROUP), MPI.IDENT) group.Free() def testDifference(self): group = MPI.Group.Difference(MPI.GROUP_EMPTY, self.GROUP) self.assertEqual(MPI.Group.Compare(group, MPI.GROUP_EMPTY), MPI.IDENT) group.Free() group = MPI.Group.Difference(self.GROUP, MPI.GROUP_EMPTY) self.assertEqual(MPI.Group.Compare(group, self.GROUP), MPI.IDENT) group.Free() group = MPI.Group.Difference(self.GROUP, self.GROUP) self.assertEqual(MPI.Group.Compare(group, MPI.GROUP_EMPTY), MPI.IDENT) group.Free() def testIntersection(self): group = MPI.Group.Intersection(MPI.GROUP_EMPTY, self.GROUP) self.assertEqual(MPI.Group.Compare(group, MPI.GROUP_EMPTY), MPI.IDENT) group.Free() group = MPI.Group.Intersection(self.GROUP, MPI.GROUP_EMPTY) self.assertEqual(MPI.Group.Compare(group, MPI.GROUP_EMPTY), MPI.IDENT) group.Free() group = MPI.Group.Intersection(self.GROUP, self.GROUP) self.assertEqual(MPI.Group.Compare(group, self.GROUP), MPI.IDENT) group.Free() def testIncl(self): group = self.GROUP.Incl([]) self.assertEqual(MPI.Group.Compare(group, MPI.GROUP_EMPTY), MPI.IDENT) group.Free() def testExcl(self): group = self.GROUP.Excl([]) self.assertEqual(MPI.Group.Compare(group, self.GROUP), MPI.IDENT) group.Free() def testRangeIncl(self): if self.GROUP == MPI.GROUP_EMPTY: return group = self.GROUP.Range_incl([]) self.assertEqual(MPI.Group.Compare(group, MPI.GROUP_EMPTY), MPI.IDENT) group.Free() ranges = [ (0, self.GROUP.Get_size()-1, 1), ] group = self.GROUP.Range_incl(ranges) self.assertEqual(MPI.Group.Compare(group, self.GROUP), MPI.IDENT) group.Free() def testRangeExcl(self): if self.GROUP == MPI.GROUP_EMPTY: return group = self.GROUP.Range_excl([]) self.assertEqual(MPI.Group.Compare(group, self.GROUP), MPI.IDENT) group.Free() ranges = [ (0, self.GROUP.Get_size()-1, 1), ] group = self.GROUP.Range_excl(ranges) self.assertEqual(MPI.Group.Compare(group, MPI.GROUP_EMPTY), MPI.IDENT) group.Free() def testTranslRanks(self): group1 = self.GROUP group2 = self.GROUP ranks1 = list(range(group1.Get_size())) * 3 ranks2 = MPI.Group.Translate_ranks(group1, ranks1) ranks2 = MPI.Group.Translate_ranks(group1, ranks1, group2) self.assertEqual(list(ranks1), list(ranks2)) @unittest.skipMPI('PlatformMPI') @unittest.skipMPI('MPICH1') @unittest.skipMPI('LAM/MPI') def testTranslRanksProcNull(self): if self.GROUP == MPI.GROUP_EMPTY: return group1 = self.GROUP group2 = self.GROUP ranks1 = [MPI.PROC_NULL] * 10 ranks2 = MPI.Group.Translate_ranks(group1, ranks1, group2) self.assertEqual(list(ranks1), list(ranks2)) def testTranslRanksGroupEmpty(self): if self.GROUP == MPI.GROUP_EMPTY: return group1 = self.GROUP group2 = MPI.GROUP_EMPTY ranks1 = list(range(group1.Get_size())) * 2 ranks2 = MPI.Group.Translate_ranks(group1, ranks1, group2) for rank in ranks2: self.assertEqual(rank, MPI.UNDEFINED) class TestGroupNull(unittest.TestCase): def testContructor(self): group = MPI.Group() self.assertFalse(group is MPI.GROUP_NULL) self.assertEqual(group, MPI.GROUP_NULL) def testNull(self): GROUP_NULL = MPI.GROUP_NULL group_null = MPI.Group() self.assertFalse(GROUP_NULL) self.assertFalse(group_null) self.assertEqual(group_null, GROUP_NULL) class TestGroupEmpty(BaseTestGroup, unittest.TestCase): def setUp(self): self.GROUP = MPI.GROUP_EMPTY def testEmpty(self): self.assertTrue(self.GROUP) def testSize(self): size = self.GROUP.Get_size() self.assertEqual(size, 0) def testRank(self): rank = self.GROUP.Get_rank() self.assertEqual(rank, MPI.UNDEFINED) @unittest.skipMPI('MPICH1') def testTranslRanks(self): super(TestGroupEmpty, self).testTranslRanks() class TestGroupSelf(BaseTestGroup, unittest.TestCase): def setUp(self): self.GROUP = MPI.COMM_SELF.Get_group() def tearDown(self): self.GROUP.Free() def testSize(self): size = self.GROUP.Get_size() self.assertEqual(size, 1) def testRank(self): rank = self.GROUP.Get_rank() self.assertEqual(rank, 0) class TestGroupWorld(BaseTestGroup, unittest.TestCase): def setUp(self): self.GROUP = MPI.COMM_WORLD.Get_group() def tearDown(self): self.GROUP.Free() def testSize(self): size = self.GROUP.Get_size() self.assertTrue(size >= 1) def testRank(self): size = self.GROUP.Get_size() rank = self.GROUP.Get_rank() self.assertTrue(rank >= 0 and rank < size) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_cco_ngh_buf.py0000644000175000017500000001656213200562156020633 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl def create_topo_comms(comm): size = comm.Get_size() rank = comm.Get_rank() # Cartesian n = int(size**1/2.0) m = int(size**1/3.0) if m*m*m == size: dims = [m, m, m] elif n*n == size: dims = [n, n] else: dims = [size] periods = [True] * len(dims) yield comm.Create_cart(dims, periods=periods) # Graph index, edges = [0], [] for i in range(size): pos = index[-1] index.append(pos+2) edges.append((i-1)%size) edges.append((i+1)%size) yield comm.Create_graph(index, edges) # Dist Graph sources = [(rank-2)%size, (rank-1)%size] destinations = [(rank+1)%size, (rank+2)%size] yield comm.Create_dist_graph_adjacent(sources, destinations) def get_neighbors_count(comm): topo = comm.Get_topology() if topo == MPI.CART: ndim = comm.Get_dim() return 2*ndim, 2*ndim if topo == MPI.GRAPH: rank = comm.Get_rank() nneighbors = comm.Get_neighbors_count(rank) return nneighbors, nneighbors if topo == MPI.DIST_GRAPH: indeg, outdeg, w = comm.Get_dist_neighbors_count() return indeg, outdeg return 0, 0 def have_feature(): cartcomm = MPI.COMM_SELF.Create_cart([1], periods=[0]) try: cartcomm.neighbor_allgather(None) return True except NotImplementedError: return False finally: cartcomm.Free() @unittest.skipIf(not have_feature(), 'mpi-neighbor') class BaseTestCCONghBuf(object): COMM = MPI.COMM_NULL def testNeighborAllgather(self): for comm in create_topo_comms(self.COMM): rsize, ssize = get_neighbors_count(comm) for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for v in range(3): sbuf = array( v, typecode, 3) rbuf = array(-1, typecode, (rsize, 3)) comm.Neighbor_allgather(sbuf.as_mpi(), rbuf.as_mpi()) for value in rbuf.flat: self.assertEqual(value, v) sbuf = array( v, typecode, 3) rbuf = array(-1, typecode, (rsize, 3)) comm.Neighbor_allgatherv(sbuf.as_mpi_c(3), rbuf.as_mpi_c(3)) for value in rbuf.flat: self.assertEqual(value, v) sbuf = array( v, typecode, 3) rbuf = array(-1, typecode, (rsize, 3)) comm.Ineighbor_allgather(sbuf.as_mpi(), rbuf.as_mpi()).Wait() for value in rbuf.flat: self.assertEqual(value, v) sbuf = array( v, typecode, 3) rbuf = array(-1, typecode, (rsize, 3)) comm.Ineighbor_allgatherv(sbuf.as_mpi_c(3), rbuf.as_mpi_c(3)).Wait() for value in rbuf.flat: self.assertEqual(value, v) comm.Free() def testNeighborAlltoall(self): for comm in create_topo_comms(self.COMM): rsize, ssize = get_neighbors_count(comm) for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for v in range(3): sbuf = array( v, typecode, (ssize, 3)) rbuf = array(-1, typecode, (rsize, 3)) comm.Neighbor_alltoall(sbuf.as_mpi(), rbuf.as_mpi_c(3)) for value in rbuf.flat: self.assertEqual(value, v) sbuf = array( v, typecode, (ssize, 3)) rbuf = array(-1, typecode, (rsize, 3)) comm.Neighbor_alltoall(sbuf.as_mpi(), rbuf.as_mpi()) for value in rbuf.flat: self.assertEqual(value, v) sbuf = array( v, typecode, (ssize, 3)) rbuf = array(-1, typecode, (rsize, 3)) comm.Neighbor_alltoallv(sbuf.as_mpi_c(3), rbuf.as_mpi_c(3)) for value in rbuf.flat: self.assertEqual(value, v) sbuf = array( v, typecode, (ssize, 3)) rbuf = array(-1, typecode, (rsize, 3)) comm.Ineighbor_alltoall(sbuf.as_mpi(), rbuf.as_mpi()).Wait() for value in rbuf.flat: self.assertEqual(value, v) sbuf = array( v, typecode, (ssize, 3)) rbuf = array(-1, typecode, (rsize, 3)) comm.Ineighbor_alltoallv(sbuf.as_mpi_c(3), rbuf.as_mpi_c(3)).Wait() for value in rbuf.flat: self.assertEqual(value, v) comm.Free() def testNeighborAlltoallw(self): size = self.COMM.Get_size() for comm in create_topo_comms(self.COMM): rsize, ssize = get_neighbors_count(comm) for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for n in range(1,4): for v in range(3): sbuf = array( v, typecode, (ssize, n)) rbuf = array(-1, typecode, (rsize, n)) sdt, rdt = sbuf.mpidtype, rbuf.mpidtype sdsp = list(range(0, ssize*n*sdt.extent, n*sdt.extent)) rdsp = list(range(0, rsize*n*rdt.extent, n*rdt.extent)) smsg = [sbuf.as_raw(), ([n]*ssize, sdsp), [sdt]*ssize] rmsg = (rbuf.as_raw(), ([n]*rsize, rdsp), [rdt]*rsize) try: comm.Neighbor_alltoallw(smsg, rmsg) except NotImplementedError: self.skipTest('mpi-neighbor_alltoallw') for value in rbuf.flat: self.assertEqual(value, v) smsg[0] = array(v+1, typecode, (ssize, n)).as_raw() try: comm.Ineighbor_alltoallw(smsg, rmsg).Wait() except NotImplementedError: self.skipTest('mpi-ineighbor_alltoallw') for value in rbuf.flat: self.assertEqual(value, v+1) comm.Free() class TestCCONghBufSelf(BaseTestCCONghBuf, unittest.TestCase): COMM = MPI.COMM_SELF class TestCCONghBufWorld(BaseTestCCONghBuf, unittest.TestCase): COMM = MPI.COMM_WORLD class TestCCONghBufSelfDup(TestCCONghBufSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() class TestCCONghBufWorldDup(TestCCONghBufWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() name, version = MPI.get_vendor() if name == 'Open MPI' and version < (1,8,4): _create_topo_comms = create_topo_comms def create_topo_comms(comm): for c in _create_topo_comms(comm): if c.size * 2 < sum(c.degrees): c.Free(); continue yield c if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_rma.py0000664000175000017500000003625313426006675017170 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl import sys pypy_lt_53 = (hasattr(sys, 'pypy_version_info') and sys.pypy_version_info < (5, 3)) def mkzeros(n): if pypy_lt_53: return b'\0' * n return bytearray(n) def memzero(m): try: m[:] = 0 except IndexError: # cffi buffer m[0:len(m)] = b'\0'*len(m) class BaseTestRMA(object): COMM = MPI.COMM_NULL INFO = MPI.INFO_NULL def setUp(self): nbytes = 100*MPI.DOUBLE.size try: self.mpi_memory = MPI.Alloc_mem(nbytes) self.memory = self.mpi_memory memzero(self.memory) except MPI.Exception: import array self.mpi_memory = None self.memory = array.array('B',[0]*nbytes) self.WIN = MPI.Win.Create(self.memory, 1, self.INFO, self.COMM) def tearDown(self): self.WIN.Free() if self.mpi_memory: MPI.Free_mem(self.mpi_memory) def testPutGet(self): typemap = MPI._typedict group = self.WIN.Get_group() size = group.Get_size() group.Free() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(10): for rank in range(size): sbuf = array(range(count), typecode) rbuf = array(-1, typecode, count+1) # self.WIN.Fence() self.WIN.Put(sbuf.as_mpi(), rank) self.WIN.Fence() self.WIN.Get(rbuf.as_mpi_c(count), rank) self.WIN.Fence() for i in range(count): self.assertEqual(sbuf[i], i) self.assertNotEqual(rbuf[i], -1) self.assertEqual(rbuf[-1], -1) # sbuf = array(range(count), typecode) rbuf = array(-1, typecode, count+1) target = sbuf.itemsize self.WIN.Fence() self.WIN.Put(sbuf.as_mpi(), rank, target) self.WIN.Fence() self.WIN.Get(rbuf.as_mpi_c(count), rank, target) self.WIN.Fence() for i in range(count): self.assertEqual(sbuf[i], i) self.assertNotEqual(rbuf[i], -1) self.assertEqual(rbuf[-1], -1) # sbuf = array(range(count), typecode) rbuf = array(-1, typecode, count+1) datatype = typemap[typecode] target = (sbuf.itemsize, count, datatype) self.WIN.Fence() self.WIN.Put(sbuf.as_mpi(), rank, target) self.WIN.Fence() self.WIN.Get(rbuf.as_mpi_c(count), rank, target) self.WIN.Fence() for i in range(count): self.assertEqual(sbuf[i], i) self.assertNotEqual(rbuf[i], -1) self.assertEqual(rbuf[-1], -1) def testAccumulate(self): group = self.WIN.Get_group() size = group.Get_size() group.Free() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(10): for rank in range(size): sbuf = array(range(count), typecode) rbuf = array(-1, typecode, count+1) for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): self.WIN.Fence() self.WIN.Accumulate(sbuf.as_mpi(), rank, op=op) self.WIN.Fence() self.WIN.Get(rbuf.as_mpi_c(count), rank) self.WIN.Fence() for i in range(count): self.assertEqual(sbuf[i], i) self.assertNotEqual(rbuf[i], -1) self.assertEqual(rbuf[-1], -1) @unittest.skipMPI('openmpi(>=1.10,<1.11)') def testGetAccumulate(self): group = self.WIN.Get_group() size = group.Get_size() rank = group.Get_rank() group.Free() self.WIN.Fence() obuf = MPI.Alloc_mem(1); memzero(obuf) rbuf = MPI.Alloc_mem(1); memzero(rbuf) try: try: self.WIN.Get_accumulate([obuf, 0, MPI.BYTE], [rbuf, 0, MPI.BYTE], rank) finally: MPI.Free_mem(obuf) MPI.Free_mem(rbuf) except NotImplementedError: self.skipTest('mpi-win-get_accumulate') self.WIN.Fence() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(10): for rank in range(size): ones = array([1]*count, typecode) sbuf = array(range(count), typecode) rbuf = array(-1, typecode, count+1) gbuf = array(-1, typecode, count+1) for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN, MPI.REPLACE, MPI.NO_OP): self.WIN.Lock(rank) self.WIN.Put(ones.as_mpi(), rank) self.WIN.Flush(rank) self.WIN.Get_accumulate(sbuf.as_mpi(), rbuf.as_mpi_c(count), rank, op=op) self.WIN.Flush(rank) self.WIN.Get(gbuf.as_mpi_c(count), rank) self.WIN.Flush(rank) self.WIN.Unlock(rank) # for i in range(count): self.assertEqual(sbuf[i], i) self.assertEqual(rbuf[i], 1) self.assertEqual(gbuf[i], op(1, i)) self.assertEqual(rbuf[-1], -1) self.assertEqual(gbuf[-1], -1) def testFetchAndOp(self): group = self.WIN.Get_group() size = group.Get_size() rank = group.Get_rank() group.Free() self.WIN.Fence() obuf = MPI.Alloc_mem(1); memzero(obuf) rbuf = MPI.Alloc_mem(1); memzero(rbuf) try: try: self.WIN.Fetch_and_op([obuf, 1, MPI.BYTE], [rbuf, 1, MPI.BYTE], rank) finally: MPI.Free_mem(obuf) MPI.Free_mem(rbuf) except NotImplementedError: self.skipTest('mpi-win-fetch_and_op') self.WIN.Fence() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: obuf = array(+1, typecode) rbuf = array(-1, typecode, 2) for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN, MPI.REPLACE, MPI.NO_OP): for rank in range(size): for disp in range(3): self.WIN.Lock(rank) self.WIN.Fetch_and_op(obuf.as_mpi(), rbuf.as_mpi_c(1), rank, disp, op=op) self.WIN.Unlock(rank) self.assertEqual(rbuf[1], -1) def testCompareAndSwap(self): group = self.WIN.Get_group() size = group.Get_size() rank = group.Get_rank() group.Free() self.WIN.Fence() obuf = MPI.Alloc_mem(1); memzero(obuf) cbuf = MPI.Alloc_mem(1); memzero(cbuf) rbuf = MPI.Alloc_mem(1); memzero(rbuf) try: try: self.WIN.Compare_and_swap([obuf, 1, MPI.BYTE], [cbuf, 1, MPI.BYTE], [rbuf, 1, MPI.BYTE], rank, 0) finally: MPI.Free_mem(obuf) MPI.Free_mem(cbuf) MPI.Free_mem(rbuf) except NotImplementedError: self.skipTest('mpi-win-compare_and_swap') self.WIN.Fence() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: if typecode in 'fdg': continue obuf = array(+1, typecode) cbuf = array( 0, typecode) rbuf = array(-1, typecode, 2) for rank in range(size): for disp in range(3): self.WIN.Lock(rank) self.WIN.Compare_and_swap(obuf.as_mpi(), cbuf.as_mpi(), rbuf.as_mpi_c(1), rank, disp) self.WIN.Unlock(rank) self.assertEqual(rbuf[1], -1) def testPutProcNull(self): self.WIN.Fence() self.WIN.Put(None, MPI.PROC_NULL, None) self.WIN.Fence() def testGetProcNull(self): self.WIN.Fence() self.WIN.Get(None, MPI.PROC_NULL, None) self.WIN.Fence() def testAccumulateProcNullReplace(self): self.WIN.Fence() zeros = mkzeros(8) self.WIN.Fence() self.WIN.Accumulate([zeros, MPI.INT], MPI.PROC_NULL, None, MPI.REPLACE) self.WIN.Fence() self.WIN.Accumulate([zeros, MPI.INT], MPI.PROC_NULL, None, MPI.REPLACE) self.WIN.Fence() def testAccumulateProcNullSum(self): self.WIN.Fence() zeros = mkzeros(8) self.WIN.Fence() self.WIN.Accumulate([zeros, MPI.INT], MPI.PROC_NULL, None, MPI.SUM) self.WIN.Fence() self.WIN.Accumulate([None, MPI.INT], MPI.PROC_NULL, None, MPI.SUM) self.WIN.Fence() def testGetAccumulateProcNull(self): obuf = [mkzeros(8), 0, MPI.INT] rbuf = [mkzeros(8), 0, MPI.INT] self.WIN.Fence() try: self.WIN.Get_accumulate(obuf, rbuf, MPI.PROC_NULL) except NotImplementedError: self.skipTest('mpi-win-get_accumulate') self.WIN.Fence() ##def testFetchAndOpProcNull(self): ## obuf = cbuf = rbuf = None ## self.WIN.Fence() ## try: ## self.WIN.Fetch_and_op(obuf, rbuf, MPI.PROC_NULL, 0) ## except NotImplementedError: ## self.skipTest('mpi-win-fetch_and_op') ## self.WIN.Fence() ##def testCompareAndSwapProcNull(self): ## obuf = cbuf = rbuf = None ## self.WIN.Fence() ## try: ## self.WIN.Compare_and_swap(obuf, cbuf, rbuf, MPI.PROC_NULL, 0) ## except NotImplementedError: ## self.skipTest('mpi-win-compare_and_swap') ## self.WIN.Fence() def testFence(self): win = self.WIN LMODE = [0, MPI.MODE_NOSTORE, MPI.MODE_NOPUT, MPI.MODE_NOSTORE|MPI.MODE_NOPUT] GMODE = [0, MPI.MODE_NOPRECEDE, MPI.MODE_NOSUCCEED] win.Fence() for lmode in LMODE: for gmode in GMODE: assertion = lmode | gmode win.Fence(assertion) win.Fence() @unittest.skipMPI('openmpi(==1.8.1)') def testFenceAll(self): win = self.WIN assertion = 0 modes = [0, MPI.MODE_NOSTORE, MPI.MODE_NOPUT, MPI.MODE_NOPRECEDE, MPI.MODE_NOSUCCEED] win.Fence() for mode in modes: win.Fence(mode) assertion |= mode win.Fence(assertion) win.Fence() @unittest.skipMPI('openmpi(==1.8.6)') def testStartComplete(self): self.WIN.Start(MPI.GROUP_EMPTY) self.WIN.Complete() @unittest.skipMPI('openmpi(==1.8.6)') def testPostWait(self): self.WIN.Post(MPI.GROUP_EMPTY) self.WIN.Wait() @unittest.skipMPI('openmpi(==1.8.7)') @unittest.skipMPI('openmpi(==1.8.6)') def testStartCompletePostWait(self): win = self.WIN wingroup = win.Get_group() size = wingroup.Get_size() rank = wingroup.Get_rank() if size < 2: return wingroup.Free() if rank == 0: group = wingroup.Excl([0]) win.Start(group) win.Complete() win.Post(group) win.Wait() group.Free() else: group = wingroup.Incl([0]) win.Post(group) win.Wait() win.Start(group) win.Complete() group.Free() wingroup.Free() @unittest.skipMPI('openmpi(==1.8.7)') @unittest.skipMPI('openmpi(==1.8.6)') def testStartCompletePostTest(self): comm = self.COMM win = self.WIN wingroup = win.Get_group() size = wingroup.Get_size() rank = wingroup.Get_rank() if size < 2: return wingroup.Free() if rank == 0: group = wingroup.Excl([0]) win.Start(group) comm.Barrier() win.Complete() comm.Barrier() group.Free() else: group = wingroup.Incl([0]) win.Post(group) flag = win.Test() self.assertFalse(flag) comm.Barrier() comm.Barrier() flag = win.Test() self.assertTrue(flag) group.Free() wingroup.Free() @unittest.skipMPI('MPI(<3.0)') def testSync(self): win = self.WIN comm = self.COMM rank = comm.Get_rank() win.Lock(rank) win.Sync() win.Unlock(rank) comm.Barrier() @unittest.skipMPI('MPI(<3.0)') def testFlush(self): win = self.WIN comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() # for i in range(size): win.Lock(i) win.Flush(i) win.Unlock(i) comm.Barrier() for i in range(size): if i == rank: win.Lock_all() win.Flush_all() win.Unlock_all() comm.Barrier() # for i in range(size): win.Lock(i) win.Flush_local(i) win.Unlock(i) comm.Barrier() for i in range(size): if i == rank: win.Lock_all() win.Flush_local_all() win.Unlock_all() comm.Barrier() class TestRMASelf(BaseTestRMA, unittest.TestCase): COMM = MPI.COMM_SELF class TestRMAWorld(BaseTestRMA, unittest.TestCase): COMM = MPI.COMM_WORLD SpectrumMPI = MPI.get_vendor()[0] == 'Spectrum MPI' try: if SpectrumMPI: raise NotImplementedError MPI.Win.Create(None, 1, MPI.INFO_NULL, MPI.COMM_SELF).Free() except (NotImplementedError, MPI.Exception): unittest.disable(BaseTestRMA, 'mpi-rma') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_io.py0000644000175000017500000003653713200562156017012 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl import sys, os, tempfile class BaseTestIO(object): COMM = MPI.COMM_NULL FILE = MPI.FILE_NULL prefix = 'mpi4py-' def setUp(self): comm = self.COMM fname = None if comm.Get_rank() == 0: fd, fname = tempfile.mkstemp(prefix=self.prefix) os.close(fd) fname = comm.bcast(fname, 0) amode = MPI.MODE_RDWR | MPI.MODE_CREATE amode |= MPI.MODE_DELETE_ON_CLOSE amode |= MPI.MODE_UNIQUE_OPEN info = MPI.INFO_NULL try: self.FILE = MPI.File.Open(comm, fname, amode, info) except Exception: if comm.Get_rank() == 0: os.remove(fname) raise def tearDown(self): if self.FILE: self.FILE.Close() self.COMM.Barrier() # non-collective def testReadWriteAt(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) fh.Write_at(count*rank, wbuf.as_raw()) fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Read_at(count*rank, rbuf.as_mpi_c(count)) for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() def testIReadIWriteAt(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) fh.Iwrite_at(count*rank, wbuf.as_raw()).Wait() fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Iread_at(count*rank, rbuf.as_mpi_c(count)).Wait() for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() def testReadWrite(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) for r in range(size): if r == rank: fh.Seek(0, MPI.SEEK_SET) fh.Write(wbuf.as_raw()) fh.Sync() comm.Barrier() fh.Sync() for n in range(0, len(wbuf)): rbuf = array(-1, typecode, n+1) fh.Seek(0, MPI.SEEK_SET) fh.Read(rbuf.as_mpi_c(n)) for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() def testIReadIWrite(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) for r in range(size): if r == rank: fh.Seek(0, MPI.SEEK_SET) fh.Iwrite(wbuf.as_raw()).Wait() fh.Sync() comm.Barrier() fh.Sync() for n in range(0, len(wbuf)): rbuf = array(-1, typecode, n+1) fh.Seek(0, MPI.SEEK_SET) fh.Iread(rbuf.as_mpi_c(n)).Wait() for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() def testReadWriteShared(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(rank%42, typecode, count) fh.Seek_shared(0, MPI.SEEK_SET) fh.Write_shared(wbuf.as_raw()) fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Seek_shared(0, MPI.SEEK_SET) fh.Read_shared(rbuf.as_mpi_c(count)) for value in rbuf[:-1]: self.assertTrue(0<=value<42) self.assertEqual(value, rbuf[0]) self.assertEqual(rbuf[-1], -1) comm.Barrier() def testIReadIWriteShared(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(rank%42, typecode, count) fh.Seek_shared(0, MPI.SEEK_SET) fh.Iwrite_shared(wbuf.as_raw()).Wait() fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Seek_shared(0, MPI.SEEK_SET) fh.Iread_shared(rbuf.as_mpi_c(count)).Wait() for value in rbuf[:-1]: self.assertTrue(0<=value<42) self.assertEqual(value, rbuf[0]) self.assertEqual(rbuf[-1], -1) comm.Barrier() # collective def testReadWriteAtAll(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) fh.Write_at_all(count*rank, wbuf.as_raw()) fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Read_at_all(count*rank, rbuf.as_mpi_c(count)) for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() @unittest.skipMPI('SpectrumMPI') def testIReadIWriteAtAll(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE try: # MPI 3.1 for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) fh.Iwrite_at_all(count*rank, wbuf.as_raw()).Wait() fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Iread_at_all(count*rank, rbuf.as_mpi_c(count)).Wait() for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() except NotImplementedError: if MPI.Get_version() >= (3, 1): raise self.skipTest('mpi-iwrite_at_all') def testReadWriteAtAllBeginEnd(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) fh.Write_at_all_begin(count*rank, wbuf.as_raw()) fh.Write_at_all_end(wbuf.as_raw()) fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Read_at_all_begin(count*rank, rbuf.as_mpi_c(count)) fh.Read_at_all_end(rbuf.as_raw()) for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() def testReadWriteAll(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) fh.Seek(count*rank, MPI.SEEK_SET) fh.Write_all(wbuf.as_raw()) fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Seek(count*rank, MPI.SEEK_SET) fh.Read_all(rbuf.as_mpi_c(count)) for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() @unittest.skipMPI('SpectrumMPI') def testIReadIWriteAll(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE try: # MPI 3.1 for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) fh.Seek(count*rank, MPI.SEEK_SET) fh.Iwrite_all(wbuf.as_raw()).Wait() fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Seek(count*rank, MPI.SEEK_SET) fh.Iread_all(rbuf.as_mpi_c(count)).Wait() for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() except NotImplementedError: if MPI.Get_version() >= (3, 1): raise self.skipTest('mpi-iwrite_all') def testReadWriteAllBeginEnd(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(42, typecode, count) fh.Seek(count*rank, MPI.SEEK_SET) fh.Write_all_begin(wbuf.as_raw()) fh.Write_all_end(wbuf.as_raw()) fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Seek(count*rank, MPI.SEEK_SET) fh.Read_all_begin(rbuf.as_mpi_c(count)) fh.Read_all_end(rbuf.as_raw()) for value in rbuf[:-1]: self.assertEqual(value, 42) self.assertEqual(rbuf[-1], -1) comm.Barrier() def testReadWriteOrdered(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(rank%42, typecode, count) fh.Seek_shared(0, MPI.SEEK_SET) fh.Write_ordered(wbuf.as_raw()) fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Seek_shared(0, MPI.SEEK_SET) fh.Read_ordered(rbuf.as_mpi_c(count)) for value in rbuf[:-1]: self.assertEqual(value, rank%42) self.assertEqual(rbuf[-1], -1) comm.Barrier() def testReadWriteOrderedBeginEnd(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() fh = self.FILE for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: etype = arrayimpl.TypeMap[typecode] fh.Set_size(0) fh.Set_view(0, etype) count = 13 wbuf = array(rank%42, typecode, count) fh.Seek_shared(0, MPI.SEEK_SET) fh.Write_ordered_begin(wbuf.as_raw()) fh.Write_ordered_end(wbuf.as_raw()) fh.Sync() comm.Barrier() fh.Sync() rbuf = array(-1, typecode, count+1) fh.Seek_shared(0, MPI.SEEK_SET) fh.Read_ordered_begin(rbuf.as_mpi_c(count)) fh.Read_ordered_end(rbuf.as_raw()) for value in rbuf[:-1]: self.assertEqual(value, rank%42) self.assertEqual(rbuf[-1], -1) comm.Barrier() @unittest.skipMPI('MPICH1') @unittest.skipMPI('LAM/MPI') class TestIOSelf(BaseTestIO, unittest.TestCase): COMM = MPI.COMM_SELF prefix = BaseTestIO.prefix + ('%d-' % MPI.COMM_WORLD.Get_rank()) @unittest.skipMPI('openmpi(<2.2.0)') @unittest.skipMPI('msmpi') @unittest.skipMPI('MPICH2') @unittest.skipMPI('MPICH1') @unittest.skipMPI('LAM/MPI') class TestIOWorld(BaseTestIO, unittest.TestCase): COMM = MPI.COMM_WORLD def have_feature(): case = BaseTestIO() case.COMM = TestIOSelf.COMM case.prefix = TestIOSelf.prefix case.setUp() case.tearDown() try: have_feature() except NotImplementedError: unittest.disable(BaseTestIO, 'mpi-io') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_op.py0000644000175000017500000001624613200562156017014 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys MPI_ERR_OP = MPI.ERR_OP try: import array except ImportError: array = None def asarray(typecode, data): try: memoryview _tobytes = lambda s: memoryview(s).tobytes() except NameError: _tobytes = lambda s: buffer(s)[:] try: _frombytes = array.array.frombytes except AttributeError: _frombytes = array.array.fromstring a = array.array(typecode, []) _frombytes(a, _tobytes(data)) return a def mysum_obj(a, b): for i in range(len(a)): b[i] = a[i] + b[i] return b def mysum_buf(a, b, dt): assert dt == MPI.INT assert len(a) == len(b) b[:] = mysum_obj(asarray('i', a), asarray('i', b)) def mysum(ba, bb, dt): if dt is None: return mysum_obj(ba, bb) else: return mysum_buf(ba, bb, dt) class TestOp(unittest.TestCase): def testConstructor(self): op = MPI.Op() self.assertFalse(op) self.assertEqual(op, MPI.OP_NULL) @unittest.skipIf(array is None, 'array') def testCreate(self): for comm in [MPI.COMM_SELF, MPI.COMM_WORLD]: for commute in [True, False]: for N in range(4): myop = MPI.Op.Create(mysum, commute) self.assertFalse(myop.is_predefined) if (hasattr(sys, 'pypy_version_info') and comm.size > 1): myop.Free() continue try: # buffer(empty_array) returns # the same non-NULL pointer !!! if N == 0: continue size = comm.Get_size() rank = comm.Get_rank() a = array.array('i', [i*(rank+1) for i in range(N)]) b = array.array('i', [0]*len(a)) comm.Allreduce([a, MPI.INT], [b, MPI.INT], myop) scale = sum(range(1,size+1)) for i in range(N): self.assertEqual(b[i], scale*i) ret = myop(a, b) self.assertTrue(ret is b) for i in range(N): self.assertEqual(b[i], a[i]+scale*i) myop2 = MPI.Op(myop) a = array.array('i', [1]*N) b = array.array('i', [2]*N) ret = myop2(a, b) self.assertTrue(ret is b) for i in range(N): self.assertEqual(b[i], 3) myop2 = None finally: myop.Free() def testCreateMany(self): N = 32 # max user-defined operations # ops = [] for i in range(N): o = MPI.Op.Create(mysum) ops.append(o) for o in ops: o.Free() # cleanup # another round ops = [] for i in range(N): o = MPI.Op.Create(mysum) ops.append(o) for o in ops: o.Free() # cleanup def _test_call(self, op, args, res): self.assertEqual(op(*args), res) def testCall(self): self._test_call(MPI.MIN, (2,3), 2) self._test_call(MPI.MAX, (2,3), 3) self._test_call(MPI.SUM, (2,3), 5) self._test_call(MPI.PROD, (2,3), 6) def xor(x,y): return bool(x) ^ bool(y) for x, y in ((0, 0), (0, 1), (1, 0), (1, 1)): self._test_call(MPI.LAND, (x,y), x and y) self._test_call(MPI.LOR, (x,y), x or y) self._test_call(MPI.LXOR, (x,y), xor(x, y)) self._test_call(MPI.BAND, (x,y), x & y) self._test_call(MPI.BOR, (x,y), x | y) self._test_call(MPI.BXOR, (x,y), x ^ y) if MPI.REPLACE: self._test_call(MPI.REPLACE, (2,3), 3) self._test_call(MPI.REPLACE, (3,2), 2) if MPI.NO_OP: self._test_call(MPI.NO_OP, (2,3), 2) self._test_call(MPI.NO_OP, (3,2), 3) def testMinMax(self): x = [1]; y = [1] res = MPI.MIN(x, y) self.assertTrue(res is x) res = MPI.MAX(x, y) self.assertTrue(res is x) def testMinMaxLoc(self): x = [1]; i = [2]; u = [x, i] y = [2]; j = [1]; v = [y, j] res = MPI.MINLOC(u, v) self.assertTrue(res[0] is x) self.assertTrue(res[1] is i) res = MPI.MINLOC(v, u) self.assertTrue(res[0] is x) self.assertTrue(res[1] is i) res = MPI.MAXLOC(u, v) self.assertTrue(res[0] is y) self.assertTrue(res[1] is j) res = MPI.MAXLOC(v, u) self.assertTrue(res[0] is y) self.assertTrue(res[1] is j) # x = [1]; i = 0; u = [x, i] y = [1]; j = 1; v = [y, j] res = MPI.MINLOC(u, v) self.assertTrue(res[0] is x) self.assertTrue(res[1] is i) res = MPI.MAXLOC(u, v) self.assertTrue(res[0] is x) self.assertTrue(res[1] is i) # x = [1]; i = 1; u = [x, i] y = [1]; j = 0; v = [y, j] res = MPI.MINLOC(u, v) self.assertTrue(res[0] is y) self.assertTrue(res[1] is j) res = MPI.MAXLOC(u, v) self.assertTrue(res[0] is y) self.assertTrue(res[1] is j) # x = [1]; i = [0]; u = [x, i] y = [1]; j = [1]; v = [y, j] res = MPI.MINLOC(u, v) self.assertTrue(res[0] is x) self.assertTrue(res[1] is i) res = MPI.MAXLOC(u, v) self.assertTrue(res[0] is x) self.assertTrue(res[1] is i) # x = [1]; i = [1]; u = [x, i] y = [1]; j = [0]; v = [y, j] res = MPI.MINLOC(u, v) self.assertTrue(res[0] is y) self.assertTrue(res[1] is j) res = MPI.MAXLOC(u, v) self.assertTrue(res[0] is y) self.assertTrue(res[1] is j) @unittest.skipMPI('openmpi(<=1.8.1)') def testIsCommutative(self): try: MPI.SUM.Is_commutative() except NotImplementedError: self.skipTest('mpi-op-is_commutative') ops = [MPI.MAX, MPI.MIN, MPI.SUM, MPI.PROD, MPI.LAND, MPI.BAND, MPI.LOR, MPI.BOR, MPI.LXOR, MPI.BXOR, MPI.MAXLOC, MPI.MINLOC,] for op in ops: flag = op.Is_commutative() self.assertEqual(flag, op.is_commutative) self.assertTrue(flag) ops = [MPI.REPLACE, MPI.NO_OP] for op in ops: if not op: continue flag = op.Is_commutative() self.assertEqual(flag, op.is_commutative) #self.assertFalse(flag) def testIsPredefined(self): self.assertTrue(MPI.OP_NULL.is_predefined) ops = [MPI.MAX, MPI.MIN, MPI.SUM, MPI.PROD, MPI.LAND, MPI.BAND, MPI.LOR, MPI.BOR, MPI.LXOR, MPI.BXOR, MPI.MAXLOC, MPI.MINLOC,] for op in ops: self.assertTrue(op.is_predefined) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_rc.py0000644000175000017500000000112513200562156016770 0ustar dalcinldalcinl00000000000000from mpi4py import rc import mpiunittest as unittest class TestRC(unittest.TestCase): def testRC1(self): rc(initialize = rc.initialize) rc(threads = rc.threads) rc(thread_level = rc.thread_level) rc(finalize = rc.finalize) rc(fast_reduce = rc.fast_reduce) rc(recv_mprobe = rc.recv_mprobe) def testRC2(self): kwargs = rc.__dict__.copy() rc(**kwargs) def testRC3(self): error = lambda: rc(ABCXYZ=123456) self.assertRaises(TypeError, error) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_cffi.py0000644000175000017500000000425713200562156017304 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest try: import cffi except ImportError: cffi = None @unittest.skipIf(cffi is None, 'cffi') class TestCFFI(unittest.TestCase): mpitypes = [ MPI.Datatype, MPI.Request, MPI.Info, MPI.Errhandler, MPI.Group, MPI.Win, MPI.Op, MPI.File, MPI.Message, MPI.Comm, ] objects = [ MPI.DATATYPE_NULL, MPI.INT, MPI.DOUBLE, MPI.REQUEST_NULL, MPI.INFO_NULL, MPI.INFO_ENV, MPI.ERRHANDLER_NULL, MPI.ERRORS_RETURN, MPI.ERRORS_ARE_FATAL, MPI.GROUP_NULL, MPI.GROUP_EMPTY, MPI.WIN_NULL, MPI.OP_NULL, MPI.SUM, MPI.MIN, MPI.MAX, MPI.FILE_NULL, MPI.MESSAGE_NULL, MPI.MESSAGE_NO_PROC, MPI.COMM_NULL, MPI.COMM_SELF, MPI.COMM_WORLD, ] def testHandleAddress(self): ffi = cffi.FFI() typemap = {ffi.sizeof('int'): 'int', ffi.sizeof('void*'): 'void*'} typename = lambda t: t.__name__.rsplit('.', 1)[-1] for tp in self.mpitypes: handle_t = typemap[MPI._sizeof(tp)] mpi_t = 'MPI_' + typename(tp) ffi.cdef("typedef %s %s;" % (handle_t, mpi_t)) for obj in self.objects: if isinstance(obj, MPI.Comm): mpi_t = 'MPI_Comm' else: mpi_t = 'MPI_' + typename(type(obj)) oldobj = obj newobj = type(obj)() handle_old = ffi.cast(mpi_t+'*', MPI._addressof(oldobj)) handle_new = ffi.cast(mpi_t+'*', MPI._addressof(newobj)) handle_new[0] = handle_old[0] self.assertEqual(oldobj, newobj) def testHandleValue(self): ffi = cffi.FFI() typemap = {ffi.sizeof('uint32_t'): 'uint32_t', ffi.sizeof('uint64_t'): 'uint64_t',} for obj in self.objects: uintptr_t = typemap[MPI._sizeof(obj)] handle = ffi.cast(uintptr_t+'*', MPI._addressof(obj))[0] self.assertEqual(handle, MPI._handleof(obj)) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_cco_nb_buf.py0000664000175000017500000006150013426006675020461 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl from functools import reduce prod = lambda sequence,start=1: reduce(lambda x, y: x*y, sequence, start) def maxvalue(a): try: typecode = a.typecode except AttributeError: typecode = a.dtype.char if typecode == ('f'): return 1e30 elif typecode == ('d'): return 1e300 else: return 2 ** (a.itemsize * 7) - 1 @unittest.skipMPI('msmpi(<8.1.0)') class BaseTestCCOBuf(object): COMM = MPI.COMM_NULL def testBarrier(self): self.COMM.Ibarrier().Wait() def testBcast(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): if rank == root: buf = array(root, typecode, root) else: buf = array( -1, typecode, root) self.COMM.Ibcast(buf.as_mpi(), root=root).Wait() for value in buf: self.assertEqual(value, root) def testGather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): sbuf = array(root, typecode, root+1) if rank == root: rbuf = array(-1, typecode, (size,root+1)) else: rbuf = array([], typecode) self.COMM.Igather(sbuf.as_mpi(), rbuf.as_mpi(), root=root).Wait() if rank == root: for value in rbuf.flat: self.assertEqual(value, root) def testScatter(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): rbuf = array(-1, typecode, size) if rank == root: sbuf = array(root, typecode, (size, size)) else: sbuf = array([], typecode) self.COMM.Iscatter(sbuf.as_mpi(), rbuf.as_mpi(), root=root).Wait() for value in rbuf: self.assertEqual(value, root) def testAllgather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): sbuf = array(root, typecode, root+1) rbuf = array( -1, typecode, (size, root+1)) self.COMM.Iallgather(sbuf.as_mpi(), rbuf.as_mpi()).Wait() for value in rbuf.flat: self.assertEqual(value, root) def testAlltoall(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): sbuf = array(root, typecode, (size, root+1)) rbuf = array( -1, typecode, (size, root+1)) self.COMM.Ialltoall(sbuf.as_mpi(), rbuf.as_mpi_c(root+1)).Wait() for value in rbuf.flat: self.assertEqual(value, root) def assertAlmostEqual(self, first, second): num = float(float(second-first)) den = float(second+first)/2 or 1.0 if (abs(num/den) > 1e-2): raise self.failureException('%r != %r' % (first, second)) def testReduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): sbuf = array(range(size), typecode) rbuf = array(-1, typecode, size) self.COMM.Ireduce(sbuf.as_mpi(), rbuf.as_mpi(), op, root).Wait() max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if rank != root: self.assertEqual(value, -1) continue if op == MPI.SUM: if (i * size) < max_val: self.assertAlmostEqual(value, i*size) elif op == MPI.PROD: if (i ** size) < max_val: self.assertAlmostEqual(value, i**size) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) def testAllreduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): sbuf = array(range(size), typecode) rbuf = array(0, typecode, size) self.COMM.Iallreduce(sbuf.as_mpi(), rbuf.as_mpi(), op).Wait() max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: if (i * size) < max_val: self.assertAlmostEqual(value, i*size) elif op == MPI.PROD: if (i ** size) < max_val: self.assertAlmostEqual(value, i**size) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) @unittest.skipMPI('openmpi(<=1.8.3)') def testReduceScatter(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): rcnt = list(range(1,size+1)) sbuf = array([rank+1]*sum(rcnt), typecode) rbuf = array(-1, typecode, rank+1) self.COMM.Ireduce_scatter(sbuf.as_mpi(), rbuf.as_mpi(), None, op).Wait() max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: redval = sum(range(size))+size if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.PROD: redval = prod(range(1,size+1)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.MAX: self.assertEqual(value, size) elif op == MPI.MIN: self.assertEqual(value, 1) rbuf = array(-1, typecode, rank+1) self.COMM.Ireduce_scatter(sbuf.as_mpi(), rbuf.as_mpi(), rcnt, op).Wait() max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: redval = sum(range(size))+size if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.PROD: redval = prod(range(1,size+1)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.MAX: self.assertEqual(value, size) elif op == MPI.MIN: self.assertEqual(value, 1) def testReduceScatterBlock(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): for rcnt in range(1, size+1): sbuf = array([rank]*rcnt*size, typecode) rbuf = array(-1, typecode, rcnt) if op == MPI.PROD: sbuf = array([rank+1]*rcnt*size, typecode) self.COMM.Ireduce_scatter_block(sbuf.as_mpi(), rbuf.as_mpi(), op).Wait() max_val = maxvalue(rbuf) v_sum = (size*(size-1))/2 v_prod = 1 for i in range(1,size+1): v_prod *= i v_max = size-1 v_min = 0 for i, value in enumerate(rbuf): if op == MPI.SUM: if v_sum <= max_val: self.assertAlmostEqual(value, v_sum) elif op == MPI.PROD: if v_prod <= max_val: self.assertAlmostEqual(value, v_prod) elif op == MPI.MAX: self.assertEqual(value, v_max) elif op == MPI.MIN: self.assertEqual(value, v_min) def testScan(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() # -- for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): sbuf = array(range(size), typecode) rbuf = array(0, typecode, size) self.COMM.Iscan(sbuf.as_mpi(), rbuf.as_mpi(), op).Wait() max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: if (i * (rank + 1)) < max_val: self.assertAlmostEqual(value, i * (rank + 1)) elif op == MPI.PROD: if (i ** (rank + 1)) < max_val: self.assertAlmostEqual(value, i ** (rank + 1)) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) @unittest.skipMPI('openmpi(<=1.8.1)') def testExscan(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): sbuf = array(range(size), typecode) rbuf = array(0, typecode, size) self.COMM.Iexscan(sbuf.as_mpi(), rbuf.as_mpi(), op).Wait() if rank == 1: for i, value in enumerate(rbuf): self.assertEqual(value, i) elif rank > 1: max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: if (i * rank) < max_val: self.assertAlmostEqual(value, i * rank) elif op == MPI.PROD: if (i ** rank) < max_val: self.assertAlmostEqual(value, i ** rank) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) def testBcastTypeIndexed(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode, datatype in arrayimpl.TypeMap.items(): for root in range(size): # if rank == root: buf = array(range(10), typecode).as_raw() else: buf = array(-1, typecode, 10).as_raw() indices = list(range(0, len(buf), 2)) newtype = datatype.Create_indexed_block(1, indices) newtype.Commit() newbuf = (buf, 1, newtype) self.COMM.Ibcast(newbuf, root=root).Wait() newtype.Free() if rank != root: for i, value in enumerate(buf): if (i % 2): self.assertEqual(value, -1) else: self.assertEqual(value, i) # if rank == root: buf = array(range(10), typecode).as_raw() else: buf = array(-1, typecode, 10).as_raw() indices = list(range(1, len(buf), 2)) newtype = datatype.Create_indexed_block(1, indices) newtype.Commit() newbuf = (buf, 1, newtype) self.COMM.Ibcast(newbuf, root).Wait() newtype.Free() if rank != root: for i, value in enumerate(buf): if not (i % 2): self.assertEqual(value, -1) else: self.assertEqual(value, i) @unittest.skipMPI('MVAPICH2') class BaseTestCCOBufInplace(object): def testGather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): count = root+3 if rank == root: sbuf = MPI.IN_PLACE buf = array(-1, typecode, (size, count)) #buf.flat[(rank*count):((rank+1)*count)] = \ # array(root, typecode, count) s, e = rank*count, (rank+1)*count for i in range(s, e): buf.flat[i] = root rbuf = buf.as_mpi() else: buf = array(root, typecode, count) sbuf = buf.as_mpi() rbuf = None self.COMM.Igather(sbuf, rbuf, root=root).Wait() for value in buf.flat: self.assertEqual(value, root) @unittest.skipMPI('msmpi(==10.0.0)') def testScatter(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(1, 10): if rank == root: buf = array(root, typecode, (size, count)) sbuf = buf.as_mpi() rbuf = MPI.IN_PLACE else: buf = array(-1, typecode, count) sbuf = None rbuf = buf.as_mpi() self.COMM.Iscatter(sbuf, rbuf, root=root).Wait() for value in buf.flat: self.assertEqual(value, root) def testAllgather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(1, 10): buf = array(-1, typecode, (size, count)) #buf.flat[(rank*count):((rank+1)*count)] = \ # array(count, typecode, count) s, e = rank*count, (rank+1)*count for i in range(s, e): buf.flat[i] = count self.COMM.Iallgather(MPI.IN_PLACE, buf.as_mpi()).Wait() for value in buf.flat: self.assertEqual(value, count) def assertAlmostEqual(self, first, second): num = float(second-first) den = float(second+first)/2 or 1.0 if (abs(num/den) > 1e-2): raise self.failureException('%r != %r' % (first, second)) def testReduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): count = size if rank == root: buf = array(range(size), typecode) sbuf = MPI.IN_PLACE rbuf = buf.as_mpi() else: buf = array(range(size), typecode) buf2 = array(range(size), typecode) sbuf = buf.as_mpi() rbuf = buf2.as_mpi() self.COMM.Ireduce(sbuf, rbuf, op, root).Wait() if rank == root: max_val = maxvalue(buf) for i, value in enumerate(buf): if op == MPI.SUM: if (i * size) < max_val: self.assertAlmostEqual(value, i*size) elif op == MPI.PROD: if (i ** size) < max_val: self.assertAlmostEqual(value, i**size) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) def testAllreduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): buf = array(range(size), typecode) sbuf = MPI.IN_PLACE rbuf = buf.as_mpi() self.COMM.Iallreduce(sbuf, rbuf, op).Wait() max_val = maxvalue(buf) for i, value in enumerate(buf): if op == MPI.SUM: if (i * size) < max_val: self.assertAlmostEqual(value, i*size) elif op == MPI.PROD: if (i ** size) < max_val: self.assertAlmostEqual(value, i**size) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) @unittest.skipMPI('openmpi(<=1.8.6)') def testReduceScatterBlock(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): for rcnt in range(size): if op == MPI.PROD: rbuf = array([rank+1]*rcnt*size, typecode) else: rbuf = array([rank]*rcnt*size, typecode) self.COMM.Ireduce_scatter_block(MPI.IN_PLACE, rbuf.as_mpi(), op).Wait() max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if i >= rcnt: if op == MPI.PROD: self.assertEqual(value, rank+1) else: self.assertEqual(value, rank) else: if op == MPI.SUM: redval = sum(range(size)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.PROD: redval = prod(range(1,size+1)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.MAX: self.assertEqual(value, size-1) elif op == MPI.MIN: self.assertEqual(value, 0) @unittest.skipMPI('openmpi(<=1.8.6)') def testReduceScatter(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): rcnt = list(range(1, size+1)) if op == MPI.PROD: rbuf = array([rank+1]*sum(rcnt), typecode) else: rbuf = array([rank]*sum(rcnt), typecode) self.COMM.Ireduce_scatter(MPI.IN_PLACE, rbuf.as_mpi(), rcnt, op).Wait() max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if i >= rcnt[rank]: if op == MPI.PROD: self.assertEqual(value, rank+1) else: self.assertEqual(value, rank) else: if op == MPI.SUM: redval = sum(range(size)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.PROD: redval = prod(range(1,size+1)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.MAX: self.assertEqual(value, size-1) elif op == MPI.MIN: self.assertEqual(value, 0) class TestCCOBufSelf(BaseTestCCOBuf, unittest.TestCase): COMM = MPI.COMM_SELF class TestCCOBufWorld(BaseTestCCOBuf, unittest.TestCase): COMM = MPI.COMM_WORLD class TestCCOBufInplaceSelf(BaseTestCCOBufInplace, unittest.TestCase): COMM = MPI.COMM_SELF class TestCCOBufInplaceWorld(BaseTestCCOBufInplace, unittest.TestCase): COMM = MPI.COMM_WORLD @unittest.skipMPI('IntelMPI', MPI.COMM_WORLD.Get_size() > 1) def testReduceScatter(self): super(TestCCOBufInplaceWorld, self).testReduceScatter() class TestCCOBufSelfDup(TestCCOBufSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() class TestCCOBufWorldDup(TestCCOBufWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() try: MPI.COMM_SELF.Ibarrier().Wait() except NotImplementedError: unittest.disable(BaseTestCCOBuf, 'mpi-nbc') unittest.disable(BaseTestCCOBufInplace, 'mpi-nbc') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_cco_buf.py0000664000175000017500000007171213426006675020010 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl from functools import reduce prod = lambda sequence,start=1: reduce(lambda x, y: x*y, sequence, start) def maxvalue(a): try: typecode = a.typecode except AttributeError: typecode = a.dtype.char if typecode == ('f'): return 1e30 elif typecode == ('d'): return 1e300 else: return 2 ** (a.itemsize * 7) - 1 class BaseTestCCOBuf(object): COMM = MPI.COMM_NULL def testBarrier(self): self.COMM.Barrier() def testBcast(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): if rank == root: buf = array(root, typecode, root) else: buf = array( -1, typecode, root) self.COMM.Bcast(buf.as_mpi(), root=root) for value in buf: self.assertEqual(value, root) def testGather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): sbuf = array(root, typecode, root+1) if rank == root: rbuf = array(-1, typecode, (size,root+1)) else: rbuf = array([], typecode) self.COMM.Gather(sbuf.as_mpi(), rbuf.as_mpi(), root=root) if rank == root: for value in rbuf.flat: self.assertEqual(value, root) def testScatter(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): rbuf = array(-1, typecode, size) if rank == root: sbuf = array(root, typecode, (size, size)) else: sbuf = array([], typecode) self.COMM.Scatter(sbuf.as_mpi(), rbuf.as_mpi(), root=root) for value in rbuf: self.assertEqual(value, root) def testAllgather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): sbuf = array(root, typecode, root+1) rbuf = array( -1, typecode, (size, root+1)) self.COMM.Allgather(sbuf.as_mpi(), rbuf.as_mpi()) for value in rbuf.flat: self.assertEqual(value, root) def testAlltoall(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): sbuf = array(root, typecode, (size, root+1)) rbuf = array( -1, typecode, (size, root+1)) self.COMM.Alltoall(sbuf.as_mpi(), rbuf.as_mpi_c(root+1)) for value in rbuf.flat: self.assertEqual(value, root) def assertAlmostEqual(self, first, second): num = float(float(second-first)) den = float(second+first)/2 or 1.0 if (abs(num/den) > 1e-2): raise self.failureException('%r != %r' % (first, second)) def testReduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): sbuf = array(range(size), typecode) rbuf = array(-1, typecode, size) self.COMM.Reduce(sbuf.as_mpi(), rbuf.as_mpi(), op, root) max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if rank != root: self.assertEqual(value, -1) continue if op == MPI.SUM: if (i * size) < max_val: self.assertAlmostEqual(value, i*size) elif op == MPI.PROD: if (i ** size) < max_val: self.assertAlmostEqual(value, i**size) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) def testAllreduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): sbuf = array(range(size), typecode) rbuf = array(0, typecode, size) self.COMM.Allreduce(sbuf.as_mpi(), rbuf.as_mpi(), op) max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: if (i * size) < max_val: self.assertAlmostEqual(value, i*size) elif op == MPI.PROD: if (i ** size) < max_val: self.assertAlmostEqual(value, i**size) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) def testReduceScatter(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): rcnt = list(range(1,size+1)) sbuf = array([rank+1]*sum(rcnt), typecode) rbuf = array(-1, typecode, rank+1) self.COMM.Reduce_scatter(sbuf.as_mpi(), rbuf.as_mpi(), None, op) max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: redval = sum(range(size))+size if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.PROD: redval = prod(range(1,size+1)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.MAX: self.assertEqual(value, size) elif op == MPI.MIN: self.assertEqual(value, 1) rbuf = array(-1, typecode, rank+1) self.COMM.Reduce_scatter(sbuf.as_mpi(), rbuf.as_mpi(), rcnt, op) max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: redval = sum(range(size))+size if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.PROD: redval = prod(range(1,size+1)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.MAX: self.assertEqual(value, size) elif op == MPI.MIN: self.assertEqual(value, 1) def testReduceScatterBlock(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): for rcnt in range(1,size): sbuf = array([rank]*rcnt*size, typecode) rbuf = array(-1, typecode, rcnt) if op == MPI.PROD: sbuf = array([rank+1]*rcnt*size, typecode) self.COMM.Reduce_scatter_block(sbuf.as_mpi(), rbuf.as_mpi(), op) max_val = maxvalue(rbuf) v_sum = (size*(size-1))/2 v_prod = 1 for i in range(1,size+1): v_prod *= i v_max = size-1 v_min = 0 for i, value in enumerate(rbuf): if op == MPI.SUM: if v_sum <= max_val: self.assertAlmostEqual(value, v_sum) elif op == MPI.PROD: if v_prod <= max_val: self.assertAlmostEqual(value, v_prod) elif op == MPI.MAX: self.assertEqual(value, v_max) elif op == MPI.MIN: self.assertEqual(value, v_min) def testScan(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() # -- for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): sbuf = array(range(size), typecode) rbuf = array(0, typecode, size) self.COMM.Scan(sbuf.as_mpi(), rbuf.as_mpi(), op) max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: if (i * (rank + 1)) < max_val: self.assertAlmostEqual(value, i * (rank + 1)) elif op == MPI.PROD: if (i ** (rank + 1)) < max_val: self.assertAlmostEqual(value, i ** (rank + 1)) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) def testExscan(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): sbuf = array(range(size), typecode) rbuf = array(0, typecode, size) try: self.COMM.Exscan(sbuf.as_mpi(), rbuf.as_mpi(), op) except NotImplementedError: self.skipTest('mpi-exscan') if rank == 1: for i, value in enumerate(rbuf): self.assertEqual(value, i) elif rank > 1: max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if op == MPI.SUM: if (i * rank) < max_val: self.assertAlmostEqual(value, i * rank) elif op == MPI.PROD: if (i ** rank) < max_val: self.assertAlmostEqual(value, i ** rank) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) def testBcastTypeIndexed(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode, datatype in arrayimpl.TypeMap.items(): for root in range(size): # if rank == root: buf = array(range(10), typecode).as_raw() else: buf = array(-1, typecode, 10).as_raw() indices = list(range(0, len(buf), 2)) newtype = datatype.Create_indexed_block(1, indices) newtype.Commit() newbuf = (buf, 1, newtype) self.COMM.Bcast(newbuf, root=root) newtype.Free() if rank != root: for i, value in enumerate(buf): if (i % 2): self.assertEqual(value, -1) else: self.assertEqual(value, i) # if rank == root: buf = array(range(10), typecode).as_raw() else: buf = array(-1, typecode, 10).as_raw() indices = list(range(1, len(buf), 2)) newtype = datatype.Create_indexed_block(1, indices) newtype.Commit() newbuf = (buf, 1, newtype) self.COMM.Bcast(newbuf, root) newtype.Free() if rank != root: for i, value in enumerate(buf): if not (i % 2): self.assertEqual(value, -1) else: self.assertEqual(value, i) class BaseTestCCOBufInplace(object): def testGather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): count = root+3 if rank == root: sbuf = MPI.IN_PLACE buf = array(-1, typecode, (size, count)) #buf.flat[(rank*count):((rank+1)*count)] = \ # array(root, typecode, count) s, e = rank*count, (rank+1)*count for i in range(s, e): buf.flat[i] = root rbuf = buf.as_mpi() else: buf = array(root, typecode, count) sbuf = buf.as_mpi() rbuf = None self.COMM.Gather(sbuf, rbuf, root=root) for value in buf.flat: self.assertEqual(value, root) @unittest.skipMPI('msmpi(==10.0.0)') def testScatter(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(1, 10): if rank == root: buf = array(root, typecode, (size, count)) sbuf = buf.as_mpi() rbuf = MPI.IN_PLACE else: buf = array(-1, typecode, count) sbuf = None rbuf = buf.as_mpi() self.COMM.Scatter(sbuf, rbuf, root=root) for value in buf.flat: self.assertEqual(value, root) def testAllgather(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(1, 10): buf = array(-1, typecode, (size, count)) #buf.flat[(rank*count):((rank+1)*count)] = \ # array(count, typecode, count) s, e = rank*count, (rank+1)*count for i in range(s, e): buf.flat[i] = count self.COMM.Allgather(MPI.IN_PLACE, buf.as_mpi()) for value in buf.flat: self.assertEqual(value, count) def assertAlmostEqual(self, first, second): num = float(float(second-first)) den = float(second+first)/2 or 1.0 if (abs(num/den) > 1e-2): raise self.failureException('%r != %r' % (first, second)) def testReduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): count = size if rank == root: buf = array(range(size), typecode) sbuf = MPI.IN_PLACE rbuf = buf.as_mpi() else: buf = array(range(size), typecode) buf2 = array(range(size), typecode) sbuf = buf.as_mpi() rbuf = buf2.as_mpi() self.COMM.Reduce(sbuf, rbuf, op, root) if rank == root: max_val = maxvalue(buf) for i, value in enumerate(buf): if op == MPI.SUM: if (i * size) < max_val: self.assertAlmostEqual(value, i*size) elif op == MPI.PROD: if (i ** size) < max_val: self.assertAlmostEqual(value, i**size) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) def testAllreduce(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): buf = array(range(size), typecode) sbuf = MPI.IN_PLACE rbuf = buf.as_mpi() self.COMM.Allreduce(sbuf, rbuf, op) max_val = maxvalue(buf) for i, value in enumerate(buf): if op == MPI.SUM: if (i * size) < max_val: self.assertAlmostEqual(value, i*size) elif op == MPI.PROD: if (i ** size) < max_val: self.assertAlmostEqual(value, i**size) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) def testReduceScatterBlock(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): for rcnt in range(size): if op == MPI.PROD: rbuf = array([rank+1]*rcnt*size, typecode) else: rbuf = array([rank]*rcnt*size, typecode) self.COMM.Reduce_scatter_block(MPI.IN_PLACE, rbuf.as_mpi(), op) max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if i >= rcnt: if op == MPI.PROD: self.assertEqual(value, rank+1) else: self.assertEqual(value, rank) else: if op == MPI.SUM: redval = sum(range(size)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.PROD: redval = prod(range(1,size+1)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.MAX: self.assertEqual(value, size-1) elif op == MPI.MIN: self.assertEqual(value, 0) @unittest.skipMPI('MVAPICH2') def testReduceScatter(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.MAX, MPI.MIN, MPI.PROD): rcnt = list(range(1, size+1)) if op == MPI.PROD: rbuf = array([rank+1]*sum(rcnt), typecode) else: rbuf = array([rank]*sum(rcnt), typecode) self.COMM.Reduce_scatter(MPI.IN_PLACE, rbuf.as_mpi(), rcnt, op) max_val = maxvalue(rbuf) for i, value in enumerate(rbuf): if i >= rcnt[rank]: if op == MPI.PROD: self.assertEqual(value, rank+1) else: self.assertEqual(value, rank) else: if op == MPI.SUM: redval = sum(range(size)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.PROD: redval = prod(range(1,size+1)) if redval < max_val: self.assertAlmostEqual(value, redval) elif op == MPI.MAX: self.assertEqual(value, size-1) elif op == MPI.MIN: self.assertEqual(value, 0) @unittest.skipMPI('openmpi(<=1.8.4)') def testScan(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() # -- for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): buf = array(range(size), typecode) self.COMM.Scan(MPI.IN_PLACE, buf.as_mpi(), op) max_val = maxvalue(buf) for i, value in enumerate(buf): if op == MPI.SUM: if (i * (rank + 1)) < max_val: self.assertAlmostEqual(value, i * (rank + 1)) elif op == MPI.PROD: if (i ** (rank + 1)) < max_val: self.assertAlmostEqual(value, i ** (rank + 1)) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) @unittest.skipMPI('openmpi(<=1.8.4)') @unittest.skipMPI('msmpi(<=4.2.0)') def testExscan(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): buf = array(range(size), typecode) try: self.COMM.Exscan(MPI.IN_PLACE, buf.as_mpi(), op) except NotImplementedError: self.skipTest('mpi-exscan') if rank == 1: for i, value in enumerate(buf): self.assertEqual(value, i) elif rank > 1: max_val = maxvalue(buf) for i, value in enumerate(buf): if op == MPI.SUM: if (i * rank) < max_val: self.assertAlmostEqual(value, i * rank) elif op == MPI.PROD: if (i ** rank) < max_val: self.assertAlmostEqual(value, i ** rank) elif op == MPI.MAX: self.assertEqual(value, i) elif op == MPI.MIN: self.assertEqual(value, i) class TestReduceLocal(unittest.TestCase): def testReduceLocal(self): for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): size = 5 sbuf = array(range(1,size+1), typecode) rbuf = array(range(0,size+0), typecode) try: op.Reduce_local(sbuf.as_mpi(), rbuf.as_mpi()) except NotImplementedError: self.skipTest('mpi-op-reduce_local') for i, value in enumerate(rbuf): self.assertEqual(sbuf[i], i+1) if op == MPI.SUM: self.assertAlmostEqual(value, i+(i+1)) elif op == MPI.PROD: self.assertAlmostEqual(value, i*(i+1)) elif op == MPI.MAX: self.assertEqual(value, i+1) elif op == MPI.MIN: self.assertEqual(value, i) for array in arrayimpl.ArrayTypes: for op in (MPI.SUM, MPI.PROD, MPI.MAX, MPI.MIN): sbuf = array(range(3), "i") rbuf = array(range(3), "i") def f(): op.Reduce_local(sbuf.as_mpi_c(2), rbuf.as_mpi_c(3)) self.assertRaises(ValueError, f) def f(): op.Reduce_local([sbuf.as_raw(), 1, MPI.INT], [rbuf.as_raw(), 1, MPI.SHORT]) self.assertRaises(ValueError, f) class TestCCOBufSelf(BaseTestCCOBuf, unittest.TestCase): COMM = MPI.COMM_SELF class TestCCOBufWorld(BaseTestCCOBuf, unittest.TestCase): COMM = MPI.COMM_WORLD @unittest.skipMPI('MPICH1') @unittest.skipMPI('LAM/MPI') @unittest.skipIf(MPI.IN_PLACE == MPI.BOTTOM, 'mpi-in-place') class TestCCOBufInplaceSelf(BaseTestCCOBufInplace, unittest.TestCase): COMM = MPI.COMM_SELF @unittest.skipMPI('MPICH1') @unittest.skipMPI('LAM/MPI') @unittest.skipIf(MPI.IN_PLACE == MPI.BOTTOM, 'mpi-in-place') class TestCCOBufInplaceWorld(BaseTestCCOBufInplace, unittest.TestCase): COMM = MPI.COMM_WORLD @unittest.skipMPI('IntelMPI', MPI.COMM_WORLD.Get_size() > 1) def testReduceScatter(self): super(TestCCOBufInplaceWorld, self).testReduceScatter() class TestCCOBufSelfDup(TestCCOBufSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() @unittest.skipMPI('openmpi(<1.4.0)', MPI.Query_thread() > MPI.THREAD_SINGLE) class TestCCOBufWorldDup(TestCCOBufWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_comm_topo.py0000644000175000017500000002221113200562156020357 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class BaseTestTopo(object): COMM = MPI.COMM_NULL def checkFortran(self, oldcomm): fint = oldcomm.py2f() newcomm = MPI.Comm.f2py(fint) self.assertEqual(newcomm, oldcomm) self.assertEqual(type(newcomm), type(oldcomm)) def testCartcomm(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() for ndim in (1,2,3,4,5): dims = MPI.Compute_dims(size, [0]*ndim) periods = [True] * len(dims) topo = comm.Create_cart(dims, periods=periods) self.assertTrue(topo.is_topo) self.assertTrue(topo.topology, MPI.CART) self.checkFortran(topo) self.assertEqual(topo.dim, len(dims)) self.assertEqual(topo.ndim, len(dims)) coordinates = topo.coords self.assertEqual(coordinates, topo.Get_coords(topo.rank)) neighbors = [] for i in range(ndim): for d in (-1, +1): coord = list(coordinates) coord[i] = (coord[i]+d) % dims[i] neigh = topo.Get_cart_rank(coord) self.assertEqual(coord, topo.Get_coords(neigh)) source, dest = topo.Shift(i, d) self.assertEqual(neigh, dest) neighbors.append(neigh) self.assertEqual(topo.indegree, len(neighbors)) self.assertEqual(topo.outdegree, len(neighbors)) self.assertEqual(topo.inedges, neighbors) self.assertEqual(topo.outedges, neighbors) inedges, outedges = topo.inoutedges self.assertEqual(inedges, neighbors) self.assertEqual(outedges, neighbors) if ndim == 1: topo.Free() continue for i in range(ndim): rem_dims = [1]*ndim rem_dims[i] = 0 sub = topo.Sub(rem_dims) if sub != MPI.COMM_NULL: self.assertEqual(sub.dim, ndim-1) dims = topo.dims del dims[i] self.assertEqual(sub.dims, dims) sub.Free() topo.Free() @unittest.skipMPI('MPI(<2.0)') def testCartcommZeroDim(self): comm = self.COMM topo = comm.Create_cart([]) if topo == MPI.COMM_NULL: return self.assertEqual(topo.dim, 0) self.assertEqual(topo.dims, []) self.assertEqual(topo.periods, []) self.assertEqual(topo.coords, []) rank = topo.Get_cart_rank([]) self.assertEqual(rank, 0) inedges, outedges = topo.inoutedges self.assertEqual(inedges, []) self.assertEqual(outedges, []) topo.Free() def testGraphcomm(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() index, edges = [0], [] for i in range(size): pos = index[-1] index.append(pos+2) edges.append((i-1)%size) edges.append((i+1)%size) topo = comm.Create_graph(index[1:], edges) self.assertTrue(topo.is_topo) self.assertTrue(topo.topology, MPI.GRAPH) self.checkFortran(topo) topo.Free() topo = comm.Create_graph(index, edges) self.assertEqual(topo.dims, (len(index)-1, len(edges))) self.assertEqual(topo.nnodes, len(index)-1) self.assertEqual(topo.nedges, len(edges)) self.assertEqual(topo.index, index[1:]) self.assertEqual(topo.edges, edges) neighbors = edges[index[rank]:index[rank+1]] self.assertEqual(neighbors, topo.neighbors) for rank in range(size): neighs = topo.Get_neighbors(rank) self.assertEqual(neighs, [(rank-1)%size, (rank+1)%size]) self.assertEqual(topo.indegree, len(neighbors)) self.assertEqual(topo.outdegree, len(neighbors)) self.assertEqual(topo.inedges, neighbors) self.assertEqual(topo.outedges, neighbors) inedges, outedges = topo.inoutedges self.assertEqual(inedges, neighbors) self.assertEqual(outedges, neighbors) topo.Free() @unittest.skipMPI('msmpi') def testDistgraphcommAdjacent(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() try: topo = comm.Create_dist_graph_adjacent(None, None) topo.Free() except NotImplementedError: self.skipTest('mpi-comm-create_dist_graph_adjacent') # sources = [(rank-2)%size, (rank-1)%size] destinations = [(rank+1)%size, (rank+2)%size] topo = comm.Create_dist_graph_adjacent(sources, destinations) self.assertTrue(topo.is_topo) self.assertTrue(topo.topology, MPI.DIST_GRAPH) self.checkFortran(topo) self.assertEqual(topo.Get_dist_neighbors_count(), (2, 2, False)) self.assertEqual(topo.Get_dist_neighbors(), (sources, destinations, None)) self.assertEqual(topo.indegree, len(sources)) self.assertEqual(topo.outdegree, len(destinations)) self.assertEqual(topo.inedges, sources) self.assertEqual(topo.outedges, destinations) inedges, outedges = topo.inoutedges self.assertEqual(inedges, sources) self.assertEqual(outedges, destinations) topo.Free() # sourceweights = [1, 2] destweights = [3, 4] weights = (sourceweights, destweights) topo = comm.Create_dist_graph_adjacent(sources, destinations, sourceweights, destweights) self.assertEqual(topo.Get_dist_neighbors_count(), (2, 2, True)) self.assertEqual(topo.Get_dist_neighbors(), (sources, destinations, weights)) topo.Free() # topo = comm.Create_dist_graph_adjacent(sources, None, MPI.UNWEIGHTED, None) self.assertEqual(topo.Get_dist_neighbors_count(), (2, 0, False)) self.assertEqual(topo.Get_dist_neighbors(), (sources, [], None)) topo.Free() topo = comm.Create_dist_graph_adjacent(None, destinations, None, MPI.UNWEIGHTED) self.assertEqual(topo.Get_dist_neighbors_count(), (0, 2, False)) self.assertEqual(topo.Get_dist_neighbors(), ([], destinations, None)) topo.Free() if MPI.VERSION < 3: return topo = comm.Create_dist_graph_adjacent([], [], MPI.WEIGHTS_EMPTY, MPI.WEIGHTS_EMPTY) self.assertEqual(topo.Get_dist_neighbors_count(), (0, 0, True)) self.assertEqual(topo.Get_dist_neighbors(), ([], [], ([], []))) topo.Free() @unittest.skipMPI('msmpi') @unittest.skipMPI('PlatformMPI') def testDistgraphcomm(self): comm = self.COMM size = comm.Get_size() rank = comm.Get_rank() # try: topo = comm.Create_dist_graph([], [], [], MPI.UNWEIGHTED) topo.Free() except NotImplementedError: self.skipTest('mpi-comm-create_dist_graph') # sources = [rank] degrees = [3] destinations = [(rank-1)%size, rank, (rank+1)%size] topo = comm.Create_dist_graph(sources, degrees, destinations, MPI.UNWEIGHTED) self.assertTrue(topo.is_topo) self.assertTrue(topo.topology, MPI.DIST_GRAPH) self.checkFortran(topo) self.assertEqual(topo.Get_dist_neighbors_count(), (3, 3, False)) topo.Free() weights = list(range(1,4)) topo = comm.Create_dist_graph(sources, degrees, destinations, weights) self.assertEqual(topo.Get_dist_neighbors_count(), (3, 3, True)) topo.Free() def testCartMap(self): comm = self.COMM size = comm.Get_size() for ndim in (1,2,3,4,5): for periods in (None, True, False): dims = MPI.Compute_dims(size, [0]*ndim) topo = comm.Create_cart(dims, periods, reorder=True) rank = comm.Cart_map(dims, periods) self.assertEqual(topo.Get_rank(), rank) topo.Free() def testGraphMap(self): comm = self.COMM size = comm.Get_size() index, edges = [0], [] for i in range(size): pos = index[-1] index.append(pos+2) edges.append((i-1)%size) edges.append((i+1)%size) # Version 1 topo = comm.Create_graph(index, edges, reorder=True) rank = comm.Graph_map(index, edges) self.assertEqual(topo.Get_rank(), rank) topo.Free() # Version 2 topo = comm.Create_graph(index[1:], edges, reorder=True) rank = comm.Graph_map(index[1:], edges) self.assertEqual(topo.Get_rank(), rank) topo.Free() class TestTopoSelf(BaseTestTopo, unittest.TestCase): COMM = MPI.COMM_SELF class TestTopoWorld(BaseTestTopo, unittest.TestCase): COMM = MPI.COMM_WORLD class TestTopoSelfDup(TestTopoSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() class TestTopoWorldDup(TestTopoWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_cco_vec.py0000644000175000017500000004370513200562156017777 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import arrayimpl def maxvalue(a): try: typecode = a.typecode except AttributeError: typecode = a.dtype.char if typecode == ('f'): return 1e30 elif typecode == ('d'): return 1e300 else: return 2 ** (a.itemsize * 7) - 1 class BaseTestCCOVec(object): COMM = MPI.COMM_NULL def testGatherv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): sbuf = array(root, typecode, count) rbuf = array( -1, typecode, size*size) counts = [count] * size displs = list(range(0, size*size, size)) recvbuf = rbuf.as_mpi_v(counts, displs) if rank != root: recvbuf=None self.COMM.Barrier() self.COMM.Gatherv(sbuf.as_mpi(), recvbuf, root) self.COMM.Barrier() if recvbuf is not None: for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) def testGatherv2(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): sbuf = array(root, typecode, size) rbuf = array( -1, typecode, size*size) sendbuf = sbuf.as_mpi_c(count) recvbuf = rbuf.as_mpi_v(count, size) if rank != root: recvbuf=None self.COMM.Barrier() self.COMM.Gatherv(sendbuf, recvbuf, root) self.COMM.Barrier() if recvbuf is not None: for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) def testGatherv3(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size+1): # sbuf = array(root, typecode, count).as_raw() rbuf = array( -1, typecode, count*size).as_raw() sendbuf = sbuf recvbuf = [rbuf, count] if rank != root: recvbuf=None self.COMM.Barrier() self.COMM.Gatherv(sendbuf, recvbuf, root) self.COMM.Barrier() if recvbuf is not None: for v in rbuf: self.assertEqual(v, root) # sbuf = array(root, typecode, count).as_raw() if rank == root: rbuf = array( -1, typecode, count*size).as_raw() else: rbuf = None self.COMM.Gatherv(sbuf, rbuf, root) self.COMM.Barrier() if rank == root: for v in rbuf: self.assertEqual(v, root) def testScatterv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): # sbuf = array(root, typecode, size*size) rbuf = array( -1, typecode, count) counts = [count] * size displs = list(range(0, size*size, size)) sendbuf = sbuf.as_mpi_v(counts, displs) if rank != root: sendbuf = None self.COMM.Scatterv(sendbuf, rbuf.as_mpi(), root) for vr in rbuf: self.assertEqual(vr, root) def testScatterv2(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): sbuf = array(root, typecode, size*size) rbuf = array( -1, typecode, size) sendbuf = sbuf.as_mpi_v(count, size) recvbuf = rbuf.as_mpi_c(count) if rank != root: sendbuf = None self.COMM.Scatterv(sendbuf, recvbuf, root) a, b = rbuf[:count], rbuf[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) def testScatterv3(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size+1): # sbuf = array(root, typecode, count*size).as_raw() rbuf = array( -1, typecode, count).as_raw() sendbuf = [sbuf, count] recvbuf = rbuf if rank != root: sendbuf = None self.COMM.Scatterv(sendbuf, recvbuf, root) for v in rbuf: self.assertEqual(v, root) # if rank == root: sbuf = array(root, typecode, count*size).as_raw() else: sbuf = None rbuf = array( -1, typecode, count).as_raw() self.COMM.Scatterv(sbuf, rbuf, root) for v in rbuf: self.assertEqual(v, root) def testAllgatherv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): sbuf = array(root, typecode, count) rbuf = array( -1, typecode, size*size) counts = [count] * size displs = list(range(0, size*size, size)) sendbuf = sbuf.as_mpi() recvbuf = rbuf.as_mpi_v(counts, displs) self.COMM.Allgatherv(sendbuf, recvbuf) for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) def testAllgatherv2(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): sbuf = array(root, typecode, size) rbuf = array( -1, typecode, size*size) sendbuf = sbuf.as_mpi_c(count) recvbuf = rbuf.as_mpi_v(count, size) self.COMM.Allgatherv(sendbuf, recvbuf) for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) def testAllgatherv3(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size+1): # sbuf = array(root, typecode, count).as_raw() rbuf = array( -1, typecode, count*size).as_raw() sendbuf = sbuf recvbuf = [rbuf, count] self.COMM.Allgatherv(sendbuf, recvbuf) for v in rbuf: self.assertEqual(v, root) # sbuf = array(root, typecode, count).as_raw() rbuf = array( -1, typecode, count*size).as_raw() self.COMM.Allgatherv(sbuf, rbuf) for v in rbuf: self.assertEqual(v, root) def testAlltoallv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): sbuf = array(root, typecode, size*size) rbuf = array( -1, typecode, size*size) counts = [count] * size displs = list(range(0, size*size, size)) sendbuf = sbuf.as_mpi_v(counts, displs) recvbuf = rbuf.as_mpi_v(counts, displs) self.COMM.Alltoallv(sendbuf, recvbuf) for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) def testAlltoallv2(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size): sbuf = array(root, typecode, size*size) rbuf = array( -1, typecode, size*size) sendbuf = sbuf.as_mpi_v(count, size) recvbuf = rbuf.as_mpi_v(count, size) self.COMM.Alltoallv(sendbuf, recvbuf) for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, root) for vb in b: self.assertEqual(vb, -1) def testAlltoallv3(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for root in range(size): for count in range(size+1): # sbuf = array(root, typecode, count*size).as_raw() rbuf = array( -1, typecode, count*size).as_raw() sendbuf = [sbuf, count] recvbuf = [rbuf, count] self.COMM.Alltoallv(sendbuf, recvbuf) for v in rbuf: self.assertEqual(v, root) # sbuf = array(root, typecode, count*size).as_raw() rbuf = array( -1, typecode, count*size).as_raw() self.COMM.Alltoallv(sbuf, rbuf) for v in rbuf: self.assertEqual(v, root) def testAlltoallw(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for n in range(1,size+1): sbuf = array( n, typecode, (size, n)) rbuf = array(-1, typecode, (size, n)) sdt, rdt = sbuf.mpidtype, rbuf.mpidtype sdsp = list(range(0, size*n*sdt.extent, n*sdt.extent)) rdsp = list(range(0, size*n*rdt.extent, n*rdt.extent)) smsg = (sbuf.as_raw(), ([n]*size, sdsp), [sdt]*size) rmsg = (rbuf.as_raw(), ([n]*size, rdsp), [rdt]*size) try: self.COMM.Alltoallw(smsg, rmsg) except NotImplementedError: self.skipTest('mpi-alltoallw') for value in rbuf.flat: self.assertEqual(value, n) @unittest.skipMPI('openmpi(<1.8.0)') @unittest.skipMPI('msmpi(<8.1.0)') @unittest.skipIf(MPI.BOTTOM == MPI.IN_PLACE, 'mpi-in-place') class BaseTestCCOVecInplace(object): COMM = MPI.COMM_NULL def testAlltoallv(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(size): rbuf = array(-1, typecode, size*size) counts = [count] * size displs = list(range(0, size*size, size)) for i in range(size): for j in range(count): rbuf[i*size+j] = rank recvbuf = rbuf.as_mpi_v(counts, displs) self.COMM.Alltoallv(MPI.IN_PLACE, recvbuf) for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, i) for vb in b: self.assertEqual(vb, -1) def testAlltoallw(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(size): rbuf = array(-1, typecode, size*size) for i in range(size): for j in range(count): rbuf[i*size+j] = rank rdt = rbuf.mpidtype rdsp = list(range(0, size*size*rdt.extent, size*rdt.extent)) rmsg = (rbuf.as_raw(), ([count]*size, rdsp), [rdt]*size) try: self.COMM.Alltoallw(MPI.IN_PLACE, rmsg) except NotImplementedError: self.skipTest('mpi-alltoallw') for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, i) for vb in b: self.assertEqual(vb, -1) def testAlltoallw2(self): size = self.COMM.Get_size() rank = self.COMM.Get_rank() for array in arrayimpl.ArrayTypes: for typecode in arrayimpl.TypeMap: for count in range(size): rbuf = array(-1, typecode, size*size) for i in range(size): for j in range(count): rbuf[i*size+j] = rank rdt = rbuf.mpidtype rdsp = list(range(0, size*size*rdt.extent, size*rdt.extent)) rmsg = (rbuf.as_raw(), [count]*size, rdsp, [rdt]*size) try: self.COMM.Alltoallw(MPI.IN_PLACE, rmsg) except NotImplementedError: self.skipTest('mpi-alltoallw') for i in range(size): row = rbuf[i*size:(i+1)*size] a, b = row[:count], row[count:] for va in a: self.assertEqual(va, i) for vb in b: self.assertEqual(vb, -1) class TestCCOVecSelf(BaseTestCCOVec, unittest.TestCase): COMM = MPI.COMM_SELF class TestCCOVecWorld(BaseTestCCOVec, unittest.TestCase): COMM = MPI.COMM_WORLD class TestCCOVecSelfDup(TestCCOVecSelf): def setUp(self): self.COMM = MPI.COMM_SELF.Dup() def tearDown(self): self.COMM.Free() class TestCCOVecWorldDup(TestCCOVecWorld): def setUp(self): self.COMM = MPI.COMM_WORLD.Dup() def tearDown(self): self.COMM.Free() class TestCCOVecInplaceSelf(BaseTestCCOVecInplace, unittest.TestCase): COMM = MPI.COMM_SELF class TestCCOVecInplaceWorld(BaseTestCCOVecInplace, unittest.TestCase): COMM = MPI.COMM_WORLD if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_mpimem.py0000644000175000017500000000152113200562156017650 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest class TestMemory(unittest.TestCase): def testMemory1(self): for size in range(0, 10000, 100): size = max(1, size) # Open MPI try: mem1 = MPI.Alloc_mem(size) self.assertEqual(len(mem1), size) MPI.Free_mem(mem1) except NotImplementedError: self.skipTest('mpi-alloc_mem') def testMemory2(self): for size in range(0, 10000, 100): size = max(1, size) # Open MPI try: mem2 = MPI.Alloc_mem(size, MPI.INFO_NULL) self.assertEqual(len(mem2), size) MPI.Free_mem(mem2) except NotImplementedError: self.skipTest('mpi-alloc_mem') if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_doc.py0000644000175000017500000000340413200562156017133 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest import sys, types ModuleType = type(MPI) ClassType = type(MPI.Comm) FunctionType = type(MPI.Init) MethodDescrType = type(MPI.Comm.Get_rank) GetSetDescrType = type(MPI.Comm.rank) def getdocstr(mc, docstrings, namespace=None): name = getattr(mc, '__name__', None) if name is None: return if name in ('__builtin__', 'builtins'): return if name.startswith('_'): return if namespace: name = '%s.%s' % (namespace, name) if type(mc) in (ModuleType, ClassType): doc = getattr(mc, '__doc__', None) if doc == "": return docstrings[name] = doc for k, v in vars(mc).items(): if isinstance(v, staticmethod): v = v.__get__(object) getdocstr(v, docstrings, name) elif type(mc) in (FunctionType, MethodDescrType, GetSetDescrType): doc = getattr(mc, '__doc__', None) if doc == "": return docstrings[name] = doc class TestDoc(unittest.TestCase): @unittest.skipIf(hasattr(sys, 'pypy_version_info'), 'pypy') def testDoc(self): missing = False docs = { } getdocstr(MPI, docs) for k in docs: if not k.startswith('_'): doc = docs[k] if doc is None: print ("'%s': missing docstring" % k) missing = True else: doc = doc.strip() if not doc: print ("'%s': empty docstring" % k) missing = True if 'mpi4py.MPI' in doc: print ("'%s': bad format docstring" % k) self.assertFalse(missing) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/test/test_address.py0000644000175000017500000000331513200562156020014 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import mpiunittest as unittest try: import array except ImportError: array = None try: import numpy except ImportError: numpy = None class TestAddress(unittest.TestCase): @unittest.skipIf(array is None, 'array') def testGetAddress1(self): from struct import pack, unpack location = array.array('i', range(10)) bufptr, _ = location.buffer_info() addr = MPI.Get_address(location) addr = unpack('P', pack('P', addr))[0] self.assertEqual(addr, bufptr) @unittest.skipIf(numpy is None, 'numpy') def testGetAddress2(self): from struct import pack, unpack location = numpy.asarray(range(10), dtype='i') bufptr, _ = location.__array_interface__['data'] addr = MPI.Get_address(location) addr = unpack('P', pack('P', addr))[0] self.assertEqual(addr, bufptr) @unittest.skipMPI('openmpi(<=1.10.2)') def testBottom(self): base = MPI.Get_address(MPI.BOTTOM) addr = MPI.Aint_add(base, 0) self.assertEqual(addr, base) diff = MPI.Aint_diff(base, base) self.assertEqual(diff, 0) @unittest.skipIf(array is None, 'array') def testAintAdd(self): location = array.array('i', range(10)) base = MPI.Get_address(location) addr = MPI.Aint_add(base, 4) self.assertEqual(addr, base + 4) @unittest.skipIf(array is None, 'array') def testAintDiff(self): location = array.array('i', range(10)) base = MPI.Get_address(location) addr1 = base + 8 addr2 = base + 4 diff = MPI.Aint_diff(addr1, addr2) self.assertEqual(diff, 4) if __name__ == '__main__': unittest.main() mpi4py-3.0.3/mpi.cfg0000644000175000017500000001206313200562156015245 0ustar dalcinldalcinl00000000000000# Some Linux distributions have RPM's for some MPI implementations. # In such a case, headers and libraries usually are in default system # locations, and you should not need any special configuration. # If you do not have MPI distribution in a default location, please # uncomment and fill-in appropriately the following lines. Yo can use # as examples the [mpich2], [openmpi], and [deinompi] sections # below the [mpi] section (wich is the one used by default). # If you specify multiple locations for includes and libraries, # please separate them with the path separator for your platform, # i.e., ':' on Unix-like systems and ';' on Windows # Default configuration # --------------------- [mpi] ## mpi_dir = /usr ## mpi_dir = /usr/local ## mpi_dir = /usr/local/mpi ## mpi_dir = /opt ## mpi_dir = /opt/mpi ## mpi_dir = = $ProgramFiles\MPI ## mpicc = %(mpi_dir)s/bin/mpicc ## mpicxx = %(mpi_dir)s/bin/mpicxx ## define_macros = ## undef_macros = ## include_dirs = %(mpi_dir)s/include ## libraries = mpi ## library_dirs = %(mpi_dir)s/lib ## runtime_library_dirs = %(mpi_dir)s/lib ## extra_compile_args = ## extra_link_args = ## extra_objects = # MPICH3 example # -------------- [mpich3] mpi_dir = /home/devel/mpi/mpich-3.1.4 mpicc = %(mpi_dir)s/bin/mpicc mpicxx = %(mpi_dir)s/bin/mpicxx #include_dirs = %(mpi_dir)s/include #libraries = mpich opa mpl rt pthread #library_dirs = %(mpi_dir)s/lib #runtime_library_dirs = %(library_dirs)s # Open MPI example # ---------------- [openmpi] mpi_dir = /home/devel/mpi/openmpi-1.8.6 mpicc = %(mpi_dir)s/bin/mpicc mpicxx = %(mpi_dir)s/bin/mpicxx #include_dirs = %(mpi_dir)s/include #libraries = mpi library_dirs = %(mpi_dir)s/lib runtime_library_dirs = %(library_dirs)s # MPICH2 example # -------------- [mpich2] mpi_dir = /home/devel/mpi/mpich2-1.4.1 mpicc = %(mpi_dir)s/bin/mpicc mpicxx = %(mpi_dir)s/bin/mpicxx #include_dirs = %(mpi_dir)s/include #libraries = mpich opa mpl #library_dirs = %(mpi_dir)s/lib #runtime_library_dirs = %(library_dirs)s # Sun MPI example # --------------- [sunmpi] #mpi_dir = /opt/SUNWhpc/HPC8.2.1/gnu mpi_dir = /opt/SUNWhpc/HPC8.1/sun mpicc = %(mpi_dir)s/bin/mpicc mpicxx = %(mpi_dir)s/bin/mpicxx #include_dirs = %(mpi_dir)s/include #libraries = mpi open-rte open-pal library_dirs = %(mpi_dir)s/lib runtime_library_dirs = %(library_dirs)s # Platform MPI example # -------------------- [pcmpi-linux-64bit] mpi_dir = /opt/ibm/platform_mpi mpicc = %(mpi_dir)s/bin/mpicc mpicxx = %(mpi_dir)s/bin/mpiCC define_macros = NON_BLOCKING_COLLECTIVES runtime_library_dirs = %(mpi_dir)s/lib/linux_amd64 [pcmpi-linux-32bit] mpi_dir = /opt/ibm/platform_mpi mpicc = %(mpi_dir)s/bin/mpicc mpicxx = %(mpi_dir)s/bin/mpiCC define_macros = NON_BLOCKING_COLLECTIVES runtime_library_dirs = %(mpi_dir)s/lib/linux_ia32 # SGI MPI example # --------------- [sgimpi] define_macros = SGI_MPI=1 mpi_dir = /usr mpicc = icc mpicxx = icpc include_dirs = %(mpi_dir)s/include libraries = mpi library_dirs = %(mpi_dir)s/lib runtime_library_dirs = %(library_dirs)s # IBM POE/MPI example # ------------------- [poempi] mpicc = mpcc_r mpicxx = mpCC_r # Microsoft MPI example # --------------------- [msmpi-32bit] mpi_dir = $ProgramFiles\Microsoft SDKs\MPI include_dirs = %(mpi_dir)s\Include libraries = msmpi library_dirs = %(mpi_dir)s\Lib\x86 [msmpi-64bit] mpi_dir = $ProgramFiles\Microsoft SDKs\MPI include_dirs = %(mpi_dir)s\Include libraries = msmpi library_dirs = %(mpi_dir)s\Lib\x64 # SiCortex MPI example # -------------------- [sicortex] mpicc = mpicc --gnu mpicxx = mpicxx --gnu # LAM/MPI example # --------------- [lammpi] mpi_dir = /home/devel/mpi/lam-7.1.4 mpicc = %(mpi_dir)s/bin/mpicc mpicxx = %(mpi_dir)s/bin/mpic++ include_dirs = %(mpi_dir)s/include libraries = lammpio mpi lam library_dirs = %(mpi_dir)s/lib runtime_library_dirs = %(library_dirs)s # MPICH1 example # -------------- [mpich1] mpi_dir = /home/devel/mpi/mpich-1.2.7p1 mpicc = %(mpi_dir)s/bin/mpicc mpicxx = %(mpi_dir)s/bin/mpicxx include_dirs = %(mpi_dir)s/include libraries = mpich library_dirs = %(mpi_dir)s/lib/shared:%(mpi_dir)s/lib runtime_library_dirs = %(mpi_dir)s/lib/shared # Fake MPI, just for testing # -------------------------- [fakempi] mpicc = cc mpicxx = c++ include_dirs = misc/fakempi # PETSc MPIUNI, just for testing # ------------------------------ [mpiuni] mpicc = cc mpicxx = c++ include_dirs = misc/mpiuni:$PETSC_DIR/include:$PETSC_DIR/$PETSC_ARCH/include mpi4py-3.0.3/DESCRIPTION.rst0000644000175000017500000000642113200562156016315 0ustar dalcinldalcinl00000000000000MPI for Python ============== This package provides Python bindings for the **Message Passing Interface** (MPI_) standard. It is implemented on top of the MPI-1/2/3 specification and exposes an API which grounds on the standard MPI-2 C++ bindings. .. _MPI: http://www.mpi-forum.org/ Features -------- This package supports: * Convenient communication of any *picklable* Python object + point-to-point (send & receive) + collective (broadcast, scatter & gather, reductions) * Fast communication of Python object exposing the *Python buffer interface* (NumPy arrays, builtin bytes/string/array objects) + point-to-point (blocking/nonbloking/persistent send & receive) + collective (broadcast, block/vector scatter & gather, reductions) * Process groups and communication domains + Creation of new intra/inter communicators + Cartesian & graph topologies * Parallel input/output: + read & write + blocking/nonbloking & collective/noncollective + individual/shared file pointers & explicit offset * Dynamic process management + spawn & spawn multiple + accept/connect + name publishing & lookup * One-sided operations + remote memory access (put, get, accumulate) + passive target syncronization (start/complete & post/wait) + active target syncronization (lock & unlock) Install ------- Once you have a working MPI implementation and the ``mpicc`` compiler wrapper is on your search path, you can install this package * using ``pip``:: $ pip install mpi4py * using ``easy_install`` (deprecated):: $ easy_install mpi4py You can also install the in-development version of mpi4py * using ``pip``:: $ pip install git+https://bitbucket.org/mpi4py/mpi4py or:: $ pip install https://bitbucket.org/mpi4py/mpi4py/get/master.tar.gz * using ``easy_install`` (deprecated):: $ easy_install git+https://bitbucket.org/mpi4py/mpi4py or:: $ easy_install https://bitbucket.org/mpi4py/mpi4py/get/master.tar.gz You can also install it directly on Fedora (as well as RHEL and their derivatives using the EPEL software repository) * using ``dnf`` and the ``mpich`` package on ``x86_64``:: $ dnf install mpi4py-mpich * using ``dnf`` and the ``openmpi`` package on ``x86_64``:: $ dnf install mpi4py-openmpi Please remember to load the correct module for your choosen MPI environment * for ``mpich`` package on ``x86_64`` do:: $ module load mpi/mpich-x86_64 $ python -c "import mpi4py" * for ``openmpi`` package on ``x86_64`` do:: $ module load mpi/openmpi-x86_64 $ python -c "import mpi4py" Citations --------- If MPI for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * L. Dalcin, R. Paz, M. Storti, and J. D'Elia, *MPI for Python: performance improvements and MPI-2 extensions*, Journal of Parallel and Distributed Computing, 68(5):655-662, 2008. http://dx.doi.org/10.1016/j.jpdc.2007.09.005 * L. Dalcin, R. Paz, and M. Storti, *MPI for Python*, Journal of Parallel and Distributed Computing, 65(9):1108-1115, 2005. http://dx.doi.org/10.1016/j.jpdc.2005.03.010 mpi4py-3.0.3/LICENSE.rst0000644000175000017500000000262313431514445015620 0ustar dalcinldalcinl00000000000000======================= LICENSE: MPI for Python ======================= :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com Copyright (c) 2019, Lisandro Dalcin. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. mpi4py-3.0.3/PKG-INFO0000664000175000017500000001416713560002767015113 0ustar dalcinldalcinl00000000000000Metadata-Version: 1.2 Name: mpi4py Version: 3.0.3 Summary: Python bindings for MPI Home-page: https://bitbucket.org/mpi4py/mpi4py/ Author: Lisandro Dalcin Author-email: dalcinl@gmail.com Maintainer: Lisandro Dalcin Maintainer-email: dalcinl@gmail.com License: BSD Download-URL: https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-3.0.3.tar.gz Description: MPI for Python ============== This package provides Python bindings for the **Message Passing Interface** (MPI_) standard. It is implemented on top of the MPI-1/2/3 specification and exposes an API which grounds on the standard MPI-2 C++ bindings. .. _MPI: http://www.mpi-forum.org/ Features -------- This package supports: * Convenient communication of any *picklable* Python object + point-to-point (send & receive) + collective (broadcast, scatter & gather, reductions) * Fast communication of Python object exposing the *Python buffer interface* (NumPy arrays, builtin bytes/string/array objects) + point-to-point (blocking/nonbloking/persistent send & receive) + collective (broadcast, block/vector scatter & gather, reductions) * Process groups and communication domains + Creation of new intra/inter communicators + Cartesian & graph topologies * Parallel input/output: + read & write + blocking/nonbloking & collective/noncollective + individual/shared file pointers & explicit offset * Dynamic process management + spawn & spawn multiple + accept/connect + name publishing & lookup * One-sided operations + remote memory access (put, get, accumulate) + passive target syncronization (start/complete & post/wait) + active target syncronization (lock & unlock) Install ------- Once you have a working MPI implementation and the ``mpicc`` compiler wrapper is on your search path, you can install this package * using ``pip``:: $ pip install mpi4py * using ``easy_install`` (deprecated):: $ easy_install mpi4py You can also install the in-development version of mpi4py * using ``pip``:: $ pip install git+https://bitbucket.org/mpi4py/mpi4py or:: $ pip install https://bitbucket.org/mpi4py/mpi4py/get/master.tar.gz * using ``easy_install`` (deprecated):: $ easy_install git+https://bitbucket.org/mpi4py/mpi4py or:: $ easy_install https://bitbucket.org/mpi4py/mpi4py/get/master.tar.gz You can also install it directly on Fedora (as well as RHEL and their derivatives using the EPEL software repository) * using ``dnf`` and the ``mpich`` package on ``x86_64``:: $ dnf install mpi4py-mpich * using ``dnf`` and the ``openmpi`` package on ``x86_64``:: $ dnf install mpi4py-openmpi Please remember to load the correct module for your choosen MPI environment * for ``mpich`` package on ``x86_64`` do:: $ module load mpi/mpich-x86_64 $ python -c "import mpi4py" * for ``openmpi`` package on ``x86_64`` do:: $ module load mpi/openmpi-x86_64 $ python -c "import mpi4py" Citations --------- If MPI for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * L. Dalcin, R. Paz, M. Storti, and J. D'Elia, *MPI for Python: performance improvements and MPI-2 extensions*, Journal of Parallel and Distributed Computing, 68(5):655-662, 2008. http://dx.doi.org/10.1016/j.jpdc.2007.09.005 * L. Dalcin, R. Paz, and M. Storti, *MPI for Python*, Journal of Parallel and Distributed Computing, 65(9):1108-1115, 2005. http://dx.doi.org/10.1016/j.jpdc.2005.03.010 Keywords: scientific computing,parallel computing,message passing interface,MPI Platform: Mac OS X Platform: Linux Platform: Solaris Platform: Unix Platform: Windows Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Science/Research Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: MacOS :: MacOS X Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: POSIX Classifier: Operating System :: POSIX :: Linux Classifier: Operating System :: POSIX :: SunOS/Solaris Classifier: Operating System :: Unix Classifier: Programming Language :: C Classifier: Programming Language :: Cython Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Scientific/Engineering Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: System :: Distributed Computing Provides: mpi4py mpi4py-3.0.3/demo/0000775000175000017500000000000013560002767014731 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/osu_barrier.py0000644000175000017500000000211012750576064017615 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_bcast( BENCHMARH = "MPI Barrier Latency Test", skip = 1000, loop = 10000, skip_large = 10, loop_large = 100, large_message_size = 8192, MAX_MSG_SIZE = 1<<20, ): comm = MPI.COMM_WORLD myid = comm.Get_rank() numprocs = comm.Get_size() if numprocs < 2: if myid == 0: errmsg = "This test requires at least two processes" else: errmsg = None raise SystemExit(errmsg) if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Latency [us]")) skip = skip_large loop = loop_large iterations = list(range(loop+skip)) # comm.Barrier() for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Barrier() t_end = MPI.Wtime() comm.Barrier() # if myid == 0: latency = (t_end - t_start) * 1e6 / loop print ('%-10d%20.2f' % (0, latency)) if __name__ == '__main__': osu_bcast() mpi4py-3.0.3/demo/mpi-ref-v1/0000775000175000017500000000000013560002767016614 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.04.py0000644000175000017500000000022712523721016020154 0ustar dalcinldalcinl00000000000000execfile('ex-3.02.py') count = 3 newtype = dtype.Create_contiguous(count) assert newtype.extent == dtype.extent * count dtype.Free() newtype.Free() mpi4py-3.0.3/demo/mpi-ref-v1/runtests.sh0000755000175000017500000000151512523721016021033 0ustar dalcinldalcinl00000000000000#!/bin/sh MPIEXEC=mpiexec NP_FLAG=-n NP=3 PYTHON=python set -x $MPIEXEC $NP_FLAG $NP $PYTHON ex-2.01.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-2.08.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-2.16.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-2.29.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-2.32.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-2.34.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-2.35.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.01.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.02.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.03.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.04.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.05.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.06.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.07.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.08.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.09.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.11.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.12.py $MPIEXEC $NP_FLAG $NP $PYTHON ex-3.13.py mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.09.py0000644000175000017500000000204012523721016020154 0ustar dalcinldalcinl00000000000000from mpi4py import MPI try: import numpy except ImportError: raise SystemExit # transpose a matrix a into b a = numpy.empty((100, 100), dtype=float, order='fortran') b = numpy.empty((100, 100), dtype=float, order='fortran') a.flat = numpy.arange(a.size, dtype=float) lb, sizeofdouble = MPI.DOUBLE.Get_extent() # create datatype dor one row # (vector with 100 double entries and stride 100) row = MPI.DOUBLE.Create_vector(100, 1, 100) # create datatype for matrix in row-major order # (one hundred copies of the row datatype, strided one word # apart; the succesive row datatypes are interleaved) xpose = row.Create_hvector(100, 1, sizeofdouble) xpose.Commit() # send matrix in row-major order and receive in column major order abuf = (a, xpose) bbuf = (b, MPI.DOUBLE) myrank = MPI.COMM_WORLD.Get_rank() status = MPI.Status() MPI.COMM_WORLD.Sendrecv(abuf, myrank, 0, bbuf, myrank, 0, status) assert numpy.allclose(a, b.transpose()) assert status.Get_count(xpose) == 1 assert status.Get_count(MPI.DOUBLE) == b.size row.Free() xpose.Free() mpi4py-3.0.3/demo/mpi-ref-v1/runtests.bat0000644000175000017500000000222213200562156021161 0ustar dalcinldalcinl00000000000000@echo off setlocal ENABLEEXTENSIONS set MPI=Microsoft MPI set PATH="%ProgramFiles%\%MPI%\bin";%PATH% set MPIEXEC=mpiexec set NP_FLAG=-n set NP=5 set PYTHON=C:\Python27\python.exe set PYTHON=C:\Python36\python.exe set PYTHON=python @echo on set MPIEXEC= set NP_FLAG= set NP= %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-2.01.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-2.08.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-2.16.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-2.29.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-2.32.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-2.34.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-2.35.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.01.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.02.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.03.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.04.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.05.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.06.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.07.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.08.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.09.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.11.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.12.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% ex-3.13.py mpi4py-3.0.3/demo/mpi-ref-v1/ex-2.01.py0000644000175000017500000000175712523721016020161 0ustar dalcinldalcinl00000000000000## mpiexec -n 2 python ex-2.01.py # Process 0 sends a message to process 1 # -------------------------------------------------------------------- from mpi4py import MPI import array if MPI.COMM_WORLD.Get_size() < 2: raise SystemExit # -------------------------------------------------------------------- s = "Hello there" msg = array.array('c', '\0'*20) tag = 99 status = MPI.Status() myrank = MPI.COMM_WORLD.Get_rank() if myrank == 0: msg[:len(s)] = array.array('c', s) MPI.COMM_WORLD.Send([msg, len(s)+1, MPI.CHAR], 1, tag) elif myrank == 1: MPI.COMM_WORLD.Recv([msg, 20, MPI.CHAR], 0, tag, status) # -------------------------------------------------------------------- if myrank == 1: assert list(msg[:len(s)]) == list(s) assert msg[len(s)] == '\0' assert status.source == 0 assert status.tag == tag assert status.error == MPI.SUCCESS assert status.Get_count(MPI.CHAR) == len(s)+1 # -------------------------------------------------------------------- mpi4py-3.0.3/demo/mpi-ref-v1/makefile0000644000175000017500000000060012523721016020277 0ustar dalcinldalcinl00000000000000.PHONY: default build test clean test_seq test_mpi default: build test clean build: PYTHON = python MPIEXEC = mpiexec NP_FLAG = -n NP = 3 test_seq: ${MAKE} MPIEXEC= NP_FLAG= NP= test_mpi test_mpi: -@for i in `ls ex-*.py`; do \ echo ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} $$i; \ ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} $$i; \ done test: test_seq test_mpi clean: mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.05.py0000644000175000017500000000027712523721016020162 0ustar dalcinldalcinl00000000000000execfile('ex-3.02.py') count = 2 blklen = 3 stride = 4 newtype = dtype.Create_vector(count, blklen, stride) assert newtype.size == dtype.size * count * blklen dtype.Free() newtype.Free() mpi4py-3.0.3/demo/mpi-ref-v1/ex-2.35.py0000644000175000017500000000133712523721016020162 0ustar dalcinldalcinl00000000000000## mpiexec -n 1 python ex-2.35.py # Calls to attach and detach buffers # -------------------------------------------------------------------- from mpi4py import MPI try: from numpy import empty except ImportError: from array import array def empty(size, dtype): return array(dtype, [0]*size) # -------------------------------------------------------------------- BUFSISE = 10000 + MPI.BSEND_OVERHEAD buff = empty(BUFSISE, dtype='b') MPI.Attach_buffer(buff) buff2 = MPI.Detach_buffer() MPI.Attach_buffer(buff2) MPI.Detach_buffer() # -------------------------------------------------------------------- assert len(buff2) == BUFSISE # -------------------------------------------------------------------- mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.03.py0000644000175000017500000000017512523721016020155 0ustar dalcinldalcinl00000000000000execfile('ex-3.02.py') assert dtype.size == MPI.DOUBLE.size + MPI.CHAR.size assert dtype.extent >= dtype.size dtype.Free() mpi4py-3.0.3/demo/mpi-ref-v1/README.txt0000644000175000017500000000066012523721016020303 0ustar dalcinldalcinl00000000000000@Book{MPI-Ref-V1, title = {{MPI} - The Complete Reference: Volume 1, The {MPI} Core}, author = {Marc Snir and Steve Otto and Steven Huss-Lederman and David Walker and Jack Dongarra}, edition = {2nd.}, year = 1998, publisher = {MIT Press}, volume = {1, The MPI Core}, series = {Scientific and Engineering Computation}, address = {Cambridge, MA, USA}, } mpi4py-3.0.3/demo/mpi-ref-v1/ex-2.29.py0000644000175000017500000000223012523721016020156 0ustar dalcinldalcinl00000000000000## mpiexec -n 3 python ex-2.29.py # Use a blocking probe to wait for an incoming message # -------------------------------------------------------------------- from mpi4py import MPI import array if MPI.COMM_WORLD.Get_size() < 3: raise SystemExit # -------------------------------------------------------------------- comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: i = array.array('i', [7]*5) comm.Send([i, MPI.INT], 2, 0) elif rank == 1: x = array.array('f', [7]*5) comm.Send([x, MPI.FLOAT], 2, 0) elif rank == 2: i = array.array('i', [0]*5) x = array.array('f', [0]*5) status = MPI.Status() for j in range(2): comm.Probe(MPI.ANY_SOURCE, 0, status) if status.Get_source() == 0: comm.Recv([i, MPI.INT], 0, 0, status) else: comm.Recv([x, MPI.FLOAT], 1, 0, status) # -------------------------------------------------------------------- if rank == 2: for v in i: assert v == 7 for v in x: assert v == 7 assert status.source in (0, 1) assert status.tag == 0 assert status.error == 0 # -------------------------------------------------------------------- mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.08.py0000644000175000017500000000160212523721016020156 0ustar dalcinldalcinl00000000000000from mpi4py import MPI try: import numpy except ImportError: raise SystemExit # extract the section a[0:6:2, 0:5:2] and store it in e[:,:] a = numpy.empty((6, 5), dtype=float, order='fortran') e = numpy.empty((3, 3), dtype=float, order='fortran') a.flat = numpy.arange(a.size, dtype=float) lb, sizeofdouble = MPI.DOUBLE.Get_extent() # create datatype for a 1D section oneslice = MPI.DOUBLE.Create_vector(3, 1, 2) # create datatype for a 2D section twoslice = oneslice.Create_hvector(3, 1, 12*sizeofdouble) twoslice.Commit() # send and recv on same process myrank = MPI.COMM_WORLD.Get_rank() status = MPI.Status() MPI.COMM_WORLD.Sendrecv([a, 1, twoslice], myrank, 0, (e, MPI.DOUBLE), myrank, 0, status) assert numpy.allclose(a[::2, ::2], e) assert status.Get_count(twoslice) == 1 assert status.Get_count(MPI.DOUBLE) == e.size oneslice.Free() twoslice.Free() mpi4py-3.0.3/demo/mpi-ref-v1/ex-2.16.py0000644000175000017500000000351412523721016020160 0ustar dalcinldalcinl00000000000000## mpiexec -n 4 python ex-2.16.py # Jacobi code # version of parallel code using sendrecv and null proceses. # -------------------------------------------------------------------- from mpi4py import MPI try: import numpy except ImportError: raise SystemExit # -------------------------------------------------------------------- n = 5 * MPI.COMM_WORLD.Get_size() # compute number of processes and myrank p = MPI.COMM_WORLD.Get_size() myrank = MPI.COMM_WORLD.Get_rank() # compute size of local block m = n/p if myrank < (n - p * m): m = m + 1 #compute neighbors if myrank == 0: left = MPI.PROC_NULL else: left = myrank - 1 if myrank == p - 1: right = MPI.PROC_NULL else: right = myrank + 1 # allocate local arrays A = numpy.empty((n+2, m+2), dtype='d', order='fortran') B = numpy.empty((n, m), dtype='d', order='fortran') A.fill(1) A[0, :] = A[-1, :] = 0 A[:, 0] = A[:, -1] = 0 # main loop converged = False while not converged: # compute, B = 0.25 * ( N + S + E + W) N, S = A[:-2, 1:-1], A[2:, 1:-1] E, W = A[1:-1, :-2], A[1:-1, 2:] numpy.add(N, S, B) numpy.add(E, B, B) numpy.add(W, B, B) B *= 0.25 A[1:-1, 1:-1] = B # communicate tag = 0 MPI.COMM_WORLD.Sendrecv([B[:, -1], MPI.DOUBLE], right, tag, [A[:, 0], MPI.DOUBLE], left, tag) MPI.COMM_WORLD.Sendrecv((B[:, 0], MPI.DOUBLE), left, tag, (A[:, -1], MPI.DOUBLE), right, tag) # convergence myconv = numpy.allclose(B, 0) loc_conv = numpy.asarray(myconv, dtype='i') glb_conv = numpy.asarray(0, dtype='i') MPI.COMM_WORLD.Allreduce([loc_conv, MPI.INT], [glb_conv, MPI.INT], op=MPI.LAND) converged = bool(glb_conv) # -------------------------------------------------------------------- mpi4py-3.0.3/demo/mpi-ref-v1/ex-2.08.py0000644000175000017500000000246512523721016020165 0ustar dalcinldalcinl00000000000000## mpiexec -n 2 python ex-2.08.py # An exchange of messages # -------------------------------------------------------------------- from mpi4py import MPI import array if MPI.COMM_WORLD.Get_size() < 2: raise SystemExit # -------------------------------------------------------------------- sendbuf = array.array('d', [0]*10) recvbuf = array.array('d', [0]*10) tag = 0 status = MPI.Status() myrank = MPI.COMM_WORLD.Get_rank() if myrank == 0: sendbuf[:] = array.array('d', range(len(sendbuf))) MPI.COMM_WORLD.Send([sendbuf, MPI.DOUBLE], 1, tag) MPI.COMM_WORLD.Recv([recvbuf, MPI.DOUBLE], 1, tag, status) elif myrank == 1: MPI.COMM_WORLD.Recv([recvbuf, MPI.DOUBLE], 0, tag, status) sendbuf[:] = recvbuf MPI.COMM_WORLD.Send([sendbuf, MPI.DOUBLE], 0, tag) # -------------------------------------------------------------------- if myrank == 0: assert status.source == 1 assert status.tag == tag assert status.error == MPI.SUCCESS assert status.Get_count(MPI.DOUBLE) == len(recvbuf) assert sendbuf == recvbuf elif myrank == 1: assert status.source == 0 assert status.tag == tag assert status.error == MPI.SUCCESS assert status.Get_count(MPI.DOUBLE) == len(recvbuf) assert sendbuf == recvbuf # -------------------------------------------------------------------- mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.07.py0000644000175000017500000000031712523721016020157 0ustar dalcinldalcinl00000000000000execfile('ex-3.02.py') count = 2 blklen = 3 stride = 4 * dtype.extent newtype = dtype.Create_hvector(count, blklen, stride) assert newtype.size == dtype.size * count * blklen dtype.Free() newtype.Free() mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.13.py0000644000175000017500000000044212523721016020153 0ustar dalcinldalcinl00000000000000from mpi4py import MPI blens = (1, 1) disps = (0, MPI.DOUBLE.size) types = (MPI.DOUBLE, MPI.CHAR) type1 = MPI.Datatype.Create_struct(blens, disps, types) B = (2, 1, 3) D = (0, 16, 26) T = (MPI.FLOAT, type1, MPI.CHAR) dtype = MPI.Datatype.Create_struct(B, D, T) type1.Free() dtype.Free() mpi4py-3.0.3/demo/mpi-ref-v1/ex-2.32.py0000644000175000017500000000441312523721016020155 0ustar dalcinldalcinl00000000000000# Jacobi computation, using persitent requests from mpi4py import MPI try: import numpy except ImportError: raise SystemExit n = 5 * MPI.COMM_WORLD.Get_size() # compute number of processes and myrank p = MPI.COMM_WORLD.Get_size() myrank = MPI.COMM_WORLD.Get_rank() # compute size of local block m = n/p if myrank < (n - p * m): m = m + 1 #compute neighbors if myrank == 0: left = MPI.PROC_NULL else: left = myrank - 1 if myrank == p - 1: right = MPI.PROC_NULL else: right = myrank + 1 # allocate local arrays A = numpy.empty((n+2, m+2), dtype=float, order='fortran') B = numpy.empty((n, m), dtype=float, order='fortran') A.fill(1) A[0, :] = A[-1, :] = 0 A[:, 0] = A[:, -1] = 0 # create persintent requests tag = 0 sreq1 = MPI.COMM_WORLD.Send_init((B[:, 0], MPI.DOUBLE), left, tag) sreq2 = MPI.COMM_WORLD.Send_init((B[:, -1], MPI.DOUBLE), right, tag) rreq1 = MPI.COMM_WORLD.Recv_init((A[:, 0], MPI.DOUBLE), left, tag) rreq2 = MPI.COMM_WORLD.Recv_init((A[:, -1], MPI.DOUBLE), right, tag) reqlist = [sreq1, sreq2, rreq1, rreq2] for req in reqlist: assert req != MPI.REQUEST_NULL # main loop converged = False while not converged: # compute boundary columns N, S = A[ :-2, 1], A[2:, 1] E, W = A[1:-1, 0], A[1:-1, 2] C = B[:, 0] numpy.add(N, S, C) numpy.add(C, E, C) numpy.add(C, W, C) C *= 0.25 N, S = A[ :-2, -2], A[2:, -2] E, W = A[1:-1, -3], A[1:-1, -1] C = B[:, -1] numpy.add(N, S, C) numpy.add(C, E, C) numpy.add(C, W, C) C *= 0.25 # start communication #MPI.Prequest.Startall(reqlist) for r in reqlist: r.Start() # compute interior N, S = A[ :-2, 2:-2], A[2, 2:-2] E, W = A[1:-1, 2:-2], A[1:-1, 2:-2] C = B[:, 1:-1] numpy.add(N, S, C) numpy.add(E, C, C) numpy.add(W, C, C) C *= 0.25 A[1:-1, 1:-1] = B # complete communication MPI.Prequest.Waitall(reqlist) # convergence myconv = numpy.allclose(B, 0) loc_conv = numpy.asarray(myconv, dtype='i') glb_conv = numpy.asarray(0, dtype='i') MPI.COMM_WORLD.Allreduce([loc_conv, MPI.INT], [glb_conv, MPI.INT], op=MPI.LAND) converged = bool(glb_conv) # free persintent requests for req in reqlist: req.Free() mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.06.py0000644000175000017500000000030012523721016020146 0ustar dalcinldalcinl00000000000000execfile('ex-3.02.py') count = 3 blklen = 1 stride = -2 newtype = dtype.Create_vector(count, blklen, stride) assert newtype.size == dtype.size * count * blklen dtype.Free() newtype.Free() mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.12.py0000644000175000017500000000020012523721016020142 0ustar dalcinldalcinl00000000000000execfile('ex-3.02.py') B = (3, 1) D = (4 * dtype.extent, 0) newtype = dtype.Create_hindexed(B, D) dtype.Free() newtype.Free() mpi4py-3.0.3/demo/mpi-ref-v1/ex-2.34.py0000644000175000017500000000224612523721016020161 0ustar dalcinldalcinl00000000000000## mpiexec -n 2 python ex-2.34.py # Use of ready-mode and synchonous-mode # -------------------------------------------------------------------- from mpi4py import MPI try: import numpy except ImportError: raise SystemExit if MPI.COMM_WORLD.Get_size() < 2: raise SystemExit # -------------------------------------------------------------------- comm = MPI.COMM_WORLD buff = numpy.empty((1000,2), dtype='f', order='fortran') rank = comm.Get_rank() if rank == 0: req1 = comm.Irecv([buff[:, 0], MPI.FLOAT], 1, 1) req2 = comm.Irecv([buff[:, 1], MPI.FLOAT], 1, 2) status = [MPI.Status(), MPI.Status()] MPI.Request.Waitall([req1, req2], status) elif rank == 1: buff[:, 0] = 5 buff[:, 1] = 7 comm.Ssend([buff[:, 1], MPI.FLOAT], 0, 2) comm.Rsend([buff[:, 0], MPI.FLOAT], 0, 1) # -------------------------------------------------------------------- all = numpy.all if rank == 0: assert all(buff[:, 0] == 5) assert all(buff[:, 1] == 7) assert status[0].source == 1 assert status[0].tag == 1 assert status[1].source == 1 assert status[1].tag == 2 # -------------------------------------------------------------------- mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.01.py0000644000175000017500000000136612523721016020156 0ustar dalcinldalcinl00000000000000from mpi4py import MPI try: import numpy except ImportError: raise SystemExit # send a upper triangular matrix N = 10 a = numpy.empty((N, N), dtype=float, order='c') b = numpy.zeros((N, N), dtype=float, order='c') a.flat = numpy.arange(a.size, dtype=float) # compute start and size of each row i = numpy.arange(N) blocklen = N - i disp = N * i + i # create datatype for upper triangular part upper = MPI.DOUBLE.Create_indexed(blocklen, disp) upper.Commit() # send and recv matrix myrank = MPI.COMM_WORLD.Get_rank() MPI.COMM_WORLD.Sendrecv((a, 1, upper), myrank, 0, [b, 1, upper], myrank, 0) assert numpy.allclose(numpy.triu(b), numpy.triu(a)) assert numpy.allclose(numpy.tril(b, -1), numpy.zeros((N,N))) upper.Free() mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.02.py0000644000175000017500000000035512523721016020154 0ustar dalcinldalcinl00000000000000from mpi4py import MPI # Type = { (double, 0), (char, 8) } blens = (1, 1) disps = (0, MPI.DOUBLE.size) types = (MPI.DOUBLE, MPI.CHAR) dtype = MPI.Datatype.Create_struct(blens, disps, types) if 'ex-3.02' in __file__: dtype.Free() mpi4py-3.0.3/demo/mpi-ref-v1/ex-3.11.py0000644000175000017500000000016012523721016020146 0ustar dalcinldalcinl00000000000000execfile('ex-3.02.py') B = (3, 1) D = (4, 0) newtype = dtype.Create_indexed(B, D) dtype.Free() newtype.Free() mpi4py-3.0.3/demo/cython/0000775000175000017500000000000013560002767016235 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/cython/makefile0000644000175000017500000000111413200562156017722 0ustar dalcinldalcinl00000000000000.PHONY: default default: build test clean PYTHON = python PYTHON_CONFIG = ${PYTHON} ../python-config CYTHON = cython .PHONY: src src: helloworld.c helloworld.c: helloworld.pyx ${CYTHON} $< MPICC = mpicc CFLAGS = -fPIC ${shell ${PYTHON_CONFIG} --includes} LDFLAGS = -shared ${shell ${PYTHON_CONFIG} --libs} SO = ${shell ${PYTHON_CONFIG} --extension-suffix} .PHONY: build build: helloworld${SO} helloworld${SO}: helloworld.c ${MPICC} ${CFLAGS} -o $@ $< ${LDFLAGS} .PHONY: test test: build ${PYTHON} -c 'import helloworld' .PHONY: clean clean: ${RM} helloworld.c helloworld${SO} mpi4py-3.0.3/demo/cython/mpi-compat.h0000644000175000017500000000044012750576064020456 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ #ifndef MPI_COMPAT_H #define MPI_COMPAT_H #include #if (MPI_VERSION < 3) && !defined(PyMPI_HAVE_MPI_Message) typedef void *PyMPI_MPI_Message; #define MPI_Message PyMPI_MPI_Message #endif #endif/*MPI_COMPAT_H*/ mpi4py-3.0.3/demo/cython/helloworld.pyx0000644000175000017500000000254613200562156021151 0ustar dalcinldalcinl00000000000000cdef extern from "mpi-compat.h": pass # --------- # Python-level module import # (file: mpi4py/MPI.so) from mpi4py import MPI # Python-level objects and code size = MPI.COMM_WORLD.Get_size() rank = MPI.COMM_WORLD.Get_rank() pname = MPI.Get_processor_name() hwmess = "Hello, World! I am process %d of %d on %s." print (hwmess % (rank, size, pname)) # --------- # Cython-level cimport # this make available mpi4py's Python extension types # (file: mpi4py/include/mpi4py/MPI.pxd) from mpi4py cimport MPI from mpi4py.MPI cimport Intracomm as IntracommType # C-level cdef, typed, Python objects cdef MPI.Comm WORLD = MPI.COMM_WORLD cdef IntracommType SELF = MPI.COMM_SELF # --------- # Cython-level cimport with PXD file # this make available the native MPI C API # with namespace-protection (stuff accessed as mpi.XXX) # (file: mpi4py/include/mpi4py/libmpi.pxd) from mpi4py cimport libmpi as mpi cdef mpi.MPI_Comm world1 = WORLD.ob_mpi cdef int ierr1=0 cdef int size1 = 0 ierr1 = mpi.MPI_Comm_size(mpi.MPI_COMM_WORLD, &size1) cdef int rank1 = 0 ierr1 = mpi.MPI_Comm_rank(mpi.MPI_COMM_WORLD, &rank1) cdef int rlen1=0 cdef char pname1[mpi.MPI_MAX_PROCESSOR_NAME] ierr1 = mpi.MPI_Get_processor_name(pname1, &rlen1) pname1[rlen1] = 0 # just in case ;-) hwmess = "Hello, World! I am process %d of %d on %s." print (hwmess % (rank1, size1, pname1)) # --------- mpi4py-3.0.3/demo/mandelbrot/0000775000175000017500000000000013560002767017060 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/mandelbrot/mandelbrot-seq.py0000644000175000017500000000202513200562156022336 0ustar dalcinldalcinl00000000000000import numpy as np import time tic = time.time() x1 = -2.0 x2 = 1.0 y1 = -1.0 y2 = 1.0 w = 150 h = 100 maxit = 127 def mandelbrot(x, y, maxit): c = x + y*1j z = 0 + 0j it = 0 while abs(z) < 2 and it < maxit: z = z**2 + c it += 1 return it dx = (x2 - x1) / w dy = (y2 - y1) / h C = np.empty([h, w], dtype='i') for k in np.arange(h): y = y1 + k * dy for j in np.arange(w): x = x1 + j * dx C[k, j] = mandelbrot(x, y, maxit) M = C toc = time.time() print('wall clock time: %8.2f seconds' % (toc-tic)) # eye candy (requires matplotlib) if 1: try: from matplotlib import pyplot as plt plt.imshow(M, aspect='equal') try: plt.nipy_spectral() except AttributeError: plt.spectral() try: import signal def action(*args): raise SystemExit signal.signal(signal.SIGALRM, action) signal.alarm(2) except: pass plt.show() except: pass mpi4py-3.0.3/demo/mandelbrot/mandelbrot-master.py0000644000175000017500000000311013200562156023035 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import numpy as np x1 = -2.0 x2 = 1.0 y1 = -1.0 y2 = 1.0 w = 600 h = 400 maxit = 255 import os dirname = os.path.abspath(os.path.dirname(__file__)) executable = os.path.join(dirname, 'mandelbrot-worker.exe') # spawn worker worker = MPI.COMM_SELF.Spawn(executable, maxprocs=7) size = worker.Get_remote_size() # send parameters rmsg = np.array([x1, x2, y1, y2], dtype='f') imsg = np.array([w, h, maxit], dtype='i') worker.Bcast([rmsg, MPI.REAL], root=MPI.ROOT) worker.Bcast([imsg, MPI.INTEGER], root=MPI.ROOT) # gather results counts = np.empty(size, dtype='i') indices = np.empty(h, dtype='i') cdata = np.empty([h, w], dtype='i') worker.Gather(sendbuf=None, recvbuf=[counts, MPI.INTEGER], root=MPI.ROOT) worker.Gatherv(sendbuf=None, recvbuf=[indices, (counts, None), MPI.INTEGER], root=MPI.ROOT) worker.Gatherv(sendbuf=None, recvbuf=[cdata, (counts * w, None), MPI.INTEGER], root=MPI.ROOT) # disconnect worker worker.Disconnect() # reconstruct full result M = np.zeros([h, w], dtype='i') M[indices, :] = cdata # eye candy (requires matplotlib) if 1: try: from matplotlib import pyplot as plt plt.imshow(M, aspect='equal') try: plt.nipy_spectral() except AttributeError: plt.spectral() try: import signal def action(*args): raise SystemExit signal.signal(signal.SIGALRM, action) signal.alarm(2) except: pass plt.show() except: pass mpi4py-3.0.3/demo/mandelbrot/makefile0000644000175000017500000000075313200562156020555 0ustar dalcinldalcinl00000000000000.PHONY: default build test clean default: build test clean build: mandelbrot-worker.exe MPIF90=mpif90 FFLAGS= -O3 ifneq (${MPI_FORTRAN_MOD_DIR},) FFLAGS += -I${MPI_FORTRAN_MOD_DIR} endif mandelbrot-worker.exe: mandelbrot-worker.f90 ${MPIF90} ${FFLAGS} -o $@ $< PYTHON=python MPIEXEC=mpiexec NP_FLAG=-n test: build ${MPIEXEC} ${NP_FLAG} 1 ${PYTHON} mandelbrot-master.py ${MPIEXEC} ${NP_FLAG} 7 ${PYTHON} mandelbrot.py ${PYTHON} mandelbrot-seq.py clean: ${RM} mandelbrot-worker.exe mpi4py-3.0.3/demo/mandelbrot/mandelbrot.py0000644000175000017500000000513113200562156021551 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import numpy as np tic = MPI.Wtime() x1 = -2.0 x2 = 1.0 y1 = -1.0 y2 = 1.0 w = 150 h = 100 maxit = 127 def mandelbrot(x, y, maxit): c = x + y*1j z = 0 + 0j it = 0 while abs(z) < 2 and it < maxit: z = z**2 + c it += 1 return it comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() rmsg = np.empty(4, dtype='f') imsg = np.empty(3, dtype='i') if rank == 0: rmsg[:] = [x1, x2, y1, y2] imsg[:] = [w, h, maxit] comm.Bcast([rmsg, MPI.FLOAT], root=0) comm.Bcast([imsg, MPI.INT], root=0) x1, x2, y1, y2 = [float(r) for r in rmsg] w, h, maxit = [int(i) for i in imsg] dx = (x2 - x1) / w dy = (y2 - y1) / h # number of lines to compute here N = h // size + (h % size > rank) N = np.array(N, dtype='i') # indices of lines to compute here I = np.arange(rank, h, size, dtype='i') # compute local lines C = np.empty([N, w], dtype='i') for k in np.arange(N): y = y1 + I[k] * dy for j in np.arange(w): x = x1 + j * dx C[k, j] = mandelbrot(x, y, maxit) # gather results at root counts = 0 indices = None cdata = None if rank == 0: counts = np.empty(size, dtype='i') indices = np.empty(h, dtype='i') cdata = np.empty([h, w], dtype='i') comm.Gather(sendbuf=[N, MPI.INT], recvbuf=[counts, MPI.INT], root=0) comm.Gatherv(sendbuf=[I, MPI.INT], recvbuf=[indices, (counts, None), MPI.INT], root=0) comm.Gatherv(sendbuf=[C, MPI.INT], recvbuf=[cdata, (counts*w, None), MPI.INT], root=0) # reconstruct full result at root if rank == 0: M = np.zeros([h,w], dtype='i') M[indices, :] = cdata toc = MPI.Wtime() wct = comm.gather(toc-tic, root=0) if rank == 0: for task, time in enumerate(wct): print('wall clock time: %8.2f seconds (task %d)' % (time, task)) def mean(seq): return sum(seq)/len(seq) print ('all tasks, mean: %8.2f seconds' % mean(wct)) print ('all tasks, min: %8.2f seconds' % min(wct)) print ('all tasks, max: %8.2f seconds' % max(wct)) print ('all tasks, sum: %8.2f seconds' % sum(wct)) # eye candy (requires matplotlib) if rank == 0: try: from matplotlib import pyplot as plt plt.imshow(M, aspect='equal') try: plt.nipy_spectral() except AttributeError: plt.spectral() try: import signal def action(*args): raise SystemExit signal.signal(signal.SIGALRM, action) signal.alarm(2) except: pass plt.show() except: pass MPI.COMM_WORLD.Barrier() mpi4py-3.0.3/demo/mandelbrot/mandelbrot-worker.f900000644000175000017500000000447312523721016023035 0ustar dalcinldalcinl00000000000000! $ mpif90 -o mandelbrot.exe mandelbrot.f90 program main use MPI implicit none integer master, nprocs, myrank, ierr real :: rmsg(4), x1, x2, y1, y2 integer :: imsg(3), w, h, maxit integer :: N integer, allocatable :: I(:) integer, allocatable :: C(:,:) integer :: j, k real :: x, dx, y, dy call MPI_Init(ierr) call MPI_Comm_get_parent(master, ierr) if (master == MPI_COMM_NULL) then print *, "parent communicator is MPI_COMM_NULL" call MPI_Abort(MPI_COMM_WORLD, 1, ierr) end if call MPI_Comm_size(master, nprocs, ierr) call MPI_Comm_rank(master, myrank, ierr) ! receive parameters and unpack call MPI_Bcast(rmsg, 4, MPI_REAL, 0, master, ierr) call MPI_Bcast(imsg, 3, MPI_INTEGER, 0, master, ierr) x1 = rmsg(1); x2 = rmsg(2) y1 = rmsg(3); y2 = rmsg(4) w = imsg(1); h = imsg(2); maxit = imsg(3) dx = (x2-x1)/real(w) dy = (y2-y1)/real(h) ! number of lines to compute here N = h / nprocs if (modulo(h, nprocs) > myrank) then N = N + 1 end if ! indices of lines to compute here allocate( I(0:N-1) ) I = (/ (k, k=myrank, h-1, nprocs) /) ! compute local lines allocate( C(0:w-1, 0:N-1) ) do k = 0, N-1 y = y1 + real(I(k)) * dy do j = 0, w-1 x = x1 + real(j) * dx C(j, k) = mandelbrot(x, y, maxit) end do end do ! send number of lines computed here call MPI_Gather(N, 1, MPI_INTEGER, & MPI_BOTTOM, 0, MPI_BYTE, & 0, master, ierr) ! send indices of lines computed here call MPI_Gatherv(I, N, MPI_INTEGER, & MPI_BOTTOM, MPI_BOTTOM, MPI_BOTTOM, MPI_BYTE, & 0, master, ierr) ! send data of lines computed here call MPI_Gatherv(C, N*w, MPI_INTEGER, & MPI_BOTTOM, MPI_BOTTOM, MPI_BOTTOM, MPI_BYTE, & 0, master, ierr) deallocate(C) deallocate(I) ! we are done call MPI_Comm_disconnect(master, ierr) call MPI_Finalize(ierr) contains function mandelbrot(x, y, maxit) result (it) implicit none real, intent(in) :: x, y integer, intent(in) :: maxit integer :: it complex :: z, c z = cmplx(0, 0) c = cmplx(x, y) it = 0 do while (abs(z) < 2.0 .and. it < maxit) z = z*z + c it = it + 1 end do end function mandelbrot end program main mpi4py-3.0.3/demo/threads/0000775000175000017500000000000013560002767016363 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/threads/makefile0000644000175000017500000000017012523721016020050 0ustar dalcinldalcinl00000000000000.PHONY: default build test clean default: build test clean PYTHON=python build: test: ${PYTHON} sendrecv.py clean:mpi4py-3.0.3/demo/threads/sendrecv.py0000644000175000017500000000213712523721016020540 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import sys if MPI.Query_thread() < MPI.THREAD_MULTIPLE: sys.stderr.write("MPI does not provide enough thread support\n") sys.exit(0) try: import threading except ImportError: sys.stderr.write("threading module not available\n") sys.exit(0) try: import numpy except ImportError: sys.stderr.write("NumPy package not available\n") sys.exit(0) send_msg = numpy.arange(1000000, dtype='i') recv_msg = numpy.zeros_like(send_msg) start_event = threading.Event() def self_send(): start_event.wait() comm = MPI.COMM_WORLD rank = comm.Get_rank() comm.Send([send_msg, MPI.INT], dest=rank, tag=0) def self_recv(): start_event.wait() comm = MPI.COMM_WORLD rank = comm.Get_rank() comm.Recv([recv_msg, MPI.INT], source=rank, tag=0) send_thread = threading.Thread(target=self_send) recv_thread = threading.Thread(target=self_recv) for t in (recv_thread, send_thread): t.start() assert not numpy.allclose(send_msg, recv_msg) start_event.set() for t in (recv_thread, send_thread): t.join() assert numpy.allclose(send_msg, recv_msg) mpi4py-3.0.3/demo/wrap-swig/0000775000175000017500000000000013560002767016651 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/wrap-swig/makefile0000644000175000017500000000147612750576064020365 0ustar dalcinldalcinl00000000000000.PHONY: default default: build test clean PYTHON = python PYTHON_CONFIG = ${PYTHON} ../python-config MPI4PY_INCLUDE = ${shell ${PYTHON} -c 'import mpi4py; print( mpi4py.get_include() )'} SWIG = swig SWIG_PY = ${SWIG} -python .PHONY: src src: helloworld_wrap.c helloworld_wrap.c: helloworld.i ${SWIG_PY} -I${MPI4PY_INCLUDE} -o $@ $< MPICC = mpicc CFLAGS = -fPIC ${shell ${PYTHON_CONFIG} --includes} LDFLAGS = -shared ${shell ${PYTHON_CONFIG} --libs} SO = ${shell ${PYTHON_CONFIG} --extension-suffix} .PHONY: build build: _helloworld${SO} _helloworld${SO}: helloworld_wrap.c ${MPICC} ${CFLAGS} -I${MPI4PY_INCLUDE} -o $@ $< ${LDFLAGS} MPIEXEC = mpiexec NP_FLAG = -n NP = 5 .PHONY: test test: build ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test.py .PHONY: clean clean: ${RM} helloworld_wrap.c helloworld.py* _helloworld${SO} mpi4py-3.0.3/demo/wrap-swig/test.py0000644000175000017500000000033212523721016020167 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import helloworld as hw null = MPI.COMM_NULL hw.sayhello(null) comm = MPI.COMM_WORLD hw.sayhello(comm) try: hw.sayhello(list()) except: pass else: assert 0, "exception not raised" mpi4py-3.0.3/demo/wrap-swig/helloworld.i0000644000175000017500000000121612523721016021165 0ustar dalcinldalcinl00000000000000%module helloworld %{ #define MPICH_SKIP_MPICXX 1 #define OMPI_SKIP_MPICXX 1 #include #include void sayhello(MPI_Comm comm) { int size, rank; char pname[MPI_MAX_PROCESSOR_NAME]; int len; if (comm == MPI_COMM_NULL) { printf("You passed MPI_COMM_NULL !!!\n"); return; } MPI_Comm_size(comm, &size); MPI_Comm_rank(comm, &rank); MPI_Get_processor_name(pname, &len); pname[len] = 0; printf("Hello, World! I am process %d of %d on %s.\n", rank, size, pname); } %} %include mpi4py/mpi4py.i %mpi4py_typemap(Comm, MPI_Comm); void sayhello(MPI_Comm comm); /* * Local Variables: * mode: C * End: */ mpi4py-3.0.3/demo/nxtval/0000775000175000017500000000000013560002767016245 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/nxtval/nxtval-threads.py0000644000175000017500000000431212523721016021552 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- from mpi4py import MPI from array import array from threading import Thread class Counter(object): def __init__(self, comm): # duplicate communicator assert not comm.Is_inter() self.comm = comm.Dup() # start counter thread self.thread = None rank = self.comm.Get_rank() if rank == 0: self.thread = Thread(target=self._counter_thread) self.thread.start() def _counter_thread(self): incr = array('i', [0]) ival = array('i', [0]) status = MPI.Status() while True: # server loop self.comm.Recv([incr, MPI.INT], MPI.ANY_SOURCE, MPI.ANY_TAG, status) if status.Get_tag() == 1: return self.comm.Send([ival, MPI.INT], status.Get_source(), 0) ival[0] += incr[0] def free(self): self.comm.Barrier() # stop counter thread rank = self.comm.Get_rank() if rank == 0: self.comm.Send([None, MPI.INT], 0, 1) self.thread.join() # self.comm.Free() def next(self): incr = array('i', [1]) ival = array('i', [0]) self.comm.Send([incr, MPI.INT], 0, 0) self.comm.Recv([ival, MPI.INT], 0, 0) nxtval = ival[0] return nxtval # ----------------------------------------------------------------------------- def test_thread_level(): import sys flag = (MPI.Query_thread() == MPI.THREAD_MULTIPLE) flag = MPI.COMM_WORLD.bcast(flag, root=0) if not flag: if MPI.COMM_WORLD.Get_rank() == 0: sys.stderr.write("MPI does not provide enough thread support\n") sys.exit(0) def test(): vals = [] counter = Counter(MPI.COMM_WORLD) for i in range(5): c = counter.next() vals.append(c) counter.free() vals = MPI.COMM_WORLD.allreduce(vals) assert sorted(vals) == list(range(len(vals))) if __name__ == '__main__': test_thread_level() test() # ----------------------------------------------------------------------------- mpi4py-3.0.3/demo/nxtval/runtests.sh0000755000175000017500000000040412523721016020460 0ustar dalcinldalcinl00000000000000#!/bin/sh MPIEXEC=mpiexec NP_FLAG=-n NP=5 PYTHON=python set -x $MPIEXEC $NP_FLAG $NP $PYTHON nxtval-threads.py $MPIEXEC $NP_FLAG $NP $PYTHON nxtval-dynproc.py $MPIEXEC $NP_FLAG $NP $PYTHON nxtval-onesided.py $MPIEXEC $NP_FLAG $NP $PYTHON nxtval-scalable.py mpi4py-3.0.3/demo/nxtval/runtests.bat0000644000175000017500000000073113200562156020615 0ustar dalcinldalcinl00000000000000@echo off setlocal ENABLEEXTENSIONS set MPI=Microsoft MPI set PATH="%ProgramFiles%\%MPI%\bin";%PATH% set MPIEXEC=mpiexec set NP_FLAG=-n set NP=5 set PYTHON=C:\Python27\python.exe set PYTHON=C:\Python36\python.exe set PYTHON=python @echo on %MPIEXEC% %NP_FLAG% %NP% %PYTHON% nxtval-threads.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% nxtval-dynproc.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% nxtval-onesided.py %MPIEXEC% %NP_FLAG% %NP% %PYTHON% nxtval-scalable.py mpi4py-3.0.3/demo/nxtval/nxtval-mpi3.py0000644000175000017500000000410513200562156020771 0ustar dalcinldalcinl00000000000000from mpi4py import MPI from array import array as _array import struct as _struct # -------------------------------------------------------------------- class Counter(object): def __init__(self, comm): rank = comm.Get_rank() itemsize = MPI.INT.Get_size() if rank == 0: n = 1 else: n = 0 self.win = MPI.Win.Allocate(n*itemsize, itemsize, MPI.INFO_NULL, comm) if rank == 0: mem = self.win.tomemory() mem[:] = _struct.pack('i', 0) def free(self): self.win.Free() def next(self, increment=1): incr = _array('i', [increment]) nval = _array('i', [0]) self.win.Lock(0) self.win.Get_accumulate([incr, 1, MPI.INT], [nval, 1, MPI.INT], 0, op=MPI.SUM) self.win.Unlock(0) return nval[0] # ----------------------------------------------------------------------------- class Mutex(object): def __init__(self, comm): self.counter = Counter(comm) def __enter__(self): self.lock() return self def __exit__(self, *exc): self.unlock() return None def free(self): self.counter.free() def lock(self): value = self.counter.next(+1) while value != 0: value = self.counter.next(-1) value = self.counter.next(+1) def unlock(self): self.counter.next(-1) # ----------------------------------------------------------------------------- def test_counter(): vals = [] counter = Counter(MPI.COMM_WORLD) for i in range(5): c = counter.next() vals.append(c) counter.free() vals = MPI.COMM_WORLD.allreduce(vals) assert sorted(vals) == list(range(len(vals))) def test_mutex(): mutex = Mutex(MPI.COMM_WORLD) mutex.lock() mutex.unlock() mutex.free() if __name__ == '__main__': test_counter() test_mutex() # ----------------------------------------------------------------------------- mpi4py-3.0.3/demo/nxtval/makefile0000644000175000017500000000054012750576064017750 0ustar dalcinldalcinl00000000000000MPIEXEC=mpiexec NP_FLAG=-n NP=5 PYTHON=python .PHONY: test test: ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} nxtval-threads.py ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} nxtval-dynproc.py ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} nxtval-onesided.py ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} nxtval-scalable.py # ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} nxtval-mpi3.py mpi4py-3.0.3/demo/nxtval/nxtval-scalable.py0000644000175000017500000001002712750576064021703 0ustar dalcinldalcinl00000000000000from mpi4py import MPI # ----------------------------------------------------------------------------- import struct as _struct try: from numpy import empty as _empty def _array_new(size, typecode, init=0): a = _empty(size, typecode) a.fill(init) return a def _array_set(ary, value): ary.fill(value) def _array_sum(ary): return ary.sum() except ImportError: from array import array as _array def _array_new(size, typecode, init=0): return _array(typecode, [init]) * size def _array_set(ary, value): for i, _ in enumerate(ary): ary[i] = value def _array_sum(ary): return sum(ary, 0) # ----------------------------------------------------------------------------- class Counter(object): def __init__(self, comm, init=0): # size = comm.Get_size() rank = comm.Get_rank() mask = 1 while mask < size: mask <<= 1 mask >>= 1 idx = 0 get_idx = [] acc_idx = [] while mask >= 1: left = idx + 1 right = idx + (mask<<1) if rank < mask: acc_idx.append( left ) get_idx.append( right ) idx = left else: acc_idx.append( right ) get_idx.append( left ) idx = right rank = rank % mask mask >>= 1 # typecode = 'i' datatype = MPI.INT itemsize = datatype.Get_size() # root = 0 rank = comm.Get_rank() if rank == root: nlevels = len(get_idx) + 1 nentries = (1< 1 and sys.argv[0] == __file__ and sys.argv[1] == '--child'): _counter_child() sys.exit(0) # -------------------------------------------------------------------- def test(): vals = [] counter = Counter(MPI.COMM_WORLD) for i in range(5): c = counter.next() vals.append(c) counter.free() # vals = MPI.COMM_WORLD.allreduce(vals) assert sorted(vals) == list(range(len(vals))) if __name__ == '__main__': test() # -------------------------------------------------------------------- mpi4py-3.0.3/demo/test-run/0000775000175000017500000000000013560002767016512 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/test-run/test_run.py0000644000175000017500000001376213200562156020730 0ustar dalcinldalcinl00000000000000import sys, os, shlex import subprocess as sp import unittest import mpi4py def find_executable(exe): from distutils.spawn import find_executable as find_exe command = shlex.split(exe) executable = find_exe(command[0]) if executable: command[0] = executable return ' '.join(command) def find_mpiexec(mpiexec='mpiexec'): mpiexec = os.environ.get('MPIEXEC') or mpiexec mpiexec = find_executable(mpiexec) if not mpiexec and sys.platform.startswith('win'): MSMPI_BIN = os.environ.get('MSMPI_BIN', '') mpiexec = os.path.join(MSMPI_BIN, mpiexec) mpiexec = find_executable(mpiexec) if not mpiexec: mpiexec = find_executable('mpirun') return mpiexec def launcher(np): mpiexec = find_mpiexec() python = sys.executable if 'coverage' in sys.modules: python += ' -m coverage run -p -m' module = 'mpi4py.run -rc threads=False' command = '{mpiexec} -n {np} {python} -m {module}' return shlex.split(command.format(**vars())) def execute(np, command, args=''): env = os.environ.copy() pypath = os.environ.get('PYTHONPATH', '').split(os.pathsep) pypath.insert(0, os.path.abspath(os.path.dirname(mpi4py.__path__[0]))) env['PYTHONPATH'] = os.pathsep.join(pypath) if isinstance(command, str): command = shlex.split(command) if isinstance(args, str): args = shlex.split(args) cmdline = launcher(np) + command + args p = sp.Popen(cmdline, stdout=sp.PIPE, stderr=sp.PIPE, env=env, bufsize=0) stdout, stderr = p.communicate() return p.returncode, stdout.decode(), stderr.decode() class BaseTestRun(object): def assertMPIAbort(self, stdout, stderr): if not ('MPI_Abort' in stdout or 'MPI_ABORT' in stdout or 'MPI_Abort' in stderr or 'MPI_ABORT' in stderr): msg = ("expecting MPI_Abort() message in stdout/stderr:\n" "[stdout]:\n{0}\n[stderr]:\n{1}\n").format(stdout, stderr) raise self.failureException(msg) class TestRunScript(BaseTestRun, unittest.TestCase): pyfile = 'run-script.py' def execute(self, args='', np=1): dirname = os.path.abspath(os.path.dirname(__file__)) script = os.path.join(dirname, self.pyfile) return execute(np, script, args) def testSuccess(self): success = 'Hello, World!' for np in (1, 2, 3): status, stdout, stderr = self.execute(np=np) self.assertEqual(status, 0) self.assertEqual(stderr, '') self.assertEqual(stdout.count(success), np) def testException(self): message = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' excmess = 'RuntimeError: {0}'.format(message) for np in (1, 2, 3): for rank in range(0, np): args = ['--rank', str(rank), '--exception', message] status, stdout, stderr = self.execute(args, np) self.assertEqual(status, 1) self.assertMPIAbort(stdout, stderr) self.assertTrue(excmess in stderr) def testSysExitCode(self): errcode = 7 for np in (1, 2, 3): for r in sorted(set([0, np-1])): args = ['--rank', str(r), '--sys-exit', str(errcode)] status, stdout, stderr = self.execute(args, np) self.assertTrue(status in (errcode, 1)) self.assertMPIAbort(stdout, stderr) self.assertTrue('Traceback' not in stderr) def testSysExitMess(self): exitmsg = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' for np in (1, 2, 3): for r in sorted(set([0, np-1])): args = ['--rank', str(r), '--sys-exit-msg', exitmsg] status, stdout, stderr = self.execute(args, np) self.assertEqual(status, 1) self.assertMPIAbort(stdout, stderr) self.assertTrue('Traceback' not in stderr) self.assertTrue(exitmsg in stderr) if os.path.exists(os.path.join(os.path.dirname(__file__), 'run-directory')): class TestRunDirectory(TestRunScript): pyfile = 'run-directory' if os.path.exists(os.path.join(os.path.dirname(__file__), 'run-zipfile.zip')): class TestRunZipFile(TestRunScript): pyfile = 'run-zipfile.zip' class TestRunModule(BaseTestRun, unittest.TestCase): def execute(self, module, np=1): return execute(np, '-m', module) def testSuccess(self): module = 'mpi4py.bench --no-threads helloworld' message = 'Hello, World!' for np in (1, 2, 3): status, stdout, stderr = self.execute(module, np) self.assertEqual(status, 0) self.assertEqual(stdout.count(message), np) self.assertEqual(stderr, '') class TestRunCommand(BaseTestRun, unittest.TestCase): def execute(self, command, np=1): return execute(np, '-c', command) def testArgv0(self): command = '"import sys; print(sys.argv[0])"' status, stdout, stderr = self.execute(command, 1) self.assertEqual(status, 0) self.assertEqual(stdout, '-c\n') self.assertEqual(stderr, '') def testSuccess(self): command = '"from mpi4py import MPI"' for np in (1, 2, 3): status, stdout, stderr = self.execute(command, np) self.assertEqual(status, 0) self.assertEqual(stdout, '') self.assertEqual(stderr, '') def testException(self): command = '"from mpi4py import MPI; 1/0 if MPI.COMM_WORLD.Get_rank()==0 else 0;"' excmess = 'ZeroDivisionError:' for np in (1, 2, 3): for rank in range(0, np): status, stdout, stderr = self.execute(command, np) self.assertEqual(status, 1) self.assertMPIAbort(stdout, stderr) self.assertTrue(excmess in stderr) if not find_mpiexec(): del TestRunScript try: del TestRunDirectory except: pass try: del TestRunZipFile except: pass del TestRunModule del TestRunCommand if __name__ == '__main__': unittest.main() mpi4py-3.0.3/demo/test-run/run-script.py0000644000175000017500000000247013200562156021165 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import sys, os, optparse assert __name__ == '__main__' from os.path import split, splitext, dirname, realpath dirname = dirname(__file__) assert sys.path[0] == realpath(dirname) if split(__file__)[1] == '__main__.py': if splitext(dirname)[0] == '.zip': assert sys.argv[0] == dirname else: assert realpath(sys.argv[0]) == realpath(dirname) else: assert sys.argv[0] == __file__ parser = optparse.OptionParser() parser.add_option("--rank", action='store', type='int', dest="rank", default=0) parser.add_option("--sys-exit", action='store', type='int', dest="sys_exit", default=None) parser.add_option("--sys-exit-msg", action="store", type="string", dest="sys_exit", default=None) parser.add_option("--exception", action="store", type="string", dest="exception", default=None) (options, args) = parser.parse_args() assert not args comm = MPI.COMM_WORLD if comm.rank == options.rank: if options.sys_exit: sys.exit(options.sys_exit) if options.exception: raise RuntimeError(options.exception) comm.Barrier() if comm.rank > 0: comm.Recv([None, 'B'], comm.rank - 1) print("Hello, World!") if comm.rank < comm.size - 1: comm.Send([None, 'B'], comm.rank + 1) comm.Barrier() sys.exit() mpi4py-3.0.3/demo/test-run/makefile0000644000175000017500000000046513200562156020207 0ustar dalcinldalcinl00000000000000.PHONY: default default: build test clean PYTHON = python .PHONY: build build: mkdir -p run-directory/ cp run-script.py run-directory/__main__.py zip -qj run-zipfile.zip run-directory/__main__.py .PHONY: test test: ${PYTHON} test_run.py -v .PHONY: clean clean: ${RM} -r run-directory run-zipfile.zip mpi4py-3.0.3/demo/osu_alltoall.py0000644000175000017500000000322112750576064017777 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_alltoall( BENCHMARH = "MPI All-to-All Latency Test", skip = 200, loop = 1000, skip_large = 10, loop_large = 100, large_message_size = 8192, MAX_MSG_SIZE = 1<<20, ): comm = MPI.COMM_WORLD myid = comm.Get_rank() numprocs = comm.Get_size() s_buf = allocate(MAX_MSG_SIZE*numprocs) r_buf = allocate(MAX_MSG_SIZE*numprocs) if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Latency [us]")) for size in message_sizes(MAX_MSG_SIZE): if size > large_message_size: skip = skip_large loop = loop_large iterations = list(range(loop+skip)) s_msg = [s_buf, size, MPI.BYTE] r_msg = [r_buf, size, MPI.BYTE] # comm.Barrier() for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Alltoall(s_msg, r_msg) t_end = MPI.Wtime() comm.Barrier() # if myid == 0: latency = (t_end - t_start) * 1e6 / loop print ('%-10d%20.2f' % (size, latency)) def message_sizes(max_size): return [0] + [(1< target: partial = op(tmp, partial) recvobj = op(tmp, recvobj) else: tmp = op(partial, tmp) partial = tmp mask <<= 1 return recvobj def exscan(self, sendobj=None, recvobj=None, op=MPI.SUM): size = self.size rank = self.rank tag = MPI.COMM_WORLD.Get_attr(MPI.TAG_UB)-1 recvobj = sendobj partial = sendobj mask = 1 flag = False while mask < size: target = rank ^ mask if target < size: tmp = self.sendrecv(partial, dest=target, source=target, sendtag=tag, recvtag=tag) if rank > target: partial = op(tmp, partial) if rank != 0: if not flag: recvobj = tmp flag = True else: recvobj = op(tmp, recvobj) else: tmp = op(partial, tmp) partial = tmp mask <<= 1 if rank == 0: recvobj = None return recvobj mpi4py-3.0.3/demo/reductions/test_reductions.py0000644000175000017500000001424312750576064022710 0ustar dalcinldalcinl00000000000000#import mpi4py #mpi4py.profile("mpe") from mpi4py import MPI import unittest import sys, os sys.path.insert(0, os.path.dirname(__file__)) from reductions import Intracomm del sys.path[0] class BaseTest(object): def test_reduce(self): rank = self.comm.rank size = self.comm.size for root in range(size): msg = rank res = self.comm.reduce(sendobj=msg, root=root) if self.comm.rank == root: self.assertEqual(res, sum(range(size))) else: self.assertEqual(res, None) def test_reduce_min(self): rank = self.comm.rank size = self.comm.size for root in range(size): msg = rank res = self.comm.reduce(sendobj=msg, op=MPI.MIN, root=root) if self.comm.rank == root: self.assertEqual(res, 0) else: self.assertEqual(res, None) def test_reduce_max(self): rank = self.comm.rank size = self.comm.size for root in range(size): msg = rank res = self.comm.reduce(sendobj=msg, op=MPI.MAX, root=root) if self.comm.rank == root: self.assertEqual(res, size-1) else: self.assertEqual(res, None) def test_reduce_minloc(self): rank = self.comm.rank size = self.comm.size for root in range(size): msg = rank res = self.comm.reduce(sendobj=(msg, rank), op=MPI.MINLOC, root=root) if self.comm.rank == root: self.assertEqual(res, (0, 0)) else: self.assertEqual(res, None) def test_reduce_maxloc(self): rank = self.comm.rank size = self.comm.size for root in range(size): msg = rank res = self.comm.reduce(sendobj=(msg, rank), op=MPI.MAXLOC, root=root) if self.comm.rank == root: self.assertEqual(res, (size-1, size-1)) else: self.assertEqual(res, None) def test_allreduce(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.allreduce(sendobj=msg) self.assertEqual(res, sum(range(size))) def test_allreduce_min(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.allreduce(sendobj=msg, op=MPI.MIN) self.assertEqual(res, 0) def test_allreduce_max(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.allreduce(sendobj=msg, op=MPI.MAX) self.assertEqual(res, size-1) def test_allreduce_minloc(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.allreduce(sendobj=(msg, rank), op=MPI.MINLOC) self.assertEqual(res, (0, 0)) def test_allreduce_maxloc(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.allreduce(sendobj=(msg, rank), op=MPI.MAXLOC) self.assertEqual(res, (size-1, size-1)) def test_scan(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.scan(sendobj=msg) self.assertEqual(res, sum(list(range(size))[:rank+1])) def test_scan_min(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.scan(sendobj=msg, op=MPI.MIN) self.assertEqual(res, 0) def test_scan_max(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.scan(sendobj=msg, op=MPI.MAX) self.assertEqual(res, rank) def test_scan_minloc(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.scan(sendobj=(msg, rank), op=MPI.MINLOC) self.assertEqual(res, (0, 0)) def test_scan_maxloc(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.scan(sendobj=(msg, rank), op=MPI.MAXLOC) self.assertEqual(res, (rank, rank)) def test_exscan(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.exscan(sendobj=msg) if self.comm.rank == 0: self.assertEqual(res, None) else: self.assertEqual(res, sum(list(range(size))[:rank])) def test_exscan_min(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.exscan(sendobj=msg, op=MPI.MIN) if self.comm.rank == 0: self.assertEqual(res, None) else: self.assertEqual(res, 0) def test_exscan_max(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.exscan(sendobj=msg, op=MPI.MAX) if self.comm.rank == 0: self.assertEqual(res, None) else: self.assertEqual(res, rank-1) def test_exscan_minloc(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.exscan(sendobj=(msg, rank), op=MPI.MINLOC) if self.comm.rank == 0: self.assertEqual(res, None) else: self.assertEqual(res, (0, 0)) def test_exscan_maxloc(self): rank = self.comm.rank size = self.comm.size msg = rank res = self.comm.exscan(sendobj=(msg, rank), op=MPI.MAXLOC) if self.comm.rank == 0: self.assertEqual(res, None) else: self.assertEqual(res, (rank-1, rank-1)) class TestS(BaseTest, unittest.TestCase): def setUp(self): self.comm = Intracomm(MPI.COMM_SELF) class TestW(BaseTest, unittest.TestCase): def setUp(self): self.comm = Intracomm(MPI.COMM_WORLD) class TestSD(BaseTest, unittest.TestCase): def setUp(self): self.comm = Intracomm(MPI.COMM_SELF.Dup()) def tearDown(self): self.comm.Free() class TestWD(BaseTest, unittest.TestCase): def setUp(self): self.comm = Intracomm(MPI.COMM_WORLD.Dup()) def tearDown(self): self.comm.Free() if __name__ == "__main__": unittest.main() mpi4py-3.0.3/demo/sequential/0000775000175000017500000000000013560002767017103 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/sequential/runtests.sh0000755000175000017500000000015412523721016021320 0ustar dalcinldalcinl00000000000000#!/bin/sh MPIEXEC=mpiexec NP_FLAG=-n NP=5 PYTHON=python set -x $MPIEXEC $NP_FLAG $NP $PYTHON test_seq.py mpi4py-3.0.3/demo/sequential/runtests.bat0000644000175000017500000000046213200562156021454 0ustar dalcinldalcinl00000000000000@echo off setlocal ENABLEEXTENSIONS set MPI=Microsoft MPI set PATH="%ProgramFiles%\%MPI%\bin";%PATH% set MPIEXEC=mpiexec set NP_FLAG=-n set NP=5 set PYTHON=C:\Python27\python.exe set PYTHON=C:\Python36\python.exe set PYTHON=python @echo on %MPIEXEC% %NP_FLAG% %NP% %PYTHON% test_seq.py mpi4py-3.0.3/demo/sequential/test_seq.py0000644000175000017500000000074112750576064021312 0ustar dalcinldalcinl00000000000000#import mpi4py #mpi4py.profile("mpe") from mpi4py import MPI import unittest import sys, os sys.path.insert(0, os.path.dirname(__file__)) from seq import Seq del sys.path[0] def test(): size = MPI.COMM_WORLD.Get_size() rank = MPI.COMM_WORLD.Get_rank() name = MPI.Get_processor_name() with Seq(MPI.COMM_WORLD, 1, 10): print( "Hello, World! I am process %d of %d on %s." % (rank, size, name)) if __name__ == "__main__": test() mpi4py-3.0.3/demo/sequential/makefile0000644000175000017500000000022512523721016020571 0ustar dalcinldalcinl00000000000000MPIEXEC=mpiexec NP_FLAG=-n NP=5 PYTHON=python .PHONY: test test: ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test_seq.py ${RM} -r *.py[co] __pycache__ mpi4py-3.0.3/demo/sequential/seq.py0000644000175000017500000000243412523721016020237 0ustar dalcinldalcinl00000000000000class Seq(object): """ Sequential execution """ def __init__(self, comm, ng=1, tag=0): ng = int(ng) tag = int(tag) assert ng >= 1 assert ng <= comm.Get_size() self.comm = comm self.ng = ng self.tag = tag def __enter__(self): self.begin() return self def __exit__(self, *exc): self.end() return None def begin(self): """ Begin a sequential execution of a section of code """ comm = self.comm size = comm.Get_size() if size == 1: return rank = comm.Get_rank() ng = self.ng tag = self.tag if rank != 0: comm.Recv([None, 'B'], rank - 1, tag) if rank != (size - 1) and (rank % ng) < (ng - 1): comm.Send([None, 'B'], rank + 1, tag) def end(self): """ End a sequential execution of a section of code """ comm = self.comm size = comm.Get_size() if size == 1: return rank = comm.Get_rank() ng = self.ng tag = self.tag if rank == (size - 1) or (rank % ng) == (ng - 1): comm.Send([None, 'B'], (rank + 1) % size, tag) if rank == 0: comm.Recv([None, 'B'], size - 1, tag) mpi4py-3.0.3/demo/wrap-c/0000775000175000017500000000000013560002767016122 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/wrap-c/makefile0000644000175000017500000000120212750576064017621 0ustar dalcinldalcinl00000000000000.PHONY: default default: build test clean PYTHON = python PYTHON_CONFIG = ${PYTHON} ../python-config MPI4PY_INCLUDE = ${shell ${PYTHON} -c 'import mpi4py; print( mpi4py.get_include() )'} MPICC = mpicc CFLAGS = -fPIC ${shell ${PYTHON_CONFIG} --includes} LDFLAGS = -shared ${shell ${PYTHON_CONFIG} --libs} SO = ${shell ${PYTHON_CONFIG} --extension-suffix} .PHONY: build build: helloworld${SO} helloworld${SO}: helloworld.c ${MPICC} ${CFLAGS} -I${MPI4PY_INCLUDE} -o $@ $< ${LDFLAGS} MPIEXEC = mpiexec NP_FLAG = -n NP = 5 .PHONY: test test: build ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test.py .PHONY: clean clean: ${RM} helloworld${SO} mpi4py-3.0.3/demo/wrap-c/test.py0000644000175000017500000000033212523721016017440 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import helloworld as hw null = MPI.COMM_NULL hw.sayhello(null) comm = MPI.COMM_WORLD hw.sayhello(comm) try: hw.sayhello(list()) except: pass else: assert 0, "exception not raised" mpi4py-3.0.3/demo/wrap-c/helloworld.c0000644000175000017500000000434713200562156020441 0ustar dalcinldalcinl00000000000000#define MPICH_SKIP_MPICXX 1 #define OMPI_SKIP_MPICXX 1 #include #include /* -------------------------------------------------------------------------- */ static void sayhello(MPI_Comm comm) { int size, rank; char pname[MPI_MAX_PROCESSOR_NAME]; int len; if (comm == MPI_COMM_NULL) { printf("You passed MPI_COMM_NULL !!!\n"); return; } MPI_Comm_size(comm, &size); MPI_Comm_rank(comm, &rank); MPI_Get_processor_name(pname, &len); pname[len] = 0; printf("Hello, World! I am process %d of %d on %s.\n", rank, size, pname); } /* -------------------------------------------------------------------------- */ static PyObject * hw_sayhello(PyObject *self, PyObject *args) { PyObject *py_comm = NULL; MPI_Comm *comm_p = NULL; if (!PyArg_ParseTuple(args, "O:sayhello", &py_comm)) return NULL; comm_p = PyMPIComm_Get(py_comm); if (comm_p == NULL) return NULL; sayhello(*comm_p); Py_INCREF(Py_None); return Py_None; } static struct PyMethodDef hw_methods[] = { {"sayhello", (PyCFunction)hw_sayhello, METH_VARARGS, NULL}, {NULL, NULL, 0, NULL} /* sentinel */ }; #if PY_MAJOR_VERSION < 3 /* --- Python 2 --- */ PyMODINIT_FUNC inithelloworld(void) { PyObject *m = NULL; /* Initialize mpi4py C-API */ if (import_mpi4py() < 0) goto bad; /* Module initialization */ m = Py_InitModule("helloworld", hw_methods); if (m == NULL) goto bad; return; bad: return; } #else /* --- Python 3 --- */ static struct PyModuleDef hw_module = { PyModuleDef_HEAD_INIT, "helloworld", /* m_name */ NULL, /* m_doc */ -1, /* m_size */ hw_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; PyMODINIT_FUNC PyInit_helloworld(void) { PyObject *m = NULL; /* Initialize mpi4py's C-API */ if (import_mpi4py() < 0) goto bad; /* Module initialization */ m = PyModule_Create(&hw_module); if (m == NULL) goto bad; return m; bad: return NULL; } #endif /* -------------------------------------------------------------------------- */ /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/demo/osu_multi_lat.py0000644000175000017500000000426212523721016020156 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_multi_lat( BENCHMARH = "MPI Multi Latency Test", skip_small = 100, loop_small = 10000, skip_large = 10, loop_large = 1000, large_message_size = 8192, MAX_MSG_SIZE = 1<<22, ): comm = MPI.COMM_WORLD myid = comm.Get_rank() nprocs = comm.Get_size() pairs = nprocs/2 s_buf = allocate(MAX_MSG_SIZE) r_buf = allocate(MAX_MSG_SIZE) if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Latency [us]")) message_sizes = [0] + [2**i for i in range(30)] for size in message_sizes: if size > MAX_MSG_SIZE: break if size > large_message_size: skip = skip_large loop = loop_large else: skip = skip_small loop = loop_small iterations = list(range(loop+skip)) s_msg = [s_buf, size, MPI.BYTE] r_msg = [r_buf, size, MPI.BYTE] # comm.Barrier() if myid < pairs: partner = myid + pairs for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Send(s_msg, partner, 1) comm.Recv(r_msg, partner, 1) t_end = MPI.Wtime() else: partner = myid - pairs for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Recv(r_msg, partner, 1) comm.Send(s_msg, partner, 1) t_end = MPI.Wtime() # latency = (t_end - t_start) * 1e6 / (2 * loop) total_lat = comm.reduce(latency, root=0, op=MPI.SUM) if myid == 0: avg_lat = total_lat/(pairs * 2) print ('%-10d%20.2f' % (size, avg_lat)) def allocate(n): try: import mmap return mmap.mmap(-1, n) except (ImportError, EnvironmentError): try: from numpy import zeros return zeros(n, 'B') except ImportError: from array import array return array('B', [0]) * n if __name__ == '__main__': osu_multi_lat() mpi4py-3.0.3/demo/makefile0000644000175000017500000000146513200562156016427 0ustar dalcinldalcinl00000000000000PYTHON=python .PHONY: default default: ${MAKE} PYTHON=${PYTHON} -C compute-pi ${MAKE} PYTHON=${PYTHON} -C mandelbrot ${MAKE} PYTHON=${PYTHON} -C nxtval ${MAKE} PYTHON=${PYTHON} -C reductions ${MAKE} PYTHON=${PYTHON} -C sequential ${MAKE} PYTHON=${PYTHON} -C spawning ${MAKE} PYTHON=${PYTHON} -C wrap-c ${MAKE} PYTHON=${PYTHON} -C wrap-f2py ${MAKE} PYTHON=${PYTHON} -C wrap-swig ${MAKE} PYTHON=${PYTHON} -C wrap-boost ${MAKE} PYTHON=${PYTHON} -C wrap-cython ${MAKE} PYTHON=${PYTHON} -C wrap-ctypes ${MAKE} PYTHON=${PYTHON} -C wrap-cffi ${MAKE} PYTHON=${PYTHON} -C cython ${MAKE} PYTHON=${PYTHON} -C embedding ${MAKE} PYTHON=${PYTHON} -C libmpi-cffi ${MAKE} PYTHON=${PYTHON} -C mpi-ref-v1 ${MAKE} PYTHON=${PYTHON} -C init-fini ${MAKE} PYTHON=${PYTHON} -C threads ${MAKE} PYTHON=${PYTHON} -C futures mpi4py-3.0.3/demo/osu_scatter.py0000644000175000017500000000370312750576064017645 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_bcast( BENCHMARH = "MPI Scatter Latency Test", skip = 1000, loop = 10000, skip_large = 10, loop_large = 100, large_message_size = 8192, MAX_MSG_SIZE = 1<<20, ): comm = MPI.COMM_WORLD myid = comm.Get_rank() numprocs = comm.Get_size() if numprocs < 2: if myid == 0: errmsg = "This test requires at least two processes" else: errmsg = None raise SystemExit(errmsg) if myid == 0: s_buf = allocate(MAX_MSG_SIZE*numprocs) else: r_buf = allocate(MAX_MSG_SIZE) if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Latency [us]")) for size in message_sizes(MAX_MSG_SIZE): if size > large_message_size: skip = skip_large loop = loop_large iterations = list(range(loop+skip)) if myid == 0: s_msg = [s_buf, size, MPI.BYTE] r_msg = MPI.IN_PLACE else: s_msg = None r_msg = [r_buf, size, MPI.BYTE] # comm.Barrier() for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Scatter(s_msg, r_msg, 0) t_end = MPI.Wtime() comm.Barrier() # if myid == 0: latency = (t_end - t_start) * 1e6 / loop print ('%-10d%20.2f' % (size, latency)) def message_sizes(max_size): return [0] + [(1< large_message_size: skip = skip_large loop = loop_large iterations = list(range(loop+skip)) disp = 0 for i in range (numprocs): s_counts[i] = r_counts[i] = size s_displs[i] = r_displs[i] = disp disp += size s_msg = [s_buf, (s_counts, s_displs), MPI.BYTE] r_msg = [r_buf, (r_counts, r_displs), MPI.BYTE] # comm.Barrier() for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Alltoallv(s_msg, r_msg) t_end = MPI.Wtime() comm.Barrier() # if myid == 0: latency = (t_end - t_start) * 1e6 / loop print ('%-10d%20.2f' % (size, latency)) def message_sizes(max_size): return [0] + [(1< #include #include #include int main(int argc, char *argv[]) { char cmd[32] = "./cpi-worker-c.exe"; MPI_Comm worker; int n; double pi; MPI_Init(&argc, &argv); if (argc > 1) strcpy(cmd, argv[1]); printf("%s -> %s\n", argv[0], cmd); MPI_Comm_spawn(cmd, MPI_ARGV_NULL, 5, MPI_INFO_NULL, 0, MPI_COMM_SELF, &worker, MPI_ERRCODES_IGNORE); n = 100; MPI_Bcast(&n, 1, MPI_INT, MPI_ROOT, worker); MPI_Reduce(MPI_BOTTOM, &pi, 1, MPI_DOUBLE, MPI_SUM, MPI_ROOT, worker); MPI_Comm_disconnect(&worker); printf("pi: %.16f, error: %.16f\n", pi, fabs(M_PI-pi)); MPI_Finalize(); return 0; } mpi4py-3.0.3/demo/spawning/makefile0000644000175000017500000000222213200562156020245 0ustar dalcinldalcinl00000000000000.PHONY: default build test clean MPIEXEC=mpiexec -n 1 default: build test clean MASTERS = cpi-master-py.exe cpi-master-c.exe cpi-master-cxx.exe cpi-master-f90.exe WORKERS = cpi-worker-py.exe cpi-worker-c.exe cpi-worker-cxx.exe cpi-worker-f90.exe build: ${MASTERS} ${WORKERS} LANGS=py c cxx f90 test: build @for i in ${LANGS}; do \ for j in ${LANGS}; do \ ${MPIEXEC} ./cpi-master-$$i.exe ./cpi-worker-$$j.exe; \ done; \ done clean: ${RM} -r ${MASTERS} ${WORKERS} MPICC=mpicc MPICXX=mpicxx MPIF90=mpif90 ifneq (${MPI_FORTRAN_MOD_DIR},) FFLAGS += -I${MPI_FORTRAN_MOD_DIR} endif # Python cpi-master-py.exe: cpi-master.py echo '#!'`which python` > $@ cat $< >> $@ chmod +x $@ cpi-worker-py.exe: cpi-worker.py echo '#!'`which python` > $@ cat $< >> $@ chmod +x $@ # C cpi-master-c.exe: cpi-master.c ${MPICC} $< -o $@ cpi-worker-c.exe: cpi-worker.c ${MPICC} $< -o $@ # C++ cpi-master-cxx.exe: cpi-master.cxx ${MPICXX} $< -o $@ cpi-worker-cxx.exe: cpi-worker.cxx ${MPICXX} $< -o $@ # Fortran 90 cpi-master-f90.exe: cpi-master.f90 ${MPIF90} ${FFLAGS} $< -o $@ cpi-worker-f90.exe: cpi-worker.f90 ${MPIF90} ${FFLAGS} $< -o $@ mpi4py-3.0.3/demo/spawning/cpi-master.py0000644000175000017500000000100513200562156021161 0ustar dalcinldalcinl00000000000000from mpi4py import MPI from array import array from math import pi as PI from sys import argv cmd = './cpi-worker-py.exe' if len(argv) > 1: cmd = argv[1] print("%s -> %s" % (argv[0], cmd)) worker = MPI.COMM_SELF.Spawn(cmd, None, 5) n = array('i', [100]) worker.Bcast([n,MPI.INT], root=MPI.ROOT) pi = array('d', [0.0]) worker.Reduce(sendbuf=None, recvbuf=[pi, MPI.DOUBLE], op=MPI.SUM, root=MPI.ROOT) pi = pi[0] worker.Disconnect() print('pi: %.16f, error: %.16f' % (pi, abs(PI-pi))) mpi4py-3.0.3/demo/spawning/cpi-worker.f900000644000175000017500000000125212523721016021150 0ustar dalcinldalcinl00000000000000PROGRAM main USE mpi implicit none integer ierr integer n, i, master, myrank, nprocs real (kind=8) h, s, x, cpi call MPI_INIT(ierr) call MPI_COMM_GET_PARENT(master, ierr) call MPI_COMM_SIZE(master, nprocs, ierr) call MPI_COMM_RANK(master, myrank, ierr) call MPI_BCAST(n, 1, MPI_INTEGER, & 0, master, ierr) h = 1 / DFLOAT(n) s = 0.0 DO i=myrank+1,n,nprocs x = h * (DFLOAT(i) - 0.5) s = s + 4.0 / (1.0 + x*x) END DO cpi = s * h call MPI_REDUCE(cpi, MPI_BOTTOM, 1, MPI_DOUBLE_PRECISION, & MPI_SUM, 0, master, ierr) call MPI_COMM_DISCONNECT(master, ierr) call MPI_FINALIZE(ierr) END PROGRAM main mpi4py-3.0.3/demo/spawning/cpi-master.cxx0000644000175000017500000000124113200562156021335 0ustar dalcinldalcinl00000000000000#include #include #include #include int main(int argc, char *argv[]) { MPI::Init(); char cmd[32] = "./cpi-worker-cxx.exe"; if (argc > 1) std::strcpy(cmd, argv[1]); std::printf("%s -> %s\n", argv[0], cmd); MPI::Intercomm worker; worker = MPI::COMM_SELF.Spawn(cmd, MPI::ARGV_NULL, 5, MPI::INFO_NULL, 0); int n = 100; worker.Bcast(&n, 1, MPI::INT, MPI::ROOT); double pi; worker.Reduce(MPI::BOTTOM, &pi, 1, MPI::DOUBLE, MPI::SUM, MPI::ROOT); worker.Disconnect(); std::printf("pi: %.16f, error: %.16f\n", pi, std::fabs(M_PI-pi)); MPI::Finalize(); return 0; } mpi4py-3.0.3/demo/spawning/cpi-master.f900000644000175000017500000000174213200562156021137 0ustar dalcinldalcinl00000000000000PROGRAM main USE mpi implicit none real (kind=8), parameter :: PI = 3.1415926535897931D0 integer argc character(len=32) argv(0:1) character(len=32) cmd integer ierr, n, worker real(kind=8) cpi call MPI_INIT(ierr) argc = iargc() + 1 call getarg(0, argv(0)) call getarg(1, argv(1)) cmd = './cpi-worker-f90.exe' if (argc > 1) then cmd = argv(1) end if write(*,'(A,A,A)') trim(argv(0)), ' -> ', trim(cmd) call MPI_COMM_SPAWN(cmd, MPI_ARGV_NULL, 5, & MPI_INFO_NULL, 0, & MPI_COMM_SELF, worker, & MPI_ERRCODES_IGNORE, ierr) n = 100 call MPI_BCAST(n, 1, MPI_INTEGER, & MPI_ROOT, worker, ierr) call MPI_REDUCE(MPI_BOTTOM, cpi, 1, MPI_DOUBLE_PRECISION, & MPI_SUM, MPI_ROOT, worker, ierr) call MPI_COMM_DISCONNECT(worker, ierr) write(*,'(A,F18.16,A,F18.16)') 'pi: ', cpi, ', error: ', abs(PI-cpi) call MPI_FINALIZE(ierr) END PROGRAM main mpi4py-3.0.3/demo/spawning/cpi-worker.c0000644000175000017500000000112512523721016020773 0ustar dalcinldalcinl00000000000000#include int main(int argc, char *argv[]) { int myrank, nprocs; int n, i; double h, s, pi; MPI_Comm master; MPI_Init(&argc, &argv); MPI_Comm_get_parent(&master); MPI_Comm_size(master, &nprocs); MPI_Comm_rank(master, &myrank); MPI_Bcast(&n, 1, MPI_INT, 0, master); h = 1.0 / (double) n; s = 0.0; for (i = myrank+1; i < n+1; i += nprocs) { double x = h * (i - 0.5); s += 4.0 / (1.0 + x*x); } pi = s * h; MPI_Reduce(&pi, MPI_BOTTOM, 1, MPI_DOUBLE, MPI_SUM, 0, master); MPI_Comm_disconnect(&master); MPI_Finalize(); return 0; } mpi4py-3.0.3/demo/spawning/cpi-worker.cxx0000644000175000017500000000104712523721016021356 0ustar dalcinldalcinl00000000000000#include int main(int argc, char *argv[]) { MPI::Init(); MPI::Intercomm master = MPI::Comm::Get_parent(); int nprocs = master.Get_size(); int myrank = master.Get_rank(); int n; master.Bcast(&n, 1, MPI_INT, 0); double h = 1.0 / (double) n; double s = 0.0; for (int i = myrank+1; i < n+1; i += nprocs) { double x = h * (i - 0.5); s += 4.0 / (1.0 + x*x); } double pi = s * h; master.Reduce(&pi, MPI_BOTTOM, 1, MPI_DOUBLE, MPI_SUM, 0); master.Disconnect(); MPI::Finalize(); return 0; } mpi4py-3.0.3/demo/osu_bcast.py0000644000175000017500000000332612750576064017275 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_bcast( BENCHMARH = "MPI Broadcast Latency Test", skip = 1000, loop = 10000, skip_large = 10, loop_large = 100, large_message_size = 8192, MAX_MSG_SIZE = 1<<20, ): comm = MPI.COMM_WORLD myid = comm.Get_rank() numprocs = comm.Get_size() if numprocs < 2: if myid == 0: errmsg = "This test requires at least two processes" else: errmsg = None raise SystemExit(errmsg) buf = allocate(MAX_MSG_SIZE) if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Latency [us]")) for size in message_sizes(MAX_MSG_SIZE): if size > large_message_size: skip = skip_large loop = loop_large iterations = list(range(loop+skip)) msg = [buf, size, MPI.BYTE] # comm.Barrier() for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Bcast(msg, 0) t_end = MPI.Wtime() comm.Barrier() # if myid == 0: latency = (t_end - t_start) * 1e6 / loop print ('%-10d%20.2f' % (size, latency)) def message_sizes(max_size): return [0] + [(1< #include #ifdef __cplusplus extern "C" { #endif extern void sayhello(MPI_Comm); #ifdef __cplusplus } #endif void sayhello(MPI_Comm comm) { int size, rank; char pname[MPI_MAX_PROCESSOR_NAME]; int len; if (comm == MPI_COMM_NULL) { printf("You passed MPI_COMM_NULL !!!\n"); return; } MPI_Comm_size(comm, &size); MPI_Comm_rank(comm, &rank); MPI_Get_processor_name(pname, &len); pname[len] = 0; printf("Hello, World! I am process %d of %d on %s.\n", rank, size, pname); } mpi4py-3.0.3/demo/futures/0000775000175000017500000000000013560002767016426 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/futures/run_mandelbrot.py0000644000175000017500000000260613200562156022007 0ustar dalcinldalcinl00000000000000from __future__ import print_function from __future__ import division import sys import time from mpi4py.futures import MPICommExecutor try: range = xrange except NameError: pass x0 = -2.0 x1 = +1.0 y0 = -1.0 y1 = +1.0 w = 750 h = 500 dx = (x1 - x0) / w dy = (y1 - y0) / h def mandelbrot(x, y, maxit=255): c = complex(x, y) z = complex(0, 0) n = 255 while abs(z) < 2 and n > 1: z = z**2 + c n -= 1 return n def mandelbrot_line(k): line = bytearray(w) y = y1 - k * dy for j in range(w): x = x0 + j * dx line[j] = mandelbrot(x, y) return line def plot(image): import warnings warnings.simplefilter('ignore', UserWarning) try: from matplotlib import pyplot as plt except ImportError: return plt.figure() plt.imshow(image, aspect='equal', cmap='spectral') plt.axis('off') try: plt.draw() plt.pause(2) except: pass def test_mandelbrot(): with MPICommExecutor() as executor: if executor is None: return # worker process tic = time.time() image = list(executor.map(mandelbrot_line, range(h), chunksize=10)) toc = time.time() print("%s Set %dx%d in %.2f seconds." % ('Mandelbrot', w, h, toc-tic)) if len(sys.argv) > 1 and sys.argv[1] == '-plot': plot(image) if __name__ == '__main__': test_mandelbrot() mpi4py-3.0.3/demo/futures/makefile0000644000175000017500000000211113200562156020111 0ustar dalcinldalcinl00000000000000.PHONY: default default: test PYTHON = python MPIEXEC = mpiexec NPFLAG = -n .PHONY: run-pool run-crawl run-primes run-pool: run-crawl run-primes run-crawl: ${MPIEXEC} ${NPFLAG} 1 ${PYTHON} run_crawl.py run-primes: ${MPIEXEC} ${NPFLAG} 1 ${PYTHON} run_primes.py .PHONY: run-comm run-julia run-mandelbrot run-comm: run-julia run-mandelbrot run-julia: ${MPIEXEC} ${NPFLAG} 5 ${PYTHON} run_julia.py run-mandelbrot: ${MPIEXEC} ${NPFLAG} 5 ${PYTHON} run_mandelbrot.py .PHONY: run-cmdline run-cmdline: ${MPIEXEC} ${NPFLAG} 5 ${PYTHON} -m mpi4py.futures run_crawl.py ${MPIEXEC} ${NPFLAG} 5 ${PYTHON} -m mpi4py.futures run_primes.py ${MPIEXEC} ${NPFLAG} 5 ${PYTHON} -m mpi4py.futures run_julia.py ${MPIEXEC} ${NPFLAG} 5 ${PYTHON} -m mpi4py.futures run_mandelbrot.py .PHONY: run-unittest run-unittest: ${MPIEXEC} ${NPFLAG} 1 ${PYTHON} test_futures.py ${MPIEXEC} ${NPFLAG} 2 ${PYTHON} test_futures.py ${MPIEXEC} ${NPFLAG} 1 ${PYTHON} -m mpi4py.futures test_futures.py ${MPIEXEC} ${NPFLAG} 2 ${PYTHON} -m mpi4py.futures test_futures.py .PHONY: test test: run-pool run-comm run-cmdline mpi4py-3.0.3/demo/futures/run_julia.py0000644000175000017500000000253613200562156020766 0ustar dalcinldalcinl00000000000000from __future__ import print_function from __future__ import division import sys import time from mpi4py.futures import MPICommExecutor try: range = xrange except NameError: pass x0 = -2.0 x1 = +2.0 y0 = -1.5 y1 = +1.5 w = 1600 h = 1200 dx = (x1 - x0) / w dy = (y1 - y0) / h def julia(x, y): c = complex(0, 0.65) z = complex(x, y) n = 255 while abs(z) < 3 and n > 1: z = z**2 + c n -= 1 return n def julia_line(k): line = bytearray(w) y = y1 - k * dy for j in range(w): x = x0 + j * dx line[j] = julia(x, y) return line def plot(image): import warnings warnings.simplefilter('ignore', UserWarning) try: from matplotlib import pyplot as plt except ImportError: return plt.figure() plt.imshow(image, aspect='equal', cmap='cubehelix') plt.axis('off') try: plt.draw() plt.pause(2) except: pass def test_julia(): with MPICommExecutor() as executor: if executor is None: return # worker process tic = time.time() image = list(executor.map(julia_line, range(h), chunksize=10)) toc = time.time() print("%s Set %dx%d in %.2f seconds." % ('Julia', w, h, toc-tic)) if len(sys.argv) > 1 and sys.argv[1] == '-plot': plot(image) if __name__ == '__main__': test_julia() mpi4py-3.0.3/demo/futures/run_primes.py0000644000175000017500000000136213200562156021155 0ustar dalcinldalcinl00000000000000from __future__ import print_function import math try: range = xrange except NameError: range = range from mpi4py.futures import MPIPoolExecutor PRIMES = [ 112272535095293, 112582705942171, 112272535095293, 115280095190773, 115797848077099, 117450548693743, 993960000099397, ] def is_prime(n): if n % 2 == 0: return False sqrt_n = int(math.floor(math.sqrt(n))) for i in range(3, sqrt_n + 1, 2): if n % i == 0: return False return True def test_primes(): with MPIPoolExecutor(4) as executor: for number, prime in zip(PRIMES, executor.map(is_prime, PRIMES)): print('%d is prime: %s' % (number, prime)) if __name__ == '__main__': test_primes() mpi4py-3.0.3/demo/futures/run_crawl.py0000644000175000017500000000156113200562156020767 0ustar dalcinldalcinl00000000000000from __future__ import print_function from __future__ import division try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen from mpi4py.futures import MPIPoolExecutor URLS = [ 'http://www.google.com/', 'http://www.apple.com/', 'http://www.ibm.com/', 'http://www.slashdot.org/', 'http://www.python.org/', 'http://www.bing.com/', 'http://www.facebook.com/', 'http://www.yahoo.com/', 'http://www.youtube.com/', 'http://www.blogger.com/', ] def load_url(url): return url, urlopen(url).read() def test_crawl(): with MPIPoolExecutor(10) as executor: for url, content in executor.map(load_url, URLS, timeout=10, unordered=True): print('%-25s: %6.2f KiB' % (url, len(content)/(1 << 10))) if __name__ == '__main__': test_crawl() mpi4py-3.0.3/demo/futures/test_service.py0000644000175000017500000000146013200562156021470 0ustar dalcinldalcinl00000000000000import sys from mpi4py.futures import MPIPoolExecutor def main(): def getarg(opt, default=None): try: return sys.argv[sys.argv.index('--'+opt)+1] except ValueError: return default options = {} if '--host' in sys.argv or '--port' in sys.argv: service = (getarg('host'), getarg('port')) else: service = getarg('service') if '--info' in sys.argv: info = getarg('info').split(',') info = dict(entry.split('=') for entry in info if entry) else: info = None with MPIPoolExecutor(service=service, mpi_info=info) as executor: fut1 = executor.submit(abs, +42) fut2 = executor.submit(abs, -42) assert fut1.result(0) == 42 assert fut2.result(0) == 42 if __name__ == '__main__': main() mpi4py-3.0.3/demo/futures/perf_primes.py0000644000175000017500000000373313200562156021311 0ustar dalcinldalcinl00000000000000""" Compare the speed of primes sequentially vs. using futures. """ import sys import time import math try: range = xrange except NameError: range = range try: from concurrent.futures import ThreadPoolExecutor except ImportError: ThreadPoolExecutor = None try: from concurrent.futures import ProcessPoolExecutor except ImportError: ProcessPoolExecutor = None from mpi4py.futures import MPIPoolExecutor PRIMES = [ 112272535095293, 112582705942171, 112272535095293, 115280095190773, 115797848077099, 117450548693743, 993960000099397, ] def is_prime(n): if n % 2 == 0: return False sqrt_n = int(math.floor(math.sqrt(n))) for i in range(3, sqrt_n + 1, 2): if n % i == 0: return False return True def sequential(): return list(map(is_prime, PRIMES)) def with_thread_pool_executor(): if not ThreadPoolExecutor: return None with ThreadPoolExecutor(4) as executor: return list(executor.map(is_prime, PRIMES)) def with_process_pool_executor(): if not ProcessPoolExecutor: return None with ProcessPoolExecutor(4) as executor: return list(executor.map(is_prime, PRIMES)) def with_mpi_pool_executor(): with MPIPoolExecutor(4) as executor: return list(executor.map(is_prime, PRIMES)) def main(): for name, fn in [('sequential', sequential), ('threads', with_thread_pool_executor), ('processes', with_process_pool_executor), ('mpi4py', with_mpi_pool_executor)]: sys.stdout.write('%s: ' % name.ljust(11)) sys.stdout.flush() start = time.time() result = fn() if result is None: sys.stdout.write(' not available\n') elif result != [True] * len(PRIMES): sys.stdout.write(' failed\n') else: sys.stdout.write('%5.2f seconds\n' % (time.time() - start)) sys.stdout.flush() if __name__ == '__main__': main() mpi4py-3.0.3/demo/futures/test_futures.py0000664000175000017500000011525213477641753021555 0ustar dalcinldalcinl00000000000000import os import sys import time import functools import unittest from mpi4py import MPI from mpi4py import futures try: from concurrent.futures._base import ( PENDING, RUNNING, CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED) except ImportError: from mpi4py.futures._base import ( PENDING, RUNNING, CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED) SHARED_POOL = futures._lib.SharedPool is not None WORLD_SIZE = MPI.COMM_WORLD.Get_size() def create_future(state=PENDING, exception=None, result=None): f = futures.Future() f._state = state f._exception = exception f._result = result return f PENDING_FUTURE = create_future(state=PENDING) RUNNING_FUTURE = create_future(state=RUNNING) CANCELLED_FUTURE = create_future(state=CANCELLED) CANCELLED_AND_NOTIFIED_FUTURE = create_future(state=CANCELLED_AND_NOTIFIED) EXCEPTION_FUTURE = create_future(state=FINISHED, exception=OSError()) SUCCESSFUL_FUTURE = create_future(state=FINISHED, result=42) def mul(x, y): return x * y def sleep_and_raise(t): time.sleep(t) raise Exception('this is an exception') def check_global_var(x): return global_var == x def check_run_name(name): return __name__ == name class ExecutorMixin: worker_count = 2 def setUp(self): self.t1 = time.time() try: self.executor = self.executor_type(max_workers=self.worker_count) except NotImplementedError: e = sys.exc_info()[1] self.skipTest(str(e)) self._prime_executor() def tearDown(self): self.executor.shutdown(wait=True) dt = time.time() - self.t1 self.assertLess(dt, 60, 'synchronization issue: test lasted too long') def _prime_executor(self): # Make sure that the executor is ready to do work before running the # tests. This should reduce the probability of timeouts in the tests. futures = [self.executor.submit(time.sleep, 0) for _ in range(self.worker_count)] for f in futures: f.result() class ProcessPoolMixin(ExecutorMixin): executor_type = futures.MPIPoolExecutor if 'coverage' in sys.modules: executor_type = functools.partial( executor_type, python_args='-m coverage run'.split(), ) class ProcessPoolInitTest(ProcessPoolMixin, unittest.TestCase): def _prime_executor(self): pass def test_init(self): self.executor_type() def test_init_args(self): self.executor_type(1) def test_init_kwargs(self): executor = self.executor_type( python_exe=sys.executable, max_workers=None, mpi_info=dict(soft="0:1"), globals=None, main=False, path=[], wdir=os.getcwd(), env={}, ) futures = [executor.submit(time.sleep, 0) for _ in range(self.worker_count)] for f in futures: f.result() executor.shutdown() def test_init_pyargs(self): executor_type = futures.MPIPoolExecutor executor = executor_type(python_args=['-B', '-Wi']) executor.submit(time.sleep, 0).result() executor.shutdown() @unittest.skipIf(SHARED_POOL, 'shared-pool') def test_init_globals(self): executor = self.executor_type(globals=dict(global_var=42)) future1 = executor.submit(check_global_var, 42) future2 = executor.submit(check_global_var, 24) self.assertTrue(future1.result()) self.assertFalse(future2.result()) executor.shutdown() @unittest.skipIf(SHARED_POOL and WORLD_SIZE == 1, 'shared-pool') def test_run_name(self): executor = self.executor_type() run_name = futures._lib.MAIN_RUN_NAME future = executor.submit(check_run_name, run_name) self.assertTrue(future.result(), run_name) def test_max_workers_environ(self): save = os.environ.get('MPI4PY_MAX_WORKERS') os.environ['MPI4PY_MAX_WORKERS'] = '1' try: executor = self.executor_type() executor.submit(time.sleep, 0).result() executor.shutdown() finally: del os.environ['MPI4PY_MAX_WORKERS'] if save is not None: os.environ['MPI4PY_MAX_WORKERS'] = save def test_max_workers_negative(self): for number in (0, -1): self.assertRaises(ValueError, self.executor_type, max_workers=number) class ProcessPoolBootupTest(ProcessPoolMixin, unittest.TestCase): def _prime_executor(self): pass def test_bootup(self): executor = self.executor_type(1) executor.bootup() executor.bootup() executor.shutdown() self.assertRaises(RuntimeError, executor.bootup) def test_bootup_wait(self): executor = self.executor_type(1) executor.bootup(wait=True) executor.bootup(wait=True) executor.shutdown(wait=True) self.assertRaises(RuntimeError, executor.bootup, True) def test_bootup_nowait(self): executor = self.executor_type(1) executor.bootup(wait=False) executor.bootup(wait=False) executor.shutdown(wait=False) self.assertRaises(RuntimeError, executor.bootup, False) executor.shutdown(wait=True) def test_bootup_nowait_wait(self): executor = self.executor_type(1) executor.bootup(wait=False) executor.bootup(wait=True) executor.shutdown() self.assertRaises(RuntimeError, executor.bootup) def test_bootup_shutdown_nowait(self): executor = self.executor_type(1) executor.bootup(wait=False) executor.shutdown(wait=False) worker = executor._pool del executor worker.join() class ExecutorShutdownTestMixin: def test_run_after_shutdown(self): self.executor.shutdown() self.assertRaises(RuntimeError, self.executor.submit, pow, 2, 5) def test_hang_issue12364(self): fs = [self.executor.submit(time.sleep, 0.01) for _ in range(50)] self.executor.shutdown() for f in fs: f.result() class ProcessPoolShutdownTest(ProcessPoolMixin, ExecutorShutdownTestMixin, unittest.TestCase): def _prime_executor(self): pass def test_shutdown(self): executor = self.executor_type(max_workers=1) self.assertEqual(executor._pool, None) self.assertEqual(executor._shutdown, False) executor.submit(mul, 21, 2) executor.submit(mul, 6, 7) executor.submit(mul, 3, 14) self.assertNotEqual(executor._pool.thread, None) self.assertEqual(executor._shutdown, False) executor.shutdown(wait=False) self.assertNotEqual(executor._pool.thread, None) self.assertEqual(executor._shutdown, True) executor.shutdown(wait=True) self.assertEqual(executor._pool, None) self.assertEqual(executor._shutdown, True) def test_init_bootup_shutdown(self): executor = self.executor_type(max_workers=1) self.assertEqual(executor._pool, None) self.assertEqual(executor._shutdown, False) executor.bootup() self.assertTrue(executor._pool.event.is_set()) self.assertEqual(executor._shutdown, False) executor.shutdown() self.assertEqual(executor._pool, None) self.assertEqual(executor._shutdown, True) def test_context_manager_shutdown(self): with self.executor_type(max_workers=1) as e: self.assertEqual(list(e.map(abs, range(-5, 5))), [5, 4, 3, 2, 1, 0, 1, 2, 3, 4]) threads = [e._pool.thread] queues = [e._pool.queue] events = [e._pool.event] for t in threads: t.join() for q in queues: self.assertRaises(LookupError, q.pop) for e in events: self.assertTrue(e.is_set()) def test_del_shutdown(self): executor = self.executor_type(max_workers=1) list(executor.map(abs, range(-5, 5))) threads = [executor._pool.thread] queues = [executor._pool.queue] events = [executor._pool.event] if hasattr(sys, 'pypy_version_info'): executor.shutdown(False) else: del executor for t in threads: t.join() for q in queues: self.assertRaises(LookupError, q.pop) for e in events: self.assertTrue(e.is_set()) class WaitTestMixin: def test_first_completed(self): future1 = self.executor.submit(mul, 21, 2) future2 = self.executor.submit(time.sleep, 0.2) done, not_done = futures.wait( [CANCELLED_FUTURE, future1, future2], return_when=futures.FIRST_COMPLETED) self.assertEqual(set([future1]), done) self.assertEqual(set([CANCELLED_FUTURE, future2]), not_done) def test_first_completed_some_already_completed(self): future1 = self.executor.submit(time.sleep, 0.2) finished, pending = futures.wait( [CANCELLED_AND_NOTIFIED_FUTURE, SUCCESSFUL_FUTURE, future1], return_when=futures.FIRST_COMPLETED) self.assertEqual( set([CANCELLED_AND_NOTIFIED_FUTURE, SUCCESSFUL_FUTURE]), finished) self.assertEqual(set([future1]), pending) def test_first_exception(self): future1 = self.executor.submit(mul, 2, 21) future2 = self.executor.submit(sleep_and_raise, 0.2) future3 = self.executor.submit(time.sleep, 0.4) finished, pending = futures.wait( [future1, future2, future3], return_when=futures.FIRST_EXCEPTION) self.assertEqual(set([future1, future2]), finished) self.assertEqual(set([future3]), pending) def test_first_exception_some_already_complete(self): future1 = self.executor.submit(divmod, 21, 0) future2 = self.executor.submit(time.sleep, 0.2) finished, pending = futures.wait( [SUCCESSFUL_FUTURE, CANCELLED_FUTURE, CANCELLED_AND_NOTIFIED_FUTURE, future1, future2], return_when=futures.FIRST_EXCEPTION) self.assertEqual(set([SUCCESSFUL_FUTURE, CANCELLED_AND_NOTIFIED_FUTURE, future1]), finished) self.assertEqual(set([CANCELLED_FUTURE, future2]), pending) def test_first_exception_one_already_failed(self): future1 = self.executor.submit(time.sleep, 0.2) finished, pending = futures.wait( [EXCEPTION_FUTURE, future1], return_when=futures.FIRST_EXCEPTION) self.assertEqual(set([EXCEPTION_FUTURE]), finished) self.assertEqual(set([future1]), pending) def test_all_completed(self): future1 = self.executor.submit(divmod, 2, 0) future2 = self.executor.submit(mul, 2, 21) finished, pending = futures.wait( [SUCCESSFUL_FUTURE, CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, future1, future2], return_when=futures.ALL_COMPLETED) self.assertEqual(set([SUCCESSFUL_FUTURE, CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, future1, future2]), finished) self.assertEqual(set(), pending) def test_timeout(self): future1 = self.executor.submit(mul, 6, 7) future2 = self.executor.submit(time.sleep, 0.5) finished, pending = futures.wait( [CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1, future2], timeout=0.2, return_when=futures.ALL_COMPLETED) self.assertEqual(set([CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1]), finished) self.assertEqual(set([future2]), pending) class ProcessPoolWaitTest(ProcessPoolMixin, WaitTestMixin, unittest.TestCase): pass class AsCompletedTestMixin: def test_no_timeout(self): future1 = self.executor.submit(mul, 2, 21) future2 = self.executor.submit(mul, 7, 6) completed = set(futures.as_completed( [CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1, future2])) self.assertEqual(set( [CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1, future2]), completed) def test_zero_timeout(self): future1 = self.executor.submit(time.sleep, 0.2) completed_futures = set() try: for future in futures.as_completed( [CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1], timeout=0): completed_futures.add(future) except futures.TimeoutError: pass self.assertEqual(set([CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE]), completed_futures) def test_nonzero_timeout(self): future1 = self.executor.submit(time.sleep, 0.0) future2 = self.executor.submit(time.sleep, 0.2) completed_futures = set() try: for future in futures.as_completed( [CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1], timeout=0.1): completed_futures.add(future) except futures.TimeoutError: pass self.assertEqual(set([CANCELLED_AND_NOTIFIED_FUTURE, EXCEPTION_FUTURE, SUCCESSFUL_FUTURE, future1]), completed_futures) def test_duplicate_futures(self): py_version = sys.version_info[:3] if py_version[0] == 3 and py_version < (3, 3, 5): return # Issue 20367. Duplicate futures should not raise exceptions or give # duplicate responses. future1 = self.executor.submit(time.sleep, 0.1) completed = [f for f in futures.as_completed([future1, future1])] self.assertEqual(len(completed), 1) class ProcessPoolAsCompletedTest(ProcessPoolMixin, AsCompletedTestMixin, unittest.TestCase): pass class ExecutorTestMixin: def test_submit(self): future = self.executor.submit(pow, 2, 8) self.assertEqual(256, future.result()) def test_submit_keyword(self): future = self.executor.submit(mul, 2, y=8) self.assertEqual(16, future.result()) future = self.executor.submit(mul, x=2, y=8) self.assertEqual(16, future.result()) def test_submit_cancel(self): future1 = self.executor.submit(time.sleep, 0.25) future2 = self.executor.submit(time.sleep, 0) future2.cancel() self.assertEqual(None, future1.result()) self.assertEqual(False, future1.cancelled()) self.assertEqual(True, future2.cancelled()) def test_map(self): self.assertEqual( list(self.executor.map(pow, range(10), range(10))), list(map(pow, range(10), range(10)))) def test_starmap(self): sequence = [(a,a) for a in range(10)] self.assertEqual( list(self.executor.starmap(pow, sequence)), list(map(pow, range(10), range(10)))) self.assertEqual( list(self.executor.starmap(pow, iter(sequence))), list(map(pow, range(10), range(10)))) def test_map_exception(self): i = self.executor.map(divmod, [1, 1, 1, 1], [2, 3, 0, 5]) self.assertEqual(next(i), (0, 1)) self.assertEqual(next(i), (0, 1)) self.assertRaises(ZeroDivisionError, next, i) def test_map_timeout(self): results = [] try: for i in self.executor.map(time.sleep, [0, 0, 1], timeout=0.25): results.append(i) except futures.TimeoutError: pass else: self.fail('expected TimeoutError') self.assertEqual([None, None], results) def test_map_timeout_one(self): results = [] for i in self.executor.map(time.sleep, [0, 0, 0], timeout=1): results.append(i) self.assertEqual([None, None, None], results) class ProcessPoolExecutorTest(ProcessPoolMixin, ExecutorTestMixin, unittest.TestCase): def test_map_chunksize(self): ref = list(map(pow, range(40), range(40))) self.assertEqual( list(self.executor.map(pow, range(40), range(40), chunksize=6)), ref) self.assertEqual( list(self.executor.map(pow, range(40), range(40), chunksize=50)), ref) self.assertEqual( list(self.executor.map(pow, range(40), range(40), chunksize=40)), ref) def bad(): list(self.executor.map(pow, range(40), range(40), chunksize=-1)) self.assertRaises(ValueError, bad) def test_starmap_chunksize(self): ref = list(map(pow, range(40), range(40))) sequence = [(a, a) for a in range(40)] self.assertEqual( list(self.executor.starmap(pow, sequence, chunksize=6)), ref) self.assertEqual( list(self.executor.starmap(pow, sequence, chunksize=50)), ref) self.assertEqual( list(self.executor.starmap(pow, sequence, chunksize=40)), ref) self.assertEqual( list(self.executor.starmap(pow, iter(sequence), chunksize=6)), ref) self.assertEqual( list(self.executor.starmap(pow, iter(sequence), chunksize=50)), ref) self.assertEqual( list(self.executor.starmap(pow, iter(sequence), chunksize=40)), ref) def bad(): list(self.executor.starmap(pow, sequence, chunksize=-1)) self.assertRaises(ValueError, bad) def test_map_unordered(self): map_unordered = functools.partial(self.executor.map, unordered=True) self.assertEqual( set(map_unordered(pow, range(10), range(10))), set(map(pow, range(10), range(10)))) def test_map_unordered_timeout(self): map_unordered = functools.partial(self.executor.map, unordered=True) num_workers = self.executor._pool.size results = [] try: args = [0.2] + [0]*(num_workers-1) for i in map_unordered(time.sleep, args, timeout=0.1): results.append(i) except futures.TimeoutError: pass else: self.fail('expected TimeoutError') self.assertEqual([None]*(num_workers-1), results) def test_map_unordered_timeout_one(self): map_unordered = functools.partial(self.executor.map, unordered=True) results = [] for i in map_unordered(time.sleep, [0, 0, 0], timeout=1): results.append(i) self.assertEqual([None, None, None], results) def test_map_unordered_exception(self): map_unordered = functools.partial(self.executor.map, unordered=True) i = map_unordered(divmod, [1, 1, 1, 1], [2, 3, 0, 5]) try: self.assertEqual(next(i), (0, 1)) except ZeroDivisionError: return def test_map_unordered_chunksize(self): map_unordered = functools.partial(self.executor.map, unordered=True) ref = set(map(pow, range(40), range(40))) self.assertEqual( set(map_unordered(pow, range(40), range(40), chunksize=6)), ref) self.assertEqual( set(map_unordered(pow, range(40), range(40), chunksize=50)), ref) self.assertEqual( set(map_unordered(pow, range(40), range(40), chunksize=40)), ref) def bad(): set(map_unordered(pow, range(40), range(40), chunksize=-1)) self.assertRaises(ValueError, bad) class ProcessPoolSubmitTest(unittest.TestCase): @unittest.skipIf(MPI.get_vendor()[0] == 'Microsoft MPI', 'msmpi') def test_multiple_executors(self): executor1 = futures.MPIPoolExecutor(1).bootup(wait=True) executor2 = futures.MPIPoolExecutor(1).bootup(wait=True) executor3 = futures.MPIPoolExecutor(1).bootup(wait=True) fs1 = [executor1.submit(abs, i) for i in range(100, 200)] fs2 = [executor2.submit(abs, i) for i in range(200, 300)] fs3 = [executor3.submit(abs, i) for i in range(300, 400)] futures.wait(fs3+fs2+fs1) for i, f in enumerate(fs1): self.assertEqual(f.result(), i + 100) for i, f in enumerate(fs2): self.assertEqual(f.result(), i + 200) for i, f in enumerate(fs3): self.assertEqual(f.result(), i + 300) executor1 = executor2 = executor3 = None def test_mpi_serialized_support(self): futures._lib.setup_mpi_threads() threading = futures._lib.threading serialized = futures._lib.serialized lock_save = serialized.lock try: if lock_save is None: serialized.lock = threading.Lock() executor = futures.MPIPoolExecutor(1).bootup() executor.submit(abs, 0).result() executor.shutdown() serialized.lock = lock_save else: serialized.lock = None with lock_save: executor = futures.MPIPoolExecutor(1).bootup() executor.submit(abs, 0).result() executor.shutdown() serialized.lock = lock_save finally: serialized.lock = lock_save def orig_test_mpi_serialized_support(self): threading = futures._lib.threading serialized = futures._lib.serialized lock_save = serialized.lock try: serialized.lock = threading.Lock() executor = futures.MPIPoolExecutor(1).bootup() executor.submit(abs, 0).result() if lock_save is not None: serialized.lock = None with lock_save: executor.submit(abs, 0).result() serialized.lock = lock_save executor.submit(abs, 0).result() executor.shutdown() if lock_save is not None: serialized.lock = None with lock_save: executor = futures.MPIPoolExecutor(1).bootup() executor.submit(abs, 0).result() executor.shutdown() serialized.lock = lock_save finally: serialized.lock = lock_save def test_shared_executors(self): if not SHARED_POOL: return executors = [futures.MPIPoolExecutor() for _ in range(16)] fs = [] for i in range(128): fs.extend(e.submit(abs, i*16+j) for j, e in enumerate(executors)) assert sorted(f.result() for f in fs) == list(range(16*128)) world_size = MPI.COMM_WORLD.Get_size() num_workers = max(1, world_size - 1) for e in executors: self.assertEqual(e._pool.size, num_workers) del e, executors def inout(arg): return arg class GoodPickle(object): def __init__(self, value=0): self.value = value self.pickled = False self.unpickled = False def __getstate__(self): self.pickled = True return (self.value,) def __setstate__(self, state): self.unpickled = True self.value = state[0] class BadPickle(object): def __init__(self): self.pickled = False def __getstate__(self): self.pickled = True 1/0 def __setstate__(self, state): pass class BadUnpickle(object): def __init__(self): self.pickled = False def __getstate__(self): self.pickled = True return (None,) def __setstate__(self, state): if state[0] is not None: raise ValueError 1/0 @unittest.skipIf(SHARED_POOL and WORLD_SIZE == 1, 'shared-pool') class ProcessPoolPickleTest(unittest.TestCase): def setUp(self): self.executor = futures.MPIPoolExecutor(1) def tearDown(self): self.executor.shutdown() def test_good_pickle(self): o = GoodPickle(42) r = self.executor.submit(inout, o).result() self.assertEqual(o.value, r.value) self.assertTrue(o.pickled) self.assertTrue(r.unpickled) r = self.executor.submit(GoodPickle, 77).result() self.assertEqual(r.value, 77) self.assertTrue(r.unpickled) def test_bad_pickle(self): o = BadPickle() self.assertFalse(o.pickled) f = self.executor.submit(inout, o) self.assertRaises(ZeroDivisionError, f.result) self.assertTrue(o.pickled) f = self.executor.submit(BadPickle) self.assertRaises(ZeroDivisionError, f.result) f = self.executor.submit(abs, 42) self.assertEqual(f.result(), 42) def test_bad_unpickle(self): o = BadUnpickle() self.assertFalse(o.pickled) f = self.executor.submit(inout, o) self.assertRaises(ZeroDivisionError, f.result) self.assertTrue(o.pickled) f = self.executor.submit(BadUnpickle) self.assertRaises(ZeroDivisionError, f.result) f = self.executor.submit(abs, 42) self.assertEqual(f.result(), 42) class MPICommExecutorTest(unittest.TestCase): MPICommExecutor = futures.MPICommExecutor def test_default(self): with self.MPICommExecutor() as executor: if executor is not None: executor.bootup() future1 = executor.submit(time.sleep, 0) future2 = executor.submit(time.sleep, 0) executor.shutdown() self.assertEqual(None, future1.result()) self.assertEqual(None, future2.result()) def test_self(self): with self.MPICommExecutor(MPI.COMM_SELF) as executor: future = executor.submit(time.sleep, 0) self.assertEqual(None, future.result()) self.assertEqual(None, future.exception()) future = executor.submit(sleep_and_raise, 0) self.assertRaises(Exception, future.result) self.assertEqual(Exception, type(future.exception())) list(executor.map(time.sleep, [0, 0])) list(executor.map(time.sleep, [0, 0], timeout=1)) iterator = executor.map(time.sleep, [0.1, 0], timeout=0) self.assertRaises(futures.TimeoutError, list, iterator) def test_args(self): with self.MPICommExecutor(MPI.COMM_SELF) as executor: self.assertTrue(executor is not None) with self.MPICommExecutor(MPI.COMM_SELF, 0) as executor: self.assertTrue(executor is not None) def test_kwargs(self): with self.MPICommExecutor(comm=MPI.COMM_SELF) as executor: self.assertTrue(executor is not None) with self.MPICommExecutor(comm=MPI.COMM_SELF, root=0) as executor: self.assertTrue(executor is not None) @unittest.skipIf(SHARED_POOL, 'shared-pool') def test_arg_root(self): comm = MPI.COMM_WORLD rank = comm.Get_rank() for root in range(comm.Get_size()): with self.MPICommExecutor(comm, root) as executor: if rank != root: self.assertTrue(executor is None) with self.MPICommExecutor(root=root) as executor: if rank != root: self.assertTrue(executor is None) def test_arg_root_bad(self): size = MPI.COMM_WORLD.Get_size() self.assertRaises(ValueError, self.MPICommExecutor, root=-size) self.assertRaises(ValueError, self.MPICommExecutor, root=-1) self.assertRaises(ValueError, self.MPICommExecutor, root=+size) @unittest.skipIf(SHARED_POOL, 'shared-pool') def test_arg_comm_bad(self): if MPI.COMM_WORLD.Get_size() == 1: return intercomm = futures._lib.comm_split(MPI.COMM_WORLD) try: self.assertRaises(ValueError, self.MPICommExecutor, intercomm) finally: intercomm.Free() def test_with_bad(self): mpicommexecutor = self.MPICommExecutor(MPI.COMM_SELF) with mpicommexecutor as executor: try: with mpicommexecutor: pass except RuntimeError: pass else: self.fail('expected RuntimeError') from mpi4py.futures.aplus import ThenableFuture class ThenTest(unittest.TestCase): assert_ = unittest.TestCase.assertTrue def test_not_done(self): base_f = ThenableFuture() new_f = base_f.then() self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f._invoke_callbacks() self.assert_(new_f.cancelled()) def test_cancel(self): base_f = ThenableFuture() new_f = base_f.then() self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.cancel() self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(base_f.cancelled()) self.assert_(new_f.cancelled()) def test_then_multiple(self): base_f = ThenableFuture() new_f1 = base_f.then() new_f2 = base_f.then() new_f3 = base_f.then() self.assert_(base_f is not new_f1) self.assert_(base_f is not new_f2) self.assert_(base_f is not new_f3) self.assert_(not base_f.done()) self.assert_(not new_f1.done()) self.assert_(not new_f2.done()) self.assert_(not new_f3.done()) base_f.set_result('done') self.assert_(base_f.done()) self.assert_(new_f1.done()) self.assert_(new_f2.done()) self.assert_(new_f3.done()) self.assert_(not new_f1.exception()) self.assert_(not new_f2.exception()) self.assert_(not new_f3.exception()) self.assert_(new_f1.result() == 'done') self.assert_(new_f2.result() == 'done') self.assert_(new_f3.result() == 'done') def test_no_callbacks_and_success(self): base_f = ThenableFuture() new_f = base_f.then() self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_result('done') self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(not new_f.exception()) self.assert_(new_f.result() == 'done') def test_no_callbacks_and_failure(self): class MyException(Exception): pass base_f = ThenableFuture() new_f = base_f.then() self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_exception(MyException('sad')) self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(new_f.exception()) with self.assertRaises(MyException) as catcher: new_f.result() self.assert_(catcher.exception.args[0] == 'sad') def test_success_callback_and_success(self): base_f = ThenableFuture() new_f = base_f.then(lambda result: result + ' manipulated') self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_result('done') self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(not new_f.exception()) self.assert_(new_f.result() == 'done manipulated') def test_err_callback_and_failure_repackage(self): class MyException(Exception): pass class MyRepackagedException(Exception): pass class NotMatched(Exception): pass def on_failure(ex): if isinstance(ex, MyException): return MyRepackagedException(ex.args[0] + ' repackaged') else: return NotMatched('?') base_f = ThenableFuture() new_f = base_f.then(None, on_failure) self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_exception(MyException('sad')) self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(new_f.exception()) with self.assertRaises(MyRepackagedException) as catcher: new_f.result() self.assert_(catcher.exception.args[0] == 'sad repackaged') def test_err_callback_and_failure_raised(self): class MyException(Exception): pass class MyRepackagedException(Exception): pass def raise_something_else(ex): raise MyRepackagedException(ex.args[0] + ' repackaged') base_f = ThenableFuture() new_f = base_f.then(None, raise_something_else) self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_exception(MyException('sad')) self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(new_f.exception()) with self.assertRaises(MyRepackagedException) as catcher: new_f.result() self.assert_(catcher.exception.args[0] == 'sad repackaged') def test_err_callback_convert_to_success(self): class MyException(Exception): pass class NotMatched(Exception): pass def on_failure(ex): if isinstance(ex, MyException): return ex.args[0] + ' repackaged' else: return NotMatched('?') base_f = ThenableFuture() new_f = base_f.catch(on_failure) self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_exception(MyException('sad')) self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(not new_f.exception()) self.assert_(new_f.result() == 'sad repackaged') def test_err_catch_ignore(self): base_f = ThenableFuture() new_f = base_f.catch() self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_exception(Exception('sad')) self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(new_f.exception() is None) self.assert_(new_f.result() is None) def test_success_callback_and_failure_raised(self): class MyException(Exception): pass def raise_something_else(value): raise MyException(value + ' repackaged') base_f = ThenableFuture() new_f = base_f.then(raise_something_else) self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_result('sad') self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(new_f.exception()) with self.assertRaises(MyException) as catcher: new_f.result() assert catcher.exception.args[0] == 'sad repackaged' def test_chained_success_callback_and_success(self): def transform(value): f = ThenableFuture() if value < 5: f.set_result(transform(value+1)) else: f.set_result(value) return f base_f = ThenableFuture() new_f = base_f.then(transform) self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_result(1) self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(not new_f.exception()) self.assert_(new_f.result() == 5) def test_detect_circular_chains(self): f1 = ThenableFuture() f2 = ThenableFuture() chain = [f1, f2, f1] def transform(a): try: f = chain.pop(0) f.set_result(transform(a)) return f except IndexError: return 42 base_f = ThenableFuture() new_f = base_f.then(transform) self.assert_(base_f is not new_f) self.assert_(not base_f.done()) self.assert_(not new_f.done()) base_f.set_result(1) self.assert_(base_f.done()) self.assert_(new_f.done()) self.assert_(new_f.exception()) with self.assertRaises(RuntimeError) as catcher: new_f.result() assert 'Circular future chain detected' in catcher.exception.args[0] SKIP_POOL_TEST = False name, version = MPI.get_vendor() if name == 'Open MPI': if version < (3,0,0): SKIP_POOL_TEST = True if version == (4,0,0): SKIP_POOL_TEST = True if name == 'MPICH': if MPI.COMM_WORLD.Get_attr(MPI.APPNUM) is None: SKIP_POOL_TEST = True if name == 'MVAPICH2': SKIP_POOL_TEST = True if name == 'MPICH2': if MPI.COMM_WORLD.Get_attr(MPI.APPNUM) is None: SKIP_POOL_TEST = True if name == 'Microsoft MPI': if version < (8,1,0): SKIP_POOL_TEST = True if MPI.COMM_WORLD.Get_attr(MPI.APPNUM) is None: SKIP_POOL_TEST = True if name == 'Platform MPI': SKIP_POOL_TEST = True if MPI.Get_version() < (2,0): SKIP_POOL_TEST = True if SHARED_POOL: del MPICommExecutorTest.test_arg_root del MPICommExecutorTest.test_arg_comm_bad del ProcessPoolInitTest.test_init_globals if WORLD_SIZE == 1: del ProcessPoolInitTest.test_run_name del ProcessPoolPickleTest elif WORLD_SIZE > 1 or SKIP_POOL_TEST: del ProcessPoolInitTest del ProcessPoolBootupTest del ProcessPoolShutdownTest del ProcessPoolWaitTest del ProcessPoolAsCompletedTest del ProcessPoolExecutorTest del ProcessPoolSubmitTest del ProcessPoolPickleTest if __name__ == '__main__': unittest.main() mpi4py-3.0.3/demo/futures/test_service.sh0000775000175000017500000000242313426006675021470 0ustar dalcinldalcinl00000000000000#!/bin/bash PYTHON=${1-${PYTHON-python}} MPIEXEC=${MPIEXEC-mpiexec} testdir=$(dirname "$0") set -e if [ $(command -v mpichversion) ]; then $MPIEXEC -n 1 $PYTHON -m mpi4py.futures.server --xyz > /dev/null 2>&1 || true $MPIEXEC -n 2 $PYTHON -m mpi4py.futures.server --bind localhost & mpi4pyserver=$!; sleep 0.25; $MPIEXEC -n 1 $PYTHON $testdir/test_service.py --host localhost wait $mpi4pyserver $MPIEXEC -n 2 $PYTHON -m mpi4py.futures.server --port 31414 --info "a=x,b=y" & mpi4pyserver=$!; sleep 0.25; $MPIEXEC -n 1 $PYTHON $testdir/test_service.py --port 31414 --info "a=x,b=y" wait $mpi4pyserver fi if [ $(command -v mpichversion) ] && [ $(command -v hydra_nameserver) ]; then hydra_nameserver & nameserver=$!; sleep 0.25; $MPIEXEC -nameserver localhost -n 2 $PYTHON -m mpi4py.futures.server & mpi4pyserver=$!; sleep 0.25; $MPIEXEC -nameserver localhost -n 1 $PYTHON $testdir/test_service.py wait $mpi4pyserver $MPIEXEC -nameserver localhost -n 2 $PYTHON -m mpi4py.futures.server --service test-service & mpi4pyserver=$!; sleep 0.25; $MPIEXEC -nameserver localhost -n 1 $PYTHON $testdir/test_service.py --service test-service wait $mpi4pyserver kill -TERM $nameserver wait $nameserver 2>/dev/null || true fi mpi4py-3.0.3/demo/futures/perf_crawl.py0000644000175000017500000000536213200562156021122 0ustar dalcinldalcinl00000000000000""" Compare the speed of downloading URLs sequentially vs. using futures. """ import sys import time import functools try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen try: from concurrent.futures import ThreadPoolExecutor except ImportError: ThreadPoolExecutor = lambda n: None try: from concurrent.futures import ProcessPoolExecutor except ImportError: ProcessPoolExecutor = lambda n: None from mpi4py.futures import MPIPoolExecutor, as_completed URLS = [ 'http://www.google.com/', 'http://www.apple.com/', 'http://www.ibm.com', 'http://www.thisurlprobablydoesnotexist.com', 'http://www.slashdot.org/', 'http://www.python.org/', 'http://www.bing.com/', 'http://www.facebook.com/', 'http://www.yahoo.com/', 'http://www.youtube.com/', 'http://www.blogger.com/', ] def load_url(url, timeout): kwargs = {'timeout': timeout} if sys.version_info >= (2, 6) else {} return urlopen(url, **kwargs).read() def download_urls_sequential(urls, timeout=60): url_to_content = {} for url in urls: try: url_to_content[url] = load_url(url, timeout=timeout) except: pass return url_to_content def download_urls_with_executor(executor, urls, timeout=60): if executor is None: return {} try: url_to_content = {} future_to_url = dict((executor.submit(load_url, url, timeout), url) for url in urls) for future in as_completed(future_to_url): try: url_to_content[future_to_url[future]] = future.result() except: pass return url_to_content finally: executor.shutdown() def main(): for meth, fn in [('sequential', functools.partial(download_urls_sequential, URLS)), ('threads', functools.partial(download_urls_with_executor, ThreadPoolExecutor(10), URLS)), ('processes', functools.partial(download_urls_with_executor, ProcessPoolExecutor(10), URLS)), ('mpi4py', functools.partial(download_urls_with_executor, MPIPoolExecutor(10), URLS))]: sys.stdout.write('%s: ' % meth.ljust(11)) sys.stdout.flush() start = time.time() url_map = fn() elapsed = time.time() - start sys.stdout.write('%5.2f seconds (%2d of %d downloaded)\n' % (elapsed, len(url_map), len(URLS))) sys.stdout.flush() if __name__ == '__main__': main() mpi4py-3.0.3/demo/helloworld.cxx0000644000175000017500000000121112523721016017612 0ustar dalcinldalcinl00000000000000#include #include int main(int argc, char *argv[]) { #if defined(MPI_VERSION) && (MPI_VERSION >= 2) MPI::Init_thread(MPI_THREAD_MULTIPLE); #else MPI::Init(); #endif int size = MPI::COMM_WORLD.Get_size(); int rank = MPI::COMM_WORLD.Get_rank(); int len; char name[MPI_MAX_PROCESSOR_NAME]; MPI::Get_processor_name(name, len); std::cout << "Hello, World! " << "I am process " << rank << " of " << size << " on " << name << "." << std::endl; MPI::Finalize(); return 0; } // Local Variables: // mode: C++ // c-basic-offset: 2 // indent-tabs-mode: nil // End: mpi4py-3.0.3/demo/osu_latency.py0000644000175000017500000000372112712413654017630 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_latency( BENCHMARH = "MPI Latency Test", skip = 1000, loop = 10000, skip_large = 10, loop_large = 100, large_message_size = 8192, MAX_MSG_SIZE = 1<<22, ): comm = MPI.COMM_WORLD myid = comm.Get_rank() numprocs = comm.Get_size() if numprocs != 2: if myid == 0: errmsg = "This test requires exactly two processes" else: errmsg = None raise SystemExit(errmsg) s_buf = allocate(MAX_MSG_SIZE) r_buf = allocate(MAX_MSG_SIZE) if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Latency [us]")) message_sizes = [0] + [2**i for i in range(30)] for size in message_sizes: if size > MAX_MSG_SIZE: break if size > large_message_size: skip = skip_large loop = loop_large iterations = list(range(loop+skip)) s_msg = [s_buf, size, MPI.BYTE] r_msg = [r_buf, size, MPI.BYTE] # comm.Barrier() if myid == 0: for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Send(s_msg, 1, 1) comm.Recv(r_msg, 1, 1) t_end = MPI.Wtime() elif myid == 1: for i in iterations: comm.Recv(r_msg, 0, 1) comm.Send(s_msg, 0, 1) # if myid == 0: latency = (t_end - t_start) * 1e6 / (2 * loop) print ('%-10d%20.2f' % (size, latency)) def allocate(n): try: import mmap return mmap.mmap(-1, n) except (ImportError, EnvironmentError): try: from numpy import zeros return zeros(n, 'B') except ImportError: from array import array return array('B', [0]) * n if __name__ == '__main__': osu_latency() mpi4py-3.0.3/demo/libmpi-cffi/0000775000175000017500000000000013560002767017112 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/libmpi-cffi/test_latency.py0000644000175000017500000000403712750576064022172 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from libmpi import ffi, lib def osu_latency( BENCHMARH = "MPI Latency Test", skip = 1000, loop = 10000, skip_large = 10, loop_large = 100, large_message_size = 8192, MAX_MSG_SIZE = 1<<22, ): myid = ffi.new('int*') numprocs = ffi.new('int*') lib.MPI_Comm_rank(lib.MPI_COMM_WORLD, myid) lib.MPI_Comm_size(lib.MPI_COMM_WORLD, numprocs) myid = myid[0] numprocs = numprocs[0] if numprocs != 2: if myid == 0: errmsg = "This test requires exactly two processes" else: errmsg = None raise SystemExit(errmsg) sbuf = ffi.new('unsigned char[]', MAX_MSG_SIZE) rbuf = ffi.new('unsigned char[]', MAX_MSG_SIZE) dtype = lib.MPI_BYTE tag = 1 comm = lib.MPI_COMM_WORLD status = lib.MPI_STATUS_IGNORE if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Latency [us]")) message_sizes = [0] + [2**i for i in range(30)] for size in message_sizes: if size > MAX_MSG_SIZE: break if size > large_message_size: skip = skip_large loop = loop_large iterations = list(range(loop+skip)) # lib.MPI_Barrier(comm) if myid == 0: for i in iterations: if i == skip: t_start = lib.MPI_Wtime() lib.MPI_Send(sbuf, size, dtype, 1, tag, comm) lib.MPI_Recv(rbuf, size, dtype, 1, tag, comm, status) t_end = lib.MPI_Wtime() elif myid == 1: for i in iterations: lib.MPI_Recv(rbuf, size, dtype, 0, tag, comm, status) lib.MPI_Send(sbuf, size, dtype, 0, tag, comm) # if myid == 0: latency = (t_end - t_start) * 1e6 / (2 * loop) print ('%-10d%20.2f' % (size, latency)) def main(): lib.MPI_Init(ffi.NULL, ffi.NULL) osu_latency() lib.MPI_Finalize() if __name__ == '__main__': main() mpi4py-3.0.3/demo/libmpi-cffi/makefile0000644000175000017500000000070312750576064020616 0ustar dalcinldalcinl00000000000000.PHONY: default default: build test clean PYTHON = python .PHONY: build build: libmpi.h libmpi.c.in $(PYTHON) build.py libmpi.h libmpi.c.in: $(PYTHON) apigen.py MPIEXEC = mpiexec NP_FLAG = -n .PHONY: test test: build $(MPIEXEC) $(NP_FLAG) 5 $(PYTHON) test_helloworld.py $(MPIEXEC) $(NP_FLAG) 4 $(PYTHON) test_ringtest.py $(MPIEXEC) $(NP_FLAG) 2 $(PYTHON) test_latency.py .PHONY: clean clean: $(RM) -r libmpi.* $(RM) -r *py[co] __pycache__ mpi4py-3.0.3/demo/libmpi-cffi/test_helloworld.py0000644000175000017500000000101712750576064022701 0ustar dalcinldalcinl00000000000000from libmpi import ffi, lib NULL = ffi.NULL size_p = ffi.new('int*') rank_p = ffi.new('int*') nlen_p = ffi.new('int*') name_p = ffi.new('char[]', lib.MPI_MAX_PROCESSOR_NAME); lib.MPI_Init(NULL, NULL); lib.MPI_Comm_size(lib.MPI_COMM_WORLD, size_p) lib.MPI_Comm_rank(lib.MPI_COMM_WORLD, rank_p) lib.MPI_Get_processor_name(name_p, nlen_p) size = size_p[0] rank = rank_p[0] nlen = nlen_p[0] name = ffi.string(name_p[0:nlen]) print("Hello, World! I am process %d of %d on %s." % (rank, size, name)) lib.MPI_Finalize() mpi4py-3.0.3/demo/libmpi-cffi/apigen.py0000644000175000017500000000151413200562156020720 0ustar dalcinldalcinl00000000000000import sys, os.path as p wdir = p.abspath(p.dirname(__file__)) topdir = p.normpath(p.join(wdir, p.pardir, p.pardir)) srcdir = p.join(topdir, 'src') sys.path.insert(0, p.join(topdir, 'conf')) from mpiscanner import Scanner scanner = Scanner() libmpi_pxd = p.join(srcdir, 'mpi4py', 'libmpi.pxd') scanner.parse_file(libmpi_pxd) libmpi_h = p.join(wdir, 'libmpi.h') scanner.dump_header_h(libmpi_h) #try: # from cStringIO import StringIO #except ImportError: # from io import StringIO #libmpi_h = StringIO() #scanner.dump_header_h(libmpi_h) #print libmpi_h.read() libmpi_c = p.join(wdir, 'libmpi.c.in') with open(libmpi_c, 'w') as f: f.write("""\ #include #include "%(srcdir)s/lib-mpi/config.h" #include "%(srcdir)s/lib-mpi/missing.h" #include "%(srcdir)s/lib-mpi/fallback.h" #include "%(srcdir)s/lib-mpi/compat.h" """ % vars()) mpi4py-3.0.3/demo/libmpi-cffi/build.py0000644000175000017500000000315012750576064020566 0ustar dalcinldalcinl00000000000000import os import cffi ffi = cffi.FFI() with open("libmpi.c.in") as f: ffi.set_source("libmpi", f.read()) with open("libmpi.h") as f: ffi.cdef(f.read()) class mpicompiler(object): from cffi import ffiplatform def __init__(self, cc, ld=None): self.cc = cc self.ld = ld if ld else cc self.ffi_compile = self.ffiplatform.compile def __enter__(self): self.ffiplatform.compile = self.compile def __exit__(self, *args): self.ffiplatform.compile = self.ffi_compile def configure(self, compiler): from distutils.util import split_quoted from distutils.spawn import find_executable def fix_command(command, cmd): if not cmd: return cmd = split_quoted(cmd) exe = find_executable(cmd[0]) if not exe: return command[0] = exe command += cmd[1:] fix_command(compiler.compiler_so, self.cc) fix_command(compiler.linker_so, self.ld) def compile(self, *args, **kargs): from distutils.command import build_ext customize_compiler_orig = build_ext.customize_compiler def customize_compiler(compiler): customize_compiler_orig(compiler) self.configure(compiler) build_ext.customize_compiler = customize_compiler try: return self.ffi_compile(*args, **kargs) finally: build_ext.customize_compiler = customize_compiler_orig if __name__ == '__main__': cc = os.environ.get('MPICC', 'mpicc') ld = os.environ.get('MPILD') with mpicompiler(cc, ld): ffi.compile() mpi4py-3.0.3/demo/libmpi-cffi/test_ringtest.py0000644000175000017500000000437612750576064022400 0ustar dalcinldalcinl00000000000000from libmpi import ffi, lib def ring(comm, count=1, loop=1, skip=0): size_p = ffi.new('int*') rank_p = ffi.new('int*') lib.MPI_Comm_size(comm, size_p) lib.MPI_Comm_rank(comm, rank_p) size = size_p[0] rank = rank_p[0] source = (rank - 1) % size dest = (rank + 1) % size sbuf = ffi.new('unsigned char[]', [42]*count) rbuf = ffi.new('unsigned char[]', [ 0]*count) iterations = list(range((loop+skip))) if size == 1: for i in iterations: if i == skip: tic = lib.MPI_Wtime() lib.MPI_Sendrecv(sbuf, count, lib.MPI_BYTE, dest, 0, rbuf, count, lib.MPI_BYTE, source, 0, comm, lib.MPI_STATUS_IGNORE) else: if rank == 0: for i in iterations: if i == skip: tic = lib.MPI_Wtime() lib.MPI_Send(sbuf, count, lib.MPI_BYTE, dest, 0, comm) lib.MPI_Recv(rbuf, count, lib.MPI_BYTE, source, 0, comm, lib.MPI_STATUS_IGNORE) else: sbuf = rbuf for i in iterations: if i == skip: tic = lib.MPI_Wtime() lib.MPI_Recv(rbuf, count, lib.MPI_BYTE, source, 0, comm, lib.MPI_STATUS_IGNORE) lib.MPI_Send(sbuf, count, lib.MPI_BYTE, dest, 0, comm) toc = lib.MPI_Wtime() if rank == 0 and ffi.string(sbuf) != ffi.string(rbuf): import warnings, traceback try: warnings.warn("received message does not match!") except UserWarning: traceback.print_exc() lib.MPI_Abort(comm, 2) return toc - tic def ringtest(comm): size = ( 1 ) loop = ( 1 ) skip = ( 0 ) lib.MPI_Barrier(comm) elapsed = ring(comm, size, loop, skip) size_p = ffi.new('int*') rank_p = ffi.new('int*') lib.MPI_Comm_size(comm, size_p) lib.MPI_Comm_rank(comm, rank_p) comm_size = size_p[0] comm_rank = rank_p[0] if comm_rank == 0: print ("time for %d loops = %g seconds (%d processes, %d bytes)" % (loop, elapsed, comm_size, size)) def main(): lib.MPI_Init(ffi.NULL, ffi.NULL) ringtest(lib.MPI_COMM_WORLD) lib.MPI_Finalize() if __name__ == '__main__': main() mpi4py-3.0.3/demo/python-config0000755000175000017500000000432112750576064017447 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python # -*- python -*- import sys, os import getopt try: import sysconfig except ImportError: from distutils import sysconfig valid_opts = ['help', 'prefix', 'exec-prefix', 'includes', 'libs', 'cflags', 'ldflags', 'extension-suffix', 'abiflags', 'configdir'] def exit_with_usage(code=1): sys.stderr.write("Usage: %s [%s]\n" % ( sys.argv[0], '|'.join('--'+opt for opt in valid_opts))) sys.exit(code) try: opts, args = getopt.getopt(sys.argv[1:], '', valid_opts) except getopt.error: exit_with_usage() if not opts: exit_with_usage() getvar = sysconfig.get_config_var pyver = getvar('VERSION') try: abiflags = sys.abiflags except AttributeError: abiflags = '' opt_flags = [flag for (flag, val) in opts] if '--help' in opt_flags: exit_with_usage(code=0) for opt in opt_flags: if opt == '--prefix': print(getvar('prefix')) elif opt == '--exec-prefix': print(getvar('exec_prefix')) elif opt in ('--includes', '--cflags'): try: include = sysconfig.get_path('include') platinclude = sysconfig.get_path('platinclude') except AttributeError: include = sysconfig.get_python_inc() platinclude = sysconfig.get_python_inc(plat_specific=True) flags = ['-I' + include] if include != platinclude: flags.append('-I' + platinclude) if opt == '--cflags': flags.extend(getvar('CFLAGS').split()) print(' '.join(flags)) elif opt in ('--libs', '--ldflags'): libs = getvar('LIBS').split() + getvar('SYSLIBS').split() libs.append('-lpython' + pyver + abiflags) if opt == '--ldflags': if not getvar('Py_ENABLE_SHARED'): libs.insert(0, '-L' + getvar('LIBPL')) if not getvar('PYTHONFRAMEWORK'): libs.extend(getvar('LINKFORSHARED').split()) print(' '.join(libs)) elif opt == '--extension-suffix': ext_suffix = getvar('EXT_SUFFIX') if ext_suffix is None: ext_suffix = getvar('SO') print(ext_suffix) elif opt == '--abiflags': print(abiflags) elif opt == '--configdir': print(getvar('LIBPL')) mpi4py-3.0.3/demo/wrap-ctypes/0000775000175000017500000000000013560002767017207 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/wrap-ctypes/makefile0000644000175000017500000000054712750576064020721 0ustar dalcinldalcinl00000000000000.PHONY: default default: build test clean PYTHON = python MPICC = mpicc LIBNAME = libhelloworld.so .PHONY: build build: ${LIBNAME} ${LIBNAME}: helloworld.c ${MPICC} -shared -o $@ $< MPIEXEC = mpiexec NP_FLAG = -n NP = 5 .PHONY: test test: build ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test.py .PHONY: clean clean: ${RM} -r ${LIBNAME} *.pyc __pycache__ mpi4py-3.0.3/demo/wrap-ctypes/helloworld.py0000644000175000017500000000072212750576064021741 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import ctypes import os _libdir = os.path.dirname(__file__) if MPI._sizeof(MPI.Comm) == ctypes.sizeof(ctypes.c_int): MPI_Comm = ctypes.c_int else: MPI_Comm = ctypes.c_void_p _lib = ctypes.CDLL(os.path.join(_libdir, "libhelloworld.so")) _lib.sayhello.restype = None _lib.sayhello.argtypes = [MPI_Comm] def sayhello(comm): comm_ptr = MPI._addressof(comm) comm_val = MPI_Comm.from_address(comm_ptr) _lib.sayhello(comm_val) mpi4py-3.0.3/demo/wrap-ctypes/test.py0000644000175000017500000000033212750576064020542 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import helloworld as hw null = MPI.COMM_NULL hw.sayhello(null) comm = MPI.COMM_WORLD hw.sayhello(comm) try: hw.sayhello(list()) except: pass else: assert 0, "exception not raised" mpi4py-3.0.3/demo/wrap-ctypes/helloworld.c0000644000175000017500000000111312750576064021526 0ustar dalcinldalcinl00000000000000#define MPICH_SKIP_MPICXX 1 #define OMPI_SKIP_MPICXX 1 #include #include #ifdef __cplusplus extern "C" { #endif extern void sayhello(MPI_Comm); #ifdef __cplusplus } #endif void sayhello(MPI_Comm comm) { int size, rank; char pname[MPI_MAX_PROCESSOR_NAME]; int len; if (comm == MPI_COMM_NULL) { printf("You passed MPI_COMM_NULL !!!\n"); return; } MPI_Comm_size(comm, &size); MPI_Comm_rank(comm, &rank); MPI_Get_processor_name(pname, &len); pname[len] = 0; printf("Hello, World! I am process %d of %d on %s.\n", rank, size, pname); } mpi4py-3.0.3/demo/helloworld.f080000644000175000017500000000077112750576064017434 0ustar dalcinldalcinl00000000000000program main use mpi_f08 implicit none integer :: provided, size, rank, len character (len=MPI_MAX_PROCESSOR_NAME) :: name call MPI_Init_thread(MPI_THREAD_MULTIPLE, provided) call MPI_Comm_rank(MPI_COMM_WORLD, rank) call MPI_Comm_size(MPI_COMM_WORLD, size) call MPI_Get_processor_name(name, len) write(*, '(2A,I2,A,I2,3A)') & 'Hello, World! ', & 'I am process ', rank, & ' of ', size, & ' on ', name(1:len), '.' call MPI_Finalize() end program main mpi4py-3.0.3/demo/mpe-logging/0000775000175000017500000000000013560002767017136 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/mpe-logging/ring.py0000644000175000017500000000131012750576064020446 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python import os os.environ['MPE_LOGFILE_PREFIX'] = 'ring' import mpi4py mpi4py.profile('mpe') from mpi4py import MPI from array import array comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() src = rank-1 dest = rank+1 if rank == 0: src = size-1 if rank == size-1: dest = 0 try: from numpy import zeros a1 = zeros(1000000, 'd') a2 = zeros(1000000, 'd') except ImportError: from array import array a1 = array('d', [0]*1000); a1 *= 1000 a2 = array('d', [0]*1000); a2 *= 1000 comm.Sendrecv(sendbuf=a1, recvbuf=a2, source=src, dest=dest) MPI.Request.Waitall([ comm.Isend(a1, dest=dest), comm.Irecv(a2, source=src), ]) mpi4py-3.0.3/demo/mpe-logging/makefile0000644000175000017500000000132512523721016020626 0ustar dalcinldalcinl00000000000000MPIEXEC = mpiexec PYTHON = python N = 8 .PHONY: default default: build test clean .PHONY: run-cpilog run-ring run-threads run run: run-cpilog run-ring run-threads run-cpilog: ${MPIEXEC} -n ${N} ${PYTHON} cpilog.py run-ring: ${MPIEXEC} -n ${N} ${PYTHON} ring.py run-threads: ${MPIEXEC} -n ${N} ${PYTHON} threads.py .PHONY: view-cpilog view-ring view-threads view view: view-cpilog view-ring view-threads view-cpilog: cpilog.slog2 jumpshot $< view-ring: ring.slog2 jumpshot $< view-threads: threads.slog2 jumpshot $< cpilog.clog2: run-cpilog ring.clog2: run-ring threads.clog2: run-threads %.slog2: %.clog2 clog2TOslog2 $< .PHONY: build build: run .PHONY: test test: .PHONY: clean clean: ${RM} *.[cs]log2 mpi4py-3.0.3/demo/mpe-logging/cpilog.py0000644000175000017500000000212612750576064020772 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python # If you want MPE to log MPI calls, you have to add the two lines # below at the very beginning of your main bootstrap script. import mpi4py mpi4py.profile('mpe', logfile='cpilog') # Import the MPI extension module from mpi4py import MPI if 0: # <- use '1' to disable logging of MPI calls MPI.Pcontrol(0) # Import the 'array' module from array import array # This is just to make the logging # output a bit more interesting from time import sleep comm = MPI.COMM_WORLD nprocs = comm.Get_size() myrank = comm.Get_rank() n = array('i', [0]) pi = array('d', [0]) mypi = array('d', [0]) def comp_pi(n, myrank=0, nprocs=1): h = 1.0 / n; s = 0.0; for i in range(myrank + 1, n + 1, nprocs): x = h * (i - 0.5); s += 4.0 / (1.0 + x**2); return s * h comm.Barrier() for N in [10000]*10: if myrank == 0: n[0] = N comm.Bcast([n, MPI.INT], root=0) mypi[0] = comp_pi(n[0], myrank, nprocs) comm.Reduce([mypi, MPI.DOUBLE], [pi, MPI.DOUBLE], op=MPI.SUM, root=0) comm.Barrier() sleep(0.01) mpi4py-3.0.3/demo/mpe-logging/threads.py0000644000175000017500000000137112750576064021150 0ustar dalcinldalcinl00000000000000import sys import mpi4py mpi4py.profile('mpe', logfile='threads') from mpi4py import MPI from array import array try: import threading except ImportError: sys.stderr.write("threading module not available\n") sys.exit(0) send_msg = array('i', [7]*1000); send_msg *= 1000 recv_msg = array('i', [0]*1000); recv_msg *= 1000 def self_send(comm, rank): comm.Send([send_msg, MPI.INT], dest=rank, tag=0) def self_recv(comm, rank): comm.Recv([recv_msg, MPI.INT], source=rank, tag=0) comm = MPI.COMM_WORLD rank = comm.Get_rank() send_thread = threading.Thread(target=self_send, args=(comm, rank)) recv_thread = threading.Thread(target=self_recv, args=(comm, rank)) send_thread.start() recv_thread.start() recv_thread.join() send_thread.join() mpi4py-3.0.3/demo/helloworld.c0000644000175000017500000000115513134467271017252 0ustar dalcinldalcinl00000000000000#include #include int main(int argc, char *argv[]) { int size, rank, len; char name[MPI_MAX_PROCESSOR_NAME]; #if defined(MPI_VERSION) && (MPI_VERSION >= 2) int provided; MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); #else MPI_Init(&argc, &argv); #endif MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Get_processor_name(name, &len); printf("Hello, World! I am process %d of %d on %s.\n", rank, size, name); MPI_Finalize(); return 0; } /* * Local Variables: * mode: C * c-basic-offset: 2 * indent-tabs-mode: nil * End: */ mpi4py-3.0.3/demo/osu_bw.py0000644000175000017500000000471712523721016016601 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_bw( BENCHMARH = "MPI Bandwidth Test", skip = 10, loop = 100, window_size = 64, skip_large = 2, loop_large = 20, window_size_large = 64, large_message_size = 8192, MAX_MSG_SIZE = 1<<22, ): comm = MPI.COMM_WORLD myid = comm.Get_rank() numprocs = comm.Get_size() if numprocs != 2: if myid == 0: errmsg = "This test requires exactly two processes" else: errmsg = None raise SystemExit(errmsg) s_buf = allocate(MAX_MSG_SIZE) r_buf = allocate(MAX_MSG_SIZE) if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Bandwidth [MB/s]")) message_sizes = [2**i for i in range(30)] for size in message_sizes: if size > MAX_MSG_SIZE: break if size > large_message_size: skip = skip_large loop = loop_large window_size = window_size_large iterations = list(range(loop+skip)) window_sizes = list(range(window_size)) requests = [MPI.REQUEST_NULL] * window_size # comm.Barrier() if myid == 0: s_msg = [s_buf, size, MPI.BYTE] r_msg = [r_buf, 4, MPI.BYTE] for i in iterations: if i == skip: t_start = MPI.Wtime() for j in window_sizes: requests[j] = comm.Isend(s_msg, 1, 100) MPI.Request.Waitall(requests) comm.Recv(r_msg, 1, 101) t_end = MPI.Wtime() elif myid == 1: s_msg = [s_buf, 4, MPI.BYTE] r_msg = [r_buf, size, MPI.BYTE] for i in iterations: for j in window_sizes: requests[j] = comm.Irecv(r_msg, 0, 100) MPI.Request.Waitall(requests) comm.Send(s_msg, 0, 101) # if myid == 0: MB = size / 1e6 * loop * window_size s = t_end - t_start print ('%-10d%20.2f' % (size, MB/s)) def allocate(n): try: import mmap return mmap.mmap(-1, n) except (ImportError, EnvironmentError): try: from numpy import zeros return zeros(n, 'B') except ImportError: from array import array return array('B', [0]) * n if __name__ == '__main__': osu_bw() mpi4py-3.0.3/demo/compute-pi/0000775000175000017500000000000013560002767017013 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/compute-pi/makefile0000644000175000017500000000027412523721016020505 0ustar dalcinldalcinl00000000000000.PHONY: test MPIEXEC=mpiexec -n 1 PYTHON=python test: echo 100 | ${MPIEXEC} ${PYTHON} cpi-cco.py echo 100 | ${MPIEXEC} ${PYTHON} cpi-rma.py echo 100 | ${MPIEXEC} ${PYTHON} cpi-dpm.py mpi4py-3.0.3/demo/compute-pi/README.txt0000644000175000017500000000006312523721016020477 0ustar dalcinldalcinl00000000000000Different approaches for computing PI in parallel. mpi4py-3.0.3/demo/compute-pi/cpi-dpm.py0000644000175000017500000001070712750576064020727 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python """ Parallel PI computation using Dynamic Process Management (DPM) within Python objects exposing memory buffers (requires NumPy). usage: + parent/child model:: $ mpiexec -n 1 python cpi-dpm.py [nchilds] + client/server model:: $ [xterm -e] mpiexec -n python cpi-dpm.py server [-v] & $ [xterm -e] mpiexec -n 1 python cpi-dpm.py client [-v] """ import sys from mpi4py import MPI import numpy as N def get_n(): prompt = "Enter the number of intervals: (0 quits) " try: n = int(input(prompt)) if n < 0: n = 0 except: n = 0 return n def view(pi, np=None, wt=None): from math import pi as PI prn = sys.stdout.write if pi is not None: prn("computed pi is: %.16f\n" % pi) prn("absolute error: %.16f\n" % abs(pi - PI)) if np is not None: prn("computing units: %d processes\n" % np) if wt is not None: prn("wall clock time: %g seconds\n" % wt) sys.stdout.flush() def comp_pi(n, comm, root=0): nprocs = comm.Get_size() myrank = comm.Get_rank() n = N.array(n, 'i') comm.Bcast([n, MPI.INT], root=root) if n == 0: return 0.0 h = 1.0 / n; s = 0.0; for i in range(myrank, n, nprocs): x = h * (i + 0.5); s += 4.0 / (1.0 + x**2); mypi = s * h mypi = N.array(mypi, 'd') pi = N.array(0, 'd') comm.Reduce([mypi, MPI.DOUBLE], [pi, MPI.DOUBLE], root=root, op=MPI.SUM) return pi def master(icomm): n = get_n() wt = MPI.Wtime() n = N.array(n, 'i') icomm.Send([n, MPI.INT], dest=0) pi = N.array(0, 'd') icomm.Recv([pi, MPI.DOUBLE], source=0) wt = MPI.Wtime() - wt if n == 0: return np = icomm.Get_remote_size() view(pi, np, wt) def worker(icomm): myrank = icomm.Get_rank() if myrank == 0: source = dest = 0 else: source = dest = MPI.PROC_NULL n = N.array(0, 'i') icomm.Recv([n, MPI.INT], source=source) pi = comp_pi(n, comm=MPI.COMM_WORLD, root=0) pi = N.array(pi, 'd') icomm.Send([pi, MPI.DOUBLE], dest=dest) # Parent/Child def main_parent(nprocs=1): assert nprocs > 0 assert MPI.COMM_WORLD.Get_size() == 1 icomm = MPI.COMM_WORLD.Spawn(command=sys.executable, args=[__file__, 'child'], maxprocs=nprocs) master(icomm) icomm.Disconnect() def main_child(): icomm = MPI.Comm.Get_parent() assert icomm != MPI.COMM_NULL worker(icomm) icomm.Disconnect() # Client/Server def main_server(COMM): nprocs = COMM.Get_size() myrank = COMM.Get_rank() service, port, info = None, None, MPI.INFO_NULL if myrank == 0: port = MPI.Open_port(info) log(COMM, "open port '%s'", port) service = 'cpi' MPI.Publish_name(service, port, info) log(COMM, "service '%s' published.", service) else: port = '' log(COMM, "waiting for client connection ...") icomm = COMM.Accept(port, info, root=0) log(COMM, "client connection accepted.") worker(icomm) log(COMM, "disconnecting from client ...") icomm.Disconnect() log(COMM, "client disconnected.") if myrank == 0: MPI.Unpublish_name(service, port, info) log(COMM, "service '%s' unpublished", port) MPI.Close_port(port) log(COMM, "closed port '%s' ", port) def main_client(COMM): assert COMM.Get_size() == 1 service, info = 'cpi', MPI.INFO_NULL port = MPI.Lookup_name(service, info) log(COMM, "service '%s' found in port '%s'.", service, port) log(COMM, "connecting to server ...") icomm = COMM.Connect(port, info, root=0) log(COMM, "server connected.") master(icomm) log(COMM, "disconnecting from server ...") icomm.Disconnect() log(COMM, "server disconnected.") def main(): assert len(sys.argv) <= 2 if 'server' in sys.argv: main_server(MPI.COMM_WORLD) elif 'client' in sys.argv: main_client(MPI.COMM_WORLD) elif 'child' in sys.argv: main_child() else: try: nchilds = int(sys.argv[1]) except: nchilds = 2 main_parent(nchilds) VERBOSE = False def log(COMM, fmt, *args): if not VERBOSE: return if COMM.rank != 0: return sys.stdout.write(fmt % args) sys.stdout.write('\n') sys.stdout.flush() if __name__ == '__main__': if '-v' in sys.argv: VERBOSE = True sys.argv.remove('-v') main() mpi4py-3.0.3/demo/compute-pi/cpi-rma.py0000644000175000017500000000310412523721016020702 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python """ Parallel PI computation using Remote Memory Access (RMA) within Python objects exposing memory buffers (requires NumPy). usage:: $ mpiexec -n python cpi-rma.py """ from mpi4py import MPI from math import pi as PI from numpy import array def get_n(): prompt = "Enter the number of intervals: (0 quits) " try: n = int(input(prompt)); if n < 0: n = 0 except: n = 0 return n def comp_pi(n, myrank=0, nprocs=1): h = 1.0 / n; s = 0.0; for i in range(myrank + 1, n + 1, nprocs): x = h * (i - 0.5); s += 4.0 / (1.0 + x**2); return s * h def prn_pi(pi, PI): message = "pi is approximately %.16f, error is %.16f" print (message % (pi, abs(pi - PI))) nprocs = MPI.COMM_WORLD.Get_size() myrank = MPI.COMM_WORLD.Get_rank() n = array(0, dtype=int) pi = array(0, dtype=float) mypi = array(0, dtype=float) if myrank == 0: win_n = MPI.Win.Create(n, comm=MPI.COMM_WORLD) win_pi = MPI.Win.Create(pi, comm=MPI.COMM_WORLD) else: win_n = MPI.Win.Create(None, comm=MPI.COMM_WORLD) win_pi = MPI.Win.Create(None, comm=MPI.COMM_WORLD) while True: if myrank == 0: _n = get_n() n.fill(_n) pi.fill(0.0) win_n.Fence() if myrank != 0: win_n.Get([n, MPI.INT], 0) win_n.Fence() if n == 0: break _mypi = comp_pi(n, myrank, nprocs) mypi.fill(_mypi) win_pi.Fence() win_pi.Accumulate([mypi, MPI.DOUBLE], 0, op=MPI.SUM) win_pi.Fence() if myrank == 0: prn_pi(pi, PI) win_n.Free() win_pi.Free() mpi4py-3.0.3/demo/compute-pi/cpi-cco.py0000644000175000017500000000236512523721016020677 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python """ Parallel PI computation using Collective Communication Operations (CCO) within Python objects exposing memory buffers (requires NumPy). usage:: $ mpiexec -n python cpi-buf.py """ from mpi4py import MPI from math import pi as PI from numpy import array def get_n(): prompt = "Enter the number of intervals: (0 quits) " try: n = int(input(prompt)) if n < 0: n = 0 except: n = 0 return n def comp_pi(n, myrank=0, nprocs=1): h = 1.0 / n s = 0.0 for i in range(myrank + 1, n + 1, nprocs): x = h * (i - 0.5) s += 4.0 / (1.0 + x**2) return s * h def prn_pi(pi, PI): message = "pi is approximately %.16f, error is %.16f" print (message % (pi, abs(pi - PI))) comm = MPI.COMM_WORLD nprocs = comm.Get_size() myrank = comm.Get_rank() n = array(0, dtype=int) pi = array(0, dtype=float) mypi = array(0, dtype=float) while True: if myrank == 0: _n = get_n() n.fill(_n) comm.Bcast([n, MPI.INT], root=0) if n == 0: break _mypi = comp_pi(n, myrank, nprocs) mypi.fill(_mypi) comm.Reduce([mypi, MPI.DOUBLE], [pi, MPI.DOUBLE], op=MPI.SUM, root=0) if myrank == 0: prn_pi(pi, PI) mpi4py-3.0.3/demo/wrap-cython/0000775000175000017500000000000013560002767017204 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/wrap-cython/makefile0000644000175000017500000000120013200562156020665 0ustar dalcinldalcinl00000000000000.PHONY: default default: build test clean PYTHON = python PYTHON_CONFIG = ${PYTHON} ../python-config CYTHON = cython .PHONY: src src: helloworld.c helloworld.c: helloworld.pyx ${CYTHON} $< MPICC = mpicc CFLAGS = -fPIC ${shell ${PYTHON_CONFIG} --includes} LDFLAGS = -shared ${shell ${PYTHON_CONFIG} --libs} SO = ${shell ${PYTHON_CONFIG} --extension-suffix} .PHONY: build build: helloworld${SO} helloworld${SO}: helloworld.c ${MPICC} ${CFLAGS} -o $@ $< ${LDFLAGS} MPIEXEC = mpiexec NP_FLAG = -n NP = 5 .PHONY: test test: build ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test.py .PHONY: clean clean: ${RM} helloworld.c helloworld${SO} mpi4py-3.0.3/demo/wrap-cython/test.py0000644000175000017500000000046212523721016020526 0ustar dalcinldalcinl00000000000000from mpi4py import MPI import helloworld as hw null = MPI.COMM_NULL hw.sayhello(null) comm = MPI.COMM_WORLD hw.sayhello(comm) try: hw.sayhello(None) except: pass else: assert 0, "exception not raised" try: hw.sayhello(list()) except: pass else: assert 0, "exception not raised" mpi4py-3.0.3/demo/wrap-cython/mpi-compat.h0000644000175000017500000000044012750576064021425 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ #ifndef MPI_COMPAT_H #define MPI_COMPAT_H #include #if (MPI_VERSION < 3) && !defined(PyMPI_HAVE_MPI_Message) typedef void *PyMPI_MPI_Message; #define MPI_Message PyMPI_MPI_Message #endif #endif/*MPI_COMPAT_H*/ mpi4py-3.0.3/demo/wrap-cython/helloworld.pyx0000644000175000017500000000122313200562156022107 0ustar dalcinldalcinl00000000000000cdef extern from "mpi-compat.h": pass cimport mpi4py.MPI as MPI from mpi4py.libmpi cimport * cdef extern from "stdio.h": int printf(char*, ...) cdef void c_sayhello(MPI_Comm comm): cdef int size, rank, plen cdef char pname[MPI_MAX_PROCESSOR_NAME] if comm == MPI_COMM_NULL: printf(b"You passed MPI_COMM_NULL !!!%s", b"\n") return MPI_Comm_size(comm, &size) MPI_Comm_rank(comm, &rank) MPI_Get_processor_name(pname, &plen) printf(b"Hello, World! I am process %d of %d on %s.\n", rank, size, pname) def sayhello(MPI.Comm comm not None ): cdef MPI_Comm c_comm = comm.ob_mpi c_sayhello(c_comm) mpi4py-3.0.3/demo/init-fini/0000775000175000017500000000000013560002767016617 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/init-fini/test_2a.py0000644000175000017500000000045012523721016020520 0ustar dalcinldalcinl00000000000000from mpi4py import rc rc.initialize = False from mpi4py import MPI assert not MPI.Is_initialized() assert not MPI.Is_finalized() MPI.Init_thread(MPI.THREAD_MULTIPLE) assert MPI.Is_initialized() assert not MPI.Is_finalized() MPI.Finalize() assert MPI.Is_initialized() assert MPI.Is_finalized() mpi4py-3.0.3/demo/init-fini/test_1.py0000644000175000017500000000041612523721016020360 0ustar dalcinldalcinl00000000000000from mpi4py import rc rc.initialize = False from mpi4py import MPI assert not MPI.Is_initialized() assert not MPI.Is_finalized() MPI.Init() assert MPI.Is_initialized() assert not MPI.Is_finalized() MPI.Finalize() assert MPI.Is_initialized() assert MPI.Is_finalized() mpi4py-3.0.3/demo/init-fini/runtests.sh0000755000175000017500000000053412523721016021036 0ustar dalcinldalcinl00000000000000#!/bin/sh MPIEXEC=mpiexec NP_FLAG=-n NP=3 PYTHON=python set -x $MPIEXEC $NP_FLAG $NP $PYTHON test_0.py $MPIEXEC $NP_FLAG $NP $PYTHON test_1.py $MPIEXEC $NP_FLAG $NP $PYTHON test_2a.py $MPIEXEC $NP_FLAG $NP $PYTHON test_2b.py $MPIEXEC $NP_FLAG $NP $PYTHON test_3.py $MPIEXEC $NP_FLAG $NP $PYTHON test_4.py $MPIEXEC $NP_FLAG $NP $PYTHON test_5.py mpi4py-3.0.3/demo/init-fini/runtests.bat0000644000175000017500000000032512523721016021165 0ustar dalcinldalcinl00000000000000@echo off setlocal ENABLEEXTENSIONS set PYTHON=python @echo on %PYTHON% test_0.py %PYTHON% test_1.py %PYTHON% test_2a.py %PYTHON% test_2b.py %PYTHON% test_3.py %PYTHON% test_4.py %PYTHON% test_5.py mpi4py-3.0.3/demo/init-fini/makefile0000644000175000017500000000063412523721016020311 0ustar dalcinldalcinl00000000000000MPIEXEC=mpiexec NP_FLAG=-n NP=3 PYTHON=python .PHONY: test test: ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test_0.py ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test_1.py ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test_2a.py ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test_2b.py ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test_3.py ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test_4.py ${MPIEXEC} ${NP_FLAG} ${NP} ${PYTHON} test_5.py mpi4py-3.0.3/demo/init-fini/test_0.py0000644000175000017500000000005512523721016020356 0ustar dalcinldalcinl00000000000000from mpi4py import rc from mpi4py import MPI mpi4py-3.0.3/demo/init-fini/test_5.py0000644000175000017500000000060512750576064020401 0ustar dalcinldalcinl00000000000000from mpi4py import rc del rc.initialize del rc.threads del rc.thread_level del rc.finalize from mpi4py import MPI assert MPI.Is_initialized() assert not MPI.Is_finalized() import sys name, _ = MPI.get_vendor() if name == 'MPICH': assert MPI.Query_thread() == MPI.THREAD_MULTIPLE if name == 'MPICH2' and sys.platform[:3] != 'win': assert MPI.Query_thread() == MPI.THREAD_MULTIPLE mpi4py-3.0.3/demo/init-fini/test_3.py0000644000175000017500000000017512523721016020364 0ustar dalcinldalcinl00000000000000from mpi4py import rc rc.finalize = False from mpi4py import MPI assert MPI.Is_initialized() assert not MPI.Is_finalized() mpi4py-3.0.3/demo/init-fini/test_2b.py0000644000175000017500000000075512750576064020546 0ustar dalcinldalcinl00000000000000from mpi4py import rc rc.initialize = False from mpi4py import MPI assert not MPI.Is_initialized() assert not MPI.Is_finalized() MPI.Init_thread() assert MPI.Is_initialized() assert not MPI.Is_finalized() import sys name, _ = MPI.get_vendor() if name == 'MPICH': assert MPI.Query_thread() == MPI.THREAD_MULTIPLE if name == 'MPICH2' and sys.platform[:3] != 'win': assert MPI.Query_thread() == MPI.THREAD_MULTIPLE MPI.Finalize() assert MPI.Is_initialized() assert MPI.Is_finalized() mpi4py-3.0.3/demo/init-fini/test_4.py0000644000175000017500000000030312523721016020356 0ustar dalcinldalcinl00000000000000from mpi4py import rc rc.finalize = False from mpi4py import MPI assert MPI.Is_initialized() assert not MPI.Is_finalized() MPI.Finalize() assert MPI.Is_initialized() assert MPI.Is_finalized() mpi4py-3.0.3/demo/embedding/0000775000175000017500000000000013560002767016647 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/embedding/makefile0000644000175000017500000000072712750576064020361 0ustar dalcinldalcinl00000000000000.PHONY: default build test clean default: build test clean PYTHON = python PYTHON_CONFIG = ${PYTHON} ../python-config MPICC = mpicc CFLAGS = ${shell ${PYTHON_CONFIG} --cflags} LDFLAGS = ${shell ${PYTHON_CONFIG} --ldflags} build: helloworld.exe helloworld.exe: helloworld.c ${MPICC} ${CFLAGS} -o $@ $< ${LDFLAGS} MPIEXEC = mpiexec NP_FLAG = -n NP = 5 test: build ${MPIEXEC} ${NP_FLAG} ${NP} ./helloworld.exe clean: ${RM} -r helloworld.exe helloworld.exe.dSYM mpi4py-3.0.3/demo/embedding/helloworld.c0000644000175000017500000000200213200562156021150 0ustar dalcinldalcinl00000000000000/* * You can use safely use mpi4py between multiple * Py_Initialize()/Py_Finalize() calls ... * but do not blame me for the memory leaks ;-) * */ #include #include const char helloworld[] = \ "from mpi4py import MPI \n" "hwmess = 'Hello, World! I am process %d of %d on %s.' \n" "myrank = MPI.COMM_WORLD.Get_rank() \n" "nprocs = MPI.COMM_WORLD.Get_size() \n" "procnm = MPI.Get_processor_name() \n" "print (hwmess % (myrank, nprocs, procnm)) \n" ""; int main(int argc, char *argv[]) { int i,n=5; MPI_Init(&argc, &argv); for (i=0; i #include static void sayhello(MPI_Comm comm) { if (comm == MPI_COMM_NULL) { std::cout << "You passed MPI_COMM_NULL !!!" << std::endl; return; } int size; MPI_Comm_size(comm, &size); int rank; MPI_Comm_rank(comm, &rank); int plen; char pname[MPI_MAX_PROCESSOR_NAME]; MPI_Get_processor_name(pname, &plen); std::cout << "Hello, World! " << "I am process " << rank << " of " << size << " on " << pname << "." << std::endl; } #include #include using namespace boost::python; static void hw_sayhello(object py_comm) { PyObject* py_obj = py_comm.ptr(); MPI_Comm *comm_p = PyMPIComm_Get(py_obj); if (comm_p == NULL) throw_error_already_set(); sayhello(*comm_p); } BOOST_PYTHON_MODULE(helloworld) { if (import_mpi4py() < 0) return; /* Python 2.X */ def("sayhello", hw_sayhello); } /* * Local Variables: * mode: C++ * End: */ mpi4py-3.0.3/demo/osu_bibw.py0000644000175000017500000000525012523721016017105 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_bw( BENCHMARH = "MPI Bi-Directional Bandwidth Test", skip = 10, loop = 100, window_size = 64, skip_large = 2, loop_large = 20, window_size_large = 64, large_message_size = 8192, MAX_MSG_SIZE = 1<<22, ): comm = MPI.COMM_WORLD myid = comm.Get_rank() numprocs = comm.Get_size() if numprocs != 2: if myid == 0: errmsg = "This test requires exactly two processes" else: errmsg = None raise SystemExit(errmsg) s_buf = allocate(MAX_MSG_SIZE) r_buf = allocate(MAX_MSG_SIZE) if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Bandwidth [MB/s]")) message_sizes = [2**i for i in range(30)] for size in message_sizes: if size > MAX_MSG_SIZE: break if size > large_message_size: skip = skip_large loop = loop_large window_size = window_size_large iterations = list(range(loop+skip)) window_sizes = list(range(window_size)) s_msg = [s_buf, size, MPI.BYTE] r_msg = [r_buf, size, MPI.BYTE] send_request = [MPI.REQUEST_NULL] * window_size recv_request = [MPI.REQUEST_NULL] * window_size # comm.Barrier() if myid == 0: for i in iterations: if i == skip: t_start = MPI.Wtime() for j in window_sizes: recv_request[j] = comm.Irecv(r_msg, 1, 10) for j in window_sizes: send_request[j] = comm.Isend(s_msg, 1, 100) MPI.Request.Waitall(send_request) MPI.Request.Waitall(recv_request) t_end = MPI.Wtime() elif myid == 1: for i in iterations: for j in window_sizes: recv_request[j] = comm.Irecv(r_msg, 0, 100) for j in window_sizes: send_request[j] = comm.Isend(s_msg, 0, 10) MPI.Request.Waitall(send_request) MPI.Request.Waitall(recv_request) # if myid == 0: MB = size / 1e6 * loop * window_size s = t_end - t_start print ('%-10d%20.2f' % (size, MB/s)) def allocate(n): try: import mmap return mmap.mmap(-1, n) except (ImportError, EnvironmentError): try: from numpy import zeros return zeros(n, 'B') except ImportError: from array import array return array('B', [0]) * n if __name__ == '__main__': osu_bw() mpi4py-3.0.3/demo/vampirtrace/0000775000175000017500000000000013560002767017246 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/demo/vampirtrace/ring.py0000644000175000017500000000146112750576064020565 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python # If you want VampirTrace to log MPI calls, you have to add the two # lines below at the very beginning of your main bootstrap script. import mpi4py mpi4py.rc.threads = False mpi4py.profile('vt-mpi', logfile='ring') from mpi4py import MPI comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() src = rank-1 dest = rank+1 if rank == 0: src = size-1 if rank == size-1: dest = 0 try: from numpy import zeros a1 = zeros(1000000, 'd') a2 = zeros(1000000, 'd') except ImportError: from array import array a1 = array('d', [0]*1000); a1 *= 1000 a2 = array('d', [0]*1000); a2 *= 1000 comm.Sendrecv(sendbuf=a1, recvbuf=a2, source=src, dest=dest) MPI.Request.Waitall([ comm.Isend(a1, dest=dest), comm.Irecv(a2, source=src), ]) mpi4py-3.0.3/demo/vampirtrace/makefile0000644000175000017500000000131712750576064020754 0ustar dalcinldalcinl00000000000000MPIEXEC = mpiexec PYTHON = python N = 8 .PHONY: default default: build test clean .PHONY: run-cpilog run-ring run-threads run run: run-cpilog run-ring run-threads run-cpilog: ${MPIEXEC} -n ${N} ${PYTHON} cpilog.py run-ring: ${MPIEXEC} -n ${N} ${PYTHON} ring.py run-threads: ${MPIEXEC} -n ${N} ${PYTHON} threads.py .PHONY: view-cpilog view-ring view-threads view view: view-cpilog view-ring view-threads view-cpilog: cpilog.otf view-ring: ring.otf view-threads: threads.otf cpilog.otf: run-cpilog ring.otf: run-ring threads.otf: run-threads .PHONY: build build: .PHONY: test test: run .PHONY: clean clean: ${RM} *.otf *.uctl *.*.def.z *.*.events.z *.*.marker.z ${RM} *.thumb *.*.def *.*.events mpi4py-3.0.3/demo/vampirtrace/cpilog.py0000644000175000017500000000206012750576064021077 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python # If you want VampirTrace to log MPI calls, you have to add the two # lines below at the very beginning of your main bootstrap script. import mpi4py mpi4py.rc.threads = False mpi4py.profile('vt', logfile='cpilog') # Import the MPI extension module from mpi4py import MPI # Import the 'array' module from array import array # This is just to make the logging # output a bit more interesting from time import sleep comm = MPI.COMM_WORLD nprocs = comm.Get_size() myrank = comm.Get_rank() n = array('i', [0]) pi = array('d', [0]) mypi = array('d', [0]) def comp_pi(n, myrank=0, nprocs=1): h = 1.0 / n; s = 0.0; for i in range(myrank + 1, n + 1, nprocs): x = h * (i - 0.5); s += 4.0 / (1.0 + x**2); return s * h comm.Barrier() for N in [10000]*10: if myrank == 0: n[0] = N comm.Bcast([n, MPI.INT], root=0) mypi[0] = comp_pi(n[0], myrank, nprocs) comm.Reduce([mypi, MPI.DOUBLE], [pi, MPI.DOUBLE], op=MPI.SUM, root=0) comm.Barrier() sleep(0.01) mpi4py-3.0.3/demo/vampirtrace/threads.py0000644000175000017500000000161612750576064021262 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python import mpi4py mpi4py.rc.threads = True mpi4py.rc.thread_level = "funneled" mpi4py.profile('vt-hyb', logfile='threads') from mpi4py import MPI from threading import Thread MPI.COMM_WORLD.Barrier() # Understanding the Python GIL # David Beazley, http://www.dabeaz.com # PyCon 2010, Atlanta, Georgia # http://www.dabeaz.com/python/UnderstandingGIL.pdf # Consider this trivial CPU-bound function def countdown(n): while n > 0: n -= 1 # Run it once with a lot of work COUNT = 10000000 # 10 millon tic = MPI.Wtime() countdown(COUNT) toc = MPI.Wtime() print ("sequential: %f seconds" % (toc-tic)) # Now, subdivide the work across two threads t1 = Thread(target=countdown, args=(COUNT//2,)) t2 = Thread(target=countdown, args=(COUNT//2,)) tic = MPI.Wtime() for t in (t1, t2): t.start() for t in (t1, t2): t.join() toc = MPI.Wtime() print ("threaded: %f seconds" % (toc-tic)) mpi4py-3.0.3/demo/osu_allgather.py0000644000175000017500000000341412750576064020142 0ustar dalcinldalcinl00000000000000# http://mvapich.cse.ohio-state.edu/benchmarks/ from mpi4py import MPI def osu_bcast( BENCHMARH = "MPI Allgather Latency Test", skip = 1000, loop = 10000, skip_large = 10, loop_large = 100, large_message_size = 8192, MAX_MSG_SIZE = 1<<20, ): comm = MPI.COMM_WORLD myid = comm.Get_rank() numprocs = comm.Get_size() if numprocs < 2: if myid == 0: errmsg = "This test requires at least two processes" else: errmsg = None raise SystemExit(errmsg) r_buf = allocate(MAX_MSG_SIZE*numprocs) if myid == 0: print ('# %s' % (BENCHMARH,)) if myid == 0: print ('# %-8s%20s' % ("Size [B]", "Latency [us]")) for size in message_sizes(MAX_MSG_SIZE): if size > large_message_size: skip = skip_large loop = loop_large iterations = list(range(loop+skip)) s_msg = MPI.IN_PLACE r_msg = [r_buf, size, MPI.BYTE] # comm.Barrier() for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Allgather(s_msg, r_msg) t_end = MPI.Wtime() comm.Barrier() # if myid == 0: latency = (t_end - t_start) * 1e6 / loop print ('%-10d%20.2f' % (size, latency)) def message_sizes(max_size): return [0] + [(1< large_message_size: skip = skip_large loop = loop_large iterations = list(range(loop+skip)) if myid == 0: s_msg = MPI.IN_PLACE r_msg = [r_buf, size, MPI.BYTE] else: s_msg = [s_buf, size, MPI.BYTE] r_msg = None # comm.Barrier() for i in iterations: if i == skip: t_start = MPI.Wtime() comm.Gather(s_msg, r_msg, 0) t_end = MPI.Wtime() comm.Barrier() # if myid == 0: latency = (t_end - t_start) * 1e6 / loop print ('%-10d%20.2f' % (size, latency)) def message_sizes(max_size): return [0] + [(1< #define MPICH_IGNORE_CXX_SEEK 1 #define OMPI_IGNORE_CXX_SEEK 1 #include #ifdef __FreeBSD__ #include #endif static int PyMPI_Main(int, char **); #if PY_MAJOR_VERSION >= 3 static int Py3_Main(int, char **); #endif /* -------------------------------------------------------------------------- */ int main(int argc, char **argv) { #ifdef __FreeBSD__ fedisableexcept(FE_OVERFLOW); #endif return PyMPI_Main(argc, argv); } static int PyMPI_Main(int argc, char **argv) { int sts=0, flag=1, finalize=0; /* MPI initalization */ (void)MPI_Initialized(&flag); if (!flag) { #if defined(MPI_VERSION) && (MPI_VERSION > 1) int required = MPI_THREAD_MULTIPLE; int provided = MPI_THREAD_SINGLE; (void)MPI_Init_thread(&argc, &argv, required, &provided); #else (void)MPI_Init(&argc, &argv); #endif finalize = 1; } /* Python main */ #if PY_MAJOR_VERSION >= 3 sts = Py3_Main(argc, argv); #else sts = Py_Main(argc, argv); #endif /* MPI finalization */ (void)MPI_Finalized(&flag); if (!flag) { if (sts != 0) (void)MPI_Abort(MPI_COMM_WORLD, sts); if (finalize) (void)MPI_Finalize(); } return sts; } /* -------------------------------------------------------------------------- */ #if PY_MAJOR_VERSION >= 3 #include static wchar_t **mk_wargs(int, char **); static wchar_t **cp_wargs(int, wchar_t **); static void rm_wargs(wchar_t **, int); static int Py3_Main(int argc, char **argv) { int sts = 0; wchar_t **wargv = mk_wargs(argc, argv); wchar_t **wargv2 = cp_wargs(argc, wargv); if (wargv && wargv2) sts = Py_Main(argc, wargv); else sts = 1; rm_wargs(wargv2, 1); rm_wargs(wargv, 0); return sts; } #if PY_VERSION_HEX < 0x03050000 #define Py_DecodeLocale _Py_char2wchar #endif static wchar_t ** mk_wargs(int argc, char **argv) { int i; char *saved_locale = NULL; wchar_t **args = NULL; args = (wchar_t **)malloc((size_t)(argc+1)*sizeof(wchar_t *)); if (!args) goto oom; saved_locale = strdup(setlocale(LC_ALL, NULL)); if (!saved_locale) goto oom; setlocale(LC_ALL, ""); for (i=0; i= 3) */ /* -------------------------------------------------------------------------- */ /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/pympivendor.h0000644000175000017500000000640613200562156017317 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ static int PyMPI_Get_vendor(const char **vendor_name, int *version_major, int *version_minor, int *version_micro) { const char *name = "unknown"; int major=0, minor=0, micro=0; #if defined(I_MPI_VERSION) name = "Intel MPI"; #if defined(I_MPI_NUMVERSION) {int version = I_MPI_NUMVERSION/1000; major = version/10000; version -= major*10000; minor = version/100; version -= minor*100; micro = version/1; version -= micro*1; } #else (void)sscanf(I_MPI_VERSION,"%d.%d Update %d",&major,&minor,µ); #endif #elif defined(PLATFORM_MPI) name = "Platform MPI"; major = (PLATFORM_MPI>>24)&0xff; minor = (PLATFORM_MPI>>16)&0xff; micro = (PLATFORM_MPI>> 8)&0xff; major = (major/16)*10+(major%16); #elif defined(MSMPI_VER) name = "Microsoft MPI"; major = MSMPI_VER >> 8; minor = MSMPI_VER & 0xff; major = (major/16)*10+(major%16); #elif defined(MVAPICH2_VERSION) || defined(MVAPICH2_NUMVERSION) name = "MVAPICH2"; #if defined(MVAPICH2_NUMVERSION) {int version = MVAPICH2_NUMVERSION/1000; major = version/10000; version -= major*10000; minor = version/100; version -= minor*100; micro = version/1; version -= micro*1; } #elif defined(MVAPICH2_VERSION) (void)sscanf(MVAPICH2_VERSION,"%d.%d.%d",&major,&minor,µ); #endif #elif defined(MPICH_NAME) && (MPICH_NAME == 3) name = "MPICH"; #if defined(MPICH_NUMVERSION) {int version = MPICH_NUMVERSION/1000; major = version/10000; version -= major*10000; minor = version/100; version -= minor*100; micro = version/1; version -= micro*1; } #elif defined(MPICH_VERSION) (void)sscanf(MPICH_VERSION,"%d.%d.%d",&major,&minor,µ); #endif #elif defined(MPICH_NAME) && (MPICH_NAME == 2) name = "MPICH2"; #if defined(MPICH2_NUMVERSION) {int version = MPICH2_NUMVERSION/1000; major = version/10000; version -= major*10000; minor = version/100; version -= minor*100; micro = version/1; version -= micro*1; } #elif defined(MPICH2_VERSION) (void)sscanf(MPICH2_VERSION,"%d.%d.%d",&major,&minor,µ); #endif #elif defined(MPICH_NAME) && (MPICH_NAME == 1) name = "MPICH1"; #if defined(MPICH_VERSION) (void)sscanf(MPICH_VERSION,"%d.%d.%d",&major,&minor,µ); #endif #elif defined(OPEN_MPI) name = "Open MPI"; #if defined(OMPI_MAJOR_VERSION) major = OMPI_MAJOR_VERSION; #endif #if defined(OMPI_MINOR_VERSION) minor = OMPI_MINOR_VERSION; #endif #if defined(OMPI_RELEASE_VERSION) micro = OMPI_RELEASE_VERSION; #endif #if defined(OMPI_MAJOR_VERSION) #if OMPI_MAJOR_VERSION >= 10 name = "Spectrum MPI"; #endif #endif #elif defined(LAM_MPI) name = "LAM/MPI"; #if defined(LAM_MAJOR_VERSION) major = LAM_MAJOR_VERSION; #endif #if defined(LAM_MINOR_VERSION) minor = LAM_MINOR_VERSION; #endif #if defined(LAM_RELEASE_VERSION) micro = LAM_RELEASE_VERSION; #endif #endif if (vendor_name) *vendor_name = name; if (version_major) *version_major = major; if (version_minor) *version_minor = minor; if (version_micro) *version_micro = micro; return 0; } /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/mpi4py/0000775000175000017500000000000013560002767016016 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/src/mpi4py/run.py0000644000175000017500000001675013200562156017175 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Run Python code using ``mpi4py``. Run Python code (scripts, modules, zip files) using the ``runpy`` module. In case of an unhandled exception, abort execution of the MPI program by calling ``MPI.COMM_WORLD.Abort()``. """ from __future__ import print_function def run_command_line(args=None): """Run command line ``[pyfile | -m mod | -c cmd | -] [arg] ...``. * ``pyfile`` : program read from script file * ``-m mod`` : run library module as a script * ``-c cmd`` : program passed in as a command string * ``-`` : program read from standard input (``sys.stdin``) * ``arg ...``: arguments passed to program in ``sys.argv[1:]`` """ # pylint: disable=missing-docstring import sys from runpy import run_module, run_path def run_string(string, init_globals=None, run_name=None, filename='', argv0='-c'): from runpy import _run_module_code karg = 'script_name' if sys.version_info >= (3, 4) else 'mod_fname' code = compile(string, filename, 'exec', 0, 1) return _run_module_code(code, init_globals, run_name, **{karg: argv0}) sys.argv[:] = args if args is not None else sys.argv[1:] if sys.argv[0] == '-': cmd = sys.stdin.read() run_string(cmd, run_name='__main__', filename='', argv0='-') elif sys.argv[0] == '-c': cmd = sys.argv.pop(1) # Remove "cmd" from argument list run_string(cmd, run_name='__main__', filename='', argv0='-c') elif sys.argv[0] == '-m': del sys.argv[0] # Remove "-m" from argument list run_module(sys.argv[0], run_name='__main__', alter_sys=True) else: from os.path import realpath, dirname if not getattr(sys.flags, 'isolated', 0): # pragma: no branch sys.path[0] = realpath(dirname(sys.argv[0])) # Fix sys.path run_path(sys.argv[0], run_name='__main__') def set_abort_status(status): """Terminate MPI execution environment at Python exit. Terminate MPI execution environment at Python exit by calling ``MPI.COMM_WORLD.Abort(status)``. This function should be called within an ``except`` block. Afterwards, exceptions should be re-raised. """ import sys status = (status if isinstance(status, int) else 0 if status is None else 1) pkg = __package__ or __name__.rpartition('.')[0] mpi = sys.modules.get(pkg + '.MPI') if mpi is not None and status: # pylint: disable=protected-access mpi._set_abort_status(status) return sys.exc_info() def main(): """Entry-point for ``python -m mpi4py.run ...``.""" # pylint: disable=missing-docstring import os import sys def version(): from . import __version__ print(__package__, __version__, file=sys.stdout) sys.exit(0) def usage(errmess=None): from textwrap import dedent if __name__ == '__main__': prog_name = __package__ + '.run' else: prog_name = __package__ python_exe = os.path.basename(sys.executable) subs = dict(prog=prog_name, python=python_exe) cmdline = dedent(""" usage: {python} -m {prog} [options] [arg] ... or: {python} -m {prog} [options] -m [arg] ... or: {python} -m {prog} [options] -c [arg] ... or: {python} -m {prog} [options] - [arg] ... """).strip().format(**subs) helptip = dedent(""" Try `{python} -m {prog} -h` for more information. """).strip().format(**subs) options = dedent(""" options: --version show version number and exit -h|--help show this help message and exit -rc set 'mpi4py.rc.key=value' -p|--profile use for profiling --mpe profile with MPE --vt profile with VampirTrace """).strip() if errmess: print(errmess, file=sys.stderr) print(cmdline, file=sys.stderr) print(helptip, file=sys.stderr) sys.exit(1) else: print(cmdline, file=sys.stdout) print(options, file=sys.stdout) sys.exit(0) def parse_command_line(args=None): # pylint: disable=too-many-branches class Options(object): # pylint: disable=too-few-public-methods rc_args = {} profile = None def poparg(args): if len(args) < 2 or args[1].startswith('-'): usage('Argument expected for option: ' + args[0]) return args.pop(1) options = Options() args = sys.argv[1:] if args is None else args[:] while args and args[0].startswith('-'): if args[0] in ('-m', '-c', '-'): break # Stop processing options if args[0] in ('-h', '-help', '--help'): usage() # Print help and exit if args[0] in ('-version', '--version'): version() # Print version and exit try: arg0 = args[0] if arg0.startswith('--'): if '=' in arg0: i = arg0.index('=') opt, arg = arg0[1:i], arg0[i+1:] if opt in ('-rc', '-profile'): arg0, args[1:1] = opt, [arg] else: arg0 = arg0[1:] if arg0 == '-rc': for entry in poparg(args).split(','): i = entry.index('=') key = entry[:i].strip() val = entry[i+1:].strip() if not key or not val: raise ValueError(entry) try: # pylint: disable=eval-used options.rc_args[key] = eval(val, {}) except NameError: options.rc_args[key] = val elif arg0 in ('-p', '-profile'): options.profile = poparg(args) or None elif arg0 in ('-mpe', '-vt'): options.profile = arg0[1:] else: usage('Unknown option: ' + args[0]) del args[0] except Exception: # pylint: disable=broad-except # Bad option, print usage and exit with error usage('Cannot parse option: ' + args[0]) # Check remaining args and return to caller if len(args) < 1: usage("No path specified for execution") elif args[0] in ('-m', '-c') and len(args) < 2: usage("Argument expected for option: " + args[0]) return options, args def bootstrap(options): if options.rc_args: # Set mpi4py.rc parameters from . import rc rc(**options.rc_args) if options.profile: # Load profiling library from . import profile profile(options.profile) # Parse and process command line options options, args = parse_command_line() bootstrap(options) # Run user code. In case of an unhandled exception, abort # execution of the MPI program by calling 'MPI_Abort()'. try: run_command_line(args) except SystemExit as exc: set_abort_status(exc.code) raise except: set_abort_status(1) raise if __name__ == '__main__': main() mpi4py-3.0.3/src/mpi4py/__main__.py0000644000175000017500000000024513200562156020101 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Entry-point for ``python -m mpi4py ...``.""" from .run import main if __name__ == '__main__': main() mpi4py-3.0.3/src/mpi4py/bench.py0000644000175000017500000001377113200562156017450 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Run MPI benchmarks and tests.""" import sys as _sys def helloworld(comm, args=None, verbose=True): """Hello, World! using MPI.""" from argparse import ArgumentParser parser = ArgumentParser(prog=__package__ + ".bench helloworld") parser.add_argument("-q", "--quiet", action="store_false", dest="verbose", default=verbose) options = parser.parse_args(args) from . import MPI size = comm.Get_size() rank = comm.Get_rank() name = MPI.Get_processor_name() message = ("Hello, World! I am process %*d of %d on %s.\n" % (len(str(size - 1)), rank, size, name)) comm.Barrier() if rank > 0: comm.Recv([None, 'B'], rank - 1) if options.verbose: _sys.stdout.write(message) _sys.stdout.flush() if rank < size - 1: comm.Send([None, 'B'], rank + 1) comm.Barrier() return message def ringtest(comm, args=None, verbose=True): """Time a message going around the ring of processes.""" # pylint: disable=too-many-locals from argparse import ArgumentParser parser = ArgumentParser(prog=__package__ + ".bench ringtest") parser.add_argument("-q", "--quiet", action="store_false", dest="verbose", default=verbose) parser.add_argument("-n", "--size", type=int, default=1, dest="size", help="message size") parser.add_argument("-s", "--skip", type=int, default=0, dest="skip", help="number of warm-up iterations") parser.add_argument("-l", "--loop", type=int, default=1, dest="loop", help="number of iterations") options = parser.parse_args(args) def ring(comm, n=1, loop=1, skip=0): # pylint: disable=invalid-name # pylint: disable=missing-docstring from array import array from . import MPI iterations = list(range((loop + skip))) size = comm.Get_size() rank = comm.Get_rank() source = (rank - 1) % size dest = (rank + 1) % size Sendrecv = comm.Sendrecv Send = comm.Send Recv = comm.Recv Wtime = MPI.Wtime sendmsg = array('B', [+42]) * n recvmsg = array('B', [0x0]) * n if size == 1: for i in iterations: if i == skip: tic = Wtime() Sendrecv(sendmsg, dest, 0, recvmsg, source, 0) else: if rank == 0: for i in iterations: if i == skip: tic = Wtime() Send(sendmsg, dest, 0) Recv(recvmsg, source, 0) else: sendmsg = recvmsg for i in iterations: if i == skip: tic = Wtime() Recv(recvmsg, source, 0) Send(sendmsg, dest, 0) toc = Wtime() if comm.rank == 0 and sendmsg != recvmsg: # pragma: no cover import warnings import traceback try: warnings.warn("received message does not match!") except UserWarning: traceback.print_exc() comm.Abort(2) return toc - tic size = getattr(options, 'size', 1) loop = getattr(options, 'loop', 1) skip = getattr(options, 'skip', 0) comm.Barrier() elapsed = ring(comm, size, loop, skip) if options.verbose and comm.rank == 0: message = ("time for %d loops = %g seconds (%d processes, %d bytes)\n" % (loop, elapsed, comm.size, size)) _sys.stdout.write(message) _sys.stdout.flush() return elapsed def main(args=None): """Entry-point for ``python -m mpi4py.bench``.""" from argparse import ArgumentParser, REMAINDER parser = ArgumentParser(prog=__package__ + ".bench", usage="%(prog)s [options] [args]") parser.add_argument("--threads", action="store_true", dest="threads", default=None, help="initialize MPI with thread support") parser.add_argument("--no-threads", action="store_false", dest="threads", default=None, help="initialize MPI without thread support") parser.add_argument("--thread-level", dest="thread_level", default=None, action="store", metavar="LEVEL", choices="single funneled serialized multiple".split(), help="initialize MPI with required thread level") parser.add_argument("--mpe", action="store_true", dest="mpe", default=False, help="use MPE for MPI profiling") parser.add_argument("--vt", action="store_true", dest="vt", default=False, help="use VampirTrace for MPI profiling") parser.add_argument("command", action="store", metavar="", help="benchmark command to run") parser.add_argument("args", nargs=REMAINDER, metavar="[args]", help="arguments for benchmark command") options = parser.parse_args(args) from . import rc, profile if options.threads is not None: rc.threads = options.threads if options.thread_level is not None: rc.thread_level = options.thread_level if options.mpe: profile('mpe', logfile='mpi4py') if options.vt: profile('vt', logfile='mpi4py') from . import MPI comm = MPI.COMM_WORLD if options.command not in main.commands: if comm.rank == 0: parser.error("unknown command '%s'" % options.command) parser.exit(2) command = main.commands[options.command] command(comm, options.args) parser.exit() main.commands = { 'helloworld': helloworld, 'ringtest': ringtest, } if __name__ == '__main__': main() mpi4py-3.0.3/src/mpi4py/MPI.pxd0000644000175000017500000000706513200562156017160 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com # -- from mpi4py.libmpi cimport MPI_Aint from mpi4py.libmpi cimport MPI_Offset from mpi4py.libmpi cimport MPI_Count from mpi4py.libmpi cimport MPI_Status from mpi4py.libmpi cimport MPI_Datatype from mpi4py.libmpi cimport MPI_Request from mpi4py.libmpi cimport MPI_Message from mpi4py.libmpi cimport MPI_Op from mpi4py.libmpi cimport MPI_Group from mpi4py.libmpi cimport MPI_Info from mpi4py.libmpi cimport MPI_Errhandler from mpi4py.libmpi cimport MPI_Comm from mpi4py.libmpi cimport MPI_Win from mpi4py.libmpi cimport MPI_File # -- cdef import from *: ctypedef MPI_Aint Aint "MPI_Aint" ctypedef MPI_Offset Offset "MPI_Offset" ctypedef MPI_Count Count "MPI_Count" ctypedef public api class Status [ type PyMPIStatus_Type, object PyMPIStatusObject, ]: cdef MPI_Status ob_mpi cdef unsigned flags ctypedef public api class Datatype [ type PyMPIDatatype_Type, object PyMPIDatatypeObject, ]: cdef MPI_Datatype ob_mpi cdef unsigned flags ctypedef public api class Request [ type PyMPIRequest_Type, object PyMPIRequestObject, ]: cdef MPI_Request ob_mpi cdef unsigned flags cdef object ob_buf ctypedef public api class Prequest(Request) [ type PyMPIPrequest_Type, object PyMPIPrequestObject, ]: pass ctypedef public api class Grequest(Request) [ type PyMPIGrequest_Type, object PyMPIGrequestObject, ]: cdef MPI_Request ob_grequest ctypedef public api class Message [ type PyMPIMessage_Type, object PyMPIMessageObject, ]: cdef MPI_Message ob_mpi cdef unsigned flags cdef object ob_buf ctypedef public api class Op [ type PyMPIOp_Type, object PyMPIOpObject, ]: cdef MPI_Op ob_mpi cdef unsigned flags cdef object (*ob_func)(object, object) cdef int ob_usrid ctypedef public api class Group [ type PyMPIGroup_Type, object PyMPIGroupObject, ]: cdef MPI_Group ob_mpi cdef unsigned flags ctypedef public api class Info [ type PyMPIInfo_Type, object PyMPIInfoObject, ]: cdef MPI_Info ob_mpi cdef unsigned flags ctypedef public api class Errhandler [ type PyMPIErrhandler_Type, object PyMPIErrhandlerObject, ]: cdef MPI_Errhandler ob_mpi cdef unsigned flags ctypedef public api class Comm [ type PyMPIComm_Type, object PyMPICommObject, ]: cdef MPI_Comm ob_mpi cdef unsigned flags ctypedef public api class Intracomm(Comm) [ type PyMPIIntracomm_Type, object PyMPIIntracommObject, ]: pass ctypedef public api class Topocomm(Intracomm) [ type PyMPITopocomm_Type, object PyMPITopocommObject, ]: pass ctypedef public api class Cartcomm(Topocomm) [ type PyMPICartcomm_Type, object PyMPICartcommObject, ]: pass ctypedef public api class Graphcomm(Topocomm) [ type PyMPIGraphcomm_Type, object PyMPIGraphcommObject, ]: pass ctypedef public api class Distgraphcomm(Topocomm) [ type PyMPIDistgraphcomm_Type, object PyMPIDistgraphcommObject, ]: pass ctypedef public api class Intercomm(Comm) [ type PyMPIIntercomm_Type, object PyMPIIntercommObject, ]: pass ctypedef public api class Win [ type PyMPIWin_Type, object PyMPIWinObject, ]: cdef MPI_Win ob_mpi cdef unsigned flags cdef object ob_mem ctypedef public api class File [ type PyMPIFile_Type, object PyMPIFileObject, ]: cdef MPI_File ob_mpi cdef unsigned flags # -- mpi4py-3.0.3/src/mpi4py/futures/0000775000175000017500000000000013560002767017513 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/src/mpi4py/futures/__main__.py0000644000175000017500000000421413200562156021576 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Run Python code using ``mpi4py.futures``. Python code (scripts, modules, zip files) is run in the process with rank 0 in ``MPI.COMM_WORLD`` and creates `MPIPoolExecutor` instances to submit tasks. The other processes team-up in a static-size shared pool of workers executing tasks submitted from the master process. """ from __future__ import print_function def main(): """Entry point for ``python -m mpi4py.futures ...``.""" # pylint: disable=missing-docstring import os import sys from ..run import run_command_line from ..run import set_abort_status from ._lib import SharedPoolCtx class UsageExit(SystemExit): pass def usage(error=None): from textwrap import dedent usage = dedent(""" usage: python{0} -m {prog} [arg] ... or: python{0} -m {prog} -m [arg] ... or: python{0} -m {prog} -c [arg] ... """).strip().format(sys.version[0], prog=__package__) if error: print(error, file=sys.stderr) print(usage, file=sys.stderr) raise UsageExit(1) else: print(usage, file=sys.stdout) raise UsageExit(0) def chk_command_line(): args = sys.argv[1:] if len(args) < 1: usage("No path specified for execution") elif args[0] == '-': pass elif args[0] in ('-h', '--help'): usage() elif args[0] in ('-m', '-c'): if len(args) < 2: usage("Argument expected for option: " + args[0]) elif args[0].startswith('-'): usage("Unknown option: " + args[0]) elif not os.path.exists(args[0]): usage("Path does not exist: " + args[0]) try: with SharedPoolCtx() as context: if context is not None: chk_command_line() run_command_line() except UsageExit: raise except SystemExit as exc: set_abort_status(exc.code) raise except: set_abort_status(1) raise if __name__ == '__main__': main() mpi4py-3.0.3/src/mpi4py/futures/_base.py0000644000175000017500000005234713200562156021141 0ustar dalcinldalcinl00000000000000# Backport of concurrent.futures._base from Python 3.7 # pylint: skip-file # Copyright 2009 Brian Quinlan. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. __author__ = 'Brian Quinlan (brian@sweetapp.com)' import collections import logging import threading import time try: from itertools import izip as zip except ImportError: pass FIRST_COMPLETED = 'FIRST_COMPLETED' FIRST_EXCEPTION = 'FIRST_EXCEPTION' ALL_COMPLETED = 'ALL_COMPLETED' _AS_COMPLETED = '_AS_COMPLETED' # Possible future states (for internal use by the futures package). PENDING = 'PENDING' RUNNING = 'RUNNING' # The future was cancelled by the user... CANCELLED = 'CANCELLED' # ...and _Waiter.add_cancelled() was called by a worker. CANCELLED_AND_NOTIFIED = 'CANCELLED_AND_NOTIFIED' FINISHED = 'FINISHED' _FUTURE_STATES = [ PENDING, RUNNING, CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED ] _STATE_TO_DESCRIPTION_MAP = { PENDING: "pending", RUNNING: "running", CANCELLED: "cancelled", CANCELLED_AND_NOTIFIED: "cancelled", FINISHED: "finished" } # Logger for internal use by the futures package. LOGGER = logging.getLogger("concurrent.futures") class Error(Exception): """Base class for all future-related exceptions.""" pass class CancelledError(Error): """The Future was cancelled.""" pass class TimeoutError(Error): """The operation exceeded the given deadline.""" pass class _Waiter(object): """Provides the event that wait() and as_completed() block on.""" def __init__(self): self.event = threading.Event() self.finished_futures = [] def add_result(self, future): self.finished_futures.append(future) def add_exception(self, future): self.finished_futures.append(future) def add_cancelled(self, future): self.finished_futures.append(future) class _AsCompletedWaiter(_Waiter): """Used by as_completed().""" def __init__(self): super(_AsCompletedWaiter, self).__init__() self.lock = threading.Lock() def add_result(self, future): with self.lock: super(_AsCompletedWaiter, self).add_result(future) self.event.set() def add_exception(self, future): with self.lock: super(_AsCompletedWaiter, self).add_exception(future) self.event.set() def add_cancelled(self, future): with self.lock: super(_AsCompletedWaiter, self).add_cancelled(future) self.event.set() class _FirstCompletedWaiter(_Waiter): """Used by wait(return_when=FIRST_COMPLETED).""" def add_result(self, future): super(_FirstCompletedWaiter, self).add_result(future) self.event.set() def add_exception(self, future): super(_FirstCompletedWaiter, self).add_exception(future) self.event.set() def add_cancelled(self, future): super(_FirstCompletedWaiter, self).add_cancelled(future) self.event.set() class _AllCompletedWaiter(_Waiter): """Used by wait(return_when=FIRST_EXCEPTION and ALL_COMPLETED).""" def __init__(self, num_pending_calls, stop_on_exception): self.num_pending_calls = num_pending_calls self.stop_on_exception = stop_on_exception self.lock = threading.Lock() super(_AllCompletedWaiter, self).__init__() def _decrement_pending_calls(self): with self.lock: self.num_pending_calls -= 1 if not self.num_pending_calls: self.event.set() def add_result(self, future): super(_AllCompletedWaiter, self).add_result(future) self._decrement_pending_calls() def add_exception(self, future): super(_AllCompletedWaiter, self).add_exception(future) if self.stop_on_exception: self.event.set() else: self._decrement_pending_calls() def add_cancelled(self, future): super(_AllCompletedWaiter, self).add_cancelled(future) self._decrement_pending_calls() class _AcquireFutures(object): """A context manager that does an ordered acquire of Future conditions.""" def __init__(self, futures): self.futures = sorted(futures, key=id) def __enter__(self): for future in self.futures: future._condition.acquire() def __exit__(self, *args): for future in self.futures: future._condition.release() def _create_and_install_waiters(fs, return_when): if return_when == _AS_COMPLETED: waiter = _AsCompletedWaiter() elif return_when == FIRST_COMPLETED: waiter = _FirstCompletedWaiter() else: pending_count = sum( f._state not in [CANCELLED_AND_NOTIFIED, FINISHED] for f in fs) if return_when == FIRST_EXCEPTION: waiter = _AllCompletedWaiter(pending_count, stop_on_exception=True) elif return_when == ALL_COMPLETED: waiter = _AllCompletedWaiter(pending_count, stop_on_exception=False) else: raise ValueError("Invalid return condition: %r" % return_when) for f in fs: f._waiters.append(waiter) return waiter def _yield_finished_futures(fs, waiter, ref_collect): """ Iterate on the list *fs*, yielding finished futures one by one in reverse order. Before yielding a future, *waiter* is removed from its waiters and the future is removed from each set in the collection of sets *ref_collect*. The aim of this function is to avoid keeping stale references after the future is yielded and before the iterator resumes. """ while fs: f = fs[-1] for futures_set in ref_collect: futures_set.remove(f) with f._condition: f._waiters.remove(waiter) del f # Careful not to keep a reference to the popped value yield fs.pop() def as_completed(fs, timeout=None): """An iterator over the given futures that yields each as it completes. Args: fs: The sequence of Futures (possibly created by different Executors) to iterate over. timeout: The maximum number of seconds to wait. If None, then there is no limit on the wait time. Returns: An iterator that yields the given Futures as they complete (finished or cancelled). If any given Futures are duplicated, they will be returned once. Raises: TimeoutError: If the entire result iterator could not be generated before the given timeout. """ if timeout is not None: end_time = timeout + time.time() fs = set(fs) total_futures = len(fs) with _AcquireFutures(fs): finished = set( f for f in fs if f._state in [CANCELLED_AND_NOTIFIED, FINISHED]) pending = fs - finished waiter = _create_and_install_waiters(fs, _AS_COMPLETED) finished = list(finished) try: for f in _yield_finished_futures(finished, waiter, (fs,)): f = [f] yield f.pop() while pending: if timeout is None: wait_timeout = None else: wait_timeout = end_time - time.time() if wait_timeout < 0: raise TimeoutError( '%d (of %d) futures unfinished' % ( len(pending), total_futures)) waiter.event.wait(wait_timeout) with waiter.lock: finished = waiter.finished_futures waiter.finished_futures = [] waiter.event.clear() # reverse to keep finishing order finished.reverse() for f in _yield_finished_futures(finished, waiter, (fs, pending)): f = [f] yield f.pop() finally: # Remove waiter from unfinished futures for f in fs: with f._condition: f._waiters.remove(waiter) DoneAndNotDoneFutures = collections.namedtuple( 'DoneAndNotDoneFutures', 'done not_done') def wait(fs, timeout=None, return_when=ALL_COMPLETED): """Wait for the futures in the given sequence to complete. Args: fs: The sequence of Futures (possibly created by different Executors) to wait upon. timeout: The maximum number of seconds to wait. If None, then there is no limit on the wait time. return_when: Indicates when this function should return. The options are: FIRST_COMPLETED - Return when any future finishes or is cancelled. FIRST_EXCEPTION - Return when any future finishes by raising an exception. If no future raises an exception then it is equivalent to ALL_COMPLETED. ALL_COMPLETED - Return when all futures finish or are cancelled. Returns: A named 2-tuple of sets. The first set, named 'done', contains the futures that completed (is finished or cancelled) before the wait completed. The second set, named 'not_done', contains uncompleted futures. """ with _AcquireFutures(fs): done = set(f for f in fs if f._state in [CANCELLED_AND_NOTIFIED, FINISHED]) not_done = set(fs) - done if (return_when == FIRST_COMPLETED) and done: return DoneAndNotDoneFutures(done, not_done) elif (return_when == FIRST_EXCEPTION) and done: if any(f for f in done if not f.cancelled() and f.exception() is not None): return DoneAndNotDoneFutures(done, not_done) if len(done) == len(fs): return DoneAndNotDoneFutures(done, not_done) waiter = _create_and_install_waiters(fs, return_when) waiter.event.wait(timeout) for f in fs: with f._condition: f._waiters.remove(waiter) done.update(waiter.finished_futures) return DoneAndNotDoneFutures(done, set(fs) - done) class Future(object): """Represents the result of an asynchronous computation.""" def __init__(self): """Initializes the future. Should not be called by clients.""" self._condition = threading.Condition() self._state = PENDING self._result = None self._exception = None self._waiters = [] self._done_callbacks = [] def _invoke_callbacks(self): for callback in self._done_callbacks: try: callback(self) except Exception: LOGGER.exception('exception calling callback for %r', self) except BaseException: raise except: # old-style exception objects LOGGER.exception('exception calling callback for %r', self) def __repr__(self): with self._condition: if self._state == FINISHED: if self._exception: return '<%s at %#x state=%s raised %s>' % ( self.__class__.__name__, id(self), _STATE_TO_DESCRIPTION_MAP[self._state], self._exception.__class__.__name__) else: return '<%s at %#x state=%s returned %s>' % ( self.__class__.__name__, id(self), _STATE_TO_DESCRIPTION_MAP[self._state], self._result.__class__.__name__) return '<%s at %#x state=%s>' % ( self.__class__.__name__, id(self), _STATE_TO_DESCRIPTION_MAP[self._state]) def cancel(self): """Cancel the future if possible. Returns True if the future was cancelled, False otherwise. A future cannot be cancelled if it is running or has already completed. """ with self._condition: if self._state in [RUNNING, FINISHED]: return False if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: return True self._state = CANCELLED self._condition.notify_all() self._invoke_callbacks() return True def cancelled(self): """Return True if the future was cancelled.""" with self._condition: return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED] def running(self): """Return True if the future is currently executing.""" with self._condition: return self._state == RUNNING def done(self): """Return True of the future was cancelled or finished executing.""" with self._condition: return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED] def __get_result(self): if self._exception: raise self._exception else: return self._result def add_done_callback(self, fn): """Attaches a callable that will be called when the future finishes. Args: fn: A callable that will be called with this future as its only argument when the future completes or is cancelled. The callable will always be called by a thread in the same process in which it was added. If the future has already completed or been cancelled then the callable will be called immediately. These callables are called in the order that they were added. """ with self._condition: if self._state not in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED]: self._done_callbacks.append(fn) return fn(self) def result(self, timeout=None): """Return the result of the call that the future represents. Args: timeout: The number of seconds to wait for the result if the future isn't done. If None, then there is no limit on the wait time. Returns: The result of the call that the future represents. Raises: CancelledError: If the future was cancelled. TimeoutError: If the future didn't finish executing before the given timeout. Exception: If the call raised then that exception will be raised. """ with self._condition: if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: raise CancelledError() elif self._state == FINISHED: return self.__get_result() self._condition.wait(timeout) if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: raise CancelledError() elif self._state == FINISHED: return self.__get_result() else: raise TimeoutError() def exception(self, timeout=None): """Return the exception raised by the call that the future represents. Args: timeout: The number of seconds to wait for the exception if the future isn't done. If None, then there is no limit on the wait time. Returns: The exception raised by the call that the future represents or None if the call completed without raising. Raises: CancelledError: If the future was cancelled. TimeoutError: If the future didn't finish executing before the given timeout. """ with self._condition: if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: raise CancelledError() elif self._state == FINISHED: return self._exception self._condition.wait(timeout) if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: raise CancelledError() elif self._state == FINISHED: return self._exception else: raise TimeoutError() # The following methods should only be used by Executors and in tests. def set_running_or_notify_cancel(self): """Mark the future as running or process any cancel notifications. Should only be used by Executor implementations and unit tests. If the future has been cancelled (cancel() was called and returned True) then any threads waiting on the future completing (though calls to as_completed() or wait()) are notified and False is returned. If the future was not cancelled then it is put in the running state (future calls to running() will return True) and True is returned. This method should be called by Executor implementations before executing the work associated with this future. If this method returns False then the work should not be executed. Returns: False if the Future was cancelled, True otherwise. Raises: RuntimeError: if this method was already called or if set_result() or set_exception() was called. """ with self._condition: if self._state == CANCELLED: self._state = CANCELLED_AND_NOTIFIED for waiter in self._waiters: waiter.add_cancelled(self) # self._condition.notify_all() is not necessary because # self.cancel() triggers a notification. return False elif self._state == PENDING: self._state = RUNNING return True else: LOGGER.critical('Future %s in unexpected state: %s', id(self), self._state) raise RuntimeError('Future in unexpected state') def set_result(self, result): """Sets the return value of work associated with the future. Should only be used by Executor implementations and unit tests. """ with self._condition: self._result = result self._state = FINISHED for waiter in self._waiters: waiter.add_result(self) self._condition.notify_all() self._invoke_callbacks() def set_exception(self, exception): """Sets the result of the future as being the given exception. Should only be used by Executor implementations and unit tests. """ with self._condition: self._exception = exception self._state = FINISHED for waiter in self._waiters: waiter.add_exception(self) self._condition.notify_all() self._invoke_callbacks() class Executor(object): """This is an abstract base class for concrete asynchronous executors.""" def submit(self, fn, *args, **kwargs): """Submits a callable to be executed with the given arguments. Schedules the callable to be executed as fn(*args, **kwargs) and returns a Future instance representing the execution of the callable. Returns: A Future representing the given call. """ raise NotImplementedError() def map(self, fn, *iterables, **kwargs): """Returns an iterator equivalent to map(fn, iter). Args: fn: A callable that will take as many arguments as there are passed iterables. timeout: The maximum number of seconds to wait. If None, then there is no limit on the wait time. chunksize: The size of the chunks the iterable will be broken into before being passed to a child process. This argument is only used by ProcessPoolExecutor; it is ignored by ThreadPoolExecutor. Returns: An iterator equivalent to: map(func, *iterables) but the calls may be evaluated out-of-order. Raises: TimeoutError: If the entire result iterator could not be generated before the given timeout. Exception: If fn(*args) raises for any values. """ timeout = kwargs.get('timeout') if timeout is not None: end_time = timeout + time.time() fs = [self.submit(fn, *args) for args in zip(*iterables)] # Yield must be hidden in closure so that the futures are submitted # before the first iterator value is required. def result_iterator(): try: # reverse to keep finishing order fs.reverse() while fs: # Careful not to keep a reference to the popped future if timeout is None: yield fs.pop().result() else: yield fs.pop().result(end_time - time.time()) finally: for future in fs: future.cancel() return result_iterator() def shutdown(self, wait=True): """Clean-up the resources associated with the Executor. It is safe to call this method several times. Otherwise, no other methods can be called after this one. Args: wait: If True then shutdown will not return until all running futures have finished executing and the resources used by the executor have been reclaimed. """ pass def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): self.shutdown(wait=True) return False mpi4py-3.0.3/src/mpi4py/futures/server.py0000644000175000017500000000024113200562156021360 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Entry point for MPI workers.""" from . import _lib if __name__ == '__main__': _lib.server_main() mpi4py-3.0.3/src/mpi4py/futures/pool.py0000644000175000017500000002651213200562156021034 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Implements MPIPoolExecutor.""" import time import functools import itertools import threading from . import Future from . import Executor from . import as_completed from . import _lib class MPIPoolExecutor(Executor): """MPI-based asynchronous executor.""" Future = Future def __init__(self, max_workers=None, **kwargs): """Initialize a new MPIPoolExecutor instance. Args: max_workers: The maximum number of MPI processes that can be used to execute the given calls. If ``None`` or not given then the number of worker processes will be determined from the MPI universe size attribute if defined, otherwise a single worker process will be spawned. Keyword Args: python_exe: Path to Python executable used to spawn workers. python_args: Command line arguments to pass to Python executable. mpi_info: Dict or iterable with ``(key, value)`` pairs. globals: Dict or iterable with global variables to set in workers. main: If ``False``, do not import ``__main__`` in workers. path: List of paths to append to ``sys.path`` in workers. wdir: Path to set current working directory in workers. env: Environment variables to update ``os.environ`` in workers. """ if max_workers is not None: max_workers = int(max_workers) if max_workers <= 0: raise ValueError("max_workers must be greater than 0") kwargs['max_workers'] = max_workers self._options = kwargs self._shutdown = False self._lock = threading.Lock() self._pool = None _make_pool = staticmethod(_lib.WorkerPool) def _bootstrap(self): if self._pool is None: self._pool = self._make_pool(self) def bootup(self, wait=True): """Allocate executor resources eagerly. Args: wait: If ``True`` then bootup will not return until the executor resources are ready to process submissions. """ with self._lock: if self._shutdown: raise RuntimeError("cannot bootup after shutdown") self._bootstrap() if wait: self._pool.wait() return self def submit(self, fn, *args, **kwargs): """Submit a callable to be executed with the given arguments. Schedule the callable to be executed as ``fn(*args, **kwargs)`` and return a `Future` instance representing the execution of the callable. Returns: A `Future` representing the given call. """ with self._lock: if self._shutdown: raise RuntimeError("cannot submit after shutdown") self._bootstrap() future = self.Future() task = (fn, args, kwargs) self._pool.push((future, task)) return future def map(self, fn, *iterables, **kwargs): """Return an iterator equivalent to ``map(fn, *iterables)``. Args: fn: A callable that will take as many arguments as there are passed iterables. iterables: Iterables yielding positional arguments to be passed to the callable. timeout: The maximum number of seconds to wait. If ``None``, then there is no limit on the wait time. chunksize: The size of the chunks the iterable will be broken into before being passed to a worker process. Keyword Args: unordered: If ``True``, yield results out-of-order, as completed. Returns: An iterator equivalent to built-in ``map(func, *iterables)`` but the calls may be evaluated out-of-order. Raises: TimeoutError: If the entire result iterator could not be generated before the given timeout. Exception: If ``fn(*args)`` raises for any values. """ # pylint: disable=arguments-differ iterable = getattr(itertools, 'izip', zip)(*iterables) return self.starmap(fn, iterable, **kwargs) def starmap(self, fn, iterable, timeout=None, chunksize=1, **kwargs): """Return an iterator equivalent to ``itertools.starmap(...)``. Args: fn: A callable that will take positional argument from iterable. iterable: An iterable yielding ``args`` tuples to be used as positional arguments to call ``fn(*args)``. timeout: The maximum number of seconds to wait. If ``None``, then there is no limit on the wait time. chunksize: The size of the chunks the iterable will be broken into before being passed to a worker process. Keyword Args: unordered: If ``True``, yield results out-of-order, as completed. Returns: An iterator equivalent to ``itertools.starmap(fn, iterable)`` but the calls may be evaluated out-of-order. Raises: TimeoutError: If the entire result iterator could not be generated before the given timeout. Exception: If ``fn(*args)`` raises for any values. """ unordered = kwargs.pop('unordered', False) if chunksize < 1: raise ValueError("chunksize must be >= 1.") if chunksize == 1: return _starmap_helper(self.submit, fn, iterable, timeout, unordered) else: return _starmap_chunks(self.submit, fn, iterable, timeout, unordered, chunksize) def shutdown(self, wait=True): """Clean-up the resources associated with the executor. It is safe to call this method several times. Otherwise, no other methods can be called after this one. Args: wait: If ``True`` then shutdown will not return until all running futures have finished executing and the resources used by the executor have been reclaimed. """ with self._lock: if not self._shutdown: self._shutdown = True if self._pool is not None: self._pool.done() if wait: if self._pool is not None: self._pool.join() self._pool = None def _starmap_helper(submit, function, iterable, timeout, unordered): if timeout is not None: timer = time.time end_time = timeout + timer() futures = [submit(function, *args) for args in iterable] if unordered: futures = set(futures) def result_iterator(): # pylint: disable=missing-docstring try: if unordered: if timeout is None: iterator = as_completed(futures) else: iterator = as_completed(futures, end_time - timer()) for future in iterator: futures.remove(future) future = [future] yield future.pop().result() else: futures.reverse() if timeout is None: while futures: yield futures.pop().result() else: while futures: yield futures.pop().result(end_time - timer()) except: while futures: futures.pop().cancel() raise return result_iterator() def _apply_chunks(function, chunk): return [function(*args) for args in chunk] def _build_chunks(chunksize, iterable): iterable = iter(iterable) while True: chunk = tuple(itertools.islice(iterable, chunksize)) if not chunk: return yield (chunk,) def _chain_from_iterable_of_lists(iterable): for item in iterable: item.reverse() while item: yield item.pop() def _starmap_chunks(submit, function, iterable, timeout, unordered, chunksize): # pylint: disable=too-many-arguments function = functools.partial(_apply_chunks, function) iterable = _build_chunks(chunksize, iterable) result = _starmap_helper(submit, function, iterable, timeout, unordered) return _chain_from_iterable_of_lists(result) class MPICommExecutor(object): """Context manager for `MPIPoolExecutor`. This context manager splits a MPI (intra)communicator in two disjoint sets: a single master process and the remaining worker processes. These sets are then connected through an intercommunicator. The target of the ``with`` statement is assigned either an `MPIPoolExecutor` instance (at the master) or ``None`` (at the workers). Example:: with MPICommExecutor(MPI.COMM_WORLD, root=0) as executor: if executor is not None: # master process executor.submit(...) executor.map(...) """ # pylint: disable=too-few-public-methods def __init__(self, comm=None, root=0, **kwargs): """Initialize a new MPICommExecutor instance. Args: comm: MPI (intra)communicator. root: Designated master process. Raises: ValueError: If the communicator has wrong kind or the root value is not in the expected range. """ if comm is None: comm = _lib.get_comm_world() if comm.Is_inter(): raise ValueError("Expecting an intracommunicator") if root < 0 or root >= comm.Get_size(): raise ValueError("Expecting root in range(comm.size)") self._comm = comm self._root = root self._options = kwargs self._executor = None def __enter__(self): """Return `MPIPoolExecutor` instance at the root.""" # pylint: disable=protected-access if self._executor is not None: raise RuntimeError("__enter__") comm = self._comm root = self._root options = self._options executor = None if _lib.SharedPool: assert root == 0 executor = MPIPoolExecutor(**options) executor._pool = _lib.SharedPool(executor) elif comm.Get_size() == 1: executor = MPIPoolExecutor(**options) executor._pool = _lib.ThreadPool(executor) elif comm.Get_rank() == root: executor = MPIPoolExecutor(**options) executor._pool = _lib.SplitPool(executor, comm, root) else: _lib.server_main_split(comm, root, **options) self._executor = executor return executor def __exit__(self, *args): """Shutdown `MPIPoolExecutor` instance at the root.""" executor = self._executor self._executor = None if executor is not None: executor.shutdown(wait=True) return False else: return True class ThreadPoolExecutor(MPIPoolExecutor): # noqa: D204 """`MPIPoolExecutor` subclass using a pool of threads.""" _make_pool = staticmethod(_lib.ThreadPool) class ProcessPoolExecutor(MPIPoolExecutor): # noqa: D204 """`MPIPoolExecutor` subclass using a pool of processes.""" _make_pool = staticmethod(_lib.SpawnPool) mpi4py-3.0.3/src/mpi4py/futures/_lib.py0000664000175000017500000006006213426006675021001 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Management of MPI worker processes.""" # pylint: disable=missing-docstring import os import sys import time import atexit import weakref import warnings import itertools import threading import collections from .. import MPI # --- def serialized(function): if serialized.lock is None: return function def wrapper(*args, **kwargs): with serialized.lock: return function(*args, **kwargs) return wrapper serialized.lock = None def setup_mpi_threads(): with setup_mpi_threads.lock: thread_level = setup_mpi_threads.thread_level if thread_level is None: thread_level = MPI.Query_thread() setup_mpi_threads.thread_level = thread_level if thread_level < MPI.THREAD_MULTIPLE: # pragma: no cover serialized.lock = threading.Lock() if thread_level < MPI.THREAD_SERIALIZED: # pragma: no cover warnings.warn("The level of thread support in MPI " "should be at least MPI_THREAD_SERIALIZED", RuntimeWarning, 2) setup_mpi_threads.lock = threading.Lock() setup_mpi_threads.thread_level = None # --- if sys.version_info[0] == 2: # pragma: no cover def sys_exception(): exc = sys.exc_info()[1] return exc else: # pragma: no cover def sys_exception(): exc = sys.exc_info()[1] exc.__traceback__ = None return exc # --- BACKOFF = 0.001 class Backoff(object): def __init__(self, seconds=BACKOFF): self.tval = 0.0 self.tmax = max(float(seconds), 0.0) self.tmin = self.tmax / (1 << 10) def reset(self): self.tval = 0.0 def sleep(self): time.sleep(self.tval) self.tval = min(self.tmax, max(self.tmin, self.tval * 2)) class Queue(collections.deque): put = collections.deque.append pop = collections.deque.popleft add = collections.deque.appendleft class Stack(collections.deque): put = collections.deque.append pop = collections.deque.pop THREADS_QUEUES = weakref.WeakKeyDictionary() def join_threads(threads_queues=THREADS_QUEUES): items = list(threads_queues.items()) for _, queue in items: # pragma: no cover queue.put(None) for thread, _ in items: # pragma: no cover thread.join() atexit.register(join_threads) class Pool(object): def __init__(self, executor, manager, *args): self.size = None self.event = threading.Event() self.queue = queue = Queue() self.exref = weakref.ref(executor, lambda _, q=queue: q.put(None)) args = (self,) + args kwargs = executor._options # pylint: disable=protected-access thread = threading.Thread(target=manager, args=args, kwargs=kwargs) thread.daemon = True self.thread = thread setup_mpi_threads() thread.start() THREADS_QUEUES[thread] = queue def wait(self): self.event.wait() def push(self, task): self.queue.put(task) def done(self): self.queue.put(None) def join(self): self.thread.join() def setup_pool(pool, num_workers): pool.size = num_workers pool.event.set() return pool.queue def _manager_thread(pool, **options): size = options.pop('max_workers', 1) queue = setup_pool(pool, size) def worker(): backoff = Backoff(options.get('backoff', BACKOFF)) while True: try: item = queue.pop() backoff.reset() except LookupError: backoff.sleep() continue if item is None: queue.put(None) break future, task = item if not future.set_running_or_notify_cancel(): continue func, args, kwargs = task try: result = func(*args, **kwargs) future.set_result(result) except BaseException: exception = sys_exception() future.set_exception(exception) del item, future threads = [threading.Thread(target=worker) for _ in range(size - 1)] for thread in threads: thread.start() worker() for thread in threads: thread.join() queue.pop() def _manager_comm(pool, comm, **options): size = comm.Get_remote_size() workers = Stack(reversed(range(size))) queue = setup_pool(pool, size) client(comm, 0, workers, queue, **options) def _manager_spawn(pool, **options): pyexe = options.pop('python_exe', None) pyargs = options.pop('python_args', None) nprocs = options.pop('max_workers', None) info = options.pop('mpi_info', None) comm = serialized(client_spawn)(pyexe, pyargs, nprocs, info) serialized(client_sync)(comm, options) _manager_comm(pool, comm, **options) serialized(client_close)(comm) def _manager_service(pool, **options): service = options.pop('service', None) info = options.pop('mpi_info', None) comm = serialized(client_connect)(service, info) serialized(client_sync)(comm, options) _manager_comm(pool, comm, **options) serialized(client_close)(comm) def ThreadPool(executor): # pylint: disable=invalid-name return Pool(executor, _manager_thread) def SpawnPool(executor): # pylint: disable=invalid-name return Pool(executor, _manager_spawn) def ServicePool(executor): # pylint: disable=invalid-name return Pool(executor, _manager_service) def WorkerPool(executor): # pylint: disable=invalid-name # pylint: disable=protected-access if SharedPool is not None: return SharedPool(executor) if 'service' in executor._options: return ServicePool(executor) else: return SpawnPool(executor) # --- def get_comm_world(): return MPI.COMM_WORLD def comm_split(comm, root=0): assert not comm.Is_inter() assert comm.Get_size() > 1 assert 0 <= root < comm.Get_size() rank = comm.Get_rank() if MPI.Get_version() >= (2, 2): allgroup = comm.Get_group() if rank == root: group = allgroup.Incl([root]) else: group = allgroup.Excl([root]) allgroup.Free() intracomm = comm.Create(group) group.Free() else: # pragma: no cover color = 0 if rank == root else 1 intracomm = comm.Split(color, key=0) if rank == root: local_leader = 0 remote_leader = 0 if root else 1 else: local_leader = 0 remote_leader = root intercomm = intracomm.Create_intercomm( local_leader, comm, remote_leader, tag=0) intracomm.Free() return intercomm def _manager_split(pool, comm, root, **options): comm = serialized(comm_split)(comm, root) _manager_comm(pool, comm, **options) serialized(client_close)(comm) def SplitPool(executor, comm, root): # pylint: disable=invalid-name return Pool(executor, _manager_split, comm, root) def server_main_split(comm, root, **options): comm = comm_split(comm, root) server(comm, **options) server_close(comm) # --- SharedPool = None # pylint: disable=invalid-name def _set_shared_pool(obj): # pylint: disable=invalid-name # pylint: disable=global-statement global SharedPool SharedPool = obj def _manager_shared(pool, comm, tag, workers, **options): # pylint: disable=too-many-arguments if tag == 0: serialized(client_sync)(comm, options) size = comm.Get_remote_size() queue = setup_pool(pool, size) client(comm, tag, workers, queue, **options) class SharedPoolCtx(object): # pylint: disable=too-few-public-methods def __init__(self): self.comm = MPI.COMM_NULL self.on_root = None self.counter = None self.workers = None self.threads = weakref.WeakKeyDictionary() def __call__(self, executor): assert SharedPool is self if self.comm != MPI.COMM_NULL and self.on_root: tag = next(self.counter) args = (self.comm, tag, self.workers) pool = Pool(executor, _manager_shared, *args) else: pool = Pool(executor, _manager_thread) del THREADS_QUEUES[pool.thread] self.threads[pool.thread] = pool.queue return pool def __enter__(self): assert SharedPool is None self.on_root = MPI.COMM_WORLD.Get_rank() == 0 if MPI.COMM_WORLD.Get_size() >= 2: self.comm = comm_split(MPI.COMM_WORLD, root=0) if self.on_root: size = self.comm.Get_remote_size() self.counter = itertools.count(0) self.workers = Stack(reversed(range(size))) _set_shared_pool(self) return self if self.on_root else None def __exit__(self, *args): assert SharedPool is self if self.on_root: join_threads(self.threads) if self.comm != MPI.COMM_NULL: if self.on_root: if next(self.counter) == 0: client_sync(self.comm, dict(main=False)) client_close(self.comm) else: options = server_sync(self.comm) server(self.comm, **options) server_close(self.comm) if not self.on_root: join_threads(self.threads) _set_shared_pool(None) self.comm = MPI.COMM_NULL self.on_root = None self.counter = None self.workers = None self.threads.clear() return False # --- def barrier(comm): assert comm.Is_inter() try: request = comm.Ibarrier() backoff = Backoff() while not request.Test(): backoff.sleep() except (NotImplementedError, MPI.Exception): # pragma: no cover buf = [None, 0, MPI.BYTE] tag = MPI.COMM_WORLD.Get_attr(MPI.TAG_UB) sendreqs, recvreqs = [], [] for pid in range(comm.Get_remote_size()): recvreqs.append(comm.Irecv(buf, pid, tag)) sendreqs.append(comm.Issend(buf, pid, tag)) backoff = Backoff() while not MPI.Request.Testall(recvreqs): backoff.sleep() MPI.Request.Waitall(sendreqs) def client_sync(comm, options): assert comm.Is_inter() assert comm.Get_size() == 1 barrier(comm) data = _sync_get_data(options) if MPI.VERSION >= 2: comm.bcast(data, MPI.ROOT) else: # pragma: no cover tag = MPI.COMM_WORLD.Get_attr(MPI.TAG_UB) size = comm.Get_remote_size() MPI.Request.Waitall([ comm.issend(data, pid, tag) for pid in range(size)]) def client(comm, tag, worker_pool, task_queue, **options): # pylint: disable=too-many-locals assert comm.Is_inter() assert comm.Get_size() == 1 assert tag >= 0 backoff = Backoff(options.get('backoff', BACKOFF)) status = MPI.Status() comm_recv = serialized(comm.recv) comm_isend = serialized(comm.issend) comm_iprobe = serialized(comm.iprobe) request_free = serialized(MPI.Request.Free) pending = {} def iprobe(): pid = MPI.ANY_SOURCE return comm_iprobe(pid, tag, status) def probe(): pid = MPI.ANY_SOURCE backoff.reset() while not comm_iprobe(pid, tag, status): backoff.sleep() def recv(): pid = MPI.ANY_SOURCE try: task = comm_recv(None, pid, tag, status) except BaseException: task = (None, sys_exception()) pid = status.source worker_pool.put(pid) future, request = pending.pop(pid) request_free(request) result, exception = task if exception is None: future.set_result(result) else: future.set_exception(exception) def send(): item = task_queue.pop() if item is None: return True try: pid = worker_pool.pop() except LookupError: # pragma: no cover task_queue.add(item) return False future, task = item if not future.set_running_or_notify_cancel(): worker_pool.put(pid) return False try: request = comm_isend(task, pid, tag) pending[pid] = (future, request) except BaseException: worker_pool.put(pid) future.set_exception(sys_exception()) return None while True: if task_queue and worker_pool: backoff.reset() stop = send() if stop: break if pending and iprobe(): backoff.reset() recv() backoff.sleep() while pending: probe() recv() def client_close(comm): assert comm.Is_inter() MPI.Request.Waitall([ comm.issend(None, dest=pid, tag=0) for pid in range(comm.Get_remote_size())]) try: comm.Disconnect() except NotImplementedError: # pragma: no cover comm.Free() def server_sync(comm): assert comm.Is_inter() assert comm.Get_remote_size() == 1 barrier(comm) if MPI.VERSION >= 2: data = comm.bcast(None, 0) else: # pragma: no cover tag = MPI.COMM_WORLD.Get_attr(MPI.TAG_UB) data = comm.recv(None, 0, tag) options = _sync_set_data(data) return options def server(comm, **options): assert comm.Is_inter() assert comm.Get_remote_size() == 1 backoff = Backoff(options.get('backoff', BACKOFF)) status = MPI.Status() comm_recv = comm.recv comm_isend = comm.issend comm_iprobe = comm.iprobe request_test = MPI.Request.Test def recv(): pid, tag = MPI.ANY_SOURCE, MPI.ANY_TAG backoff.reset() while not comm_iprobe(pid, tag, status): backoff.sleep() pid, tag = status.source, status.tag try: task = comm_recv(None, pid, tag, status) except BaseException: task = sys_exception() return task def call(task): if isinstance(task, BaseException): return (None, task) func, args, kwargs = task try: result = func(*args, **kwargs) return (result, None) except BaseException: return (None, sys_exception()) def send(task): pid, tag = status.source, status.tag try: request = comm_isend(task, pid, tag) except BaseException: task = (None, sys_exception()) request = comm_isend(task, pid, tag) backoff.reset() while not request_test(request): backoff.sleep() while True: task = recv() if task is None: break task = call(task) send(task) def server_close(comm): try: comm.Disconnect() except NotImplementedError: # pragma: no cover comm.Free() # --- def import_main(mod_name, mod_path, init_globals, run_name): # pylint: disable=protected-access import types import runpy module = types.ModuleType(run_name) if init_globals is not None: module.__dict__.update(init_globals) module.__name__ = run_name class TempModulePatch(runpy._TempModule): # pylint: disable=too-few-public-methods def __init__(self, mod_name): # pylint: disable=no-member super(TempModulePatch, self).__init__(mod_name) assert self.module.__name__ == run_name self.module = module TempModule = runpy._TempModule # pylint: disable=invalid-name runpy._TempModule = TempModulePatch import_main.sentinel = (mod_name, mod_path) try: main_module = sys.modules['__main__'] sys.modules['__main__'] = sys.modules[run_name] = module if mod_name: # pragma: no cover runpy.run_module(mod_name, run_name=run_name, alter_sys=True) elif mod_path: # pragma: no branch runpy.run_path(mod_path, run_name=run_name) sys.modules['__main__'] = sys.modules[run_name] = module except: # pragma: no cover sys.modules['__main__'] = main_module raise finally: del import_main.sentinel runpy._TempModule = TempModule MAIN_RUN_NAME = '__worker__' def _sync_get_data(options): main = sys.modules['__main__'] sys.modules.setdefault(MAIN_RUN_NAME, main) import_main_module = options.pop('main', True) data = options.copy() if import_main_module: spec = getattr(main, '__spec__', None) name = getattr(spec, 'name', None) path = getattr(main, '__file__', None) if name is not None: # pragma: no cover data['@main:mod_name'] = name if path is not None: # pragma: no branch data['@main:mod_path'] = path return data def _sync_set_data(data): if 'path' in data: sys.path.extend(data.pop('path')) if 'wdir' in data: os.chdir(data.pop('wdir')) if 'env' in data: os.environ.update(data.pop('env')) mod_name = data.pop('@main:mod_name', None) mod_path = data.pop('@main:mod_path', None) mod_glbs = data.pop('globals', None) import_main(mod_name, mod_path, mod_glbs, MAIN_RUN_NAME) return data # --- def check_recursive_spawn(): # pragma: no cover if not hasattr(import_main, 'sentinel'): return main_name, main_path = import_main.sentinel main_info = "\n" if main_name is not None: main_info += " main name: '{}'\n".format(main_name) if main_path is not None: main_info += " main path: '{}'\n".format(main_path) main_info += "\n" sys.stderr.write(""" The main script or module attempted to spawn new MPI worker processes. This probably means that you have forgotten to use the proper idiom in your main script or module: if __name__ == '__main__': ... This error is unrecoverable. The MPI execution environment had to be aborted. The name/path of the offending main script/module follows: """ + main_info) sys.stderr.flush() time.sleep(1) MPI.COMM_WORLD.Abort(1) FLAG_OPT_MAP = { # Python 3 'inspect': 'i', 'interactive': 'i', 'debug': 'd', 'optimize': 'O', 'no_user_site': 's', 'no_site': 'S', 'isolated': 'I', 'ignore_environment': 'E', 'dont_write_bytecode': 'B', 'hash_randomization': 'R', 'verbose': 'v', 'quiet': 'q', 'bytes_warning': 'b', # Python 2 'division_warning': 'Qwarn', 'division_new': 'Qnew', 'py3k_warning': '3', 'tabcheck': 't', 'unicode': 'U', } def get_python_flags(): args = [] for flag, opt in FLAG_OPT_MAP.items(): val = getattr(sys.flags, flag, 0) val = val if opt[0] != 'i' else 0 val = val if opt[0] != 'Q' else min(val, 1) if val > 0: args.append('-' + opt * val) for opt in sys.warnoptions: # pragma: no cover args.append('-W' + opt) sys_xoptions = getattr(sys, '_xoptions', {}) for opt, val in sys_xoptions.items(): # pragma: no cover args.append('-X' + opt if val is True else '-X' + opt + '=' + val) return args def get_max_workers(): if 'MPI4PY_MAX_WORKERS' in os.environ: return int(os.environ['MPI4PY_MAX_WORKERS']) if MPI.UNIVERSE_SIZE != MPI.KEYVAL_INVALID: # pragma: no branch universe_size = MPI.COMM_WORLD.Get_attr(MPI.UNIVERSE_SIZE) if universe_size is not None: # pragma: no cover world_size = MPI.COMM_WORLD.Get_size() return max(universe_size - world_size, 1) return 1 def client_spawn(python_exe=None, python_args=None, max_workers=None, mpi_info=None): check_recursive_spawn() if python_exe is None: python_exe = sys.executable if python_args is None: python_args = [] if max_workers is None: max_workers = get_max_workers() if mpi_info is None: mpi_info = dict(soft='1:{}'.format(max_workers)) args = get_python_flags() + list(python_args) args.extend(['-m', __package__ + '.server']) info = MPI.Info.Create() info.update(mpi_info) comm = MPI.COMM_SELF.Spawn(python_exe, args, max_workers, info) info.Free() return comm # --- SERVICE = __package__ SERVER_HOST = 'localhost' SERVER_BIND = '' SERVER_PORT = 31415 def get_service(): return os.environ.get('MPI4PY_SERVICE', SERVICE) def get_server_host(): return os.environ.get('MPI4PY_SERVER_HOST', SERVER_HOST) def get_server_bind(): return os.environ.get('MPI4PY_SERVER_BIND', SERVER_BIND) def get_server_port(): return int(os.environ.get('MPI4PY_SERVER_PORT', SERVER_PORT)) def client_lookup(address): from socket import socket host, port = address host = host or get_server_host() port = port or get_server_port() address = (host, int(port)) sock = socket() sock.connect(address) try: fdes = sock.fileno() # pylint: disable=no-member peer = MPI.Comm.Join(fdes) finally: sock.close() mpi_port = peer.recv(None, 0) peer.Disconnect() return mpi_port def server_publish(address, mpi_port): from socket import socket from socket import SOL_SOCKET, SO_REUSEADDR host, port = address host = host or get_server_bind() port = port or get_server_port() address = (host, int(port)) serversock = socket() serversock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) serversock.bind(address) serversock.listen(0) try: sock = serversock.accept()[0] finally: serversock.close() try: fdes = sock.fileno() # pylint: disable=no-member peer = MPI.Comm.Join(fdes) finally: sock.close() peer.send(mpi_port, 0) peer.Disconnect() def client_connect(service, mpi_info=None): info = MPI.INFO_NULL if mpi_info: info = MPI.Info.Create() info.update(mpi_info) if not isinstance(service, (list, tuple)): service = service or get_service() port = MPI.Lookup_name(service, info) else: port = client_lookup(service) comm = MPI.COMM_SELF.Connect(port, info, root=0) if info != MPI.INFO_NULL: info.Free() return comm def server_accept(service, mpi_info=None, root=0, comm=MPI.COMM_WORLD): assert not comm.Is_inter() assert 0 <= root < comm.Get_size() info = MPI.INFO_NULL if comm.Get_rank() == root: if mpi_info: info = MPI.Info.Create() info.update(mpi_info) port = None if comm.Get_rank() == root: port = MPI.Open_port(info) if comm.Get_rank() == root: if not isinstance(service, (list, tuple)): service = service or get_service() MPI.Publish_name(service, port, info) else: server_publish(service, port) service = None comm = comm.Accept(port, info, root) if port is not None: if service is not None: MPI.Unpublish_name(service, port, info) MPI.Close_port(port) if info != MPI.INFO_NULL: info.Free() return comm # --- def server_main_comm(comm): assert comm != MPI.COMM_NULL options = server_sync(comm) server(comm, **options) server_close(comm) def server_main_spawn(): comm = MPI.Comm.Get_parent() server_main_comm(comm) def server_main_accept(): from getopt import getopt longopts = ['bind=', 'port=', 'service=', 'info='] optlist, _ = getopt(sys.argv[1:], '', longopts) options = {opt[2:]: val for opt, val in optlist} if 'bind' in options or 'port' in options: bind = options.get('bind') or get_server_bind() port = options.get('port') or get_server_port() service = (bind, int(port)) else: service = options.get('service') or get_service() info = options.get('info', '').split(',') info = dict(k_v.split('=', 1) for k_v in info if k_v) comm = server_accept(service, info) server_main_comm(comm) def server_main(): from ..run import set_abort_status try: comm = MPI.Comm.Get_parent() if comm != MPI.COMM_NULL: server_main_spawn() else: server_main_accept() except: set_abort_status(1) raise # --- mpi4py-3.0.3/src/mpi4py/futures/__init__.py0000644000175000017500000000143613200562156021620 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Execute computations asynchronously using MPI processes.""" # pylint: disable=redefined-builtin try: from concurrent.futures import ( FIRST_COMPLETED, FIRST_EXCEPTION, ALL_COMPLETED, CancelledError, TimeoutError, Future, Executor, wait, as_completed, ) except ImportError: # pragma: no cover from ._base import ( FIRST_COMPLETED, FIRST_EXCEPTION, ALL_COMPLETED, CancelledError, TimeoutError, Future, Executor, wait, as_completed, ) from .pool import MPIPoolExecutor from .pool import MPICommExecutor from .pool import ThreadPoolExecutor from .pool import ProcessPoolExecutor mpi4py-3.0.3/src/mpi4py/futures/aplus.py0000644000175000017500000001132513200562156021203 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Support for Future chaining.""" # This implementation is heavily inspired in code written by # Daniel Dotsenko [@dvdotsenko] [dotsa at hotmail.com] # https://github.com/dvdotsenko/python-future-then import sys import weakref import threading import functools from . import Future class ThenableFuture(Future): """*Thenable* `Future` subclass.""" def then(self, on_success=None, on_failure=None): """Return ``then(self, on_success, on_failure)``.""" return then(self, on_success, on_failure) def catch(self, on_failure=None): """Return ``catch(self, on_failure)``.""" return catch(self, on_failure) def then(future, on_success=None, on_failure=None): """JavaScript-like (`Promises/A+`_) support for Future chaining. Args: future: Input future instance. on_success (optional): Function to be called when the input future is successfully resolved. Once the input future is resolved, its result value is the input for `on_success`. If `on_success` is ``None``, the output future (i.e., the one returned by this function) will be resolved directly with the result of the input future. If `on_success` returns a future instance, the result future is chained to the output future. Otherwise, the result of `on_success` is used to resolve the output future. on_failure (optional): Function to be called when the input future is rejected. The Exception instance picked up from the rejected future is the input value for `on_failure`. If `on_failure` is ``None``, the output future (i.e., the one returned by this function) will be rejected directly with the exception of the input future. Returns: Output future to be resolved once in input future is resolved and either `on_success` or `on_failure` completes. .. _Promises/A+: https://promisesaplus.com/ """ new_future = future.__class__() done_cb = functools.partial( _done_cb, new_future, on_success=on_success, on_failure=on_failure) future.add_done_callback(done_cb) return new_future def catch(future, on_failure=None): """Close equivalent to ``then(future, None, on_failure)``. Args: future: Input future instance. on_failure (optional): Function to be called when the input future is rejected. If `on_failure` is ``None``, the output future will be resolved with ``None`` thus ignoring the exception. """ if on_failure is None: return then(future, None, lambda exc: None) return then(future, None, on_failure) def _chain_log(new_future, future): with _chain_log.lock: registry = _chain_log.registry try: log = registry[new_future] except KeyError: log = weakref.WeakSet() registry[new_future] = log if future in log: raise RuntimeError( "Circular future chain detected: " "Future {0} is already in the resolved chain {1}" .format(future, set(log))) else: log.add(future) _chain_log.lock = threading.Lock() _chain_log.registry = weakref.WeakKeyDictionary() def _chain_future(new_future, future): _chain_log(new_future, future) done_cb = functools.partial(_done_cb, new_future) future.add_done_callback(done_cb) if sys.version_info[0] == 2: # pragma: no cover def _sys_exception(): exc = sys.exc_info()[1] return exc else: # pragma: no cover def _sys_exception(): exc = sys.exc_info()[1] exc.__traceback__ = None return exc def _done_cb(new_future, future, on_success=None, on_failure=None): if not future.done(): new_future.cancel() return if future.cancelled(): new_future.cancel() return try: result = future.result() if on_success: result = on_success(result) if isinstance(result, Future): _chain_future(new_future, result) else: new_future.set_result(result) except BaseException: exception = _sys_exception() if not on_failure: new_future.set_exception(exception) else: try: result = on_failure(exception) if isinstance(result, BaseException): new_future.set_exception(result) else: new_future.set_result(result) except BaseException: exception = _sys_exception() new_future.set_exception(exception) mpi4py-3.0.3/src/mpi4py/include/0000775000175000017500000000000013560002767017441 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/src/mpi4py/include/mpi4py/0000775000175000017500000000000013560002767020663 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/src/mpi4py/include/mpi4py/mpi4py.MPI_api.h0000664000175000017500000004230713557771005023545 0ustar dalcinldalcinl00000000000000/* Generated by Cython 0.29.14 */ #ifndef __PYX_HAVE_API__mpi4py__MPI #define __PYX_HAVE_API__mpi4py__MPI #ifdef __MINGW64__ #define MS_WIN64 #endif #include "Python.h" #include "mpi4py.MPI.h" static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Status = 0; #define PyMPIStatus_Type (*__pyx_ptype_6mpi4py_3MPI_Status) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Datatype = 0; #define PyMPIDatatype_Type (*__pyx_ptype_6mpi4py_3MPI_Datatype) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Request = 0; #define PyMPIRequest_Type (*__pyx_ptype_6mpi4py_3MPI_Request) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Prequest = 0; #define PyMPIPrequest_Type (*__pyx_ptype_6mpi4py_3MPI_Prequest) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Grequest = 0; #define PyMPIGrequest_Type (*__pyx_ptype_6mpi4py_3MPI_Grequest) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Message = 0; #define PyMPIMessage_Type (*__pyx_ptype_6mpi4py_3MPI_Message) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Op = 0; #define PyMPIOp_Type (*__pyx_ptype_6mpi4py_3MPI_Op) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Group = 0; #define PyMPIGroup_Type (*__pyx_ptype_6mpi4py_3MPI_Group) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Info = 0; #define PyMPIInfo_Type (*__pyx_ptype_6mpi4py_3MPI_Info) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Errhandler = 0; #define PyMPIErrhandler_Type (*__pyx_ptype_6mpi4py_3MPI_Errhandler) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Comm = 0; #define PyMPIComm_Type (*__pyx_ptype_6mpi4py_3MPI_Comm) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Intracomm = 0; #define PyMPIIntracomm_Type (*__pyx_ptype_6mpi4py_3MPI_Intracomm) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Topocomm = 0; #define PyMPITopocomm_Type (*__pyx_ptype_6mpi4py_3MPI_Topocomm) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Cartcomm = 0; #define PyMPICartcomm_Type (*__pyx_ptype_6mpi4py_3MPI_Cartcomm) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Graphcomm = 0; #define PyMPIGraphcomm_Type (*__pyx_ptype_6mpi4py_3MPI_Graphcomm) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Distgraphcomm = 0; #define PyMPIDistgraphcomm_Type (*__pyx_ptype_6mpi4py_3MPI_Distgraphcomm) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Intercomm = 0; #define PyMPIIntercomm_Type (*__pyx_ptype_6mpi4py_3MPI_Intercomm) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Win = 0; #define PyMPIWin_Type (*__pyx_ptype_6mpi4py_3MPI_Win) static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_File = 0; #define PyMPIFile_Type (*__pyx_ptype_6mpi4py_3MPI_File) static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIDatatype_New)(MPI_Datatype) = 0; #define PyMPIDatatype_New __pyx_api_f_6mpi4py_3MPI_PyMPIDatatype_New static MPI_Datatype *(*__pyx_api_f_6mpi4py_3MPI_PyMPIDatatype_Get)(PyObject *) = 0; #define PyMPIDatatype_Get __pyx_api_f_6mpi4py_3MPI_PyMPIDatatype_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIStatus_New)(MPI_Status *) = 0; #define PyMPIStatus_New __pyx_api_f_6mpi4py_3MPI_PyMPIStatus_New static MPI_Status *(*__pyx_api_f_6mpi4py_3MPI_PyMPIStatus_Get)(PyObject *) = 0; #define PyMPIStatus_Get __pyx_api_f_6mpi4py_3MPI_PyMPIStatus_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIRequest_New)(MPI_Request) = 0; #define PyMPIRequest_New __pyx_api_f_6mpi4py_3MPI_PyMPIRequest_New static MPI_Request *(*__pyx_api_f_6mpi4py_3MPI_PyMPIRequest_Get)(PyObject *) = 0; #define PyMPIRequest_Get __pyx_api_f_6mpi4py_3MPI_PyMPIRequest_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIMessage_New)(MPI_Message) = 0; #define PyMPIMessage_New __pyx_api_f_6mpi4py_3MPI_PyMPIMessage_New static MPI_Message *(*__pyx_api_f_6mpi4py_3MPI_PyMPIMessage_Get)(PyObject *) = 0; #define PyMPIMessage_Get __pyx_api_f_6mpi4py_3MPI_PyMPIMessage_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIOp_New)(MPI_Op) = 0; #define PyMPIOp_New __pyx_api_f_6mpi4py_3MPI_PyMPIOp_New static MPI_Op *(*__pyx_api_f_6mpi4py_3MPI_PyMPIOp_Get)(PyObject *) = 0; #define PyMPIOp_Get __pyx_api_f_6mpi4py_3MPI_PyMPIOp_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIInfo_New)(MPI_Info) = 0; #define PyMPIInfo_New __pyx_api_f_6mpi4py_3MPI_PyMPIInfo_New static MPI_Info *(*__pyx_api_f_6mpi4py_3MPI_PyMPIInfo_Get)(PyObject *) = 0; #define PyMPIInfo_Get __pyx_api_f_6mpi4py_3MPI_PyMPIInfo_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIGroup_New)(MPI_Group) = 0; #define PyMPIGroup_New __pyx_api_f_6mpi4py_3MPI_PyMPIGroup_New static MPI_Group *(*__pyx_api_f_6mpi4py_3MPI_PyMPIGroup_Get)(PyObject *) = 0; #define PyMPIGroup_Get __pyx_api_f_6mpi4py_3MPI_PyMPIGroup_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIComm_New)(MPI_Comm) = 0; #define PyMPIComm_New __pyx_api_f_6mpi4py_3MPI_PyMPIComm_New static MPI_Comm *(*__pyx_api_f_6mpi4py_3MPI_PyMPIComm_Get)(PyObject *) = 0; #define PyMPIComm_Get __pyx_api_f_6mpi4py_3MPI_PyMPIComm_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIWin_New)(MPI_Win) = 0; #define PyMPIWin_New __pyx_api_f_6mpi4py_3MPI_PyMPIWin_New static MPI_Win *(*__pyx_api_f_6mpi4py_3MPI_PyMPIWin_Get)(PyObject *) = 0; #define PyMPIWin_Get __pyx_api_f_6mpi4py_3MPI_PyMPIWin_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIFile_New)(MPI_File) = 0; #define PyMPIFile_New __pyx_api_f_6mpi4py_3MPI_PyMPIFile_New static MPI_File *(*__pyx_api_f_6mpi4py_3MPI_PyMPIFile_Get)(PyObject *) = 0; #define PyMPIFile_Get __pyx_api_f_6mpi4py_3MPI_PyMPIFile_Get static PyObject *(*__pyx_api_f_6mpi4py_3MPI_PyMPIErrhandler_New)(MPI_Errhandler) = 0; #define PyMPIErrhandler_New __pyx_api_f_6mpi4py_3MPI_PyMPIErrhandler_New static MPI_Errhandler *(*__pyx_api_f_6mpi4py_3MPI_PyMPIErrhandler_Get)(PyObject *) = 0; #define PyMPIErrhandler_Get __pyx_api_f_6mpi4py_3MPI_PyMPIErrhandler_Get #if !defined(__Pyx_PyIdentifier_FromString) #if PY_MAJOR_VERSION < 3 #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) #else #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) #endif #endif #ifndef __PYX_HAVE_RT_ImportFunction #define __PYX_HAVE_RT_ImportFunction static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { PyObject *d = 0; PyObject *cobj = 0; union { void (*fp)(void); void *p; } tmp; d = PyObject_GetAttrString(module, (char *)"__pyx_capi__"); if (!d) goto bad; cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, "%.200s does not export expected C function %.200s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } tmp.p = PyCapsule_GetPointer(cobj, sig); #else {const char *desc, *s1, *s2; desc = (const char *)PyCObject_GetDesc(cobj); if (!desc) goto bad; s1 = desc; s2 = sig; while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } tmp.p = PyCObject_AsVoidPtr(cobj);} #endif *f = tmp.fp; if (!(*f)) goto bad; Py_DECREF(d); return 0; bad: Py_XDECREF(d); return -1; } #endif #ifndef __PYX_HAVE_RT_ImportType_proto #define __PYX_HAVE_RT_ImportType_proto enum __Pyx_ImportType_CheckSize { __Pyx_ImportType_CheckSize_Error = 0, __Pyx_ImportType_CheckSize_Warn = 1, __Pyx_ImportType_CheckSize_Ignore = 2 }; static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); #endif #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size) { PyObject *result = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif result = PyObject_GetAttrString(module, class_name); if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if ((size_t)basicsize < size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(result); return NULL; } #endif static int import_mpi4py__MPI(void) { PyObject *module = 0; module = PyImport_ImportModule("mpi4py.MPI"); if (!module) goto bad; if (__Pyx_ImportFunction(module, "PyMPIDatatype_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIDatatype_New, "PyObject *(MPI_Datatype)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIDatatype_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIDatatype_Get, "MPI_Datatype *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIStatus_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIStatus_New, "PyObject *(MPI_Status *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIStatus_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIStatus_Get, "MPI_Status *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIRequest_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIRequest_New, "PyObject *(MPI_Request)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIRequest_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIRequest_Get, "MPI_Request *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIMessage_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIMessage_New, "PyObject *(MPI_Message)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIMessage_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIMessage_Get, "MPI_Message *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIOp_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIOp_New, "PyObject *(MPI_Op)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIOp_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIOp_Get, "MPI_Op *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIInfo_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIInfo_New, "PyObject *(MPI_Info)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIInfo_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIInfo_Get, "MPI_Info *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIGroup_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIGroup_New, "PyObject *(MPI_Group)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIGroup_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIGroup_Get, "MPI_Group *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIComm_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIComm_New, "PyObject *(MPI_Comm)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIComm_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIComm_Get, "MPI_Comm *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIWin_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIWin_New, "PyObject *(MPI_Win)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIWin_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIWin_Get, "MPI_Win *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIFile_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIFile_New, "PyObject *(MPI_File)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIFile_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIFile_Get, "MPI_File *(PyObject *)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIErrhandler_New", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIErrhandler_New, "PyObject *(MPI_Errhandler)") < 0) goto bad; if (__Pyx_ImportFunction(module, "PyMPIErrhandler_Get", (void (**)(void))&__pyx_api_f_6mpi4py_3MPI_PyMPIErrhandler_Get, "MPI_Errhandler *(PyObject *)") < 0) goto bad; __pyx_ptype_6mpi4py_3MPI_Status = __Pyx_ImportType(module, "mpi4py.MPI", "Status", sizeof(struct PyMPIStatusObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Status) goto bad; __pyx_ptype_6mpi4py_3MPI_Datatype = __Pyx_ImportType(module, "mpi4py.MPI", "Datatype", sizeof(struct PyMPIDatatypeObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Datatype) goto bad; __pyx_ptype_6mpi4py_3MPI_Request = __Pyx_ImportType(module, "mpi4py.MPI", "Request", sizeof(struct PyMPIRequestObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Request) goto bad; __pyx_ptype_6mpi4py_3MPI_Prequest = __Pyx_ImportType(module, "mpi4py.MPI", "Prequest", sizeof(struct PyMPIPrequestObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Prequest) goto bad; __pyx_ptype_6mpi4py_3MPI_Grequest = __Pyx_ImportType(module, "mpi4py.MPI", "Grequest", sizeof(struct PyMPIGrequestObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Grequest) goto bad; __pyx_ptype_6mpi4py_3MPI_Message = __Pyx_ImportType(module, "mpi4py.MPI", "Message", sizeof(struct PyMPIMessageObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Message) goto bad; __pyx_ptype_6mpi4py_3MPI_Op = __Pyx_ImportType(module, "mpi4py.MPI", "Op", sizeof(struct PyMPIOpObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Op) goto bad; __pyx_ptype_6mpi4py_3MPI_Group = __Pyx_ImportType(module, "mpi4py.MPI", "Group", sizeof(struct PyMPIGroupObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Group) goto bad; __pyx_ptype_6mpi4py_3MPI_Info = __Pyx_ImportType(module, "mpi4py.MPI", "Info", sizeof(struct PyMPIInfoObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Info) goto bad; __pyx_ptype_6mpi4py_3MPI_Errhandler = __Pyx_ImportType(module, "mpi4py.MPI", "Errhandler", sizeof(struct PyMPIErrhandlerObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Errhandler) goto bad; __pyx_ptype_6mpi4py_3MPI_Comm = __Pyx_ImportType(module, "mpi4py.MPI", "Comm", sizeof(struct PyMPICommObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Comm) goto bad; __pyx_ptype_6mpi4py_3MPI_Intracomm = __Pyx_ImportType(module, "mpi4py.MPI", "Intracomm", sizeof(struct PyMPIIntracommObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Intracomm) goto bad; __pyx_ptype_6mpi4py_3MPI_Topocomm = __Pyx_ImportType(module, "mpi4py.MPI", "Topocomm", sizeof(struct PyMPITopocommObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Topocomm) goto bad; __pyx_ptype_6mpi4py_3MPI_Cartcomm = __Pyx_ImportType(module, "mpi4py.MPI", "Cartcomm", sizeof(struct PyMPICartcommObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Cartcomm) goto bad; __pyx_ptype_6mpi4py_3MPI_Graphcomm = __Pyx_ImportType(module, "mpi4py.MPI", "Graphcomm", sizeof(struct PyMPIGraphcommObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Graphcomm) goto bad; __pyx_ptype_6mpi4py_3MPI_Distgraphcomm = __Pyx_ImportType(module, "mpi4py.MPI", "Distgraphcomm", sizeof(struct PyMPIDistgraphcommObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Distgraphcomm) goto bad; __pyx_ptype_6mpi4py_3MPI_Intercomm = __Pyx_ImportType(module, "mpi4py.MPI", "Intercomm", sizeof(struct PyMPIIntercommObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Intercomm) goto bad; __pyx_ptype_6mpi4py_3MPI_Win = __Pyx_ImportType(module, "mpi4py.MPI", "Win", sizeof(struct PyMPIWinObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_Win) goto bad; __pyx_ptype_6mpi4py_3MPI_File = __Pyx_ImportType(module, "mpi4py.MPI", "File", sizeof(struct PyMPIFileObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6mpi4py_3MPI_File) goto bad; Py_DECREF(module); module = 0; return 0; bad: Py_XDECREF(module); return -1; } #endif /* !__PYX_HAVE_API__mpi4py__MPI */ mpi4py-3.0.3/src/mpi4py/include/mpi4py/mpi.pxi0000644000175000017500000000012413200562156022157 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com include "../../libmpi.pxd" mpi4py-3.0.3/src/mpi4py/include/mpi4py/mpi4py.MPI.h0000664000175000017500000002104713557771005022712 0ustar dalcinldalcinl00000000000000/* Generated by Cython 0.29.14 */ #ifndef __PYX_HAVE__mpi4py__MPI #define __PYX_HAVE__mpi4py__MPI #include "Python.h" struct PyMPIStatusObject; struct PyMPIDatatypeObject; struct PyMPIRequestObject; struct PyMPIPrequestObject; struct PyMPIGrequestObject; struct PyMPIMessageObject; struct PyMPIOpObject; struct PyMPIGroupObject; struct PyMPIInfoObject; struct PyMPIErrhandlerObject; struct PyMPICommObject; struct PyMPIIntracommObject; struct PyMPITopocommObject; struct PyMPICartcommObject; struct PyMPIGraphcommObject; struct PyMPIDistgraphcommObject; struct PyMPIIntercommObject; struct PyMPIWinObject; struct PyMPIFileObject; /* "mpi4py/MPI.pxd":28 * ctypedef MPI_Count Count "MPI_Count" * * ctypedef public api class Status [ # <<<<<<<<<<<<<< * type PyMPIStatus_Type, * object PyMPIStatusObject, */ struct PyMPIStatusObject { PyObject_HEAD MPI_Status ob_mpi; unsigned int flags; }; typedef struct PyMPIStatusObject PyMPIStatusObject; /* "mpi4py/MPI.pxd":35 * cdef unsigned flags * * ctypedef public api class Datatype [ # <<<<<<<<<<<<<< * type PyMPIDatatype_Type, * object PyMPIDatatypeObject, */ struct PyMPIDatatypeObject { PyObject_HEAD MPI_Datatype ob_mpi; unsigned int flags; }; typedef struct PyMPIDatatypeObject PyMPIDatatypeObject; /* "mpi4py/MPI.pxd":42 * cdef unsigned flags * * ctypedef public api class Request [ # <<<<<<<<<<<<<< * type PyMPIRequest_Type, * object PyMPIRequestObject, */ struct PyMPIRequestObject { PyObject_HEAD MPI_Request ob_mpi; unsigned int flags; PyObject *ob_buf; }; typedef struct PyMPIRequestObject PyMPIRequestObject; /* "mpi4py/MPI.pxd":50 * cdef object ob_buf * * ctypedef public api class Prequest(Request) [ # <<<<<<<<<<<<<< * type PyMPIPrequest_Type, * object PyMPIPrequestObject, */ struct PyMPIPrequestObject { struct PyMPIRequestObject __pyx_base; }; typedef struct PyMPIPrequestObject PyMPIPrequestObject; /* "mpi4py/MPI.pxd":56 * pass * * ctypedef public api class Grequest(Request) [ # <<<<<<<<<<<<<< * type PyMPIGrequest_Type, * object PyMPIGrequestObject, */ struct PyMPIGrequestObject { struct PyMPIRequestObject __pyx_base; MPI_Request ob_grequest; }; typedef struct PyMPIGrequestObject PyMPIGrequestObject; /* "mpi4py/MPI.pxd":62 * cdef MPI_Request ob_grequest * * ctypedef public api class Message [ # <<<<<<<<<<<<<< * type PyMPIMessage_Type, * object PyMPIMessageObject, */ struct PyMPIMessageObject { PyObject_HEAD MPI_Message ob_mpi; unsigned int flags; PyObject *ob_buf; }; typedef struct PyMPIMessageObject PyMPIMessageObject; /* "mpi4py/MPI.pxd":70 * cdef object ob_buf * * ctypedef public api class Op [ # <<<<<<<<<<<<<< * type PyMPIOp_Type, * object PyMPIOpObject, */ struct PyMPIOpObject { PyObject_HEAD MPI_Op ob_mpi; unsigned int flags; PyObject *(*ob_func)(PyObject *, PyObject *); int ob_usrid; }; typedef struct PyMPIOpObject PyMPIOpObject; /* "mpi4py/MPI.pxd":79 * cdef int ob_usrid * * ctypedef public api class Group [ # <<<<<<<<<<<<<< * type PyMPIGroup_Type, * object PyMPIGroupObject, */ struct PyMPIGroupObject { PyObject_HEAD MPI_Group ob_mpi; unsigned int flags; }; typedef struct PyMPIGroupObject PyMPIGroupObject; /* "mpi4py/MPI.pxd":86 * cdef unsigned flags * * ctypedef public api class Info [ # <<<<<<<<<<<<<< * type PyMPIInfo_Type, * object PyMPIInfoObject, */ struct PyMPIInfoObject { PyObject_HEAD MPI_Info ob_mpi; unsigned int flags; }; typedef struct PyMPIInfoObject PyMPIInfoObject; /* "mpi4py/MPI.pxd":93 * cdef unsigned flags * * ctypedef public api class Errhandler [ # <<<<<<<<<<<<<< * type PyMPIErrhandler_Type, * object PyMPIErrhandlerObject, */ struct PyMPIErrhandlerObject { PyObject_HEAD MPI_Errhandler ob_mpi; unsigned int flags; }; typedef struct PyMPIErrhandlerObject PyMPIErrhandlerObject; /* "mpi4py/MPI.pxd":100 * cdef unsigned flags * * ctypedef public api class Comm [ # <<<<<<<<<<<<<< * type PyMPIComm_Type, * object PyMPICommObject, */ struct PyMPICommObject { PyObject_HEAD MPI_Comm ob_mpi; unsigned int flags; }; typedef struct PyMPICommObject PyMPICommObject; /* "mpi4py/MPI.pxd":107 * cdef unsigned flags * * ctypedef public api class Intracomm(Comm) [ # <<<<<<<<<<<<<< * type PyMPIIntracomm_Type, * object PyMPIIntracommObject, */ struct PyMPIIntracommObject { struct PyMPICommObject __pyx_base; }; typedef struct PyMPIIntracommObject PyMPIIntracommObject; /* "mpi4py/MPI.pxd":113 * pass * * ctypedef public api class Topocomm(Intracomm) [ # <<<<<<<<<<<<<< * type PyMPITopocomm_Type, * object PyMPITopocommObject, */ struct PyMPITopocommObject { struct PyMPIIntracommObject __pyx_base; }; typedef struct PyMPITopocommObject PyMPITopocommObject; /* "mpi4py/MPI.pxd":119 * pass * * ctypedef public api class Cartcomm(Topocomm) [ # <<<<<<<<<<<<<< * type PyMPICartcomm_Type, * object PyMPICartcommObject, */ struct PyMPICartcommObject { struct PyMPITopocommObject __pyx_base; }; typedef struct PyMPICartcommObject PyMPICartcommObject; /* "mpi4py/MPI.pxd":125 * pass * * ctypedef public api class Graphcomm(Topocomm) [ # <<<<<<<<<<<<<< * type PyMPIGraphcomm_Type, * object PyMPIGraphcommObject, */ struct PyMPIGraphcommObject { struct PyMPITopocommObject __pyx_base; }; typedef struct PyMPIGraphcommObject PyMPIGraphcommObject; /* "mpi4py/MPI.pxd":131 * pass * * ctypedef public api class Distgraphcomm(Topocomm) [ # <<<<<<<<<<<<<< * type PyMPIDistgraphcomm_Type, * object PyMPIDistgraphcommObject, */ struct PyMPIDistgraphcommObject { struct PyMPITopocommObject __pyx_base; }; typedef struct PyMPIDistgraphcommObject PyMPIDistgraphcommObject; /* "mpi4py/MPI.pxd":137 * pass * * ctypedef public api class Intercomm(Comm) [ # <<<<<<<<<<<<<< * type PyMPIIntercomm_Type, * object PyMPIIntercommObject, */ struct PyMPIIntercommObject { struct PyMPICommObject __pyx_base; }; typedef struct PyMPIIntercommObject PyMPIIntercommObject; /* "mpi4py/MPI.pxd":143 * pass * * ctypedef public api class Win [ # <<<<<<<<<<<<<< * type PyMPIWin_Type, * object PyMPIWinObject, */ struct PyMPIWinObject { PyObject_HEAD MPI_Win ob_mpi; unsigned int flags; PyObject *ob_mem; }; typedef struct PyMPIWinObject PyMPIWinObject; /* "mpi4py/MPI.pxd":151 * cdef object ob_mem * * ctypedef public api class File [ # <<<<<<<<<<<<<< * type PyMPIFile_Type, * object PyMPIFileObject, */ struct PyMPIFileObject { PyObject_HEAD MPI_File ob_mpi; unsigned int flags; }; typedef struct PyMPIFileObject PyMPIFileObject; #ifndef __PYX_HAVE_API__mpi4py__MPI #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(_T) _T #endif __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIStatus_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIDatatype_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIRequest_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIPrequest_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIGrequest_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIMessage_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIOp_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIGroup_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIInfo_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIErrhandler_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIComm_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIIntracomm_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPITopocomm_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPICartcomm_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIGraphcomm_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIDistgraphcomm_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIIntercomm_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIWin_Type; __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyMPIFile_Type; #endif /* !__PYX_HAVE_API__mpi4py__MPI */ /* WARNING: the interface of the module init function changed in CPython 3.5. */ /* It now returns a PyModuleDef instance instead of a PyModule instance. */ #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC initMPI(void); #else PyMODINIT_FUNC PyInit_MPI(void); #endif #endif /* !__PYX_HAVE__mpi4py__MPI */ mpi4py-3.0.3/src/mpi4py/include/mpi4py/mpi4py.i0000644000175000017500000000435213200562156022253 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ /* ---------------------------------------------------------------- */ #if SWIG_VERSION < 0x010328 %warn "SWIG version < 1.3.28 is not supported" #endif /* ---------------------------------------------------------------- */ %header %{ #include "mpi4py/mpi4py.h" %} %init %{ if (import_mpi4py() < 0) #if PY_MAJOR_VERSION >= 3 return NULL; #else return; #endif %} /* ---------------------------------------------------------------- */ %define %mpi4py_fragments(PyType, Type) /* --- AsPtr --- */ %fragment(SWIG_AsPtr_frag(Type),"header") { SWIGINTERN int SWIG_AsPtr_dec(Type)(SWIG_Object input, Type **p) { if (input == Py_None) { if (p) *p = NULL; return SWIG_OK; } else if (PyObject_TypeCheck(input,&PyMPI##PyType##_Type)) { if (p) *p = PyMPI##PyType##_Get(input); return SWIG_OK; } else { void *argp = NULL; int res = SWIG_ConvertPtr(input,&argp,%descriptor(p_##Type), 0); if (!SWIG_IsOK(res)) return res; if (!argp) return SWIG_ValueError; if (p) *p = %static_cast(argp,Type*); return SWIG_OK; } } } /* --- From --- */ %fragment(SWIG_From_frag(Type),"header") { SWIGINTERN SWIG_Object SWIG_From_dec(Type)(Type v) { return PyMPI##PyType##_New(v); } } %enddef /*mpi4py_fragments*/ /* ---------------------------------------------------------------- */ %define SWIG_TYPECHECK_MPI_Comm 400 %enddef %define SWIG_TYPECHECK_MPI_Datatype 401 %enddef %define SWIG_TYPECHECK_MPI_Request 402 %enddef %define SWIG_TYPECHECK_MPI_Message 403 %enddef %define SWIG_TYPECHECK_MPI_Status 404 %enddef %define SWIG_TYPECHECK_MPI_Op 405 %enddef %define SWIG_TYPECHECK_MPI_Group 406 %enddef %define SWIG_TYPECHECK_MPI_Info 407 %enddef %define SWIG_TYPECHECK_MPI_File 408 %enddef %define SWIG_TYPECHECK_MPI_Win 409 %enddef %define SWIG_TYPECHECK_MPI_Errhandler 410 %enddef /* ---------------------------------------------------------------- */ %define %mpi4py_typemap(PyType, Type) %types(Type*); %mpi4py_fragments(PyType, Type); %typemaps_asptrfromn(%checkcode(Type), Type); %enddef /*mpi4py_typemap*/ /* ---------------------------------------------------------------- */ /* * Local Variables: * mode: C * End: */ mpi4py-3.0.3/src/mpi4py/include/mpi4py/mpi4py.h0000644000175000017500000000064113200562156022247 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ #ifndef MPI4PY_H #define MPI4PY_H #include "mpi.h" #if (MPI_VERSION < 3) && !defined(PyMPI_HAVE_MPI_Message) typedef void *PyMPI_MPI_Message; #define MPI_Message PyMPI_MPI_Message #endif #include "mpi4py.MPI_api.h" static int import_mpi4py(void) { if (import_mpi4py__MPI() < 0) goto bad; return 0; bad: return -1; } #endif /* MPI4PY_H */ mpi4py-3.0.3/src/mpi4py/__init__.pxd0000644000175000017500000000007013200562156020257 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com mpi4py-3.0.3/src/mpi4py/__init__.py0000664000175000017500000001202013560002540020107 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """ This is the **MPI for Python** package. What is *MPI*? ============== The *Message Passing Interface*, is a standardized and portable message-passing system designed to function on a wide variety of parallel computers. The standard defines the syntax and semantics of library routines and allows users to write portable programs in the main scientific programming languages (Fortran, C, or C++). Since its release, the MPI specification has become the leading standard for message-passing libraries for parallel computers. What is *MPI for Python*? ========================= *MPI for Python* provides MPI bindings for the Python programming language, allowing any Python program to exploit multiple processors. This package is constructed on top of the MPI-1/2 specifications and provides an object oriented interface which closely follows MPI-2 C++ bindings. """ __version__ = '3.0.3' __author__ = 'Lisandro Dalcin' __credits__ = 'MPI Forum, MPICH Team, Open MPI Team' __all__ = ['MPI'] def get_include(): """Return the directory in the package that contains header files. Extension modules that need to compile against mpi4py should use this function to locate the appropriate include directory. Using Python distutils (or perhaps NumPy distutils):: import mpi4py Extension('extension_name', ... include_dirs=[..., mpi4py.get_include()]) """ from os.path import join, dirname return join(dirname(__file__), 'include') def get_config(): """Return a dictionary with information about MPI.""" from os.path import join, dirname try: from configparser import ConfigParser except ImportError: # pragma: no cover from ConfigParser import ConfigParser parser = ConfigParser() parser.read(join(dirname(__file__), 'mpi.cfg')) return dict(parser.items('mpi')) def rc(**kargs): # pylint: disable=invalid-name """Runtime configuration options. Parameters ---------- initialize : bool Automatic MPI initialization at import (default: True). threads : bool Request for thread support (default: True). thread_level : {'multiple', 'serialized', 'funneled', 'single'} Level of thread support to request (default: 'multiple'). finalize : None or bool Automatic MPI finalization at exit (default: None). fast_reduce : bool Use tree-based reductions for objects (default: True). recv_mprobe : bool Use matched probes to receive objects (default: True). errors : {'exception', 'default', 'fatal'} Error handling policy (default: 'exception'). """ for key in kargs: if not hasattr(rc, key): raise TypeError("unexpected argument '{0}'".format(key)) for key, value in kargs.items(): setattr(rc, key, value) rc.initialize = True rc.threads = True rc.thread_level = 'multiple' rc.finalize = None rc.fast_reduce = True rc.recv_mprobe = True rc.errors = 'exception' __import__('sys').modules[__name__ + '.rc'] = rc def profile(name, **kargs): """Support for the MPI profiling interface. Parameters ---------- name : str Name of the profiler library to load. path : list of str, optional Additional paths to search for the profiler. logfile : str, optional Filename prefix for dumping profiler output. """ import sys import os from .dl import dlopen, dlerror, RTLD_NOW, RTLD_GLOBAL def lookup_dylib(name, path): # pylint: disable=missing-docstring pattern = [] if sys.platform.startswith('win'): # pragma: no cover pattern.append(('', '.dll')) elif sys.platform == 'darwin': # pragma: no cover pattern.append(('lib', '.dylib')) elif os.name == 'posix': # pragma: no cover pattern.append(('lib', '.so')) pattern.append(('', '')) for pth in path: for (lib, dso) in pattern: filename = os.path.join(pth, lib + name + dso) if os.path.isfile(filename): return os.path.abspath(filename) return None logfile = kargs.pop('logfile', None) if logfile: if name in ('mpe',): if 'MPE_LOGFILE_PREFIX' not in os.environ: os.environ['MPE_LOGFILE_PREFIX'] = logfile if name in ('vt', 'vt-mpi', 'vt-hyb'): if 'VT_FILE_PREFIX' not in os.environ: os.environ['VT_FILE_PREFIX'] = logfile path = kargs.pop('path', []) if isinstance(path, str): path = [path] else: path = list(path) prefix = os.path.dirname(__file__) path.append(os.path.join(prefix, 'lib-pmpi')) filename = lookup_dylib(name, path) if filename is None: raise ValueError("profiler '{0}' not found".format(name)) handle = dlopen(filename, RTLD_NOW | RTLD_GLOBAL) if handle: profile.registry.append((name, (handle, filename))) else: from warnings import warn warn(dlerror()) profile.registry = [] mpi4py-3.0.3/src/mpi4py/libmpi.pxd0000644000175000017500000012704213200562156020005 0ustar dalcinldalcinl00000000000000# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com cdef import from "mpi.h" nogil: #----------------------------------------------------------------- ctypedef long MPI_Aint ctypedef long long MPI_Offset #:= long ctypedef long long MPI_Count #:= MPI_Offset ctypedef struct MPI_Status: int MPI_SOURCE int MPI_TAG int MPI_ERROR ctypedef struct _mpi_datatype_t ctypedef _mpi_datatype_t* MPI_Datatype ctypedef struct _mpi_request_t ctypedef _mpi_request_t* MPI_Request ctypedef struct _mpi_message_t ctypedef _mpi_message_t* MPI_Message ctypedef struct _mpi_op_t ctypedef _mpi_op_t* MPI_Op ctypedef struct _mpi_group_t ctypedef _mpi_group_t* MPI_Group ctypedef struct _mpi_info_t ctypedef _mpi_info_t* MPI_Info ctypedef struct _mpi_comm_t ctypedef _mpi_comm_t* MPI_Comm ctypedef struct _mpi_win_t ctypedef _mpi_win_t* MPI_Win ctypedef struct _mpi_file_t ctypedef _mpi_file_t* MPI_File ctypedef struct _mpi_errhandler_t ctypedef _mpi_errhandler_t* MPI_Errhandler #----------------------------------------------------------------- enum: MPI_UNDEFINED #:= -32766 enum: MPI_ANY_SOURCE #:= MPI_UNDEFINED enum: MPI_ANY_TAG #:= MPI_UNDEFINED enum: MPI_PROC_NULL #:= MPI_UNDEFINED enum: MPI_ROOT #:= MPI_PROC_NULL enum: MPI_IDENT #:= 1 enum: MPI_CONGRUENT #:= 2 enum: MPI_SIMILAR #:= 3 enum: MPI_UNEQUAL #:= 4 void* MPI_BOTTOM #:= 0 void* MPI_IN_PLACE #:= 0 enum: MPI_KEYVAL_INVALID #:= 0 enum: MPI_MAX_OBJECT_NAME #:= 1 #----------------------------------------------------------------- # Null datatype MPI_Datatype MPI_DATATYPE_NULL #:= 0 # MPI datatypes MPI_Datatype MPI_PACKED #:= MPI_DATATYPE_NULL MPI_Datatype MPI_BYTE #:= MPI_DATATYPE_NULL MPI_Datatype MPI_AINT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_OFFSET #:= MPI_DATATYPE_NULL MPI_Datatype MPI_COUNT #:= MPI_DATATYPE_NULL # Elementary C datatypes MPI_Datatype MPI_CHAR #:= MPI_DATATYPE_NULL MPI_Datatype MPI_WCHAR #:= MPI_DATATYPE_NULL MPI_Datatype MPI_SIGNED_CHAR #:= MPI_DATATYPE_NULL MPI_Datatype MPI_SHORT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LONG #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LONG_LONG #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LONG_LONG_INT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_UNSIGNED_CHAR #:= MPI_DATATYPE_NULL MPI_Datatype MPI_UNSIGNED_SHORT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_UNSIGNED #:= MPI_DATATYPE_NULL MPI_Datatype MPI_UNSIGNED_LONG #:= MPI_DATATYPE_NULL MPI_Datatype MPI_UNSIGNED_LONG_LONG #:= MPI_DATATYPE_NULL MPI_Datatype MPI_FLOAT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_DOUBLE #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LONG_DOUBLE #:= MPI_DATATYPE_NULL # C99 datatypes MPI_Datatype MPI_C_BOOL #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INT8_T #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INT16_T #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INT32_T #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INT64_T #:= MPI_DATATYPE_NULL MPI_Datatype MPI_UINT8_T #:= MPI_DATATYPE_NULL MPI_Datatype MPI_UINT16_T #:= MPI_DATATYPE_NULL MPI_Datatype MPI_UINT32_T #:= MPI_DATATYPE_NULL MPI_Datatype MPI_UINT64_T #:= MPI_DATATYPE_NULL MPI_Datatype MPI_C_COMPLEX #:= MPI_DATATYPE_NULL MPI_Datatype MPI_C_FLOAT_COMPLEX #:= MPI_DATATYPE_NULL MPI_Datatype MPI_C_DOUBLE_COMPLEX #:= MPI_DATATYPE_NULL MPI_Datatype MPI_C_LONG_DOUBLE_COMPLEX #:= MPI_DATATYPE_NULL # C++ datatypes MPI_Datatype MPI_CXX_BOOL #:= MPI_DATATYPE_NULL MPI_Datatype MPI_CXX_FLOAT_COMPLEX #:= MPI_DATATYPE_NULL MPI_Datatype MPI_CXX_DOUBLE_COMPLEX #:= MPI_DATATYPE_NULL MPI_Datatype MPI_CXX_LONG_DOUBLE_COMPLEX #:= MPI_DATATYPE_NULL # C datatypes for reduction operations MPI_Datatype MPI_SHORT_INT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_2INT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LONG_INT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_FLOAT_INT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_DOUBLE_INT #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LONG_DOUBLE_INT #:= MPI_DATATYPE_NULL # Elementary Fortran datatypes MPI_Datatype MPI_CHARACTER #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LOGICAL #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INTEGER #:= MPI_DATATYPE_NULL MPI_Datatype MPI_REAL #:= MPI_DATATYPE_NULL MPI_Datatype MPI_DOUBLE_PRECISION #:= MPI_DATATYPE_NULL MPI_Datatype MPI_COMPLEX #:= MPI_DATATYPE_NULL MPI_Datatype MPI_DOUBLE_COMPLEX #:= MPI_DATATYPE_NULL # Size-specific Fortran datatypes MPI_Datatype MPI_LOGICAL1 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LOGICAL2 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LOGICAL4 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LOGICAL8 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INTEGER1 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INTEGER2 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INTEGER4 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INTEGER8 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_INTEGER16 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_REAL2 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_REAL4 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_REAL8 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_REAL16 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_COMPLEX4 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_COMPLEX8 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_COMPLEX16 #:= MPI_DATATYPE_NULL MPI_Datatype MPI_COMPLEX32 #:= MPI_DATATYPE_NULL # Deprecated since MPI-2, removed in MPI-3 MPI_Datatype MPI_UB #:= MPI_DATATYPE_NULL MPI_Datatype MPI_LB #:= MPI_DATATYPE_NULL int MPI_Type_lb(MPI_Datatype, MPI_Aint*) int MPI_Type_ub(MPI_Datatype, MPI_Aint*) int MPI_Type_extent(MPI_Datatype, MPI_Aint*) int MPI_Address(void*, MPI_Aint*) int MPI_Type_hvector(int, int, MPI_Aint, MPI_Datatype, MPI_Datatype*) int MPI_Type_hindexed(int, int[], MPI_Aint[], MPI_Datatype, MPI_Datatype*) int MPI_Type_struct(int, int[], MPI_Aint[], MPI_Datatype[], MPI_Datatype*) enum: MPI_COMBINER_HVECTOR_INTEGER #:= MPI_UNDEFINED enum: MPI_COMBINER_HINDEXED_INTEGER #:= MPI_UNDEFINED enum: MPI_COMBINER_STRUCT_INTEGER #:= MPI_UNDEFINED int MPI_Type_dup(MPI_Datatype, MPI_Datatype*) int MPI_Type_contiguous(int, MPI_Datatype, MPI_Datatype*) int MPI_Type_vector(int, int, int, MPI_Datatype, MPI_Datatype*) int MPI_Type_indexed(int, int[], int[], MPI_Datatype, MPI_Datatype*) int MPI_Type_create_indexed_block(int, int, int[], MPI_Datatype, MPI_Datatype*) enum: MPI_ORDER_C #:= 0 enum: MPI_ORDER_FORTRAN #:= 1 int MPI_Type_create_subarray(int, int[], int[], int[], int, MPI_Datatype, MPI_Datatype*) enum: MPI_DISTRIBUTE_NONE #:= 0 enum: MPI_DISTRIBUTE_BLOCK #:= 1 enum: MPI_DISTRIBUTE_CYCLIC #:= 2 enum: MPI_DISTRIBUTE_DFLT_DARG #:= 4 int MPI_Type_create_darray(int, int, int, int[], int[], int[], int[], int, MPI_Datatype, MPI_Datatype*) int MPI_Get_address(void*, MPI_Aint*) #:= MPI_Address MPI_Aint MPI_Aint_add(MPI_Aint, MPI_Aint) MPI_Aint MPI_Aint_diff(MPI_Aint, MPI_Aint) int MPI_Type_create_hvector(int, int, MPI_Aint, MPI_Datatype, MPI_Datatype*) #:= MPI_Type_hvector int MPI_Type_create_hindexed(int, int[], MPI_Aint[], MPI_Datatype, MPI_Datatype*) #:= MPI_Type_hindexed int MPI_Type_create_hindexed_block(int, int, MPI_Aint[], MPI_Datatype, MPI_Datatype*) int MPI_Type_create_struct(int, int[], MPI_Aint[], MPI_Datatype[], MPI_Datatype*) #:= MPI_Type_struct int MPI_Type_create_resized(MPI_Datatype, MPI_Aint, MPI_Aint, MPI_Datatype*) int MPI_Type_size(MPI_Datatype, int*) int MPI_Type_size_x(MPI_Datatype, MPI_Count*) int MPI_Type_get_extent(MPI_Datatype, MPI_Aint*, MPI_Aint*) int MPI_Type_get_extent_x(MPI_Datatype, MPI_Count*, MPI_Count*) int MPI_Type_get_true_extent(MPI_Datatype, MPI_Aint*, MPI_Aint*) int MPI_Type_get_true_extent_x(MPI_Datatype, MPI_Count*, MPI_Count*) int MPI_Type_create_f90_integer(int, MPI_Datatype*) int MPI_Type_create_f90_real(int, int, MPI_Datatype*) int MPI_Type_create_f90_complex(int, int, MPI_Datatype*) enum: MPI_TYPECLASS_INTEGER #:= MPI_UNDEFINED enum: MPI_TYPECLASS_REAL #:= MPI_UNDEFINED enum: MPI_TYPECLASS_COMPLEX #:= MPI_UNDEFINED int MPI_Type_match_size(int, int, MPI_Datatype*) int MPI_Type_commit(MPI_Datatype*) int MPI_Type_free(MPI_Datatype*) int MPI_Pack(void*, int, MPI_Datatype, void*, int, int*, MPI_Comm) int MPI_Unpack(void*, int, int*, void*, int, MPI_Datatype, MPI_Comm) int MPI_Pack_size(int, MPI_Datatype, MPI_Comm, int*) int MPI_Pack_external(char[], void*, int, MPI_Datatype, void*, MPI_Aint, MPI_Aint*) int MPI_Unpack_external(char[], void*, MPI_Aint, MPI_Aint*, void*, int, MPI_Datatype) int MPI_Pack_external_size(char[], int, MPI_Datatype, MPI_Aint*) enum: MPI_COMBINER_NAMED #:= MPI_UNDEFINED enum: MPI_COMBINER_DUP #:= MPI_UNDEFINED enum: MPI_COMBINER_CONTIGUOUS #:= MPI_UNDEFINED enum: MPI_COMBINER_VECTOR #:= MPI_UNDEFINED enum: MPI_COMBINER_HVECTOR #:= MPI_UNDEFINED enum: MPI_COMBINER_INDEXED #:= MPI_UNDEFINED enum: MPI_COMBINER_HINDEXED #:= MPI_UNDEFINED enum: MPI_COMBINER_INDEXED_BLOCK #:= MPI_UNDEFINED enum: MPI_COMBINER_HINDEXED_BLOCK #:= MPI_UNDEFINED enum: MPI_COMBINER_STRUCT #:= MPI_UNDEFINED enum: MPI_COMBINER_SUBARRAY #:= MPI_UNDEFINED enum: MPI_COMBINER_DARRAY #:= MPI_UNDEFINED enum: MPI_COMBINER_F90_REAL #:= MPI_UNDEFINED enum: MPI_COMBINER_F90_COMPLEX #:= MPI_UNDEFINED enum: MPI_COMBINER_F90_INTEGER #:= MPI_UNDEFINED enum: MPI_COMBINER_RESIZED #:= MPI_UNDEFINED int MPI_Type_get_envelope(MPI_Datatype, int*, int*, int*, int*) int MPI_Type_get_contents(MPI_Datatype, int, int, int, int[], MPI_Aint[], MPI_Datatype[]) int MPI_Type_get_name(MPI_Datatype, char[], int*) int MPI_Type_set_name(MPI_Datatype, char[]) int MPI_Type_get_attr(MPI_Datatype, int, void*, int*) int MPI_Type_set_attr(MPI_Datatype, int, void*) int MPI_Type_delete_attr(MPI_Datatype, int) ctypedef int MPI_Type_copy_attr_function(MPI_Datatype,int,void*,void*,void*,int*) ctypedef int MPI_Type_delete_attr_function(MPI_Datatype,int,void*,void*) MPI_Type_copy_attr_function* MPI_TYPE_NULL_COPY_FN #:= 0 MPI_Type_copy_attr_function* MPI_TYPE_DUP_FN #:= 0 MPI_Type_delete_attr_function* MPI_TYPE_NULL_DELETE_FN #:= 0 int MPI_Type_create_keyval(MPI_Type_copy_attr_function*, MPI_Type_delete_attr_function*, int*, void*) int MPI_Type_free_keyval(int*) #----------------------------------------------------------------- MPI_Status* MPI_STATUS_IGNORE #:= 0 MPI_Status* MPI_STATUSES_IGNORE #:= 0 int MPI_Get_count(MPI_Status*, MPI_Datatype, int*) int MPI_Get_elements(MPI_Status*, MPI_Datatype, int*) int MPI_Get_elements_x(MPI_Status*, MPI_Datatype, MPI_Count*) int MPI_Status_set_elements(MPI_Status*, MPI_Datatype, int) int MPI_Status_set_elements_x(MPI_Status*, MPI_Datatype, MPI_Count) int MPI_Test_cancelled(MPI_Status*, int*) int MPI_Status_set_cancelled(MPI_Status*, int) #----------------------------------------------------------------- MPI_Request MPI_REQUEST_NULL #:= 0 int MPI_Request_free(MPI_Request*) int MPI_Wait(MPI_Request*, MPI_Status*) int MPI_Test(MPI_Request*, int*, MPI_Status*) int MPI_Request_get_status(MPI_Request, int*, MPI_Status*) int MPI_Cancel(MPI_Request*) int MPI_Waitany(int, MPI_Request[], int*, MPI_Status*) int MPI_Testany(int, MPI_Request[], int*, int*, MPI_Status*) int MPI_Waitall(int, MPI_Request[], MPI_Status[]) int MPI_Testall(int, MPI_Request[], int*, MPI_Status[]) int MPI_Waitsome(int, MPI_Request[], int*, int[], MPI_Status[]) int MPI_Testsome(int, MPI_Request[], int*, int[], MPI_Status[]) int MPI_Start(MPI_Request*) int MPI_Startall(int, MPI_Request*) ctypedef int MPI_Grequest_cancel_function(void*,int) ctypedef int MPI_Grequest_free_function(void*) ctypedef int MPI_Grequest_query_function(void*,MPI_Status*) int MPI_Grequest_start(MPI_Grequest_query_function*, MPI_Grequest_free_function*, MPI_Grequest_cancel_function*, void*, MPI_Request*) int MPI_Grequest_complete(MPI_Request) #----------------------------------------------------------------- MPI_Op MPI_OP_NULL #:= 0 MPI_Op MPI_MAX #:= MPI_OP_NULL MPI_Op MPI_MIN #:= MPI_OP_NULL MPI_Op MPI_SUM #:= MPI_OP_NULL MPI_Op MPI_PROD #:= MPI_OP_NULL MPI_Op MPI_LAND #:= MPI_OP_NULL MPI_Op MPI_BAND #:= MPI_OP_NULL MPI_Op MPI_LOR #:= MPI_OP_NULL MPI_Op MPI_BOR #:= MPI_OP_NULL MPI_Op MPI_LXOR #:= MPI_OP_NULL MPI_Op MPI_BXOR #:= MPI_OP_NULL MPI_Op MPI_MAXLOC #:= MPI_OP_NULL MPI_Op MPI_MINLOC #:= MPI_OP_NULL MPI_Op MPI_REPLACE #:= MPI_OP_NULL MPI_Op MPI_NO_OP #:= MPI_OP_NULL int MPI_Op_free(MPI_Op*) ctypedef void MPI_User_function(void*,void*,int*,MPI_Datatype*) int MPI_Op_create(MPI_User_function*, int, MPI_Op*) int MPI_Op_commutative(MPI_Op, int*) #----------------------------------------------------------------- MPI_Info MPI_INFO_NULL #:= 0 MPI_Info MPI_INFO_ENV #:= MPI_INFO_NULL int MPI_Info_free(MPI_Info*) int MPI_Info_create(MPI_Info*) int MPI_Info_dup(MPI_Info, MPI_Info*) enum: MPI_MAX_INFO_KEY #:= 1 enum: MPI_MAX_INFO_VAL #:= 1 int MPI_Info_get(MPI_Info, char[], int, char[], int*) int MPI_Info_set(MPI_Info, char[], char[]) int MPI_Info_delete(MPI_Info, char[]) int MPI_Info_get_nkeys(MPI_Info, int*) int MPI_Info_get_nthkey(MPI_Info, int, char[]) int MPI_Info_get_valuelen(MPI_Info, char[], int*, int*) #----------------------------------------------------------------- MPI_Group MPI_GROUP_NULL #:= 0 MPI_Group MPI_GROUP_EMPTY #:= 1 int MPI_Group_free(MPI_Group*) int MPI_Group_size(MPI_Group, int*) int MPI_Group_rank(MPI_Group, int*) int MPI_Group_translate_ranks(MPI_Group, int, int[], MPI_Group, int[]) int MPI_Group_compare(MPI_Group, MPI_Group, int*) int MPI_Group_union(MPI_Group, MPI_Group, MPI_Group*) int MPI_Group_intersection(MPI_Group, MPI_Group, MPI_Group*) int MPI_Group_difference(MPI_Group, MPI_Group, MPI_Group*) int MPI_Group_incl(MPI_Group, int, int[], MPI_Group*) int MPI_Group_excl(MPI_Group, int, int[], MPI_Group*) int MPI_Group_range_incl(MPI_Group, int, int[][3], MPI_Group*) int MPI_Group_range_excl(MPI_Group, int, int[][3], MPI_Group*) #----------------------------------------------------------------- MPI_Comm MPI_COMM_NULL #:= 0 MPI_Comm MPI_COMM_SELF #:= MPI_COMM_NULL MPI_Comm MPI_COMM_WORLD #:= MPI_COMM_NULL int MPI_Comm_free(MPI_Comm*) int MPI_Comm_group(MPI_Comm, MPI_Group*) int MPI_Comm_size(MPI_Comm, int*) int MPI_Comm_rank(MPI_Comm, int*) int MPI_Comm_compare(MPI_Comm, MPI_Comm, int*) int MPI_Topo_test(MPI_Comm, int*) int MPI_Comm_test_inter(MPI_Comm, int*) int MPI_Abort(MPI_Comm, int) int MPI_Send(void*, int, MPI_Datatype, int, int, MPI_Comm) int MPI_Recv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status*) int MPI_Sendrecv(void*, int, MPI_Datatype,int, int, void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status*) int MPI_Sendrecv_replace(void*, int, MPI_Datatype, int, int, int, int, MPI_Comm, MPI_Status*) enum: MPI_BSEND_OVERHEAD #:= 0 int MPI_Buffer_attach(void*, int) int MPI_Buffer_detach(void*, int*) int MPI_Bsend(void*, int, MPI_Datatype, int, int, MPI_Comm) int MPI_Ssend(void*, int, MPI_Datatype, int, int, MPI_Comm) int MPI_Rsend(void*, int, MPI_Datatype, int, int, MPI_Comm) int MPI_Isend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request*) int MPI_Ibsend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request*) int MPI_Issend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request*) int MPI_Irsend(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request*) int MPI_Irecv(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request*) int MPI_Send_init(void*, int, MPI_Datatype, int, int, MPI_Comm, MPI_Request*) int MPI_Bsend_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request*) int MPI_Ssend_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request*) int MPI_Rsend_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request*) int MPI_Recv_init(void*, int, MPI_Datatype, int,int, MPI_Comm, MPI_Request*) int MPI_Probe(int, int, MPI_Comm, MPI_Status*) int MPI_Iprobe(int, int, MPI_Comm, int*, MPI_Status*) MPI_Message MPI_MESSAGE_NULL #:= 0 MPI_Message MPI_MESSAGE_NO_PROC #:= MPI_MESSAGE_NULL int MPI_Mprobe(int, int, MPI_Comm, MPI_Message*, MPI_Status*) int MPI_Improbe(int, int, MPI_Comm, int*, MPI_Message*, MPI_Status*) int MPI_Mrecv(void*, int, MPI_Datatype, MPI_Message*, MPI_Status*) int MPI_Imrecv(void*, int, MPI_Datatype, MPI_Message*, MPI_Request*) int MPI_Barrier(MPI_Comm) int MPI_Bcast(void*, int, MPI_Datatype, int, MPI_Comm) int MPI_Gather(void*, int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm) int MPI_Gatherv(void*, int, MPI_Datatype, void*, int[], int[], MPI_Datatype, int, MPI_Comm) int MPI_Scatter(void*, int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm) int MPI_Scatterv(void*, int[], int[], MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm) int MPI_Allgather(void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm) int MPI_Allgatherv(void*, int, MPI_Datatype, void*, int[], int[], MPI_Datatype, MPI_Comm) int MPI_Alltoall(void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm) int MPI_Alltoallv(void*, int[], int[], MPI_Datatype, void*, int[], int[], MPI_Datatype, MPI_Comm) int MPI_Alltoallw(void*, int[], int[], MPI_Datatype[], void*, int[], int[], MPI_Datatype[], MPI_Comm) int MPI_Reduce(void*, void*, int, MPI_Datatype, MPI_Op, int, MPI_Comm) int MPI_Allreduce(void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm) int MPI_Reduce_local(void*, void*, int, MPI_Datatype, MPI_Op) int MPI_Reduce_scatter_block(void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm) int MPI_Reduce_scatter(void*, void*, int[], MPI_Datatype, MPI_Op, MPI_Comm) int MPI_Scan(void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm) int MPI_Exscan(void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm) int MPI_Neighbor_allgather(void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm) int MPI_Neighbor_allgatherv(void*, int, MPI_Datatype, void*, int[], int[], MPI_Datatype, MPI_Comm) int MPI_Neighbor_alltoall(void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm) int MPI_Neighbor_alltoallv(void*, int[], int[],MPI_Datatype, void*, int[],int[], MPI_Datatype, MPI_Comm) int MPI_Neighbor_alltoallw(void*, int[], MPI_Aint[],MPI_Datatype[], void*, int[],MPI_Aint[], MPI_Datatype[], MPI_Comm) int MPI_Ibarrier(MPI_Comm, MPI_Request*) int MPI_Ibcast(void*, int, MPI_Datatype, int, MPI_Comm, MPI_Request*) int MPI_Igather(void*, int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm, MPI_Request*) int MPI_Igatherv(void*, int, MPI_Datatype, void*, int[], int[], MPI_Datatype, int, MPI_Comm, MPI_Request*) int MPI_Iscatter(void*, int, MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm, MPI_Request*) int MPI_Iscatterv(void*, int[], int[], MPI_Datatype, void*, int, MPI_Datatype, int, MPI_Comm, MPI_Request*) int MPI_Iallgather(void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm, MPI_Request*) int MPI_Iallgatherv(void*, int, MPI_Datatype, void*, int[], int[], MPI_Datatype, MPI_Comm, MPI_Request*) int MPI_Ialltoall(void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm, MPI_Request*) int MPI_Ialltoallv(void*, int[], int[], MPI_Datatype, void*, int[], int[], MPI_Datatype, MPI_Comm, MPI_Request*) int MPI_Ialltoallw(void*, int[], int[], MPI_Datatype[], void*, int[], int[], MPI_Datatype[], MPI_Comm, MPI_Request*) int MPI_Ireduce(void*, void*, int, MPI_Datatype, MPI_Op, int, MPI_Comm, MPI_Request*) int MPI_Iallreduce(void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Request*) int MPI_Ireduce_scatter_block(void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Request*) int MPI_Ireduce_scatter(void*, void*, int[], MPI_Datatype, MPI_Op, MPI_Comm, MPI_Request*) int MPI_Iscan(void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Request*) int MPI_Iexscan(void*, void*, int, MPI_Datatype, MPI_Op, MPI_Comm, MPI_Request*) int MPI_Ineighbor_allgather(void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm, MPI_Request*) int MPI_Ineighbor_allgatherv(void*, int, MPI_Datatype, void*, int[], int[], MPI_Datatype, MPI_Comm, MPI_Request*) int MPI_Ineighbor_alltoall(void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPI_Comm, MPI_Request*) int MPI_Ineighbor_alltoallv(void*, int[], int[],MPI_Datatype, void*, int[],int[], MPI_Datatype, MPI_Comm, MPI_Request*) int MPI_Ineighbor_alltoallw(void*, int[], MPI_Aint[],MPI_Datatype[], void*, int[],MPI_Aint[], MPI_Datatype[], MPI_Comm, MPI_Request*) int MPI_Comm_dup(MPI_Comm, MPI_Comm*) int MPI_Comm_dup_with_info(MPI_Comm, MPI_Info, MPI_Comm*) int MPI_Comm_idup(MPI_Comm, MPI_Comm*, MPI_Request*) int MPI_Comm_create(MPI_Comm, MPI_Group, MPI_Comm*) int MPI_Comm_create_group(MPI_Comm, MPI_Group, int, MPI_Comm*) int MPI_Comm_split(MPI_Comm, int, int, MPI_Comm*) enum: MPI_COMM_TYPE_SHARED #:= MPI_UNDEFINED int MPI_Comm_split_type(MPI_Comm, int, int, MPI_Info, MPI_Comm*) int MPI_Comm_set_info(MPI_Comm, MPI_Info) int MPI_Comm_get_info(MPI_Comm, MPI_Info*) enum: MPI_CART #:= MPI_UNDEFINED int MPI_Cart_create(MPI_Comm, int, int[], int[], int, MPI_Comm*) int MPI_Cartdim_get(MPI_Comm, int*) int MPI_Cart_get(MPI_Comm, int, int[], int[], int[]) int MPI_Cart_rank(MPI_Comm, int[], int*) int MPI_Cart_coords(MPI_Comm, int, int, int[]) int MPI_Cart_shift(MPI_Comm, int, int, int[], int[]) int MPI_Cart_sub(MPI_Comm, int[], MPI_Comm*) int MPI_Cart_map(MPI_Comm, int, int[], int[], int*) int MPI_Dims_create(int, int, int[]) enum: MPI_GRAPH #:= MPI_UNDEFINED int MPI_Graph_create(MPI_Comm, int, int[], int[], int, MPI_Comm*) int MPI_Graphdims_get(MPI_Comm, int*, int*) int MPI_Graph_get(MPI_Comm, int, int, int[], int[]) int MPI_Graph_map(MPI_Comm, int, int[], int[], int*) int MPI_Graph_neighbors_count(MPI_Comm, int, int*) int MPI_Graph_neighbors(MPI_Comm, int, int, int[]) enum: MPI_DIST_GRAPH #:= MPI_UNDEFINED int* MPI_UNWEIGHTED #:= 0 int* MPI_WEIGHTS_EMPTY #:= MPI_UNWEIGHTED int MPI_Dist_graph_create_adjacent(MPI_Comm, int, int[], int[], int, int[], int[], MPI_Info, int, MPI_Comm*) int MPI_Dist_graph_create(MPI_Comm, int, int[], int[], int[], int[], MPI_Info, int, MPI_Comm*) int MPI_Dist_graph_neighbors_count(MPI_Comm, int*, int*, int*) int MPI_Dist_graph_neighbors(MPI_Comm, int, int[], int[], int, int[], int[]) int MPI_Intercomm_create(MPI_Comm, int, MPI_Comm, int, int, MPI_Comm*) int MPI_Comm_remote_group(MPI_Comm, MPI_Group*) int MPI_Comm_remote_size(MPI_Comm, int*) int MPI_Intercomm_merge(MPI_Comm, int, MPI_Comm*) enum: MPI_MAX_PORT_NAME #:= 1 int MPI_Open_port(MPI_Info, char[]) int MPI_Close_port(char[]) int MPI_Publish_name(char[], MPI_Info, char[]) int MPI_Unpublish_name(char[], MPI_Info, char[]) int MPI_Lookup_name(char[], MPI_Info, char[]) int MPI_Comm_accept(char[], MPI_Info, int, MPI_Comm, MPI_Comm*) int MPI_Comm_connect(char[], MPI_Info, int, MPI_Comm, MPI_Comm*) int MPI_Comm_join(int, MPI_Comm*) int MPI_Comm_disconnect(MPI_Comm*) char** MPI_ARGV_NULL #:= 0 char*** MPI_ARGVS_NULL #:= 0 int* MPI_ERRCODES_IGNORE #:= 0 int MPI_Comm_spawn(char[], char*[], int, MPI_Info, int, MPI_Comm, MPI_Comm*, int[]) int MPI_Comm_spawn_multiple(int, char*[], char**[], int[], MPI_Info[], int, MPI_Comm, MPI_Comm*, int[]) int MPI_Comm_get_parent(MPI_Comm*) # Deprecated since MPI-2, removed in MPI-3 int MPI_Errhandler_get(MPI_Comm, MPI_Errhandler*) int MPI_Errhandler_set(MPI_Comm, MPI_Errhandler) ctypedef void MPI_Handler_function(MPI_Comm*,int*,...) int MPI_Errhandler_create(MPI_Handler_function*, MPI_Errhandler*) # Deprecated since MPI-2 int MPI_Attr_get(MPI_Comm, int, void*, int*) int MPI_Attr_put(MPI_Comm, int, void*) int MPI_Attr_delete(MPI_Comm, int) ctypedef int MPI_Copy_function(MPI_Comm,int,void*,void*,void*,int*) ctypedef int MPI_Delete_function(MPI_Comm,int,void*,void*) MPI_Copy_function* MPI_DUP_FN #:= 0 MPI_Copy_function* MPI_NULL_COPY_FN #:= 0 MPI_Delete_function* MPI_NULL_DELETE_FN #:= 0 int MPI_Keyval_create(MPI_Copy_function*, MPI_Delete_function*, int*, void*) int MPI_Keyval_free(int*) int MPI_Comm_get_errhandler(MPI_Comm, MPI_Errhandler*) #:= MPI_Errhandler_get int MPI_Comm_set_errhandler(MPI_Comm, MPI_Errhandler) #:= MPI_Errhandler_set ctypedef void MPI_Comm_errhandler_fn(MPI_Comm*,int*,...) #:= MPI_Handler_function ctypedef void MPI_Comm_errhandler_function(MPI_Comm*,int*,...) #:= MPI_Comm_errhandler_fn int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function*, MPI_Errhandler*) #:= MPI_Errhandler_create int MPI_Comm_call_errhandler(MPI_Comm, int) int MPI_Comm_get_name(MPI_Comm, char[], int*) int MPI_Comm_set_name(MPI_Comm, char[]) enum: MPI_TAG_UB #:= MPI_KEYVAL_INVALID enum: MPI_HOST #:= MPI_KEYVAL_INVALID enum: MPI_IO #:= MPI_KEYVAL_INVALID enum: MPI_WTIME_IS_GLOBAL #:= MPI_KEYVAL_INVALID enum: MPI_UNIVERSE_SIZE #:= MPI_KEYVAL_INVALID enum: MPI_APPNUM #:= MPI_KEYVAL_INVALID enum: MPI_LASTUSEDCODE #:= MPI_KEYVAL_INVALID int MPI_Comm_get_attr(MPI_Comm, int, void*, int*) #:= MPI_Attr_get int MPI_Comm_set_attr(MPI_Comm, int, void*) #:= MPI_Attr_put int MPI_Comm_delete_attr(MPI_Comm, int) #:= MPI_Attr_delete ctypedef int MPI_Comm_copy_attr_function(MPI_Comm,int,void*,void*,void*,int*) #:= MPI_Copy_function ctypedef int MPI_Comm_delete_attr_function(MPI_Comm,int,void*,void*) #:= MPI_Delete_function MPI_Comm_copy_attr_function* MPI_COMM_DUP_FN #:= MPI_DUP_FN MPI_Comm_copy_attr_function* MPI_COMM_NULL_COPY_FN #:= MPI_NULL_COPY_FN MPI_Comm_delete_attr_function* MPI_COMM_NULL_DELETE_FN #:= MPI_NULL_DELETE_FN int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function*, MPI_Comm_delete_attr_function*, int*, void*) #:= MPI_Keyval_create int MPI_Comm_free_keyval(int*) #:= MPI_Keyval_free #----------------------------------------------------------------- MPI_Win MPI_WIN_NULL #:= 0 int MPI_Win_free(MPI_Win*) int MPI_Win_create(void*, MPI_Aint, int, MPI_Info, MPI_Comm, MPI_Win*) int MPI_Win_allocate(MPI_Aint, int, MPI_Info, MPI_Comm, void*, MPI_Win*) int MPI_Win_allocate_shared(MPI_Aint, int, MPI_Info, MPI_Comm, void*, MPI_Win*) int MPI_Win_shared_query(MPI_Win, int, MPI_Aint*, int*, void*) int MPI_Win_create_dynamic(MPI_Info, MPI_Comm, MPI_Win*) int MPI_Win_attach(MPI_Win, void*, MPI_Aint) int MPI_Win_detach(MPI_Win, void*) int MPI_Win_set_info(MPI_Win, MPI_Info) int MPI_Win_get_info(MPI_Win, MPI_Info*) int MPI_Win_get_group(MPI_Win, MPI_Group*) int MPI_Get(void*, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Win) int MPI_Put(void*, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Win) int MPI_Accumulate(void*, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Op, MPI_Win) int MPI_Get_accumulate(void*, int, MPI_Datatype, void*, int,MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Op, MPI_Win) int MPI_Fetch_and_op(void*, void*, MPI_Datatype, int, MPI_Aint, MPI_Op, MPI_Win) int MPI_Compare_and_swap(void*, void*, void*, MPI_Datatype, int, MPI_Aint, MPI_Win) int MPI_Rget(void*, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Win, MPI_Request*) int MPI_Rput(void*, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Win, MPI_Request*) int MPI_Raccumulate(void*, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Op, MPI_Win, MPI_Request*) int MPI_Rget_accumulate(void*, int, MPI_Datatype, void*, int,MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Op, MPI_Win, MPI_Request*) enum: MPI_MODE_NOCHECK #:= MPI_UNDEFINED enum: MPI_MODE_NOSTORE #:= MPI_UNDEFINED enum: MPI_MODE_NOPUT #:= MPI_UNDEFINED enum: MPI_MODE_NOPRECEDE #:= MPI_UNDEFINED enum: MPI_MODE_NOSUCCEED #:= MPI_UNDEFINED int MPI_Win_fence(int, MPI_Win) int MPI_Win_post(MPI_Group, int, MPI_Win) int MPI_Win_start(MPI_Group, int, MPI_Win) int MPI_Win_complete(MPI_Win) int MPI_Win_wait(MPI_Win) int MPI_Win_test(MPI_Win, int*) enum: MPI_LOCK_EXCLUSIVE #:= MPI_UNDEFINED enum: MPI_LOCK_SHARED #:= MPI_UNDEFINED int MPI_Win_lock(int, int, int, MPI_Win) int MPI_Win_unlock(int, MPI_Win) int MPI_Win_lock_all(int, MPI_Win) int MPI_Win_unlock_all(MPI_Win) int MPI_Win_flush(int, MPI_Win) int MPI_Win_flush_all(MPI_Win) int MPI_Win_flush_local(int, MPI_Win) int MPI_Win_flush_local_all(MPI_Win) int MPI_Win_sync(MPI_Win) int MPI_Win_get_errhandler(MPI_Win, MPI_Errhandler*) int MPI_Win_set_errhandler(MPI_Win, MPI_Errhandler) ctypedef void MPI_Win_errhandler_fn(MPI_Win*,int*,...) ctypedef void MPI_Win_errhandler_function(MPI_Win*,int*,...) #:= MPI_Win_errhandler_fn int MPI_Win_create_errhandler(MPI_Win_errhandler_function*, MPI_Errhandler*) int MPI_Win_call_errhandler(MPI_Win, int) int MPI_Win_get_name(MPI_Win, char[], int*) int MPI_Win_set_name(MPI_Win, char[]) enum: MPI_WIN_BASE #:= MPI_KEYVAL_INVALID enum: MPI_WIN_SIZE #:= MPI_KEYVAL_INVALID enum: MPI_WIN_DISP_UNIT #:= MPI_KEYVAL_INVALID enum: MPI_WIN_CREATE_FLAVOR #:= MPI_KEYVAL_INVALID enum: MPI_WIN_MODEL #:= MPI_KEYVAL_INVALID enum: MPI_WIN_FLAVOR_CREATE #:= MPI_UNDEFINED enum: MPI_WIN_FLAVOR_ALLOCATE #:= MPI_UNDEFINED enum: MPI_WIN_FLAVOR_DYNAMIC #:= MPI_UNDEFINED enum: MPI_WIN_FLAVOR_SHARED #:= MPI_UNDEFINED enum: MPI_WIN_SEPARATE #:= MPI_UNDEFINED enum: MPI_WIN_UNIFIED #:= MPI_UNDEFINED int MPI_Win_get_attr(MPI_Win, int, void*, int*) int MPI_Win_set_attr(MPI_Win, int, void*) int MPI_Win_delete_attr(MPI_Win, int) ctypedef int MPI_Win_copy_attr_function(MPI_Win,int,void*,void*,void*,int*) ctypedef int MPI_Win_delete_attr_function(MPI_Win,int,void*,void*) MPI_Win_copy_attr_function* MPI_WIN_DUP_FN #:= 0 MPI_Win_copy_attr_function* MPI_WIN_NULL_COPY_FN #:= 0 MPI_Win_delete_attr_function* MPI_WIN_NULL_DELETE_FN #:= 0 int MPI_Win_create_keyval(MPI_Win_copy_attr_function*, MPI_Win_delete_attr_function*, int*, void*) int MPI_Win_free_keyval(int*) #----------------------------------------------------------------- MPI_File MPI_FILE_NULL #:= 0 enum: MPI_MODE_RDONLY #:= 1 enum: MPI_MODE_RDWR #:= 2 enum: MPI_MODE_WRONLY #:= 4 enum: MPI_MODE_CREATE #:= 8 enum: MPI_MODE_EXCL #:= 16 enum: MPI_MODE_DELETE_ON_CLOSE #:= 32 enum: MPI_MODE_UNIQUE_OPEN #:= 64 enum: MPI_MODE_APPEND #:= 128 enum: MPI_MODE_SEQUENTIAL #:= 256 int MPI_File_open(MPI_Comm, char[], int, MPI_Info, MPI_File*) int MPI_File_close(MPI_File*) int MPI_File_delete(char[], MPI_Info) int MPI_File_set_size(MPI_File, MPI_Offset) int MPI_File_preallocate(MPI_File, MPI_Offset) int MPI_File_get_size(MPI_File, MPI_Offset*) int MPI_File_get_group(MPI_File, MPI_Group*) int MPI_File_get_amode(MPI_File, int*) int MPI_File_set_info(MPI_File, MPI_Info) int MPI_File_get_info(MPI_File, MPI_Info*) int MPI_File_get_view(MPI_File, MPI_Offset*, MPI_Datatype*, MPI_Datatype*, char[]) int MPI_File_set_view(MPI_File, MPI_Offset, MPI_Datatype, MPI_Datatype, char[], MPI_Info) int MPI_File_read_at (MPI_File, MPI_Offset, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_read_at_all (MPI_File, MPI_Offset, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_write_at (MPI_File, MPI_Offset, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_write_at_all (MPI_File, MPI_Offset, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_iread_at (MPI_File, MPI_Offset, void*, int, MPI_Datatype, MPI_Request*) int MPI_File_iread_at_all (MPI_File, MPI_Offset, void*, int, MPI_Datatype, MPI_Request*) int MPI_File_iwrite_at (MPI_File, MPI_Offset, void*, int, MPI_Datatype, MPI_Request*) int MPI_File_iwrite_at_all(MPI_File, MPI_Offset, void*, int, MPI_Datatype, MPI_Request*) enum: MPI_SEEK_SET #:= 0 enum: MPI_SEEK_CUR #:= 1 enum: MPI_SEEK_END #:= 2 enum: MPI_DISPLACEMENT_CURRENT #:= 3 int MPI_File_seek(MPI_File, MPI_Offset, int) int MPI_File_get_position(MPI_File, MPI_Offset*) int MPI_File_get_byte_offset(MPI_File, MPI_Offset, MPI_Offset*) int MPI_File_read (MPI_File, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_read_all (MPI_File, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_write (MPI_File, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_write_all (MPI_File, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_iread (MPI_File, void*, int, MPI_Datatype, MPI_Request*) int MPI_File_iread_all (MPI_File, void*, int, MPI_Datatype, MPI_Request*) int MPI_File_iwrite (MPI_File, void*, int, MPI_Datatype, MPI_Request*) int MPI_File_iwrite_all(MPI_File, void*, int, MPI_Datatype, MPI_Request*) int MPI_File_read_shared (MPI_File, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_write_shared (MPI_File, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_iread_shared (MPI_File, void*, int, MPI_Datatype, MPI_Request*) int MPI_File_iwrite_shared (MPI_File, void*, int, MPI_Datatype, MPI_Request*) int MPI_File_read_ordered (MPI_File, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_write_ordered (MPI_File, void*, int, MPI_Datatype, MPI_Status*) int MPI_File_seek_shared(MPI_File, MPI_Offset, int) int MPI_File_get_position_shared(MPI_File, MPI_Offset*) int MPI_File_read_at_all_begin (MPI_File, MPI_Offset, void*, int, MPI_Datatype) int MPI_File_read_at_all_end (MPI_File, void*, MPI_Status*) int MPI_File_write_at_all_begin (MPI_File, MPI_Offset, void*, int, MPI_Datatype) int MPI_File_write_at_all_end (MPI_File, void*, MPI_Status*) int MPI_File_read_all_begin (MPI_File, void*, int, MPI_Datatype) int MPI_File_read_all_end (MPI_File, void*, MPI_Status*) int MPI_File_write_all_begin (MPI_File, void*, int, MPI_Datatype) int MPI_File_write_all_end (MPI_File, void*, MPI_Status*) int MPI_File_read_ordered_begin (MPI_File, void*, int, MPI_Datatype) int MPI_File_read_ordered_end (MPI_File, void*, MPI_Status*) int MPI_File_write_ordered_begin (MPI_File, void*, int, MPI_Datatype) int MPI_File_write_ordered_end (MPI_File, void*, MPI_Status*) int MPI_File_get_type_extent(MPI_File, MPI_Datatype, MPI_Aint*) int MPI_File_set_atomicity(MPI_File, int) int MPI_File_get_atomicity(MPI_File, int*) int MPI_File_sync(MPI_File) int MPI_File_get_errhandler(MPI_File, MPI_Errhandler*) int MPI_File_set_errhandler(MPI_File, MPI_Errhandler) ctypedef void MPI_File_errhandler_fn(MPI_File*,int*,...) ctypedef void MPI_File_errhandler_function(MPI_File*,int*,...) #:= MPI_File_errhandler_fn int MPI_File_create_errhandler(MPI_File_errhandler_function*, MPI_Errhandler*) int MPI_File_call_errhandler(MPI_File, int) ctypedef int MPI_Datarep_conversion_function(void*,MPI_Datatype,int,void*,MPI_Offset,void*) ctypedef int MPI_Datarep_extent_function(MPI_Datatype,MPI_Aint*,void*) MPI_Datarep_conversion_function* MPI_CONVERSION_FN_NULL #:= 0 enum: MPI_MAX_DATAREP_STRING #:= 1 int MPI_Register_datarep(char[], MPI_Datarep_conversion_function*, MPI_Datarep_conversion_function*, MPI_Datarep_extent_function*, void*) #----------------------------------------------------------------- MPI_Errhandler MPI_ERRHANDLER_NULL #:= 0 MPI_Errhandler MPI_ERRORS_RETURN #:= MPI_ERRHANDLER_NULL MPI_Errhandler MPI_ERRORS_ARE_FATAL #:= MPI_ERRHANDLER_NULL int MPI_Errhandler_free(MPI_Errhandler*) #----------------------------------------------------------------- enum: MPI_MAX_ERROR_STRING #:= 1 int MPI_Error_class(int, int*) int MPI_Error_string(int, char[], int*) int MPI_Add_error_class(int*) int MPI_Add_error_code(int,int*) int MPI_Add_error_string(int,char[]) # MPI-1 Error classes # ------------------- # Actually no errors enum: MPI_SUCCESS #:= 0 enum: MPI_ERR_LASTCODE #:= 1 # MPI-1 Objects enum: MPI_ERR_COMM #:= MPI_ERR_LASTCODE enum: MPI_ERR_GROUP #:= MPI_ERR_LASTCODE enum: MPI_ERR_TYPE #:= MPI_ERR_LASTCODE enum: MPI_ERR_REQUEST #:= MPI_ERR_LASTCODE enum: MPI_ERR_OP #:= MPI_ERR_LASTCODE # Communication argument parameters enum: MPI_ERR_BUFFER #:= MPI_ERR_LASTCODE enum: MPI_ERR_COUNT #:= MPI_ERR_LASTCODE enum: MPI_ERR_TAG #:= MPI_ERR_LASTCODE enum: MPI_ERR_RANK #:= MPI_ERR_LASTCODE enum: MPI_ERR_ROOT #:= MPI_ERR_LASTCODE enum: MPI_ERR_TRUNCATE #:= MPI_ERR_LASTCODE # Multiple completion enum: MPI_ERR_IN_STATUS #:= MPI_ERR_LASTCODE enum: MPI_ERR_PENDING #:= MPI_ERR_LASTCODE # Topology argument parameters enum: MPI_ERR_TOPOLOGY #:= MPI_ERR_LASTCODE enum: MPI_ERR_DIMS #:= MPI_ERR_LASTCODE # All other arguments, this is a class with many kinds enum: MPI_ERR_ARG #:= MPI_ERR_LASTCODE # Other errors that are not simply an invalid argument enum: MPI_ERR_OTHER #:= MPI_ERR_LASTCODE enum: MPI_ERR_UNKNOWN #:= MPI_ERR_LASTCODE enum: MPI_ERR_INTERN #:= MPI_ERR_LASTCODE # MPI-2 Error classes # ------------------- # Attributes enum: MPI_ERR_KEYVAL #:= MPI_ERR_ARG # Memory Allocation enum: MPI_ERR_NO_MEM #:= MPI_ERR_UNKNOWN # Info Object enum: MPI_ERR_INFO #:= MPI_ERR_ARG enum: MPI_ERR_INFO_KEY #:= MPI_ERR_UNKNOWN enum: MPI_ERR_INFO_VALUE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_INFO_NOKEY #:= MPI_ERR_UNKNOWN # Dynamic Process Management enum: MPI_ERR_SPAWN #:= MPI_ERR_UNKNOWN enum: MPI_ERR_PORT #:= MPI_ERR_UNKNOWN enum: MPI_ERR_SERVICE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_NAME #:= MPI_ERR_UNKNOWN # Input/Ouput enum: MPI_ERR_FILE #:= MPI_ERR_ARG enum: MPI_ERR_NOT_SAME #:= MPI_ERR_UNKNOWN enum: MPI_ERR_BAD_FILE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_NO_SUCH_FILE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_FILE_EXISTS #:= MPI_ERR_UNKNOWN enum: MPI_ERR_FILE_IN_USE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_AMODE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_ACCESS #:= MPI_ERR_UNKNOWN enum: MPI_ERR_READ_ONLY #:= MPI_ERR_UNKNOWN enum: MPI_ERR_NO_SPACE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_QUOTA #:= MPI_ERR_UNKNOWN enum: MPI_ERR_UNSUPPORTED_DATAREP #:= MPI_ERR_UNKNOWN enum: MPI_ERR_UNSUPPORTED_OPERATION #:= MPI_ERR_UNKNOWN enum: MPI_ERR_CONVERSION #:= MPI_ERR_UNKNOWN enum: MPI_ERR_DUP_DATAREP #:= MPI_ERR_UNKNOWN enum: MPI_ERR_IO #:= MPI_ERR_UNKNOWN # One-Sided Communications enum: MPI_ERR_WIN #:= MPI_ERR_ARG enum: MPI_ERR_BASE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_SIZE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_DISP #:= MPI_ERR_UNKNOWN enum: MPI_ERR_ASSERT #:= MPI_ERR_UNKNOWN enum: MPI_ERR_LOCKTYPE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_RMA_CONFLICT #:= MPI_ERR_UNKNOWN enum: MPI_ERR_RMA_SYNC #:= MPI_ERR_UNKNOWN enum: MPI_ERR_RMA_RANGE #:= MPI_ERR_UNKNOWN enum: MPI_ERR_RMA_ATTACH #:= MPI_ERR_UNKNOWN enum: MPI_ERR_RMA_SHARED #:= MPI_ERR_UNKNOWN enum: MPI_ERR_RMA_FLAVOR #:= MPI_ERR_UNKNOWN #----------------------------------------------------------------- int MPI_Alloc_mem(MPI_Aint, MPI_Info, void*) int MPI_Free_mem(void*) #----------------------------------------------------------------- int MPI_Init(int*, char**[]) int MPI_Finalize() int MPI_Initialized(int*) int MPI_Finalized(int*) enum: MPI_THREAD_SINGLE #:= 0 enum: MPI_THREAD_FUNNELED #:= 1 enum: MPI_THREAD_SERIALIZED #:= 2 enum: MPI_THREAD_MULTIPLE #:= 3 int MPI_Init_thread(int*, char**[], int, int*) int MPI_Query_thread(int*) int MPI_Is_thread_main(int*) #----------------------------------------------------------------- enum: MPI_VERSION #:= 1 enum: MPI_SUBVERSION #:= 0 int MPI_Get_version(int*, int*) enum: MPI_MAX_LIBRARY_VERSION_STRING #:= 1 int MPI_Get_library_version(char[], int*) enum: MPI_MAX_PROCESSOR_NAME #:= 1 int MPI_Get_processor_name(char[], int*) #----------------------------------------------------------------- double MPI_Wtime() double MPI_Wtick() int MPI_Pcontrol(int, ...) #----------------------------------------------------------------- # Fortran INTEGER ctypedef int MPI_Fint MPI_Fint* MPI_F_STATUS_IGNORE #:= 0 MPI_Fint* MPI_F_STATUSES_IGNORE #:= 0 int MPI_Status_c2f (MPI_Status*, MPI_Fint*) int MPI_Status_f2c (MPI_Fint*, MPI_Status*) # C -> Fortran MPI_Fint MPI_Type_c2f (MPI_Datatype) MPI_Fint MPI_Request_c2f (MPI_Request) MPI_Fint MPI_Message_c2f (MPI_Message) MPI_Fint MPI_Op_c2f (MPI_Op) MPI_Fint MPI_Info_c2f (MPI_Info) MPI_Fint MPI_Group_c2f (MPI_Group) MPI_Fint MPI_Comm_c2f (MPI_Comm) MPI_Fint MPI_Win_c2f (MPI_Win) MPI_Fint MPI_File_c2f (MPI_File) MPI_Fint MPI_Errhandler_c2f (MPI_Errhandler) # Fortran -> C MPI_Datatype MPI_Type_f2c (MPI_Fint) MPI_Request MPI_Request_f2c (MPI_Fint) MPI_Message MPI_Message_f2c (MPI_Fint) MPI_Op MPI_Op_f2c (MPI_Fint) MPI_Info MPI_Info_f2c (MPI_Fint) MPI_Group MPI_Group_f2c (MPI_Fint) MPI_Comm MPI_Comm_f2c (MPI_Fint) MPI_Win MPI_Win_f2c (MPI_Fint) MPI_File MPI_File_f2c (MPI_Fint) MPI_Errhandler MPI_Errhandler_f2c (MPI_Fint) #----------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/0000775000175000017500000000000013560002767016443 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/src/mpi4py/MPI/asbuffer.pxi0000664000175000017500000003015713426006675020773 0ustar dalcinldalcinl00000000000000#------------------------------------------------------------------------------ cdef extern from "Python.h": int PyIndex_Check(object) int PySlice_Check(object) int PySlice_GetIndicesEx(object, Py_ssize_t, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *) except -1 Py_ssize_t PyNumber_AsSsize_t(object, object) except -1 #------------------------------------------------------------------------------ # Python 3 buffer interface (PEP 3118) cdef extern from "Python.h": ctypedef struct Py_buffer: PyObject *obj void *buf Py_ssize_t len Py_ssize_t itemsize bint readonly char *format #int ndim #Py_ssize_t *shape #Py_ssize_t *strides #Py_ssize_t *suboffsets cdef enum: PyBUF_SIMPLE PyBUF_WRITABLE PyBUF_FORMAT PyBUF_ND PyBUF_STRIDES PyBUF_ANY_CONTIGUOUS int PyObject_CheckBuffer(object) int PyObject_GetBuffer(object, Py_buffer *, int) except -1 void PyBuffer_Release(Py_buffer *) int PyBuffer_FillInfo(Py_buffer *, object, void *, Py_ssize_t, bint, int) except -1 # Python 2 buffer interface (legacy) cdef extern from *: int _Py2_IsBuffer(object) int _Py2_AsBuffer(object, int, void **, Py_ssize_t *) except -1 cdef extern from "Python.h": object PyLong_FromVoidPtr(void*) void* PyLong_AsVoidPtr(object) cdef extern from *: void *emptybuffer '((void*)"")' cdef char BYTE_FMT[2] BYTE_FMT[0] = c'B' BYTE_FMT[1] = 0 #------------------------------------------------------------------------------ cdef extern from *: char* PyByteArray_AsString(object) except NULL Py_ssize_t PyByteArray_Size(object) except -1 cdef type array_array cdef type numpy_array cdef int pypy_have_numpy = 0 if PYPY: from array import array as array_array try: from _numpypy.multiarray import ndarray as numpy_array pypy_have_numpy = 1 except ImportError: try: from numpypy import ndarray as numpy_array pypy_have_numpy = 1 except ImportError: try: from numpy import ndarray as numpy_array pypy_have_numpy = 1 except ImportError: pass cdef int PyPy_GetBuffer(object obj, Py_buffer *view, int flags) except -1: cdef object addr cdef void *buf = NULL cdef Py_ssize_t size = 0 cdef bint readonly = 0 try: if not isinstance(obj, bytes): if PyObject_CheckBuffer(obj): return PyObject_GetBuffer(obj, view, flags) except SystemError: pass except TypeError: pass if isinstance(obj, bytes): buf = PyBytes_AsString(obj) size = PyBytes_Size(obj) readonly = 1 elif isinstance(obj, bytearray): buf = PyByteArray_AsString(obj) size = PyByteArray_Size(obj) readonly = 0 elif isinstance(obj, array_array): addr, size = obj.buffer_info() buf = PyLong_AsVoidPtr(addr) size *= obj.itemsize readonly = 0 elif pypy_have_numpy and isinstance(obj, numpy_array): addr, readonly = obj.__array_interface__['data'] buf = PyLong_AsVoidPtr(addr) size = obj.nbytes else: readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE _Py2_AsBuffer(obj, readonly, &buf, &size) if buf == NULL and size == 0: buf = emptybuffer PyBuffer_FillInfo(view, obj, buf, size, readonly, flags) if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT return 0 #------------------------------------------------------------------------------ cdef int Py27_GetBuffer(object obj, Py_buffer *view, int flags) except -1: # Python 3 buffer interface (PEP 3118) if PyObject_CheckBuffer(obj): return PyObject_GetBuffer(obj, view, flags) # Python 2 buffer interface (legacy) view.readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE _Py2_AsBuffer(obj, view.readonly, &view.buf, &view.len) if view.buf == NULL and view.len == 0: view.buf = emptybuffer PyBuffer_FillInfo(view, obj, view.buf, view.len, view.readonly, flags) if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT return 0 #------------------------------------------------------------------------------ cdef int PyMPI_GetBuffer(object obj, Py_buffer *view, int flags) except -1: if PYPY: return PyPy_GetBuffer(obj, view, flags) if PY2: return Py27_GetBuffer(obj, view, flags) return PyObject_GetBuffer(obj, view, flags) #------------------------------------------------------------------------------ @cython.final cdef class memory: """ Memory """ cdef Py_buffer view def __cinit__(self): PyBuffer_FillInfo(&self.view, NULL, NULL, 0, 0, PyBUF_SIMPLE) def __dealloc__(self): PyBuffer_Release(&self.view) @staticmethod def frombuffer(obj, bint readonly=False): """Memory from buffer-like object""" cdef int flags = PyBUF_SIMPLE if not readonly: flags |= PyBUF_WRITABLE cdef memory mem = memory.__new__(memory) PyMPI_GetBuffer(obj, &mem.view, flags) mem.view.readonly = readonly return mem @staticmethod def fromaddress(address, nbytes, bint readonly=False): """Memory from address and size in bytes""" cdef void *buf = PyLong_AsVoidPtr(address) cdef Py_ssize_t size = nbytes if size < 0: raise ValueError("expecting non-negative buffer length") elif size > 0 and buf == NULL: raise ValueError("expecting non-NULL address") cdef memory mem = memory.__new__(memory) PyBuffer_FillInfo(&mem.view, NULL, buf, size, readonly, PyBUF_SIMPLE) return mem # properties property address: """Memory address""" def __get__(self): return PyLong_FromVoidPtr(self.view.buf) property nbytes: """Memory size (in bytes)""" def __get__(self): return self.view.len property readonly: """Boolean indicating whether the memory is read-only""" def __get__(self): return self.view.readonly # convenience methods def tobytes(self): """Return the data in the buffer as a byte string""" return PyBytes_FromStringAndSize(self.view.buf, self.view.len) def release(self): """Release the underlying buffer exposed by the memory object""" PyBuffer_Release(&self.view) PyBuffer_FillInfo(&self.view, NULL, NULL, 0, 0, PyBUF_SIMPLE) # buffer interface (PEP 3118) def __getbuffer__(self, Py_buffer *view, int flags): if view.obj == Py_None: Py_CLEAR(view.obj) PyBuffer_FillInfo(view, self, self.view.buf, self.view.len, self.view.readonly, flags) # buffer interface (legacy) def __getsegcount__(self, Py_ssize_t *lenp): if lenp != NULL: lenp[0] = self.view.len return 1 def __getreadbuffer__(self, Py_ssize_t idx, void **p): if idx != 0: raise SystemError("accessing non-existent buffer segment") p[0] = self.view.buf return self.view.len def __getwritebuffer__(self, Py_ssize_t idx, void **p): if self.view.readonly: raise TypeError("memory buffer is read-only") if idx != 0: raise SystemError("accessing non-existent buffer segment") p[0] = self.view.buf return self.view.len # sequence interface (basic) def __len__(self): return self.view.len def __getitem__(self, object item): cdef Py_ssize_t start=0, stop=0, step=1, slen=0 cdef unsigned char *buf = self.view.buf cdef Py_ssize_t blen = self.view.len if PyIndex_Check(item): start = PyNumber_AsSsize_t(item, IndexError) if start < 0: start += blen if start < 0 or start >= blen: raise IndexError("index out of range") return buf[start] elif PySlice_Check(item): PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) if step != 1: raise IndexError("slice with step not supported") return asbuffer(self, buf+start, slen, self.view.readonly) else: raise TypeError("index must be integer or slice") def __setitem__(self, object item, object value): if self.view.readonly: raise TypeError("memory buffer is read-only") cdef Py_ssize_t start=0, stop=0, step=1, slen=0 cdef unsigned char *buf = self.view.buf cdef Py_ssize_t blen = self.view.len cdef memory inmem if PyIndex_Check(item): start = PyNumber_AsSsize_t(item, IndexError) if start < 0: start += blen if start < 0 or start >= blen: raise IndexError("index out of range") buf[start] = value elif PySlice_Check(item): PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) if step != 1: raise IndexError("slice with step not supported") if PyIndex_Check(value): memset(buf+start, value, slen) else: inmem = getbuffer(value, 1, 0) if inmem.view.len != slen: raise ValueError("slice length does not match buffer") memmove(buf+start, inmem.view.buf, slen) else: raise TypeError("index must be integer or slice") #------------------------------------------------------------------------------ cdef inline memory newbuffer(): return memory.__new__(memory) cdef inline memory getbuffer(object ob, bint readonly, bint format): cdef memory buf = newbuffer() cdef int flags = PyBUF_ANY_CONTIGUOUS if not readonly: flags |= PyBUF_WRITABLE if format: flags |= PyBUF_FORMAT PyMPI_GetBuffer(ob, &buf.view, flags) return buf cdef inline object getformat(memory buf): cdef Py_buffer *view = &buf.view # if view.obj == NULL: if view.format != NULL: return pystr(view.format) else: return "B" elif view.format != NULL: # XXX this is a hack if view.format != BYTE_FMT: return pystr(view.format) # cdef object ob = view.obj cdef object format = None try: # numpy.ndarray format = ob.dtype.char except (AttributeError, TypeError): try: # array.array format = ob.typecode except (AttributeError, TypeError): if view.format != NULL: format = pystr(view.format) return format cdef inline memory getbuffer_r(object ob, void **base, MPI_Aint *size): cdef memory buf = getbuffer(ob, 1, 0) if base != NULL: base[0] = buf.view.buf if size != NULL: size[0] = buf.view.len return buf cdef inline memory getbuffer_w(object ob, void **base, MPI_Aint *size): cdef memory buf = getbuffer(ob, 0, 0) if base != NULL: base[0] = buf.view.buf if size != NULL: size[0] = buf.view.len return buf cdef inline memory asbuffer(object ob, void *base, MPI_Aint size, bint ro): cdef memory buf = newbuffer() PyBuffer_FillInfo(&buf.view, ob, base, size, ro, PyBUF_SIMPLE) return buf #------------------------------------------------------------------------------ cdef inline memory asmemory(object ob, void **base, MPI_Aint *size): cdef memory mem if type(ob) is memory: mem = ob else: mem = getbuffer(ob, 1, 0) if base != NULL: base[0] = mem.view.buf if size != NULL: size[0] = mem.view.len return mem cdef inline memory tomemory(void *base, MPI_Aint size): cdef memory mem = memory.__new__(memory) PyBuffer_FillInfo(&mem.view, NULL, base, size, 0, PyBUF_SIMPLE) return mem #------------------------------------------------------------------------------ mpi4py-3.0.3/src/mpi4py/MPI/asarray.pxi0000644000175000017500000001135413200562156020623 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- ctypedef fused integral_t: int MPI_Aint cdef inline object newarray(int n, integral_t **p): return allocate(n, sizeof(integral_t), p) cdef inline object getarray(object ob, int *n, integral_t **p): cdef Py_ssize_t olen = len(ob) cdef integral_t *base = NULL cdef int i = 0, size = downcast(olen) cdef object mem = newarray(size, &base) for i from 0 <= i < size: base[i] = ob[i] n[0] = size p[0] = base return mem cdef inline object chkarray(object ob, int n, integral_t **p): cdef int size = 0 cdef object mem = getarray(ob, &size, p) if n != size: raise ValueError( "expecting %d items, got %d" % (n, size)) return mem # ----------------------------------------------------------------------------- cdef inline object asarray_Datatype(object sequence, int size, MPI_Datatype **p): cdef int i = 0 cdef MPI_Datatype *array = NULL if size != len(sequence): raise ValueError( "expecting %d items, got %d" % (size, len(sequence))) cdef object ob = allocate(size, sizeof(MPI_Datatype), &array) for i from 0 <= i < size: array[i] = (sequence[i]).ob_mpi p[0] = array return ob cdef inline object asarray_Info(object sequence, int size, MPI_Info **p): cdef int i = 0 cdef MPI_Info *array = NULL cdef MPI_Info info = MPI_INFO_NULL cdef object ob if sequence is None or isinstance(sequence, Info): if sequence is not None: info = (sequence).ob_mpi ob = allocate(size, sizeof(MPI_Info), &array) for i from 0 <= i < size: array[i] = info else: if size != len(sequence): raise ValueError( "expecting %d items, got %d" % (size, len(sequence))) ob = allocate(size, sizeof(MPI_Datatype), &array) for i from 0 <= i < size: array[i] = (sequence[i]).ob_mpi p[0] = array return ob # ----------------------------------------------------------------------------- cdef inline int is_string(object obj): return (isinstance(obj, str) or isinstance(obj, bytes) or isinstance(obj, unicode)) cdef inline object asstring(object ob, char *s[]): cdef Py_ssize_t n = 0 cdef char *p = NULL, *q = NULL ob = asmpistr(ob, &p) PyBytes_AsStringAndSize(ob, &p, &n) cdef object mem = allocate(n+1, sizeof(char), &q) memcpy(q, p, n) q[n] = 0; s[0] = q; return mem cdef inline object asarray_str(object sequence, char ***p): cdef char** array = NULL cdef Py_ssize_t i = 0, size = len(sequence) cdef object ob = allocate(size+1, sizeof(char*), &array) for i from 0 <= i < size: sequence[i] = asstring(sequence[i], &array[i]) array[size] = NULL p[0] = array return (sequence, ob) cdef inline object asarray_argv(object sequence, char ***p): if sequence is None: p[0] = MPI_ARGV_NULL return None if is_string(sequence): sequence = [sequence] else: sequence = list(sequence) return asarray_str(sequence, p) cdef inline object asarray_cmds(object sequence, int *count, char ***p): if is_string(sequence): raise ValueError("expecting a sequence of strings") sequence = list(sequence) count[0] = len(sequence) return asarray_str(sequence, p) cdef inline object asarray_argvs(object sequence, int size, char ****p): if sequence is None: p[0] = MPI_ARGVS_NULL return None if is_string(sequence): sequence = [sequence] * size else: sequence = list(sequence) if size != len(sequence): raise ValueError( "expecting %d items, got %d" % (size, len(sequence))) cdef int i = 0 cdef char*** array = NULL cdef object ob = allocate(size+1, sizeof(char**), &array) cdef object argv for i from 0 <= i < size: argv = sequence[i] if argv is None: argv = [] sequence[i] = asarray_argv(argv, &array[i]) array[size] = NULL p[0] = array return (sequence, ob) cdef inline object asarray_nprocs(object sequence, int size, int **p): cdef object ob cdef int *array = NULL cdef int i = 0, value = 1 if sequence is None or is_integral(sequence): if sequence is not None: value = sequence ob = newarray(size, &array) for i from 0 <= i < size: array[i] = value else: ob = chkarray(sequence, size, &array) p[0] = array return ob # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/Comm.pyx0000644000175000017500000023011013200562156020065 0ustar dalcinldalcinl00000000000000# Communicator Comparisons # ------------------------ IDENT = MPI_IDENT #: Groups are identical, contexts are the same CONGRUENT = MPI_CONGRUENT #: Groups are identical, contexts are different SIMILAR = MPI_SIMILAR #: Groups are similar, rank order differs UNEQUAL = MPI_UNEQUAL #: Groups are different # Communicator Topologies # ----------------------- CART = MPI_CART #: Cartesian topology GRAPH = MPI_GRAPH #: General graph topology DIST_GRAPH = MPI_DIST_GRAPH #: Distributed graph topology # Graph Communicator Weights # -------------------------- UNWEIGHTED = __UNWEIGHTED__ #: Unweighted graph WEIGHTS_EMPTY = __WEIGHTS_EMPTY__ #: Empty graph weights # Communicator Split Type # ----------------------- COMM_TYPE_SHARED = MPI_COMM_TYPE_SHARED cdef class Comm: """ Communicator """ def __cinit__(self, Comm comm=None): self.ob_mpi = MPI_COMM_NULL if comm is None: return self.ob_mpi = comm.ob_mpi def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_Comm(&self.ob_mpi) ) def __richcmp__(self, other, int op): if not isinstance(other, Comm): return NotImplemented cdef Comm s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_COMM_NULL # Group # ----- def Get_group(self): """ Access the group associated with a communicator """ cdef Group group = Group.__new__(Group) with nogil: CHKERR( MPI_Comm_group(self.ob_mpi, &group.ob_mpi) ) return group property group: """communicator group""" def __get__(self): return self.Get_group() # Communicator Accessors # ---------------------- def Get_size(self): """ Return the number of processes in a communicator """ cdef int size = -1 CHKERR( MPI_Comm_size(self.ob_mpi, &size) ) return size property size: """number of processes in communicator""" def __get__(self): return self.Get_size() def Get_rank(self): """ Return the rank of this process in a communicator """ cdef int rank = MPI_PROC_NULL CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) return rank property rank: """rank of this process in communicator""" def __get__(self): return self.Get_rank() @classmethod def Compare(cls, Comm comm1, Comm comm2): """ Compare two communicators """ cdef int flag = MPI_UNEQUAL with nogil: CHKERR( MPI_Comm_compare( comm1.ob_mpi, comm2.ob_mpi, &flag) ) return flag # Communicator Constructors # ------------------------- def Clone(self): """ Clone an existing communicator """ cdef type comm_type = type(self) cdef Comm comm = comm_type.__new__(comm_type) with nogil: CHKERR( MPI_Comm_dup(self.ob_mpi, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Dup(self, Info info=None): """ Duplicate an existing communicator """ cdef MPI_Info cinfo = arg_Info(info) cdef type comm_type = type(self) cdef Comm comm = comm_type.__new__(comm_type) if info is None: with nogil: CHKERR( MPI_Comm_dup( self.ob_mpi, &comm.ob_mpi) ) else: with nogil: CHKERR( MPI_Comm_dup_with_info( self.ob_mpi, cinfo, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Dup_with_info(self, Info info): """ Duplicate an existing communicator """ cdef type comm_type = type(self) cdef Comm comm = comm_type.__new__(comm_type) with nogil: CHKERR( MPI_Comm_dup_with_info( self.ob_mpi, info.ob_mpi, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Idup(self): """ Nonblocking duplicate an existing communicator """ cdef type comm_type = type(self) cdef Comm comm = comm_type.__new__(comm_type) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Comm_idup( self.ob_mpi, &comm.ob_mpi, &request.ob_mpi) ) comm_set_eh(comm.ob_mpi) return (comm, request) def Create(self, Group group): """ Create communicator from group """ cdef type comm_type = Comm if isinstance(self, Intracomm): comm_type = Intracomm elif isinstance(self, Intercomm): comm_type = Intercomm cdef Comm comm = comm_type.__new__(comm_type) with nogil: CHKERR( MPI_Comm_create( self.ob_mpi, group.ob_mpi, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Create_group(self, Group group, int tag=0): """ Create communicator from group """ cdef type comm_type = Comm if isinstance(self, Intracomm): comm_type = Intracomm elif isinstance(self, Intercomm): comm_type = Intercomm cdef Comm comm = comm_type.__new__(comm_type) with nogil: CHKERR( MPI_Comm_create_group( self.ob_mpi, group.ob_mpi, tag, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Split(self, int color=0, int key=0): """ Split communicator by color and key """ cdef type comm_type = Comm if isinstance(self, Intracomm): comm_type = Intracomm elif isinstance(self, Intercomm): comm_type = Intercomm cdef Comm comm = comm_type.__new__(comm_type) with nogil: CHKERR( MPI_Comm_split( self.ob_mpi, color, key, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Split_type(self, int split_type, int key=0, Info info=INFO_NULL): """ Split communicator by color and key """ cdef type comm_type = Comm if isinstance(self, Intracomm): comm_type = Intracomm elif isinstance(self, Intercomm): comm_type = Intercomm cdef Comm comm = comm_type.__new__(comm_type) with nogil: CHKERR( MPI_Comm_split_type( self.ob_mpi, split_type, key, info.ob_mpi, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm # Communicator Destructor # ----------------------- def Free(self): """ Free a communicator """ with nogil: CHKERR( MPI_Comm_free(&self.ob_mpi) ) if self is __COMM_SELF__: self.ob_mpi = MPI_COMM_SELF if self is __COMM_WORLD__: self.ob_mpi = MPI_COMM_WORLD # Communicator Info # ----------------- def Set_info(self, Info info): """ Set new values for the hints associated with a communicator """ with nogil: CHKERR( MPI_Comm_set_info( self.ob_mpi, info.ob_mpi) ) def Get_info(self): """ Return the hints for a communicator that are currently in use """ cdef Info info = Info.__new__(Info) with nogil: CHKERR( MPI_Comm_get_info( self.ob_mpi, &info.ob_mpi) ) return info property info: """communicator info""" def __get__(self): return self.Get_info() def __set__(self, info): self.Set_info(info) # Point to Point communication # ---------------------------- # Blocking Send and Receive Operations # ------------------------------------ def Send(self, buf, int dest, int tag=0): """ Blocking send .. note:: This function may block until the message is received. Whether or not `Send` blocks depends on several factors and is implementation dependent """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) with nogil: CHKERR( MPI_Send( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi) ) def Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """ Blocking receive .. note:: This function blocks until the message is received """ cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Recv( rmsg.buf, rmsg.count, rmsg.dtype, source, tag, self.ob_mpi, statusp) ) # Send-Receive # ------------ def Sendrecv(self, sendbuf, int dest, int sendtag=0, recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None): """ Send and receive a message .. note:: This function is guaranteed not to deadlock in situations where pairs of blocking sends and receives may deadlock. .. caution:: A common mistake when using this function is to mismatch the tags with the source and destination ranks, which can result in deadlock. """ cdef _p_msg_p2p smsg = message_p2p_send(sendbuf, dest) cdef _p_msg_p2p rmsg = message_p2p_recv(recvbuf, source) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Sendrecv( smsg.buf, smsg.count, smsg.dtype, dest, sendtag, rmsg.buf, rmsg.count, rmsg.dtype, source, recvtag, self.ob_mpi, statusp) ) def Sendrecv_replace(self, buf, int dest, int sendtag=0, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None): """ Send and receive a message .. note:: This function is guaranteed not to deadlock in situations where pairs of blocking sends and receives may deadlock. .. caution:: A common mistake when using this function is to mismatch the tags with the source and destination ranks, which can result in deadlock. """ cdef int rank = MPI_PROC_NULL if dest != MPI_PROC_NULL: rank = dest if source != MPI_PROC_NULL: rank = source cdef _p_msg_p2p rmsg = message_p2p_recv(buf, rank) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Sendrecv_replace( rmsg.buf, rmsg.count, rmsg.dtype, dest, sendtag, source, recvtag, self.ob_mpi, statusp) ) # Nonblocking Communications # -------------------------- def Isend(self, buf, int dest, int tag=0): """ Nonblocking send """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Isend( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = smsg return request def Irecv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): """ Nonblocking receive """ cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Irecv( rmsg.buf, rmsg.count, rmsg.dtype, source, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = rmsg return request # Probe # ----- def Probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """ Blocking test for a message .. note:: This function blocks until the message arrives. """ cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Probe( source, tag, self.ob_mpi, statusp) ) return True def Iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """ Nonblocking test for a message """ cdef int flag = 0 cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Iprobe( source, tag, self.ob_mpi, &flag, statusp) ) return flag # Matching Probe # -------------- def Mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """ Blocking test for a matched message """ cdef MPI_Message cmessage = MPI_MESSAGE_NULL cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Mprobe( source, tag, self.ob_mpi, &cmessage, statusp) ) cdef Message message = Message.__new__(Message) message.ob_mpi = cmessage return message def Improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """ Nonblocking test for a matched message """ cdef int flag = 0 cdef MPI_Message cmessage = MPI_MESSAGE_NULL cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Improbe( source, tag, self.ob_mpi, &flag, &cmessage, statusp) ) if flag == 0: return None cdef Message message = Message.__new__(Message) message.ob_mpi = cmessage return message # Persistent Communication # ------------------------ def Send_init(self, buf, int dest, int tag=0): """ Create a persistent request for a standard send """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) cdef Prequest request = Prequest.__new__(Prequest) with nogil: CHKERR( MPI_Send_init( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = smsg return request def Recv_init(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): """ Create a persistent request for a receive """ cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) cdef Prequest request = Prequest.__new__(Prequest) with nogil: CHKERR( MPI_Recv_init( rmsg.buf, rmsg.count, rmsg.dtype, source, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = rmsg return request # Communication Modes # ------------------- # Blocking calls def Bsend(self, buf, int dest, int tag=0): """ Blocking send in buffered mode """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) with nogil: CHKERR( MPI_Bsend( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi) ) def Ssend(self, buf, int dest, int tag=0): """ Blocking send in synchronous mode """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) with nogil: CHKERR( MPI_Ssend( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi) ) def Rsend(self, buf, int dest, int tag=0): """ Blocking send in ready mode """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) with nogil: CHKERR( MPI_Rsend( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi) ) # Nonblocking calls def Ibsend(self, buf, int dest, int tag=0): """ Nonblocking send in buffered mode """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ibsend( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = smsg return request def Issend(self, buf, int dest, int tag=0): """ Nonblocking send in synchronous mode """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Issend( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = smsg return request def Irsend(self, buf, int dest, int tag=0): """ Nonblocking send in ready mode """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Irsend( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = smsg return request # Persistent Requests def Bsend_init(self, buf, int dest, int tag=0): """ Persistent request for a send in buffered mode """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) cdef Prequest request = Prequest.__new__(Prequest) with nogil: CHKERR( MPI_Bsend_init( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = smsg return request def Ssend_init(self, buf, int dest, int tag=0): """ Persistent request for a send in synchronous mode """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) cdef Prequest request = Prequest.__new__(Prequest) with nogil: CHKERR( MPI_Ssend_init( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = smsg return request def Rsend_init(self, buf, int dest, int tag=0): """ Persistent request for a send in ready mode """ cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) cdef Prequest request = Prequest.__new__(Prequest) with nogil: CHKERR( MPI_Rsend_init( smsg.buf, smsg.count, smsg.dtype, dest, tag, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = smsg return request # Collective Communications # ------------------------- # Barrier Synchronization # ----------------------- def Barrier(self): """ Barrier synchronization """ with nogil: CHKERR( MPI_Barrier(self.ob_mpi) ) # Global Communication Functions # ------------------------------ def Bcast(self, buf, int root=0): """ Broadcast a message from one process to all other processes in a group """ cdef _p_msg_cco m = message_cco() m.for_bcast(buf, root, self.ob_mpi) with nogil: CHKERR( MPI_Bcast( m.sbuf, m.scount, m.stype, root, self.ob_mpi) ) def Gather(self, sendbuf, recvbuf, int root=0): """ Gather together values from a group of processes """ cdef _p_msg_cco m = message_cco() m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) with nogil: CHKERR( MPI_Gather( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, root, self.ob_mpi) ) def Gatherv(self, sendbuf, recvbuf, int root=0): """ Gather Vector, gather data to one process from all other processes in a group providing different amount of data and displacements at the receiving sides """ cdef _p_msg_cco m = message_cco() m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) with nogil: CHKERR( MPI_Gatherv( m.sbuf, m.scount, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, root, self.ob_mpi) ) def Scatter(self, sendbuf, recvbuf, int root=0): """ Scatter data from one process to all other processes in a group """ cdef _p_msg_cco m = message_cco() m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) with nogil: CHKERR( MPI_Scatter( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, root, self.ob_mpi) ) def Scatterv(self, sendbuf, recvbuf, int root=0): """ Scatter Vector, scatter data from one process to all other processes in a group providing different amount of data and displacements at the sending side """ cdef _p_msg_cco m = message_cco() m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) with nogil: CHKERR( MPI_Scatterv( m.sbuf, m.scounts, m.sdispls, m.stype, m.rbuf, m.rcount, m.rtype, root, self.ob_mpi) ) def Allgather(self, sendbuf, recvbuf): """ Gather to All, gather data from all processes and distribute it to all other processes in a group """ cdef _p_msg_cco m = message_cco() m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Allgather( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, self.ob_mpi) ) def Allgatherv(self, sendbuf, recvbuf): """ Gather to All Vector, gather data from all processes and distribute it to all other processes in a group providing different amount of data and displacements """ cdef _p_msg_cco m = message_cco() m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Allgatherv( m.sbuf, m.scount, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, self.ob_mpi) ) def Alltoall(self, sendbuf, recvbuf): """ All to All Scatter/Gather, send data from all to all processes in a group """ cdef _p_msg_cco m = message_cco() m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Alltoall( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, self.ob_mpi) ) def Alltoallv(self, sendbuf, recvbuf): """ All to All Scatter/Gather Vector, send data from all to all processes in a group providing different amount of data and displacements """ cdef _p_msg_cco m = message_cco() m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Alltoallv( m.sbuf, m.scounts, m.sdispls, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, self.ob_mpi) ) def Alltoallw(self, sendbuf, recvbuf): """ Generalized All-to-All communication allowing different counts, displacements and datatypes for each partner """ cdef _p_msg_ccow m = message_ccow() m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Alltoallw( m.sbuf, m.scounts, m.sdispls, m.stypes, m.rbuf, m.rcounts, m.rdispls, m.rtypes, self.ob_mpi) ) # Global Reduction Operations # --------------------------- def Reduce(self, sendbuf, recvbuf, Op op=SUM, int root=0): """ Reduce """ cdef _p_msg_cco m = message_cco() m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) with nogil: CHKERR( MPI_Reduce( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, root, self.ob_mpi) ) def Allreduce(self, sendbuf, recvbuf, Op op=SUM): """ All Reduce """ cdef _p_msg_cco m = message_cco() m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Allreduce( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, self.ob_mpi) ) def Reduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): """ Reduce-Scatter Block (regular, non-vector version) """ cdef _p_msg_cco m = message_cco() m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Reduce_scatter_block( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, self.ob_mpi) ) def Reduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): """ Reduce-Scatter (vector version) """ cdef _p_msg_cco m = message_cco() m.for_reduce_scatter(sendbuf, recvbuf, recvcounts, self.ob_mpi) with nogil: CHKERR( MPI_Reduce_scatter( m.sbuf, m.rbuf, m.rcounts, m.rtype, op.ob_mpi, self.ob_mpi) ) # Nonblocking Collectives # ----------------------- def Ibarrier(self): """ Nonblocking Barrier """ cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ibarrier(self.ob_mpi, &request.ob_mpi) ) return request def Ibcast(self, buf, int root=0): """ Nonblocking Broadcast """ cdef _p_msg_cco m = message_cco() m.for_bcast(buf, root, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ibcast( m.sbuf, m.scount, m.stype, root, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Igather(self, sendbuf, recvbuf, int root=0): """ Nonblocking Gather """ cdef _p_msg_cco m = message_cco() m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Igather( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, root, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Igatherv(self, sendbuf, recvbuf, int root=0): """ Nonblocking Gather Vector """ cdef _p_msg_cco m = message_cco() m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Igatherv( m.sbuf, m.scount, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, root, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Iscatter(self, sendbuf, recvbuf, int root=0): """ Nonblocking Scatter """ cdef _p_msg_cco m = message_cco() m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Iscatter( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, root, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Iscatterv(self, sendbuf, recvbuf, int root=0): """ Nonblocking Scatter Vector """ cdef _p_msg_cco m = message_cco() m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Iscatterv( m.sbuf, m.scounts, m.sdispls, m.stype, m.rbuf, m.rcount, m.rtype, root, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Iallgather(self, sendbuf, recvbuf): """ Nonblocking Gather to All """ cdef _p_msg_cco m = message_cco() m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Iallgather( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Iallgatherv(self, sendbuf, recvbuf): """ Nonblocking Gather to All Vector """ cdef _p_msg_cco m = message_cco() m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Iallgatherv( m.sbuf, m.scount, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, self.ob_mpi, &request.ob_mpi) ) return request def Ialltoall(self, sendbuf, recvbuf): """ Nonblocking All to All Scatter/Gather """ cdef _p_msg_cco m = message_cco() m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ialltoall( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Ialltoallv(self, sendbuf, recvbuf): """ Nonblocking All to All Scatter/Gather Vector """ cdef _p_msg_cco m = message_cco() m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ialltoallv( m.sbuf, m.scounts, m.sdispls, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Ialltoallw(self, sendbuf, recvbuf): """ Nonblocking Generalized All-to-All """ cdef _p_msg_ccow m = message_ccow() m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ialltoallw( m.sbuf, m.scounts, m.sdispls, m.stypes, m.rbuf, m.rcounts, m.rdispls, m.rtypes, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Ireduce(self, sendbuf, recvbuf, Op op=SUM, int root=0): """ Nonblocking Reduce """ cdef _p_msg_cco m = message_cco() m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ireduce( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, root, self.ob_mpi, &request.ob_mpi) ) return request def Iallreduce(self, sendbuf, recvbuf, Op op=SUM): """ Nonblocking All Reduce """ cdef _p_msg_cco m = message_cco() m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Iallreduce( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) return request def Ireduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): """ Nonblocking Reduce-Scatter Block (regular, non-vector version) """ cdef _p_msg_cco m = message_cco() m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ireduce_scatter_block( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) return request def Ireduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): """ Nonblocking Reduce-Scatter (vector version) """ cdef _p_msg_cco m = message_cco() m.for_reduce_scatter(sendbuf, recvbuf, recvcounts, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ireduce_scatter( m.sbuf, m.rbuf, m.rcounts, m.rtype, op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) return request # Tests # ----- def Is_inter(self): """ Test to see if a comm is an intercommunicator """ cdef int flag = 0 CHKERR( MPI_Comm_test_inter(self.ob_mpi, &flag) ) return flag property is_inter: """is intercommunicator""" def __get__(self): return self.Is_inter() def Is_intra(self): """ Test to see if a comm is an intracommunicator """ return not self.Is_inter() property is_intra: """is intracommunicator""" def __get__(self): return self.Is_intra() def Get_topology(self): """ Determine the type of topology (if any) associated with a communicator """ cdef int topo = MPI_UNDEFINED CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) return topo property topology: """communicator topology type""" def __get__(self): return self.Get_topology() property is_topo: """is a topology communicator""" def __get__(self): return self.Get_topology() != MPI_UNDEFINED # Process Creation and Management # ------------------------------- @classmethod def Get_parent(cls): """ Return the parent intercommunicator for this process """ cdef Intercomm comm = __COMM_PARENT__ with nogil: CHKERR( MPI_Comm_get_parent(&comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Disconnect(self): """ Disconnect from a communicator """ with nogil: CHKERR( MPI_Comm_disconnect(&self.ob_mpi) ) @classmethod def Join(cls, int fd): """ Create a intercommunicator by joining two processes connected by a socket """ cdef Intercomm comm = Intercomm.__new__(Intercomm) with nogil: CHKERR( MPI_Comm_join(fd, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm # Attributes # ---------- def Get_attr(self, int keyval): """ Retrieve attribute value by key """ cdef void *attrval = NULL cdef int flag = 0 CHKERR( MPI_Comm_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) if not flag: return None if attrval == NULL: return 0 # MPI-1 predefined attribute keyvals if (keyval == MPI_TAG_UB or keyval == MPI_HOST or keyval == MPI_IO or keyval == MPI_WTIME_IS_GLOBAL): return (attrval)[0] # MPI-2 predefined attribute keyvals elif (keyval == MPI_UNIVERSE_SIZE or keyval == MPI_APPNUM or keyval == MPI_LASTUSEDCODE): return (attrval)[0] # user-defined attribute keyval return PyMPI_attr_get(self.ob_mpi, keyval, attrval) def Set_attr(self, int keyval, object attrval): """ Store attribute value associated with a key """ PyMPI_attr_set(self.ob_mpi, keyval, attrval) def Delete_attr(self, int keyval): """ Delete attribute value associated with a key """ CHKERR( MPI_Comm_delete_attr(self.ob_mpi, keyval) ) @classmethod def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): """ Create a new attribute key for communicators """ cdef object state = _p_keyval(copy_fn, delete_fn, nopython) cdef int keyval = MPI_KEYVAL_INVALID cdef MPI_Comm_copy_attr_function *_copy = PyMPI_attr_copy_fn cdef MPI_Comm_delete_attr_function *_del = PyMPI_attr_delete_fn cdef void *extra_state = state CHKERR( MPI_Comm_create_keyval(_copy, _del, &keyval, extra_state) ) comm_keyval[keyval] = state return keyval @classmethod def Free_keyval(cls, int keyval): """ Free and attribute key for communicators """ cdef int keyval_save = keyval CHKERR( MPI_Comm_free_keyval(&keyval) ) try: del comm_keyval[keyval_save] except KeyError: pass return keyval # Error handling # -------------- def Get_errhandler(self): """ Get the error handler for a communicator """ cdef Errhandler errhandler = Errhandler.__new__(Errhandler) CHKERR( MPI_Comm_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) return errhandler def Set_errhandler(self, Errhandler errhandler): """ Set the error handler for a communicator """ CHKERR( MPI_Comm_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) def Call_errhandler(self, int errorcode): """ Call the error handler installed on a communicator """ CHKERR( MPI_Comm_call_errhandler(self.ob_mpi, errorcode) ) def Abort(self, int errorcode=0): """ Terminate MPI execution environment .. warning:: This is a direct call, use it with care!!!. """ CHKERR( MPI_Abort(self.ob_mpi, errorcode) ) # Naming Objects # -------------- def Get_name(self): """ Get the print name for this communicator """ cdef char name[MPI_MAX_OBJECT_NAME+1] cdef int nlen = 0 CHKERR( MPI_Comm_get_name(self.ob_mpi, name, &nlen) ) return tompistr(name, nlen) def Set_name(self, name): """ Set the print name for this communicator """ cdef char *cname = NULL name = asmpistr(name, &cname) CHKERR( MPI_Comm_set_name(self.ob_mpi, cname) ) property name: """communicator name""" def __get__(self): return self.Get_name() def __set__(self, value): self.Set_name(value) # Fortran Handle # -------------- def py2f(self): """ """ return MPI_Comm_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef MPI_Comm comm = MPI_Comm_f2c(arg) return PyMPIComm_New(comm) # Python Communication # -------------------- # def send(self, obj, int dest, int tag=0): """Send""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_send(obj, dest, tag, comm) # def bsend(self, obj, int dest, int tag=0): """Send in buffered mode""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_bsend(obj, dest, tag, comm) # def ssend(self, obj, int dest, int tag=0): """Send in synchronous mode""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_ssend(obj, dest, tag, comm) # def recv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """Receive""" cdef MPI_Comm comm = self.ob_mpi cdef MPI_Status *statusp = arg_Status(status) return PyMPI_recv(buf, source, tag, comm, statusp) # def sendrecv(self, sendobj, int dest, int sendtag=0, recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None): """Send and Receive""" cdef MPI_Comm comm = self.ob_mpi cdef MPI_Status *statusp = arg_Status(status) return PyMPI_sendrecv(sendobj, dest, sendtag, recvbuf, source, recvtag, comm, statusp) # def isend(self, obj, int dest, int tag=0): """Nonblocking send""" cdef MPI_Comm comm = self.ob_mpi cdef Request request = Request.__new__(Request) request.ob_buf = PyMPI_isend(obj, dest, tag, comm, &request.ob_mpi) return request # def ibsend(self, obj, int dest, int tag=0): """Nonblocking send in buffered mode""" cdef MPI_Comm comm = self.ob_mpi cdef Request request = Request.__new__(Request) request.ob_buf = PyMPI_ibsend(obj, dest, tag, comm, &request.ob_mpi) return request # def issend(self, obj, int dest, int tag=0): """Nonblocking send in synchronous mode""" cdef MPI_Comm comm = self.ob_mpi cdef Request request = Request.__new__(Request) request.ob_buf = PyMPI_issend(obj, dest, tag, comm, &request.ob_mpi) return request # def irecv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG): """Nonblocking receive""" cdef MPI_Comm comm = self.ob_mpi cdef Request request = Request.__new__(Request) request.ob_buf = PyMPI_irecv(buf, source, tag, comm, &request.ob_mpi) return request # def probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """Blocking test for a message""" cdef MPI_Comm comm = self.ob_mpi cdef MPI_Status *statusp = arg_Status(status) return PyMPI_probe(source, tag, comm, statusp) # def iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """Nonblocking test for a message""" cdef MPI_Comm comm = self.ob_mpi cdef MPI_Status *statusp = arg_Status(status) return PyMPI_iprobe(source, tag, comm, statusp) # def mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """Blocking test for a matched message""" cdef MPI_Comm comm = self.ob_mpi cdef MPI_Status *statusp = arg_Status(status) cdef Message message = Message.__new__(Message) message.ob_buf = PyMPI_mprobe(source, tag, comm, &message.ob_mpi, statusp) return message # def improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """Nonblocking test for a matched message""" cdef int flag = 0 cdef MPI_Comm comm = self.ob_mpi cdef MPI_Status *statusp = arg_Status(status) cdef Message message = Message.__new__(Message) message.ob_buf = PyMPI_improbe(source, tag, comm, &flag, &message.ob_mpi, statusp) if flag == 0: return None return message # def barrier(self): """Barrier""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_barrier(comm) # def bcast(self, obj, int root=0): """Broadcast""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_bcast(obj, root, comm) # def gather(self, sendobj, int root=0): """Gather""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_gather(sendobj, root, comm) # def scatter(self, sendobj, int root=0): """Scatter""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_scatter(sendobj, root, comm) # def allgather(self, sendobj): """Gather to All""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_allgather(sendobj, comm) # def alltoall(self, sendobj): """All to All Scatter/Gather""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_alltoall(sendobj, comm) # def reduce(self, sendobj, op=SUM, int root=0): """Reduce""" if op is None: op = SUM cdef MPI_Comm comm = self.ob_mpi return PyMPI_reduce(sendobj, op, root, comm) # def allreduce(self, sendobj, op=SUM): """Reduce to All""" if op is None: op = SUM cdef MPI_Comm comm = self.ob_mpi return PyMPI_allreduce(sendobj, op, comm) cdef class Intracomm(Comm): """ Intracommunicator """ def __cinit__(self, Comm comm=None): if self.ob_mpi == MPI_COMM_NULL: return cdef int inter = 1 CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) if inter: raise TypeError( "expecting an intracommunicator") # Communicator Constructors # ------------------------- def Create_cart(self, dims, periods=None, bint reorder=False): """ Create cartesian communicator """ cdef int ndims = 0, *idims = NULL, *iperiods = NULL dims = getarray(dims, &ndims, &idims) if periods is None: periods = False if isinstance(periods, bool): periods = [periods] * ndims periods = chkarray(periods, ndims, &iperiods) # cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) with nogil: CHKERR( MPI_Cart_create( self.ob_mpi, ndims, idims, iperiods, reorder, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Create_graph(self, index, edges, bint reorder=False): """ Create graph communicator """ cdef int nnodes = 0, *iindex = NULL index = getarray(index, &nnodes, &iindex) cdef int nedges = 0, *iedges = NULL edges = getarray(edges, &nedges, &iedges) # extension: 'standard' adjacency arrays if iindex[0]==0 and iindex[nnodes-1]==nedges: nnodes -= 1; iindex += 1; # cdef Graphcomm comm = Graphcomm.__new__(Graphcomm) with nogil: CHKERR( MPI_Graph_create( self.ob_mpi, nnodes, iindex, iedges, reorder, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Create_dist_graph_adjacent(self, sources, destinations, sourceweights=None, destweights=None, Info info=INFO_NULL, bint reorder=False): """ Create distributed graph communicator """ cdef int indegree = 0, *isource = NULL cdef int outdegree = 0, *idest = NULL cdef int *isourceweight = MPI_UNWEIGHTED cdef int *idestweight = MPI_UNWEIGHTED if sources is not None: sources = getarray(sources, &indegree, &isource) sourceweights = asarray_weights( sourceweights, indegree, &isourceweight) if destinations is not None: destinations = getarray(destinations, &outdegree, &idest) destweights = asarray_weights( destweights, outdegree, &idestweight) # cdef Distgraphcomm comm = \ Distgraphcomm.__new__(Distgraphcomm) with nogil: CHKERR( MPI_Dist_graph_create_adjacent( self.ob_mpi, indegree, isource, isourceweight, outdegree, idest, idestweight, info.ob_mpi, reorder, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Create_dist_graph(self, sources, degrees, destinations, weights=None, Info info=INFO_NULL, bint reorder=False): """ Create distributed graph communicator """ cdef int nv = 0, ne = 0, i = 0 cdef int *isource = NULL, *idegree = NULL, cdef int *idest = NULL, *iweight = MPI_UNWEIGHTED sources = getarray(sources, &nv, &isource) degrees = chkarray(degrees, nv, &idegree) for i from 0 <= i < nv: ne += idegree[i] destinations = chkarray(destinations, ne, &idest) weights = asarray_weights(weights, ne, &iweight) # cdef Distgraphcomm comm = \ Distgraphcomm.__new__(Distgraphcomm) with nogil: CHKERR( MPI_Dist_graph_create( self.ob_mpi, nv, isource, idegree, idest, iweight, info.ob_mpi, reorder, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm def Create_intercomm(self, int local_leader, Intracomm peer_comm, int remote_leader, int tag=0): """ Create intercommunicator """ cdef Intercomm comm = Intercomm.__new__(Intercomm) with nogil: CHKERR( MPI_Intercomm_create( self.ob_mpi, local_leader, peer_comm.ob_mpi, remote_leader, tag, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm # Low-Level Topology Functions # ---------------------------- def Cart_map(self, dims, periods=None): """ Return an optimal placement for the calling process on the physical machine """ cdef int ndims = 0, *idims = NULL, *iperiods = NULL dims = getarray(dims, &ndims, &idims) if periods is None: periods = False if isinstance(periods, bool): periods = [periods] * ndims periods = chkarray(periods, ndims, &iperiods) cdef int rank = MPI_PROC_NULL CHKERR( MPI_Cart_map(self.ob_mpi, ndims, idims, iperiods, &rank) ) return rank def Graph_map(self, index, edges): """ Return an optimal placement for the calling process on the physical machine """ cdef int nnodes = 0, *iindex = NULL index = getarray(index, &nnodes, &iindex) cdef int nedges = 0, *iedges = NULL edges = getarray(edges, &nedges, &iedges) # extension: accept more 'standard' adjacency arrays if iindex[0]==0 and iindex[nnodes-1]==nedges: nnodes -= 1; iindex += 1; cdef int rank = MPI_PROC_NULL CHKERR( MPI_Graph_map(self.ob_mpi, nnodes, iindex, iedges, &rank) ) return rank # Global Reduction Operations # --------------------------- # Inclusive Scan def Scan(self, sendbuf, recvbuf, Op op=SUM): """ Inclusive Scan """ cdef _p_msg_cco m = message_cco() m.for_scan(sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Scan( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, self.ob_mpi) ) # Exclusive Scan def Exscan(self, sendbuf, recvbuf, Op op=SUM): """ Exclusive Scan """ cdef _p_msg_cco m = message_cco() m.for_exscan(sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Exscan( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, self.ob_mpi) ) # Nonblocking def Iscan(self, sendbuf, recvbuf, Op op=SUM): """ Inclusive Scan """ cdef _p_msg_cco m = message_cco() m.for_scan(sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Iscan( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) return request def Iexscan(self, sendbuf, recvbuf, Op op=SUM): """ Inclusive Scan """ cdef _p_msg_cco m = message_cco() m.for_exscan(sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Iexscan( m.sbuf, m.rbuf, m.rcount, m.rtype, op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) return request # Python Communication # def scan(self, sendobj, op=SUM): """Inclusive Scan""" if op is None: op = SUM cdef MPI_Comm comm = self.ob_mpi return PyMPI_scan(sendobj, op, comm) # def exscan(self, sendobj, op=SUM): """Exclusive Scan""" if op is None: op = SUM cdef MPI_Comm comm = self.ob_mpi return PyMPI_exscan(sendobj, op, comm) # Establishing Communication # -------------------------- # Starting Processes def Spawn(self, command, args=None, int maxprocs=1, Info info=INFO_NULL, int root=0, errcodes=None): """ Spawn instances of a single MPI application """ cdef char *cmd = NULL cdef char **argv = MPI_ARGV_NULL cdef int *ierrcodes = MPI_ERRCODES_IGNORE # cdef int rank = MPI_UNDEFINED CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) cdef tmp1, tmp2, tmp3 if root == rank: tmp1 = asmpistr(command, &cmd) tmp2 = asarray_argv(args, &argv) if errcodes is not None: tmp3 = newarray(maxprocs, &ierrcodes) # cdef Intercomm comm = Intercomm.__new__(Intercomm) with nogil: CHKERR( MPI_Comm_spawn( cmd, argv, maxprocs, info.ob_mpi, root, self.ob_mpi, &comm.ob_mpi, ierrcodes) ) # cdef int i=0 if errcodes is not None: errcodes[:] = [ierrcodes[i] for i from 0 <= i < maxprocs] # comm_set_eh(comm.ob_mpi) return comm def Spawn_multiple(self, command, args=None, maxprocs=None, info=INFO_NULL, int root=0, errcodes=None): """ Spawn instances of multiple MPI applications """ cdef int count = 0 cdef char **cmds = NULL cdef char ***argvs = MPI_ARGVS_NULL cdef MPI_Info *infos = NULL cdef int *imaxprocs = NULL cdef int *ierrcodes = MPI_ERRCODES_IGNORE # cdef int rank = MPI_UNDEFINED CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) cdef tmp1, tmp2, tmp3, tmp4, tmp5 if root == rank: tmp1 = asarray_cmds(command, &count, &cmds) tmp2 = asarray_argvs(args, count, &argvs) tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) tmp4 = asarray_Info(info, count, &infos) cdef int i=0, np=0 if errcodes is not None: if root != rank: count = len(maxprocs) tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) for i from 0 <= i < count: np += imaxprocs[i] tmp5 = newarray(np, &ierrcodes) # cdef Intercomm comm = Intercomm.__new__(Intercomm) with nogil: CHKERR( MPI_Comm_spawn_multiple( count, cmds, argvs, imaxprocs, infos, root, self.ob_mpi, &comm.ob_mpi, ierrcodes) ) # cdef int j=0, p=0, q=0 if errcodes is not None: errcodes[:] = [[] for j from 0 <= j < count] for i from 0 <= i < count: q = p + imaxprocs[i] errcodes[i][:] = [ierrcodes[j] for j from p <= j < q] p = q # comm_set_eh(comm.ob_mpi) return comm # Server Routines def Accept(self, port_name, Info info=INFO_NULL, int root=0): """ Accept a request to form a new intercommunicator """ cdef char *cportname = NULL cdef int rank = MPI_UNDEFINED CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) if root == rank: port_name = asmpistr(port_name, &cportname) cdef Intercomm comm = Intercomm.__new__(Intercomm) with nogil: CHKERR( MPI_Comm_accept( cportname, info.ob_mpi, root, self.ob_mpi, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm # Client Routines def Connect(self, port_name, Info info=INFO_NULL, int root=0): """ Make a request to form a new intercommunicator """ cdef char *cportname = NULL cdef int rank = MPI_UNDEFINED CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) if root == rank: port_name = asmpistr(port_name, &cportname) cdef Intercomm comm = Intercomm.__new__(Intercomm) with nogil: CHKERR( MPI_Comm_connect( cportname, info.ob_mpi, root, self.ob_mpi, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm cdef class Topocomm(Intracomm): """ Topology intracommunicator """ def __cinit__(self, Comm comm=None): if self.ob_mpi == MPI_COMM_NULL: return cdef int topo = MPI_UNDEFINED CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) if topo == MPI_UNDEFINED: raise TypeError( "expecting a topology communicator") property degrees: "number of incoming and outgoing neighbors" def __get__(self): cdef object dim, rank cdef object nneighbors if isinstance(self, Cartcomm): dim = self.Get_dim() return (2*dim, 2*dim) if isinstance(self, Graphcomm): rank = self.Get_rank() nneighbors = self.Get_neighbors_count(rank) return (nneighbors, nneighbors) if isinstance(self, Distgraphcomm): nneighbors = self.Get_dist_neighbors_count()[:2] return nneighbors raise TypeError("Not a topology communicator") property indegree: "number of incoming neighbors" def __get__(self): return self.degrees[0] property outdegree: "number of outgoing neighbors" def __get__(self): return self.degrees[1] property inoutedges: "incoming and outgoing neighbors" def __get__(self): cdef object direction, source, dest, rank cdef object neighbors if isinstance(self, Cartcomm): neighbors = [] for direction in range(self.Get_dim()): source, dest = self.Shift(direction, 1) neighbors.append(source) neighbors.append(dest) return (neighbors, neighbors) if isinstance(self, Graphcomm): rank = self.Get_rank() neighbors = self.Get_neighbors(rank) return (neighbors, neighbors) if isinstance(self, Distgraphcomm): neighbors = self.Get_dist_neighbors()[:2] return neighbors raise TypeError("Not a topology communicator") property inedges: "incoming neighbors" def __get__(self): return self.inoutedges[0] property outedges: "outgoing neighbors" def __get__(self): return self.inoutedges[1] # Neighborhood Collectives # ------------------------ def Neighbor_allgather(self, sendbuf, recvbuf): """ Neighbor Gather to All """ cdef _p_msg_cco m = message_cco() m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Neighbor_allgather( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, self.ob_mpi) ) def Neighbor_allgatherv(self, sendbuf, recvbuf): """ Neighbor Gather to All Vector """ cdef _p_msg_cco m = message_cco() m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Neighbor_allgatherv( m.sbuf, m.scount, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, self.ob_mpi) ) def Neighbor_alltoall(self, sendbuf, recvbuf): """ Neighbor All-to-All """ cdef _p_msg_cco m = message_cco() m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Neighbor_alltoall( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, self.ob_mpi) ) def Neighbor_alltoallv(self, sendbuf, recvbuf): """ Neighbor All-to-All Vector """ cdef _p_msg_cco m = message_cco() m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Neighbor_alltoallv( m.sbuf, m.scounts, m.sdispls, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, self.ob_mpi) ) def Neighbor_alltoallw(self, sendbuf, recvbuf): """ Neighbor All-to-All Generalized """ cdef _p_msg_ccow m = message_ccow() m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) with nogil: CHKERR( MPI_Neighbor_alltoallw( m.sbuf, m.scounts, m.sdisplsA, m.stypes, m.rbuf, m.rcounts, m.rdisplsA, m.rtypes, self.ob_mpi) ) # Nonblocking Neighborhood Collectives # ------------------------------------ def Ineighbor_allgather(self, sendbuf, recvbuf): """ Nonblocking Neighbor Gather to All """ cdef _p_msg_cco m = message_cco() m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ineighbor_allgather( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Ineighbor_allgatherv(self, sendbuf, recvbuf): """ Nonblocking Neighbor Gather to All Vector """ cdef _p_msg_cco m = message_cco() m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ineighbor_allgatherv( m.sbuf, m.scount, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Ineighbor_alltoall(self, sendbuf, recvbuf): """ Nonblocking Neighbor All-to-All """ cdef _p_msg_cco m = message_cco() m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ineighbor_alltoall( m.sbuf, m.scount, m.stype, m.rbuf, m.rcount, m.rtype, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Ineighbor_alltoallv(self, sendbuf, recvbuf): """ Nonblocking Neighbor All-to-All Vector """ cdef _p_msg_cco m = message_cco() m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ineighbor_alltoallv( m.sbuf, m.scounts, m.sdispls, m.stype, m.rbuf, m.rcounts, m.rdispls, m.rtype, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request def Ineighbor_alltoallw(self, sendbuf, recvbuf): """ Nonblocking Neighbor All-to-All Generalized """ cdef _p_msg_ccow m = message_ccow() m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Ineighbor_alltoallw( m.sbuf, m.scounts, m.sdisplsA, m.stypes, m.rbuf, m.rcounts, m.rdisplsA, m.rtypes, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = m return request # Python Communication # def neighbor_allgather(self, sendobj): """Neighbor Gather to All""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_neighbor_allgather(sendobj, comm) # def neighbor_alltoall(self, sendobj): """Neighbor All to All Scatter/Gather""" cdef MPI_Comm comm = self.ob_mpi return PyMPI_neighbor_alltoall(sendobj, comm) cdef class Cartcomm(Topocomm): """ Cartesian topology intracommunicator """ def __cinit__(self, Comm comm=None): if self.ob_mpi == MPI_COMM_NULL: return cdef int topo = MPI_UNDEFINED CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) if topo != MPI_CART: raise TypeError( "expecting a Cartesian communicator") # Cartesian Inquiry Functions # --------------------------- def Get_dim(self): """ Return number of dimensions """ cdef int dim = 0 CHKERR( MPI_Cartdim_get(self.ob_mpi, &dim) ) return dim property dim: """number of dimensions""" def __get__(self): return self.Get_dim() property ndim: """number of dimensions""" def __get__(self): return self.Get_dim() def Get_topo(self): """ Return information on the cartesian topology """ cdef int ndim = 0 CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) cdef int *idims = NULL cdef tmp1 = newarray(ndim, &idims) cdef int *iperiods = NULL cdef tmp2 = newarray(ndim, &iperiods) cdef int *icoords = NULL cdef tmp3 = newarray(ndim, &icoords) CHKERR( MPI_Cart_get(self.ob_mpi, ndim, idims, iperiods, icoords) ) cdef int i = 0 cdef object dims = [idims[i] for i from 0 <= i < ndim] cdef object periods = [iperiods[i] for i from 0 <= i < ndim] cdef object coords = [icoords[i] for i from 0 <= i < ndim] return (dims, periods, coords) property topo: """topology information""" def __get__(self): return self.Get_topo() property dims: """dimensions""" def __get__(self): return self.Get_topo()[0] property periods: """periodicity""" def __get__(self): return self.Get_topo()[1] property coords: """coordinates""" def __get__(self): return self.Get_topo()[2] # Cartesian Translator Functions # ------------------------------ def Get_cart_rank(self, coords): """ Translate logical coordinates to ranks """ cdef int ndim = 0, *icoords = NULL CHKERR( MPI_Cartdim_get( self.ob_mpi, &ndim) ) coords = chkarray(coords, ndim, &icoords) cdef int rank = MPI_PROC_NULL CHKERR( MPI_Cart_rank(self.ob_mpi, icoords, &rank) ) return rank def Get_coords(self, int rank): """ Translate ranks to logical coordinates """ cdef int i = 0, ndim = 0, *icoords = NULL CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) cdef tmp = newarray(ndim, &icoords) CHKERR( MPI_Cart_coords(self.ob_mpi, rank, ndim, icoords) ) cdef object coords = [icoords[i] for i from 0 <= i < ndim] return coords # Cartesian Shift Function # ------------------------ def Shift(self, int direction, int disp): """ Return a tuple (source,dest) of process ranks for data shifting with Comm.Sendrecv() """ cdef int source = MPI_PROC_NULL, dest = MPI_PROC_NULL CHKERR( MPI_Cart_shift(self.ob_mpi, direction, disp, &source, &dest) ) return (source, dest) # Cartesian Partition Function # ---------------------------- def Sub(self, remain_dims): """ Return cartesian communicators that form lower-dimensional subgrids """ cdef int ndim = 0, *iremdims = NULL CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) remain_dims = chkarray(remain_dims, ndim, &iremdims) cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) with nogil: CHKERR( MPI_Cart_sub(self.ob_mpi, iremdims, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm # Cartesian Convenience Function def Compute_dims(int nnodes, dims): """ Return a balanced distribution of processes per coordinate direction """ cdef int i = 0, ndims = 0, *idims = NULL try: ndims = len(dims) except: ndims = dims dims = [0] * ndims cdef tmp = chkarray(dims, ndims, &idims) CHKERR( MPI_Dims_create(nnodes, ndims, idims) ) dims = [idims[i] for i from 0 <= i < ndims] return dims cdef class Graphcomm(Topocomm): """ General graph topology intracommunicator """ def __cinit__(self, Comm comm=None): if self.ob_mpi == MPI_COMM_NULL: return cdef int topo = MPI_UNDEFINED CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) if topo != MPI_GRAPH: raise TypeError( "expecting a general graph communicator") # Graph Inquiry Functions # ----------------------- def Get_dims(self): """ Return the number of nodes and edges """ cdef int nnodes = 0, nedges = 0 CHKERR( MPI_Graphdims_get(self.ob_mpi, &nnodes, &nedges) ) return (nnodes, nedges) property dims: """number of nodes and edges""" def __get__(self): return self.Get_dims() property nnodes: """number of nodes""" def __get__(self): return self.Get_dims()[0] property nedges: """number of edges""" def __get__(self): return self.Get_dims()[1] def Get_topo(self): """ Return index and edges """ cdef int nindex = 0, nedges = 0 CHKERR( MPI_Graphdims_get( self.ob_mpi, &nindex, &nedges) ) cdef int *iindex = NULL cdef tmp1 = newarray(nindex, &iindex) cdef int *iedges = NULL cdef tmp2 = newarray(nedges, &iedges) CHKERR( MPI_Graph_get(self.ob_mpi, nindex, nedges, iindex, iedges) ) cdef int i = 0 cdef object index = [iindex[i] for i from 0 <= i < nindex] cdef object edges = [iedges[i] for i from 0 <= i < nedges] return (index, edges) property topo: """topology information""" def __get__(self): return self.Get_topo() property index: """index""" def __get__(self): return self.Get_topo()[0] property edges: """edges""" def __get__(self): return self.Get_topo()[1] # Graph Information Functions # --------------------------- def Get_neighbors_count(self, int rank): """ Return number of neighbors of a process """ cdef int nneighbors = 0 CHKERR( MPI_Graph_neighbors_count(self.ob_mpi, rank, &nneighbors) ) return nneighbors property nneighbors: """number of neighbors""" def __get__(self): cdef int rank = self.Get_rank() return self.Get_neighbors_count(rank) def Get_neighbors(self, int rank): """ Return list of neighbors of a process """ cdef int i = 0, nneighbors = 0, *ineighbors = NULL CHKERR( MPI_Graph_neighbors_count( self.ob_mpi, rank, &nneighbors) ) cdef tmp = newarray(nneighbors, &ineighbors) CHKERR( MPI_Graph_neighbors( self.ob_mpi, rank, nneighbors, ineighbors) ) cdef object neighbors = [ineighbors[i] for i from 0 <= i < nneighbors] return neighbors property neighbors: """neighbors""" def __get__(self): cdef int rank = self.Get_rank() return self.Get_neighbors(rank) cdef class Distgraphcomm(Topocomm): """ Distributed graph topology intracommunicator """ def __cinit__(self, Comm comm=None): if self.ob_mpi == MPI_COMM_NULL: return cdef int topo = MPI_UNDEFINED CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) if topo != MPI_DIST_GRAPH: raise TypeError( "expecting a distributed graph communicator") # Topology Inquiry Functions # -------------------------- def Get_dist_neighbors_count(self): """ Return adjacency information for a distributed graph topology """ cdef int indegree = 0 cdef int outdegree = 0 cdef int weighted = 0 CHKERR( MPI_Dist_graph_neighbors_count( self.ob_mpi, &indegree, &outdegree, &weighted) ) return (indegree, outdegree, weighted) def Get_dist_neighbors(self): """ Return adjacency information for a distributed graph topology """ cdef int maxindegree = 0, maxoutdegree = 0, weighted = 0 CHKERR( MPI_Dist_graph_neighbors_count( self.ob_mpi, &maxindegree, &maxoutdegree, &weighted) ) # cdef int *sources = NULL, *destinations = NULL cdef int *sourceweights = MPI_UNWEIGHTED cdef int *destweights = MPI_UNWEIGHTED cdef tmp1, tmp2, tmp3, tmp4 tmp1 = newarray(maxindegree, &sources) tmp2 = newarray(maxoutdegree, &destinations) cdef int i = 0 if weighted: tmp3 = newarray(maxindegree, &sourceweights) for i from 0 <= i < maxindegree: sourceweights[i] = 1 tmp4 = newarray(maxoutdegree, &destweights) for i from 0 <= i < maxoutdegree: destweights[i] = 1 # CHKERR( MPI_Dist_graph_neighbors( self.ob_mpi, maxindegree, sources, sourceweights, maxoutdegree, destinations, destweights) ) # cdef object src = [sources[i] for i from 0 <= i < maxindegree] cdef object dst = [destinations[i] for i from 0 <= i < maxoutdegree] if not weighted: return (src, dst, None) # cdef object sw = [sourceweights[i] for i from 0 <= i < maxindegree] cdef object dw = [destweights[i] for i from 0 <= i < maxoutdegree] return (src, dst, (sw, dw)) cdef class Intercomm(Comm): """ Intercommunicator """ def __cinit__(self, Comm comm=None): if self.ob_mpi == MPI_COMM_NULL: return cdef int inter = 0 CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) if not inter: raise TypeError( "expecting an intercommunicator") # Intercommunicator Accessors # --------------------------- def Get_remote_group(self): """ Access the remote group associated with the inter-communicator """ cdef Group group = Group.__new__(Group) with nogil: CHKERR( MPI_Comm_remote_group( self.ob_mpi, &group.ob_mpi) ) return group property remote_group: """remote group""" def __get__(self): return self.Get_remote_group() def Get_remote_size(self): """ Intercommunicator remote size """ cdef int size = -1 CHKERR( MPI_Comm_remote_size(self.ob_mpi, &size) ) return size property remote_size: """number of remote processes""" def __get__(self): return self.Get_remote_size() # Communicator Constructors # ------------------------- def Merge(self, bint high=False): """ Merge intercommunicator """ cdef Intracomm comm = Intracomm.__new__(Intracomm) with nogil: CHKERR( MPI_Intercomm_merge( self.ob_mpi, high, &comm.ob_mpi) ) comm_set_eh(comm.ob_mpi) return comm cdef Comm __COMM_NULL__ = new_Comm ( MPI_COMM_NULL ) cdef Intracomm __COMM_SELF__ = new_Intracomm ( MPI_COMM_SELF ) cdef Intracomm __COMM_WORLD__ = new_Intracomm ( MPI_COMM_WORLD ) cdef Intercomm __COMM_PARENT__ = new_Intercomm ( MPI_COMM_NULL ) # Predefined communicators # ------------------------ COMM_NULL = __COMM_NULL__ #: Null communicator handle COMM_SELF = __COMM_SELF__ #: Self communicator handle COMM_WORLD = __COMM_WORLD__ #: World communicator handle # Buffer Allocation and Usage # --------------------------- BSEND_OVERHEAD = MPI_BSEND_OVERHEAD #: Upper bound of memory overhead for sending in buffered mode def Attach_buffer(buf): """ Attach a user-provided buffer for sending in buffered mode """ cdef void *base = NULL cdef int size = 0 attach_buffer(buf, &base, &size) with nogil: CHKERR( MPI_Buffer_attach(base, size) ) def Detach_buffer(): """ Remove an existing attached buffer """ cdef void *base = NULL cdef int size = 0 with nogil: CHKERR( MPI_Buffer_detach(&base, &size) ) return detach_buffer(base, size) # -------------------------------------------------------------------- # Process Creation and Management # -------------------------------------------------------------------- # Server Routines # --------------- def Open_port(Info info=INFO_NULL): """ Return an address that can be used to establish connections between groups of MPI processes """ cdef char cportname[MPI_MAX_PORT_NAME+1] with nogil: CHKERR( MPI_Open_port(info.ob_mpi, cportname) ) cportname[MPI_MAX_PORT_NAME] = 0 # just in case return mpistr(cportname) def Close_port(port_name): """ Close a port """ cdef char *cportname = NULL port_name = asmpistr(port_name, &cportname) with nogil: CHKERR( MPI_Close_port(cportname) ) # Name Publishing # --------------- def Publish_name(service_name, port_name, info=INFO_NULL): """ Publish a service name """ if isinstance(port_name, Info): # backward compatibility port_name, info = info, port_name cdef char *csrvcname = NULL service_name = asmpistr(service_name, &csrvcname) cdef char *cportname = NULL port_name = asmpistr(port_name, &cportname) cdef MPI_Info cinfo = arg_Info(info) with nogil: CHKERR( MPI_Publish_name(csrvcname, cinfo, cportname) ) def Unpublish_name(service_name, port_name, info=INFO_NULL): """ Unpublish a service name """ if isinstance(port_name, Info): # backward compatibility port_name, info = info, port_name cdef char *csrvcname = NULL service_name = asmpistr(service_name, &csrvcname) cdef char *cportname = NULL port_name = asmpistr(port_name, &cportname) cdef MPI_Info cinfo = arg_Info(info) with nogil: CHKERR( MPI_Unpublish_name(csrvcname, cinfo, cportname) ) def Lookup_name(service_name, info=INFO_NULL): """ Lookup a port name given a service name """ cdef char *csrvcname = NULL service_name = asmpistr(service_name, &csrvcname) cdef MPI_Info cinfo = arg_Info(info) cdef char cportname[MPI_MAX_PORT_NAME+1] with nogil: CHKERR( MPI_Lookup_name(csrvcname, cinfo, cportname) ) cportname[MPI_MAX_PORT_NAME] = 0 # just in case return mpistr(cportname) mpi4py-3.0.3/src/mpi4py/MPI/helpers.pxi0000644000175000017500000002652113200562156020625 0ustar dalcinldalcinl00000000000000#------------------------------------------------------------------------------ cdef extern from "Python.h": enum: Py_LT enum: Py_LE enum: Py_EQ enum: Py_NE enum: Py_GT enum: Py_GE #------------------------------------------------------------------------------ cdef enum PyMPI_OBJECT_FLAGS: PyMPI_OWNED = 1<<1 #------------------------------------------------------------------------------ # Status cdef inline MPI_Status *arg_Status(object status): if status is None: return MPI_STATUS_IGNORE return &((status).ob_mpi) #------------------------------------------------------------------------------ # Datatype cdef inline int builtin_Datatype(MPI_Datatype ob): cdef int ni = 0, na = 0, nt = 0, combiner = MPI_UNDEFINED if ob == MPI_DATATYPE_NULL: return 1 cdef int ierr = MPI_Type_get_envelope(ob, &ni, &na, &nt, &combiner) if ierr != MPI_SUCCESS: return 0 # XXX return (combiner == MPI_COMBINER_NAMED or combiner == MPI_COMBINER_F90_INTEGER or combiner == MPI_COMBINER_F90_REAL or combiner == MPI_COMBINER_F90_COMPLEX) cdef inline Datatype new_Datatype(MPI_Datatype ob): cdef Datatype datatype = Datatype.__new__(Datatype) datatype.ob_mpi = ob return datatype cdef inline Datatype ref_Datatype(MPI_Datatype ob): cdef Datatype datatype = Datatype.__new__(Datatype) datatype.ob_mpi = ob return datatype cdef inline int del_Datatype(MPI_Datatype* ob): if ob == NULL : return 0 if ob[0] == MPI_DATATYPE_NULL : return 0 if ob[0] == MPI_UB : return 0 if ob[0] == MPI_LB : return 0 if ob[0] == MPI_PACKED : return 0 if ob[0] == MPI_BYTE : return 0 if ob[0] == MPI_AINT : return 0 if ob[0] == MPI_OFFSET : return 0 if ob[0] == MPI_COUNT : return 0 if ob[0] == MPI_CHAR : return 0 if ob[0] == MPI_WCHAR : return 0 if ob[0] == MPI_SIGNED_CHAR : return 0 if ob[0] == MPI_SHORT : return 0 if ob[0] == MPI_INT : return 0 if ob[0] == MPI_LONG : return 0 if ob[0] == MPI_LONG_LONG : return 0 if ob[0] == MPI_UNSIGNED_CHAR : return 0 if ob[0] == MPI_UNSIGNED_SHORT : return 0 if ob[0] == MPI_UNSIGNED : return 0 if ob[0] == MPI_UNSIGNED_LONG : return 0 if ob[0] == MPI_UNSIGNED_LONG_LONG : return 0 if ob[0] == MPI_FLOAT : return 0 if ob[0] == MPI_DOUBLE : return 0 if ob[0] == MPI_LONG_DOUBLE : return 0 if ob[0] == MPI_C_BOOL : return 0 if ob[0] == MPI_INT8_T : return 0 if ob[0] == MPI_INT16_T : return 0 if ob[0] == MPI_INT32_T : return 0 if ob[0] == MPI_INT64_T : return 0 if ob[0] == MPI_UINT8_T : return 0 if ob[0] == MPI_UINT16_T : return 0 if ob[0] == MPI_UINT32_T : return 0 if ob[0] == MPI_UINT64_T : return 0 if ob[0] == MPI_C_COMPLEX : return 0 if ob[0] == MPI_C_FLOAT_COMPLEX : return 0 if ob[0] == MPI_C_DOUBLE_COMPLEX : return 0 if ob[0] == MPI_C_LONG_DOUBLE_COMPLEX : return 0 if ob[0] == MPI_CXX_BOOL : return 0 if ob[0] == MPI_CXX_FLOAT_COMPLEX : return 0 if ob[0] == MPI_CXX_DOUBLE_COMPLEX : return 0 if ob[0] == MPI_CXX_LONG_DOUBLE_COMPLEX : return 0 if ob[0] == MPI_SHORT_INT : return 0 if ob[0] == MPI_2INT : return 0 if ob[0] == MPI_LONG_INT : return 0 if ob[0] == MPI_FLOAT_INT : return 0 if ob[0] == MPI_DOUBLE_INT : return 0 if ob[0] == MPI_LONG_DOUBLE_INT : return 0 if ob[0] == MPI_CHARACTER : return 0 if ob[0] == MPI_LOGICAL : return 0 if ob[0] == MPI_INTEGER : return 0 if ob[0] == MPI_REAL : return 0 if ob[0] == MPI_DOUBLE_PRECISION : return 0 if ob[0] == MPI_COMPLEX : return 0 if ob[0] == MPI_DOUBLE_COMPLEX : return 0 if ob[0] == MPI_LOGICAL1 : return 0 if ob[0] == MPI_LOGICAL2 : return 0 if ob[0] == MPI_LOGICAL4 : return 0 if ob[0] == MPI_LOGICAL8 : return 0 if ob[0] == MPI_INTEGER1 : return 0 if ob[0] == MPI_INTEGER2 : return 0 if ob[0] == MPI_INTEGER4 : return 0 if ob[0] == MPI_INTEGER8 : return 0 if ob[0] == MPI_INTEGER16 : return 0 if ob[0] == MPI_REAL2 : return 0 if ob[0] == MPI_REAL4 : return 0 if ob[0] == MPI_REAL8 : return 0 if ob[0] == MPI_REAL16 : return 0 if ob[0] == MPI_COMPLEX4 : return 0 if ob[0] == MPI_COMPLEX8 : return 0 if ob[0] == MPI_COMPLEX16 : return 0 if ob[0] == MPI_COMPLEX32 : return 0 # if not mpi_active(): return 0 if builtin_Datatype(ob[0]): return 0 # return MPI_Type_free(ob) #------------------------------------------------------------------------------ # Request include "reqimpl.pxi" cdef inline Request new_Request(MPI_Request ob): cdef Request request = Request.__new__(Request) request.ob_mpi = ob return request cdef inline int del_Request(MPI_Request* ob): if ob == NULL : return 0 if ob[0] == MPI_REQUEST_NULL : return 0 # if not mpi_active(): return 0 return MPI_Request_free(ob) #------------------------------------------------------------------------------ # Message cdef inline Message new_Message(MPI_Message ob): cdef Message message = Message.__new__(Message) message.ob_mpi = ob return message cdef inline int del_Message(MPI_Message* ob): if ob == NULL : return 0 if ob[0] == MPI_MESSAGE_NULL : return 0 if ob[0] == MPI_MESSAGE_NO_PROC : return 0 # if not mpi_active(): return 0 # ob[0] = MPI_MESSAGE_NULL return 0 #------------------------------------------------------------------------------ # Op include "opimpl.pxi" cdef inline Op new_Op(MPI_Op ob): cdef Op op = Op.__new__(Op) op.ob_mpi = ob if ob == MPI_OP_NULL : op.ob_func = NULL elif ob == MPI_MAX : op.ob_func = _op_MAX elif ob == MPI_MIN : op.ob_func = _op_MIN elif ob == MPI_SUM : op.ob_func = _op_SUM elif ob == MPI_PROD : op.ob_func = _op_PROD elif ob == MPI_LAND : op.ob_func = _op_LAND elif ob == MPI_BAND : op.ob_func = _op_BAND elif ob == MPI_LOR : op.ob_func = _op_LOR elif ob == MPI_BOR : op.ob_func = _op_BOR elif ob == MPI_LXOR : op.ob_func = _op_LXOR elif ob == MPI_BXOR : op.ob_func = _op_BXOR elif ob == MPI_MAXLOC : op.ob_func = _op_MAXLOC elif ob == MPI_MINLOC : op.ob_func = _op_MINLOC elif ob == MPI_REPLACE : op.ob_func = _op_REPLACE elif ob == MPI_NO_OP : op.ob_func = _op_NO_OP return op cdef inline int del_Op(MPI_Op* ob): if ob == NULL : return 0 if ob[0] == MPI_OP_NULL : return 0 if ob[0] == MPI_MAX : return 0 if ob[0] == MPI_MIN : return 0 if ob[0] == MPI_SUM : return 0 if ob[0] == MPI_PROD : return 0 if ob[0] == MPI_LAND : return 0 if ob[0] == MPI_BAND : return 0 if ob[0] == MPI_LOR : return 0 if ob[0] == MPI_BOR : return 0 if ob[0] == MPI_LXOR : return 0 if ob[0] == MPI_BXOR : return 0 if ob[0] == MPI_MAXLOC : return 0 if ob[0] == MPI_MINLOC : return 0 if ob[0] == MPI_REPLACE : return 0 if ob[0] == MPI_NO_OP : return 0 # if not mpi_active(): return 0 return MPI_Op_free(ob) #------------------------------------------------------------------------------ # Info cdef inline Info new_Info(MPI_Info ob): cdef Info info = Info.__new__(Info) info.ob_mpi = ob return info cdef inline int del_Info(MPI_Info* ob): if ob == NULL : return 0 if ob[0] == MPI_INFO_NULL : return 0 if ob[0] == MPI_INFO_ENV : return 0 # if not mpi_active(): return 0 return MPI_Info_free(ob) cdef inline MPI_Info arg_Info(object info): if info is None: return MPI_INFO_NULL return (info).ob_mpi #------------------------------------------------------------------------------ # Group cdef inline Group new_Group(MPI_Group ob): cdef Group group = Group.__new__(Group) group.ob_mpi = ob return group cdef inline int del_Group(MPI_Group* ob): if ob == NULL : return 0 if ob[0] == MPI_GROUP_NULL : return 0 if ob[0] == MPI_GROUP_EMPTY : return 0 # if not mpi_active(): return 0 return MPI_Group_free(ob) #------------------------------------------------------------------------------ # Comm include "commimpl.pxi" cdef inline Comm new_Comm(MPI_Comm ob): cdef Comm comm = Comm.__new__(Comm) comm.ob_mpi = ob return comm cdef inline Intracomm new_Intracomm(MPI_Comm ob): cdef Intracomm comm = Intracomm.__new__(Intracomm) comm.ob_mpi = ob return comm cdef inline Intercomm new_Intercomm(MPI_Comm ob): cdef Intercomm comm = Intercomm.__new__(Intercomm) comm.ob_mpi = ob return comm cdef inline int del_Comm(MPI_Comm* ob): if ob == NULL : return 0 if ob[0] == MPI_COMM_NULL : return 0 if ob[0] == MPI_COMM_SELF : return 0 if ob[0] == MPI_COMM_WORLD : return 0 # if not mpi_active(): return 0 return MPI_Comm_free(ob) #------------------------------------------------------------------------------ # Win include "winimpl.pxi" cdef inline Win new_Win(MPI_Win ob): cdef Win win = Win.__new__(Win) win.ob_mpi = ob return win cdef inline int del_Win(MPI_Win* ob): if ob == NULL : return 0 if ob[0] == MPI_WIN_NULL : return 0 # if not mpi_active(): return 0 return MPI_Win_free(ob) #------------------------------------------------------------------------------ # File include "drepimpl.pxi" cdef inline File new_File(MPI_File ob): cdef File file = File.__new__(File) file.ob_mpi = ob return file cdef inline int del_File(MPI_File* ob): if ob == NULL : return 0 if ob[0] == MPI_FILE_NULL : return 0 # if not mpi_active(): return 0 return MPI_File_close(ob) #------------------------------------------------------------------------------ # Errhandler cdef inline Errhandler new_Errhandler(MPI_Errhandler ob): cdef Errhandler errhandler = Errhandler.__new__(Errhandler) errhandler.ob_mpi = ob return errhandler cdef inline int del_Errhandler(MPI_Errhandler* ob): if ob == NULL : return 0 if ob[0] == MPI_ERRHANDLER_NULL : return 0 if ob[0] == MPI_ERRORS_RETURN : return 0 if ob[0] == MPI_ERRORS_ARE_FATAL : return 0 # if not mpi_active(): return 0 return MPI_Errhandler_free(ob) #------------------------------------------------------------------------------ mpi4py-3.0.3/src/mpi4py/MPI/asstring.pxi0000644000175000017500000000245713200562156021017 0ustar dalcinldalcinl00000000000000#------------------------------------------------------------------------------ cdef extern from "Python.h": int PyUnicode_Check(object) object PyUnicode_AsUTF8String(object) object PyUnicode_AsASCIIString(object) object PyUnicode_FromString(const char[]) object PyUnicode_FromStringAndSize(const char[],Py_ssize_t) object PyBytes_FromString(const char[]) object PyBytes_FromStringAndSize(const char[],Py_ssize_t) int PyBytes_AsStringAndSize(object,char*[],Py_ssize_t*) except -1 #------------------------------------------------------------------------------ cdef inline object asmpistr(object ob, char *s[]): if PyUnicode_Check(ob): if PY3: ob = PyUnicode_AsUTF8String(ob); else: ob = PyUnicode_AsASCIIString(ob); PyBytes_AsStringAndSize(ob, s, NULL) return ob cdef inline object tompistr(const char s[], int n): if PY3: return PyUnicode_FromStringAndSize(s, n) else: return PyBytes_FromStringAndSize(s, n) cdef inline object mpistr(const char s[]): if PY3: return PyUnicode_FromString(s) else: return PyBytes_FromString(s) cdef inline object pystr(const char s[]): if PY3: return PyUnicode_FromString(s) else: return PyBytes_FromString(s) #------------------------------------------------------------------------------ mpi4py-3.0.3/src/mpi4py/MPI/typemap.pxi0000664000175000017500000002021413426006675020646 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- cdef inline int AddTypeMap(dict TD, const char tc[], Datatype dt) except -1: if dt.ob_mpi != MPI_DATATYPE_NULL: TD[pystr(tc)] = dt return 1 return 0 # ----------------------------------------------------------------------------- cdef dict TypeDict = { } _typedict = TypeDict # boolean (C++) AddTypeMap(TypeDict, "?" , __CXX_BOOL__ ) # PEP-3118 & NumPy # boolean (C99) AddTypeMap(TypeDict, "?" , __C_BOOL__ ) # PEP-3118 & NumPy # character AddTypeMap(TypeDict, "c" , __CHAR__ ) # PEP-3118 & NumPy AddTypeMap(TypeDict, "S" , __CHAR__ ) # NumPy # UCS-2|4 AddTypeMap(TypeDict, "u" , __UNSIGNED_SHORT__ ) # PEP-3118 AddTypeMap(TypeDict, "u" , __UINT16_T__ ) # PEP-3118 AddTypeMap(TypeDict, "w" , __UNSIGNED__ ) # PEP-3118 AddTypeMap(TypeDict, "w" , __UINT32_T__ ) # PEP-3118 # (signed) integer AddTypeMap(TypeDict, "b" , __SIGNED_CHAR__ ) # MPI-2 AddTypeMap(TypeDict, "h" , __SHORT__ ) AddTypeMap(TypeDict, "i" , __INT__ ) AddTypeMap(TypeDict, "l" , __LONG__ ) AddTypeMap(TypeDict, "q" , __LONG_LONG__ ) AddTypeMap(TypeDict, "p" , __AINT__ ) # NumPy # unsigned integer AddTypeMap(TypeDict, "B" , __UNSIGNED_CHAR__ ) AddTypeMap(TypeDict, "H" , __UNSIGNED_SHORT__ ) AddTypeMap(TypeDict, "I" , __UNSIGNED__ ) AddTypeMap(TypeDict, "L" , __UNSIGNED_LONG__ ) AddTypeMap(TypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) # (real) floating AddTypeMap(TypeDict, "f" , __FLOAT__ ) AddTypeMap(TypeDict, "d" , __DOUBLE__ ) AddTypeMap(TypeDict, "g" , __LONG_DOUBLE__ ) # PEP-3118 & NumPy # complex floating (F77) AddTypeMap(TypeDict, "Zf" , __COMPLEX__ ) # PEP-3118 AddTypeMap(TypeDict, "Zd" , __DOUBLE_COMPLEX__ ) # PEP-3118 AddTypeMap(TypeDict, "F" , __COMPLEX__ ) # NumPy AddTypeMap(TypeDict, "D" , __DOUBLE_COMPLEX__ ) # NumPy # complex floating (F90) AddTypeMap(TypeDict, "Zf" , __COMPLEX8__ ) # PEP-3118 AddTypeMap(TypeDict, "Zd" , __COMPLEX16__ ) # PEP-3118 AddTypeMap(TypeDict, "F" , __COMPLEX8__ ) # NumPy AddTypeMap(TypeDict, "D" , __COMPLEX16__ ) # NumPy # complex floating (C++) AddTypeMap(TypeDict, "Zf" , __CXX_FLOAT_COMPLEX__ ) # PEP-3118 AddTypeMap(TypeDict, "Zd" , __CXX_DOUBLE_COMPLEX__ ) # PEP-3118 AddTypeMap(TypeDict, "Zg" , __CXX_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 AddTypeMap(TypeDict, "F" , __CXX_FLOAT_COMPLEX__ ) # NumPy AddTypeMap(TypeDict, "D" , __CXX_DOUBLE_COMPLEX__ ) # NumPy AddTypeMap(TypeDict, "G" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy # complex floating (C99) AddTypeMap(TypeDict, "Zf" , __C_FLOAT_COMPLEX__ ) # PEP-3118 AddTypeMap(TypeDict, "Zd" , __C_DOUBLE_COMPLEX__ ) # PEP-3118 AddTypeMap(TypeDict, "Zg" , __C_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 AddTypeMap(TypeDict, "F" , __C_FLOAT_COMPLEX__ ) # NumPy AddTypeMap(TypeDict, "D" , __C_DOUBLE_COMPLEX__ ) # NumPy AddTypeMap(TypeDict, "G" , __C_LONG_DOUBLE_COMPLEX__ ) # NumPy # signed and unsigned integer (C) if sizeof(char) == 1: AddTypeMap(TypeDict, "i1" , __SIGNED_CHAR__ ) # NumPy AddTypeMap(TypeDict, "u1" , __UNSIGNED_CHAR__ ) # NumPy if sizeof(short) == 2: AddTypeMap(TypeDict, "i2" , __SHORT__ ) # NumPy AddTypeMap(TypeDict, "u2" , __UNSIGNED_SHORT__ ) # NumPy if sizeof(int) == 4: AddTypeMap(TypeDict, "i4" , __INT__ ) # NumPy AddTypeMap(TypeDict, "u4" , __UNSIGNED__ ) # NumPy elif sizeof(long) == 4: AddTypeMap(TypeDict, "i4" , __LONG__ ) # NumPy AddTypeMap(TypeDict, "u4" , __UNSIGNED_LONG__ ) # NumPy if sizeof(long) == 8: AddTypeMap(TypeDict, "i8" , __LONG__ ) # NumPy AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG__ ) # NumPy elif sizeof(long long) == 8: AddTypeMap(TypeDict, "i8" , __LONG_LONG__ ) # NumPy AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG_LONG__ ) # NumPy # signed integer (C99) AddTypeMap(TypeDict, "i1" , __INT8_T__ ) # NumPy AddTypeMap(TypeDict, "i2" , __INT16_T__ ) # NumPy AddTypeMap(TypeDict, "i4" , __INT32_T__ ) # NumPy AddTypeMap(TypeDict, "i8" , __INT64_T__ ) # NumPy # unsigned integer (C99) AddTypeMap(TypeDict, "u1" , __UINT8_T__ ) # NumPy AddTypeMap(TypeDict, "u2" , __UINT16_T__ ) # NumPy AddTypeMap(TypeDict, "u4" , __UINT32_T__ ) # NumPy AddTypeMap(TypeDict, "u8" , __UINT64_T__ ) # NumPy # real (C) and complex (C99) floating if sizeof(float) == 4: AddTypeMap(TypeDict, "f4" , __FLOAT__ ) # NumPy AddTypeMap(TypeDict, "c8" , __CXX_FLOAT_COMPLEX__ ) # NumPy AddTypeMap(TypeDict, "c8" , __C_FLOAT_COMPLEX__ ) # NumPy if sizeof(double) == 8: AddTypeMap(TypeDict, "f8" , __DOUBLE__ ) # NumPy AddTypeMap(TypeDict, "c16" , __CXX_DOUBLE_COMPLEX__ ) # NumPy AddTypeMap(TypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) # NumPy if sizeof(long double) == 16: AddTypeMap(TypeDict, "f16" , __LONG_DOUBLE__ ) # NumPy AddTypeMap(TypeDict, "c32" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy AddTypeMap(TypeDict, "c32" , __C_LONG_DOUBLE_COMPLEX__ ) # NumPy # ----------------------------------------------------------------------------- cdef dict CTypeDict = { } _typedict_c = CTypeDict AddTypeMap(CTypeDict, "?" , __C_BOOL__ ) AddTypeMap(CTypeDict, "b" , __SIGNED_CHAR__ ) AddTypeMap(CTypeDict, "h" , __SHORT__ ) AddTypeMap(CTypeDict, "i" , __INT__ ) AddTypeMap(CTypeDict, "l" , __LONG__ ) AddTypeMap(CTypeDict, "q" , __LONG_LONG__ ) AddTypeMap(CTypeDict, "B" , __UNSIGNED_CHAR__ ) AddTypeMap(CTypeDict, "H" , __UNSIGNED_SHORT__ ) AddTypeMap(CTypeDict, "I" , __UNSIGNED__ ) AddTypeMap(CTypeDict, "L" , __UNSIGNED_LONG__ ) AddTypeMap(CTypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) AddTypeMap(CTypeDict, "f" , __FLOAT__ ) AddTypeMap(CTypeDict, "d" , __DOUBLE__ ) AddTypeMap(CTypeDict, "g" , __LONG_DOUBLE__ ) AddTypeMap(CTypeDict, "F" , __C_FLOAT_COMPLEX__ ) AddTypeMap(CTypeDict, "D" , __C_DOUBLE_COMPLEX__ ) AddTypeMap(CTypeDict, "G" , __C_LONG_DOUBLE_COMPLEX__ ) AddTypeMap(CTypeDict, "i1" , __INT8_T__ ) AddTypeMap(CTypeDict, "i2" , __INT16_T__ ) AddTypeMap(CTypeDict, "i4" , __INT32_T__ ) AddTypeMap(CTypeDict, "i8" , __INT64_T__ ) AddTypeMap(CTypeDict, "u1" , __UINT8_T__ ) AddTypeMap(CTypeDict, "u2" , __UINT16_T__ ) AddTypeMap(CTypeDict, "u4" , __UINT32_T__ ) AddTypeMap(CTypeDict, "u8" , __UINT64_T__ ) if sizeof(float) == 4: AddTypeMap(CTypeDict, "f4" , __FLOAT__ ) AddTypeMap(CTypeDict, "c8" , __C_FLOAT_COMPLEX__ ) if sizeof(double) == 8: AddTypeMap(CTypeDict, "f8" , __DOUBLE__ ) AddTypeMap(CTypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) if sizeof(long double) == 16: AddTypeMap(CTypeDict, "f16" , __LONG_DOUBLE__ ) AddTypeMap(CTypeDict, "c32" , __C_LONG_DOUBLE_COMPLEX__ ) # ----------------------------------------------------------------------------- cdef dict FTypeDict = { } _typedict_f = FTypeDict AddTypeMap(FTypeDict, "?" , __LOGICAL__ ) AddTypeMap(FTypeDict, "i" , __INTEGER__ ) AddTypeMap(FTypeDict, "s" , __REAL__ ) AddTypeMap(FTypeDict, "r" , __REAL__ ) AddTypeMap(FTypeDict, "d" , __DOUBLE_PRECISION__ ) AddTypeMap(FTypeDict, "c" , __COMPLEX__ ) AddTypeMap(FTypeDict, "z" , __DOUBLE_COMPLEX__ ) AddTypeMap(FTypeDict, "?1" , __LOGICAL1__ ) AddTypeMap(FTypeDict, "?2" , __LOGICAL2__ ) AddTypeMap(FTypeDict, "?4" , __LOGICAL4__ ) AddTypeMap(FTypeDict, "?8" , __LOGICAL8__ ) AddTypeMap(FTypeDict, "i1" , __INTEGER1__ ) AddTypeMap(FTypeDict, "i2" , __INTEGER2__ ) AddTypeMap(FTypeDict, "i4" , __INTEGER4__ ) AddTypeMap(FTypeDict, "i8" , __INTEGER8__ ) AddTypeMap(FTypeDict, "i16" , __INTEGER16__ ) AddTypeMap(FTypeDict, "r2" , __REAL2__ ) AddTypeMap(FTypeDict, "r4" , __REAL4__ ) AddTypeMap(FTypeDict, "r8" , __REAL8__ ) AddTypeMap(FTypeDict, "r16" , __REAL16__ ) AddTypeMap(FTypeDict, "c4" , __COMPLEX4__ ) AddTypeMap(FTypeDict, "c8" , __COMPLEX8__ ) AddTypeMap(FTypeDict, "c16" , __COMPLEX16__ ) AddTypeMap(FTypeDict, "c32" , __COMPLEX32__ ) # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/ExceptionP.pyx0000644000175000017500000000420313200562156021252 0ustar dalcinldalcinl00000000000000class Exception(RuntimeError): """ Exception """ def __init__(self, int ierr=0): if ierr < MPI_SUCCESS: ierr = MPI_ERR_UNKNOWN self.ob_mpi = ierr RuntimeError.__init__(self, self.ob_mpi) def __eq__(self, object error): cdef int ierr = self.ob_mpi return (ierr == error) def __ne__(self, object error): cdef int ierr = self.ob_mpi return (ierr != error) def __lt__(self, object error): cdef int ierr = self.ob_mpi return (ierr < error) def __le__(self, object error): cdef int ierr = self.ob_mpi return (ierr <= error) def __gt__(self, object error): cdef int ierr = self.ob_mpi return (ierr > error) def __ge__(self, object error): cdef int ierr = self.ob_mpi return (ierr >= error) def __hash__(self): return hash(self.ob_mpi) def __bool__(self): cdef int ierr = self.ob_mpi return ierr != MPI_SUCCESS __nonzero__ = __bool__ def __int__(self): return self.ob_mpi def __repr__(self): return "MPI.Exception(%d)" % self.ob_mpi def __str__(self): if not mpi_active(): return "error code: %d" % self.ob_mpi return self.Get_error_string() def Get_error_code(self): """ Error code """ cdef int errorcode = MPI_SUCCESS errorcode = self.ob_mpi return errorcode error_code = property(Get_error_code, doc="error code") def Get_error_class(self): """ Error class """ cdef int errorclass = MPI_SUCCESS CHKERR( MPI_Error_class(self.ob_mpi, &errorclass) ) return errorclass error_class = property(Get_error_class, doc="error class") def Get_error_string(self): """ Error string """ cdef char string[MPI_MAX_ERROR_STRING+1] cdef int resultlen = 0 CHKERR( MPI_Error_string(self.ob_mpi, string, &resultlen) ) return tompistr(string, resultlen) error_string = property(Get_error_string, doc="error string") mpi4py-3.0.3/src/mpi4py/MPI/attrimpl.pxi0000644000175000017500000001462513200562156021021 0ustar dalcinldalcinl00000000000000#------------------------------------------------------------------------------ @cython.final @cython.internal cdef class _p_keyval: cdef public object copy_fn cdef public object delete_fn cdef public bint nopython def __cinit__(self, copy_fn, delete_fn, nopython): if copy_fn is False: copy_fn = None if delete_fn is False: delete_fn = None if delete_fn is True: delete_fn = None self.copy_fn = copy_fn self.delete_fn = delete_fn self.nopython = nopython cdef dict type_keyval = {} cdef dict comm_keyval = {} cdef dict win_keyval = {} _keyval_registry = { 'Datatype' : type_keyval, 'Comm' : comm_keyval, 'Win' : win_keyval, } #------------------------------------------------------------------------------ ctypedef fused PyMPI_attr_type: MPI_Datatype MPI_Comm MPI_Win cdef inline object PyMPI_attr_call( object function, PyMPI_attr_type hdl, int keyval, object attrval): cdef object ob cdef object result if PyMPI_attr_type is MPI_Datatype: ob = new_Datatype(hdl) if PyMPI_attr_type is MPI_Comm: ob = new_Comm(hdl) if PyMPI_attr_type is MPI_Win: ob = new_Win (hdl) try: result = function(ob, keyval, attrval) finally: if PyMPI_attr_type is MPI_Datatype: (ob).ob_mpi = MPI_DATATYPE_NULL if PyMPI_attr_type is MPI_Comm: (ob).ob_mpi = MPI_COMM_NULL if PyMPI_attr_type is MPI_Win: (ob).ob_mpi = MPI_WIN_NULL return result cdef inline int PyMPI_attr_copy( PyMPI_attr_type hdl, int keyval, void *extra_state, void *attrval_in, void *attrval_out, int *flag) except -1: if flag != NULL: flag[0] = 0 cdef _p_keyval state = <_p_keyval>extra_state if state.copy_fn is None: return 0 cdef int p = not state.nopython if p: assert attrval_in != NULL cdef object attrval if p: attrval = attrval_in else: attrval = PyLong_FromVoidPtr(attrval_in) if state.copy_fn is not True: attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) if attrval is NotImplemented: return 0 cdef void **outval = attrval_out if p: outval[0] = attrval else: outval[0] = PyLong_AsVoidPtr(attrval) if flag != NULL: flag[0] = 1 if p: Py_INCREF(attrval) Py_INCREF(state) return 0 cdef inline int PyMPI_attr_delete( PyMPI_attr_type hdl, int keyval, void *attrval_in, void *extra_state) except -1: cdef _p_keyval state = <_p_keyval>extra_state cdef int p = not state.nopython if p: assert attrval_in != NULL cdef object attrval if p: attrval = attrval_in else: attrval = PyLong_FromVoidPtr(attrval_in) if state.delete_fn is not None: PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) if p: Py_DECREF(attrval) Py_DECREF(state) return 0 cdef inline int PyMPI_attr_copy_cb( PyMPI_attr_type hdl, int keyval, void *extra_state, void *attrval_in, void *attrval_out, int *flag, ) except MPI_ERR_UNKNOWN with gil: cdef int ierr = MPI_SUCCESS cdef object exc try: PyMPI_attr_copy(hdl, keyval, extra_state, attrval_in, attrval_out, flag) except MPIException as exc: print_traceback() ierr = exc.Get_error_code() except: print_traceback() ierr = MPI_ERR_OTHER return ierr cdef inline int PyMPI_attr_delete_cb( PyMPI_attr_type hdl, int keyval, void *attrval, void *extra_state, ) except MPI_ERR_UNKNOWN with gil: cdef int ierr = MPI_SUCCESS cdef object exc try: PyMPI_attr_delete(hdl, keyval, attrval, extra_state) except MPIException as exc: print_traceback() ierr = exc.Get_error_code() except: print_traceback() ierr = MPI_ERR_OTHER return ierr @cython.callspec("MPIAPI") cdef int PyMPI_attr_copy_fn(PyMPI_attr_type hdl, int keyval, void *extra_state, void *attrval_in, void *attrval_out, int *flag) nogil: if flag != NULL: flag[0] = 0 if extra_state == NULL: return MPI_ERR_INTERN if attrval_out == NULL: return MPI_ERR_INTERN if not Py_IsInitialized(): return MPI_SUCCESS return PyMPI_attr_copy_cb(hdl, keyval, extra_state, attrval_in, attrval_out, flag) @cython.callspec("MPIAPI") cdef int PyMPI_attr_delete_fn(PyMPI_attr_type hdl, int keyval, void *attrval, void *extra_state) nogil: if extra_state == NULL: return MPI_ERR_INTERN if not Py_IsInitialized(): return MPI_SUCCESS return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) #------------------------------------------------------------------------------ cdef inline _p_keyval PyMPI_attr_state( PyMPI_attr_type hdl, int keyval): hdl # unused if PyMPI_attr_type is MPI_Datatype: return <_p_keyval>type_keyval.get(keyval) elif PyMPI_attr_type is MPI_Comm: return <_p_keyval>comm_keyval.get(keyval) elif PyMPI_attr_type is MPI_Win: return <_p_keyval>win_keyval.get(keyval) cdef inline object PyMPI_attr_get( PyMPI_attr_type hdl, int keyval, void *attrval): cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) if state is not None and not state.nopython: return attrval else: return PyLong_FromVoidPtr(attrval) cdef inline int PyMPI_attr_set( PyMPI_attr_type hdl, int keyval, object attrval, ) except -1: cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) cdef void *valptr = NULL if state is not None and not state.nopython: valptr = attrval else: valptr = PyLong_AsVoidPtr(attrval) if PyMPI_attr_type is MPI_Datatype: CHKERR( MPI_Type_set_attr(hdl, keyval, valptr) ) if PyMPI_attr_type is MPI_Comm: CHKERR( MPI_Comm_set_attr(hdl, keyval, valptr) ) if PyMPI_attr_type is MPI_Win: CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) if state is not None: if not state.nopython: Py_INCREF(attrval) Py_INCREF(state) return 0 #------------------------------------------------------------------------------ mpi4py-3.0.3/src/mpi4py/MPI/Win.pyx0000644000175000017500000005120313200562156017733 0ustar dalcinldalcinl00000000000000# Create flavors # -------------- WIN_FLAVOR_CREATE = MPI_WIN_FLAVOR_CREATE WIN_FLAVOR_ALLOCATE = MPI_WIN_FLAVOR_ALLOCATE WIN_FLAVOR_DYNAMIC = MPI_WIN_FLAVOR_DYNAMIC WIN_FLAVOR_SHARED = MPI_WIN_FLAVOR_SHARED # Memory model # ------------ WIN_SEPARATE = MPI_WIN_SEPARATE WIN_UNIFIED = MPI_WIN_UNIFIED # Assertion modes # --------------- MODE_NOCHECK = MPI_MODE_NOCHECK MODE_NOSTORE = MPI_MODE_NOSTORE MODE_NOPUT = MPI_MODE_NOPUT MODE_NOPRECEDE = MPI_MODE_NOPRECEDE MODE_NOSUCCEED = MPI_MODE_NOSUCCEED # Lock types # ---------- LOCK_EXCLUSIVE = MPI_LOCK_EXCLUSIVE LOCK_SHARED = MPI_LOCK_SHARED cdef class Win: """ Window """ def __cinit__(self, Win win=None): self.ob_mpi = MPI_WIN_NULL if win is None: return self.ob_mpi = win.ob_mpi self.ob_mem = win.ob_mem def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_Win(&self.ob_mpi) ) def __richcmp__(self, other, int op): if not isinstance(other, Win): return NotImplemented cdef Win s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_WIN_NULL # Window Creation # --------------- @classmethod def Create(cls, memory, int disp_unit=1, Info info=INFO_NULL, Intracomm comm=COMM_SELF): """ Create an window object for one-sided communication """ cdef void *base = NULL cdef MPI_Aint size = 0 if memory is __BOTTOM__: base = MPI_BOTTOM memory = None elif memory is not None: memory = getbuffer_w(memory, &base, &size) cdef Win win = Win.__new__(Win) with nogil: CHKERR( MPI_Win_create( base, size, disp_unit, info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) win_set_eh(win.ob_mpi) win.ob_mem = memory return win @classmethod def Allocate(cls, Aint size, int disp_unit=1, Info info=INFO_NULL, Intracomm comm=COMM_SELF): """ Create an window object for one-sided communication """ cdef void *base = NULL cdef Win win = Win.__new__(Win) with nogil: CHKERR( MPI_Win_allocate( size, disp_unit, info.ob_mpi, comm.ob_mpi, &base, &win.ob_mpi) ) win_set_eh(win.ob_mpi) return win @classmethod def Allocate_shared(cls, Aint size, int disp_unit=1, Info info=INFO_NULL, Intracomm comm=COMM_SELF): """ Create an window object for one-sided communication """ cdef void *base = NULL cdef Win win = Win.__new__(Win) with nogil: CHKERR( MPI_Win_allocate_shared( size, disp_unit, info.ob_mpi, comm.ob_mpi, &base, &win.ob_mpi) ) win_set_eh(win.ob_mpi) return win def Shared_query(self, int rank): """ Query the process-local address for remote memory segments created with `Win.Allocate_shared()` """ cdef void *base = NULL cdef MPI_Aint size = 0 cdef int disp_unit = 1 with nogil: CHKERR( MPI_Win_shared_query( self.ob_mpi, rank, &size, &disp_unit, &base) ) return (asbuffer(self, base, size, 0), disp_unit) @classmethod def Create_dynamic(cls, Info info=INFO_NULL, Intracomm comm=COMM_SELF): """ Create an window object for one-sided communication """ cdef Win win = Win.__new__(Win) with nogil: CHKERR( MPI_Win_create_dynamic( info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) win_set_eh(win.ob_mpi) win.ob_mem = {} return win def Attach(self, memory): """ Attach a local memory region """ cdef void *base = NULL cdef MPI_Aint size = 0 memory = getbuffer_w(memory, &base, &size) with nogil: CHKERR( MPI_Win_attach(self.ob_mpi, base, size) ) try: (self.ob_mem)[base] = memory except: pass def Detach(self, memory): """ Detach a local memory region """ cdef void *base = NULL memory = getbuffer_w(memory, &base, NULL) with nogil: CHKERR( MPI_Win_detach(self.ob_mpi, base) ) try: del (self.ob_mem)[base] except: pass def Free(self): """ Free a window """ with nogil: CHKERR( MPI_Win_free(&self.ob_mpi) ) self.ob_mem = None # Window Info # ----------- def Set_info(self, Info info): """ Set new values for the hints associated with a window """ with nogil: CHKERR( MPI_Win_set_info(self.ob_mpi, info.ob_mpi) ) def Get_info(self): """ Return the hints for a windows that are currently in use """ cdef Info info = Info.__new__(Info) with nogil: CHKERR( MPI_Win_get_info( self.ob_mpi, &info.ob_mpi) ) return info property info: """window info""" def __get__(self): return self.Get_info() def __set__(self, info): self.Set_info(info) # Window Group # ------------- def Get_group(self): """ Return a duplicate of the group of the communicator used to create the window """ cdef Group group = Group() with nogil: CHKERR( MPI_Win_get_group(self.ob_mpi, &group.ob_mpi) ) return group property group: """window group""" def __get__(self): return self.Get_group() # Window Attributes # ----------------- def Get_attr(self, int keyval): """ Retrieve attribute value by key """ cdef void *attrval = NULL cdef int flag = 0 CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) if flag == 0: return None if attrval == NULL: return 0 # MPI-2 predefined attribute keyvals if keyval == MPI_WIN_BASE: return attrval elif keyval == MPI_WIN_SIZE: return (attrval)[0] elif keyval == MPI_WIN_DISP_UNIT: return (attrval)[0] # MPI-3 predefined attribute keyvals elif keyval == MPI_WIN_CREATE_FLAVOR: return (attrval)[0] elif keyval == MPI_WIN_MODEL: return (attrval)[0] # user-defined attribute keyval return PyMPI_attr_get(self.ob_mpi, keyval, attrval) def Set_attr(self, int keyval, object attrval): """ Store attribute value associated with a key """ PyMPI_attr_set(self.ob_mpi, keyval, attrval) def Delete_attr(self, int keyval): """ Delete attribute value associated with a key """ CHKERR( MPI_Win_delete_attr(self.ob_mpi, keyval) ) @classmethod def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): """ Create a new attribute key for windows """ cdef object state = _p_keyval(copy_fn, delete_fn, nopython) cdef int keyval = MPI_KEYVAL_INVALID cdef MPI_Win_copy_attr_function *_copy = PyMPI_attr_copy_fn cdef MPI_Win_delete_attr_function *_del = PyMPI_attr_delete_fn cdef void *extra_state = state CHKERR( MPI_Win_create_keyval(_copy, _del, &keyval, extra_state) ) win_keyval[keyval] = state return keyval @classmethod def Free_keyval(cls, int keyval): """ Free and attribute key for windows """ cdef int keyval_save = keyval CHKERR( MPI_Win_free_keyval(&keyval) ) try: del win_keyval[keyval_save] except KeyError: pass return keyval property attrs: "window attributes" def __get__(self): cdef void *base = NULL cdef MPI_Aint size = 0 cdef int disp_unit = 1 win_get_base(self.ob_mpi, &base) win_get_size(self.ob_mpi, &size) win_get_unit(self.ob_mpi, &disp_unit) return (base, size, disp_unit) property flavor: """window create flavor""" def __get__(self): cdef int keyval = MPI_WIN_CREATE_FLAVOR cdef int *attrval = NULL cdef int flag = 0 if keyval != MPI_KEYVAL_INVALID: CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) if flag and attrval != NULL: return attrval[0] return MPI_WIN_FLAVOR_CREATE property model: """window memory model""" def __get__(self): cdef int keyval = MPI_WIN_MODEL cdef int *attrval = NULL cdef int flag = 0 if keyval != MPI_KEYVAL_INVALID: CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) if flag and attrval != NULL: return attrval[0] return MPI_WIN_SEPARATE def tomemory(self): """ Return window memory buffer """ return getbuffer(self, 0, 1) # buffer interface (PEP 3118) def __getbuffer__(self, Py_buffer *view, int flags): if view.obj == Py_None: Py_CLEAR(view.obj) cdef void *base = NULL cdef MPI_Aint size = 0 win_get_base(self.ob_mpi, &base) win_get_size(self.ob_mpi, &size) PyBuffer_FillInfo(view, self, base, size, 0, flags) # buffer interface (legacy) def __getsegcount__(self, Py_ssize_t *lenp): if lenp == NULL: return 1 cdef MPI_Aint size = 0 win_get_size(self.ob_mpi, &size) lenp[0] = size return 1 def __getreadbuffer__(self, Py_ssize_t idx, void **bufp): if idx != 0: raise SystemError("accessing non-existent buffer segment") cdef MPI_Aint size = 0 win_get_base(self.ob_mpi, bufp) win_get_size(self.ob_mpi, &size) return size def __getwritebuffer__(self, Py_ssize_t idx, void **bufp): if idx != 0: raise SystemError("accessing non-existent buffer segment") cdef MPI_Aint size = 0 win_get_base(self.ob_mpi, bufp) win_get_size(self.ob_mpi, &size) return size # Communication Operations # ------------------------ def Put(self, origin, int target_rank, target=None): """ Put data into a memory window on a remote process. """ cdef _p_msg_rma msg = message_rma() msg.for_put(origin, target_rank, target) with nogil: CHKERR( MPI_Put( msg.oaddr, msg.ocount, msg.otype, target_rank, msg.tdisp, msg.tcount, msg.ttype, self.ob_mpi) ) def Get(self, origin, int target_rank, target=None): """ Get data from a memory window on a remote process. """ cdef _p_msg_rma msg = message_rma() msg.for_get(origin, target_rank, target) with nogil: CHKERR( MPI_Get( msg.oaddr, msg.ocount, msg.otype, target_rank, msg.tdisp, msg.tcount, msg.ttype, self.ob_mpi) ) def Accumulate(self, origin, int target_rank, target=None, Op op=SUM): """ Accumulate data into the target process """ cdef _p_msg_rma msg = message_rma() msg.for_acc(origin, target_rank, target) with nogil: CHKERR( MPI_Accumulate( msg.oaddr, msg.ocount, msg.otype, target_rank, msg.tdisp, msg.tcount, msg.ttype, op.ob_mpi, self.ob_mpi) ) def Get_accumulate(self, origin, result, int target_rank, target=None, Op op=SUM): """ Fetch-and-accumulate data into the target process """ cdef _p_msg_rma msg = message_rma() msg.for_get_acc(origin, result, target_rank, target) with nogil: CHKERR( MPI_Get_accumulate( msg.oaddr, msg.ocount, msg.otype, msg.raddr, msg.rcount, msg.rtype, target_rank, msg.tdisp, msg.tcount, msg.ttype, op.ob_mpi, self.ob_mpi) ) def Fetch_and_op(self, origin, result,int target_rank, Aint target_disp=0, Op op=SUM): """ Perform one-sided read-modify-write """ cdef _p_msg_rma msg = message_rma() msg.for_fetch_op(origin, result, target_rank, target_disp) with nogil: CHKERR( MPI_Fetch_and_op( msg.oaddr, msg.raddr, msg.ttype, target_rank, target_disp, op.ob_mpi, self.ob_mpi) ) def Compare_and_swap(self, origin, compare, result, int target_rank, Aint target_disp=0): """ Perform one-sided atomic compare-and-swap """ cdef _p_msg_rma msg = message_rma() msg.for_cmp_swap(origin, compare, result, target_rank, target_disp) with nogil: CHKERR( MPI_Compare_and_swap( msg.oaddr, msg.caddr, msg.raddr, msg.ttype, target_rank, target_disp, self.ob_mpi) ) # Request-based RMA Communication Operations # ------------------------------------------ def Rput(self, origin, int target_rank, target=None): """ Put data into a memory window on a remote process. """ cdef _p_msg_rma msg = message_rma() msg.for_put(origin, target_rank, target) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Rput( msg.oaddr, msg.ocount, msg.otype, target_rank, msg.tdisp, msg.tcount, msg.ttype, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = msg return request def Rget(self, origin, int target_rank, target=None): """ Get data from a memory window on a remote process. """ cdef _p_msg_rma msg = message_rma() msg.for_get(origin, target_rank, target) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Rget( msg.oaddr, msg.ocount, msg.otype, target_rank, msg.tdisp, msg.tcount, msg.ttype, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = msg return request def Raccumulate(self, origin, int target_rank, target=None, Op op=SUM): """ Fetch-and-accumulate data into the target process """ cdef _p_msg_rma msg = message_rma() msg.for_acc(origin, target_rank, target) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Raccumulate( msg.oaddr, msg.ocount, msg.otype, target_rank, msg.tdisp, msg.tcount, msg.ttype, op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = msg return request def Rget_accumulate(self, origin, result, int target_rank, target=None, Op op=SUM): """ Accumulate data into the target process using remote memory access. """ cdef _p_msg_rma msg = message_rma() msg.for_get_acc(origin, result, target_rank, target) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Rget_accumulate( msg.oaddr, msg.ocount, msg.otype, msg.raddr, msg.rcount, msg.rtype, target_rank, msg.tdisp, msg.tcount, msg.ttype, op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) request.ob_buf = msg return request # Synchronization Calls # --------------------- # Fence # ----- def Fence(self, int assertion=0): """ Perform an MPI fence synchronization on a window """ with nogil: CHKERR( MPI_Win_fence(assertion, self.ob_mpi) ) # General Active Target Synchronization # ------------------------------------- def Start(self, Group group, int assertion=0): """ Start an RMA access epoch for MPI """ with nogil: CHKERR( MPI_Win_start( group.ob_mpi, assertion, self.ob_mpi) ) def Complete(self): """ Completes an RMA operations begun after an `Win.Start()` """ with nogil: CHKERR( MPI_Win_complete(self.ob_mpi) ) def Post(self, Group group, int assertion=0): """ Start an RMA exposure epoch """ with nogil: CHKERR( MPI_Win_post( group.ob_mpi, assertion, self.ob_mpi) ) def Wait(self): """ Complete an RMA exposure epoch begun with `Win.Post()` """ with nogil: CHKERR( MPI_Win_wait(self.ob_mpi) ) def Test(self): """ Test whether an RMA exposure epoch has completed """ cdef int flag = 0 with nogil: CHKERR( MPI_Win_test(self.ob_mpi, &flag) ) return flag # Lock # ---- def Lock(self, int rank, int lock_type=LOCK_EXCLUSIVE, int assertion=0): """ Begin an RMA access epoch at the target process """ with nogil: CHKERR( MPI_Win_lock( lock_type, rank, assertion, self.ob_mpi) ) def Unlock(self, int rank): """ Complete an RMA access epoch at the target process """ with nogil: CHKERR( MPI_Win_unlock(rank, self.ob_mpi) ) def Lock_all(self, int assertion=0): """ Begin an RMA access epoch at all processes """ with nogil: CHKERR( MPI_Win_lock_all(assertion, self.ob_mpi) ) def Unlock_all(self): """ Complete an RMA access epoch at all processes """ with nogil: CHKERR( MPI_Win_unlock_all(self.ob_mpi) ) # Flush and Sync # -------------- def Flush(self, int rank): """ Complete all outstanding RMA operations at the given target """ with nogil: CHKERR( MPI_Win_flush(rank, self.ob_mpi) ) def Flush_all(self): """ Complete all outstanding RMA operations at all targets """ with nogil: CHKERR( MPI_Win_flush_all(self.ob_mpi) ) def Flush_local(self, int rank): """ Complete locally all outstanding RMA operations at the given target """ with nogil: CHKERR( MPI_Win_flush_local(rank, self.ob_mpi) ) def Flush_local_all(self): """ Complete locally all outstanding RMA opera- tions at all targets """ with nogil: CHKERR( MPI_Win_flush_local_all(self.ob_mpi) ) def Sync(self): """ Synchronize public and private copies of the given window """ with nogil: CHKERR( MPI_Win_sync(self.ob_mpi) ) # Error Handling # -------------- def Get_errhandler(self): """ Get the error handler for a window """ cdef Errhandler errhandler = Errhandler.__new__(Errhandler) CHKERR( MPI_Win_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) return errhandler def Set_errhandler(self, Errhandler errhandler): """ Set the error handler for a window """ CHKERR( MPI_Win_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) def Call_errhandler(self, int errorcode): """ Call the error handler installed on a window """ CHKERR( MPI_Win_call_errhandler(self.ob_mpi, errorcode) ) # Naming Objects # -------------- def Get_name(self): """ Get the print name associated with the window """ cdef char name[MPI_MAX_OBJECT_NAME+1] cdef int nlen = 0 CHKERR( MPI_Win_get_name(self.ob_mpi, name, &nlen) ) return tompistr(name, nlen) def Set_name(self, name): """ Set the print name associated with the window """ cdef char *cname = NULL name = asmpistr(name, &cname) CHKERR( MPI_Win_set_name(self.ob_mpi, cname) ) property name: """window name""" def __get__(self): return self.Get_name() def __set__(self, value): self.Set_name(value) # Fortran Handle # -------------- def py2f(self): """ """ return MPI_Win_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef Win win = Win.__new__(Win) win.ob_mpi = MPI_Win_f2c(arg) return win cdef Win __WIN_NULL__ = new_Win(MPI_WIN_NULL) # Predefined window handles # ------------------------- WIN_NULL = __WIN_NULL__ #: Null window handle mpi4py-3.0.3/src/mpi4py/MPI/winimpl.pxi0000644000175000017500000000162713200562156020642 0ustar dalcinldalcinl00000000000000#------------------------------------------------------------------------------ cdef inline int win_get_base(MPI_Win win,void **base) except -1: cdef int flag = 0 cdef void *attr = NULL CHKERR( MPI_Win_get_attr(win, MPI_WIN_BASE, &attr, &flag) ) base[0] = attr if flag and attr != NULL else NULL return 0 cdef inline int win_get_size(MPI_Win win,MPI_Aint *size) except -1: cdef int flag = 0 cdef MPI_Aint *attr = NULL CHKERR( MPI_Win_get_attr(win, MPI_WIN_SIZE, &attr, &flag) ) size[0] = attr[0] if flag and attr != NULL else 0 return 0 cdef inline int win_get_unit(MPI_Win win,int *disp_unit) except -1: cdef int flag = 0 cdef int *attr = NULL CHKERR( MPI_Win_get_attr(win, MPI_WIN_DISP_UNIT, &attr, &flag) ) disp_unit[0] = attr[0] if flag and attr != NULL else 1 return 0 #------------------------------------------------------------------------------ mpi4py-3.0.3/src/mpi4py/MPI/stdlib.pxi0000644000175000017500000000103713200562156020437 0ustar dalcinldalcinl00000000000000#------------------------------------------------------------------------------ cdef extern from * nogil: # "string.h" int memcmp(const void *, const void *, size_t) void *memset(void *, int, size_t) void *memcpy(void *, const void *, size_t) void *memmove(void *, const void *, size_t) cdef extern from * nogil: # "stdio.h" ctypedef struct FILE FILE *stdin, *stdout, *stderr int fprintf(FILE *, char *, ...) int fflush(FILE *) #------------------------------------------------------------------------------ mpi4py-3.0.3/src/mpi4py/MPI/mpierrhdl.pxi0000644000175000017500000000214213200562156021142 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- cdef inline int comm_set_eh(MPI_Comm ob) nogil except -1: if ob == MPI_COMM_NULL: return 0 cdef int opt = options.errors if opt == 0: pass elif opt == 1: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_RETURN) ) elif opt == 2: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) return 0 cdef inline int win_set_eh(MPI_Win ob) nogil except -1: if ob == MPI_WIN_NULL: return 0 cdef int opt = options.errors if opt == 0: pass elif opt == 1: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_RETURN) ) elif opt == 2: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) return 0 cdef inline int file_set_eh(MPI_File ob) nogil except -1: if ob == MPI_FILE_NULL: return 0 cdef int opt = options.errors if opt == 0: pass elif opt == 1: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_RETURN) ) elif opt == 2: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) return 0 # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/typestr.pxi0000644000175000017500000001035713200562156020675 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- def _typecode(Datatype datatype): """ Map MPI datatype to typecode string """ cdef const char *tc = Datatype2String(datatype.ob_mpi) return pystr(tc) if tc != NULL else None # ----------------------------------------------------------------------------- cdef inline const char* Datatype2String(MPI_Datatype datatype) nogil: if datatype == MPI_DATATYPE_NULL: return NULL # MPI elif datatype == MPI_LB : return NULL elif datatype == MPI_UB : return NULL elif datatype == MPI_PACKED : return "B" elif datatype == MPI_BYTE : return "B" elif datatype == MPI_AINT : return "p" elif datatype == MPI_OFFSET : if sizeof(MPI_Offset) == sizeof(MPI_Aint) : return "p" elif sizeof(MPI_Offset) == sizeof(long long) : return "q" elif sizeof(MPI_Offset) == sizeof(long) : return "l" elif sizeof(MPI_Offset) == sizeof(int) : return "i" else : return NULL # C - character elif datatype == MPI_CHAR : return "c" elif datatype == MPI_WCHAR : return NULL # C - (signed) integral elif datatype == MPI_SIGNED_CHAR : return "b" elif datatype == MPI_SHORT : return "h" elif datatype == MPI_INT : return "i" elif datatype == MPI_LONG : return "l" elif datatype == MPI_LONG_LONG : return "q" # C - unsigned integral elif datatype == MPI_UNSIGNED_CHAR : return "B" elif datatype == MPI_UNSIGNED_SHORT : return "H" elif datatype == MPI_UNSIGNED : return "I" elif datatype == MPI_UNSIGNED_LONG : return "L" elif datatype == MPI_UNSIGNED_LONG_LONG : return "Q" # C - (real) floating elif datatype == MPI_FLOAT : return "f" elif datatype == MPI_DOUBLE : return "d" elif datatype == MPI_LONG_DOUBLE : return "g" # C99 - boolean elif datatype == MPI_C_BOOL : return "?" # C99 - integral elif datatype == MPI_INT8_T : return "i1" elif datatype == MPI_INT16_T : return "i2" elif datatype == MPI_INT32_T : return "i4" elif datatype == MPI_INT64_T : return "i8" elif datatype == MPI_UINT8_T : return "u1" elif datatype == MPI_UINT16_T : return "u2" elif datatype == MPI_UINT32_T : return "u4" elif datatype == MPI_UINT64_T : return "u8" # C99 - complex floating elif datatype == MPI_C_COMPLEX : return "F" elif datatype == MPI_C_FLOAT_COMPLEX : return "F" elif datatype == MPI_C_DOUBLE_COMPLEX : return "D" elif datatype == MPI_C_LONG_DOUBLE_COMPLEX : return "G" # C++ - boolean elif datatype == MPI_CXX_BOOL : return "?" # C++ - complex floating elif datatype == MPI_CXX_FLOAT_COMPLEX : return "F" elif datatype == MPI_CXX_DOUBLE_COMPLEX : return "D" elif datatype == MPI_CXX_LONG_DOUBLE_COMPLEX : return "G" # Fortran elif datatype == MPI_CHARACTER : return "c" elif datatype == MPI_LOGICAL : return NULL elif datatype == MPI_INTEGER : return "i" elif datatype == MPI_REAL : return "f" elif datatype == MPI_DOUBLE_PRECISION : return "d" elif datatype == MPI_COMPLEX : return "F" elif datatype == MPI_DOUBLE_COMPLEX : return "D" # Fortran 90 elif datatype == MPI_LOGICAL1 : return NULL elif datatype == MPI_LOGICAL2 : return NULL elif datatype == MPI_LOGICAL4 : return NULL elif datatype == MPI_LOGICAL8 : return NULL elif datatype == MPI_INTEGER1 : return "i1" elif datatype == MPI_INTEGER2 : return "i2" elif datatype == MPI_INTEGER4 : return "i4" elif datatype == MPI_INTEGER8 : return "i8" elif datatype == MPI_INTEGER16 : return "i16" elif datatype == MPI_REAL2 : return "f2" elif datatype == MPI_REAL4 : return "f4" elif datatype == MPI_REAL8 : return "f8" elif datatype == MPI_REAL16 : return "f16" elif datatype == MPI_COMPLEX4 : return "c4" elif datatype == MPI_COMPLEX8 : return "c8" elif datatype == MPI_COMPLEX16 : return "c16" elif datatype == MPI_COMPLEX32 : return "c32" else : return NULL # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/Exception.pyx0000644000175000017500000000750213200562156021137 0ustar dalcinldalcinl00000000000000include "ExceptionP.pyx" #include "ExceptionC.pyx" MPIException = Exception # Actually no errors SUCCESS = MPI_SUCCESS ERR_LASTCODE = MPI_ERR_LASTCODE # MPI-1 Error classes # ------------------- # MPI-1 Objects ERR_COMM = MPI_ERR_COMM ERR_GROUP = MPI_ERR_GROUP ERR_TYPE = MPI_ERR_TYPE ERR_REQUEST = MPI_ERR_REQUEST ERR_OP = MPI_ERR_OP # Communication argument parameters ERR_BUFFER = MPI_ERR_BUFFER ERR_COUNT = MPI_ERR_COUNT ERR_TAG = MPI_ERR_TAG ERR_RANK = MPI_ERR_RANK ERR_ROOT = MPI_ERR_ROOT ERR_TRUNCATE = MPI_ERR_TRUNCATE # Multiple completion ERR_IN_STATUS = MPI_ERR_IN_STATUS ERR_PENDING = MPI_ERR_PENDING # Topology argument parameters ERR_TOPOLOGY = MPI_ERR_TOPOLOGY ERR_DIMS = MPI_ERR_DIMS # Other arguments parameters ERR_ARG = MPI_ERR_ARG # Other errors ERR_OTHER = MPI_ERR_OTHER ERR_UNKNOWN = MPI_ERR_UNKNOWN ERR_INTERN = MPI_ERR_INTERN # MPI-2 Error classes # ------------------- # MPI-2 Objects ERR_INFO = MPI_ERR_INFO ERR_FILE = MPI_ERR_FILE ERR_WIN = MPI_ERR_WIN # Object attributes ERR_KEYVAL = MPI_ERR_KEYVAL # Info Object ERR_INFO_KEY = MPI_ERR_INFO_KEY ERR_INFO_VALUE = MPI_ERR_INFO_VALUE ERR_INFO_NOKEY = MPI_ERR_INFO_NOKEY # Input/Ouput ERR_ACCESS = MPI_ERR_ACCESS ERR_AMODE = MPI_ERR_AMODE ERR_BAD_FILE = MPI_ERR_BAD_FILE ERR_FILE_EXISTS = MPI_ERR_FILE_EXISTS ERR_FILE_IN_USE = MPI_ERR_FILE_IN_USE ERR_NO_SPACE = MPI_ERR_NO_SPACE ERR_NO_SUCH_FILE = MPI_ERR_NO_SUCH_FILE ERR_IO = MPI_ERR_IO ERR_READ_ONLY = MPI_ERR_READ_ONLY ERR_CONVERSION = MPI_ERR_CONVERSION ERR_DUP_DATAREP = MPI_ERR_DUP_DATAREP ERR_UNSUPPORTED_DATAREP = MPI_ERR_UNSUPPORTED_DATAREP ERR_UNSUPPORTED_OPERATION = MPI_ERR_UNSUPPORTED_OPERATION # Dynamic Process Management ERR_NAME = MPI_ERR_NAME ERR_NO_MEM = MPI_ERR_NO_MEM ERR_NOT_SAME = MPI_ERR_NOT_SAME ERR_PORT = MPI_ERR_PORT ERR_QUOTA = MPI_ERR_QUOTA ERR_SERVICE = MPI_ERR_SERVICE ERR_SPAWN = MPI_ERR_SPAWN # Windows ERR_BASE = MPI_ERR_BASE ERR_SIZE = MPI_ERR_SIZE ERR_DISP = MPI_ERR_DISP ERR_ASSERT = MPI_ERR_ASSERT ERR_LOCKTYPE = MPI_ERR_LOCKTYPE ERR_RMA_CONFLICT = MPI_ERR_RMA_CONFLICT ERR_RMA_SYNC = MPI_ERR_RMA_SYNC ERR_RMA_RANGE = MPI_ERR_RMA_RANGE ERR_RMA_ATTACH = MPI_ERR_RMA_ATTACH ERR_RMA_SHARED = MPI_ERR_RMA_SHARED ERR_RMA_FLAVOR = MPI_ERR_RMA_FLAVOR def Get_error_class(int errorcode): """ Convert an *error code* into an *error class* """ cdef int errorclass = MPI_SUCCESS CHKERR( MPI_Error_class(errorcode, &errorclass) ) return errorclass def Get_error_string(int errorcode): """ Return the *error string* for a given *error class* or *error code* """ cdef char string[MPI_MAX_ERROR_STRING+1] cdef int resultlen = 0 CHKERR( MPI_Error_string(errorcode, string, &resultlen) ) return tompistr(string, resultlen) def Add_error_class(): """ Add an *error class* to the known error classes """ cdef int errorclass = MPI_SUCCESS CHKERR( MPI_Add_error_class(&errorclass) ) return errorclass def Add_error_code(int errorclass): """ Add an *error code* to an *error class* """ cdef int errorcode = MPI_SUCCESS CHKERR( MPI_Add_error_code(errorclass, &errorcode) ) return errorcode def Add_error_string(int errorcode, string): """ Associate an *error string* with an *error class* or *errorcode* """ cdef char *cstring = NULL string = asmpistr(string, &cstring) CHKERR( MPI_Add_error_string(errorcode, cstring) ) mpi4py-3.0.3/src/mpi4py/MPI/Status.pyx0000644000175000017500000001130313200562156020456 0ustar dalcinldalcinl00000000000000cdef class Status: """ Status """ def __cinit__(self, Status status=None): self.ob_mpi.MPI_SOURCE = MPI_ANY_SOURCE self.ob_mpi.MPI_TAG = MPI_ANY_TAG self.ob_mpi.MPI_ERROR = MPI_SUCCESS if status is None: return self.ob_mpi = status.ob_mpi def __richcmp__(self, other, int op): if not isinstance(other, Status): return NotImplemented cdef Status s = self, o = other cdef int ne = memcmp(&s.ob_mpi, &o.ob_mpi, sizeof(MPI_Status)) if op == Py_EQ: return (ne == 0) elif op == Py_NE: return (ne != 0) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def Get_source(self): """ Get message source """ return self.ob_mpi.MPI_SOURCE def Set_source(self, int source): """ Set message source """ self.ob_mpi.MPI_SOURCE = source property source: """source""" def __get__(self): return self.Get_source() def __set__(self, value): self.Set_source(value) def Get_tag(self): """ Get message tag """ return self.ob_mpi.MPI_TAG def Set_tag(self, int tag): """ Set message tag """ self.ob_mpi.MPI_TAG = tag property tag: """tag""" def __get__(self): return self.Get_tag() def __set__(self, value): self.Set_tag(value) def Get_error(self): """ Get message error """ return self.ob_mpi.MPI_ERROR def Set_error(self, int error): """ Set message error """ self.ob_mpi.MPI_ERROR = error property error: """error""" def __get__(self): return self.Get_error() def __set__(self, value): self.Set_error(value) def Get_count(self, Datatype datatype=BYTE): """ Get the number of *top level* elements """ cdef MPI_Datatype dtype = datatype.ob_mpi cdef int count = MPI_UNDEFINED CHKERR( MPI_Get_count(&self.ob_mpi, dtype, &count) ) return count property count: """byte count""" def __get__(self): return self.Get_count(__BYTE__) def Get_elements(self, Datatype datatype): """ Get the number of basic elements in a datatype """ cdef MPI_Datatype dtype = datatype.ob_mpi cdef MPI_Count elements = MPI_UNDEFINED CHKERR( MPI_Get_elements_x(&self.ob_mpi, dtype, &elements) ) return elements def Set_elements(self, Datatype datatype, Count count): """ Set the number of elements in a status .. note:: This should be only used when implementing query callback functions for generalized requests """ cdef MPI_Datatype dtype = datatype.ob_mpi CHKERR( MPI_Status_set_elements_x(&self.ob_mpi, dtype, count) ) def Is_cancelled(self): """ Test to see if a request was cancelled """ cdef int flag = 0 CHKERR( MPI_Test_cancelled(&self.ob_mpi, &flag) ) return flag def Set_cancelled(self, bint flag): """ Set the cancelled state associated with a status .. note:: This should be only used when implementing query callback functions for generalized requests """ CHKERR( MPI_Status_set_cancelled(&self.ob_mpi, flag) ) property cancelled: """ cancelled state """ def __get__(self): return self.Is_cancelled() def __set__(self, value): self.Set_cancelled(value) # Fortran Handle # -------------- def py2f(self): """ """ cdef Status status = self cdef Py_ssize_t i = 0 cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) cdef MPI_Status *c_status = &status.ob_mpi cdef MPI_Fint *f_status = NULL cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) CHKERR( MPI_Status_c2f(c_status, f_status) ) return [f_status[i] for i from 0 <= i < n] @classmethod def f2py(cls, arg): """ """ cdef Status status = Status.__new__(Status) cdef Py_ssize_t i = 0 cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) cdef MPI_Status *c_status = &status.ob_mpi cdef MPI_Fint *f_status = NULL cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) for i from 0 <= i < n: f_status[i] = arg[i] CHKERR( MPI_Status_f2c(f_status, c_status) ) return status mpi4py-3.0.3/src/mpi4py/MPI/commimpl.pxi0000644000175000017500000001113613200562156020774 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- cdef memory _buffer = None cdef inline int attach_buffer(ob, void **p, int *n) except -1: global _buffer cdef void *bptr = NULL cdef MPI_Aint blen = 0 _buffer = getbuffer_w(ob, &bptr, &blen) p[0] = bptr n[0] = clipcount(blen) return 0 cdef inline object detach_buffer(void *p, int n): global _buffer cdef object ob = None try: if (_buffer is not None and _buffer.view.buf == p and _buffer.view.obj != NULL): ob = _buffer.view.obj else: ob = tomemory(p, n) finally: _buffer = None return ob # ----------------------------------------------------------------------------- cdef object __UNWEIGHTED__ = MPI_UNWEIGHTED cdef object __WEIGHTS_EMPTY__ = MPI_WEIGHTS_EMPTY cdef object asarray_weights(object weights, int nweight, int **iweight): if weights is None: iweight[0] = MPI_UNWEIGHTED return None if weights is __UNWEIGHTED__: iweight[0] = MPI_UNWEIGHTED return None if weights is __WEIGHTS_EMPTY__: if nweight > 0: raise ValueError("empty weights but nonzero degree") iweight[0] = MPI_WEIGHTS_EMPTY return None return chkarray(weights, nweight, iweight) # ----------------------------------------------------------------------------- cdef inline int comm_neighbors_count(MPI_Comm comm, int *incoming, int *outgoing, ) except -1: cdef int topo = MPI_UNDEFINED cdef int size=0, ndims=0, rank=0, nneighbors=0 cdef int indegree=0, outdegree=0, weighted=0 CHKERR( MPI_Topo_test(comm, &topo) ) if topo == MPI_UNDEFINED: # XXX CHKERR( MPI_Comm_size(comm, &size) ) indegree = outdegree = size elif topo == MPI_CART: CHKERR( MPI_Cartdim_get(comm, &ndims) ) indegree = outdegree = 2*ndims elif topo == MPI_GRAPH: CHKERR( MPI_Comm_rank(comm, &rank) ) CHKERR( MPI_Graph_neighbors_count( comm, rank, &nneighbors) ) indegree = outdegree = nneighbors elif topo == MPI_DIST_GRAPH: CHKERR( MPI_Dist_graph_neighbors_count( comm, &indegree, &outdegree, &weighted) ) if incoming != NULL: incoming[0] = indegree if outgoing != NULL: outgoing[0] = outdegree return 0 # ----------------------------------------------------------------------------- cdef object allocate_lock = None if PY3: try: from _thread import allocate_lock except ImportError: from _dummy_thread import allocate_lock else: try: from thread import allocate_lock except ImportError: from dummy_thread import allocate_lock cdef int lock_keyval = MPI_KEYVAL_INVALID cdef dict lock_registry = {} cdef inline int lock_free_cb(MPI_Comm comm) \ except MPI_ERR_UNKNOWN with gil: try: del lock_registry[comm] except KeyError: pass return MPI_SUCCESS @cython.callspec("MPIAPI") cdef int lock_free_fn(MPI_Comm comm, int keyval, void *attrval, void *xstate) nogil: if comm == MPI_COMM_SELF: return MPI_Comm_free_keyval(&lock_keyval) if not Py_IsInitialized(): return MPI_SUCCESS if lock_registry == NULL: return MPI_SUCCESS return lock_free_cb(comm) cdef inline dict PyMPI_Lock_table(MPI_Comm comm): cdef dict table cdef int found = 0 cdef void *attrval = NULL if lock_keyval == MPI_KEYVAL_INVALID: CHKERR( MPI_Comm_create_keyval( MPI_COMM_NULL_COPY_FN, lock_free_fn, &lock_keyval, NULL) ) lock_registry[MPI_COMM_SELF] = table = {} CHKERR( MPI_Comm_set_attr(MPI_COMM_SELF, lock_keyval, table) ) CHKERR( MPI_Comm_get_attr(comm, lock_keyval, &attrval, &found) ) if not found: lock_registry[comm] = table = {} CHKERR( MPI_Comm_set_attr(comm, lock_keyval, table) ) else: if PYPY: table = lock_registry[comm] else: table = attrval return table cdef inline object PyMPI_Lock(MPI_Comm comm, object key): cdef dict table = PyMPI_Lock_table(comm) cdef object lock try: lock = table[key] except KeyError: lock = table[key] = allocate_lock() return lock def _lock_table(Comm comm): "Internal communicator lock table" return PyMPI_Lock_table(comm.ob_mpi) # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/Op.pyx0000664000175000017500000001324513426006675017573 0ustar dalcinldalcinl00000000000000cdef class Op: """ Op """ def __cinit__(self, Op op=None): self.ob_mpi = MPI_OP_NULL if op is None: return self.ob_mpi = op.ob_mpi self.ob_func = op.ob_func self.ob_usrid = op.ob_usrid def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_Op(&self.ob_mpi) ) op_user_del(&self.ob_usrid) def __richcmp__(self, other, int op): if not isinstance(other, Op): return NotImplemented cdef Op s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_OP_NULL def __call__(self, x, y): if self.ob_func != NULL: return self.ob_func(x, y) else: return op_user_py(self.ob_usrid, x, y, None) @classmethod def Create(cls, function, bint commute=False): """ Create a user-defined operation """ cdef Op op = Op.__new__(Op) cdef MPI_User_function *cfunction = NULL op.ob_usrid = op_user_new(function, &cfunction) CHKERR( MPI_Op_create(cfunction, commute, &op.ob_mpi) ) return op def Free(self): """ Free the operation """ CHKERR( MPI_Op_free(&self.ob_mpi) ) op_user_del(&self.ob_usrid) if self is __MAX__ : self.ob_mpi = MPI_MAX elif self is __MIN__ : self.ob_mpi = MPI_MIN elif self is __SUM__ : self.ob_mpi = MPI_SUM elif self is __PROD__ : self.ob_mpi = MPI_PROD elif self is __LAND__ : self.ob_mpi = MPI_LAND elif self is __BAND__ : self.ob_mpi = MPI_BAND elif self is __LOR__ : self.ob_mpi = MPI_LOR elif self is __BOR__ : self.ob_mpi = MPI_BOR elif self is __LXOR__ : self.ob_mpi = MPI_LXOR elif self is __BXOR__ : self.ob_mpi = MPI_BXOR elif self is __MAXLOC__ : self.ob_mpi = MPI_MAXLOC elif self is __MINLOC__ : self.ob_mpi = MPI_MINLOC elif self is __REPLACE__ : self.ob_mpi = MPI_REPLACE elif self is __NO_OP__ : self.ob_mpi = MPI_NO_OP # Process-local reduction # ----------------------- def Is_commutative(self): """ Query reduction operations for their commutativity """ cdef int flag = 0 CHKERR( MPI_Op_commutative(self.ob_mpi, &flag) ) return flag property is_commutative: """is commutative""" def __get__(self): return self.Is_commutative() def Reduce_local(self, inbuf, inoutbuf): """ Apply a reduction operator to local data """ # get *in* and *inout* buffers cdef _p_msg_cco m = message_cco() m.for_cro_send(inbuf, 0) m.for_cro_recv(inoutbuf, 0) # check counts and datatypes if m.scount != m.rcount: raise ValueError( "mismatch in inbuf count %d and inoutbuf count %d" % (m.scount, m.rcount)) if (m.stype != m.rtype): raise ValueError( "mismatch in inbuf and inoutbuf MPI datatypes") # do local reduction with nogil: CHKERR( MPI_Reduce_local( m.sbuf, m.rbuf, m.rcount, m.rtype, self.ob_mpi) ) property is_predefined: """is a predefined operation""" def __get__(self): cdef MPI_Op op = self.ob_mpi return (op == MPI_OP_NULL or op == MPI_MAX or op == MPI_MIN or op == MPI_SUM or op == MPI_PROD or op == MPI_LAND or op == MPI_BAND or op == MPI_LOR or op == MPI_BOR or op == MPI_LXOR or op == MPI_BXOR or op == MPI_MAXLOC or op == MPI_MINLOC or op == MPI_REPLACE or op == MPI_NO_OP) # Fortran Handle # -------------- def py2f(self): """ """ return MPI_Op_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef Op op = Op.__new__(Op) op.ob_mpi = MPI_Op_f2c(arg) return op cdef Op __OP_NULL__ = new_Op( MPI_OP_NULL ) cdef Op __MAX__ = new_Op( MPI_MAX ) cdef Op __MIN__ = new_Op( MPI_MIN ) cdef Op __SUM__ = new_Op( MPI_SUM ) cdef Op __PROD__ = new_Op( MPI_PROD ) cdef Op __LAND__ = new_Op( MPI_LAND ) cdef Op __BAND__ = new_Op( MPI_BAND ) cdef Op __LOR__ = new_Op( MPI_LOR ) cdef Op __BOR__ = new_Op( MPI_BOR ) cdef Op __LXOR__ = new_Op( MPI_LXOR ) cdef Op __BXOR__ = new_Op( MPI_BXOR ) cdef Op __MAXLOC__ = new_Op( MPI_MAXLOC ) cdef Op __MINLOC__ = new_Op( MPI_MINLOC ) cdef Op __REPLACE__ = new_Op( MPI_REPLACE ) cdef Op __NO_OP__ = new_Op( MPI_NO_OP ) # Predefined operation handles # ---------------------------- OP_NULL = __OP_NULL__ #: Null MAX = __MAX__ #: Maximum MIN = __MIN__ #: Minimum SUM = __SUM__ #: Sum PROD = __PROD__ #: Product LAND = __LAND__ #: Logical and BAND = __BAND__ #: Bit-wise and LOR = __LOR__ #: Logical or BOR = __BOR__ #: Bit-wise or LXOR = __LXOR__ #: Logical xor BXOR = __BXOR__ #: Bit-wise xor MAXLOC = __MAXLOC__ #: Maximum and location MINLOC = __MINLOC__ #: Minimum and location REPLACE = __REPLACE__ #: Replace (for RMA) NO_OP = __NO_OP__ #: No-op (for RMA) mpi4py-3.0.3/src/mpi4py/MPI/Message.pyx0000644000175000017500000001335513200562156020570 0ustar dalcinldalcinl00000000000000cdef class Message: """ Message """ def __cinit__(self, Message message=None): self.ob_mpi = MPI_MESSAGE_NULL if message is None: return self.ob_mpi = message.ob_mpi self.ob_buf = message.ob_buf def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_Message(&self.ob_mpi) ) def __richcmp__(self, other, int op): if not isinstance(other, Message): return NotImplemented cdef Message s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_MESSAGE_NULL # Matching Probe # -------------- @classmethod def Probe(cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """ Blocking test for a matched message """ cdef MPI_Message cmessage = MPI_MESSAGE_NULL cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Mprobe( source, tag, comm.ob_mpi, &cmessage, statusp) ) cdef Message message = Message.__new__(cls) message.ob_mpi = cmessage return message @classmethod def Iprobe(cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """ Nonblocking test for a matched message """ cdef int flag = 0 cdef MPI_Message cmessage = MPI_MESSAGE_NULL cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Improbe( source, tag, comm.ob_mpi, &flag, &cmessage, statusp) ) if flag == 0: return None cdef Message message = Message.__new__(cls) message.ob_mpi = cmessage return message # Matched receives # ---------------- def Recv(self, buf, Status status=None): """ Blocking receive of matched message """ cdef MPI_Message message = self.ob_mpi cdef int source = MPI_ANY_SOURCE if message == MPI_MESSAGE_NO_PROC: source = MPI_PROC_NULL cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Mrecv( rmsg.buf, rmsg.count, rmsg.dtype, &message, statusp) ) if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message def Irecv(self, buf): """ Nonblocking receive of matched message """ cdef MPI_Message message = self.ob_mpi cdef int source = MPI_ANY_SOURCE if message == MPI_MESSAGE_NO_PROC: source = MPI_PROC_NULL cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_Imrecv( rmsg.buf, rmsg.count, rmsg.dtype, &message, &request.ob_mpi) ) if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message request.ob_buf = rmsg return request # Python Communication # -------------------- # @classmethod def probe(cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """Blocking test for a matched message""" cdef Message message = Message.__new__(cls) cdef MPI_Status *statusp = arg_Status(status) message.ob_buf = PyMPI_mprobe(source, tag, comm.ob_mpi, &message.ob_mpi, statusp) return message # @classmethod def iprobe(cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): """Nonblocking test for a matched message""" cdef int flag = 0 cdef Message message = Message.__new__(cls) cdef MPI_Status *statusp = arg_Status(status) message.ob_buf = PyMPI_improbe(source, tag, comm.ob_mpi, &flag, &message.ob_mpi, statusp) if flag == 0: return None return message # def recv(self, Status status=None): """Blocking receive of matched message""" cdef object rmsg = self.ob_buf cdef MPI_Message message = self.ob_mpi cdef MPI_Status *statusp = arg_Status(status) rmsg = PyMPI_mrecv(rmsg, &message, statusp) if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None return rmsg # def irecv(self): """Nonblocking receive of matched message""" cdef object rmsg = self.ob_buf cdef MPI_Message message = self.ob_mpi cdef Request request = Request.__new__(Request) request.ob_buf = PyMPI_imrecv(rmsg, &message, &request.ob_mpi) if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None return request # Fortran Handle # -------------- def py2f(self): """ """ return MPI_Message_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef Message message = Message.__new__(Message) message.ob_mpi = MPI_Message_f2c(arg) return message cdef Message __MESSAGE_NULL__ = new_Message ( MPI_MESSAGE_NULL ) cdef Message __MESSAGE_NO_PROC__ = new_Message ( MPI_MESSAGE_NO_PROC ) # Predefined message handles # -------------------------- MESSAGE_NULL = __MESSAGE_NULL__ #: Null message handle MESSAGE_NO_PROC = __MESSAGE_NO_PROC__ #: No-proc message handle mpi4py-3.0.3/src/mpi4py/MPI/ExceptionC.pyx0000644000175000017500000000413213200562156021236 0ustar dalcinldalcinl00000000000000cdef extern from "Python.h": ctypedef class __builtin__.RuntimeError [object PyBaseExceptionObject]: pass cdef class Exception(RuntimeError): """ Exception """ cdef int ob_mpi def __cinit__(self, int ierr=0): if ierr < MPI_SUCCESS: ierr = MPI_ERR_UNKNOWN self.ob_mpi = ierr RuntimeError.__init__(self, ierr) def __richcmp__(Exception self, object error, int op): cdef int ierr = self.ob_mpi if op == Py_LT: return ierr < error if op == Py_LE: return ierr <= error if op == Py_EQ: return ierr == error if op == Py_NE: return ierr != error if op == Py_GT: return ierr > error if op == Py_GE: return ierr >= error def __hash__(self): return hash(self.ob_mpi) def __bool__(self): return self.ob_mpi != MPI_SUCCESS def __int__(self): return self.ob_mpi def __repr__(self): return "MPI.Exception(%d)" % self.ob_mpi def __str__(self): if not mpi_active(): return "error code: %d" % self.ob_mpi return self.Get_error_string() def Get_error_code(self): """ Error code """ cdef int errorcode = MPI_SUCCESS errorcode = self.ob_mpi return errorcode property error_code: """error code""" def __get__(self): return self.Get_error_code() def Get_error_class(self): """ Error class """ cdef int errorclass = MPI_SUCCESS CHKERR( MPI_Error_class(self.ob_mpi, &errorclass) ) return errorclass property error_class: """error class""" def __get__(self): return self.Get_error_class() def Get_error_string(self): """ Error string """ cdef char string[MPI_MAX_ERROR_STRING+1] cdef int resultlen = 0 CHKERR( MPI_Error_string(self.ob_mpi, string, &resultlen) ) return tompistr(string, resultlen) property error_string: """error string""" def __get__(self): return self.Get_error_string() mpi4py-3.0.3/src/mpi4py/MPI/Datatype.pyx0000644000175000017500000012140213200562156020750 0ustar dalcinldalcinl00000000000000# Storage order for arrays # ------------------------ ORDER_C = MPI_ORDER_C #: C order (a.k.a. row major) ORDER_FORTRAN = MPI_ORDER_FORTRAN #: Fortran order (a.k.a. column major) ORDER_F = MPI_ORDER_FORTRAN #: Convenience alias for ORDER_FORTRAN # Type classes for Fortran datatype matching # ------------------------------------------ TYPECLASS_INTEGER = MPI_TYPECLASS_INTEGER TYPECLASS_REAL = MPI_TYPECLASS_REAL TYPECLASS_COMPLEX = MPI_TYPECLASS_COMPLEX # Type of distributions (HPF-like arrays) # --------------------------------------- DISTRIBUTE_NONE = MPI_DISTRIBUTE_NONE #: Dimension not distributed DISTRIBUTE_BLOCK = MPI_DISTRIBUTE_BLOCK #: Block distribution DISTRIBUTE_CYCLIC = MPI_DISTRIBUTE_CYCLIC #: Cyclic distribution DISTRIBUTE_DFLT_DARG = MPI_DISTRIBUTE_DFLT_DARG #: Default distribution # Combiner values for datatype decoding # ------------------------------------- COMBINER_NAMED = MPI_COMBINER_NAMED COMBINER_DUP = MPI_COMBINER_DUP COMBINER_CONTIGUOUS = MPI_COMBINER_CONTIGUOUS COMBINER_VECTOR = MPI_COMBINER_VECTOR COMBINER_HVECTOR = MPI_COMBINER_HVECTOR COMBINER_INDEXED = MPI_COMBINER_INDEXED COMBINER_HINDEXED = MPI_COMBINER_HINDEXED COMBINER_INDEXED_BLOCK = MPI_COMBINER_INDEXED_BLOCK COMBINER_HINDEXED_BLOCK = MPI_COMBINER_HINDEXED_BLOCK COMBINER_STRUCT = MPI_COMBINER_STRUCT COMBINER_SUBARRAY = MPI_COMBINER_SUBARRAY COMBINER_DARRAY = MPI_COMBINER_DARRAY COMBINER_RESIZED = MPI_COMBINER_RESIZED COMBINER_F90_REAL = MPI_COMBINER_F90_REAL COMBINER_F90_COMPLEX = MPI_COMBINER_F90_COMPLEX COMBINER_F90_INTEGER = MPI_COMBINER_F90_INTEGER cdef class Datatype: """ Datatype """ def __cinit__(self, Datatype datatype=None): self.ob_mpi = MPI_DATATYPE_NULL if datatype is None: return self.ob_mpi = datatype.ob_mpi def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_Datatype(&self.ob_mpi) ) def __richcmp__(self, other, int op): if not isinstance(other, Datatype): return NotImplemented cdef Datatype s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_DATATYPE_NULL # Datatype Accessors # ------------------ def Get_size(self): """ Return the number of bytes occupied by entries in the datatype """ cdef MPI_Count size = 0 CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) return size property size: """size (in bytes)""" def __get__(self): cdef MPI_Count size = 0 CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) return size def Get_extent(self): """ Return lower bound and extent of datatype """ cdef MPI_Count lb = 0, extent = 0 CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) return (lb, extent) property extent: """extent""" def __get__(self): cdef MPI_Count lb = 0, extent = 0 CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) return extent property lb: """lower bound""" def __get__(self): cdef MPI_Count lb = 0, extent = 0 CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) return lb property ub: """upper bound""" def __get__(self): cdef MPI_Count lb = 0, extent = 0 CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) return lb + extent # Datatype Constructors # --------------------- def Dup(self): """ Duplicate a datatype """ cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_dup(self.ob_mpi, &datatype.ob_mpi) ) return datatype Create_dup = Dup #: convenience alias def Create_contiguous(self, int count): """ Create a contiguous datatype """ cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_contiguous(count, self.ob_mpi, &datatype.ob_mpi) ) return datatype def Create_vector(self, int count, int blocklength, int stride): """ Create a vector (strided) datatype """ cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_vector(count, blocklength, stride, self.ob_mpi, &datatype.ob_mpi) ) return datatype def Create_hvector(self, int count, int blocklength, Aint stride): """ Create a vector (strided) datatype """ cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_hvector(count, blocklength, stride, self.ob_mpi, &datatype.ob_mpi) ) return datatype def Create_indexed(self, blocklengths, displacements): """ Create an indexed datatype """ cdef int count = 0, *iblen = NULL, *idisp = NULL blocklengths = getarray(blocklengths, &count, &iblen) displacements = chkarray(displacements, count, &idisp) # cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_indexed(count, iblen, idisp, self.ob_mpi, &datatype.ob_mpi) ) return datatype def Create_hindexed(self, blocklengths, displacements): """ Create an indexed datatype with displacements in bytes """ cdef int count = 0, *iblen = NULL blocklengths = getarray(blocklengths, &count, &iblen) cdef MPI_Aint *idisp = NULL displacements = chkarray(displacements, count, &idisp) # cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_hindexed(count, iblen, idisp, self.ob_mpi, &datatype.ob_mpi) ) return datatype def Create_indexed_block(self, int blocklength, displacements): """ Create an indexed datatype with constant-sized blocks """ cdef int count = 0, *idisp = NULL displacements = getarray(displacements, &count, &idisp) # cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_indexed_block(count, blocklength, idisp, self.ob_mpi, &datatype.ob_mpi) ) return datatype def Create_hindexed_block(self, int blocklength, displacements): """ Create an indexed datatype with constant-sized blocks and displacements in bytes """ cdef int count = 0 cdef MPI_Aint *idisp = NULL displacements = getarray(displacements, &count, &idisp) # cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_hindexed_block(count, blocklength, idisp, self.ob_mpi, &datatype.ob_mpi) ) return datatype @classmethod def Create_struct(cls, blocklengths, displacements, datatypes): """ Create an datatype from a general set of block sizes, displacements and datatypes """ cdef int count = 0, *iblen = NULL blocklengths = getarray(blocklengths, &count, &iblen) cdef MPI_Aint *idisp = NULL displacements = chkarray(displacements, count, &idisp) cdef MPI_Datatype *ptype = NULL datatypes = asarray_Datatype(datatypes, count, &ptype) # cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_struct(count, iblen, idisp, ptype, &datatype.ob_mpi) ) return datatype # Subarray Datatype Constructor # ----------------------------- def Create_subarray(self, sizes, subsizes, starts, int order=ORDER_C): """ Create a datatype for a subarray of a regular, multidimensional array """ cdef int ndims = 0, *isizes = NULL cdef int *isubsizes = NULL, *istarts = NULL sizes = getarray(sizes, &ndims, &isizes ) subsizes = chkarray(subsizes, ndims, &isubsizes) starts = chkarray(starts, ndims, &istarts ) # cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_subarray(ndims, isizes, isubsizes, istarts, order, self.ob_mpi, &datatype.ob_mpi) ) return datatype # Distributed Array Datatype Constructor # -------------------------------------- def Create_darray(self, int size, int rank, gsizes, distribs, dargs, psizes, int order=ORDER_C): """ Create a datatype representing an HPF-like distributed array on Cartesian process grids """ cdef int ndims = 0, *igsizes = NULL cdef int *idistribs = NULL, *idargs = NULL, *ipsizes = NULL gsizes = getarray(gsizes, &ndims, &igsizes ) distribs = chkarray(distribs, ndims, &idistribs ) dargs = chkarray(dargs, ndims, &idargs ) psizes = chkarray(psizes, ndims, &ipsizes ) # cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_darray(size, rank, ndims, igsizes, idistribs, idargs, ipsizes, order, self.ob_mpi, &datatype.ob_mpi) ) return datatype # Parametrized and size-specific Fortran Datatypes # ------------------------------------------------ @classmethod def Create_f90_integer(cls, int r): """ Return a bounded integer datatype """ cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_f90_integer(r, &datatype.ob_mpi) ) return datatype @classmethod def Create_f90_real(cls, int p, int r): """ Return a bounded real datatype """ cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_f90_real(p, r, &datatype.ob_mpi) ) return datatype @classmethod def Create_f90_complex(cls, int p, int r): """ Return a bounded complex datatype """ cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_f90_complex(p, r, &datatype.ob_mpi) ) return datatype @classmethod def Match_size(cls, int typeclass, int size): """ Find a datatype matching a specified size in bytes """ cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_match_size(typeclass, size, &datatype.ob_mpi) ) return datatype # Use of Derived Datatypes # ------------------------ def Commit(self): """ Commit the datatype """ CHKERR( MPI_Type_commit(&self.ob_mpi) ) return self def Free(self): """ Free the datatype """ CHKERR( MPI_Type_free(&self.ob_mpi) ) cdef Datatype t = self cdef MPI_Datatype p = MPI_DATATYPE_NULL if t is __UB__ : p = MPI_UB elif t is __LB__ : p = MPI_LB elif t is __PACKED__ : p = MPI_PACKED elif t is __BYTE__ : p = MPI_BYTE elif t is __AINT__ : p = MPI_AINT elif t is __OFFSET__ : p = MPI_OFFSET elif t is __COUNT__ : p = MPI_COUNT elif t is __CHAR__ : p = MPI_CHAR elif t is __WCHAR__ : p = MPI_WCHAR elif t is __SIGNED_CHAR__ : p = MPI_SIGNED_CHAR elif t is __SHORT__ : p = MPI_SHORT elif t is __INT__ : p = MPI_INT elif t is __LONG__ : p = MPI_LONG elif t is __LONG_LONG__ : p = MPI_LONG_LONG elif t is __UNSIGNED_CHAR__ : p = MPI_UNSIGNED_CHAR elif t is __UNSIGNED_SHORT__ : p = MPI_UNSIGNED_SHORT elif t is __UNSIGNED__ : p = MPI_UNSIGNED elif t is __UNSIGNED_LONG__ : p = MPI_UNSIGNED_LONG elif t is __UNSIGNED_LONG_LONG__ : p = MPI_UNSIGNED_LONG_LONG elif t is __FLOAT__ : p = MPI_FLOAT elif t is __DOUBLE__ : p = MPI_DOUBLE elif t is __LONG_DOUBLE__ : p = MPI_LONG_DOUBLE elif t is __C_BOOL__ : p = MPI_C_BOOL elif t is __INT8_T__ : p = MPI_INT8_T elif t is __INT16_T__ : p = MPI_INT16_T elif t is __INT32_T__ : p = MPI_INT32_T elif t is __INT64_T__ : p = MPI_INT64_T elif t is __UINT8_T__ : p = MPI_UINT8_T elif t is __UINT16_T__ : p = MPI_UINT16_T elif t is __UINT32_T__ : p = MPI_UINT32_T elif t is __UINT64_T__ : p = MPI_UINT64_T elif t is __C_COMPLEX__ : p = MPI_C_COMPLEX elif t is __C_FLOAT_COMPLEX__ : p = MPI_C_FLOAT_COMPLEX elif t is __C_DOUBLE_COMPLEX__ : p = MPI_C_DOUBLE_COMPLEX elif t is __C_LONG_DOUBLE_COMPLEX__ : p = MPI_C_LONG_DOUBLE_COMPLEX elif t is __CXX_BOOL__ : p = MPI_CXX_BOOL elif t is __CXX_FLOAT_COMPLEX__ : p = MPI_CXX_FLOAT_COMPLEX elif t is __CXX_DOUBLE_COMPLEX__ : p = MPI_CXX_DOUBLE_COMPLEX elif t is __CXX_LONG_DOUBLE_COMPLEX__: p = MPI_CXX_LONG_DOUBLE_COMPLEX elif t is __SHORT_INT__ : p = MPI_SHORT_INT elif t is __TWOINT__ : p = MPI_2INT elif t is __LONG_INT__ : p = MPI_LONG_INT elif t is __FLOAT_INT__ : p = MPI_FLOAT_INT elif t is __DOUBLE_INT__ : p = MPI_DOUBLE_INT elif t is __LONG_DOUBLE_INT__ : p = MPI_LONG_DOUBLE_INT elif t is __CHARACTER__ : p = MPI_CHARACTER elif t is __LOGICAL__ : p = MPI_LOGICAL elif t is __INTEGER__ : p = MPI_INTEGER elif t is __REAL__ : p = MPI_REAL elif t is __DOUBLE_PRECISION__ : p = MPI_DOUBLE_PRECISION elif t is __COMPLEX__ : p = MPI_COMPLEX elif t is __DOUBLE_COMPLEX__ : p = MPI_DOUBLE_COMPLEX elif t is __LOGICAL1__ : p = MPI_LOGICAL1 elif t is __LOGICAL2__ : p = MPI_LOGICAL2 elif t is __LOGICAL4__ : p = MPI_LOGICAL4 elif t is __LOGICAL8__ : p = MPI_LOGICAL8 elif t is __INTEGER1__ : p = MPI_INTEGER1 elif t is __INTEGER2__ : p = MPI_INTEGER2 elif t is __INTEGER4__ : p = MPI_INTEGER4 elif t is __INTEGER8__ : p = MPI_INTEGER8 elif t is __INTEGER16__ : p = MPI_INTEGER16 elif t is __REAL2__ : p = MPI_REAL2 elif t is __REAL4__ : p = MPI_REAL4 elif t is __REAL8__ : p = MPI_REAL8 elif t is __REAL16__ : p = MPI_REAL16 elif t is __COMPLEX4__ : p = MPI_COMPLEX4 elif t is __COMPLEX8__ : p = MPI_COMPLEX8 elif t is __COMPLEX16__ : p = MPI_COMPLEX16 elif t is __COMPLEX32__ : p = MPI_COMPLEX32 self.ob_mpi = p # Datatype Resizing # ----------------- def Create_resized(self, Aint lb, Aint extent): """ Create a datatype with a new lower bound and extent """ cdef Datatype datatype = Datatype.__new__(Datatype) CHKERR( MPI_Type_create_resized(self.ob_mpi, lb, extent, &datatype.ob_mpi) ) return datatype Resized = Create_resized #: compatibility alias def Get_true_extent(self): """ Return the true lower bound and extent of a datatype """ cdef MPI_Count lb = 0, extent = 0 CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, &lb, &extent) ) return (lb, extent) property true_extent: """true extent""" def __get__(self): cdef MPI_Count lb = 0, extent = 0 CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, &lb, &extent) ) return extent property true_lb: """true lower bound""" def __get__(self): cdef MPI_Count lb = 0, extent = 0 CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, &lb, &extent) ) return lb property true_ub: """true upper bound""" def __get__(self): cdef MPI_Count lb = 0, extent = 0 CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, &lb, &extent) ) return lb + extent # Decoding a Datatype # ------------------- def Get_envelope(self): """ Return information on the number and type of input arguments used in the call that created a datatype """ cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) return (ni, na, nd, combiner) property envelope: """datatype envelope""" def __get__(self): return self.Get_envelope() def Get_contents(self): """ Retrieve the actual arguments used in the call that created a datatype """ cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) cdef int *i = NULL cdef MPI_Aint *a = NULL cdef MPI_Datatype *d = NULL cdef tmp1 = allocate(ni, sizeof(int), &i) cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) cdef int k = 0 cdef object integers = [i[k] for k from 0 <= k < ni] cdef object addresses = [a[k] for k from 0 <= k < na] cdef object datatypes = [ref_Datatype(d[k]) for k from 0 <= k < nd] return (integers, addresses, datatypes) property contents: """datatype contents""" def __get__(self): return self.Get_contents() def decode(self): """ Convenience method for decoding a datatype """ # get the datatype envelope cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) # return self immediately for named datatypes if combiner == MPI_COMBINER_NAMED: return self # get the datatype contents cdef int *i = NULL cdef MPI_Aint *a = NULL cdef MPI_Datatype *d = NULL cdef tmp1 = allocate(ni, sizeof(int), &i) cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) # manage in advance the contained datatypes cdef int k = 0, s1, e1, s2, e2, s3, e3, s4, e4 cdef object oldtype = None if combiner == MPI_COMBINER_STRUCT: oldtype = [ref_Datatype(d[k]) for k from 0 <= k < nd] elif (combiner != MPI_COMBINER_F90_INTEGER and combiner != MPI_COMBINER_F90_REAL and combiner != MPI_COMBINER_F90_COMPLEX): oldtype = ref_Datatype(d[0]) # dispatch depending on the combiner value if combiner == MPI_COMBINER_DUP: return (oldtype, ('DUP'), {}) elif combiner == MPI_COMBINER_CONTIGUOUS: return (oldtype, ('CONTIGUOUS'), {('count') : i[0]}) elif combiner == MPI_COMBINER_VECTOR: return (oldtype, ('VECTOR'), {('count') : i[0], ('blocklength') : i[1], ('stride') : i[2]}) elif combiner == MPI_COMBINER_HVECTOR: return (oldtype, ('HVECTOR'), {('count') : i[0], ('blocklength') : i[1], ('stride') : a[0]}) elif combiner == MPI_COMBINER_INDEXED: s1 = 1; e1 = i[0] s2 = i[0]+1; e2 = 2*i[0] return (oldtype, ('INDEXED'), {('blocklengths') : [i[k] for k from s1 <= k <= e1], ('displacements') : [i[k] for k from s2 <= k <= e2]}) elif combiner == MPI_COMBINER_HINDEXED: s1 = 1; e1 = i[0] s2 = 0; e2 = i[0]-1 return (oldtype, ('HINDEXED'), {('blocklengths') : [i[k] for k from s1 <= k <= e1], ('displacements') : [a[k] for k from s2 <= k <= e2]}) elif combiner == MPI_COMBINER_INDEXED_BLOCK: s2 = 2; e2 = i[0]+1 return (oldtype, ('INDEXED_BLOCK'), {('blocklength') : i[1], ('displacements') : [i[k] for k from s2 <= k <= e2]}) elif combiner == MPI_COMBINER_HINDEXED_BLOCK: s2 = 0; e2 = i[0]-1 return (oldtype, ('HINDEXED_BLOCK'), {('blocklength') : i[1], ('displacements') : [a[k] for k from s2 <= k <= e2]}) elif combiner == MPI_COMBINER_STRUCT: s1 = 1; e1 = i[0] s2 = 0; e2 = i[0]-1 return (Datatype, ('STRUCT'), {('blocklengths') : [i[k] for k from s1 <= k <= e1], ('displacements') : [a[k] for k from s2 <= k <= e2], ('datatypes') : oldtype}) elif combiner == MPI_COMBINER_SUBARRAY: s1 = 1; e1 = i[0] s2 = i[0]+1; e2 = 2*i[0] s3 = 2*i[0]+1; e3 = 3*i[0] return (oldtype, ('SUBARRAY'), {('sizes') : [i[k] for k from s1 <= k <= e1], ('subsizes') : [i[k] for k from s2 <= k <= e2], ('starts') : [i[k] for k from s3 <= k <= e3], ('order') : i[3*i[0]+1]}) elif combiner == MPI_COMBINER_DARRAY: s1 = 3; e1 = i[2]+2 s2 = i[2]+3; e2 = 2*i[2]+2 s3 = 2*i[2]+3; e3 = 3*i[2]+2 s4 = 3*i[2]+3; e4 = 4*i[2]+2 return (oldtype, ('DARRAY'), {('size') : i[0], ('rank') : i[1], ('gsizes') : [i[k] for k from s1 <= k <= e1], ('distribs') : [i[k] for k from s2 <= k <= e2], ('dargs') : [i[k] for k from s3 <= k <= e3], ('psizes') : [i[k] for k from s4 <= k <= e4], ('order') : i[4*i[2]+3]}) elif combiner == MPI_COMBINER_RESIZED: return (oldtype, ('RESIZED'), {('lb') : a[0], ('extent') : a[1]}) elif combiner == MPI_COMBINER_F90_INTEGER: return (Datatype, ('F90_INTEGER'), {('r') : i[0]}) elif combiner == MPI_COMBINER_F90_REAL: return (Datatype, ('F90_REAL'), {('p') : i[0], ('r') : i[1]}) elif combiner == MPI_COMBINER_F90_COMPLEX: return (Datatype, ('F90_COMPLEX'), {('p') : i[0], ('r') : i[1]}) else: return None property combiner: """datatype combiner""" def __get__(self): return self.Get_envelope()[3] property is_named: """is a named datatype""" def __get__(self): cdef int combiner = self.Get_envelope()[3] return combiner == MPI_COMBINER_NAMED property is_predefined: """is a predefined datatype""" def __get__(self): if self.ob_mpi == MPI_DATATYPE_NULL: return True cdef int combiner = self.Get_envelope()[3] return (combiner == MPI_COMBINER_NAMED or combiner == MPI_COMBINER_F90_INTEGER or combiner == MPI_COMBINER_F90_REAL or combiner == MPI_COMBINER_F90_COMPLEX) # Pack and Unpack # --------------- def Pack(self, inbuf, outbuf, int position, Comm comm): """ Pack into contiguous memory according to datatype. """ cdef MPI_Aint lb = 0, extent = 0 CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) # cdef void *ibptr = NULL, *obptr = NULL cdef MPI_Aint iblen = 0, oblen = 0 cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) cdef int icount = downcast(iblen//extent) cdef int osize = clipcount(oblen) # CHKERR( MPI_Pack(ibptr, icount, self.ob_mpi, obptr, osize, &position, comm.ob_mpi) ) return position def Unpack(self, inbuf, int position, outbuf, Comm comm): """ Unpack from contiguous memory according to datatype. """ cdef MPI_Aint lb = 0, extent = 0 CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) # cdef void *ibptr = NULL, *obptr = NULL cdef MPI_Aint iblen = 0, oblen = 0 cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) cdef int isize = clipcount(iblen) cdef int ocount = downcast(oblen//extent) # CHKERR( MPI_Unpack(ibptr, isize, &position, obptr, ocount, self.ob_mpi, comm.ob_mpi) ) return position def Pack_size(self, int count, Comm comm): """ Returns the upper bound on the amount of space (in bytes) needed to pack a message according to datatype. """ cdef int size = 0 CHKERR( MPI_Pack_size(count, self.ob_mpi, comm.ob_mpi, &size) ) return size # Canonical Pack and Unpack # ------------------------- def Pack_external(self, datarep, inbuf, outbuf, Aint position): """ Pack into contiguous memory according to datatype, using a portable data representation (**external32**). """ cdef char *cdatarep = NULL datarep = asmpistr(datarep, &cdatarep) cdef MPI_Aint lb = 0, extent = 0 CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) # cdef void *ibptr = NULL, *obptr = NULL cdef MPI_Aint iblen = 0, oblen = 0 cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) cdef int icount = downcast(iblen//extent) # CHKERR( MPI_Pack_external(cdatarep, ibptr, icount, self.ob_mpi, obptr, oblen, &position) ) return position def Unpack_external(self, datarep, inbuf, Aint position, outbuf): """ Unpack from contiguous memory according to datatype, using a portable data representation (**external32**). """ cdef char *cdatarep = NULL datarep = asmpistr(datarep, &cdatarep) cdef MPI_Aint lb = 0, extent = 0 CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) # cdef void *ibptr = NULL, *obptr = NULL cdef MPI_Aint iblen = 0, oblen = 0 cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) cdef int ocount = downcast(oblen//extent) # CHKERR( MPI_Unpack_external(cdatarep, ibptr, iblen, &position, obptr, ocount, self.ob_mpi) ) return position def Pack_external_size(self, datarep, int count): """ Returns the upper bound on the amount of space (in bytes) needed to pack a message according to datatype, using a portable data representation (**external32**). """ cdef char *cdatarep = NULL cdef MPI_Aint size = 0 datarep = asmpistr(datarep, &cdatarep) CHKERR( MPI_Pack_external_size(cdatarep, count, self.ob_mpi, &size) ) return size # Attributes # ---------- def Get_attr(self, int keyval): """ Retrieve attribute value by key """ cdef void *attrval = NULL cdef int flag = 0 CHKERR( MPI_Type_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) if not flag: return None if attrval == NULL: return 0 # user-defined attribute keyval return PyMPI_attr_get(self.ob_mpi, keyval, attrval) def Set_attr(self, int keyval, object attrval): """ Store attribute value associated with a key """ PyMPI_attr_set(self.ob_mpi, keyval, attrval) def Delete_attr(self, int keyval): """ Delete attribute value associated with a key """ CHKERR( MPI_Type_delete_attr(self.ob_mpi, keyval) ) @classmethod def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): """ Create a new attribute key for datatypes """ cdef object state = _p_keyval(copy_fn, delete_fn, nopython) cdef int keyval = MPI_KEYVAL_INVALID cdef MPI_Type_copy_attr_function *_copy = PyMPI_attr_copy_fn cdef MPI_Type_delete_attr_function *_del = PyMPI_attr_delete_fn cdef void *extra_state = state CHKERR( MPI_Type_create_keyval(_copy, _del, &keyval, extra_state) ) type_keyval[keyval] = state return keyval @classmethod def Free_keyval(cls, int keyval): """ Free and attribute key for datatypes """ cdef int keyval_save = keyval CHKERR( MPI_Type_free_keyval(&keyval) ) try: del type_keyval[keyval_save] except KeyError: pass return keyval # Naming Objects # -------------- def Get_name(self): """ Get the print name for this datatype """ cdef char name[MPI_MAX_OBJECT_NAME+1] cdef int nlen = 0 CHKERR( MPI_Type_get_name(self.ob_mpi, name, &nlen) ) return tompistr(name, nlen) def Set_name(self, name): """ Set the print name for this datatype """ cdef char *cname = NULL name = asmpistr(name, &cname) CHKERR( MPI_Type_set_name(self.ob_mpi, cname) ) property name: """datatype name""" def __get__(self): return self.Get_name() def __set__(self, value): self.Set_name(value) # Fortran Handle # -------------- def py2f(self): """ """ return MPI_Type_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef Datatype datatype = Datatype.__new__(Datatype) datatype.ob_mpi = MPI_Type_f2c(arg) return datatype # Address Functions # ----------------- def Get_address(location): """ Get the address of a location in memory """ cdef void *baseptr = MPI_BOTTOM if location is not __BOTTOM__: getbuffer_r(location, &baseptr, NULL) cdef MPI_Aint address = 0 CHKERR( MPI_Get_address(baseptr, &address) ) return address def Aint_add(Aint base, Aint disp): """ Return the sum of base address and displacement """ return MPI_Aint_add(base, disp) def Aint_diff(Aint addr1, Aint addr2): """ Return the difference between absolute addresses """ return MPI_Aint_diff(addr1, addr2) cdef Datatype __DATATYPE_NULL__ = new_Datatype( MPI_DATATYPE_NULL ) cdef Datatype __UB__ = new_Datatype( MPI_UB ) cdef Datatype __LB__ = new_Datatype( MPI_LB ) cdef Datatype __PACKED__ = new_Datatype( MPI_PACKED ) cdef Datatype __BYTE__ = new_Datatype( MPI_BYTE ) cdef Datatype __AINT__ = new_Datatype( MPI_AINT ) cdef Datatype __OFFSET__ = new_Datatype( MPI_OFFSET ) cdef Datatype __COUNT__ = new_Datatype( MPI_COUNT ) cdef Datatype __CHAR__ = new_Datatype( MPI_CHAR ) cdef Datatype __WCHAR__ = new_Datatype( MPI_WCHAR ) cdef Datatype __SIGNED_CHAR__ = new_Datatype( MPI_SIGNED_CHAR ) cdef Datatype __SHORT__ = new_Datatype( MPI_SHORT ) cdef Datatype __INT__ = new_Datatype( MPI_INT ) cdef Datatype __LONG__ = new_Datatype( MPI_LONG ) cdef Datatype __LONG_LONG__ = new_Datatype( MPI_LONG_LONG ) cdef Datatype __UNSIGNED_CHAR__ = new_Datatype( MPI_UNSIGNED_CHAR ) cdef Datatype __UNSIGNED_SHORT__ = new_Datatype( MPI_UNSIGNED_SHORT ) cdef Datatype __UNSIGNED__ = new_Datatype( MPI_UNSIGNED ) cdef Datatype __UNSIGNED_LONG__ = new_Datatype( MPI_UNSIGNED_LONG ) cdef Datatype __UNSIGNED_LONG_LONG__ = new_Datatype( MPI_UNSIGNED_LONG_LONG ) cdef Datatype __FLOAT__ = new_Datatype( MPI_FLOAT ) cdef Datatype __DOUBLE__ = new_Datatype( MPI_DOUBLE ) cdef Datatype __LONG_DOUBLE__ = new_Datatype( MPI_LONG_DOUBLE ) cdef Datatype __C_BOOL__ = new_Datatype( MPI_C_BOOL ) cdef Datatype __INT8_T__ = new_Datatype( MPI_INT8_T ) cdef Datatype __INT16_T__ = new_Datatype( MPI_INT16_T ) cdef Datatype __INT32_T__ = new_Datatype( MPI_INT32_T ) cdef Datatype __INT64_T__ = new_Datatype( MPI_INT64_T ) cdef Datatype __UINT8_T__ = new_Datatype( MPI_UINT8_T ) cdef Datatype __UINT16_T__ = new_Datatype( MPI_UINT16_T ) cdef Datatype __UINT32_T__ = new_Datatype( MPI_UINT32_T ) cdef Datatype __UINT64_T__ = new_Datatype( MPI_UINT64_T ) cdef Datatype __C_COMPLEX__ = new_Datatype( MPI_C_COMPLEX ) cdef Datatype __C_FLOAT_COMPLEX__ = new_Datatype( MPI_C_FLOAT_COMPLEX ) cdef Datatype __C_DOUBLE_COMPLEX__ = new_Datatype( MPI_C_DOUBLE_COMPLEX ) cdef Datatype __C_LONG_DOUBLE_COMPLEX__ = new_Datatype( MPI_C_LONG_DOUBLE_COMPLEX ) cdef Datatype __CXX_BOOL__ = new_Datatype( MPI_CXX_BOOL ) cdef Datatype __CXX_FLOAT_COMPLEX__ = new_Datatype( MPI_CXX_FLOAT_COMPLEX ) cdef Datatype __CXX_DOUBLE_COMPLEX__ = new_Datatype( MPI_CXX_DOUBLE_COMPLEX ) cdef Datatype __CXX_LONG_DOUBLE_COMPLEX__ = new_Datatype( MPI_CXX_LONG_DOUBLE_COMPLEX ) cdef Datatype __SHORT_INT__ = new_Datatype( MPI_SHORT_INT ) cdef Datatype __TWOINT__ = new_Datatype( MPI_2INT ) cdef Datatype __LONG_INT__ = new_Datatype( MPI_LONG_INT ) cdef Datatype __FLOAT_INT__ = new_Datatype( MPI_FLOAT_INT ) cdef Datatype __DOUBLE_INT__ = new_Datatype( MPI_DOUBLE_INT ) cdef Datatype __LONG_DOUBLE_INT__ = new_Datatype( MPI_LONG_DOUBLE_INT ) cdef Datatype __CHARACTER__ = new_Datatype( MPI_CHARACTER ) cdef Datatype __LOGICAL__ = new_Datatype( MPI_LOGICAL ) cdef Datatype __INTEGER__ = new_Datatype( MPI_INTEGER ) cdef Datatype __REAL__ = new_Datatype( MPI_REAL ) cdef Datatype __DOUBLE_PRECISION__ = new_Datatype( MPI_DOUBLE_PRECISION ) cdef Datatype __COMPLEX__ = new_Datatype( MPI_COMPLEX ) cdef Datatype __DOUBLE_COMPLEX__ = new_Datatype( MPI_DOUBLE_COMPLEX ) cdef Datatype __LOGICAL1__ = new_Datatype( MPI_LOGICAL1 ) cdef Datatype __LOGICAL2__ = new_Datatype( MPI_LOGICAL2 ) cdef Datatype __LOGICAL4__ = new_Datatype( MPI_LOGICAL4 ) cdef Datatype __LOGICAL8__ = new_Datatype( MPI_LOGICAL8 ) cdef Datatype __INTEGER1__ = new_Datatype( MPI_INTEGER1 ) cdef Datatype __INTEGER2__ = new_Datatype( MPI_INTEGER2 ) cdef Datatype __INTEGER4__ = new_Datatype( MPI_INTEGER4 ) cdef Datatype __INTEGER8__ = new_Datatype( MPI_INTEGER8 ) cdef Datatype __INTEGER16__ = new_Datatype( MPI_INTEGER16 ) cdef Datatype __REAL2__ = new_Datatype( MPI_REAL2 ) cdef Datatype __REAL4__ = new_Datatype( MPI_REAL4 ) cdef Datatype __REAL8__ = new_Datatype( MPI_REAL8 ) cdef Datatype __REAL16__ = new_Datatype( MPI_REAL16 ) cdef Datatype __COMPLEX4__ = new_Datatype( MPI_COMPLEX4 ) cdef Datatype __COMPLEX8__ = new_Datatype( MPI_COMPLEX8 ) cdef Datatype __COMPLEX16__ = new_Datatype( MPI_COMPLEX16 ) cdef Datatype __COMPLEX32__ = new_Datatype( MPI_COMPLEX32 ) include "typemap.pxi" include "typestr.pxi" # Predefined datatype handles # --------------------------- DATATYPE_NULL = __DATATYPE_NULL__ #: Null datatype handle # Deprecated datatypes (since MPI-2) UB = __UB__ #: upper-bound marker LB = __LB__ #: lower-bound marker # MPI-specific datatypes PACKED = __PACKED__ BYTE = __BYTE__ AINT = __AINT__ OFFSET = __OFFSET__ COUNT = __COUNT__ # Elementary C datatypes CHAR = __CHAR__ WCHAR = __WCHAR__ SIGNED_CHAR = __SIGNED_CHAR__ SHORT = __SHORT__ INT = __INT__ LONG = __LONG__ LONG_LONG = __LONG_LONG__ UNSIGNED_CHAR = __UNSIGNED_CHAR__ UNSIGNED_SHORT = __UNSIGNED_SHORT__ UNSIGNED = __UNSIGNED__ UNSIGNED_LONG = __UNSIGNED_LONG__ UNSIGNED_LONG_LONG = __UNSIGNED_LONG_LONG__ FLOAT = __FLOAT__ DOUBLE = __DOUBLE__ LONG_DOUBLE = __LONG_DOUBLE__ # C99 datatypes C_BOOL = __C_BOOL__ INT8_T = __INT8_T__ INT16_T = __INT16_T__ INT32_T = __INT32_T__ INT64_T = __INT64_T__ UINT8_T = __UINT8_T__ UINT16_T = __UINT16_T__ UINT32_T = __UINT32_T__ UINT64_T = __UINT64_T__ C_COMPLEX = __C_COMPLEX__ C_FLOAT_COMPLEX = __C_FLOAT_COMPLEX__ C_DOUBLE_COMPLEX = __C_DOUBLE_COMPLEX__ C_LONG_DOUBLE_COMPLEX = __C_LONG_DOUBLE_COMPLEX__ # C++ datatypes CXX_BOOL = __CXX_BOOL__ CXX_FLOAT_COMPLEX = __CXX_FLOAT_COMPLEX__ CXX_DOUBLE_COMPLEX = __CXX_DOUBLE_COMPLEX__ CXX_LONG_DOUBLE_COMPLEX = __CXX_LONG_DOUBLE_COMPLEX__ # C Datatypes for reduction operations SHORT_INT = __SHORT_INT__ INT_INT = TWOINT = __TWOINT__ LONG_INT = __LONG_INT__ FLOAT_INT = __FLOAT_INT__ DOUBLE_INT = __DOUBLE_INT__ LONG_DOUBLE_INT = __LONG_DOUBLE_INT__ # Elementary Fortran datatypes CHARACTER = __CHARACTER__ LOGICAL = __LOGICAL__ INTEGER = __INTEGER__ REAL = __REAL__ DOUBLE_PRECISION = __DOUBLE_PRECISION__ COMPLEX = __COMPLEX__ DOUBLE_COMPLEX = __DOUBLE_COMPLEX__ # Size-specific Fortran datatypes LOGICAL1 = __LOGICAL1__ LOGICAL2 = __LOGICAL2__ LOGICAL4 = __LOGICAL4__ LOGICAL8 = __LOGICAL8__ INTEGER1 = __INTEGER1__ INTEGER2 = __INTEGER2__ INTEGER4 = __INTEGER4__ INTEGER8 = __INTEGER8__ INTEGER16 = __INTEGER16__ REAL2 = __REAL2__ REAL4 = __REAL4__ REAL8 = __REAL8__ REAL16 = __REAL16__ COMPLEX4 = __COMPLEX4__ COMPLEX8 = __COMPLEX8__ COMPLEX16 = __COMPLEX16__ COMPLEX32 = __COMPLEX32__ # Convenience aliases UNSIGNED_INT = __UNSIGNED__ SIGNED_SHORT = __SHORT__ SIGNED_INT = __INT__ SIGNED_LONG = __LONG__ SIGNED_LONG_LONG = __LONG_LONG__ BOOL = __C_BOOL__ SINT8_T = __INT8_T__ SINT16_T = __INT16_T__ SINT32_T = __INT32_T__ SINT64_T = __INT64_T__ F_BOOL = __LOGICAL__ F_INT = __INTEGER__ F_FLOAT = __REAL__ F_DOUBLE = __DOUBLE_PRECISION__ F_COMPLEX = __COMPLEX__ F_FLOAT_COMPLEX = __COMPLEX__ F_DOUBLE_COMPLEX = __DOUBLE_COMPLEX__ mpi4py-3.0.3/src/mpi4py/MPI/drepimpl.pxi0000644000175000017500000001226213200562156020774 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- cdef dict datarep_registry = {} @cython.final @cython.internal cdef class _p_datarep: cdef object read_fn cdef object write_fn cdef object extent_fn def __cinit__(self, read_fn, write_fn, extent_fn): self.read_fn = read_fn self.write_fn = write_fn self.extent_fn = extent_fn cdef int read(self, void *userbuf, MPI_Datatype datatype, int count, void *filebuf, MPI_Offset position, ) except -1: cdef MPI_Aint lb=0, extent=0 cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) if ierr != MPI_SUCCESS: return ierr cdef MPI_Aint ulen = (position+count) * extent cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX cdef object ubuf = tomemory(userbuf, ulen) cdef object fbuf = tomemory(filebuf, flen) cdef Datatype dtype = Datatype.__new__(Datatype) dtype.ob_mpi = datatype try: self.read_fn(ubuf, dtype, count, fbuf, position) finally: dtype.ob_mpi = MPI_DATATYPE_NULL return MPI_SUCCESS cdef int write(self, void *userbuf, MPI_Datatype datatype, int count, void *filebuf, MPI_Offset position, ) except -1: cdef MPI_Aint lb=0, extent=0 cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) if ierr != MPI_SUCCESS: return ierr cdef MPI_Aint ulen = (position+count) * extent cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX cdef object ubuf = tomemory(userbuf, ulen) cdef object fbuf = tomemory(filebuf, flen) cdef Datatype dtype = Datatype.__new__(Datatype) dtype.ob_mpi = datatype try: self.write_fn(ubuf, dtype, count, fbuf, position) finally: dtype.ob_mpi = MPI_DATATYPE_NULL return MPI_SUCCESS cdef int extent(self, MPI_Datatype datatype, MPI_Aint *file_extent, ) except -1: cdef Datatype dtype = Datatype.__new__(Datatype) dtype.ob_mpi = datatype try: file_extent[0] = self.extent_fn(dtype) finally: dtype.ob_mpi = MPI_DATATYPE_NULL return MPI_SUCCESS # --- cdef int datarep_read( void *userbuf, MPI_Datatype datatype, int count, void *filebuf, MPI_Offset position, void *extra_state, ) except MPI_ERR_UNKNOWN with gil: cdef _p_datarep state = <_p_datarep>extra_state cdef int ierr = MPI_SUCCESS cdef object exc try: state.read(userbuf, datatype, count, filebuf, position) except MPIException as exc: print_traceback() ierr = exc.Get_error_code() except: print_traceback() ierr = MPI_ERR_OTHER return ierr cdef int datarep_write( void *userbuf, MPI_Datatype datatype, int count, void *filebuf, MPI_Offset position, void *extra_state, ) except MPI_ERR_UNKNOWN with gil: cdef _p_datarep state = <_p_datarep>extra_state cdef int ierr = MPI_SUCCESS cdef object exc try: state.write(userbuf, datatype, count, filebuf, position) except MPIException as exc: print_traceback() ierr = exc.Get_error_code() except: print_traceback() ierr = MPI_ERR_OTHER return ierr cdef int datarep_extent( MPI_Datatype datatype, MPI_Aint *file_extent, void *extra_state, ) except MPI_ERR_UNKNOWN with gil: cdef _p_datarep state = <_p_datarep>extra_state cdef int ierr = MPI_SUCCESS cdef object exc try: state.extent(datatype, file_extent) except MPIException as exc: print_traceback() ierr = exc.Get_error_code() except: print_traceback() ierr = MPI_ERR_OTHER return ierr # --- @cython.callspec("MPIAPI") cdef int datarep_read_fn( void *userbuf, MPI_Datatype datatype, int count, void *filebuf, MPI_Offset position, void *extra_state ) nogil: if extra_state == NULL: return MPI_ERR_INTERN if not Py_IsInitialized(): return MPI_ERR_INTERN return datarep_read(userbuf, datatype, count, filebuf, position, extra_state) @cython.callspec("MPIAPI") cdef int datarep_write_fn( void *userbuf, MPI_Datatype datatype, int count, void *filebuf, MPI_Offset position, void *extra_state ) nogil: if extra_state == NULL: return MPI_ERR_INTERN if not Py_IsInitialized(): return MPI_ERR_INTERN return datarep_write(userbuf, datatype, count, filebuf, position, extra_state) @cython.callspec("MPIAPI") cdef int datarep_extent_fn( MPI_Datatype datatype, MPI_Aint *file_extent, void *extra_state ) nogil: if extra_state == NULL: return MPI_ERR_INTERN if not Py_IsInitialized(): return MPI_ERR_INTERN return datarep_extent(datatype, file_extent, extra_state) # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/Errhandler.pyx0000644000175000017500000000372513200562156021272 0ustar dalcinldalcinl00000000000000cdef class Errhandler: """ Error Handler """ def __cinit__(self, Errhandler errhandler=None): self.ob_mpi = MPI_ERRHANDLER_NULL if errhandler is None: return self.ob_mpi = errhandler.ob_mpi def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_Errhandler(&self.ob_mpi) ) def __richcmp__(self, other, int op): if not isinstance(other, Errhandler): return NotImplemented cdef Errhandler s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_ERRHANDLER_NULL def Free(self): """ Free an error handler """ CHKERR( MPI_Errhandler_free(&self.ob_mpi) ) if self is __ERRORS_RETURN__: self.ob_mpi = MPI_ERRORS_RETURN if self is __ERRORS_ARE_FATAL__: self.ob_mpi = MPI_ERRORS_ARE_FATAL # Fortran Handle # -------------- def py2f(self): """ """ return MPI_Errhandler_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef Errhandler errhandler = Errhandler.__new__(Errhandler) errhandler.ob_mpi = MPI_Errhandler_f2c(arg) return errhandler cdef Errhandler __ERRHANDLER_NULL__ = new_Errhandler(MPI_ERRHANDLER_NULL) cdef Errhandler __ERRORS_RETURN__ = new_Errhandler(MPI_ERRORS_RETURN) cdef Errhandler __ERRORS_ARE_FATAL__ = new_Errhandler(MPI_ERRORS_ARE_FATAL) # Predefined errhandler handles # ----------------------------- ERRHANDLER_NULL = __ERRHANDLER_NULL__ #: Null error handler ERRORS_RETURN = __ERRORS_RETURN__ #: Errors return error handler ERRORS_ARE_FATAL = __ERRORS_ARE_FATAL__ #: Errors are fatal error handler mpi4py-3.0.3/src/mpi4py/MPI/msgbuffer.pxi0000664000175000017500000011636713426006675021166 0ustar dalcinldalcinl00000000000000#------------------------------------------------------------------------------ cdef extern from "Python.h": int is_list "PyList_Check" (object) int is_tuple "PyTuple_Check" (object) cdef extern from "Python.h": int PyIndex_Check(object) int PySequence_Check(object) object PyNumber_Index(object) Py_ssize_t PySequence_Size(object) except -1 cdef inline int is_integral(object ob): if not PyIndex_Check(ob): return 0 if not PySequence_Check(ob): return 1 try: PySequence_Size(ob) except: pass else: return 0 try: PyNumber_Index(ob) except: return 0 else: return 1 cdef inline int is_buffer(object ob): if PY3: return PyObject_CheckBuffer(ob) else: return PyObject_CheckBuffer(ob) or _Py2_IsBuffer(ob) cdef inline int is_datatype(object ob): if isinstance(ob, Datatype): return 1 if PY3: if isinstance(ob, unicode): return 1 else: if isinstance(ob, bytes): return 1 return 0 #------------------------------------------------------------------------------ cdef extern from *: int INT_MAX cdef inline int downcast(MPI_Aint value) except? -1: if value > INT_MAX: raise OverflowError("integer %d does not fit in 'int'" % value) else: return value cdef inline int clipcount(MPI_Aint value): if value > INT_MAX: return INT_MAX else: return value #------------------------------------------------------------------------------ cdef object __BOTTOM__ = MPI_BOTTOM cdef object __IN_PLACE__ = MPI_IN_PLACE #------------------------------------------------------------------------------ @cython.final @cython.internal cdef class _p_message: cdef memory buf cdef object count cdef object displ cdef Datatype type cdef _p_message message_basic(object o_buf, object o_type, bint readonly, # void **baddr, MPI_Aint *bsize, MPI_Datatype *btype, ): cdef _p_message m = <_p_message>_p_message.__new__(_p_message) # special-case for BOTTOM or None, # an explicit MPI datatype is required if o_buf is __BOTTOM__ or o_buf is None: if isinstance(o_type, Datatype): m.type = o_type else: m.type = TypeDict[o_type] m.buf = newbuffer() baddr[0] = MPI_BOTTOM bsize[0] = 0 btype[0] = m.type.ob_mpi return m # get buffer base address and length cdef bint fmt = (o_type is None) m.buf = getbuffer(o_buf, readonly, fmt) baddr[0] = m.buf.view.buf bsize[0] = m.buf.view.len # lookup datatype if not provided or not a Datatype if isinstance(o_type, Datatype): m.type = o_type elif o_type is None: m.type = TypeDict[getformat(m.buf)] else: m.type = TypeDict[o_type] btype[0] = m.type.ob_mpi # and we are done ... return m cdef _p_message message_simple(object msg, int readonly, int rank, int blocks, # void **_addr, int *_count, MPI_Datatype *_type, ): # special-case PROC_NULL target rank if rank == MPI_PROC_NULL: _addr[0] = NULL _count[0] = 0 _type[0] = MPI_BYTE return None # unpack message list/tuple cdef Py_ssize_t nargs = 0 cdef object o_buf = None cdef object o_count = None cdef object o_displ = None cdef object o_type = None if is_buffer(msg): o_buf = msg elif is_list(msg) or is_tuple(msg): nargs = len(msg) if nargs == 2: (o_buf, o_count) = msg if is_datatype(o_count): (o_count, o_type) = None, o_count elif is_tuple(o_count) or is_list(o_count): (o_count, o_displ) = o_count elif nargs == 3: (o_buf, o_count, o_type) = msg if is_tuple(o_count) or is_list(o_count): (o_count, o_displ) = o_count elif nargs == 4: (o_buf, o_count, o_displ, o_type) = msg else: raise ValueError("message: expecting 2 to 4 items") elif PYPY: o_buf = msg else: raise TypeError("message: expecting buffer or list/tuple") # buffer: address, length, and datatype cdef void *baddr = NULL cdef MPI_Aint bsize = 0 cdef MPI_Datatype btype = MPI_DATATYPE_NULL cdef _p_message m = message_basic(o_buf, o_type, readonly, &baddr, &bsize, &btype) # buffer: count and displacement cdef int count = 0 # number of datatype entries cdef int displ = 0 # from base buffer, in datatype entries cdef MPI_Aint extent = 0, lb = 0 # datatype extent cdef MPI_Aint length = bsize # in bytes cdef MPI_Aint offset = 0 # from base buffer, in bytes if o_displ is not None: displ = o_displ if displ < 0: raise ValueError( "message: negative diplacement %d" % displ) if displ > 0: if btype == MPI_DATATYPE_NULL: raise ValueError( "message: cannot handle diplacement, datatype is null") CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) if extent <= 0: raise ValueError( ("message: cannot handle diplacement, " "datatype extent %d (lb:%d, ub:%d)" ) % (extent, lb, lb+extent)) if displ*extent > length: raise ValueError( ("message: displacement %d out of bounds, " "number of datatype entries %d" ) % (displ, length//extent)) offset = displ*extent length -= offset if o_count is not None: count = o_count if count < 0: raise ValueError( "message: negative count %d" % count) if count > 0 and o_buf is None: raise ValueError( "message: buffer is None but count is %d" % count) elif length > 0: if extent == 0: if btype == MPI_DATATYPE_NULL: raise ValueError( "message: cannot infer count, datatype is null") CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) if extent <= 0: raise ValueError( ("message: cannot infer count, " "datatype extent %d (lb:%d, ub:%d)" ) % (extent, lb, lb+extent)) if (length % extent) != 0: raise ValueError( ("message: cannot infer count, " "buffer length %d is not a multiple of " "datatype extent %d (lb:%d, ub:%d)" ) % (length, extent, lb, lb+extent)) if blocks < 2: count = downcast(length // extent) else: if ((length // extent) % blocks) != 0: raise ValueError( ("message: cannot infer count, " "number of entries %d is not a multiple of " "required number of blocks %d" ) % (length//extent, blocks)) count = downcast((length // extent) // blocks) # return collected message data m.count = o_count if o_count is not None else count m.displ = o_displ if o_displ is not None else displ _addr[0] = (baddr + offset) _count[0] = count _type[0] = btype return m cdef _p_message message_vector(object msg, int readonly, int rank, int blocks, # void **_addr, int **_counts, int **_displs, MPI_Datatype *_type, ): # special-case PROC_NULL target rank if rank == MPI_PROC_NULL: _addr[0] = NULL _counts[0] = NULL _displs[0] = NULL _type[0] = MPI_BYTE return None # unpack message list/tuple cdef Py_ssize_t nargs = 0 cdef object o_buf = None cdef object o_counts = None cdef object o_displs = None cdef object o_type = None if is_buffer(msg): o_buf = msg elif is_list(msg) or is_tuple(msg): nargs = len(msg) if nargs == 2: (o_buf, o_counts) = msg if is_datatype(o_counts): (o_counts, o_type) = None, o_counts elif is_tuple(o_counts): (o_counts, o_displs) = o_counts elif nargs == 3: (o_buf, o_counts, o_type) = msg if is_tuple(o_counts): (o_counts, o_displs) = o_counts elif nargs == 4: (o_buf, o_counts, o_displs, o_type) = msg else: raise ValueError("message: expecting 2 to 4 items") elif PYPY: o_buf = msg else: raise TypeError("message: expecting buffer or list/tuple") # buffer: address, length, and datatype cdef void *baddr = NULL cdef MPI_Aint bsize = 0 cdef MPI_Datatype btype = MPI_DATATYPE_NULL cdef _p_message m = message_basic(o_buf, o_type, readonly, &baddr, &bsize, &btype) # counts and displacements cdef int *counts = NULL cdef int *displs = NULL cdef int i=0, val=0 cdef MPI_Aint extent=0, lb=0 cdef MPI_Aint asize=0, aval=0 if o_counts is None: if bsize > 0: if btype == MPI_DATATYPE_NULL: raise ValueError( "message: cannot infer count, " "datatype is null") CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) if extent <= 0: raise ValueError( ("message: cannot infer count, " "datatype extent %d (lb:%d, ub:%d)" ) % (extent, lb, lb+extent)) if (bsize % extent) != 0: raise ValueError( ("message: cannot infer count, " "buffer length %d is not a multiple of " "datatype extent %d (lb:%d, ub:%d)" ) % (bsize, extent, lb, lb+extent)) asize = bsize // extent o_counts = newarray(blocks, &counts) for i from 0 <= i < blocks: aval = (asize // blocks) + (asize % blocks > i) counts[i] = downcast(aval) elif is_integral(o_counts): val = o_counts o_counts = newarray(blocks, &counts) for i from 0 <= i < blocks: counts[i] = val else: o_counts = chkarray(o_counts, blocks, &counts) if o_displs is None: # contiguous val = 0 o_displs = newarray(blocks, &displs) for i from 0 <= i < blocks: displs[i] = val val += counts[i] elif is_integral(o_displs): # strided val = o_displs o_displs = newarray(blocks, &displs) for i from 0 <= i < blocks: displs[i] = val * i else: # general o_displs = chkarray(o_displs, blocks, &displs) # return collected message data m.count = o_counts m.displ = o_displs _addr[0] = baddr _counts[0] = counts _displs[0] = displs _type[0] = btype return m cdef tuple message_vector_w(object msg, int readonly, int blocks, # void **_addr, int **_counts, integral_t **_displs, MPI_Datatype **_types, ): cdef int i = 0 cdef Py_ssize_t nargs = len(msg) cdef object o_buffer, o_counts, o_displs, o_types if nargs == 2: o_buffer, o_types = msg o_counts = o_displs = None elif nargs == 3: o_buffer, (o_counts, o_displs), o_types = msg elif nargs == 4: o_buffer, o_counts, o_displs, o_types = msg else: raise ValueError("message: expecting 2 to 4 items") if readonly: o_buffer = getbuffer_r(o_buffer, _addr, NULL) else: o_buffer = getbuffer_w(o_buffer, _addr, NULL) if o_counts is None and o_displs is None: o_counts = newarray(blocks, _counts) o_displs = newarray(blocks, _displs) for i from 0 <= i < blocks: _counts[0][i] = 1 _displs[0][i] = 0 else: o_counts = chkarray(o_counts, blocks, _counts) o_displs = chkarray(o_displs, blocks, _displs) o_types = asarray_Datatype(o_types, blocks, _types) return (o_buffer, o_counts, o_displs, o_types) #------------------------------------------------------------------------------ @cython.final @cython.internal cdef class _p_msg_p2p: # raw C-side arguments cdef void *buf cdef int count cdef MPI_Datatype dtype # python-side argument cdef object _msg def __cinit__(self): self.buf = NULL self.count = 0 self.dtype = MPI_DATATYPE_NULL cdef int for_send(self, object msg, int rank) except -1: self._msg = message_simple(msg, 1, # readonly rank, 0, &self.buf, &self.count, &self.dtype) return 0 cdef int for_recv(self, object msg, int rank) except -1: self._msg = message_simple(msg, 0, # writable rank, 0, &self.buf, &self.count, &self.dtype) return 0 cdef inline _p_msg_p2p message_p2p_send(object sendbuf, int dest): cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) msg.for_send(sendbuf, dest) return msg cdef inline _p_msg_p2p message_p2p_recv(object recvbuf, int source): cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) msg.for_recv(recvbuf, source) return msg #------------------------------------------------------------------------------ @cython.final @cython.internal cdef class _p_msg_cco: # raw C-side arguments cdef void *sbuf, *rbuf cdef int scount, rcount cdef int *scounts, *rcounts cdef int *sdispls, *rdispls cdef MPI_Datatype stype, rtype # python-side arguments cdef object _smsg, _rmsg cdef object _rcnt def __cinit__(self): self.sbuf = self.rbuf = NULL self.scount = self.rcount = 0 self.scounts = self.rcounts = NULL self.sdispls = self.rdispls = NULL self.stype = self.rtype = MPI_DATATYPE_NULL # Collective Communication Operations # ----------------------------------- # sendbuf arguments cdef int for_cco_send(self, bint VECTOR, object amsg, int rank, int blocks) except -1: cdef bint readonly = 1 if not VECTOR: # block variant self._smsg = message_simple( amsg, readonly, rank, blocks, &self.sbuf, &self.scount, &self.stype) else: # vector variant self._smsg = message_vector( amsg, readonly, rank, blocks, &self.sbuf, &self.scounts, &self.sdispls, &self.stype) return 0 # recvbuf arguments cdef int for_cco_recv(self, bint VECTOR, object amsg, int rank, int blocks) except -1: cdef bint readonly = 0 if not VECTOR: # block variant self._rmsg = message_simple( amsg, readonly, rank, blocks, &self.rbuf, &self.rcount, &self.rtype) else: # vector variant self._rmsg = message_vector( amsg, readonly, rank, blocks, &self.rbuf, &self.rcounts, &self.rdispls, &self.rtype) return 0 # bcast cdef int for_bcast(self, object msg, int root, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0, rank=0, sending=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if not inter: # intra-communication CHKERR( MPI_Comm_rank(comm, &rank) ) if root == rank: self.for_cco_send(0, msg, root, 0) sending = 1 else: self.for_cco_recv(0, msg, root, 0) sending = 0 else: # inter-communication if (root == MPI_ROOT or root == MPI_PROC_NULL): self.for_cco_send(0, msg, root, 0) sending = 1 else: self.for_cco_recv(0, msg, root, 0) sending = 0 if sending: self.rbuf = self.sbuf self.rcount = self.scount self.rtype = self.stype else: self.sbuf = self.rbuf self.scount = self.rcount self.stype = self.rtype return 0 # gather/gatherv cdef int for_gather(self, int v, object smsg, object rmsg, int root, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL CHKERR( MPI_Comm_test_inter(comm, &inter) ) if not inter: # intra-communication CHKERR( MPI_Comm_size(comm, &size) ) CHKERR( MPI_Comm_rank(comm, &rank) ) if root == rank: self.for_cco_recv(v, rmsg, root, size) if smsg is __IN_PLACE__: self.sbuf = MPI_IN_PLACE self.scount = self.rcount self.stype = self.rtype else: self.for_cco_send(0, smsg, 0, 0) else: self.for_cco_recv(v, rmsg, null, size) self.for_cco_send(0, smsg, root, 0) else: # inter-communication CHKERR( MPI_Comm_remote_size(comm, &size) ) if (root == MPI_ROOT or root == MPI_PROC_NULL): self.for_cco_recv(v, rmsg, root, size) self.for_cco_send(0, smsg, null, 0) else: self.for_cco_recv(v, rmsg, null, size) self.for_cco_send(0, smsg, root, 0) return 0 # scatter/scatterv cdef int for_scatter(self, int v, object smsg, object rmsg, int root, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL CHKERR( MPI_Comm_test_inter(comm, &inter) ) if not inter: # intra-communication CHKERR( MPI_Comm_size(comm, &size) ) CHKERR( MPI_Comm_rank(comm, &rank) ) if root == rank: self.for_cco_send(v, smsg, root, size) if rmsg is __IN_PLACE__: self.rbuf = MPI_IN_PLACE self.rcount = self.scount self.rtype = self.stype else: self.for_cco_recv(0, rmsg, root, 0) else: self.for_cco_send(v, smsg, null, size) self.for_cco_recv(0, rmsg, root, 0) else: # inter-communication CHKERR( MPI_Comm_remote_size(comm, &size) ) if (root == MPI_ROOT or root == MPI_PROC_NULL): self.for_cco_send(v, smsg, root, size) self.for_cco_recv(0, rmsg, null, 0) else: self.for_cco_send(v, smsg, null, size) self.for_cco_recv(0, rmsg, root, 0) return 0 # allgather/allgatherv cdef int for_allgather(self, int v, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0, size=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if not inter: # intra-communication CHKERR( MPI_Comm_size(comm, &size) ) else: # inter-communication CHKERR( MPI_Comm_remote_size(comm, &size) ) # self.for_cco_recv(v, rmsg, 0, size) if not inter and smsg is __IN_PLACE__: self.sbuf = MPI_IN_PLACE self.scount = self.rcount self.stype = self.rtype else: self.for_cco_send(0, smsg, 0, 0) return 0 # alltoall/alltoallv cdef int for_alltoall(self, int v, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0, size=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if not inter: # intra-communication CHKERR( MPI_Comm_size(comm, &size) ) else: # inter-communication CHKERR( MPI_Comm_remote_size(comm, &size) ) # self.for_cco_recv(v, rmsg, 0, size) if not inter and smsg is __IN_PLACE__: self.sbuf = MPI_IN_PLACE self.scount = self.rcount self.scounts = self.rcounts self.sdispls = self.rdispls self.stype = self.rtype else: self.for_cco_send(v, smsg, 0, size) return 0 # Neighbor Collectives # -------------------- # neighbor allgather/allgatherv cdef int for_neighbor_allgather(self, int v, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int recvsize=0 comm_neighbors_count(comm, &recvsize, NULL) self.for_cco_send(0, smsg, 0, 0) self.for_cco_recv(v, rmsg, 0, recvsize) return 0 # neighbor alltoall/alltoallv cdef int for_neighbor_alltoall(self, int v, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int sendsize=0, recvsize=0 comm_neighbors_count(comm, &recvsize, &sendsize) self.for_cco_send(v, smsg, 0, sendsize) self.for_cco_recv(v, rmsg, 0, recvsize) return 0 # Collective Reductions Operations # -------------------------------- # sendbuf cdef int for_cro_send(self, object amsg, int root) except -1: self._smsg = message_simple(amsg, 1, # readonly root, 0, &self.sbuf, &self.scount, &self.stype) return 0 # recvbuf cdef int for_cro_recv(self, object amsg, int root) except -1: self._rmsg = message_simple(amsg, 0, # writable root, 0, &self.rbuf, &self.rcount, &self.rtype) return 0 cdef int for_reduce(self, object smsg, object rmsg, int root, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0, rank=0, null=MPI_PROC_NULL CHKERR( MPI_Comm_test_inter(comm, &inter) ) if not inter: # intra-communication CHKERR( MPI_Comm_rank(comm, &rank) ) if root == rank: self.for_cro_recv(rmsg, root) if smsg is __IN_PLACE__: self.sbuf = MPI_IN_PLACE self.scount = self.rcount self.stype = self.rtype else: self.for_cro_send(smsg, root) else: self.for_cro_recv(rmsg, null) self.for_cro_send(smsg, root) self.rcount = self.scount self.rtype = self.stype else: # inter-communication if (root == MPI_ROOT or root == MPI_PROC_NULL): self.for_cro_recv(rmsg, root) self.scount = self.rcount self.stype = self.rtype else: self.for_cro_send(smsg, root) self.rcount = self.scount self.rtype = self.stype return 0 cdef int for_allreduce(self, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) # get send and recv buffers self.for_cro_recv(rmsg, 0) if not inter and smsg is __IN_PLACE__: self.sbuf = MPI_IN_PLACE self.scount = self.rcount self.stype = self.rtype else: self.for_cro_send(smsg, 0) # check counts and datatypes if self.sbuf != MPI_IN_PLACE: if self.stype != self.rtype: raise ValueError( "mismatch in send and receive MPI datatypes") if self.scount != self.rcount: raise ValueError( "mismatch in send count %d and receive count %d" % (self.scount, self.rcount)) return 0 cdef int for_reduce_scatter_block(self, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0, size=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) CHKERR( MPI_Comm_size(comm, &size) ) # get send and recv buffers if not inter and smsg is __IN_PLACE__: self.for_cco_recv(0, rmsg, 0, size) self.sbuf = MPI_IN_PLACE else: self.for_cco_recv(0, rmsg, 0, 0) self.for_cco_send(0, smsg, 0, size) # check counts and datatypes if self.sbuf != MPI_IN_PLACE: if self.stype != self.rtype: raise ValueError( "mismatch in send and receive MPI datatypes") if self.scount != self.rcount: raise ValueError( "mismatch in send count %d receive count %d" % (self.scount, self.rcount*size)) return 0 cdef int for_reduce_scatter(self, object smsg, object rmsg, object rcnt, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0, size=0, rank=MPI_PROC_NULL CHKERR( MPI_Comm_test_inter(comm, &inter) ) CHKERR( MPI_Comm_size(comm, &size) ) CHKERR( MPI_Comm_rank(comm, &rank) ) # get send and recv buffers self.for_cro_recv(rmsg, 0) if not inter and smsg is __IN_PLACE__: self.sbuf = MPI_IN_PLACE else: self.for_cro_send(smsg, 0) # get receive counts if rcnt is None and not inter and self.sbuf != MPI_IN_PLACE: self._rcnt = newarray(size, &self.rcounts) CHKERR( MPI_Allgather(&self.rcount, 1, MPI_INT, self.rcounts, 1, MPI_INT, comm) ) else: self._rcnt = chkarray(rcnt, size, &self.rcounts) # total sum or receive counts cdef int i=0, sumrcounts=0 for i from 0 <= i < size: sumrcounts += self.rcounts[i] # check counts and datatypes if self.sbuf != MPI_IN_PLACE: if self.stype != self.rtype: raise ValueError( "mismatch in send and receive MPI datatypes") if self.scount != sumrcounts: raise ValueError( "mismatch in send count %d and sum(counts) %d" % (self.scount, sumrcounts)) if self.rcount != self.rcounts[rank]: raise ValueError( "mismatch in receive count %d and counts[%d] %d" % (self.rcount, rank, self.rcounts[rank])) else: if self.rcount != sumrcounts: raise ValueError( "mismatch in receive count %d and sum(counts) %d" % (self.rcount, sumrcounts)) return 0 cdef int for_scan(self, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 # get send and recv buffers self.for_cro_recv(rmsg, 0) if smsg is __IN_PLACE__: self.sbuf = MPI_IN_PLACE self.scount = self.rcount self.stype = self.rtype else: self.for_cro_send(smsg, 0) # check counts and datatypes if self.sbuf != MPI_IN_PLACE: if self.stype != self.rtype: raise ValueError( "mismatch in send and receive MPI datatypes") if self.scount != self.rcount: raise ValueError( "mismatch in send count %d and receive count %d" % (self.scount, self.rcount)) return 0 cdef int for_exscan(self, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 # get send and recv buffers self.for_cro_recv(rmsg, 0) if smsg is __IN_PLACE__: self.sbuf = MPI_IN_PLACE self.scount = self.rcount self.stype = self.rtype else: self.for_cro_send(smsg, 0) # check counts and datatypes if self.sbuf != MPI_IN_PLACE: if self.stype != self.rtype: raise ValueError( "mismatch in send and receive MPI datatypes") if self.scount != self.rcount: raise ValueError( "mismatch in send count %d and receive count %d" % (self.scount, self.rcount)) return 0 cdef inline _p_msg_cco message_cco(): cdef _p_msg_cco msg = <_p_msg_cco>_p_msg_cco.__new__(_p_msg_cco) return msg #------------------------------------------------------------------------------ @cython.final @cython.internal cdef class _p_msg_ccow: # raw C-side arguments cdef void *sbuf, *rbuf cdef int *scounts, *rcounts cdef int *sdispls, *rdispls cdef MPI_Aint *sdisplsA, *rdisplsA cdef MPI_Datatype *stypes, *rtypes # python-side arguments cdef object _smsg, _rmsg def __cinit__(self): self.sbuf = self.rbuf = NULL self.scounts = self.rcounts = NULL self.sdispls = self.rdispls = NULL self.sdisplsA = self.rdisplsA = NULL self.stypes = self.rtypes = NULL # alltoallw cdef int for_alltoallw(self, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int inter=0, size=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if not inter: # intra-communication CHKERR( MPI_Comm_size(comm, &size) ) else: # inter-communication CHKERR( MPI_Comm_remote_size(comm, &size) ) # self._rmsg = message_vector_w( rmsg, 0, size, &self.rbuf, &self.rcounts, &self.rdispls, &self.rtypes) if not inter and smsg is __IN_PLACE__: self.sbuf = MPI_IN_PLACE self.scounts = self.rcounts self.sdispls = self.rdispls self.stypes = self.rtypes return 0 self._smsg = message_vector_w( smsg, 1, size, &self.sbuf, &self.scounts, &self.sdispls, &self.stypes) return 0 # neighbor alltoallw cdef int for_neighbor_alltoallw(self, object smsg, object rmsg, MPI_Comm comm) except -1: if comm == MPI_COMM_NULL: return 0 cdef int sendsize=0, recvsize=0 comm_neighbors_count(comm, &recvsize, &sendsize) self._rmsg = message_vector_w( rmsg, 0, recvsize, &self.rbuf, &self.rcounts, &self.rdisplsA, &self.rtypes) self._smsg = message_vector_w( smsg, 1, sendsize, &self.sbuf, &self.scounts, &self.sdisplsA, &self.stypes) return 0 cdef inline _p_msg_ccow message_ccow(): cdef _p_msg_ccow msg = <_p_msg_ccow>_p_msg_ccow.__new__(_p_msg_ccow) return msg #------------------------------------------------------------------------------ @cython.final @cython.internal cdef class _p_msg_rma: # raw origin arguments cdef void* oaddr cdef int ocount cdef MPI_Datatype otype # raw compare arguments cdef void* caddr cdef int ccount cdef MPI_Datatype ctype # raw result arguments cdef void* raddr cdef int rcount cdef MPI_Datatype rtype # raw target arguments cdef MPI_Aint tdisp cdef int tcount cdef MPI_Datatype ttype # python-side arguments cdef object _origin cdef object _compare cdef object _result cdef object _target def __cinit__(self): self.oaddr = NULL self.ocount = 0 self.otype = MPI_DATATYPE_NULL self.raddr = NULL self.rcount = 0 self.rtype = MPI_DATATYPE_NULL self.tdisp = 0 self.tcount = 0 self.ttype = MPI_DATATYPE_NULL cdef int for_rma(self, int readonly, object origin, int rank, object target) except -1: # ORIGIN self._origin = message_simple( origin, readonly, rank, 0, &self.oaddr, &self.ocount, &self.otype) if ((rank == MPI_PROC_NULL) and (origin is not None) and (is_list(origin) or is_tuple(origin)) and (len(origin) > 0 and isinstance(origin[-1], Datatype))): self.otype = (origin[-1]).ob_mpi self._origin = origin # TARGET cdef Py_ssize_t nargs = 0 if target is None: self.tdisp = 0 self.tcount = self.ocount self.ttype = self.otype elif is_integral(target): self.tdisp = target self.tcount = self.ocount self.ttype = self.otype elif is_list(target) or is_tuple(target): self.tdisp = 0 self.tcount = self.ocount self.ttype = self.otype nargs = len(target) if nargs >= 1: self.tdisp = target[0] if nargs >= 2: self.tcount = target[1] if nargs >= 3: self.ttype = (target[2]).ob_mpi if nargs >= 4: raise ValueError("target: expecting 3 items at most") else: raise ValueError("target: expecting integral or list/tuple") self._target = target return 0 cdef int for_put(self, object origin, int rank, object target) except -1: self.for_rma(1, origin, rank, target) return 0 cdef int for_get(self, object origin, int rank, object target) except -1: self.for_rma(0, origin, rank, target) return 0 cdef int for_acc(self, object origin, int rank, object target) except -1: self.for_rma(1, origin, rank, target) return 0 cdef int set_origin(self, object origin, int rank) except -1: self._origin = message_simple( origin, 1, rank, 0, &self.oaddr, &self.ocount, &self.otype) self.tdisp = 0 self.tcount = self.ocount self.ttype = self.otype cdef int set_compare(self, object compare, int rank) except -1: self._compare = message_simple( compare, 1, rank, 0, &self.caddr, &self.ccount, &self.ctype) cdef int set_result(self, object result, int rank) except -1: self._result = message_simple( result, 0, rank, 0, &self.raddr, &self.rcount, &self.rtype) cdef int for_get_acc(self, object origin, object result, int rank, object target) except -1: self.for_rma(0, origin, rank, target) self.set_result(result, rank) return 0 cdef int for_fetch_op(self, object origin, object result, int rank, MPI_Aint disp) except -1: self.set_origin(origin, rank) self.set_result(result, rank) self.tdisp = disp if rank == MPI_PROC_NULL: return 0 # Check if self.ocount != 1: raise ValueError( "origin: expecting a single element, got %d" % self.ocount) if self.rcount != 1: raise ValueError( "result: expecting a single element, got %d" % self.rcount) if self.otype != self.rtype: raise ValueError( "mismatch in origin and result MPI datatypes") return 0 cdef int for_cmp_swap(self, object origin, object compare, object result, int rank, MPI_Aint disp) except -1: self.set_origin(origin, rank) self.set_compare(compare, rank) self.set_result(result, rank) self.tdisp = disp if rank == MPI_PROC_NULL: return 0 # Check if self.ocount != 1: raise ValueError( "origin: expecting a single element, got %d" % self.ocount) if self.ccount != 1: raise ValueError( "compare: expecting a single element, got %d" % self.ccount) if self.rcount != 1: raise ValueError( "result: expecting a single element, got %d" % self.rcount) if self.otype != self.ctype: raise ValueError( "mismatch in origin and compare MPI datatypes") if self.otype != self.rtype: raise ValueError( "mismatch in origin and result MPI datatypes") return 0 cdef inline _p_msg_rma message_rma(): cdef _p_msg_rma msg = <_p_msg_rma>_p_msg_rma.__new__(_p_msg_rma) return msg #------------------------------------------------------------------------------ @cython.final @cython.internal cdef class _p_msg_io: # raw C-side data cdef void *buf cdef int count cdef MPI_Datatype dtype # python-side data cdef object _msg def __cinit__(self): self.buf = NULL self.count = 0 self.dtype = MPI_DATATYPE_NULL cdef int for_read(self, object msg) except -1: self._msg = message_simple(msg, 0, # writable 0, 0, &self.buf, &self.count, &self.dtype) return 0 cdef int for_write(self, object msg) except -1: self._msg = message_simple(msg, 1, # readonly 0, 0, &self.buf, &self.count, &self.dtype) return 0 cdef inline _p_msg_io message_io_read(object buf): cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) msg.for_read(buf) return msg cdef inline _p_msg_io message_io_write(object buf): cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) msg.for_write(buf) return msg #------------------------------------------------------------------------------ mpi4py-3.0.3/src/mpi4py/MPI/asmemory.pxi0000644000175000017500000000176613200562156021023 0ustar dalcinldalcinl00000000000000#------------------------------------------------------------------------------ cdef extern from "Python.h": enum: PY_SSIZE_T_MAX void *PyMem_Malloc(size_t) void *PyMem_Realloc(void*, size_t) void PyMem_Free(void*) #------------------------------------------------------------------------------ @cython.final @cython.internal cdef class _p_mem: cdef void *buf def __cinit__(self): self.buf = NULL def __dealloc__(self): PyMem_Free(self.buf) cdef inline _p_mem allocate(Py_ssize_t m, size_t b, void *buf): if m > PY_SSIZE_T_MAX/b: raise MemoryError("memory allocation size too large") if m < 0: raise RuntimeError("memory allocation with negative size") cdef size_t n = m * b cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) ob.buf = PyMem_Malloc(n) if ob.buf == NULL: raise MemoryError if buf != NULL: (buf)[0] = ob.buf return ob #------------------------------------------------------------------------------ mpi4py-3.0.3/src/mpi4py/MPI/MPI.pyx0000644000175000017500000002256613200562156017635 0ustar dalcinldalcinl00000000000000__doc__ = """ Message Passing Interface """ from mpi4py.libmpi cimport * include "stdlib.pxi" include "atimport.pxi" bootstrap() initialize() include "asstring.pxi" include "asbuffer.pxi" include "asmemory.pxi" include "asarray.pxi" include "helpers.pxi" include "attrimpl.pxi" include "mpierrhdl.pxi" include "msgbuffer.pxi" include "msgpickle.pxi" include "CAPI.pxi" # Assorted constants # ------------------ UNDEFINED = MPI_UNDEFINED #: Undefined integer value ANY_SOURCE = MPI_ANY_SOURCE #: Wildcard source value for receives ANY_TAG = MPI_ANY_TAG #: Wildcard tag value for receives PROC_NULL = MPI_PROC_NULL #: Special process rank for send/receive ROOT = MPI_ROOT #: Root process for collective inter-communications BOTTOM = __BOTTOM__ #: Special address for buffers IN_PLACE = __IN_PLACE__ #: *In-place* option for collective communications # Predefined Attribute Keyvals # ---------------------------- KEYVAL_INVALID = MPI_KEYVAL_INVALID TAG_UB = MPI_TAG_UB HOST = MPI_HOST IO = MPI_IO WTIME_IS_GLOBAL = MPI_WTIME_IS_GLOBAL UNIVERSE_SIZE = MPI_UNIVERSE_SIZE APPNUM = MPI_APPNUM LASTUSEDCODE = MPI_LASTUSEDCODE WIN_BASE = MPI_WIN_BASE WIN_SIZE = MPI_WIN_SIZE WIN_DISP_UNIT = MPI_WIN_DISP_UNIT WIN_CREATE_FLAVOR = MPI_WIN_CREATE_FLAVOR WIN_FLAVOR = MPI_WIN_CREATE_FLAVOR WIN_MODEL = MPI_WIN_MODEL include "Exception.pyx" include "Errhandler.pyx" include "Datatype.pyx" include "Status.pyx" include "Request.pyx" include "Message.pyx" include "Info.pyx" include "Op.pyx" include "Group.pyx" include "Comm.pyx" include "Win.pyx" include "File.pyx" # Memory Allocation # ----------------- def Alloc_mem(Aint size, Info info=INFO_NULL): """ Allocate memory for message passing and RMA """ cdef void *base = NULL CHKERR( MPI_Alloc_mem(size, info.ob_mpi, &base) ) return tomemory(base, size) def Free_mem(mem): """ Free memory allocated with `Alloc_mem()` """ cdef void *base = NULL cdef memory m = asmemory(mem, &base, NULL) CHKERR( MPI_Free_mem(base) ) m.release() # Initialization and Exit # ----------------------- def Init(): """ Initialize the MPI execution environment """ CHKERR( MPI_Init(NULL, NULL) ) initialize() def Finalize(): """ Terminate the MPI execution environment """ finalize() CHKERR( MPI_Finalize() ) # Levels of MPI threading support # ------------------------------- THREAD_SINGLE = MPI_THREAD_SINGLE #: Only one thread will execute THREAD_FUNNELED = MPI_THREAD_FUNNELED #: MPI calls are *funneled* to the main thread THREAD_SERIALIZED = MPI_THREAD_SERIALIZED #: MPI calls are *serialized* THREAD_MULTIPLE = MPI_THREAD_MULTIPLE #: Multiple threads may call MPI def Init_thread(int required=THREAD_MULTIPLE): """ Initialize the MPI execution environment """ cdef int provided = MPI_THREAD_SINGLE CHKERR( MPI_Init_thread(NULL, NULL, required, &provided) ) initialize() return provided def Query_thread(): """ Return the level of thread support provided by the MPI library """ cdef int provided = MPI_THREAD_SINGLE CHKERR( MPI_Query_thread(&provided) ) return provided def Is_thread_main(): """ Indicate whether this thread called ``Init`` or ``Init_thread`` """ cdef int flag = 1 CHKERR( MPI_Is_thread_main(&flag) ) return flag def Is_initialized(): """ Indicates whether ``Init`` has been called """ cdef int flag = 0 CHKERR( MPI_Initialized(&flag) ) return flag def Is_finalized(): """ Indicates whether ``Finalize`` has completed """ cdef int flag = 0 CHKERR( MPI_Finalized(&flag) ) return flag # Implementation Information # -------------------------- # MPI Version Number # ----------------- VERSION = MPI_VERSION SUBVERSION = MPI_SUBVERSION def Get_version(): """ Obtain the version number of the MPI standard supported by the implementation as a tuple ``(version, subversion)`` """ cdef int version = 1 cdef int subversion = 0 CHKERR( MPI_Get_version(&version, &subversion) ) return (version, subversion) def Get_library_version(): """ Obtain the version string of the MPI library """ cdef char name[MPI_MAX_LIBRARY_VERSION_STRING+1] cdef int nlen = 0 CHKERR( MPI_Get_library_version(name, &nlen) ) return tompistr(name, nlen) # Environmental Inquires # ---------------------- def Get_processor_name(): """ Obtain the name of the calling processor """ cdef char name[MPI_MAX_PROCESSOR_NAME+1] cdef int nlen = 0 CHKERR( MPI_Get_processor_name(name, &nlen) ) return tompistr(name, nlen) # Timers and Synchronization # -------------------------- def Wtime(): """ Return an elapsed time on the calling processor """ return MPI_Wtime() def Wtick(): """ Return the resolution of ``Wtime`` """ return MPI_Wtick() # Control of Profiling # -------------------- def Pcontrol(int level): """ Control profiling """ if level < 0 or level > 2: CHKERR( MPI_ERR_ARG ) CHKERR( MPI_Pcontrol(level) ) # Maximum string sizes # -------------------- # MPI-1 MAX_PROCESSOR_NAME = MPI_MAX_PROCESSOR_NAME MAX_ERROR_STRING = MPI_MAX_ERROR_STRING # MPI-2 MAX_PORT_NAME = MPI_MAX_PORT_NAME MAX_INFO_KEY = MPI_MAX_INFO_KEY MAX_INFO_VAL = MPI_MAX_INFO_VAL MAX_OBJECT_NAME = MPI_MAX_OBJECT_NAME MAX_DATAREP_STRING = MPI_MAX_DATAREP_STRING # MPI-3 MAX_LIBRARY_VERSION_STRING = MPI_MAX_LIBRARY_VERSION_STRING # -------------------------------------------------------------------- cdef extern from *: int PyMPI_Get_vendor(const char**,int*,int*,int*) nogil def get_vendor(): """ Infomation about the underlying MPI implementation :Returns: - a string with the name of the MPI implementation - an integer 3-tuple version ``(major, minor, micro)`` """ cdef const char *name=NULL cdef int major=0, minor=0, micro=0 CHKERR( PyMPI_Get_vendor(&name, &major, &minor, µ) ) return (mpistr(name), (major, minor, micro)) # -------------------------------------------------------------------- cdef extern from "Python.h": ctypedef ssize_t Py_intptr_t ctypedef size_t Py_uintptr_t cdef inline int _mpi_type(object arg, type cls) except -1: if isinstance(arg, type): if issubclass(arg, cls): return 1 else: if isinstance(arg, cls): return 1 return 0 def _sizeof(arg): """ Size in bytes of the underlying MPI handle """ if _mpi_type(arg, Status): return sizeof(MPI_Status) if _mpi_type(arg, Datatype): return sizeof(MPI_Datatype) if _mpi_type(arg, Request): return sizeof(MPI_Request) if _mpi_type(arg, Message): return sizeof(MPI_Message) if _mpi_type(arg, Op): return sizeof(MPI_Op) if _mpi_type(arg, Group): return sizeof(MPI_Group) if _mpi_type(arg, Info): return sizeof(MPI_Info) if _mpi_type(arg, Errhandler): return sizeof(MPI_Errhandler) if _mpi_type(arg, Comm): return sizeof(MPI_Comm) if _mpi_type(arg, Win): return sizeof(MPI_Win) if _mpi_type(arg, File): return sizeof(MPI_File) raise TypeError("expecting an MPI type or instance") def _addressof(arg): """ Memory address of the underlying MPI handle """ cdef void *ptr = NULL if isinstance(arg, Status): ptr = &(arg).ob_mpi elif isinstance(arg, Datatype): ptr = &(arg).ob_mpi elif isinstance(arg, Request): ptr = &(arg).ob_mpi elif isinstance(arg, Message): ptr = &(arg).ob_mpi elif isinstance(arg, Op): ptr = &(arg).ob_mpi elif isinstance(arg, Group): ptr = &(arg).ob_mpi elif isinstance(arg, Info): ptr = &(arg).ob_mpi elif isinstance(arg, Errhandler): ptr = &(arg).ob_mpi elif isinstance(arg, Comm): ptr = &(arg).ob_mpi elif isinstance(arg, Win): ptr = &(arg).ob_mpi elif isinstance(arg, File): ptr = &(arg).ob_mpi else: raise TypeError("expecting an MPI instance") return PyLong_FromVoidPtr(ptr) def _handleof(arg): """ Unsigned integer value with the underlying MPI handle """ if isinstance(arg, Status): raise NotImplementedError elif isinstance(arg, Datatype): return ((arg).ob_mpi) elif isinstance(arg, Request): return ((arg).ob_mpi) elif isinstance(arg, Message): return ((arg).ob_mpi) elif isinstance(arg, Op): return ((arg).ob_mpi) elif isinstance(arg, Group): return ((arg).ob_mpi) elif isinstance(arg, Info): return ((arg).ob_mpi) elif isinstance(arg, Errhandler): return ((arg).ob_mpi) elif isinstance(arg, Comm): return ((arg).ob_mpi) elif isinstance(arg, Win): return ((arg).ob_mpi) elif isinstance(arg, File): return ((arg).ob_mpi) else: raise TypeError("expecting an MPI instance") # -------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/reqimpl.pxi0000644000175000017500000001237313200562156020634 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- cdef MPI_Status empty_status empty_status.MPI_SOURCE = MPI_ANY_SOURCE empty_status.MPI_TAG = MPI_ANY_TAG empty_status.MPI_ERROR = MPI_SUCCESS cdef object acquire_rs(object requests, object statuses, int *count, MPI_Request *rp[], MPI_Status *sp[]): cdef MPI_Request *array_r = NULL cdef MPI_Status *array_s = NULL cdef object ob_r = None, ob_s = None cdef Py_ssize_t i = 0, n = len(requests) count[0] = n ob_r = allocate(n, sizeof(MPI_Request), &array_r) for i from 0 <= i < n: array_r[i] = (requests[i]).ob_mpi rp[0] = array_r if statuses is not None: ob_s = allocate(n, sizeof(MPI_Status), &array_s) for i from 0 <= i < n: array_s[i] = empty_status sp[0] = array_s return (ob_r, ob_s) cdef int release_rs(object requests, object statuses, int count, MPI_Request rp[], MPI_Status sp[]) except -1: cdef Py_ssize_t i = 0, nr = count, ns = 0 cdef Request req = None for i from 0 <= i < nr: req = requests[i] req.ob_mpi = rp[i] if rp[i] == MPI_REQUEST_NULL: req.ob_buf = None if statuses is not None: ns = len(statuses) if nr > ns : if isinstance(statuses, list): statuses += [Status.__new__(Status) for i from ns <= i < nr] ns = nr for i from 0 <= i < ns: (statuses[i]).ob_mpi = sp[i] return 0 # ----------------------------------------------------------------------------- @cython.final @cython.internal cdef class _p_greq: cdef object query_fn cdef object free_fn cdef object cancel_fn cdef tuple args cdef dict kargs def __cinit__(self, query_fn, free_fn, cancel_fn, args, kargs): self.query_fn = query_fn self.free_fn = free_fn self.cancel_fn = cancel_fn self.args = tuple(args) if args is not None else () self.kargs = dict(kargs) if kargs is not None else {} cdef int query(self, MPI_Status *status) except -1: status.MPI_SOURCE = MPI_ANY_SOURCE status.MPI_TAG = MPI_ANY_TAG MPI_Status_set_elements(status, MPI_BYTE, 0) MPI_Status_set_cancelled(status, 0) cdef Status sts = Status.__new__(Status) if self.query_fn is not None: sts.ob_mpi = status[0] self.query_fn(sts, *self.args, **self.kargs) status[0] = sts.ob_mpi if self.cancel_fn is None: MPI_Status_set_cancelled(status, 0) return MPI_SUCCESS cdef int free(self) except -1: if self.free_fn is not None: self.free_fn(*self.args, **self.kargs) return MPI_SUCCESS cdef int cancel(self, bint completed) except -1: if self.cancel_fn is not None: self.cancel_fn(completed, *self.args, **self.kargs) return MPI_SUCCESS # --- cdef int greq_query(void *extra_state, MPI_Status *status) \ except MPI_ERR_UNKNOWN with gil: cdef _p_greq state = <_p_greq>extra_state cdef int ierr = MPI_SUCCESS cdef object exc try: state.query(status) except MPIException as exc: print_traceback() ierr = exc.Get_error_code() except: print_traceback() ierr = MPI_ERR_OTHER return ierr cdef int greq_free(void *extra_state) \ except MPI_ERR_UNKNOWN with gil: cdef _p_greq state = <_p_greq>extra_state cdef int ierr = MPI_SUCCESS cdef object exc try: state.free() except MPIException as exc: print_traceback() ierr = exc.Get_error_code() except: print_traceback() ierr = MPI_ERR_OTHER Py_DECREF(extra_state) return ierr cdef int greq_cancel(void *extra_state, int completed) \ except MPI_ERR_UNKNOWN with gil: cdef _p_greq state = <_p_greq>extra_state cdef int ierr = MPI_SUCCESS cdef object exc try: state.cancel(completed) except MPIException as exc: print_traceback() ierr = exc.Get_error_code() except: print_traceback() ierr = MPI_ERR_OTHER return ierr # --- @cython.callspec("MPIAPI") cdef int greq_query_fn(void *extra_state, MPI_Status *status) nogil: if extra_state == NULL: return MPI_ERR_INTERN if status == NULL: return MPI_ERR_INTERN if not Py_IsInitialized(): return MPI_ERR_INTERN return greq_query(extra_state, status) @cython.callspec("MPIAPI") cdef int greq_free_fn(void *extra_state) nogil: if extra_state == NULL: return MPI_ERR_INTERN if not Py_IsInitialized(): return MPI_ERR_INTERN return greq_free(extra_state) @cython.callspec("MPIAPI") cdef int greq_cancel_fn(void *extra_state, int completed) nogil: if extra_state == NULL: return MPI_ERR_INTERN if not Py_IsInitialized(): return MPI_ERR_INTERN return greq_cancel(extra_state, completed) # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/CAPI.pxi0000644000175000017500000001050013200562156017665 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- # Datatype cdef api object PyMPIDatatype_New(MPI_Datatype arg): cdef Datatype obj = Datatype.__new__(Datatype) obj.ob_mpi = arg return obj cdef api MPI_Datatype* PyMPIDatatype_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- # Status cdef api object PyMPIStatus_New(MPI_Status *arg): cdef Status obj = Status.__new__(Status) if (arg != NULL and arg != MPI_STATUS_IGNORE and arg != MPI_STATUSES_IGNORE): obj.ob_mpi = arg[0] else: pass # XXX should fail ? return obj cdef api MPI_Status* PyMPIStatus_Get(object arg) except? NULL: if arg is None: return MPI_STATUS_IGNORE return &(arg).ob_mpi # ----------------------------------------------------------------------------- # Request cdef api object PyMPIRequest_New(MPI_Request arg): cdef Request obj = Request.__new__(Request) obj.ob_mpi = arg return obj cdef api MPI_Request* PyMPIRequest_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- # Message cdef api object PyMPIMessage_New(MPI_Message arg): cdef Message obj = Message.__new__(Message) obj.ob_mpi = arg return obj cdef api MPI_Message* PyMPIMessage_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- # Op cdef api object PyMPIOp_New(MPI_Op arg): cdef Op obj = Op.__new__(Op) obj.ob_mpi = arg return obj cdef api MPI_Op* PyMPIOp_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- # Info cdef api object PyMPIInfo_New(MPI_Info arg): cdef Info obj = Info.__new__(Info) obj.ob_mpi = arg return obj cdef api MPI_Info* PyMPIInfo_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- # Group cdef api object PyMPIGroup_New(MPI_Group arg): cdef Group obj = Group.__new__(Group) obj.ob_mpi = arg return obj cdef api MPI_Group* PyMPIGroup_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- # Comm cdef api object PyMPIComm_New(MPI_Comm arg): cdef type cls = Comm cdef int inter = 0 cdef int topo = MPI_UNDEFINED if arg != MPI_COMM_NULL: CHKERR( MPI_Comm_test_inter(arg, &inter) ) if inter: cls = Intercomm else: CHKERR( MPI_Topo_test(arg, &topo) ) if topo == MPI_UNDEFINED: cls = Intracomm elif topo == MPI_CART: cls = Cartcomm elif topo == MPI_GRAPH: cls = Graphcomm elif topo == MPI_DIST_GRAPH: cls = Distgraphcomm else: cls = Intracomm cdef Comm obj = cls.__new__(cls) obj.ob_mpi = arg return obj cdef api MPI_Comm* PyMPIComm_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- # Win cdef api object PyMPIWin_New(MPI_Win arg): cdef Win obj = Win.__new__(Win) obj.ob_mpi = arg return obj cdef api MPI_Win* PyMPIWin_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- # File cdef api object PyMPIFile_New(MPI_File arg): cdef File obj = File.__new__(File) obj.ob_mpi = arg return obj cdef api MPI_File* PyMPIFile_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- # Errhandler cdef api object PyMPIErrhandler_New(MPI_Errhandler arg): cdef Errhandler obj = Errhandler.__new__(Errhandler) obj.ob_mpi = arg return obj cdef api MPI_Errhandler* PyMPIErrhandler_Get(object arg) except NULL: return &(arg).ob_mpi # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/opimpl.pxi0000644000175000017500000002301713200562156020460 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- cdef object _op_MAX(object x, object y): """maximum""" if y > x: return y else: return x cdef object _op_MIN(object x, object y): """minimum""" if y < x: return y else: return x cdef object _op_SUM(object x, object y): """sum""" return x + y cdef object _op_PROD(object x, object y): """product""" return x * y cdef object _op_BAND(object x, object y): """bit-wise and""" return x & y cdef object _op_BOR(object x, object y): """bit-wise or""" return x | y cdef object _op_BXOR(object x, object y): """bit-wise xor""" return x ^ y cdef object _op_LAND(object x, object y): """logical and""" return bool(x) & bool(y) cdef object _op_LOR(object x, object y): """logical or""" return bool(x) | bool(y) cdef object _op_LXOR(object x, object y): """logical xor""" return bool(x) ^ bool(y) cdef object _op_MAXLOC(object x, object y): """maximum and location""" cdef object i, j, u, v u, i = x v, j = y if u > v: return u, i elif v > u: return v, j elif j < i: return v, j else: return u, i cdef object _op_MINLOC(object x, object y): """minimum and location""" cdef object i, j, u, v u, i = x v, j = y if u < v: return u, i elif v < u: return v, j elif j < i: return v, j else: return u, i cdef object _op_REPLACE(object x, object y): """replace, (x, y) -> y""" return y cdef object _op_NO_OP(object x, object y): """no-op, (x, y) -> x""" return x # ----------------------------------------------------------------------------- cdef list op_user_registry = [None]*(1+32) cdef inline object op_user_py(int index, object x, object y, object dt): return op_user_registry[index](x, y, dt) cdef inline void op_user_mpi( int index, void *a, void *b, MPI_Aint n, MPI_Datatype *t) with gil: cdef Datatype datatype # errors in user-defined reduction operations are unrecoverable try: datatype = Datatype.__new__(Datatype) datatype.ob_mpi = t[0] try: op_user_py(index, tomemory(a, n), tomemory(b, n), datatype) finally: datatype.ob_mpi = MPI_DATATYPE_NULL except: # print the full exception traceback and abort. PySys_WriteStderr(b"Fatal Python error: %s\n", b"exception in user-defined reduction operation") try: print_traceback() finally: MPI_Abort(MPI_COMM_WORLD, 1) cdef inline void op_user_call( int index, void *a, void *b, int *plen, MPI_Datatype *t) nogil: # make it abort if Python has finalized if not Py_IsInitialized(): MPI_Abort(MPI_COMM_WORLD, 1) # make it abort if module clenaup has been done if (op_user_registry) == NULL: MPI_Abort(MPI_COMM_WORLD, 1) # compute the byte-size of memory buffers cdef MPI_Aint lb=0, extent=0 MPI_Type_get_extent(t[0], &lb, &extent) cdef MPI_Aint n = plen[0] * extent # make the actual GIL-safe Python call op_user_mpi(index, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_01(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call( 1, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_02(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call( 2, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_03(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call( 3, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_04(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call( 4, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_05(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call( 5, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_06(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call( 6, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_07(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call( 7, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_08(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call( 8, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_09(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call( 9, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_10(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(10, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_11(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(11, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_12(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(12, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_13(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(13, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_14(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(14, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_15(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(15, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_16(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(16, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_17(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(17, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_18(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(18, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_19(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(19, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_20(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(20, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_21(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(21, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_22(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(22, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_23(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(23, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_24(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(24, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_25(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(25, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_26(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(26, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_27(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(27, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_28(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(28, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_29(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(29, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_30(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(30, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_31(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(31, a, b, n, t) @cython.callspec("MPIAPI") cdef void op_user_32(void *a, void *b, int *n, MPI_Datatype *t) nogil: op_user_call(32, a, b, n, t) cdef MPI_User_function *op_user_map(int index) nogil: if index == 1: return op_user_01 elif index == 2: return op_user_02 elif index == 3: return op_user_03 elif index == 4: return op_user_04 elif index == 5: return op_user_05 elif index == 6: return op_user_06 elif index == 7: return op_user_07 elif index == 8: return op_user_08 elif index == 9: return op_user_09 elif index == 10: return op_user_10 elif index == 11: return op_user_11 elif index == 12: return op_user_12 elif index == 13: return op_user_13 elif index == 14: return op_user_14 elif index == 15: return op_user_15 elif index == 16: return op_user_16 elif index == 17: return op_user_17 elif index == 18: return op_user_18 elif index == 19: return op_user_19 elif index == 20: return op_user_20 elif index == 21: return op_user_21 elif index == 22: return op_user_22 elif index == 23: return op_user_23 elif index == 24: return op_user_24 elif index == 25: return op_user_25 elif index == 26: return op_user_26 elif index == 27: return op_user_27 elif index == 28: return op_user_28 elif index == 29: return op_user_29 elif index == 30: return op_user_30 elif index == 31: return op_user_31 elif index == 32: return op_user_32 else: return NULL cdef int op_user_new(object function, MPI_User_function **cfunction) except -1: # find a free slot in the registry cdef int index = 0 try: index = op_user_registry.index(None, 1) except ValueError: raise RuntimeError("cannot create too many " "user-defined reduction operations") # the line below will fail # if the function is not callable function.__call__ # register the Python function, # map it to the associated C function, # and return the slot index in registry op_user_registry[index] = function cfunction[0] = op_user_map(index) return index cdef int op_user_del(int *indexp) except -1: # free slot in the registry cdef int index = indexp[0] indexp[0] = 0 # clear the value op_user_registry[index] = None return 0 # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/File.pyx0000644000175000017500000005520413200562156020062 0ustar dalcinldalcinl00000000000000# Opening modes # ------------- MODE_RDONLY = MPI_MODE_RDONLY #: Read only MODE_WRONLY = MPI_MODE_WRONLY #: Write only MODE_RDWR = MPI_MODE_RDWR #: Reading and writing MODE_CREATE = MPI_MODE_CREATE #: Create the file if it does not exist MODE_EXCL = MPI_MODE_EXCL #: Error if creating file that already exists MODE_DELETE_ON_CLOSE = MPI_MODE_DELETE_ON_CLOSE #: Delete file on close MODE_UNIQUE_OPEN = MPI_MODE_UNIQUE_OPEN #: File will not be concurrently opened elsewhere MODE_SEQUENTIAL = MPI_MODE_SEQUENTIAL #: File will only be accessed sequentially MODE_APPEND = MPI_MODE_APPEND #: Set initial position of all file pointers to end of file # Positioning # ----------- SEEK_SET = MPI_SEEK_SET #: File pointer is set to offset SEEK_CUR = MPI_SEEK_CUR #: File pointer is set to the current position plus offset SEEK_END = MPI_SEEK_END #: File pointer is set to the end plus offset DISPLACEMENT_CURRENT = MPI_DISPLACEMENT_CURRENT #: Special displacement value for files opened in sequential mode DISP_CUR = MPI_DISPLACEMENT_CURRENT #: Convenience alias for `DISPLACEMENT_CURRENT` cdef class File: """ File """ def __cinit__(self, File file=None): self.ob_mpi = MPI_FILE_NULL if file is None: return self.ob_mpi = file.ob_mpi def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_File(&self.ob_mpi) ) def __richcmp__(self, other, int op): if not isinstance(other, File): return NotImplemented cdef File s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_FILE_NULL # File Manipulation # ----------------- @classmethod def Open(cls, Intracomm comm, filename, int amode=MODE_RDONLY, Info info=INFO_NULL): """ Open a file """ cdef char *cfilename = NULL filename = asmpistr(filename, &cfilename) cdef File file = File.__new__(File) with nogil: CHKERR( MPI_File_open( comm.ob_mpi, cfilename, amode, info.ob_mpi, &file.ob_mpi) ) file_set_eh(file.ob_mpi) return file def Close(self): """ Close a file """ with nogil: CHKERR( MPI_File_close(&self.ob_mpi) ) @classmethod def Delete(cls, filename, Info info=INFO_NULL): """ Delete a file """ cdef char *cfilename = NULL filename = asmpistr(filename, &cfilename) with nogil: CHKERR( MPI_File_delete(cfilename, info.ob_mpi) ) def Set_size(self, Offset size): """ Sets the file size """ with nogil: CHKERR( MPI_File_set_size(self.ob_mpi, size) ) def Preallocate(self, Offset size): """ Preallocate storage space for a file """ with nogil: CHKERR( MPI_File_preallocate(self.ob_mpi, size) ) def Get_size(self): """ Return the file size """ cdef MPI_Offset size = 0 with nogil: CHKERR( MPI_File_get_size(self.ob_mpi, &size) ) return size property size: """file size""" def __get__(self): return self.Get_size() def Get_amode(self): """ Return the file access mode """ cdef int amode = 0 with nogil: CHKERR( MPI_File_get_amode(self.ob_mpi, &amode) ) return amode property amode: """file access mode""" def __get__(self): return self.Get_amode() # File Group # ---------- def Get_group(self): """ Return the group of processes that opened the file """ cdef Group group = Group.__new__(Group) with nogil: CHKERR( MPI_File_get_group(self.ob_mpi, &group.ob_mpi) ) return group property group: """file group""" def __get__(self): return self.Get_group() # File Info # --------- def Set_info(self, Info info): """ Set new values for the hints associated with a file """ with nogil: CHKERR( MPI_File_set_info(self.ob_mpi, info.ob_mpi) ) def Get_info(self): """ Return the hints for a file that that are currently in use """ cdef Info info = Info.__new__(Info) with nogil: CHKERR( MPI_File_get_info(self.ob_mpi, &info.ob_mpi) ) return info property info: """file info""" def __get__(self): return self.Get_info() def __set__(self, info): self.Set_info(info) # File Views # ---------- def Set_view(self, Offset disp=0, Datatype etype=None, Datatype filetype=None, object datarep=None, Info info=INFO_NULL): """ Set the file view """ cdef char *cdatarep = b"native" if datarep is not None: datarep = asmpistr(datarep, &cdatarep) cdef MPI_Datatype cetype = MPI_BYTE if etype is not None: cetype = etype.ob_mpi cdef MPI_Datatype cftype = cetype if filetype is not None: cftype = filetype.ob_mpi with nogil: CHKERR( MPI_File_set_view( self.ob_mpi, disp, cetype, cftype, cdatarep, info.ob_mpi) ) def Get_view(self): """ Return the file view """ cdef MPI_Offset disp = 0 cdef Datatype etype = Datatype.__new__(Datatype) cdef Datatype ftype = Datatype.__new__(Datatype) cdef char cdatarep[MPI_MAX_DATAREP_STRING+1] with nogil: CHKERR( MPI_File_get_view( self.ob_mpi, &disp, &etype.ob_mpi, &ftype.ob_mpi, cdatarep) ) #if builtin_Datatype(etype.ob_mpi): etype.flags = 0 #if builtin_Datatype(ftype.ob_mpi): ftype.flags = 0 cdatarep[MPI_MAX_DATAREP_STRING] = 0 # just in case cdef object datarep = mpistr(cdatarep) return (disp, etype, ftype, datarep) # Data Access # ----------- # Data Access with Explicit Offsets # --------------------------------- def Read_at(self, Offset offset, buf, Status status=None): """ Read using explicit offset """ cdef _p_msg_io m = message_io_read(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_read_at( self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) def Read_at_all(self, Offset offset, buf, Status status=None): """ Collective read using explicit offset """ cdef _p_msg_io m = message_io_read(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_read_at_all( self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) def Write_at(self, Offset offset, buf, Status status=None): """ Write using explicit offset """ cdef _p_msg_io m = message_io_write(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_write_at( self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) def Write_at_all(self, Offset offset, buf, Status status=None): """ Collective write using explicit offset """ cdef _p_msg_io m = message_io_write(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_write_at_all( self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) def Iread_at(self, Offset offset, buf): """ Nonblocking read using explicit offset """ cdef _p_msg_io m = message_io_read(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iread_at( self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request def Iread_at_all(self, Offset offset, buf): """ Nonblocking collective read using explicit offset """ cdef _p_msg_io m = message_io_read(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iread_at_all( self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request def Iwrite_at(self, Offset offset, buf): """ Nonblocking write using explicit offset """ cdef _p_msg_io m = message_io_write(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iwrite_at( self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request def Iwrite_at_all(self, Offset offset, buf): """ Nonblocking collective write using explicit offset """ cdef _p_msg_io m = message_io_write(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iwrite_at_all( self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request # Data Access with Individual File Pointers # ----------------------------------------- def Read(self, buf, Status status=None): """ Read using individual file pointer """ cdef _p_msg_io m = message_io_read(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_read( self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) def Read_all(self, buf, Status status=None): """ Collective read using individual file pointer """ cdef _p_msg_io m = message_io_read(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_read_all( self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) def Write(self, buf, Status status=None): """ Write using individual file pointer """ cdef _p_msg_io m = message_io_write(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_write( self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) def Write_all(self, buf, Status status=None): """ Collective write using individual file pointer """ cdef _p_msg_io m = message_io_write(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_write_all( self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) def Iread(self, buf): """ Nonblocking read using individual file pointer """ cdef _p_msg_io m = message_io_read(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iread( self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request def Iread_all(self, buf): """ Nonblocking collective read using individual file pointer """ cdef _p_msg_io m = message_io_read(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iread_all( self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request def Iwrite(self, buf): """ Nonblocking write using individual file pointer """ cdef _p_msg_io m = message_io_write(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iwrite( self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request def Iwrite_all(self, buf): """ Nonblocking collective write using individual file pointer """ cdef _p_msg_io m = message_io_write(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iwrite_all( self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request def Seek(self, Offset offset, int whence=SEEK_SET): """ Update the individual file pointer """ with nogil: CHKERR( MPI_File_seek(self.ob_mpi, offset, whence) ) def Get_position(self): """ Return the current position of the individual file pointer in etype units relative to the current view """ cdef MPI_Offset offset = 0 with nogil: CHKERR( MPI_File_get_position(self.ob_mpi, &offset) ) return offset def Get_byte_offset(self, Offset offset): """ Returns the absolute byte position in the file corresponding to 'offset' etypes relative to the current view """ cdef MPI_Offset disp = 0 with nogil: CHKERR( MPI_File_get_byte_offset( self.ob_mpi, offset, &disp) ) return disp # Data Access with Shared File Pointers # ------------------------------------- def Read_shared(self, buf, Status status=None): """ Read using shared file pointer """ cdef _p_msg_io m = message_io_read(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_read_shared( self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) def Write_shared(self, buf, Status status=None): """ Write using shared file pointer """ cdef _p_msg_io m = message_io_write(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_write_shared( self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) def Iread_shared(self, buf): """ Nonblocking read using shared file pointer """ cdef _p_msg_io m = message_io_read(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iread_shared( self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request def Iwrite_shared(self, buf): """ Nonblocking write using shared file pointer """ cdef _p_msg_io m = message_io_write(buf) cdef Request request = Request.__new__(Request) with nogil: CHKERR( MPI_File_iwrite_shared( self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) request.ob_buf = m return request def Read_ordered(self, buf, Status status=None): """ Collective read using shared file pointer """ cdef _p_msg_io m = message_io_read(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_read_ordered( self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) def Write_ordered(self, buf, Status status=None): """ Collective write using shared file pointer """ cdef _p_msg_io m = message_io_write(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_write_ordered( self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) def Seek_shared(self, Offset offset, int whence=SEEK_SET): """ Update the shared file pointer """ with nogil: CHKERR( MPI_File_seek_shared( self.ob_mpi, offset, whence) ) def Get_position_shared(self): """ Return the current position of the shared file pointer in etype units relative to the current view """ cdef MPI_Offset offset = 0 with nogil: CHKERR( MPI_File_get_position_shared( self.ob_mpi, &offset) ) return offset # Split Collective Data Access Routines # ------------------------------------- # explicit offset def Read_at_all_begin(self, Offset offset, buf): """ Start a split collective read using explict offset """ cdef _p_msg_io m = message_io_read(buf) with nogil: CHKERR( MPI_File_read_at_all_begin( self.ob_mpi, offset, m.buf, m.count, m.dtype) ) def Read_at_all_end(self, buf, Status status=None): """ Complete a split collective read using explict offset """ cdef _p_msg_io m = message_io_read(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_read_at_all_end( self.ob_mpi, m.buf, statusp) ) def Write_at_all_begin(self, Offset offset, buf): """ Start a split collective write using explict offset """ cdef _p_msg_io m = message_io_write(buf) with nogil: CHKERR( MPI_File_write_at_all_begin( self.ob_mpi, offset, m.buf, m.count, m.dtype) ) def Write_at_all_end(self, buf, Status status=None): """ Complete a split collective write using explict offset """ cdef _p_msg_io m = message_io_write(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_write_at_all_end( self.ob_mpi, m.buf, statusp) ) # individual file pointer def Read_all_begin(self, buf): """ Start a split collective read using individual file pointer """ cdef _p_msg_io m = message_io_read(buf) with nogil: CHKERR( MPI_File_read_all_begin( self.ob_mpi, m.buf, m.count, m.dtype) ) def Read_all_end(self, buf, Status status=None): """ Complete a split collective read using individual file pointer """ cdef _p_msg_io m = message_io_read(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_read_all_end( self.ob_mpi, m.buf, statusp) ) def Write_all_begin(self, buf): """ Start a split collective write using individual file pointer """ cdef _p_msg_io m = message_io_write(buf) with nogil: CHKERR( MPI_File_write_all_begin( self.ob_mpi, m.buf, m.count, m.dtype) ) def Write_all_end(self, buf, Status status=None): """ Complete a split collective write using individual file pointer """ cdef _p_msg_io m = message_io_write(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_write_all_end( self.ob_mpi, m.buf, statusp) ) # shared file pointer def Read_ordered_begin(self, buf): """ Start a split collective read using shared file pointer """ cdef _p_msg_io m = message_io_read(buf) with nogil: CHKERR( MPI_File_read_ordered_begin( self.ob_mpi, m.buf, m.count, m.dtype) ) def Read_ordered_end(self, buf, Status status=None): """ Complete a split collective read using shared file pointer """ cdef _p_msg_io m = message_io_read(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_read_ordered_end( self.ob_mpi, m.buf, statusp) ) def Write_ordered_begin(self, buf): """ Start a split collective write using shared file pointer """ cdef _p_msg_io m = message_io_write(buf) with nogil: CHKERR( MPI_File_write_ordered_begin( self.ob_mpi, m.buf, m.count, m.dtype) ) def Write_ordered_end(self, buf, Status status=None): """ Complete a split collective write using shared file pointer """ cdef _p_msg_io m = message_io_write(buf) cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_File_write_ordered_end( self.ob_mpi, m.buf, statusp) ) # File Interoperability # --------------------- def Get_type_extent(self, Datatype datatype): """ Return the extent of datatype in the file """ cdef MPI_Aint extent = 0 with nogil: CHKERR( MPI_File_get_type_extent( self.ob_mpi, datatype.ob_mpi, &extent) ) return extent # Consistency and Semantics # ------------------------- def Set_atomicity(self, bint flag): """ Set the atomicity mode """ with nogil: CHKERR( MPI_File_set_atomicity(self.ob_mpi, flag) ) def Get_atomicity(self): """ Return the atomicity mode """ cdef int flag = 0 with nogil: CHKERR( MPI_File_get_atomicity(self.ob_mpi, &flag) ) return flag property atomicity: """atomicity""" def __get__(self): return self.Get_atomicity() def __set__(self, value): self.Set_atomicity(value) def Sync(self): """ Causes all previous writes to be transferred to the storage device """ with nogil: CHKERR( MPI_File_sync(self.ob_mpi) ) # Error Handling # -------------- def Get_errhandler(self): """ Get the error handler for a file """ cdef Errhandler errhandler = Errhandler.__new__(Errhandler) CHKERR( MPI_File_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) return errhandler def Set_errhandler(self, Errhandler errhandler): """ Set the error handler for a file """ CHKERR( MPI_File_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) def Call_errhandler(self, int errorcode): """ Call the error handler installed on a file """ CHKERR( MPI_File_call_errhandler(self.ob_mpi, errorcode) ) # Fortran Handle # -------------- def py2f(self): """ """ return MPI_File_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef File file = File.__new__(File) file.ob_mpi = MPI_File_f2c(arg) return file cdef File __FILE_NULL__ = new_File(MPI_FILE_NULL) # Predefined file handles # ----------------------- FILE_NULL = __FILE_NULL__ #: Null file handle # User-defined data representations # --------------------------------- def Register_datarep(datarep, read_fn, write_fn, extent_fn): """ Register user-defined data representations """ cdef char *cdatarep = NULL datarep = asmpistr(datarep, &cdatarep) cdef object state = _p_datarep(read_fn, write_fn, extent_fn) cdef MPI_Datarep_conversion_function *rd = MPI_CONVERSION_FN_NULL cdef MPI_Datarep_conversion_function *wr = MPI_CONVERSION_FN_NULL cdef MPI_Datarep_extent_function *ex = datarep_extent_fn cdef void* xs = state if read_fn is not None: rd = datarep_read_fn if write_fn is not None: wr = datarep_write_fn CHKERR ( MPI_Register_datarep(cdatarep, rd, wr, ex, xs) ) datarep_registry[datarep] = state mpi4py-3.0.3/src/mpi4py/MPI/msgpickle.pxi0000664000175000017500000012041213426006675021146 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- cdef extern from "Python.h": bint PyBytes_CheckExact(object) char* PyBytes_AsString(object) except NULL Py_ssize_t PyBytes_Size(object) except -1 object PyBytes_FromStringAndSize(char*,Py_ssize_t) object PyBytes_Join"_PyBytes_Join"(object,object) # ----------------------------------------------------------------------------- cdef object PyPickle_dumps = None cdef object PyPickle_loads = None cdef object PyPickle_PROTOCOL = None if PY3: from pickle import dumps as PyPickle_dumps from pickle import loads as PyPickle_loads from pickle import DEFAULT_PROTOCOL as PyPickle_PROTOCOL else: try: from cPickle import dumps as PyPickle_dumps from cPickle import loads as PyPickle_loads from cPickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL except ImportError: from pickle import dumps as PyPickle_dumps from pickle import loads as PyPickle_loads from pickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL cdef object PyBytesIO_New = None cdef object PyPickle_loadf = None if PY2: try: from cStringIO import StringIO as PyBytesIO_New except ImportError: from io import BytesIO as PyBytesIO_New try: from cPickle import load as PyPickle_loadf except ImportError: from pickle import load as PyPickle_loadf @cython.final @cython.internal cdef class Pickle: """ Pickle/unpickle Python objects """ cdef object ob_dumps cdef object ob_loads cdef object ob_PROTO def __cinit__(self, *args, **kwargs): self.ob_dumps = PyPickle_dumps self.ob_loads = PyPickle_loads self.ob_PROTO = PyPickle_PROTOCOL def __init__(self, dumps=None, loads=None, protocol=None): if dumps is None: dumps = PyPickle_dumps if loads is None: loads = PyPickle_loads if protocol is None: if dumps is PyPickle_dumps: protocol = PyPickle_PROTOCOL self.ob_dumps = dumps self.ob_loads = loads self.ob_PROTO = protocol def dumps(self, obj): "dumps(obj) -> bytes" return self.cdumps(obj) def loads(self, buf): "loads(buf) -> object" return self.cloads(buf) property PROTOCOL: "protocol" def __get__(self): return self.ob_PROTO def __set__(self, protocol): if protocol is None: if self.ob_dumps is PyPickle_dumps: protocol = PyPickle_PROTOCOL self.ob_PROTO = protocol cdef object cdumps(self, object obj): if self.ob_PROTO is not None: return self.ob_dumps(obj, self.ob_PROTO) else: return self.ob_dumps(obj) cdef object cloads(self, object buf): if PY2: if not PyBytes_CheckExact(buf): if self.ob_loads is PyPickle_loads: buf = PyBytesIO_New(buf) return PyPickle_loadf(buf) return self.ob_loads(buf) cdef object dump(self, object obj, void **p, int *n): cdef object buf = self.cdumps(obj) p[0] = PyBytes_AsString(buf) n[0] = downcast(PyBytes_Size(buf)) return buf cdef object load(self, void *p, int n): if p == NULL or n == 0: return None return self.cloads(tomemory(p, n)) cdef object dumpv(self, object obj, void **p, int n, int cnt[], int dsp[]): cdef Py_ssize_t i=0, m=n cdef object items if obj is None: items = [None] * m else: items = list(obj) m = len(items) if m != n: raise ValueError( "expecting %d items, got %d" % (n, m)) cdef int c=0, d=0 for i from 0 <= i < m: items[i] = self.dump(items[i], p, &c) cnt[i] = c; dsp[i] = d; d = downcast(d + c) cdef object buf = PyBytes_Join(b'', items) p[0] = PyBytes_AsString(buf) return buf cdef object loadv(self, void *p, int n, int cnt[], int dsp[]): cdef Py_ssize_t i=0, m=n cdef object items = [None] * m if p == NULL: return items for i from 0 <= i < m: items[i] = self.load(p+dsp[i], cnt[i]) return items cdef object alloc(self, void **p, int n): cdef object buf = PyBytes_FromStringAndSize(NULL, n) p[0] = PyBytes_AsString(buf) return buf cdef object allocv(self, void **p, int n, int cnt[], int dsp[]): cdef int i=0, d=0 for i from 0 <= i < n: dsp[i] = d d += cnt[i] return self.alloc(p, d) cdef Pickle PyMPI_PICKLE = Pickle() pickle = PyMPI_PICKLE # ----------------------------------------------------------------------------- cdef inline object allocate_count_displ(int n, int **p, int **q): cdef object mem = allocate(2*n, sizeof(int), p) q[0] = p[0] + n return mem # ----------------------------------------------------------------------------- cdef object PyMPI_send(object obj, int dest, int tag, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE # cdef object tmps = None if dest != MPI_PROC_NULL: tmps = pickle.dump(obj, &sbuf, &scount) with nogil: CHKERR( MPI_Send(sbuf, scount, stype, dest, tag, comm) ) return None cdef object PyMPI_bsend(object obj, int dest, int tag, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE # cdef object tmps = None if dest != MPI_PROC_NULL: tmps = pickle.dump(obj, &sbuf, &scount) with nogil: CHKERR( MPI_Bsend(sbuf, scount, stype, dest, tag, comm) ) return None cdef object PyMPI_ssend(object obj, int dest, int tag, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE # cdef object tmps = None if dest != MPI_PROC_NULL: tmps = pickle.dump(obj, &sbuf, &scount) with nogil: CHKERR( MPI_Ssend(sbuf, scount, stype, dest, tag, comm) ) return None # ----------------------------------------------------------------------------- cdef extern from "Python.h": int PyErr_WarnEx(object, char*, int) except -1 cdef object PyMPI_recv_obarg(object obj, int source, int tag, MPI_Comm comm, MPI_Status *status): cdef Pickle pickle = PyMPI_PICKLE # cdef void *rbuf = NULL cdef int rcount = 0 cdef MPI_Datatype rtype = MPI_BYTE cdef MPI_Status rsts cdef object rmsg = None cdef MPI_Aint rlen = 0 # PyErr_WarnEx(UserWarning, b"the 'buf' argument is deprecated", 1) # if source != MPI_PROC_NULL: if is_integral(obj): rcount = obj rmsg = pickle.alloc(&rbuf, rcount) else: rmsg = getbuffer_w(obj, &rbuf, &rlen) rcount = clipcount(rlen) if status == MPI_STATUS_IGNORE: status = &rsts rmsg with nogil: CHKERR( MPI_Recv(rbuf, rcount, rtype, source, tag, comm, status) ) if source != MPI_PROC_NULL: CHKERR( MPI_Get_count(status, rtype, &rcount) ) # if rcount <= 0: return None return pickle.load(rbuf, rcount) cdef object PyMPI_recv_match(object obj, int source, int tag, MPI_Comm comm, MPI_Status *status): cdef Pickle pickle = PyMPI_PICKLE # cdef void *rbuf = NULL cdef int rcount = 0 cdef MPI_Datatype rtype = MPI_BYTE # cdef MPI_Message match = MPI_MESSAGE_NULL cdef MPI_Status rsts obj # unused # with nogil: CHKERR( MPI_Mprobe(source, tag, comm, &match, &rsts) ) CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) cdef object tmpr = pickle.alloc(&rbuf, rcount) with nogil: CHKERR( MPI_Mrecv(rbuf, rcount, rtype, &match, status) ) # if rcount <= 0: return None return pickle.load(rbuf, rcount) cdef object PyMPI_recv_probe(object obj, int source, int tag, MPI_Comm comm, MPI_Status *status): cdef Pickle pickle = PyMPI_PICKLE # cdef void *rbuf = NULL cdef int rcount = 0 cdef MPI_Datatype rtype = MPI_BYTE # cdef MPI_Status rsts cdef object tmpr obj # unused # with PyMPI_Lock(comm, "recv"): with nogil: CHKERR( MPI_Probe(source, tag, comm, &rsts) ) CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) source = rsts.MPI_SOURCE; tag = rsts.MPI_TAG tmpr = pickle.alloc(&rbuf, rcount) with nogil: CHKERR( MPI_Recv(rbuf, rcount, rtype, source, tag, comm, status) ) # if rcount <= 0: return None return pickle.load(rbuf, rcount) cdef object PyMPI_recv(object obj, int source, int tag, MPI_Comm comm, MPI_Status *status): if obj is not None: return PyMPI_recv_obarg(obj, source, tag, comm, status) elif options.recv_mprobe: return PyMPI_recv_match(obj, source, tag, comm, status) else: return PyMPI_recv_probe(obj, source, tag, comm, status) # ----------------------------------------------------------------------------- cdef object PyMPI_isend(object obj, int dest, int tag, MPI_Comm comm, MPI_Request *request): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE # cdef object smsg = None if dest != MPI_PROC_NULL: smsg = pickle.dump(obj, &sbuf, &scount) with nogil: CHKERR( MPI_Isend(sbuf, scount, stype, dest, tag, comm, request) ) return smsg cdef object PyMPI_ibsend(object obj, int dest, int tag, MPI_Comm comm, MPI_Request *request): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE # cdef object smsg = None if dest != MPI_PROC_NULL: smsg = pickle.dump(obj, &sbuf, &scount) with nogil: CHKERR( MPI_Ibsend(sbuf, scount, stype, dest, tag, comm, request) ) return smsg cdef object PyMPI_issend(object obj, int dest, int tag, MPI_Comm comm, MPI_Request *request): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE # cdef object smsg = None if dest != MPI_PROC_NULL: smsg = pickle.dump(obj, &sbuf, &scount) with nogil: CHKERR( MPI_Issend(sbuf, scount, stype, dest, tag, comm, request) ) return smsg cdef object PyMPI_irecv(object obj, int source, int tag, MPI_Comm comm, MPI_Request *request): cdef Pickle pickle = PyMPI_PICKLE # cdef void *rbuf = NULL cdef MPI_Aint rlen = 0 cdef int rcount = 0 cdef MPI_Datatype rtype = MPI_BYTE # cdef object rmsg = None if source != MPI_PROC_NULL: if obj is None: rcount = (1<<15) obj = pickle.alloc(&rbuf, rcount) rmsg = getbuffer_r(obj, NULL, NULL) elif is_integral(obj): rcount = obj obj = pickle.alloc(&rbuf, rcount) rmsg = getbuffer_r(obj, NULL, NULL) else: rmsg = getbuffer_w(obj, &rbuf, &rlen) rcount = clipcount(rlen) with nogil: CHKERR( MPI_Irecv(rbuf, rcount, rtype, source, tag, comm, request) ) return rmsg # ----------------------------------------------------------------------------- cdef object PyMPI_sendrecv(object sobj, int dest, int sendtag, object robj, int source, int recvtag, MPI_Comm comm, MPI_Status *status): cdef MPI_Request request = MPI_REQUEST_NULL sobj = PyMPI_isend(sobj, dest, sendtag, comm, &request) robj = PyMPI_recv (robj, source, recvtag, comm, status) with nogil: CHKERR( MPI_Wait(&request, MPI_STATUS_IGNORE) ) return robj # ----------------------------------------------------------------------------- cdef object PyMPI_load(MPI_Status *status, object ob): cdef Pickle pickle = PyMPI_PICKLE cdef void *rbuf = NULL cdef int rcount = 0 cdef MPI_Datatype rtype = MPI_BYTE if type(ob) is not memory: return None CHKERR( MPI_Get_count(status, rtype, &rcount) ) if rcount <= 0: return None ob = asmemory(ob, &rbuf, NULL) return pickle.load(rbuf, rcount) cdef object PyMPI_wait(Request request, Status status): cdef object buf # cdef MPI_Status rsts with nogil: CHKERR( MPI_Wait(&request.ob_mpi, &rsts) ) buf = request.ob_buf if status is not None: status.ob_mpi = rsts if request.ob_mpi == MPI_REQUEST_NULL: request.ob_buf = None # return PyMPI_load(&rsts, buf) cdef object PyMPI_test(Request request, int *flag, Status status): cdef object buf = None # cdef MPI_Status rsts with nogil: CHKERR( MPI_Test(&request.ob_mpi, flag, &rsts) ) if flag[0]: buf = request.ob_buf if status is not None: status.ob_mpi = rsts if request.ob_mpi == MPI_REQUEST_NULL: request.ob_buf = None # if not flag[0]: return None return PyMPI_load(&rsts, buf) cdef object PyMPI_waitany(requests, int *index, Status status): cdef object buf = None # cdef int count = 0 cdef MPI_Request *irequests = NULL cdef MPI_Status rsts # cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) try: with nogil: CHKERR( MPI_Waitany(count, irequests, index, &rsts) ) if index[0] != MPI_UNDEFINED: buf = (requests[index[0]]).ob_buf if status is not None: status.ob_mpi = rsts finally: release_rs(requests, None, count, irequests, NULL) # if index[0] == MPI_UNDEFINED: return None return PyMPI_load(&rsts, buf) cdef object PyMPI_testany(requests, int *index, int *flag, Status status): cdef object buf = None # cdef int count = 0 cdef MPI_Request *irequests = NULL cdef MPI_Status rsts # cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) try: with nogil: CHKERR( MPI_Testany(count, irequests, index, flag, &rsts) ) if index[0] != MPI_UNDEFINED: buf = (requests[index[0]]).ob_buf if status is not None: status.ob_mpi = rsts finally: release_rs(requests, None, count, irequests, NULL) # if index[0] == MPI_UNDEFINED: return None if not flag[0]: return None return PyMPI_load(&rsts, buf) cdef object PyMPI_waitall(requests, statuses): cdef object bufs = None # cdef Py_ssize_t i = 0 cdef int count = 0 cdef MPI_Request *irequests = NULL cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) try: with nogil: CHKERR( MPI_Waitall(count, irequests, istatuses) ) bufs = [(requests[i]).ob_buf for i from 0 <= i < count] finally: release_rs(requests, statuses, count, irequests, istatuses) # return [PyMPI_load(&istatuses[i], bufs[i]) for i from 0 <= i < count] cdef object PyMPI_testall(requests, int *flag, statuses): cdef object bufs = None # cdef Py_ssize_t i = 0 cdef int count = 0 cdef MPI_Request *irequests = NULL cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) try: with nogil: CHKERR( MPI_Testall(count, irequests, flag, istatuses) ) if flag[0]: bufs = [(requests[i]).ob_buf for i from 0 <= i < count] finally: release_rs(requests, statuses, count, irequests, istatuses) # if not flag[0]: return None return [PyMPI_load(&istatuses[i], bufs[i]) for i from 0 <= i < count] # ----------------------------------------------------------------------------- cdef object PyMPI_probe(int source, int tag, MPI_Comm comm, MPI_Status *status): with nogil: CHKERR( MPI_Probe(source, tag, comm, status) ) return True cdef object PyMPI_iprobe(int source, int tag, MPI_Comm comm, MPI_Status *status): cdef int flag = 0 with nogil: CHKERR( MPI_Iprobe(source, tag, comm, &flag, status) ) return flag cdef object PyMPI_mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Status *status): cdef Pickle pickle = PyMPI_PICKLE cdef void* rbuf = NULL cdef int rcount = 0 cdef MPI_Datatype rtype = MPI_BYTE cdef MPI_Status rsts if (status == MPI_STATUS_IGNORE): status = &rsts with nogil: CHKERR( MPI_Mprobe(source, tag, comm, message, status) ) if message[0] == MPI_MESSAGE_NO_PROC: return None CHKERR( MPI_Get_count(status, rtype, &rcount) ) cdef object rmsg = pickle.alloc(&rbuf, rcount) return rmsg cdef object PyMPI_improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status): cdef Pickle pickle = PyMPI_PICKLE cdef void* rbuf = NULL cdef int rcount = 0 cdef MPI_Datatype rtype = MPI_BYTE cdef MPI_Status rsts if (status == MPI_STATUS_IGNORE): status = &rsts with nogil: CHKERR( MPI_Improbe(source, tag, comm, flag, message, status) ) if flag[0] == 0 or message[0] == MPI_MESSAGE_NO_PROC: return None CHKERR( MPI_Get_count(status, rtype, &rcount) ) cdef object rmsg = pickle.alloc(&rbuf, rcount) return rmsg cdef object PyMPI_mrecv(object rmsg, MPI_Message *message, MPI_Status *status): cdef Pickle pickle = PyMPI_PICKLE cdef void* rbuf = NULL cdef MPI_Aint rlen = 0 cdef MPI_Datatype rtype = MPI_BYTE if message[0] == MPI_MESSAGE_NO_PROC: rmsg = None elif rmsg is None: pass elif PyBytes_CheckExact(rmsg): rmsg = getbuffer_r(rmsg, &rbuf, &rlen) else: rmsg = getbuffer_w(rmsg, &rbuf, &rlen) cdef int rcount = clipcount(rlen) with nogil: CHKERR( MPI_Mrecv(rbuf, rcount, rtype, message, status) ) rmsg = pickle.load(rbuf, rcount) return rmsg cdef object PyMPI_imrecv(object rmsg, MPI_Message *message, MPI_Request *request): cdef void* rbuf = NULL cdef MPI_Aint rlen = 0 cdef MPI_Datatype rtype = MPI_BYTE if message[0] == MPI_MESSAGE_NO_PROC: rmsg = None elif rmsg is None: pass elif PyBytes_CheckExact(rmsg): rmsg = getbuffer_r(rmsg, &rbuf, &rlen) else: rmsg = getbuffer_w(rmsg, &rbuf, &rlen) cdef int rcount = clipcount(rlen) with nogil: CHKERR( MPI_Imrecv(rbuf, rcount, rtype, message, request) ) return rmsg # ----------------------------------------------------------------------------- cdef object PyMPI_barrier(MPI_Comm comm): with nogil: CHKERR( MPI_Barrier(comm) ) return None cdef object PyMPI_bcast(object obj, int root, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *buf = NULL cdef int count = 0 cdef MPI_Datatype dtype = MPI_BYTE # cdef int dosend=0, dorecv=0 cdef int inter=0, rank=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if inter: if root == MPI_PROC_NULL: dosend=0; dorecv=0; elif root == MPI_ROOT: dosend=1; dorecv=0; else: dosend=0; dorecv=1; else: CHKERR( MPI_Comm_rank(comm, &rank) ) if root == rank: dosend=1; dorecv=1; else: dosend=0; dorecv=1; # cdef object smsg = None cdef object rmsg = None # if dosend: smsg = pickle.dump(obj, &buf, &count) if dosend and dorecv: rmsg = smsg with PyMPI_Lock(comm, "bcast"): with nogil: CHKERR( MPI_Bcast( &count, 1, MPI_INT, root, comm) ) if dorecv and not dosend: rmsg = pickle.alloc(&buf, count) with nogil: CHKERR( MPI_Bcast( buf, count, dtype, root, comm) ) if dorecv: rmsg = pickle.load(buf, count) # return rmsg cdef object PyMPI_gather(object sendobj, int root, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE cdef void *rbuf = NULL cdef int *rcounts = NULL cdef int *rdispls = NULL cdef MPI_Datatype rtype = MPI_BYTE # cdef int dosend=0, dorecv=0 cdef int inter=0, size=0, rank=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if inter: CHKERR( MPI_Comm_remote_size(comm, &size) ) if root == MPI_PROC_NULL: dosend=0; dorecv=0; elif root == MPI_ROOT: dosend=0; dorecv=1; else: dosend=1; dorecv=0; else: CHKERR( MPI_Comm_size(comm, &size) ) CHKERR( MPI_Comm_rank(comm, &rank) ) if root == rank: dosend=1; dorecv=1; else: dosend=1; dorecv=0; # cdef object tmps = None cdef object rmsg = None cdef object tmp1 # if dorecv: tmp1 = allocate_count_displ(size, &rcounts, &rdispls) if dosend: tmps = pickle.dump(sendobj, &sbuf, &scount) with PyMPI_Lock(comm, "gather"): with nogil: CHKERR( MPI_Gather( &scount, 1, MPI_INT, rcounts, 1, MPI_INT, root, comm) ) if dorecv: rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) with nogil: CHKERR( MPI_Gatherv( sbuf, scount, stype, rbuf, rcounts, rdispls, rtype, root, comm) ) if dorecv: rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) # return rmsg cdef object PyMPI_scatter(object sendobj, int root, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int *scounts = NULL cdef int *sdispls = NULL cdef MPI_Datatype stype = MPI_BYTE cdef void *rbuf = NULL cdef int rcount = 0 cdef MPI_Datatype rtype = MPI_BYTE # cdef int dosend=0, dorecv=0 cdef int inter=0, size=0, rank=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if inter: CHKERR( MPI_Comm_remote_size(comm, &size) ) if root == MPI_PROC_NULL: dosend=0; dorecv=0; elif root == MPI_ROOT: dosend=1; dorecv=0; else: dosend=0; dorecv=1; else: CHKERR( MPI_Comm_size(comm, &size) ) CHKERR( MPI_Comm_rank(comm, &rank) ) if root == rank: dosend=1; dorecv=1; else: dosend=0; dorecv=1; # cdef object tmps = None cdef object rmsg = None cdef object tmp1 # if dosend: tmp1 = allocate_count_displ(size, &scounts, &sdispls) if dosend: tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) with PyMPI_Lock(comm, "scatter"): with nogil: CHKERR( MPI_Scatter( scounts, 1, MPI_INT, &rcount, 1, MPI_INT, root, comm) ) if dorecv: rmsg = pickle.alloc(&rbuf, rcount) with nogil: CHKERR( MPI_Scatterv( sbuf, scounts, sdispls, stype, rbuf, rcount, rtype, root, comm) ) if dorecv: rmsg = pickle.load(rbuf, rcount) # return rmsg cdef object PyMPI_allgather(object sendobj, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE cdef void *rbuf = NULL cdef int *rcounts = NULL cdef int *rdispls = NULL cdef MPI_Datatype rtype = MPI_BYTE # cdef int inter=0, size=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if inter: CHKERR( MPI_Comm_remote_size(comm, &size) ) else: CHKERR( MPI_Comm_size(comm, &size) ) # cdef object tmps = None cdef object rmsg = None cdef object tmp1 # tmp1 = allocate_count_displ(size, &rcounts, &rdispls) tmps = pickle.dump(sendobj, &sbuf, &scount) with PyMPI_Lock(comm, "allgather"): with nogil: CHKERR( MPI_Allgather( &scount, 1, MPI_INT, rcounts, 1, MPI_INT, comm) ) rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) with nogil: CHKERR( MPI_Allgatherv( sbuf, scount, stype, rbuf, rcounts, rdispls, rtype, comm) ) rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) # return rmsg cdef object PyMPI_alltoall(object sendobj, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int *scounts = NULL cdef int *sdispls = NULL cdef MPI_Datatype stype = MPI_BYTE cdef void *rbuf = NULL cdef int *rcounts = NULL cdef int *rdispls = NULL cdef MPI_Datatype rtype = MPI_BYTE # cdef int inter=0, size=0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if inter: CHKERR( MPI_Comm_remote_size(comm, &size) ) else: CHKERR( MPI_Comm_size(comm, &size) ) # cdef object tmps = None cdef object rmsg = None cdef object tmp1, tmp2 # tmp1 = allocate_count_displ(size, &scounts, &sdispls) tmp2 = allocate_count_displ(size, &rcounts, &rdispls) tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) with PyMPI_Lock(comm, "alltoall"): with nogil: CHKERR( MPI_Alltoall( scounts, 1, MPI_INT, rcounts, 1, MPI_INT, comm) ) rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) with nogil: CHKERR( MPI_Alltoallv( sbuf, scounts, sdispls, stype, rbuf, rcounts, rdispls, rtype, comm) ) rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) # return rmsg cdef object PyMPI_neighbor_allgather(object sendobj, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE cdef void *rbuf = NULL cdef int *rcounts = NULL cdef int *rdispls = NULL cdef MPI_Datatype rtype = MPI_BYTE # cdef int i=0, rsize=0 comm_neighbors_count(comm, &rsize, NULL) # cdef object tmps = None cdef object rmsg = None cdef object tmp1 # tmp1 = allocate_count_displ(rsize, &rcounts, &rdispls) for i from 0 <= i < rsize: rcounts[i] = 0 tmps = pickle.dump(sendobj, &sbuf, &scount) with PyMPI_Lock(comm, "neighbor_allgather"): with nogil: CHKERR( MPI_Neighbor_allgather( &scount, 1, MPI_INT, rcounts, 1, MPI_INT, comm) ) rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) with nogil: CHKERR( MPI_Neighbor_allgatherv( sbuf, scount, stype, rbuf, rcounts, rdispls, rtype, comm) ) rmsg = pickle.loadv(rbuf, rsize, rcounts, rdispls) # return rmsg cdef object PyMPI_neighbor_alltoall(object sendobj, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE # cdef void *sbuf = NULL cdef int *scounts = NULL cdef int *sdispls = NULL cdef MPI_Datatype stype = MPI_BYTE cdef void *rbuf = NULL cdef int *rcounts = NULL cdef int *rdispls = NULL cdef MPI_Datatype rtype = MPI_BYTE # cdef int i=0, ssize=0, rsize=0 comm_neighbors_count(comm, &rsize, &ssize) # cdef object tmps = None cdef object rmsg = None cdef object tmp1, tmp2 # tmp1 = allocate_count_displ(ssize, &scounts, &sdispls) tmp2 = allocate_count_displ(rsize, &rcounts, &rdispls) for i from 0 <= i < rsize: rcounts[i] = 0 tmps = pickle.dumpv(sendobj, &sbuf, ssize, scounts, sdispls) with PyMPI_Lock(comm, "neighbor_alltoall"): with nogil: CHKERR( MPI_Neighbor_alltoall( scounts, 1, MPI_INT, rcounts, 1, MPI_INT, comm) ) rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) with nogil: CHKERR( MPI_Neighbor_alltoallv( sbuf, scounts, sdispls, stype, rbuf, rcounts, rdispls, rtype, comm) ) rmsg = pickle.loadv(rbuf, rsize, rcounts, rdispls) # return rmsg # ----------------------------------------------------------------------------- cdef inline object _py_reduce(object seq, object op): if seq is None: return None cdef Py_ssize_t i = 0 cdef Py_ssize_t n = len(seq) cdef object res = seq[0] for i from 1 <= i < n: res = op(res, seq[i]) return res cdef inline object _py_scan(object seq, object op): if seq is None: return None cdef Py_ssize_t i = 0 cdef Py_ssize_t n = len(seq) for i from 1 <= i < n: seq[i] = op(seq[i-1], seq[i]) return seq cdef inline object _py_exscan(object seq, object op): if seq is None: return None seq = _py_scan(seq, op) seq.pop(-1) seq.insert(0, None) return seq cdef object PyMPI_reduce_naive(object sendobj, object op, int root, MPI_Comm comm): cdef object items = PyMPI_gather(sendobj, root, comm) return _py_reduce(items, op) cdef object PyMPI_allreduce_naive(object sendobj, object op, MPI_Comm comm): cdef object items = PyMPI_allgather(sendobj, comm) return _py_reduce(items, op) cdef object PyMPI_scan_naive(object sendobj, object op, MPI_Comm comm): cdef object items = PyMPI_gather(sendobj, 0, comm) items = _py_scan(items, op) return PyMPI_scatter(items, 0, comm) cdef object PyMPI_exscan_naive(object sendobj, object op, MPI_Comm comm): cdef object items = PyMPI_gather(sendobj, 0, comm) items = _py_exscan(items, op) return PyMPI_scatter(items, 0, comm) # ----- cdef inline object PyMPI_copy(object obj): cdef Pickle pickle = PyMPI_PICKLE cdef void *buf = NULL cdef int count = 0 obj = pickle.dump(obj, &buf, &count) return pickle.load(buf, count) cdef object PyMPI_send_p2p(object obj, int dst, int tag, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE cdef void *sbuf = NULL cdef int scount = 0 cdef MPI_Datatype stype = MPI_BYTE cdef object tmps = pickle.dump(obj, &sbuf, &scount) with nogil: CHKERR( MPI_Send(&scount, 1, MPI_INT, dst, tag, comm) ) with nogil: CHKERR( MPI_Send(sbuf, scount, stype, dst, tag, comm) ) return None cdef object PyMPI_recv_p2p(int src, int tag, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE cdef void *rbuf = NULL cdef int rcount = 0 cdef MPI_Datatype rtype = MPI_BYTE cdef MPI_Status *status = MPI_STATUS_IGNORE with nogil: CHKERR( MPI_Recv(&rcount, 1, MPI_INT, src, tag, comm, status) ) cdef object tmpr = pickle.alloc(&rbuf, rcount) with nogil: CHKERR( MPI_Recv(rbuf, rcount, rtype, src, tag, comm, status) ) return pickle.load(rbuf, rcount) cdef object PyMPI_sendrecv_p2p(object obj, int dst, int stag, int src, int rtag, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE cdef void *sbuf = NULL, *rbuf = NULL cdef int scount = 0, rcount = 0 cdef MPI_Datatype dtype = MPI_BYTE cdef object tmps = pickle.dump(obj, &sbuf, &scount) with nogil: CHKERR( MPI_Sendrecv(&scount, 1, MPI_INT, dst, stag, &rcount, 1, MPI_INT, src, rtag, comm, MPI_STATUS_IGNORE) ) cdef object tmpr = pickle.alloc(&rbuf, rcount) with nogil: CHKERR( MPI_Sendrecv(sbuf, scount, dtype, dst, stag, rbuf, rcount, dtype, src, rtag, comm, MPI_STATUS_IGNORE) ) return pickle.load(rbuf, rcount) cdef object PyMPI_bcast_p2p(object obj, int root, MPI_Comm comm): cdef Pickle pickle = PyMPI_PICKLE cdef void *buf = NULL cdef int count = 0 cdef MPI_Datatype dtype = MPI_BYTE cdef int rank = MPI_PROC_NULL CHKERR( MPI_Comm_rank(comm, &rank) ) if root == rank: obj = pickle.dump(obj, &buf, &count) with PyMPI_Lock(comm, "@bcast_p2p@"): with nogil: CHKERR( MPI_Bcast(&count, 1, MPI_INT, root, comm) ) if root != rank: obj = pickle.alloc(&buf, count) with nogil: CHKERR( MPI_Bcast(buf, count, dtype, root, comm) ) return pickle.load(buf, count) cdef object PyMPI_reduce_p2p(object sendobj, object op, int root, MPI_Comm comm, int tag): # Get communicator size and rank cdef int size = MPI_UNDEFINED cdef int rank = MPI_PROC_NULL CHKERR( MPI_Comm_size(comm, &size) ) CHKERR( MPI_Comm_rank(comm, &rank) ) # Check root argument if root < 0 or root >= size: MPI_Comm_call_errhandler(comm, MPI_ERR_ROOT) raise MPIException(MPI_ERR_ROOT) # cdef object result = PyMPI_copy(sendobj) cdef object tmp # Compute reduction at process 0 cdef unsigned int umask = 1 cdef unsigned int usize = size cdef unsigned int urank = rank cdef int target = 0 while umask < usize: if (umask & urank) != 0: target = ((urank & ~umask) % usize) PyMPI_send_p2p(result, target, tag, comm) else: target = (urank | umask) if target < size: tmp = PyMPI_recv_p2p(target, tag, comm) result = op(result, tmp) umask <<= 1 # Send reduction to root if root != 0: if rank == 0: PyMPI_send_p2p(result, root, tag, comm) elif rank == root: result = PyMPI_recv_p2p(0, tag, comm) if rank != root: result = None # return result cdef object PyMPI_scan_p2p(object sendobj, object op, MPI_Comm comm, int tag): # Get communicator size and rank cdef int size = MPI_UNDEFINED cdef int rank = MPI_PROC_NULL CHKERR( MPI_Comm_size(comm, &size) ) CHKERR( MPI_Comm_rank(comm, &rank) ) # cdef object result = PyMPI_copy(sendobj) cdef object partial = result cdef object tmp # Compute prefix reduction cdef unsigned int umask = 1 cdef unsigned int usize = size cdef unsigned int urank = rank cdef int target = 0 while umask < usize: target = (urank ^ umask) if target < size: tmp = PyMPI_sendrecv_p2p(partial, target, tag, target, tag, comm) if rank > target: partial = op(tmp, partial) result = op(tmp, result) else: tmp = op(partial, tmp) partial = tmp umask <<= 1 # return result cdef object PyMPI_exscan_p2p(object sendobj, object op, MPI_Comm comm, int tag): # Get communicator size and rank cdef int size = MPI_UNDEFINED cdef int rank = MPI_PROC_NULL CHKERR( MPI_Comm_size(comm, &size) ) CHKERR( MPI_Comm_rank(comm, &rank) ) # cdef object result = PyMPI_copy(sendobj) cdef object partial = result cdef object tmp # Compute prefix reduction cdef unsigned int umask = 1 cdef unsigned int usize = size cdef unsigned int urank = rank cdef unsigned int uflag = 0 cdef int target = 0 while umask < usize: target = (urank ^ umask) if target < size: tmp = PyMPI_sendrecv_p2p(partial, target, tag, target, tag, comm) if rank > target: partial = op(tmp, partial) if uflag == 0: result = tmp; uflag = 1 else: result = op(tmp, result) else: tmp = op(partial, tmp) partial = tmp umask <<= 1 # if rank == 0: result = None return result # ----- cdef extern from *: int PyMPI_Commctx_intra(MPI_Comm,MPI_Comm*,int*) nogil int PyMPI_Commctx_inter(MPI_Comm,MPI_Comm*,int*,MPI_Comm*,int*) nogil cdef int PyMPI_Commctx_INTRA(MPI_Comm comm, MPI_Comm *dupcomm, int *tag) except -1: with PyMPI_Lock(comm, "@commctx_intra"): CHKERR( PyMPI_Commctx_intra(comm, dupcomm, tag) ) return 0 cdef int PyMPI_Commctx_INTER(MPI_Comm comm, MPI_Comm *dupcomm, int *tag, MPI_Comm *localcomm, int *low_group) except -1: with PyMPI_Lock(comm, "@commctx_inter"): CHKERR( PyMPI_Commctx_inter(comm, dupcomm, tag, localcomm, low_group) ) return 0 cdef object PyMPI_reduce_intra(object sendobj, object op, int root, MPI_Comm comm): cdef int tag = MPI_UNDEFINED PyMPI_Commctx_INTRA(comm, &comm, &tag) return PyMPI_reduce_p2p(sendobj, op, root, comm, tag) cdef object PyMPI_reduce_inter(object sendobj, object op, int root, MPI_Comm comm): cdef int tag = MPI_UNDEFINED cdef MPI_Comm localcomm = MPI_COMM_NULL PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) # Get communicator remote size and rank cdef int size = MPI_UNDEFINED cdef int rank = MPI_PROC_NULL CHKERR( MPI_Comm_remote_size(comm, &size) ) CHKERR( MPI_Comm_rank(comm, &rank) ) if root >= 0 and root < size: # Reduce in local group and send to remote root sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) if rank == 0: PyMPI_send_p2p(sendobj, root, tag, comm) return None elif root == MPI_ROOT: # Receive from remote group return PyMPI_recv_p2p(0, tag, comm) elif root == MPI_PROC_NULL: # This process does nothing return None else: # Wrong root argument MPI_Comm_call_errhandler(comm, MPI_ERR_ROOT) raise MPIException(MPI_ERR_ROOT) cdef object PyMPI_allreduce_intra(object sendobj, object op, MPI_Comm comm): cdef int tag = MPI_UNDEFINED PyMPI_Commctx_INTRA(comm, &comm, &tag) sendobj = PyMPI_reduce_p2p(sendobj, op, 0, comm, tag) return PyMPI_bcast_p2p(sendobj, 0, comm) cdef object PyMPI_allreduce_inter(object sendobj, object op, MPI_Comm comm): cdef int tag = MPI_UNDEFINED cdef int rank = MPI_PROC_NULL cdef MPI_Comm localcomm = MPI_COMM_NULL PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) CHKERR( MPI_Comm_rank(comm, &rank) ) # Reduce in local group, exchange, and broadcast in local group sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) if rank == 0: sendobj = PyMPI_sendrecv_p2p(sendobj, 0, tag, 0, tag, comm) return PyMPI_bcast_p2p(sendobj, 0, localcomm) cdef object PyMPI_scan_intra(object sendobj, object op, MPI_Comm comm): cdef int tag = MPI_UNDEFINED PyMPI_Commctx_INTRA(comm, &comm, &tag) return PyMPI_scan_p2p(sendobj, op, comm, tag) cdef object PyMPI_exscan_intra(object sendobj, object op, MPI_Comm comm): cdef int tag = MPI_UNDEFINED PyMPI_Commctx_INTRA(comm, &comm, &tag) return PyMPI_exscan_p2p(sendobj, op, comm, tag) # ----- cdef inline bint comm_is_intra(MPI_Comm comm) nogil except -1: cdef int inter = 0 CHKERR( MPI_Comm_test_inter(comm, &inter) ) if inter: return 0 else: return 1 cdef object PyMPI_reduce(object sendobj, object op, int root, MPI_Comm comm): if not options.fast_reduce: return PyMPI_reduce_naive(sendobj, op, root, comm) elif comm_is_intra(comm): return PyMPI_reduce_intra(sendobj, op, root, comm) else: return PyMPI_reduce_inter(sendobj, op, root, comm) cdef object PyMPI_allreduce(object sendobj, object op, MPI_Comm comm): if not options.fast_reduce: return PyMPI_allreduce_naive(sendobj, op, comm) elif comm_is_intra(comm): return PyMPI_allreduce_intra(sendobj, op, comm) else: return PyMPI_allreduce_inter(sendobj, op, comm) cdef object PyMPI_scan(object sendobj, object op, MPI_Comm comm): if not options.fast_reduce: return PyMPI_scan_naive(sendobj, op, comm) else: return PyMPI_scan_intra(sendobj, op, comm) cdef object PyMPI_exscan(object sendobj, object op, MPI_Comm comm): if not options.fast_reduce: return PyMPI_exscan_naive(sendobj, op, comm) else: return PyMPI_exscan_intra(sendobj, op, comm) # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/Request.pyx0000644000175000017500000002566313200562156020641 0ustar dalcinldalcinl00000000000000cdef class Request: """ Request """ def __cinit__(self, Request request=None): self.ob_mpi = MPI_REQUEST_NULL if request is None: return self.ob_mpi = request.ob_mpi self.ob_buf = request.ob_buf def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_Request(&self.ob_mpi) ) def __richcmp__(self, other, int op): if not isinstance(other, Request): return NotImplemented cdef Request s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_REQUEST_NULL # Completion Operations # --------------------- def Wait(self, Status status=None): """ Wait for a send or receive to complete """ cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Wait( &self.ob_mpi, statusp) ) if self.ob_mpi == MPI_REQUEST_NULL: self.ob_buf = None return True def Test(self, Status status=None): """ Test for the completion of a send or receive """ cdef int flag = 0 cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Test( &self.ob_mpi, &flag, statusp) ) if self.ob_mpi == MPI_REQUEST_NULL: self.ob_buf = None return flag def Free(self): """ Free a communication request """ with nogil: CHKERR( MPI_Request_free(&self.ob_mpi) ) def Get_status(self, Status status=None): """ Non-destructive test for the completion of a request """ cdef int flag = 0 cdef MPI_Status *statusp = arg_Status(status) with nogil: CHKERR( MPI_Request_get_status( self.ob_mpi, &flag, statusp) ) return flag # Multiple Completions # -------------------- @classmethod def Waitany(cls, requests, Status status=None): """ Wait for any previously initiated request to complete """ cdef int count = 0 cdef MPI_Request *irequests = NULL cdef int index = MPI_UNDEFINED cdef MPI_Status *statusp = arg_Status(status) # cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) try: with nogil: CHKERR( MPI_Waitany( count, irequests, &index, statusp) ) finally: release_rs(requests, None, count, irequests, NULL) return index @classmethod def Testany(cls, requests, Status status=None): """ Test for completion of any previously initiated request """ cdef int count = 0 cdef MPI_Request *irequests = NULL cdef int index = MPI_UNDEFINED cdef int flag = 0 cdef MPI_Status *statusp = arg_Status(status) # cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) try: with nogil: CHKERR( MPI_Testany( count, irequests, &index, &flag, statusp) ) finally: release_rs(requests, None, count, irequests, NULL) # return (index, flag) @classmethod def Waitall(cls, requests, statuses=None): """ Wait for all previously initiated requests to complete """ cdef int count = 0 cdef MPI_Request *irequests = NULL cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # cdef tmp = acquire_rs(requests, statuses, &count, &irequests, &istatuses) try: with nogil: CHKERR( MPI_Waitall( count, irequests, istatuses) ) finally: release_rs(requests, statuses, count, irequests, istatuses) return True @classmethod def Testall(cls, requests, statuses=None): """ Test for completion of all previously initiated requests """ cdef int count = 0 cdef MPI_Request *irequests = NULL cdef int flag = 0 cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # cdef tmp = acquire_rs(requests, statuses, &count, &irequests, &istatuses) try: with nogil: CHKERR( MPI_Testall( count, irequests, &flag, istatuses) ) finally: release_rs(requests, statuses, count, irequests, istatuses) return flag @classmethod def Waitsome(cls, requests, statuses=None): """ Wait for some previously initiated requests to complete """ cdef int incount = 0 cdef MPI_Request *irequests = NULL cdef int outcount = MPI_UNDEFINED, *iindices = NULL cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # cdef tmp1 = acquire_rs(requests, statuses, &incount, &irequests, &istatuses) cdef tmp2 = newarray(incount, &iindices) try: with nogil: CHKERR( MPI_Waitsome( incount, irequests, &outcount, iindices, istatuses) ) finally: release_rs(requests, statuses, incount, irequests, istatuses) # cdef int i = 0 cdef object indices = None if outcount != MPI_UNDEFINED: indices = [iindices[i] for i from 0 <= i < outcount] return indices @classmethod def Testsome(cls, requests, statuses=None): """ Test for completion of some previously initiated requests """ cdef int incount = 0 cdef MPI_Request *irequests = NULL cdef int outcount = MPI_UNDEFINED, *iindices = NULL cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # cdef tmp1 = acquire_rs(requests, statuses, &incount, &irequests, &istatuses) cdef tmp2 = newarray(incount, &iindices) try: with nogil: CHKERR( MPI_Testsome( incount, irequests, &outcount, iindices, istatuses) ) finally: release_rs(requests, statuses, incount, irequests, istatuses) # cdef int i = 0 cdef object indices = None if outcount != MPI_UNDEFINED: indices = [iindices[i] for i from 0 <= i < outcount] return indices # Cancel # ------ def Cancel(self): """ Cancel a communication request """ with nogil: CHKERR( MPI_Cancel(&self.ob_mpi) ) # Fortran Handle # -------------- def py2f(self): """ """ return MPI_Request_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef Request request = Request.__new__(Request) if issubclass(cls, Prequest): request = Prequest.__new__(Prequest) if issubclass(cls, Grequest): request = Grequest.__new__(Grequest) request.ob_mpi = MPI_Request_f2c(arg) return request # Python Communication # -------------------- # def wait(self, Status status=None): """ Wait for a send or receive to complete """ cdef msg = PyMPI_wait(self, status) return msg # def test(self, Status status=None): """ Test for the completion of a send or receive """ cdef int flag = 0 cdef msg = PyMPI_test(self, &flag, status) return (flag, msg) # @classmethod def waitany(cls, requests, Status status=None): """ Wait for any previously initiated request to complete """ cdef int index = MPI_UNDEFINED cdef msg = PyMPI_waitany(requests, &index, status) return (index, msg) # @classmethod def testany(cls, requests, Status status=None): """ Test for completion of any previously initiated request """ cdef int index = MPI_UNDEFINED cdef int flag = 0 cdef msg = PyMPI_testany(requests, &index, &flag, status) return (index, flag, msg) # @classmethod def waitall(cls, requests, statuses=None): """ Wait for all previously initiated requests to complete """ cdef msg = PyMPI_waitall(requests, statuses) return msg # @classmethod def testall(cls, requests, statuses=None): """ Test for completion of all previously initiated requests """ cdef int flag = 0 cdef msg = PyMPI_testall(requests, &flag, statuses) return (flag, msg) cdef class Prequest(Request): """ Persistent request """ def __cinit__(self, Request request=None): if self.ob_mpi == MPI_REQUEST_NULL: return (request) def Start(self): """ Initiate a communication with a persistent request """ with nogil: CHKERR( MPI_Start(&self.ob_mpi) ) @classmethod def Startall(cls, requests): """ Start a collection of persistent requests """ cdef int count = 0 cdef MPI_Request *irequests = NULL cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) # try: with nogil: CHKERR( MPI_Startall(count, irequests) ) finally: release_rs(requests, None, count, irequests, NULL) cdef class Grequest(Request): """ Generalized request """ def __cinit__(self, Request request=None): self.ob_grequest = self.ob_mpi if self.ob_mpi == MPI_REQUEST_NULL: return (request) @classmethod def Start(cls, query_fn, free_fn, cancel_fn, args=None, kargs=None): """ Create and return a user-defined request """ cdef Grequest request = Grequest.__new__(Grequest) cdef _p_greq state = \ _p_greq(query_fn, free_fn, cancel_fn, args, kargs) with nogil: CHKERR( MPI_Grequest_start( greq_query_fn, greq_free_fn, greq_cancel_fn, state, &request.ob_mpi) ) Py_INCREF(state) request.ob_grequest = request.ob_mpi return request def Complete(self): """ Notify that a user-defined request is complete """ if self.ob_mpi != MPI_REQUEST_NULL: if self.ob_mpi != self.ob_grequest: raise MPIException(MPI_ERR_REQUEST) cdef MPI_Request grequest = self.ob_grequest self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? with nogil: CHKERR( MPI_Grequest_complete(grequest) ) self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? cdef Request __REQUEST_NULL__ = new_Request(MPI_REQUEST_NULL) # Predefined request handles # -------------------------- REQUEST_NULL = __REQUEST_NULL__ #: Null request handle mpi4py-3.0.3/src/mpi4py/MPI/Group.pyx0000644000175000017500000001520313200562156020272 0ustar dalcinldalcinl00000000000000cdef class Group: """ Group """ def __cinit__(self, Group group=None): self.ob_mpi = MPI_GROUP_NULL if group is None: return self.ob_mpi = group.ob_mpi def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_Group(&self.ob_mpi) ) def __richcmp__(self, other, int op): if not isinstance(other, Group): return NotImplemented cdef Group s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_GROUP_NULL # Group Accessors # --------------- def Get_size(self): """ Return the size of a group """ cdef int size = -1 CHKERR( MPI_Group_size(self.ob_mpi, &size) ) return size property size: """number of processes in group""" def __get__(self): return self.Get_size() def Get_rank(self): """ Return the rank of this process in a group """ cdef int rank = -1 CHKERR( MPI_Group_rank(self.ob_mpi, &rank) ) return rank property rank: """rank of this process in group""" def __get__(self): return self.Get_rank() @classmethod def Translate_ranks(cls, Group group1, ranks1, Group group2=None): """ Translate the ranks of processes in one group to those in another group """ cdef MPI_Group grp1 = MPI_GROUP_NULL cdef MPI_Group grp2 = MPI_GROUP_NULL cdef int i = 0, n = 0, *iranks1 = NULL, *iranks2 = NULL cdef tmp1 = getarray(ranks1, &n, &iranks1) cdef tmp2 = newarray(n, &iranks2) # grp1 = group1.ob_mpi if group2 is not None: grp2 = group2.ob_mpi else: CHKERR( MPI_Comm_group(MPI_COMM_WORLD, &grp2) ) try: CHKERR( MPI_Group_translate_ranks(grp1, n, iranks1, grp2, iranks2) ) finally: if group2 is None: CHKERR( MPI_Group_free(&grp2) ) # cdef object ranks2 = [iranks2[i] for i from 0 <= i < n] return ranks2 @classmethod def Compare(cls, Group group1, Group group2): """ Compare two groups """ cdef int flag = MPI_UNEQUAL CHKERR( MPI_Group_compare(group1.ob_mpi, group2.ob_mpi, &flag) ) return flag # Group Constructors # ------------------ def Dup(self): """ Duplicate a group """ cdef Group group = Group.__new__(Group) CHKERR( MPI_Group_union(self.ob_mpi, MPI_GROUP_EMPTY, &group.ob_mpi) ) return group @classmethod def Union(cls, Group group1, Group group2): """ Produce a group by combining two existing groups """ cdef Group group = Group.__new__(Group) CHKERR( MPI_Group_union( group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) return group @classmethod def Intersection(cls, Group group1, Group group2): """ Produce a group as the intersection of two existing groups """ cdef Group group = Group.__new__(Group) CHKERR( MPI_Group_intersection( group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) return group Intersect = Intersection @classmethod def Difference(cls, Group group1, Group group2): """ Produce a group from the difference of two existing groups """ cdef Group group = Group.__new__(Group) CHKERR( MPI_Group_difference( group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) return group def Incl(self, ranks): """ Produce a group by reordering an existing group and taking only listed members """ cdef int n = 0, *iranks = NULL ranks = getarray(ranks, &n, &iranks) cdef Group group = Group.__new__(Group) CHKERR( MPI_Group_incl(self.ob_mpi, n, iranks, &group.ob_mpi) ) return group def Excl(self, ranks): """ Produce a group by reordering an existing group and taking only unlisted members """ cdef int n = 0, *iranks = NULL ranks = getarray(ranks, &n, &iranks) cdef Group group = Group.__new__(Group) CHKERR( MPI_Group_excl(self.ob_mpi, n, iranks, &group.ob_mpi) ) return group def Range_incl(self, ranks): """ Create a new group from ranges of of ranks in an existing group """ cdef int *p = NULL, (*ranges)[3]# = NULL ## XXX cython fails ranges = NULL cdef int i = 0, n = len(ranks) cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) for i from 0 <= i < n: p = ranges[i] p[0], p[1], p[2] = ranks[i] cdef Group group = Group.__new__(Group) CHKERR( MPI_Group_range_incl(self.ob_mpi, n, ranges, &group.ob_mpi) ) return group def Range_excl(self, ranks): """ Create a new group by excluding ranges of processes from an existing group """ cdef int *p = NULL, (*ranges)[3]# = NULL ## XXX cython fails ranges = NULL cdef int i = 0, n = len(ranks) cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) for i from 0 <= i < n: p = ranges[i] p[0], p[1], p[2] = ranks[i] cdef Group group = Group.__new__(Group) CHKERR( MPI_Group_range_excl(self.ob_mpi, n, ranges, &group.ob_mpi) ) return group # Group Destructor # ---------------- def Free(self): """ Free a group """ CHKERR( MPI_Group_free(&self.ob_mpi) ) if self is __GROUP_EMPTY__: self.ob_mpi = MPI_GROUP_EMPTY # Fortran Handle # -------------- def py2f(self): """ """ return MPI_Group_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef Group group = Group.__new__(Group) group.ob_mpi = MPI_Group_f2c(arg) return group cdef Group __GROUP_NULL__ = new_Group ( MPI_GROUP_NULL ) cdef Group __GROUP_EMPTY__ = new_Group ( MPI_GROUP_EMPTY ) # Predefined group handles # ------------------------ GROUP_NULL = __GROUP_NULL__ #: Null group handle GROUP_EMPTY = __GROUP_EMPTY__ #: Empty group handle mpi4py-3.0.3/src/mpi4py/MPI/atimport.pxi0000644000175000017500000001675013200562156021025 0ustar dalcinldalcinl00000000000000# ----------------------------------------------------------------------------- cdef extern from "atimport.h": pass # ----------------------------------------------------------------------------- cdef extern from "Python.h": enum: PY3 "(PY_MAJOR_VERSION>=3)" enum: PY2 "(PY_MAJOR_VERSION==2)" enum: PYPY "PyMPI_RUNTIME_PYPY" void PySys_WriteStderr(char*,...) int Py_AtExit(void (*)()) ctypedef struct PyObject PyObject *Py_None void Py_CLEAR(PyObject*) void Py_INCREF(object) void Py_DECREF(object) # ----------------------------------------------------------------------------- cdef extern from *: enum: USE_MATCHED_RECV "PyMPI_USE_MATCHED_RECV" ctypedef struct Options: int initialize int threads int thread_level int finalize int fast_reduce int recv_mprobe int errors cdef Options options options.initialize = 1 options.threads = 1 options.thread_level = MPI_THREAD_MULTIPLE options.finalize = 1 options.fast_reduce = 1 options.recv_mprobe = 1 options.errors = 1 cdef int warnOpt(object name, object value) except -1: cdef object warn from warnings import warn warn("mpi4py.rc: '%s': unexpected value '%r'" % (name, value)) cdef int getOptions(Options* opts) except -1: cdef object rc opts.initialize = 1 opts.threads = 1 opts.thread_level = MPI_THREAD_MULTIPLE opts.finalize = 1 opts.fast_reduce = 1 opts.recv_mprobe = 1 opts.errors = 1 try: from mpi4py import rc except: return 0 # cdef object initialize = True cdef object threads = True cdef object thread_level = 'multiple' cdef object finalize = None cdef object fast_reduce = True cdef object recv_mprobe = True cdef object errors = 'exception' try: initialize = rc.initialize except: pass try: threads = rc.threads except: pass try: threads = rc.threaded # backward except: pass # compatibility try: thread_level = rc.thread_level except: pass try: finalize = rc.finalize except: pass try: fast_reduce = rc.fast_reduce except: pass try: recv_mprobe = rc.recv_mprobe except: pass try: errors = rc.errors except: pass # if initialize in (True, 'yes'): opts.initialize = 1 elif initialize in (False, 'no'): opts.initialize = 0 else: warnOpt("initialize", initialize) # if threads in (True, 'yes'): opts.threads = 1 elif threads in (False, 'no'): opts.threads = 0 else: warnOpt("threads", threads) # if thread_level == 'single': opts.thread_level = MPI_THREAD_SINGLE elif thread_level == 'funneled': opts.thread_level = MPI_THREAD_FUNNELED elif thread_level == 'serialized': opts.thread_level = MPI_THREAD_SERIALIZED elif thread_level == 'multiple': opts.thread_level = MPI_THREAD_MULTIPLE else: warnOpt("thread_level", thread_level) # if finalize is None: opts.finalize = opts.initialize elif finalize in (True, 'yes'): opts.finalize = 1 elif finalize in (False, 'no'): opts.finalize = 0 else: warnOpt("finalize", finalize) # if fast_reduce in (True, 'yes'): opts.fast_reduce = 1 elif fast_reduce in (False, 'no'): opts.fast_reduce = 0 else: warnOpt("fast_reduce", fast_reduce) # if recv_mprobe in (True, 'yes'): opts.recv_mprobe = 1 and USE_MATCHED_RECV elif recv_mprobe in (False, 'no'): opts.recv_mprobe = 0 else: warnOpt("recv_mprobe", recv_mprobe) # if errors == 'default': opts.errors = 0 elif errors == 'exception': opts.errors = 1 elif errors == 'fatal': opts.errors = 2 else: warnOpt("errors", errors) # return 0 # ----------------------------------------------------------------------------- cdef extern from *: int PyMPI_Commctx_finalize() nogil cdef int bootstrap() except -1: # Get options from 'mpi4py.rc' module getOptions(&options) # Cleanup at (the very end of) Python exit if Py_AtExit(atexit) < 0: PySys_WriteStderr(b"warning: could not register " b"cleanup with Py_AtExit()%s", b"\n") # Do we have to initialize MPI? cdef int initialized = 1 MPI_Initialized(&initialized) if initialized: options.finalize = 0 return 0 if not options.initialize: return 0 # MPI initialization cdef int ierr = MPI_SUCCESS cdef int required = MPI_THREAD_SINGLE cdef int provided = MPI_THREAD_SINGLE if options.threads: required = options.thread_level ierr = MPI_Init_thread(NULL, NULL, required, &provided) if ierr != MPI_SUCCESS: raise RuntimeError( "MPI_Init_thread() failed [error code: %d]" % ierr) else: ierr = MPI_Init(NULL, NULL) if ierr != MPI_SUCCESS: raise RuntimeError( "MPI_Init() failed [error code: %d]" % ierr) return 0 cdef inline int mpi_active() nogil: cdef int ierr = MPI_SUCCESS # MPI initialized ? cdef int initialized = 0 ierr = MPI_Initialized(&initialized) if not initialized or ierr != MPI_SUCCESS: return 0 # MPI finalized ? cdef int finalized = 1 ierr = MPI_Finalized(&finalized) if finalized or ierr != MPI_SUCCESS: return 0 # MPI should be active ... return 1 cdef int initialize() nogil except -1: if not mpi_active(): return 0 comm_set_eh(MPI_COMM_SELF) comm_set_eh(MPI_COMM_WORLD) return 0 cdef void finalize() nogil: if not mpi_active(): return PyMPI_Commctx_finalize() cdef int abort_status = 0 cdef void atexit() nogil: if not mpi_active(): return if abort_status: MPI_Abort(MPI_COMM_WORLD, abort_status) finalize() if options.finalize: MPI_Finalize() def _set_abort_status(object status): "Helper for ``python -m mpi4py.run ...``" global abort_status try: abort_status = status except: abort_status = 1 if status else 0 # ----------------------------------------------------------------------------- # Vile hack for raising a exception and not contaminate the traceback cdef extern from *: enum: PyMPI_ERR_UNAVAILABLE cdef extern from "Python.h": void PyErr_SetObject(object, object) void *PyExc_RuntimeError void *PyExc_NotImplementedError cdef object MPIException = PyExc_RuntimeError cdef int PyMPI_Raise(int ierr) except -1 with gil: if ierr == PyMPI_ERR_UNAVAILABLE: PyErr_SetObject(PyExc_NotImplementedError, None) return 0 if (MPIException) != NULL: PyErr_SetObject(MPIException, ierr) else: PyErr_SetObject(PyExc_RuntimeError, ierr) return 0 cdef inline int CHKERR(int ierr) nogil except -1: if ierr == MPI_SUCCESS: return 0 PyMPI_Raise(ierr) return -1 cdef inline void print_traceback(): cdef object sys, traceback import sys, traceback traceback.print_exc() try: sys.stderr.flush() except: pass # ----------------------------------------------------------------------------- # PyPy: Py_IsInitialized() cannot be called without the GIL cdef extern from "Python.h": int _Py_IsInitialized"Py_IsInitialized"() nogil cdef object _pypy_sentinel = None cdef inline int Py_IsInitialized() nogil: if PYPY and (_pypy_sentinel) == NULL: return 0 return _Py_IsInitialized() # ----------------------------------------------------------------------------- mpi4py-3.0.3/src/mpi4py/MPI/Info.pyx0000644000175000017500000001527113200562156020076 0ustar dalcinldalcinl00000000000000cdef class Info: """ Info """ def __cinit__(self, Info info=None): self.ob_mpi = MPI_INFO_NULL if info is None: return self.ob_mpi = info.ob_mpi def __dealloc__(self): if not (self.flags & PyMPI_OWNED): return CHKERR( del_Info(&self.ob_mpi) ) def __richcmp__(self, other, int op): if not isinstance(other, Info): return NotImplemented cdef Info s = self, o = other if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) cdef mod = type(self).__module__ cdef cls = type(self).__name__ raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) def __bool__(self): return self.ob_mpi != MPI_INFO_NULL @classmethod def Create(cls): """ Create a new, empty info object """ cdef Info info = Info.__new__(Info) CHKERR( MPI_Info_create(&info.ob_mpi) ) return info def Free(self): """ Free a info object """ CHKERR( MPI_Info_free(&self.ob_mpi) ) if self is __INFO_ENV__: self.ob_mpi = MPI_INFO_ENV def Dup(self): """ Duplicate an existing info object, creating a new object, with the same (key, value) pairs and the same ordering of keys """ cdef Info info = Info.__new__(Info) CHKERR( MPI_Info_dup(self.ob_mpi, &info.ob_mpi) ) return info def Get(self, object key, int maxlen=-1): """ Retrieve the value associated with a key """ if maxlen < 0: maxlen = MPI_MAX_INFO_VAL if maxlen > MPI_MAX_INFO_VAL: maxlen = MPI_MAX_INFO_VAL cdef char *ckey = NULL cdef char *cvalue = NULL cdef int flag = 0 key = asmpistr(key, &ckey) cdef tmp = allocate((maxlen+1), sizeof(char), &cvalue) CHKERR( MPI_Info_get(self.ob_mpi, ckey, maxlen, cvalue, &flag) ) cvalue[maxlen] = 0 # just in case if not flag: return None return mpistr(cvalue) def Set(self, object key, object value): """ Add the (key, value) pair to info, and overrides the value if a value for the same key was previously set """ cdef char *ckey = NULL cdef char *cvalue = NULL key = asmpistr(key, &ckey) value = asmpistr(value, &cvalue) CHKERR( MPI_Info_set(self.ob_mpi, ckey, cvalue) ) def Delete(self, object key): """ Remove a (key, value) pair from info """ cdef char *ckey = NULL key = asmpistr(key, &ckey) CHKERR( MPI_Info_delete(self.ob_mpi, ckey) ) def Get_nkeys(self): """ Return the number of currently defined keys in info """ cdef int nkeys = 0 CHKERR( MPI_Info_get_nkeys(self.ob_mpi, &nkeys) ) return nkeys def Get_nthkey(self, int n): """ Return the nth defined key in info. Keys are numbered in the range [0, N) where N is the value returned by `Info.Get_nkeys()` """ cdef char ckey[MPI_MAX_INFO_KEY+1] CHKERR( MPI_Info_get_nthkey(self.ob_mpi, n, ckey) ) ckey[MPI_MAX_INFO_KEY] = 0 # just in case return mpistr(ckey) # Fortran Handle # -------------- def py2f(self): """ """ return MPI_Info_c2f(self.ob_mpi) @classmethod def f2py(cls, arg): """ """ cdef Info info = Info.__new__(Info) info.ob_mpi = MPI_Info_f2c(arg) return info # Python mapping emulation # ------------------------ def __len__(self): if not self: return 0 return self.Get_nkeys() def __contains__(self, object key): if not self: return False cdef char *ckey = NULL cdef int dummy = 0 cdef int haskey = 0 key = asmpistr(key, &ckey) CHKERR( MPI_Info_get_valuelen(self.ob_mpi, ckey, &dummy, &haskey) ) return haskey def __iter__(self): return iter(self.keys()) def __getitem__(self, object key): if not self: raise KeyError(key) cdef object value = self.Get(key) if value is None: raise KeyError(key) return value def __setitem__(self, object key, object value): if not self: raise KeyError(key) self.Set(key, value) def __delitem__(self, object key): if not self: raise KeyError(key) if key not in self: raise KeyError(key) self.Delete(key) def get(self, object key, object default=None): """info get""" if not self: return default cdef object value = self.Get(key) if value is None: return default return value def keys(self): """info keys""" if not self: return [] cdef list keys = [] cdef int k = 0, nkeys = self.Get_nkeys() cdef object key for k from 0 <= k < nkeys: key = self.Get_nthkey(k) keys.append(key) return keys def values(self): """info values""" if not self: return [] cdef list values = [] cdef int k = 0, nkeys = self.Get_nkeys() cdef object key, val for k from 0 <= k < nkeys: key = self.Get_nthkey(k) val = self.Get(key) values.append(val) return values def items(self): """info items""" if not self: return [] cdef list items = [] cdef int k = 0, nkeys = self.Get_nkeys() cdef object key, value for k from 0 <= k < nkeys: key = self.Get_nthkey(k) value = self.Get(key) items.append((key, value)) return items def update(self, other=(), **kwds): """info update""" if not self: raise KeyError cdef object key, value if hasattr(other, 'keys'): for key in other.keys(): self.Set(key, other[key]) else: for key, value in other: self.Set(key, value) for key, value in kwds.items(): self.Set(key, value) def copy(self): """info copy""" if not self: return Info() return self.Dup() def clear(self): """info clear""" if not self: return None cdef object key cdef int k = 0, nkeys = self.Get_nkeys() while k < nkeys: key = self.Get_nthkey(0) self.Delete(key) k += 1 cdef Info __INFO_NULL__ = new_Info(MPI_INFO_NULL) cdef Info __INFO_ENV__ = new_Info(MPI_INFO_ENV) # Predefined info handles # ----------------------- INFO_NULL = __INFO_NULL__ #: Null info handle INFO_ENV = __INFO_ENV__ #: Environment info handle mpi4py-3.0.3/src/lib-mpi/0000775000175000017500000000000013560002767016125 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/src/lib-mpi/config.h0000664000175000017500000000227413477641753017563 0ustar dalcinldalcinl00000000000000#if defined(MS_WINDOWS) # if !defined(MSMPI_VER) && (defined(MPICH2) && defined(MPIAPI)) # define MSMPI_VER 0x100 # endif #endif #if defined(MPICH_NAME) && (MPICH_NAME==3) # define MPICH3 1 #endif #if defined(MPICH_NAME) && (MPICH_NAME==1) #define MPICH1 1 #endif #if !defined(MPIAPI) # define MPIAPI #endif #if defined(HAVE_CONFIG_H) #include "config/config.h" #elif defined(MSMPI_VER) #include "config/msmpi.h" #elif defined(MPICH3) #include "config/mpich3.h" #elif defined(MPICH2) #include "config/mpich2.h" #elif defined(OPEN_MPI) #include "config/openmpi.h" #else /* Unknown MPI*/ #include "config/unknown.h" #endif #ifdef PyMPI_MISSING_MPI_Type_create_f90_integer #undef PyMPI_HAVE_MPI_Type_create_f90_integer #endif #ifdef PyMPI_MISSING_MPI_Type_create_f90_real #undef PyMPI_HAVE_MPI_Type_create_f90_real #endif #ifdef PyMPI_MISSING_MPI_Type_create_f90_complex #undef PyMPI_HAVE_MPI_Type_create_f90_complex #endif #ifdef PyMPI_MISSING_MPI_Status_c2f #undef PyMPI_HAVE_MPI_Status_c2f #endif #ifdef PyMPI_MISSING_MPI_Status_f2c #undef PyMPI_HAVE_MPI_Status_f2c #endif #ifdef PyMPI_MISSING_MPI_LB #undef PyMPI_HAVE_MPI_LB #endif #ifdef PyMPI_MISSING_MPI_UB #undef PyMPI_HAVE_MPI_UB #endif mpi4py-3.0.3/src/lib-mpi/compat/0000775000175000017500000000000013560002767017410 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/src/lib-mpi/compat/mpich3.h0000644000175000017500000001204012750576064020745 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_COMPAT_MPICH3_H #define PyMPI_COMPAT_MPICH3_H #if defined(MPICH_NUMVERSION) #if (MPICH_NUMVERSION == 30101300) static int PyMPI_MPICH3_MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status) { if (c_status == MPI_STATUS_IGNORE || c_status == MPI_STATUSES_IGNORE) return MPI_ERR_OTHER; *(MPI_Status *)f_status = *c_status; return MPI_SUCCESS; } #define MPI_Status_c2f PyMPI_MPICH3_MPI_Status_c2f #endif #if (MPICH_NUMVERSION < 30100301) static int PyMPI_MPICH3_MPI_Add_error_class(int *errorclass) { int ierr; char errstr[1] = {0}; ierr = MPI_Add_error_class(errorclass); if (ierr) return ierr; return MPI_Add_error_string(*errorclass,errstr); } #undef MPI_Add_error_class #define MPI_Add_error_class PyMPI_MPICH3_MPI_Add_error_class static int PyMPI_MPICH3_MPI_Add_error_code(int errorclass, int *errorcode) { int ierr; char errstr[1] = {0}; ierr = MPI_Add_error_code(errorclass,errorcode); if (ierr) return ierr; return MPI_Add_error_string(*errorcode,errstr); } #undef MPI_Add_error_code #define MPI_Add_error_code PyMPI_MPICH3_MPI_Add_error_code #endif #if (MPICH_NUMVERSION < 30100000) static int PyMPI_MPICH3_MPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size) { int ierr = MPI_Type_commit(&datatype); if (ierr) return ierr; return MPI_Type_size_x(datatype,size); } #undef MPI_Type_size_x #define MPI_Type_size_x PyMPI_MPICH3_MPI_Type_size_x static int PyMPI_MPICH3_MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent) { int ierr = MPI_Type_commit(&datatype); if (ierr) return ierr; return MPI_Type_get_extent_x(datatype,lb,extent); } #undef MPI_Type_get_extent_x #define MPI_Type_get_extent_x PyMPI_MPICH3_MPI_Type_get_extent_x static int PyMPI_MPICH3_MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent) { int ierr = MPI_Type_commit(&datatype); if (ierr) return ierr; return MPI_Type_get_true_extent_x(datatype,lb,extent); } #undef MPI_Type_get_true_extent_x #define MPI_Type_get_true_extent_x PyMPI_MPICH3_MPI_Type_get_true_extent_x static int PyMPI_MPICH3_MPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) { double origin_buf, result_buf; if (!origin_addr && !origin_count) origin_addr = (const void *)&origin_buf; if (!result_addr && !result_count) result_addr = (void *)&result_buf; return MPI_Get_accumulate(origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win); } #undef MPI_Get_accumulate #define MPI_Get_accumulate PyMPI_MPICH3_MPI_Get_accumulate static int PyMPI_MPICH3_MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) { double origin_buf, result_buf; if (!origin_addr && !origin_count) origin_addr = (const void *)&origin_buf; if (!result_addr && !result_count) result_addr = (void *)&result_buf; return MPI_Rget_accumulate(origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request); } #undef MPI_Rget_accumulate #define MPI_Rget_accumulate PyMPI_MPICH3_MPI_Rget_accumulate #endif #endif /* !MPICH_NUMVERSION */ #endif /* !PyMPI_COMPAT_MPICH3_H */ mpi4py-3.0.3/src/lib-mpi/compat/sicortex.h0000644000175000017500000000135712750576064021433 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_COMPAT_SICORTEX_H #define PyMPI_COMPAT_SICORTEX_H #include "../../dynload.h" static void PyMPI_SCMPI_dlopen_libslurm(void) { (void)dlopen("libslurm.so", RTLD_NOW|RTLD_GLOBAL|RTLD_NOLOAD); (void)dlerror(); } static int PyMPI_SCMPI_MPI_Init(int *argc, char ***argv) { PyMPI_SCMPI_dlopen_libslurm(); return MPI_Init(argc, argv); } #undef MPI_Init #define MPI_Init PyMPI_SCMPI_MPI_Init static int PyMPI_SCMPI_MPI_Init_thread(int *argc, char ***argv, int required, int *provided) { PyMPI_SCMPI_dlopen_libslurm(); return MPI_Init_thread(argc, argv, required, provided); } #undef MPI_Init_thread #define MPI_Init_thread PyMPI_SCMPI_MPI_Init_thread #endif /* !PyMPI_COMPAT_SICORTEX_H */ mpi4py-3.0.3/src/lib-mpi/compat/msmpi.h0000644000175000017500000000161212750576064020712 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_COMPAT_MSMPI_H #define PyMPI_COMPAT_MSMPI_H static int PyMPI_MSMPI_MPI_Add_error_class(int *errorclass) { int ierr; char errstr[1] = {0}; ierr = MPI_Add_error_class(errorclass); if (ierr) return ierr; return MPI_Add_error_string(*errorclass,errstr); } #undef MPI_Add_error_class #define MPI_Add_error_class PyMPI_MSMPI_MPI_Add_error_class static int PyMPI_MSMPI_MPI_Add_error_code(int errorclass, int *errorcode) { int ierr; char errstr[1] = {0}; ierr = MPI_Add_error_code(errorclass,errorcode); if (ierr) return ierr; return MPI_Add_error_string(*errorcode,errstr); } #undef MPI_Add_error_code #define MPI_Add_error_code PyMPI_MSMPI_MPI_Add_error_code #if defined(MPICH_NAME) #undef MPI_File_c2f #define MPI_File_c2f PMPI_File_c2f #undef MPI_File_f2c #define MPI_File_f2c PMPI_File_f2c #endif #endif /* !PyMPI_COMPAT_MSMPI_H */ mpi4py-3.0.3/src/lib-mpi/compat/lammpi.h0000644000175000017500000002712212750576064021050 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_COMPAT_LAMMPI_H #define PyMPI_COMPAT_LAMMPI_H /* ---------------------------------------------------------------- */ static int PyMPI_LAMMPI_MPI_Info_free(MPI_Info *info) { if (info == 0) return MPI_ERR_ARG; if (*info == MPI_INFO_NULL) return MPI_ERR_ARG; return MPI_Info_free(info); } #undef MPI_Info_free #define MPI_Info_free PyMPI_LAMMPI_MPI_Info_free /* ---------------------------------------------------------------- */ static int PyMPI_LAMMPI_MPI_Cancel(MPI_Request *request) { int ierr = MPI_SUCCESS; ierr = MPI_Cancel(request); if (ierr == MPI_ERR_ARG) { if (request != 0 && *request == MPI_REQUEST_NULL) ierr = MPI_ERR_REQUEST; } return ierr; } #undef MPI_Cancel #define MPI_Cancel PyMPI_LAMMPI_MPI_Cancel static int PyMPI_LAMMPI_MPI_Comm_disconnect(MPI_Comm *comm) { if (comm == 0) return MPI_ERR_ARG; if (*comm == MPI_COMM_NULL) return MPI_ERR_COMM; if (*comm == MPI_COMM_SELF) return MPI_ERR_COMM; if (*comm == MPI_COMM_WORLD) return MPI_ERR_COMM; return MPI_Comm_disconnect(comm); } #undef MPI_Comm_disconnect #define MPI_Comm_disconnect PyMPI_LAMMPI_MPI_Comm_disconnect /* ---------------------------------------------------------------- */ #if defined(__cplusplus) extern "C" { #endif struct _errhdl { void (*eh_func)(void); int eh_refcount; int eh_f77handle; int eh_flags; }; #if defined(__cplusplus) } #endif static int PyMPI_LAMMPI_Errhandler_free(MPI_Errhandler *errhandler) { if (errhandler == 0) return MPI_ERR_ARG; if (*errhandler == MPI_ERRORS_RETURN || *errhandler == MPI_ERRORS_ARE_FATAL) { struct _errhdl *eh = (struct _errhdl *) (*errhandler); eh->eh_refcount--; *errhandler = MPI_ERRHANDLER_NULL; return MPI_SUCCESS; } else { return MPI_Errhandler_free(errhandler); } } #undef MPI_Errhandler_free #define MPI_Errhandler_free PyMPI_LAMMPI_Errhandler_free /* -- */ static int PyMPI_LAMMPI_MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler) { int ierr = MPI_SUCCESS; if (comm == MPI_COMM_NULL) return MPI_ERR_COMM; if (errhandler == 0) return MPI_ERR_ARG; /* get error handler */ ierr = MPI_Errhandler_get(comm, errhandler); if (ierr != MPI_SUCCESS) return ierr; return MPI_SUCCESS; } #undef MPI_Errhandler_get #define MPI_Errhandler_get PyMPI_LAMMPI_MPI_Comm_get_errhandler #undef MPI_Comm_get_errhandler #define MPI_Comm_get_errhandler PyMPI_LAMMPI_MPI_Comm_get_errhandler static int PyMPI_LAMMPI_MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler) { int ierr = MPI_SUCCESS, ierr2 = MPI_SUCCESS; MPI_Errhandler previous = MPI_ERRHANDLER_NULL; if (comm == MPI_COMM_NULL) return MPI_ERR_COMM; if (errhandler == MPI_ERRHANDLER_NULL) return MPI_ERR_ARG; /* get previous error handler*/ ierr2 = MPI_Errhandler_get(comm, &previous); if (ierr2 != MPI_SUCCESS) return ierr2; /* increment reference counter */ if (errhandler != MPI_ERRHANDLER_NULL) { struct _errhdl *eh = (struct _errhdl *) (errhandler); eh->eh_refcount++; } /* set error handler */ ierr = MPI_Errhandler_set(comm, errhandler); /* decrement reference counter */ if (errhandler != MPI_ERRHANDLER_NULL) { struct _errhdl *eh = (struct _errhdl *) (errhandler); eh->eh_refcount--; } /* free previous error handler*/ if (previous != MPI_ERRHANDLER_NULL) { ierr2 = MPI_Errhandler_free(&previous); } if (ierr != MPI_SUCCESS) return ierr; if (ierr2 != MPI_SUCCESS) return ierr2; return MPI_SUCCESS; } #undef MPI_Errhandler_set #define MPI_Errhandler_set PyMPI_LAMMPI_MPI_Comm_set_errhandler #undef MPI_Comm_set_errhandler #define MPI_Comm_set_errhandler PyMPI_LAMMPI_MPI_Comm_set_errhandler /* -- */ static int PyMPI_LAMMPI_MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler) { int ierr = MPI_SUCCESS; if (win == MPI_WIN_NULL) return MPI_ERR_WIN; if (errhandler == 0) return MPI_ERR_ARG; /* get error handler */ ierr = MPI_Win_get_errhandler(win, errhandler); if (ierr != MPI_SUCCESS) return ierr; /* increment reference counter */ if (*errhandler != MPI_ERRHANDLER_NULL) { struct _errhdl *eh = (struct _errhdl *) (*errhandler); eh->eh_refcount++; } return MPI_SUCCESS; } #undef MPI_Win_get_errhandler #define MPI_Win_get_errhandler PyMPI_LAMMPI_MPI_Win_get_errhandler static int PyMPI_LAMMPI_MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) { int ierr = MPI_SUCCESS, ierr2 = MPI_SUCCESS; MPI_Errhandler previous = MPI_ERRHANDLER_NULL; if (win == MPI_WIN_NULL) return MPI_ERR_WIN; if (errhandler == MPI_ERRHANDLER_NULL) return MPI_ERR_ARG; /* get previous error handler*/ ierr2 = MPI_Win_get_errhandler(win, &previous); if (ierr2 != MPI_SUCCESS) return ierr2; /* increment reference counter */ if (errhandler != MPI_ERRHANDLER_NULL) { struct _errhdl *eh = (struct _errhdl *) (errhandler); eh->eh_refcount++; } /* set error handler */ ierr = MPI_Win_set_errhandler(win, errhandler); /* decrement reference counter */ if (errhandler != MPI_ERRHANDLER_NULL) { struct _errhdl *eh = (struct _errhdl *) (errhandler); eh->eh_refcount--; } /* free previous error handler*/ if (previous != MPI_ERRHANDLER_NULL) { ierr2 = MPI_Errhandler_free(&previous); } if (ierr != MPI_SUCCESS) return ierr; if (ierr2 != MPI_SUCCESS) return ierr2; return MPI_SUCCESS; } #undef MPI_Win_set_errhandler #define MPI_Win_set_errhandler PyMPI_LAMMPI_MPI_Win_set_errhandler static int PyMPI_LAMMPI_MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win) { int ierr = MPI_SUCCESS; MPI_Errhandler errhandler = MPI_ERRHANDLER_NULL; ierr = MPI_Win_create(base, size, disp_unit, info, comm, win); if (ierr != MPI_SUCCESS) return ierr; ierr = MPI_Win_get_errhandler(*win, &errhandler); if (ierr != MPI_SUCCESS) return ierr; return MPI_SUCCESS; } #undef MPI_Win_create #define MPI_Win_create PyMPI_LAMMPI_MPI_Win_create static int PyMPI_LAMMPI_MPI_Win_free(MPI_Win *win) { int ierr = MPI_SUCCESS, ierr2 = MPI_SUCCESS; MPI_Errhandler errhandler = MPI_ERRHANDLER_NULL; if (win != 0 && *win != MPI_WIN_NULL ) { MPI_Errhandler previous; ierr2 = MPI_Win_get_errhandler(*win, &previous); if (ierr2 != MPI_SUCCESS) return ierr2; errhandler = previous; if (previous != MPI_ERRHANDLER_NULL) { ierr2 = MPI_Errhandler_free(&previous); if (ierr2 != MPI_SUCCESS) return ierr2; } } ierr = MPI_Win_free(win); if (errhandler != MPI_ERRHANDLER_NULL) { ierr2 = MPI_Errhandler_free(&errhandler); if (ierr2 != MPI_SUCCESS) return ierr2; } if (ierr != MPI_SUCCESS) return ierr; return MPI_SUCCESS; } #undef MPI_Win_free #define MPI_Win_free PyMPI_LAMMPI_MPI_Win_free /* -- */ #if defined(ROMIO_VERSION) #if defined(__cplusplus) extern "C" { #endif #define ADIOI_FILE_COOKIE 2487376 #define FDTYPE int #define ADIO_Offset MPI_Offset #define ADIOI_Fns struct ADIOI_Fns_struct #define ADIOI_Hints struct ADIOI_Hints_struct extern MPI_Errhandler ADIOI_DFLT_ERR_HANDLER; struct ADIOI_FileD { int cookie; /* for error checking */ FDTYPE fd_sys; /* system file descriptor */ #ifdef XFS int fd_direct; /* On XFS, this is used for direct I/O; fd_sys is used for buffered I/O */ int direct_read; /* flag; 1 means use direct read */ int direct_write; /* flag; 1 means use direct write */ /* direct I/O attributes */ unsigned d_mem; /* data buffer memory alignment */ unsigned d_miniosz; /* min xfer size, xfer size multiple, and file seek offset alignment */ unsigned d_maxiosz; /* max xfer size */ #endif ADIO_Offset fp_ind; /* individual file pointer in MPI-IO (in bytes)*/ ADIO_Offset fp_sys_posn; /* current location of the system file-pointer in bytes */ ADIOI_Fns *fns; /* struct of I/O functions to use */ MPI_Comm comm; /* communicator indicating who called open */ char *filename; int file_system; /* type of file system */ int access_mode; ADIO_Offset disp; /* reqd. for MPI-IO */ MPI_Datatype etype; /* reqd. for MPI-IO */ MPI_Datatype filetype; /* reqd. for MPI-IO */ int etype_size; /* in bytes */ ADIOI_Hints *hints; /* structure containing fs-indep. info values */ MPI_Info info; int split_coll_count; /* count of outstanding split coll. ops. */ char *shared_fp_fname; /* name of file containing shared file pointer */ struct ADIOI_FileD *shared_fp_fd; /* file handle of file containing shared fp */ int async_count; /* count of outstanding nonblocking operations */ int perm; int atomicity; /* true=atomic, false=nonatomic */ int iomode; /* reqd. to implement Intel PFS modes */ MPI_Errhandler err_handler; }; #if defined(__cplusplus) } #endif static int PyMPI_LAMMPI_MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler) { /* check arguments */ if (file != MPI_FILE_NULL) { struct ADIOI_FileD * fh = (struct ADIOI_FileD *) file; if (fh->cookie != ADIOI_FILE_COOKIE) return MPI_ERR_ARG; } if (errhandler == 0) return MPI_ERR_ARG; /* get error handler */ if (file == MPI_FILE_NULL) { *errhandler = ADIOI_DFLT_ERR_HANDLER; } else { struct ADIOI_FileD * fh = (struct ADIOI_FileD *) file; *errhandler = fh->err_handler; } /* increment reference counter */ if (*errhandler != MPI_ERRHANDLER_NULL) { struct _errhdl *eh = (struct _errhdl *) (*errhandler); eh->eh_refcount++; } return MPI_SUCCESS; } #undef MPI_File_get_errhandler #define MPI_File_get_errhandler PyMPI_LAMMPI_MPI_File_get_errhandler static int PyMPI_LAMMPI_MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler) { /* check arguments */ if (file != MPI_FILE_NULL) { struct ADIOI_FileD * fh = (struct ADIOI_FileD *) file; if (fh->cookie != ADIOI_FILE_COOKIE) return MPI_ERR_ARG; } if (errhandler == MPI_ERRHANDLER_NULL) return MPI_ERR_ARG; if (errhandler != MPI_ERRORS_RETURN && errhandler != MPI_ERRORS_ARE_FATAL) return MPI_ERR_ARG; /* increment reference counter */ if (errhandler != MPI_ERRHANDLER_NULL ) { struct _errhdl *eh = (struct _errhdl *) errhandler; eh->eh_refcount++; } /* set error handler */ if (file == MPI_FILE_NULL) { MPI_Errhandler tmp = ADIOI_DFLT_ERR_HANDLER; ADIOI_DFLT_ERR_HANDLER = errhandler; errhandler = tmp; } else { struct ADIOI_FileD *fh = (struct ADIOI_FileD *) file; MPI_Errhandler tmp = fh->err_handler; fh->err_handler = errhandler; errhandler = tmp; } /* decrement reference counter */ if (errhandler != MPI_ERRHANDLER_NULL ) { struct _errhdl *eh = (struct _errhdl *) errhandler; eh->eh_refcount--; } return MPI_SUCCESS; } #undef MPI_File_set_errhandler #define MPI_File_set_errhandler PyMPI_LAMMPI_MPI_File_set_errhandler #endif /* ---------------------------------------------------------------- */ #endif /* !PyMPI_COMPAT_LAMMPI_H */ /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/lib-mpi/compat/openmpi.h0000644000175000017500000002216613200562156021227 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_COMPAT_OPENMPI_H #define PyMPI_COMPAT_OPENMPI_H /* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ /* * The hackery below redefines the actuall calls to 'MPI_Init()' and * 'MPI_Init_thread()' in order to preload the main MPI dynamic * library with appropriate flags to 'dlopen()' ensuring global * availability of library symbols. */ #if !defined(OPENMPI_DLOPEN_LIBMPI) && defined(OMPI_MAJOR_VERSION) #if OMPI_MAJOR_VERSION >= 3 && OMPI_MAJOR_VERSION < 10 #define OPENMPI_DLOPEN_LIBMPI 0 #endif #endif #ifndef OPENMPI_DLOPEN_LIBMPI #define OPENMPI_DLOPEN_LIBMPI 1 #endif #if OPENMPI_DLOPEN_LIBMPI #if HAVE_DLOPEN #include "../../dynload.h" /* static void * my_dlopen(const char *name, int mode) { void *handle; static int called = 0; if (!called) { called = 1; #if HAVE_DLFCN_H printf("HAVE_DLFCN_H: yes\n"); #else printf("HAVE_DLFCN_H: no\n"); #endif printf("\n"); printf("RTLD_LAZY: 0x%X\n", RTLD_LAZY ); printf("RTLD_NOW: 0x%X\n", RTLD_NOW ); printf("RTLD_LOCAL: 0x%X\n", RTLD_LOCAL ); printf("RTLD_GLOBAL: 0x%X\n", RTLD_GLOBAL ); #ifdef RTLD_NOLOAD printf("RTLD_NOLOAD: 0x%X\n", RTLD_NOLOAD ); #endif printf("\n"); } handle = dlopen(name, mode); printf("dlopen(\"%s\",0x%X) -> %p\n", name, mode, handle); printf("dlerror() -> %s\n\n", dlerror()); return handle; } #define dlopen my_dlopen */ static void PyMPI_OPENMPI_dlopen_libmpi(void) { void *handle = 0; int mode = RTLD_NOW | RTLD_GLOBAL; #if defined(__APPLE__) /* macOS */ #ifdef RTLD_NOLOAD mode |= RTLD_NOLOAD; #endif #if defined(OMPI_MAJOR_VERSION) #if OMPI_MAJOR_VERSION == 3 if (!handle) handle = dlopen("libmpi.40.dylib", mode); #elif OMPI_MAJOR_VERSION == 2 if (!handle) handle = dlopen("libmpi.20.dylib", mode); #elif OMPI_MAJOR_VERSION == 1 && OMPI_MINOR_VERSION >= 10 if (!handle) handle = dlopen("libmpi.12.dylib", mode); #elif OMPI_MAJOR_VERSION == 1 && OMPI_MINOR_VERSION >= 6 if (!handle) handle = dlopen("libmpi.1.dylib", mode); #elif OMPI_MAJOR_VERSION == 1 if (!handle) handle = dlopen("libmpi.0.dylib", mode); #endif #endif if (!handle) handle = dlopen("libmpi.dylib", mode); #else /* GNU/Linux and others */ #ifdef RTLD_NOLOAD mode |= RTLD_NOLOAD; #endif #if defined(OMPI_MAJOR_VERSION) #if OMPI_MAJOR_VERSION >= 10 /* IBM Spectrum MPI */ if (!handle) handle = dlopen("libmpi_ibm.so.2", mode); if (!handle) handle = dlopen("libmpi_ibm.so.1", mode); if (!handle) handle = dlopen("libmpi_ibm.so", mode); #elif OMPI_MAJOR_VERSION == 3 if (!handle) handle = dlopen("libmpi.so.40", mode); #elif OMPI_MAJOR_VERSION == 2 if (!handle) handle = dlopen("libmpi.so.20", mode); #elif OMPI_MAJOR_VERSION == 1 && OMPI_MINOR_VERSION >= 10 if (!handle) handle = dlopen("libmpi.so.12", mode); #elif OMPI_MAJOR_VERSION == 1 && OMPI_MINOR_VERSION >= 6 if (!handle) handle = dlopen("libmpi.so.1", mode); #elif OMPI_MAJOR_VERSION == 1 if (!handle) handle = dlopen("libmpi.so.0", mode); #endif #endif if (!handle) handle = dlopen("libmpi.so", mode); #endif } static int PyMPI_OPENMPI_MPI_Init(int *argc, char ***argv) { PyMPI_OPENMPI_dlopen_libmpi(); return MPI_Init(argc, argv); } #undef MPI_Init #define MPI_Init PyMPI_OPENMPI_MPI_Init static int PyMPI_OPENMPI_MPI_Init_thread(int *argc, char ***argv, int required, int *provided) { PyMPI_OPENMPI_dlopen_libmpi(); return MPI_Init_thread(argc, argv, required, provided); } #undef MPI_Init_thread #define MPI_Init_thread PyMPI_OPENMPI_MPI_Init_thread #endif /* !HAVE_DLOPEN */ #endif /* !OPENMPI_DLOPEN_LIBMPI */ /* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ #if (defined(OMPI_MAJOR_VERSION) && \ defined(OMPI_MINOR_VERSION) && \ defined(OMPI_RELEASE_VERSION)) #define PyMPI_OPENMPI_VERSION ((OMPI_MAJOR_VERSION * 10000) + \ (OMPI_MINOR_VERSION * 100) + \ (OMPI_RELEASE_VERSION * 1)) #else #define PyMPI_OPENMPI_VERSION 10000 #endif /* ------------------------------------------------------------------------- */ /* * Open MPI < 1.1.3 generates an error when MPI_File_get_errhandler() * is called with the predefined error handlers MPI_ERRORS_RETURN and * MPI_ERRORS_ARE_FATAL. */ #if PyMPI_OPENMPI_VERSION < 10103 static int PyMPI_OPENMPI_Errhandler_free(MPI_Errhandler *errhandler) { if (errhandler && ((*errhandler == MPI_ERRORS_RETURN) || (*errhandler == MPI_ERRORS_ARE_FATAL))) { *errhandler = MPI_ERRHANDLER_NULL; return MPI_SUCCESS; } return MPI_Errhandler_free(errhandler); } #undef MPI_Errhandler_free #define MPI_Errhandler_free PyMPI_OPENMPI_Errhandler_free #endif /* !(PyMPI_OPENMPI_VERSION < 10103) */ /* ------------------------------------------------------------------------- */ /* * Open MPI 1.1 generates an error when MPI_File_get_errhandler() is * called with the MPI_FILE_NULL handle. The code below try to fix * this bug by intercepting the calls to the functions setting and * getting the error handlers for MPI_File's. */ #if PyMPI_OPENMPI_VERSION < 10200 static MPI_Errhandler PyMPI_OPENMPI_FILE_NULL_ERRHANDLER = (MPI_Errhandler)0; static int PyMPI_OPENMPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler) { if (file == MPI_FILE_NULL) { if (PyMPI_OPENMPI_FILE_NULL_ERRHANDLER == (MPI_Errhandler)0) { PyMPI_OPENMPI_FILE_NULL_ERRHANDLER = MPI_ERRORS_RETURN; } *errhandler = PyMPI_OPENMPI_FILE_NULL_ERRHANDLER; return MPI_SUCCESS; } return MPI_File_get_errhandler(file, errhandler); } #undef MPI_File_get_errhandler #define MPI_File_get_errhandler PyMPI_OPENMPI_File_get_errhandler static int PyMPI_OPENMPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler) { int ierr = MPI_File_set_errhandler(file, errhandler); if (ierr != MPI_SUCCESS) return ierr; if (file == MPI_FILE_NULL) { PyMPI_OPENMPI_FILE_NULL_ERRHANDLER = errhandler; } return ierr; } #undef MPI_File_set_errhandler #define MPI_File_set_errhandler PyMPI_OPENMPI_File_set_errhandler #endif /* !(PyMPI_OPENMPI_VERSION < 10200) */ /* ---------------------------------------------------------------- */ #if PyMPI_OPENMPI_VERSION < 10301 static MPI_Fint PyMPI_OPENMPI_File_c2f(MPI_File file) { if (file == MPI_FILE_NULL) return (MPI_Fint)0; return MPI_File_c2f(file); } #define MPI_File_c2f PyMPI_OPENMPI_File_c2f #endif /* !(PyMPI_OPENMPI_VERSION < 10301) */ /* ------------------------------------------------------------------------- */ #if PyMPI_OPENMPI_VERSION < 10402 static int PyMPI_OPENMPI_MPI_Cancel(MPI_Request *request) { if (request && *request == MPI_REQUEST_NULL) { MPI_Comm_call_errhandler(MPI_COMM_WORLD, MPI_ERR_REQUEST); return MPI_ERR_REQUEST; } return MPI_Cancel(request); } #undef MPI_Cancel #define MPI_Cancel PyMPI_OPENMPI_MPI_Cancel static int PyMPI_OPENMPI_MPI_Request_free(MPI_Request *request) { if (request && *request == MPI_REQUEST_NULL) { MPI_Comm_call_errhandler(MPI_COMM_WORLD, MPI_ERR_REQUEST); return MPI_ERR_REQUEST; } return MPI_Request_free(request); } #undef MPI_Request_free #define MPI_Request_free PyMPI_OPENMPI_MPI_Request_free static int PyMPI_OPENMPI_MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler) { if (win == MPI_WIN_NULL) { MPI_Comm_call_errhandler(MPI_COMM_WORLD, MPI_ERR_WIN); return MPI_ERR_WIN; } return MPI_Win_get_errhandler(win, errhandler); } #undef MPI_Win_get_errhandler #define MPI_Win_get_errhandler PyMPI_OPENMPI_MPI_Win_get_errhandler static int PyMPI_OPENMPI_MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler) { if (win == MPI_WIN_NULL) { MPI_Comm_call_errhandler(MPI_COMM_WORLD, MPI_ERR_WIN); return MPI_ERR_WIN; } return MPI_Win_set_errhandler(win, errhandler); } #undef MPI_Win_set_errhandler #define MPI_Win_set_errhandler PyMPI_OPENMPI_MPI_Win_set_errhandler #endif /* !(PyMPI_OPENMPI_VERSION < 10402) */ /* ------------------------------------------------------------------------- */ /* * Open MPI 1.7 tries to set status even in the case of MPI_STATUS_IGNORE. */ #if PyMPI_OPENMPI_VERSION >= 10700 && PyMPI_OPENMPI_VERSION < 10800 static int PyMPI_OPENMPI_MPI_Mrecv(void *buf, int count, MPI_Datatype type, MPI_Message *message, MPI_Status *status) { MPI_Status sts; if (status == MPI_STATUS_IGNORE) status = &sts; return MPI_Mrecv(buf, count, type, message, status); } #undef MPI_Mrecv #define MPI_Mrecv PyMPI_OPENMPI_MPI_Mrecv #endif /* !(PyMPI_OPENMPI_VERSION > 10700) */ /* ------------------------------------------------------------------------- */ #endif /* !PyMPI_COMPAT_OPENMPI_H */ /* Local Variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/lib-mpi/compat/mpich2.h0000644000175000017500000000147112750576064020752 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_COMPAT_MPICH2_H #define PyMPI_COMPAT_MPICH2_H static int PyMPI_MPICH2_MPI_Add_error_class(int *errorclass) { int ierr; char errstr[1] = {0}; ierr = MPI_Add_error_class(errorclass); if (ierr) return ierr; return MPI_Add_error_string(*errorclass,errstr); } #undef MPI_Add_error_class #define MPI_Add_error_class PyMPI_MPICH2_MPI_Add_error_class static int PyMPI_MPICH2_MPI_Add_error_code(int errorclass, int *errorcode) { int ierr; char errstr[1] = {0}; ierr = MPI_Add_error_code(errorclass,errorcode); if (ierr) return ierr; return MPI_Add_error_string(*errorcode,errstr); } #undef MPI_Add_error_code #define MPI_Add_error_code PyMPI_MPICH2_MPI_Add_error_code #if defined(__SICORTEX__) #include "sicortex.h" #endif #endif /* !PyMPI_COMPAT_MPICH2_H */ mpi4py-3.0.3/src/lib-mpi/compat/pcmpi.h0000644000175000017500000000556012750576064020703 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_COMPAT_PCMPI_H #define PyMPI_COMPAT_PCMPI_H /* ---------------------------------------------------------------- */ static int PyMPI_PCMPI_MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status) { MPI_Status sts; if (!status || status == MPI_STATUS_IGNORE || status == MPI_STATUSES_IGNORE) status = &sts; return MPI_Request_get_status(request, flag, status); } #undef MPI_Request_get_status #define MPI_Request_get_status PyMPI_PCMPI_MPI_Request_get_status /* ---------------------------------------------------------------- */ static int PyMPI_PCMPI_MPI_Win_get_attr(MPI_Win win, int keyval, void *attrval, int *flag) { int ierr; ierr = MPI_Win_get_attr(win, keyval, attrval, flag); if (ierr == MPI_SUCCESS && keyval == MPI_WIN_BASE && *flag) *((void **)attrval) = **((void ***)attrval); return ierr; } #undef MPI_Win_get_attr #define MPI_Win_get_attr PyMPI_PCMPI_MPI_Win_get_attr /* ---------------------------------------------------------------- */ #ifndef PCMPI_DLOPEN_LIBMPI #define PCMPI_DLOPEN_LIBMPI 1 #endif #if PCMPI_DLOPEN_LIBMPI #if HAVE_DLOPEN #include "../../dynload.h" static void PyMPI_PCMPI_dlopen_libmpi(void) { void *handle1 = (void *)0; void *handle2 = (void *)0; int mode = RTLD_NOW | RTLD_GLOBAL; #ifdef RTLD_NOLOAD mode |= RTLD_NOLOAD; #endif #if defined(__APPLE__) if (!handle1) handle1 = dlopen("libmpi.2.dylib", mode); if (!handle1) handle1 = dlopen("libmpi.1.dylib", mode); if (!handle1) handle1 = dlopen("libmpi.dylib", mode); if (!handle2) handle2 = dlopen("libmpio.2.dylib", mode); if (!handle2) handle2 = dlopen("libmpio.1.dylib", mode); if (!handle2) handle2 = dlopen("libmpio.dylib", mode); #else if (!handle1) handle1 = dlopen("libmpi.so.2", mode); if (!handle1) handle1 = dlopen("libmpi.so.1", mode); if (!handle1) handle1 = dlopen("libmpi.so", mode); if (!handle2) handle2 = dlopen("libmpio.so.2", mode); if (!handle2) handle2 = dlopen("libmpio.so.1", mode); if (!handle2) handle2 = dlopen("libmpio.so", mode); #endif } static int PyMPI_PCMPI_MPI_Init(int *argc, char ***argv) { PyMPI_PCMPI_dlopen_libmpi(); return MPI_Init(argc, argv); } #undef MPI_Init #define MPI_Init PyMPI_PCMPI_MPI_Init static int PyMPI_PCMPI_MPI_Init_thread(int *argc, char ***argv, int required, int *provided) { PyMPI_PCMPI_dlopen_libmpi(); return MPI_Init_thread(argc, argv, required, provided); } #undef MPI_Init_thread #define MPI_Init_thread PyMPI_PCMPI_MPI_Init_thread #endif /* !HAVE_DLOPEN */ #endif /* !PCMPI_DLOPEN_LIBMPI */ /* ---------------------------------------------------------------- */ #endif /* !PyMPI_COMPAT_PCMPI_H */ mpi4py-3.0.3/src/lib-mpi/compat/mpich1.h0000644000175000017500000001361612750576064020755 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_COMPAT_MPICH1_H #define PyMPI_COMPAT_MPICH1_H /* ---------------------------------------------------------------- */ static int PyMPI_MPICH1_argc = 0; static char *PyMPI_MPICH1_argv[1] = {(char*)0}; static void PyMPI_MPICH1_FixArgs(int **argc, char ****argv) { if (argc[0] && argv[0]) return; argc[0] = (int *) &PyMPI_MPICH1_argc; argv[0] = (char ***) &PyMPI_MPICH1_argv; } static int PyMPI_MPICH1_MPI_Init(int *argc, char ***argv) { PyMPI_MPICH1_FixArgs(&argc, &argv); return MPI_Init(argc, argv); } #undef MPI_Init #define MPI_Init PyMPI_MPICH1_MPI_Init static int PyMPI_MPICH1_MPI_Init_thread(int *argc, char ***argv, int required, int *provided) { PyMPI_MPICH1_FixArgs(&argc, &argv); return MPI_Init_thread(argc, argv, required, provided); } #undef MPI_Init_thread #define MPI_Init_thread PyMPI_MPICH1_MPI_Init_thread /* ---------------------------------------------------------------- */ #undef MPI_SIGNED_CHAR #define MPI_SIGNED_CHAR MPI_CHAR /* ---------------------------------------------------------------- */ static int PyMPI_MPICH1_MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, int count) { if (datatype == MPI_DATATYPE_NULL) return MPI_ERR_TYPE; return MPI_Status_set_elements(status, datatype, count); } #undef MPI_Status_set_elements #define MPI_Status_set_elements PyMPI_MPICH1_MPI_Status_set_elements /* ---------------------------------------------------------------- */ static int PyMPI_MPICH1_MPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status) { MPI_Status dummy; if (status == MPI_STATUS_IGNORE) status = &dummy; return MPI_Sendrecv(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype, source, recvtag, comm, status); } #undef MPI_Sendrecv #define MPI_Sendrecv PyMPI_MPICH1_MPI_Sendrecv static int PyMPI_MPICH1_MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, int dest, int sendtag, int source, int recvtag, MPI_Comm comm, MPI_Status *status) { MPI_Status dummy; if (status == MPI_STATUS_IGNORE) status = &dummy; return MPI_Sendrecv_replace(buf, count, datatype, dest, sendtag, source, recvtag, comm, status); } #undef MPI_Sendrecv_replace #define MPI_Sendrecv_replace PyMPI_MPICH1_MPI_Sendrecv_replace /* ---------------------------------------------------------------- */ #ifndef PyMPI_HAVE_MPI_Win #undef MPI_Win_c2f #define MPI_Win_c2f(win) ((MPI_Fint)0) #undef MPI_Win_f2c #define MPI_Win_f2c(win) MPI_WIN_NULL #endif /* ---------------------------------------------------------------- */ #if defined(__cplusplus) extern "C" { #endif extern void *MPIR_ToPointer(int); #if defined(__cplusplus) } #endif #if defined(ROMIO_VERSION) #if defined(__cplusplus) extern "C" { #endif struct MPIR_Errhandler { unsigned long cookie; MPI_Handler_function *routine; int ref_count; }; #if defined(__cplusplus) } #endif static int PyMPI_MPICH1_MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler) { int ierr = MPI_SUCCESS; ierr = MPI_File_get_errhandler(file, errhandler); if (ierr != MPI_SUCCESS) return ierr; if (errhandler == 0) return ierr; /* just in case */ /* manage reference counting */ if (*errhandler != MPI_ERRHANDLER_NULL) { struct MPIR_Errhandler *eh = (struct MPIR_Errhandler *) MPIR_ToPointer(*errhandler); if (eh) eh->ref_count++; } return MPI_SUCCESS; } static int PyMPI_MPICH1_MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler) { int ierr = MPI_SUCCESS; MPI_Errhandler previous = MPI_ERRHANDLER_NULL; ierr = MPI_File_get_errhandler(file, &previous); if (ierr != MPI_SUCCESS) return ierr; ierr = MPI_File_set_errhandler(file, errhandler); if (ierr != MPI_SUCCESS) return ierr; /* manage reference counting */ if (previous != MPI_ERRHANDLER_NULL) { struct MPIR_Errhandler *eh = (struct MPIR_Errhandler *) MPIR_ToPointer(previous); if (eh) eh->ref_count--; } if (errhandler != MPI_ERRHANDLER_NULL) { struct MPIR_Errhandler *eh = (struct MPIR_Errhandler *) MPIR_ToPointer(errhandler); if (eh) eh->ref_count++; } return MPI_SUCCESS; } #undef MPI_File_get_errhandler #define MPI_File_get_errhandler PyMPI_MPICH1_MPI_File_get_errhandler #undef MPI_File_set_errhandler #define MPI_File_set_errhandler PyMPI_MPICH1_MPI_File_set_errhandler #endif /* !ROMIO_VERSION */ /* ---------------------------------------------------------------- */ #undef MPI_ERR_KEYVAL #define MPI_ERR_KEYVAL MPI_ERR_OTHER #undef MPI_MAX_OBJECT_NAME #define MPI_MAX_OBJECT_NAME MPI_MAX_NAME_STRING /* ---------------------------------------------------------------- */ #endif /* !PyMPI_COMPAT_MPICH1_H */ /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/lib-mpi/config/0000775000175000017500000000000013560002767017372 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/src/lib-mpi/config/mpi-12.h0000644000175000017500000000032612750576064020555 0ustar dalcinldalcinl00000000000000#if defined(MPI_VERSION) #if (MPI_VERSION > 1) || (MPI_VERSION == 1 && MPI_SUBVERSION >= 2) #define PyMPI_HAVE_MPI_VERSION 1 #define PyMPI_HAVE_MPI_SUBVERSION 1 #define PyMPI_HAVE_MPI_Get_version 1 #endif #endif mpi4py-3.0.3/src/lib-mpi/config/mpich3.h0000644000175000017500000000060112777731455020735 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_CONFIG_MPICH3_H #define PyMPI_CONFIG_MPICH3_H #include "mpi-11.h" #include "mpi-12.h" #include "mpi-20.h" #include "mpi-22.h" #include "mpi-30.h" #include "mpi-31.h" /* These types are difficult to implement portably */ #undef PyMPI_HAVE_MPI_REAL2 #undef PyMPI_HAVE_MPI_COMPLEX4 #ifndef ROMIO_VERSION #include "mpich3-io.h" #endif #endif /* !PyMPI_CONFIG_MPICH3_H */ mpi4py-3.0.3/src/lib-mpi/config/mpi-31.h0000644000175000017500000000053412750576064020557 0ustar dalcinldalcinl00000000000000#if defined(MPI_VERSION) #if (MPI_VERSION > 3) || (MPI_VERSION == 3 && MPI_SUBVERSION >= 1) #define PyMPI_HAVE_MPI_Aint_add 1 #define PyMPI_HAVE_MPI_Aint_diff 1 #define PyMPI_HAVE_MPI_File_iread_at_all 1 #define PyMPI_HAVE_MPI_File_iwrite_at_all 1 #define PyMPI_HAVE_MPI_File_iread_all 1 #define PyMPI_HAVE_MPI_File_iwrite_all 1 #endif #endif mpi4py-3.0.3/src/lib-mpi/config/unknown.h0000644000175000017500000000114212750576064021244 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_CONFIG_UNKNOWN_H #define PyMPI_CONFIG_UNKNOWN_H /* ------------------------------------------------------------------------- */ #include "mpi-11.h" #include "mpi-12.h" #include "mpi-20.h" #include "mpi-22.h" #include "mpi-30.h" #include "mpi-31.h" /* ------------------------------------------------------------------------- */ /* These types are difficult to implement portably */ #undef PyMPI_HAVE_MPI_INTEGER16 #undef PyMPI_HAVE_MPI_REAL2 #undef PyMPI_HAVE_MPI_COMPLEX4 /* ------------------------------------------------------------------------- */ #endif /* !PyMPI_CONFIG_UNKNOWN_H */ mpi4py-3.0.3/src/lib-mpi/config/mpi-22.h0000644000175000017500000000233112750576064020554 0ustar dalcinldalcinl00000000000000#if defined(MPI_VERSION) #if (MPI_VERSION > 2) || (MPI_VERSION == 2 && MPI_SUBVERSION >= 2) #define PyMPI_HAVE_MPI_AINT 1 #define PyMPI_HAVE_MPI_OFFSET 1 #define PyMPI_HAVE_MPI_C_BOOL 1 #define PyMPI_HAVE_MPI_INT8_T 1 #define PyMPI_HAVE_MPI_INT16_T 1 #define PyMPI_HAVE_MPI_INT32_T 1 #define PyMPI_HAVE_MPI_INT64_T 1 #define PyMPI_HAVE_MPI_UINT8_T 1 #define PyMPI_HAVE_MPI_UINT16_T 1 #define PyMPI_HAVE_MPI_UINT32_T 1 #define PyMPI_HAVE_MPI_UINT64_T 1 #define PyMPI_HAVE_MPI_C_COMPLEX 1 #define PyMPI_HAVE_MPI_C_FLOAT_COMPLEX 1 #define PyMPI_HAVE_MPI_C_DOUBLE_COMPLEX 1 #define PyMPI_HAVE_MPI_C_LONG_DOUBLE_COMPLEX 1 #define PyMPI_HAVE_MPI_REAL2 1 #define PyMPI_HAVE_MPI_COMPLEX4 1 #define PyMPI_HAVE_MPI_Op_commutative 1 #define PyMPI_HAVE_MPI_Reduce_local 1 #define PyMPI_HAVE_MPI_Reduce_scatter_block 1 #define PyMPI_HAVE_MPI_DIST_GRAPH 1 #define PyMPI_HAVE_MPI_UNWEIGHTED 1 #define PyMPI_HAVE_MPI_Dist_graph_create_adjacent 1 #define PyMPI_HAVE_MPI_Dist_graph_create 1 #define PyMPI_HAVE_MPI_Dist_graph_neighbors_count 1 #define PyMPI_HAVE_MPI_Dist_graph_neighbors 1 #define PyMPI_HAVE_MPI_Comm_errhandler_function 1 #define PyMPI_HAVE_MPI_Win_errhandler_function 1 #define PyMPI_HAVE_MPI_File_errhandler_function 1 #endif #endif mpi4py-3.0.3/src/lib-mpi/config/mpich2-io.h0000644000175000017500000000751513200562156021332 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_CONFIG_MPICH2_IO_H #define PyMPI_CONFIG_MPICH2_IO_H #undef PyMPI_HAVE_MPI_File #undef PyMPI_HAVE_MPI_FILE_NULL #undef PyMPI_HAVE_MPI_MODE_RDONLY #undef PyMPI_HAVE_MPI_MODE_RDWR #undef PyMPI_HAVE_MPI_MODE_WRONLY #undef PyMPI_HAVE_MPI_MODE_CREATE #undef PyMPI_HAVE_MPI_MODE_EXCL #undef PyMPI_HAVE_MPI_MODE_DELETE_ON_CLOSE #undef PyMPI_HAVE_MPI_MODE_UNIQUE_OPEN #undef PyMPI_HAVE_MPI_MODE_APPEND #undef PyMPI_HAVE_MPI_MODE_SEQUENTIAL #undef PyMPI_HAVE_MPI_File_open #undef PyMPI_HAVE_MPI_File_close #undef PyMPI_HAVE_MPI_File_delete #undef PyMPI_HAVE_MPI_File_set_size #undef PyMPI_HAVE_MPI_File_preallocate #undef PyMPI_HAVE_MPI_File_get_size #undef PyMPI_HAVE_MPI_File_get_group #undef PyMPI_HAVE_MPI_File_get_amode #undef PyMPI_HAVE_MPI_File_set_info #undef PyMPI_HAVE_MPI_File_get_info #undef PyMPI_HAVE_MPI_File_get_view #undef PyMPI_HAVE_MPI_File_set_view #undef PyMPI_HAVE_MPI_File_read_at #undef PyMPI_HAVE_MPI_File_read_at_all #undef PyMPI_HAVE_MPI_File_write_at #undef PyMPI_HAVE_MPI_File_write_at_all #undef PyMPI_HAVE_MPI_File_iread_at #undef PyMPI_HAVE_MPI_File_iread_at_all #undef PyMPI_HAVE_MPI_File_iwrite_at #undef PyMPI_HAVE_MPI_File_iwrite_at_all #undef PyMPI_HAVE_MPI_SEEK_SET #undef PyMPI_HAVE_MPI_SEEK_CUR #undef PyMPI_HAVE_MPI_SEEK_END #undef PyMPI_HAVE_MPI_DISPLACEMENT_CURRENT #undef PyMPI_HAVE_MPI_File_seek #undef PyMPI_HAVE_MPI_File_get_position #undef PyMPI_HAVE_MPI_File_get_byte_offset #undef PyMPI_HAVE_MPI_File_read #undef PyMPI_HAVE_MPI_File_read_all #undef PyMPI_HAVE_MPI_File_write #undef PyMPI_HAVE_MPI_File_write_all #undef PyMPI_HAVE_MPI_File_iread #undef PyMPI_HAVE_MPI_File_iread_all #undef PyMPI_HAVE_MPI_File_iwrite #undef PyMPI_HAVE_MPI_File_iwrite_all #undef PyMPI_HAVE_MPI_File_read_shared #undef PyMPI_HAVE_MPI_File_write_shared #undef PyMPI_HAVE_MPI_File_iread_shared #undef PyMPI_HAVE_MPI_File_iwrite_shared #undef PyMPI_HAVE_MPI_File_read_ordered #undef PyMPI_HAVE_MPI_File_write_ordered #undef PyMPI_HAVE_MPI_File_seek_shared #undef PyMPI_HAVE_MPI_File_get_position_shared #undef PyMPI_HAVE_MPI_File_read_at_all_begin #undef PyMPI_HAVE_MPI_File_read_at_all_end #undef PyMPI_HAVE_MPI_File_write_at_all_begin #undef PyMPI_HAVE_MPI_File_write_at_all_end #undef PyMPI_HAVE_MPI_File_read_all_begin #undef PyMPI_HAVE_MPI_File_read_all_end #undef PyMPI_HAVE_MPI_File_write_all_begin #undef PyMPI_HAVE_MPI_File_write_all_end #undef PyMPI_HAVE_MPI_File_read_ordered_begin #undef PyMPI_HAVE_MPI_File_read_ordered_end #undef PyMPI_HAVE_MPI_File_write_ordered_begin #undef PyMPI_HAVE_MPI_File_write_ordered_end #undef PyMPI_HAVE_MPI_File_get_type_extent #undef PyMPI_HAVE_MPI_File_set_atomicity #undef PyMPI_HAVE_MPI_File_get_atomicity #undef PyMPI_HAVE_MPI_File_sync #undef PyMPI_HAVE_MPI_File_get_errhandler #undef PyMPI_HAVE_MPI_File_set_errhandler #undef PyMPI_HAVE_MPI_File_errhandler_fn #undef PyMPI_HAVE_MPI_File_errhandler_function #undef PyMPI_HAVE_MPI_File_create_errhandler #undef PyMPI_HAVE_MPI_File_call_errhandler #undef PyMPI_HAVE_MPI_Datarep_conversion_function #undef PyMPI_HAVE_MPI_Datarep_extent_function #undef PyMPI_HAVE_MPI_CONVERSION_FN_NULL #undef PyMPI_HAVE_MPI_MAX_DATAREP_STRING #undef PyMPI_HAVE_MPI_Register_datarep #undef PyMPI_HAVE_MPI_File_c2f #undef PyMPI_HAVE_MPI_File_f2c #if !defined(MPI_ERR_FILE) #undef PyMPI_HAVE_MPI_ERR_FILE #undef PyMPI_HAVE_MPI_ERR_NOT_SAME #undef PyMPI_HAVE_MPI_ERR_BAD_FILE #undef PyMPI_HAVE_MPI_ERR_NO_SUCH_FILE #undef PyMPI_HAVE_MPI_ERR_FILE_EXISTS #undef PyMPI_HAVE_MPI_ERR_FILE_IN_USE #undef PyMPI_HAVE_MPI_ERR_AMODE #undef PyMPI_HAVE_MPI_ERR_ACCESS #undef PyMPI_HAVE_MPI_ERR_READ_ONLY #undef PyMPI_HAVE_MPI_ERR_NO_SPACE #undef PyMPI_HAVE_MPI_ERR_QUOTA #undef PyMPI_HAVE_MPI_ERR_UNSUPPORTED_DATAREP #undef PyMPI_HAVE_MPI_ERR_UNSUPPORTED_OPERATION #undef PyMPI_HAVE_MPI_ERR_CONVERSION #undef PyMPI_HAVE_MPI_ERR_DUP_DATAREP #undef PyMPI_HAVE_MPI_ERR_IO #endif #endif /* !PyMPI_CONFIG_MPICH2_IO_H */ mpi4py-3.0.3/src/lib-mpi/config/mpi-20.h0000644000175000017500000003155012777730441020557 0ustar dalcinldalcinl00000000000000#if defined(MPI_VERSION) #if (MPI_VERSION >= 2) #define PyMPI_HAVE_MPI_ERR_KEYVAL 1 #define PyMPI_HAVE_MPI_MAX_OBJECT_NAME 1 #define PyMPI_HAVE_MPI_WCHAR 1 #define PyMPI_HAVE_MPI_SIGNED_CHAR 1 #define PyMPI_HAVE_MPI_LONG_LONG 1 #define PyMPI_HAVE_MPI_UNSIGNED_LONG_LONG 1 #define PyMPI_HAVE_MPI_INTEGER1 1 #define PyMPI_HAVE_MPI_INTEGER2 1 #define PyMPI_HAVE_MPI_INTEGER4 1 #define PyMPI_HAVE_MPI_INTEGER8 1 #define PyMPI_HAVE_MPI_INTEGER16 1 #define PyMPI_HAVE_MPI_REAL4 1 #define PyMPI_HAVE_MPI_REAL8 1 #define PyMPI_HAVE_MPI_REAL16 1 #define PyMPI_HAVE_MPI_COMPLEX8 1 #define PyMPI_HAVE_MPI_COMPLEX16 1 #define PyMPI_HAVE_MPI_COMPLEX32 1 #define PyMPI_HAVE_MPI_Type_dup 1 #define PyMPI_HAVE_MPI_Type_create_indexed_block 1 #define PyMPI_HAVE_MPI_ORDER_C 1 #define PyMPI_HAVE_MPI_ORDER_FORTRAN 1 #define PyMPI_HAVE_MPI_Type_create_subarray 1 #define PyMPI_HAVE_MPI_DISTRIBUTE_NONE 1 #define PyMPI_HAVE_MPI_DISTRIBUTE_BLOCK 1 #define PyMPI_HAVE_MPI_DISTRIBUTE_CYCLIC 1 #define PyMPI_HAVE_MPI_DISTRIBUTE_DFLT_DARG 1 #define PyMPI_HAVE_MPI_Type_create_darray 1 #define PyMPI_HAVE_MPI_Get_address 1 #define PyMPI_HAVE_MPI_Type_create_hvector 1 #define PyMPI_HAVE_MPI_Type_create_hindexed 1 #define PyMPI_HAVE_MPI_Type_create_struct 1 #define PyMPI_HAVE_MPI_Type_get_extent 1 #define PyMPI_HAVE_MPI_Type_create_resized 1 #define PyMPI_HAVE_MPI_Type_get_true_extent 1 #define PyMPI_HAVE_MPI_Type_create_f90_integer 1 #define PyMPI_HAVE_MPI_Type_create_f90_real 1 #define PyMPI_HAVE_MPI_Type_create_f90_complex 1 #define PyMPI_HAVE_MPI_TYPECLASS_INTEGER 1 #define PyMPI_HAVE_MPI_TYPECLASS_REAL 1 #define PyMPI_HAVE_MPI_TYPECLASS_COMPLEX 1 #define PyMPI_HAVE_MPI_Type_match_size 1 #define PyMPI_HAVE_MPI_Pack_external 1 #define PyMPI_HAVE_MPI_Unpack_external 1 #define PyMPI_HAVE_MPI_Pack_external_size 1 #define PyMPI_HAVE_MPI_COMBINER_NAMED 1 #define PyMPI_HAVE_MPI_COMBINER_DUP 1 #define PyMPI_HAVE_MPI_COMBINER_CONTIGUOUS 1 #define PyMPI_HAVE_MPI_COMBINER_VECTOR 1 #define PyMPI_HAVE_MPI_COMBINER_HVECTOR_INTEGER 1 #define PyMPI_HAVE_MPI_COMBINER_HVECTOR 1 #define PyMPI_HAVE_MPI_COMBINER_INDEXED 1 #define PyMPI_HAVE_MPI_COMBINER_HINDEXED_INTEGER 1 #define PyMPI_HAVE_MPI_COMBINER_HINDEXED 1 #define PyMPI_HAVE_MPI_COMBINER_INDEXED_BLOCK 1 #define PyMPI_HAVE_MPI_COMBINER_STRUCT_INTEGER 1 #define PyMPI_HAVE_MPI_COMBINER_STRUCT 1 #define PyMPI_HAVE_MPI_COMBINER_SUBARRAY 1 #define PyMPI_HAVE_MPI_COMBINER_DARRAY 1 #define PyMPI_HAVE_MPI_COMBINER_F90_REAL 1 #define PyMPI_HAVE_MPI_COMBINER_F90_COMPLEX 1 #define PyMPI_HAVE_MPI_COMBINER_F90_INTEGER 1 #define PyMPI_HAVE_MPI_COMBINER_RESIZED 1 #define PyMPI_HAVE_MPI_Type_get_envelope 1 #define PyMPI_HAVE_MPI_Type_get_contents 1 #define PyMPI_HAVE_MPI_Type_get_name 1 #define PyMPI_HAVE_MPI_Type_set_name 1 #define PyMPI_HAVE_MPI_Type_get_attr 1 #define PyMPI_HAVE_MPI_Type_set_attr 1 #define PyMPI_HAVE_MPI_Type_delete_attr 1 #define PyMPI_HAVE_MPI_Type_copy_attr_function 1 #define PyMPI_HAVE_MPI_Type_delete_attr_function 1 #define PyMPI_HAVE_MPI_TYPE_NULL_COPY_FN 1 #define PyMPI_HAVE_MPI_TYPE_DUP_FN 1 #define PyMPI_HAVE_MPI_TYPE_NULL_DELETE_FN 1 #define PyMPI_HAVE_MPI_Type_create_keyval 1 #define PyMPI_HAVE_MPI_Type_free_keyval 1 #define PyMPI_HAVE_MPI_STATUS_IGNORE 1 #define PyMPI_HAVE_MPI_STATUSES_IGNORE 1 #define PyMPI_HAVE_MPI_Status_set_elements 1 #define PyMPI_HAVE_MPI_Status_set_cancelled 1 #define PyMPI_HAVE_MPI_Request_get_status 1 #define PyMPI_HAVE_MPI_Grequest_cancel_function 1 #define PyMPI_HAVE_MPI_Grequest_free_function 1 #define PyMPI_HAVE_MPI_Grequest_query_function 1 #define PyMPI_HAVE_MPI_Grequest_start 1 #define PyMPI_HAVE_MPI_Grequest_complete 1 #define PyMPI_HAVE_MPI_ROOT 1 #define PyMPI_HAVE_MPI_IN_PLACE 1 #define PyMPI_HAVE_MPI_Alltoallw 1 #define PyMPI_HAVE_MPI_Exscan 1 #define PyMPI_HAVE_MPI_Comm_get_errhandler 1 #define PyMPI_HAVE_MPI_Comm_set_errhandler 1 #define PyMPI_HAVE_MPI_Comm_errhandler_fn 1 #define PyMPI_HAVE_MPI_Comm_create_errhandler 1 #define PyMPI_HAVE_MPI_Comm_call_errhandler 1 #define PyMPI_HAVE_MPI_Comm_get_name 1 #define PyMPI_HAVE_MPI_Comm_set_name 1 #define PyMPI_HAVE_MPI_Comm_get_attr 1 #define PyMPI_HAVE_MPI_Comm_set_attr 1 #define PyMPI_HAVE_MPI_Comm_delete_attr 1 #define PyMPI_HAVE_MPI_Comm_copy_attr_function 1 #define PyMPI_HAVE_MPI_Comm_delete_attr_function 1 #define PyMPI_HAVE_MPI_COMM_DUP_FN 1 #define PyMPI_HAVE_MPI_COMM_NULL_COPY_FN 1 #define PyMPI_HAVE_MPI_COMM_NULL_DELETE_FN 1 #define PyMPI_HAVE_MPI_Comm_create_keyval 1 #define PyMPI_HAVE_MPI_Comm_free_keyval 1 #define PyMPI_HAVE_MPI_MAX_PORT_NAME 1 #define PyMPI_HAVE_MPI_Open_port 1 #define PyMPI_HAVE_MPI_Close_port 1 #define PyMPI_HAVE_MPI_Publish_name 1 #define PyMPI_HAVE_MPI_Unpublish_name 1 #define PyMPI_HAVE_MPI_Lookup_name 1 #define PyMPI_HAVE_MPI_Comm_accept 1 #define PyMPI_HAVE_MPI_Comm_connect 1 #define PyMPI_HAVE_MPI_Comm_join 1 #define PyMPI_HAVE_MPI_Comm_disconnect 1 #define PyMPI_HAVE_MPI_ARGV_NULL 1 #define PyMPI_HAVE_MPI_ARGVS_NULL 1 #define PyMPI_HAVE_MPI_ERRCODES_IGNORE 1 #define PyMPI_HAVE_MPI_Comm_spawn 1 #define PyMPI_HAVE_MPI_Comm_spawn_multiple 1 #define PyMPI_HAVE_MPI_Comm_get_parent 1 #define PyMPI_HAVE_MPI_UNIVERSE_SIZE 1 #define PyMPI_HAVE_MPI_APPNUM 1 #define PyMPI_HAVE_MPI_ERR_SPAWN 1 #define PyMPI_HAVE_MPI_ERR_PORT 1 #define PyMPI_HAVE_MPI_ERR_SERVICE 1 #define PyMPI_HAVE_MPI_ERR_NAME 1 #define PyMPI_HAVE_MPI_Alloc_mem 1 #define PyMPI_HAVE_MPI_Free_mem 1 #define PyMPI_HAVE_MPI_ERR_NO_MEM 1 #define PyMPI_HAVE_MPI_Info 1 #define PyMPI_HAVE_MPI_INFO_NULL 1 #define PyMPI_HAVE_MPI_Info_free 1 #define PyMPI_HAVE_MPI_Info_create 1 #define PyMPI_HAVE_MPI_Info_dup 1 #define PyMPI_HAVE_MPI_MAX_INFO_KEY 1 #define PyMPI_HAVE_MPI_MAX_INFO_VAL 1 #define PyMPI_HAVE_MPI_Info_get 1 #define PyMPI_HAVE_MPI_Info_set 1 #define PyMPI_HAVE_MPI_Info_delete 1 #define PyMPI_HAVE_MPI_Info_get_nkeys 1 #define PyMPI_HAVE_MPI_Info_get_nthkey 1 #define PyMPI_HAVE_MPI_Info_get_valuelen 1 #define PyMPI_HAVE_MPI_ERR_INFO 1 #define PyMPI_HAVE_MPI_ERR_INFO_KEY 1 #define PyMPI_HAVE_MPI_ERR_INFO_VALUE 1 #define PyMPI_HAVE_MPI_ERR_INFO_NOKEY 1 #define PyMPI_HAVE_MPI_Win 1 #define PyMPI_HAVE_MPI_WIN_NULL 1 #define PyMPI_HAVE_MPI_Win_free 1 #define PyMPI_HAVE_MPI_Win_create 1 #define PyMPI_HAVE_MPI_Win_get_group 1 #define PyMPI_HAVE_MPI_Get 1 #define PyMPI_HAVE_MPI_Put 1 #define PyMPI_HAVE_MPI_REPLACE 1 #define PyMPI_HAVE_MPI_Accumulate 1 #define PyMPI_HAVE_MPI_MODE_NOCHECK 1 #define PyMPI_HAVE_MPI_MODE_NOSTORE 1 #define PyMPI_HAVE_MPI_MODE_NOPUT 1 #define PyMPI_HAVE_MPI_MODE_NOPRECEDE 1 #define PyMPI_HAVE_MPI_MODE_NOSUCCEED 1 #define PyMPI_HAVE_MPI_Win_fence 1 #define PyMPI_HAVE_MPI_Win_post 1 #define PyMPI_HAVE_MPI_Win_start 1 #define PyMPI_HAVE_MPI_Win_complete 1 #define PyMPI_HAVE_MPI_Win_wait 1 #define PyMPI_HAVE_MPI_Win_test 1 #define PyMPI_HAVE_MPI_LOCK_EXCLUSIVE 1 #define PyMPI_HAVE_MPI_LOCK_SHARED 1 #define PyMPI_HAVE_MPI_Win_lock 1 #define PyMPI_HAVE_MPI_Win_unlock 1 #define PyMPI_HAVE_MPI_Win_get_errhandler 1 #define PyMPI_HAVE_MPI_Win_set_errhandler 1 #define PyMPI_HAVE_MPI_Win_errhandler_fn 1 #define PyMPI_HAVE_MPI_Win_create_errhandler 1 #define PyMPI_HAVE_MPI_Win_call_errhandler 1 #define PyMPI_HAVE_MPI_Win_get_name 1 #define PyMPI_HAVE_MPI_Win_set_name 1 #define PyMPI_HAVE_MPI_WIN_BASE 1 #define PyMPI_HAVE_MPI_WIN_SIZE 1 #define PyMPI_HAVE_MPI_WIN_DISP_UNIT 1 #define PyMPI_HAVE_MPI_Win_get_attr 1 #define PyMPI_HAVE_MPI_Win_set_attr 1 #define PyMPI_HAVE_MPI_Win_delete_attr 1 #define PyMPI_HAVE_MPI_Win_copy_attr_function 1 #define PyMPI_HAVE_MPI_Win_delete_attr_function 1 #define PyMPI_HAVE_MPI_WIN_DUP_FN 1 #define PyMPI_HAVE_MPI_WIN_NULL_COPY_FN 1 #define PyMPI_HAVE_MPI_WIN_NULL_DELETE_FN 1 #define PyMPI_HAVE_MPI_Win_create_keyval 1 #define PyMPI_HAVE_MPI_Win_free_keyval 1 #define PyMPI_HAVE_MPI_ERR_WIN 1 #define PyMPI_HAVE_MPI_ERR_BASE 1 #define PyMPI_HAVE_MPI_ERR_SIZE 1 #define PyMPI_HAVE_MPI_ERR_DISP 1 #define PyMPI_HAVE_MPI_ERR_ASSERT 1 #define PyMPI_HAVE_MPI_ERR_LOCKTYPE 1 #define PyMPI_HAVE_MPI_ERR_RMA_CONFLICT 1 #define PyMPI_HAVE_MPI_ERR_RMA_SYNC 1 #define PyMPI_HAVE_MPI_Offset 1 #define PyMPI_HAVE_MPI_File 1 #define PyMPI_HAVE_MPI_FILE_NULL 1 #define PyMPI_HAVE_MPI_MODE_RDONLY 1 #define PyMPI_HAVE_MPI_MODE_RDWR 1 #define PyMPI_HAVE_MPI_MODE_WRONLY 1 #define PyMPI_HAVE_MPI_MODE_CREATE 1 #define PyMPI_HAVE_MPI_MODE_EXCL 1 #define PyMPI_HAVE_MPI_MODE_DELETE_ON_CLOSE 1 #define PyMPI_HAVE_MPI_MODE_UNIQUE_OPEN 1 #define PyMPI_HAVE_MPI_MODE_APPEND 1 #define PyMPI_HAVE_MPI_MODE_SEQUENTIAL 1 #define PyMPI_HAVE_MPI_File_open 1 #define PyMPI_HAVE_MPI_File_close 1 #define PyMPI_HAVE_MPI_File_delete 1 #define PyMPI_HAVE_MPI_File_set_size 1 #define PyMPI_HAVE_MPI_File_preallocate 1 #define PyMPI_HAVE_MPI_File_get_size 1 #define PyMPI_HAVE_MPI_File_get_group 1 #define PyMPI_HAVE_MPI_File_get_amode 1 #define PyMPI_HAVE_MPI_File_set_info 1 #define PyMPI_HAVE_MPI_File_get_info 1 #define PyMPI_HAVE_MPI_MAX_DATAREP_STRING 1 #define PyMPI_HAVE_MPI_File_get_view 1 #define PyMPI_HAVE_MPI_File_set_view 1 #define PyMPI_HAVE_MPI_File_read_at 1 #define PyMPI_HAVE_MPI_File_read_at_all 1 #define PyMPI_HAVE_MPI_File_write_at 1 #define PyMPI_HAVE_MPI_File_write_at_all 1 #define PyMPI_HAVE_MPI_File_iread_at 1 #define PyMPI_HAVE_MPI_File_iwrite_at 1 #define PyMPI_HAVE_MPI_SEEK_SET 1 #define PyMPI_HAVE_MPI_SEEK_CUR 1 #define PyMPI_HAVE_MPI_SEEK_END 1 #define PyMPI_HAVE_MPI_DISPLACEMENT_CURRENT 1 #define PyMPI_HAVE_MPI_File_seek 1 #define PyMPI_HAVE_MPI_File_get_position 1 #define PyMPI_HAVE_MPI_File_get_byte_offset 1 #define PyMPI_HAVE_MPI_File_read 1 #define PyMPI_HAVE_MPI_File_read_all 1 #define PyMPI_HAVE_MPI_File_write 1 #define PyMPI_HAVE_MPI_File_write_all 1 #define PyMPI_HAVE_MPI_File_iread 1 #define PyMPI_HAVE_MPI_File_iwrite 1 #define PyMPI_HAVE_MPI_File_read_shared 1 #define PyMPI_HAVE_MPI_File_write_shared 1 #define PyMPI_HAVE_MPI_File_iread_shared 1 #define PyMPI_HAVE_MPI_File_iwrite_shared 1 #define PyMPI_HAVE_MPI_File_read_ordered 1 #define PyMPI_HAVE_MPI_File_write_ordered 1 #define PyMPI_HAVE_MPI_File_seek_shared 1 #define PyMPI_HAVE_MPI_File_get_position_shared 1 #define PyMPI_HAVE_MPI_File_read_at_all_begin 1 #define PyMPI_HAVE_MPI_File_read_at_all_end 1 #define PyMPI_HAVE_MPI_File_write_at_all_begin 1 #define PyMPI_HAVE_MPI_File_write_at_all_end 1 #define PyMPI_HAVE_MPI_File_read_all_begin 1 #define PyMPI_HAVE_MPI_File_read_all_end 1 #define PyMPI_HAVE_MPI_File_write_all_begin 1 #define PyMPI_HAVE_MPI_File_write_all_end 1 #define PyMPI_HAVE_MPI_File_read_ordered_begin 1 #define PyMPI_HAVE_MPI_File_read_ordered_end 1 #define PyMPI_HAVE_MPI_File_write_ordered_begin 1 #define PyMPI_HAVE_MPI_File_write_ordered_end 1 #define PyMPI_HAVE_MPI_File_get_type_extent 1 #define PyMPI_HAVE_MPI_File_set_atomicity 1 #define PyMPI_HAVE_MPI_File_get_atomicity 1 #define PyMPI_HAVE_MPI_File_sync 1 #define PyMPI_HAVE_MPI_File_get_errhandler 1 #define PyMPI_HAVE_MPI_File_set_errhandler 1 #define PyMPI_HAVE_MPI_File_errhandler_fn 1 #define PyMPI_HAVE_MPI_File_create_errhandler 1 #define PyMPI_HAVE_MPI_File_call_errhandler 1 #define PyMPI_HAVE_MPI_Datarep_conversion_function 1 #define PyMPI_HAVE_MPI_Datarep_extent_function 1 #define PyMPI_HAVE_MPI_CONVERSION_FN_NULL 1 #define PyMPI_HAVE_MPI_MAX_DATAREP_STRING 1 #define PyMPI_HAVE_MPI_Register_datarep 1 #define PyMPI_HAVE_MPI_ERR_FILE 1 #define PyMPI_HAVE_MPI_ERR_NOT_SAME 1 #define PyMPI_HAVE_MPI_ERR_BAD_FILE 1 #define PyMPI_HAVE_MPI_ERR_NO_SUCH_FILE 1 #define PyMPI_HAVE_MPI_ERR_FILE_EXISTS 1 #define PyMPI_HAVE_MPI_ERR_FILE_IN_USE 1 #define PyMPI_HAVE_MPI_ERR_AMODE 1 #define PyMPI_HAVE_MPI_ERR_ACCESS 1 #define PyMPI_HAVE_MPI_ERR_READ_ONLY 1 #define PyMPI_HAVE_MPI_ERR_NO_SPACE 1 #define PyMPI_HAVE_MPI_ERR_QUOTA 1 #define PyMPI_HAVE_MPI_ERR_UNSUPPORTED_DATAREP 1 #define PyMPI_HAVE_MPI_ERR_UNSUPPORTED_OPERATION 1 #define PyMPI_HAVE_MPI_ERR_CONVERSION 1 #define PyMPI_HAVE_MPI_ERR_DUP_DATAREP 1 #define PyMPI_HAVE_MPI_ERR_IO 1 #define PyMPI_HAVE_MPI_LASTUSEDCODE 1 #define PyMPI_HAVE_MPI_Add_error_class 1 #define PyMPI_HAVE_MPI_Add_error_code 1 #define PyMPI_HAVE_MPI_Add_error_string 1 #define PyMPI_HAVE_MPI_THREAD_SINGLE 1 #define PyMPI_HAVE_MPI_THREAD_FUNNELED 1 #define PyMPI_HAVE_MPI_THREAD_SERIALIZED 1 #define PyMPI_HAVE_MPI_THREAD_MULTIPLE 1 #define PyMPI_HAVE_MPI_Init_thread 1 #define PyMPI_HAVE_MPI_Query_thread 1 #define PyMPI_HAVE_MPI_Is_thread_main 1 #define PyMPI_HAVE_MPI_Fint 1 #define PyMPI_HAVE_MPI_F_STATUS_IGNORE 1 #define PyMPI_HAVE_MPI_F_STATUSES_IGNORE 1 #define PyMPI_HAVE_MPI_Status_c2f 1 #define PyMPI_HAVE_MPI_Status_f2c 1 #define PyMPI_HAVE_MPI_Type_c2f 1 #define PyMPI_HAVE_MPI_Request_c2f 1 #define PyMPI_HAVE_MPI_Op_c2f 1 #define PyMPI_HAVE_MPI_Info_c2f 1 #define PyMPI_HAVE_MPI_Group_c2f 1 #define PyMPI_HAVE_MPI_Comm_c2f 1 #define PyMPI_HAVE_MPI_Win_c2f 1 #define PyMPI_HAVE_MPI_File_c2f 1 #define PyMPI_HAVE_MPI_Errhandler_c2f 1 #define PyMPI_HAVE_MPI_Type_f2c 1 #define PyMPI_HAVE_MPI_Request_f2c 1 #define PyMPI_HAVE_MPI_Op_f2c 1 #define PyMPI_HAVE_MPI_Info_f2c 1 #define PyMPI_HAVE_MPI_Group_f2c 1 #define PyMPI_HAVE_MPI_Comm_f2c 1 #define PyMPI_HAVE_MPI_Win_f2c 1 #define PyMPI_HAVE_MPI_File_f2c 1 #define PyMPI_HAVE_MPI_Errhandler_f2c 1 #endif #endif mpi4py-3.0.3/src/lib-mpi/config/mpich3-io.h0000644000175000017500000000751513200562156021333 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_CONFIG_MPICH3_IO_H #define PyMPI_CONFIG_MPICH3_IO_H #undef PyMPI_HAVE_MPI_File #undef PyMPI_HAVE_MPI_FILE_NULL #undef PyMPI_HAVE_MPI_MODE_RDONLY #undef PyMPI_HAVE_MPI_MODE_RDWR #undef PyMPI_HAVE_MPI_MODE_WRONLY #undef PyMPI_HAVE_MPI_MODE_CREATE #undef PyMPI_HAVE_MPI_MODE_EXCL #undef PyMPI_HAVE_MPI_MODE_DELETE_ON_CLOSE #undef PyMPI_HAVE_MPI_MODE_UNIQUE_OPEN #undef PyMPI_HAVE_MPI_MODE_APPEND #undef PyMPI_HAVE_MPI_MODE_SEQUENTIAL #undef PyMPI_HAVE_MPI_File_open #undef PyMPI_HAVE_MPI_File_close #undef PyMPI_HAVE_MPI_File_delete #undef PyMPI_HAVE_MPI_File_set_size #undef PyMPI_HAVE_MPI_File_preallocate #undef PyMPI_HAVE_MPI_File_get_size #undef PyMPI_HAVE_MPI_File_get_group #undef PyMPI_HAVE_MPI_File_get_amode #undef PyMPI_HAVE_MPI_File_set_info #undef PyMPI_HAVE_MPI_File_get_info #undef PyMPI_HAVE_MPI_File_get_view #undef PyMPI_HAVE_MPI_File_set_view #undef PyMPI_HAVE_MPI_File_read_at #undef PyMPI_HAVE_MPI_File_read_at_all #undef PyMPI_HAVE_MPI_File_write_at #undef PyMPI_HAVE_MPI_File_write_at_all #undef PyMPI_HAVE_MPI_File_iread_at #undef PyMPI_HAVE_MPI_File_iread_at_all #undef PyMPI_HAVE_MPI_File_iwrite_at #undef PyMPI_HAVE_MPI_File_iwrite_at_all #undef PyMPI_HAVE_MPI_SEEK_SET #undef PyMPI_HAVE_MPI_SEEK_CUR #undef PyMPI_HAVE_MPI_SEEK_END #undef PyMPI_HAVE_MPI_DISPLACEMENT_CURRENT #undef PyMPI_HAVE_MPI_File_seek #undef PyMPI_HAVE_MPI_File_get_position #undef PyMPI_HAVE_MPI_File_get_byte_offset #undef PyMPI_HAVE_MPI_File_read #undef PyMPI_HAVE_MPI_File_read_all #undef PyMPI_HAVE_MPI_File_write #undef PyMPI_HAVE_MPI_File_write_all #undef PyMPI_HAVE_MPI_File_iread #undef PyMPI_HAVE_MPI_File_iread_all #undef PyMPI_HAVE_MPI_File_iwrite #undef PyMPI_HAVE_MPI_File_iwrite_all #undef PyMPI_HAVE_MPI_File_read_shared #undef PyMPI_HAVE_MPI_File_write_shared #undef PyMPI_HAVE_MPI_File_iread_shared #undef PyMPI_HAVE_MPI_File_iwrite_shared #undef PyMPI_HAVE_MPI_File_read_ordered #undef PyMPI_HAVE_MPI_File_write_ordered #undef PyMPI_HAVE_MPI_File_seek_shared #undef PyMPI_HAVE_MPI_File_get_position_shared #undef PyMPI_HAVE_MPI_File_read_at_all_begin #undef PyMPI_HAVE_MPI_File_read_at_all_end #undef PyMPI_HAVE_MPI_File_write_at_all_begin #undef PyMPI_HAVE_MPI_File_write_at_all_end #undef PyMPI_HAVE_MPI_File_read_all_begin #undef PyMPI_HAVE_MPI_File_read_all_end #undef PyMPI_HAVE_MPI_File_write_all_begin #undef PyMPI_HAVE_MPI_File_write_all_end #undef PyMPI_HAVE_MPI_File_read_ordered_begin #undef PyMPI_HAVE_MPI_File_read_ordered_end #undef PyMPI_HAVE_MPI_File_write_ordered_begin #undef PyMPI_HAVE_MPI_File_write_ordered_end #undef PyMPI_HAVE_MPI_File_get_type_extent #undef PyMPI_HAVE_MPI_File_set_atomicity #undef PyMPI_HAVE_MPI_File_get_atomicity #undef PyMPI_HAVE_MPI_File_sync #undef PyMPI_HAVE_MPI_File_get_errhandler #undef PyMPI_HAVE_MPI_File_set_errhandler #undef PyMPI_HAVE_MPI_File_errhandler_fn #undef PyMPI_HAVE_MPI_File_errhandler_function #undef PyMPI_HAVE_MPI_File_create_errhandler #undef PyMPI_HAVE_MPI_File_call_errhandler #undef PyMPI_HAVE_MPI_Datarep_conversion_function #undef PyMPI_HAVE_MPI_Datarep_extent_function #undef PyMPI_HAVE_MPI_CONVERSION_FN_NULL #undef PyMPI_HAVE_MPI_MAX_DATAREP_STRING #undef PyMPI_HAVE_MPI_Register_datarep #undef PyMPI_HAVE_MPI_File_c2f #undef PyMPI_HAVE_MPI_File_f2c #if !defined(MPI_ERR_FILE) #undef PyMPI_HAVE_MPI_ERR_FILE #undef PyMPI_HAVE_MPI_ERR_NOT_SAME #undef PyMPI_HAVE_MPI_ERR_BAD_FILE #undef PyMPI_HAVE_MPI_ERR_NO_SUCH_FILE #undef PyMPI_HAVE_MPI_ERR_FILE_EXISTS #undef PyMPI_HAVE_MPI_ERR_FILE_IN_USE #undef PyMPI_HAVE_MPI_ERR_AMODE #undef PyMPI_HAVE_MPI_ERR_ACCESS #undef PyMPI_HAVE_MPI_ERR_READ_ONLY #undef PyMPI_HAVE_MPI_ERR_NO_SPACE #undef PyMPI_HAVE_MPI_ERR_QUOTA #undef PyMPI_HAVE_MPI_ERR_UNSUPPORTED_DATAREP #undef PyMPI_HAVE_MPI_ERR_UNSUPPORTED_OPERATION #undef PyMPI_HAVE_MPI_ERR_CONVERSION #undef PyMPI_HAVE_MPI_ERR_DUP_DATAREP #undef PyMPI_HAVE_MPI_ERR_IO #endif #endif /* !PyMPI_CONFIG_MPICH3_IO_H */ mpi4py-3.0.3/src/lib-mpi/config/msmpi.h0000664000175000017500000000775013426006675020704 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_CONFIG_MSMPI_H #define PyMPI_CONFIG_MSMPI_H #include "mpi-11.h" #include "mpi-12.h" #include "mpi-20.h" #include "mpi-22.h" #include "mpi-30.h" #include "mpi-31.h" #if MSMPI_VER >= 0x402 #define PyMPI_HAVE_MPI_AINT 1 #define PyMPI_HAVE_MPI_OFFSET 1 #define PyMPI_HAVE_MPI_C_BOOL 1 #define PyMPI_HAVE_MPI_INT8_T 1 #define PyMPI_HAVE_MPI_INT16_T 1 #define PyMPI_HAVE_MPI_INT32_T 1 #define PyMPI_HAVE_MPI_INT64_T 1 #define PyMPI_HAVE_MPI_UINT8_T 1 #define PyMPI_HAVE_MPI_UINT16_T 1 #define PyMPI_HAVE_MPI_UINT32_T 1 #define PyMPI_HAVE_MPI_UINT64_T 1 #define PyMPI_HAVE_MPI_C_COMPLEX 1 #define PyMPI_HAVE_MPI_C_FLOAT_COMPLEX 1 #define PyMPI_HAVE_MPI_C_DOUBLE_COMPLEX 1 #define PyMPI_HAVE_MPI_C_LONG_DOUBLE_COMPLEX 1 #define PyMPI_HAVE_MPI_REAL2 1 #define PyMPI_HAVE_MPI_COMPLEX4 1 #define PyMPI_HAVE_MPI_Reduce_local 1 #endif #if MSMPI_VER >= 0x500 #define PyMPI_HAVE_MPI_COMM_TYPE_SHARED 1 #define PyMPI_HAVE_MPI_Comm_split_type 1 #define PyMPI_HAVE_MPI_Win_allocate_shared 1 #define PyMPI_HAVE_MPI_Win_shared_query 1 #define PyMPI_HAVE_MPI_MAX_LIBRARY_VERSION_STRING 1 #define PyMPI_HAVE_MPI_Get_library_version 1 #endif #if MSMPI_VER >= 0x600 #define PyMPI_HAVE_MPI_Count 1 #define PyMPI_HAVE_MPI_COUNT 1 #define PyMPI_HAVE_MPI_Type_create_hindexed_block 1 #define PyMPI_HAVE_MPI_COMBINER_HINDEXED_BLOCK 1 #define PyMPI_HAVE_MPI_Type_size_x 1 #define PyMPI_HAVE_MPI_Type_get_extent_x 1 #define PyMPI_HAVE_MPI_Type_get_true_extent_x 1 #define PyMPI_HAVE_MPI_Get_elements_x 1 #define PyMPI_HAVE_MPI_Status_set_elements_x 1 #define PyMPI_HAVE_MPI_Message 1 #define PyMPI_HAVE_MPI_MESSAGE_NULL 1 #define PyMPI_HAVE_MPI_MESSAGE_NO_PROC 1 #define PyMPI_HAVE_MPI_Mprobe 1 #define PyMPI_HAVE_MPI_Improbe 1 #define PyMPI_HAVE_MPI_Mrecv 1 #define PyMPI_HAVE_MPI_Imrecv 1 #define PyMPI_HAVE_MPI_Message_c2f 1 #define PyMPI_HAVE_MPI_Message_f2c 1 #define PyMPI_HAVE_MPI_Op_commutative 1 #define PyMPI_HAVE_MPI_DIST_GRAPH 1 #define PyMPI_HAVE_MPI_UNWEIGHTED 1 #define PyMPI_HAVE_MPI_WEIGHTS_EMPTY 1 #define PyMPI_HAVE_MPI_Dist_graph_create_adjacent 1 #define PyMPI_HAVE_MPI_Dist_graph_create 1 #define PyMPI_HAVE_MPI_Dist_graph_neighbors_count 1 #define PyMPI_HAVE_MPI_Dist_graph_neighbors 1 #define PyMPI_HAVE_MPI_Ibarrier 1 #define PyMPI_HAVE_MPI_Ibcast 1 #define PyMPI_HAVE_MPI_Igather 1 #define PyMPI_HAVE_MPI_Ireduce 1 #endif #if MSMPI_VER >= 0x700 #define PyMPI_HAVE_MPI_Iallgather 1 #define PyMPI_HAVE_MPI_Iallreduce 1 #define PyMPI_HAVE_MPI_Igatherv 1 #define PyMPI_HAVE_MPI_Iscatter 1 #define PyMPI_HAVE_MPI_Iscatterv 1 #endif #if MSMPI_VER >= 0x800 #define PyMPI_HAVE_MPI_Reduce_scatter_block 1 #define PyMPI_HAVE_MPI_Iallgatherv 1 #define PyMPI_HAVE_MPI_Ialltoall 1 #define PyMPI_HAVE_MPI_Ialltoallv 1 #define PyMPI_HAVE_MPI_Ialltoallw 1 #define PyMPI_HAVE_MPI_Iallreduce 1 #define PyMPI_HAVE_MPI_Ireduce_scatter 1 #define PyMPI_HAVE_MPI_Ireduce_scatter_block 1 #define PyMPI_HAVE_MPI_Iscan 1 #define PyMPI_HAVE_MPI_Iexscan 1 #endif #if MSMPI_VER >= 0x900 #define PyMPI_HAVE_MPI_NO_OP 1 #define PyMPI_HAVE_MPI_Win_allocate 1 #define PyMPI_HAVE_MPI_Win_create_dynamic 1 #define PyMPI_HAVE_MPI_Win_attach 1 #define PyMPI_HAVE_MPI_Win_detach 1 #define PyMPI_HAVE_MPI_Rget 1 #define PyMPI_HAVE_MPI_Rput 1 #define PyMPI_HAVE_MPI_Raccumulate 1 #define PyMPI_HAVE_MPI_Win_flush 1 #define PyMPI_HAVE_MPI_WIN_CREATE_FLAVOR 1 #define PyMPI_HAVE_MPI_WIN_MODEL 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_CREATE 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_ALLOCATE 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_DYNAMIC 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_SHARED 1 #define PyMPI_HAVE_MPI_WIN_SEPARATE 1 #define PyMPI_HAVE_MPI_WIN_UNIFIED 1 #endif #if MSMPI_VER >= 0x1000 #define PyMPI_HAVE_MPI_Get_accumulate #define PyMPI_HAVE_MPI_Rget_accumulate #define PyMPI_HAVE_MPI_Fetch_and_op #define PyMPI_HAVE_MPI_Compare_and_swap #define PyMPI_HAVE_MPI_Win_lock_all #define PyMPI_HAVE_MPI_Win_unlock_all #define PyMPI_HAVE_MPI_Win_flush_all #define PyMPI_HAVE_MPI_Win_flush_local #define PyMPI_HAVE_MPI_Win_flush_local_all #define PyMPI_HAVE_MPI_Win_sync #endif #endif /* !PyMPI_CONFIG_MSMPI_H */ mpi4py-3.0.3/src/lib-mpi/config/openmpi.h0000664000175000017500000000753713477641753021241 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_CONFIG_OPENMPI_H #define PyMPI_CONFIG_OPENMPI_H #include "mpi-11.h" #include "mpi-12.h" #include "mpi-20.h" #include "mpi-22.h" #include "mpi-30.h" #include "mpi-31.h" #ifndef OMPI_HAVE_FORTRAN_LOGICAL1 #define OMPI_HAVE_FORTRAN_LOGICAL1 0 #endif #ifndef OMPI_HAVE_FORTRAN_LOGICAL2 #define OMPI_HAVE_FORTRAN_LOGICAL2 0 #endif #ifndef OMPI_HAVE_FORTRAN_LOGICAL4 #define OMPI_HAVE_FORTRAN_LOGICAL4 0 #endif #ifndef OMPI_HAVE_FORTRAN_LOGICAL8 #define OMPI_HAVE_FORTRAN_LOGICAL8 0 #endif #if OMPI_HAVE_FORTRAN_LOGICAL1 #define PyMPI_HAVE_MPI_LOGICAL1 1 #endif #if OMPI_HAVE_FORTRAN_LOGICAL2 #define PyMPI_HAVE_MPI_LOGICAL2 1 #endif #if OMPI_HAVE_FORTRAN_LOGICAL4 #define PyMPI_HAVE_MPI_LOGICAL4 1 #endif #if OMPI_HAVE_FORTRAN_LOGICAL8 #define PyMPI_HAVE_MPI_LOGICAL8 1 #endif #if !OMPI_HAVE_FORTRAN_INTEGER1 #undef PyMPI_HAVE_MPI_INTEGER1 #endif #if !OMPI_HAVE_FORTRAN_INTEGER2 #undef PyMPI_HAVE_MPI_INTEGER2 #endif #if !OMPI_HAVE_FORTRAN_INTEGER4 #undef PyMPI_HAVE_MPI_INTEGER4 #endif #if !OMPI_HAVE_FORTRAN_INTEGER8 #undef PyMPI_HAVE_MPI_INTEGER8 #endif #if !OMPI_HAVE_FORTRAN_INTEGER16 #undef PyMPI_HAVE_MPI_INTEGER16 #endif #if !OMPI_HAVE_FORTRAN_REAL2 #undef PyMPI_HAVE_MPI_REAL2 #undef PyMPI_HAVE_MPI_COMPLEX4 #endif #if !OMPI_HAVE_FORTRAN_REAL4 #undef PyMPI_HAVE_MPI_REAL4 #undef PyMPI_HAVE_MPI_COMPLEX8 #endif #if !OMPI_HAVE_FORTRAN_REAL8 #undef PyMPI_HAVE_MPI_REAL8 #undef PyMPI_HAVE_MPI_COMPLEX16 #endif #if !OMPI_HAVE_FORTRAN_REAL16 #undef PyMPI_HAVE_MPI_REAL16 #undef PyMPI_HAVE_MPI_COMPLEX32 #endif #ifdef OMPI_PROVIDE_MPI_FILE_INTERFACE #if OMPI_PROVIDE_MPI_FILE_INTERFACE == 0 #include "openmpi-io.h" #endif #endif #if (defined(OMPI_MAJOR_VERSION) && \ defined(OMPI_MINOR_VERSION) && \ defined(OMPI_RELEASE_VERSION)) #define OMPI_NUMVERSION (OMPI_MAJOR_VERSION*10000 + \ OMPI_MINOR_VERSION*100 + \ OMPI_RELEASE_VERSION) #else #define OMPI_NUMVERSION (10100) #endif #if MPI_VERSION < 3 #if OMPI_NUMVERSION >= 10700 #define PyMPI_HAVE_MPI_Message 1 #define PyMPI_HAVE_MPI_MESSAGE_NULL 1 #define PyMPI_HAVE_MPI_MESSAGE_NO_PROC 1 #define PyMPI_HAVE_MPI_Message_c2f 1 #define PyMPI_HAVE_MPI_Message_f2c 1 #define PyMPI_HAVE_MPI_Mprobe 1 #define PyMPI_HAVE_MPI_Improbe 1 #define PyMPI_HAVE_MPI_Mrecv 1 #define PyMPI_HAVE_MPI_Imrecv 1 #define PyMPI_HAVE_MPI_Ibarrier 1 #define PyMPI_HAVE_MPI_Ibcast 1 #define PyMPI_HAVE_MPI_Igather 1 #define PyMPI_HAVE_MPI_Igatherv 1 #define PyMPI_HAVE_MPI_Iscatter 1 #define PyMPI_HAVE_MPI_Iscatterv 1 #define PyMPI_HAVE_MPI_Iallgather 1 #define PyMPI_HAVE_MPI_Iallgatherv 1 #define PyMPI_HAVE_MPI_Ialltoall 1 #define PyMPI_HAVE_MPI_Ialltoallv 1 #define PyMPI_HAVE_MPI_Ialltoallw 1 #define PyMPI_HAVE_MPI_Ireduce 1 #define PyMPI_HAVE_MPI_Iallreduce 1 #define PyMPI_HAVE_MPI_Ireduce_scatter_block 1 #define PyMPI_HAVE_MPI_Ireduce_scatter 1 #define PyMPI_HAVE_MPI_Iscan 1 #define PyMPI_HAVE_MPI_Iexscan 1 #define PyMPI_HAVE_MPI_MAX_LIBRARY_VERSION_STRING 1 #define PyMPI_HAVE_MPI_Get_library_version 1 #endif /* OMPI >= 1.7.0 */ #if OMPI_NUMVERSION >= 10704 #define PyMPI_HAVE_MPI_Neighbor_allgather 1 #define PyMPI_HAVE_MPI_Neighbor_allgatherv 1 #define PyMPI_HAVE_MPI_Neighbor_alltoall 1 #define PyMPI_HAVE_MPI_Neighbor_alltoallv 1 #define PyMPI_HAVE_MPI_Neighbor_alltoallw 1 #define PyMPI_HAVE_MPI_Ineighbor_allgather 1 #define PyMPI_HAVE_MPI_Ineighbor_allgatherv 1 #define PyMPI_HAVE_MPI_Ineighbor_alltoall 1 #define PyMPI_HAVE_MPI_Ineighbor_alltoallv 1 #define PyMPI_HAVE_MPI_Ineighbor_alltoallw 1 #endif /* OMPI >= 1.7.4 */ #endif #if MPI_VERSION == 3 #if OMPI_NUMVERSION <= 10705 #undef PyMPI_HAVE_MPI_Comm_set_info #undef PyMPI_HAVE_MPI_Comm_get_info #undef PyMPI_HAVE_MPI_WEIGHTS_EMPTY #undef PyMPI_HAVE_MPI_ERR_RMA_SHARED #endif /* OMPI <= 1.7.5 */ #endif #if OMPI_NUMVERSION >= 40000 #undef PyMPI_HAVE_MPI_LB #undef PyMPI_HAVE_MPI_UB #endif /* OMPI >= 4.0.0 */ #endif /* !PyMPI_CONFIG_OPENMPI_H */ mpi4py-3.0.3/src/lib-mpi/config/openmpi-io.h0000644000175000017500000000752012750576064021627 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_CONFIG_OPENMPI_IO_H #define PyMPI_CONFIG_OPENMPI_IO_H #undef PyMPI_HAVE_MPI_File #undef PyMPI_HAVE_MPI_FILE_NULL #undef PyMPI_HAVE_MPI_MODE_RDONLY #undef PyMPI_HAVE_MPI_MODE_RDWR #undef PyMPI_HAVE_MPI_MODE_WRONLY #undef PyMPI_HAVE_MPI_MODE_CREATE #undef PyMPI_HAVE_MPI_MODE_EXCL #undef PyMPI_HAVE_MPI_MODE_DELETE_ON_CLOSE #undef PyMPI_HAVE_MPI_MODE_UNIQUE_OPEN #undef PyMPI_HAVE_MPI_MODE_APPEND #undef PyMPI_HAVE_MPI_MODE_SEQUENTIAL #undef PyMPI_HAVE_MPI_File_open #undef PyMPI_HAVE_MPI_File_close #undef PyMPI_HAVE_MPI_File_delete #undef PyMPI_HAVE_MPI_File_set_size #undef PyMPI_HAVE_MPI_File_preallocate #undef PyMPI_HAVE_MPI_File_get_size #undef PyMPI_HAVE_MPI_File_get_group #undef PyMPI_HAVE_MPI_File_get_amode #undef PyMPI_HAVE_MPI_File_set_info #undef PyMPI_HAVE_MPI_File_get_info #undef PyMPI_HAVE_MPI_File_get_view #undef PyMPI_HAVE_MPI_File_set_view #undef PyMPI_HAVE_MPI_File_read_at #undef PyMPI_HAVE_MPI_File_read_at_all #undef PyMPI_HAVE_MPI_File_write_at #undef PyMPI_HAVE_MPI_File_write_at_all #undef PyMPI_HAVE_MPI_File_iread_at #undef PyMPI_HAVE_MPI_File_iread_at_all #undef PyMPI_HAVE_MPI_File_iwrite_at #undef PyMPI_HAVE_MPI_File_iwrite_at_all #undef PyMPI_HAVE_MPI_SEEK_SET #undef PyMPI_HAVE_MPI_SEEK_CUR #undef PyMPI_HAVE_MPI_SEEK_END #undef PyMPI_HAVE_MPI_DISPLACEMENT_CURRENT #undef PyMPI_HAVE_MPI_File_seek #undef PyMPI_HAVE_MPI_File_get_position #undef PyMPI_HAVE_MPI_File_get_byte_offset #undef PyMPI_HAVE_MPI_File_read #undef PyMPI_HAVE_MPI_File_read_all #undef PyMPI_HAVE_MPI_File_write #undef PyMPI_HAVE_MPI_File_write_all #undef PyMPI_HAVE_MPI_File_iread #undef PyMPI_HAVE_MPI_File_iread_all #undef PyMPI_HAVE_MPI_File_iwrite #undef PyMPI_HAVE_MPI_File_iwrite_all #undef PyMPI_HAVE_MPI_File_read_shared #undef PyMPI_HAVE_MPI_File_write_shared #undef PyMPI_HAVE_MPI_File_iread_shared #undef PyMPI_HAVE_MPI_File_iwrite_shared #undef PyMPI_HAVE_MPI_File_read_ordered #undef PyMPI_HAVE_MPI_File_write_ordered #undef PyMPI_HAVE_MPI_File_seek_shared #undef PyMPI_HAVE_MPI_File_get_position_shared #undef PyMPI_HAVE_MPI_File_read_at_all_begin #undef PyMPI_HAVE_MPI_File_read_at_all_end #undef PyMPI_HAVE_MPI_File_write_at_all_begin #undef PyMPI_HAVE_MPI_File_write_at_all_end #undef PyMPI_HAVE_MPI_File_read_all_begin #undef PyMPI_HAVE_MPI_File_read_all_end #undef PyMPI_HAVE_MPI_File_write_all_begin #undef PyMPI_HAVE_MPI_File_write_all_end #undef PyMPI_HAVE_MPI_File_read_ordered_begin #undef PyMPI_HAVE_MPI_File_read_ordered_end #undef PyMPI_HAVE_MPI_File_write_ordered_begin #undef PyMPI_HAVE_MPI_File_write_ordered_end #undef PyMPI_HAVE_MPI_File_get_type_extent #undef PyMPI_HAVE_MPI_File_set_atomicity #undef PyMPI_HAVE_MPI_File_get_atomicity #undef PyMPI_HAVE_MPI_File_sync #undef PyMPI_HAVE_MPI_File_get_errhandler #undef PyMPI_HAVE_MPI_File_set_errhandler #undef PyMPI_HAVE_MPI_File_errhandler_fn #undef PyMPI_HAVE_MPI_File_errhandler_function #undef PyMPI_HAVE_MPI_File_create_errhandler #undef PyMPI_HAVE_MPI_File_call_errhandler #undef PyMPI_HAVE_MPI_Datarep_conversion_function #undef PyMPI_HAVE_MPI_Datarep_extent_function #undef PyMPI_HAVE_MPI_CONVERSION_FN_NULL #undef PyMPI_HAVE_MPI_MAX_DATAREP_STRING #undef PyMPI_HAVE_MPI_Register_datarep #undef PyMPI_HAVE_MPI_File_c2f #undef PyMPI_HAVE_MPI_File_f2c #if !defined(MPI_ERR_FILE) #undef PyMPI_HAVE_MPI_ERR_FILE #undef PyMPI_HAVE_MPI_ERR_NOT_SAME #undef PyMPI_HAVE_MPI_ERR_BAD_FILE #undef PyMPI_HAVE_MPI_ERR_NO_SUCH_FILE #undef PyMPI_HAVE_MPI_ERR_FILE_EXISTS #undef PyMPI_HAVE_MPI_ERR_FILE_IN_USE #undef PyMPI_HAVE_MPI_ERR_AMODE #undef PyMPI_HAVE_MPI_ERR_ACCESS #undef PyMPI_HAVE_MPI_ERR_READ_ONLY #undef PyMPI_HAVE_MPI_ERR_NO_SPACE #undef PyMPI_HAVE_MPI_ERR_QUOTA #undef PyMPI_HAVE_MPI_ERR_UNSUPPORTED_DATAREP #undef PyMPI_HAVE_MPI_ERR_UNSUPPORTED_OPERATION #undef PyMPI_HAVE_MPI_ERR_CONVERSION #undef PyMPI_HAVE_MPI_ERR_DUP_DATAREP #undef PyMPI_HAVE_MPI_ERR_IO #endif #endif /* !PyMPI_CONFIG_OPENMPI_IO_H */ mpi4py-3.0.3/src/lib-mpi/config/mpich2.h0000644000175000017500000002155112750576064020735 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_CONFIG_MPICH2_H #define PyMPI_CONFIG_MPICH2_H #include "mpi-11.h" #include "mpi-12.h" #include "mpi-20.h" #include "mpi-22.h" #include "mpi-30.h" #include "mpi-31.h" /* These types are difficult to implement portably */ #undef PyMPI_HAVE_MPI_REAL2 #undef PyMPI_HAVE_MPI_COMPLEX4 #if defined(MPI_UNWEIGHTED) && (MPICH2_NUMVERSION < 10300000) #undef MPI_UNWEIGHTED #define MPI_UNWEIGHTED ((int *)0) #endif /* MPICH2 < 1.3.0 */ #if !defined(MPICH2_NUMVERSION) || (MPICH2_NUMVERSION < 10100000) #undef PyMPI_HAVE_MPI_Type_create_f90_integer #undef PyMPI_HAVE_MPI_Type_create_f90_real #undef PyMPI_HAVE_MPI_Type_create_f90_complex #endif /* MPICH2 < 1.1.0 */ #ifndef ROMIO_VERSION #include "mpich2-io.h" #endif #if MPI_VERSION < 3 && defined(MPICH2_NUMVERSION) #if MPICH2_NUMVERSION >= 10500000 && \ MPICH2_NUMVERSION < 20000000 /* #define PyMPI_HAVE_MPI_Count 1 #define PyMPI_HAVE_MPI_COUNT 1 #define PyMPI_HAVE_MPI_Type_size_x 1 #define PyMPI_HAVE_MPI_Type_get_extent_x 1 #define PyMPI_HAVE_MPI_Type_get_true_extent_x 1 #define PyMPI_HAVE_MPI_Get_elements_x 1 #define PyMPI_HAVE_MPI_Status_set_elements_x 1 #define MPI_Count MPIX_Count #define MPI_COUNT MPIX_COUNT #define MPI_Type_size_x MPIX_Type_size_x #define MPI_Type_get_extent_x MPIX_Type_get_extent_x #define MPI_Type_get_true_extent_x MPIX_Type_get_true_extent_x #define MPI_Get_elements_x MPIX_Get_elements_x #define MPI_Status_set_elements_x MPIX_Status_set_elements_x */ #define PyMPI_HAVE_MPI_COMBINER_HINDEXED_BLOCK 1 #define PyMPI_HAVE_MPI_Type_create_hindexed_block 1 #define MPI_COMBINER_HINDEXED_BLOCK MPIX_COMBINER_HINDEXED_BLOCK #define MPI_Type_create_hindexed_block MPIX_Type_create_hindexed_block #define PyMPI_HAVE_MPI_NO_OP 1 #define MPI_NO_OP MPIX_NO_OP #define PyMPI_HAVE_MPI_Message 1 #define PyMPI_HAVE_MPI_MESSAGE_NULL 1 #define PyMPI_HAVE_MPI_MESSAGE_NO_PROC 1 #define PyMPI_HAVE_MPI_Message_c2f 1 #define PyMPI_HAVE_MPI_Message_f2c 1 #define PyMPI_HAVE_MPI_Mprobe 1 #define PyMPI_HAVE_MPI_Improbe 1 #define PyMPI_HAVE_MPI_Mrecv 1 #define PyMPI_HAVE_MPI_Imrecv 1 #define MPI_Message MPIX_Message #define MPI_MESSAGE_NULL MPIX_MESSAGE_NULL #define MPI_MESSAGE_NO_PROC MPIX_MESSAGE_NO_PROC #define MPI_Message_c2f MPIX_Message_c2f #define MPI_Message_f2c MPIX_Message_f2c #define MPI_Mprobe MPIX_Mprobe #define MPI_Improbe MPIX_Improbe #define MPI_Mrecv MPIX_Mrecv #define MPI_Imrecv MPIX_Imrecv #define PyMPI_HAVE_MPI_Ibarrier 1 #define PyMPI_HAVE_MPI_Ibcast 1 #define PyMPI_HAVE_MPI_Igather 1 #define PyMPI_HAVE_MPI_Igatherv 1 #define PyMPI_HAVE_MPI_Iscatter 1 #define PyMPI_HAVE_MPI_Iscatterv 1 #define PyMPI_HAVE_MPI_Iallgather 1 #define PyMPI_HAVE_MPI_Iallgatherv 1 #define PyMPI_HAVE_MPI_Ialltoall 1 #define PyMPI_HAVE_MPI_Ialltoallv 1 #define PyMPI_HAVE_MPI_Ialltoallw 1 #define PyMPI_HAVE_MPI_Ireduce 1 #define PyMPI_HAVE_MPI_Iallreduce 1 #define PyMPI_HAVE_MPI_Ireduce_scatter_block 1 #define PyMPI_HAVE_MPI_Ireduce_scatter 1 #define PyMPI_HAVE_MPI_Iscan 1 #define PyMPI_HAVE_MPI_Iexscan 1 #define MPI_Ibarrier MPIX_Ibarrier #define MPI_Ibcast MPIX_Ibcast #define MPI_Igather MPIX_Igather #define MPI_Igatherv MPIX_Igatherv #define MPI_Iscatter MPIX_Iscatter #define MPI_Iscatterv MPIX_Iscatterv #define MPI_Iallgather MPIX_Iallgather #define MPI_Iallgatherv MPIX_Iallgatherv #define MPI_Ialltoall MPIX_Ialltoall #define MPI_Ialltoallv MPIX_Ialltoallv #define MPI_Ialltoallw MPIX_Ialltoallw #define MPI_Ireduce MPIX_Ireduce #define MPI_Iallreduce MPIX_Iallreduce #define MPI_Ireduce_scatter_block MPIX_Ireduce_scatter_block #define MPI_Ireduce_scatter MPIX_Ireduce_scatter #define MPI_Iscan MPIX_Iscan #define MPI_Iexscan MPIX_Iexscan #define PyMPI_HAVE_MPI_Neighbor_allgather 1 #define PyMPI_HAVE_MPI_Neighbor_allgatherv 1 #define PyMPI_HAVE_MPI_Neighbor_alltoall 1 #define PyMPI_HAVE_MPI_Neighbor_alltoallv 1 #define PyMPI_HAVE_MPI_Neighbor_alltoallw 1 #define MPI_Neighbor_allgather MPIX_Neighbor_allgather #define MPI_Neighbor_allgatherv MPIX_Neighbor_allgatherv #define MPI_Neighbor_alltoall MPIX_Neighbor_alltoall #define MPI_Neighbor_alltoallv MPIX_Neighbor_alltoallv #define MPI_Neighbor_alltoallw MPIX_Neighbor_alltoallw #define PyMPI_HAVE_MPI_Ineighbor_allgather 1 #define PyMPI_HAVE_MPI_Ineighbor_allgatherv 1 #define PyMPI_HAVE_MPI_Ineighbor_alltoall 1 #define PyMPI_HAVE_MPI_Ineighbor_alltoallv 1 #define PyMPI_HAVE_MPI_Ineighbor_alltoallw 1 #define MPI_Ineighbor_allgather MPIX_Ineighbor_allgather #define MPI_Ineighbor_allgatherv MPIX_Ineighbor_allgatherv #define MPI_Ineighbor_alltoall MPIX_Ineighbor_alltoall #define MPI_Ineighbor_alltoallv MPIX_Ineighbor_alltoallv #define MPI_Ineighbor_alltoallw MPIX_Ineighbor_alltoallw #define PyMPI_HAVE_MPI_Comm_idup 1 #define PyMPI_HAVE_MPI_Comm_create_group 1 #define PyMPI_HAVE_MPI_COMM_TYPE_SHARED 1 #define PyMPI_HAVE_MPI_Comm_split_type 1 #define MPI_Comm_idup MPIX_Comm_idup #define MPI_Comm_create_group MPIX_Comm_create_group #define MPI_COMM_TYPE_SHARED MPIX_COMM_TYPE_SHARED #define MPI_Comm_split_type MPIX_Comm_split_type /* #define PyMPI_HAVE_MPI_Comm_dup_with_info 1 #define PyMPI_HAVE_MPI_Comm_set_info 1 #define PyMPI_HAVE_MPI_Comm_get_info 1 #define MPI_Comm_dup_with_info MPIX_Comm_dup_with_info #define MPI_Comm_set_info MPIX_Comm_set_info #define MPI_Comm_get_info MPIX_Comm_get_info */ #define PyMPI_HAVE_MPI_WIN_CREATE_FLAVOR 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_CREATE 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_ALLOCATE 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_DYNAMIC 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_SHARED 1 #define MPI_WIN_CREATE_FLAVOR MPIX_WIN_CREATE_FLAVOR #define MPI_WIN_FLAVOR_CREATE MPIX_WIN_FLAVOR_CREATE #define MPI_WIN_FLAVOR_ALLOCATE MPIX_WIN_FLAVOR_ALLOCATE #define MPI_WIN_FLAVOR_DYNAMIC MPIX_WIN_FLAVOR_DYNAMIC #define MPI_WIN_FLAVOR_SHARED MPIX_WIN_FLAVOR_SHARED #define PyMPI_HAVE_MPI_WIN_MODEL 1 #define PyMPI_HAVE_MPI_WIN_SEPARATE 1 #define PyMPI_HAVE_MPI_WIN_UNIFIED 1 #define MPI_WIN_MODEL MPIX_WIN_MODEL #define MPI_WIN_SEPARATE MPIX_WIN_SEPARATE #define MPI_WIN_UNIFIED MPIX_WIN_UNIFIED #define PyMPI_HAVE_MPI_Win_allocate 1 #define MPI_Win_allocate MPIX_Win_allocate #define PyMPI_HAVE_MPI_Win_allocate_shared 1 #define PyMPI_HAVE_MPI_Win_shared_query 1 #define MPI_Win_allocate_shared MPIX_Win_allocate_shared #define MPI_Win_shared_query MPIX_Win_shared_query #define PyMPI_HAVE_MPI_Win_create_dynamic 1 #define PyMPI_HAVE_MPI_Win_attach 1 #define PyMPI_HAVE_MPI_Win_detach 1 #define MPI_Win_create_dynamic MPIX_Win_create_dynamic #define MPI_Win_attach MPIX_Win_attach #define MPI_Win_detach MPIX_Win_detach /* #define PyMPI_HAVE_MPI_Win_set_info 1 #define PyMPI_HAVE_MPI_Win_get_info 1 #define MPI_Win_set_info MPIX_Win_set_info #define MPI_Win_get_info MPIX_Win_get_info */ #define PyMPI_HAVE_MPI_Get_accumulate 1 #define PyMPI_HAVE_MPI_Fetch_and_op 1 #define PyMPI_HAVE_MPI_Compare_and_swap 1 #define MPI_Get_accumulate MPIX_Get_accumulate #define MPI_Fetch_and_op MPIX_Fetch_and_op #define MPI_Compare_and_swap MPIX_Compare_and_swap #define PyMPI_HAVE_MPI_Rget 1 #define PyMPI_HAVE_MPI_Rput 1 #define PyMPI_HAVE_MPI_Raccumulate 1 #define PyMPI_HAVE_MPI_Rget_accumulate 1 #define MPI_Rget MPIX_Rget #define MPI_Rput MPIX_Rput #define MPI_Raccumulate MPIX_Raccumulate #define MPI_Rget_accumulate MPIX_Rget_accumulate #define PyMPI_HAVE_MPI_Win_lock_all 1 #define PyMPI_HAVE_MPI_Win_unlock_all 1 #define PyMPI_HAVE_MPI_Win_flush 1 #define PyMPI_HAVE_MPI_Win_flush_all 1 #define PyMPI_HAVE_MPI_Win_flush_local 1 #define PyMPI_HAVE_MPI_Win_flush_local_all 1 #define PyMPI_HAVE_MPI_Win_sync #define MPI_Win_lock_all MPIX_Win_lock_all #define MPI_Win_unlock_all MPIX_Win_unlock_all #define MPI_Win_flush MPIX_Win_flush #define MPI_Win_flush_all MPIX_Win_flush_all #define MPI_Win_flush_local MPIX_Win_flush_local #define MPI_Win_flush_local_all MPIX_Win_flush_local_all #define MPI_Win_sync MPIX_Win_sync #define PyMPI_HAVE_MPI_ERR_RMA_RANGE 1 #define PyMPI_HAVE_MPI_ERR_RMA_ATTACH 1 #define PyMPI_HAVE_MPI_ERR_RMA_SHARED 1 #define PyMPI_HAVE_MPI_ERR_RMA_FLAVOR 1 #define MPI_ERR_RMA_RANGE MPIX_ERR_RMA_RANGE #define MPI_ERR_RMA_ATTACH MPIX_ERR_RMA_ATTACH #define MPI_ERR_RMA_SHARED MPIX_ERR_RMA_SHARED #define MPI_ERR_RMA_FLAVOR MPIX_ERR_RMA_WRONG_FLAVOR /* #define PyMPI_HAVE_MPI_MAX_LIBRARY_VERSION_STRING 1 #define PyMPI_HAVE_MPI_Get_library_version 1 #define PyMPI_HAVE_MPI_INFO_ENV 1 #define MPI_MAX_LIBRARY_VERSION_STRING MPIX_MAX_LIBRARY_VERSION_STRING #define MPI_Get_library_version MPIX_Get_library_version #define MPI_INFO_ENV MPIX_INFO_ENV */ #endif /* MPICH2 < 1.5*/ #endif /* MPI < 3.0*/ #endif /* !PyMPI_CONFIG_MPICH2_H */ mpi4py-3.0.3/src/lib-mpi/config/mpi-30.h0000644000175000017500000000734012750576064020560 0ustar dalcinldalcinl00000000000000#if defined(MPI_VERSION) #if (MPI_VERSION >= 3) #define PyMPI_HAVE_MPI_Count 1 #define PyMPI_HAVE_MPI_COUNT 1 #define PyMPI_HAVE_MPI_CXX_BOOL 1 #define PyMPI_HAVE_MPI_CXX_FLOAT_COMPLEX 1 #define PyMPI_HAVE_MPI_CXX_DOUBLE_COMPLEX 1 #define PyMPI_HAVE_MPI_CXX_LONG_DOUBLE_COMPLEX 1 #define PyMPI_HAVE_MPI_Type_size_x 1 #define PyMPI_HAVE_MPI_Type_get_extent_x 1 #define PyMPI_HAVE_MPI_Type_get_true_extent_x 1 #define PyMPI_HAVE_MPI_Get_elements_x 1 #define PyMPI_HAVE_MPI_Status_set_elements_x 1 #define PyMPI_HAVE_MPI_COMBINER_HINDEXED_BLOCK #define PyMPI_HAVE_MPI_Type_create_hindexed_block 1 #define PyMPI_HAVE_MPI_NO_OP 1 #define PyMPI_HAVE_MPI_Message 1 #define PyMPI_HAVE_MPI_MESSAGE_NULL 1 #define PyMPI_HAVE_MPI_MESSAGE_NO_PROC 1 #define PyMPI_HAVE_MPI_Message_c2f 1 #define PyMPI_HAVE_MPI_Message_f2c 1 #define PyMPI_HAVE_MPI_Mprobe 1 #define PyMPI_HAVE_MPI_Improbe 1 #define PyMPI_HAVE_MPI_Mrecv 1 #define PyMPI_HAVE_MPI_Imrecv 1 #define PyMPI_HAVE_MPI_Neighbor_allgather 1 #define PyMPI_HAVE_MPI_Neighbor_allgatherv 1 #define PyMPI_HAVE_MPI_Neighbor_alltoall 1 #define PyMPI_HAVE_MPI_Neighbor_alltoallv 1 #define PyMPI_HAVE_MPI_Neighbor_alltoallw 1 #define PyMPI_HAVE_MPI_Ibarrier 1 #define PyMPI_HAVE_MPI_Ibcast 1 #define PyMPI_HAVE_MPI_Igather 1 #define PyMPI_HAVE_MPI_Igatherv 1 #define PyMPI_HAVE_MPI_Iscatter 1 #define PyMPI_HAVE_MPI_Iscatterv 1 #define PyMPI_HAVE_MPI_Iallgather 1 #define PyMPI_HAVE_MPI_Iallgatherv 1 #define PyMPI_HAVE_MPI_Ialltoall 1 #define PyMPI_HAVE_MPI_Ialltoallv 1 #define PyMPI_HAVE_MPI_Ialltoallw 1 #define PyMPI_HAVE_MPI_Ireduce 1 #define PyMPI_HAVE_MPI_Iallreduce 1 #define PyMPI_HAVE_MPI_Ireduce_scatter_block 1 #define PyMPI_HAVE_MPI_Ireduce_scatter 1 #define PyMPI_HAVE_MPI_Iscan 1 #define PyMPI_HAVE_MPI_Iexscan 1 #define PyMPI_HAVE_MPI_Ineighbor_allgather 1 #define PyMPI_HAVE_MPI_Ineighbor_allgatherv 1 #define PyMPI_HAVE_MPI_Ineighbor_alltoall 1 #define PyMPI_HAVE_MPI_Ineighbor_alltoallv 1 #define PyMPI_HAVE_MPI_Ineighbor_alltoallw 1 #define PyMPI_HAVE_MPI_WEIGHTS_EMPTY 1 #define PyMPI_HAVE_MPI_Comm_dup_with_info 1 #define PyMPI_HAVE_MPI_Comm_idup 1 #define PyMPI_HAVE_MPI_Comm_create_group 1 #define PyMPI_HAVE_MPI_COMM_TYPE_SHARED 1 #define PyMPI_HAVE_MPI_Comm_split_type 1 #define PyMPI_HAVE_MPI_Comm_set_info 1 #define PyMPI_HAVE_MPI_Comm_get_info 1 #define PyMPI_HAVE_MPI_WIN_CREATE_FLAVOR 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_CREATE 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_ALLOCATE 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_DYNAMIC 1 #define PyMPI_HAVE_MPI_WIN_FLAVOR_SHARED 1 #define PyMPI_HAVE_MPI_WIN_MODEL 1 #define PyMPI_HAVE_MPI_WIN_SEPARATE 1 #define PyMPI_HAVE_MPI_WIN_UNIFIED 1 #define PyMPI_HAVE_MPI_Win_allocate 1 #define PyMPI_HAVE_MPI_Win_allocate_shared 1 #define PyMPI_HAVE_MPI_Win_shared_query 1 #define PyMPI_HAVE_MPI_Win_create_dynamic 1 #define PyMPI_HAVE_MPI_Win_attach 1 #define PyMPI_HAVE_MPI_Win_detach 1 #define PyMPI_HAVE_MPI_Win_set_info 1 #define PyMPI_HAVE_MPI_Win_get_info 1 #define PyMPI_HAVE_MPI_Get_accumulate 1 #define PyMPI_HAVE_MPI_Fetch_and_op 1 #define PyMPI_HAVE_MPI_Compare_and_swap 1 #define PyMPI_HAVE_MPI_Rget 1 #define PyMPI_HAVE_MPI_Rput 1 #define PyMPI_HAVE_MPI_Raccumulate 1 #define PyMPI_HAVE_MPI_Rget_accumulate 1 #define PyMPI_HAVE_MPI_Win_lock_all 1 #define PyMPI_HAVE_MPI_Win_unlock_all 1 #define PyMPI_HAVE_MPI_Win_flush 1 #define PyMPI_HAVE_MPI_Win_flush_all 1 #define PyMPI_HAVE_MPI_Win_flush_local 1 #define PyMPI_HAVE_MPI_Win_flush_local_all 1 #define PyMPI_HAVE_MPI_Win_sync 1 #define PyMPI_HAVE_MPI_ERR_RMA_RANGE 1 #define PyMPI_HAVE_MPI_ERR_RMA_ATTACH 1 #define PyMPI_HAVE_MPI_ERR_RMA_SHARED 1 #define PyMPI_HAVE_MPI_ERR_RMA_FLAVOR 1 #define PyMPI_HAVE_MPI_MAX_LIBRARY_VERSION_STRING 1 #define PyMPI_HAVE_MPI_Get_library_version 1 #define PyMPI_HAVE_MPI_INFO_ENV 1 #endif #endif mpi4py-3.0.3/src/lib-mpi/config/mpi-11.h0000644000175000017500000002034512750576064020557 0ustar dalcinldalcinl00000000000000#define PyMPI_HAVE_MPI_UNDEFINED 1 #define PyMPI_HAVE_MPI_ANY_SOURCE 1 #define PyMPI_HAVE_MPI_ANY_TAG 1 #define PyMPI_HAVE_MPI_PROC_NULL 1 #define PyMPI_HAVE_MPI_Aint 1 #define PyMPI_HAVE_MPI_Datatype 1 #define PyMPI_HAVE_MPI_DATATYPE_NULL 1 #define PyMPI_HAVE_MPI_UB 1 #define PyMPI_HAVE_MPI_LB 1 #define PyMPI_HAVE_MPI_PACKED 1 #define PyMPI_HAVE_MPI_BYTE 1 #define PyMPI_HAVE_MPI_CHAR 1 #define PyMPI_HAVE_MPI_SHORT 1 #define PyMPI_HAVE_MPI_INT 1 #define PyMPI_HAVE_MPI_LONG 1 #define PyMPI_HAVE_MPI_LONG_LONG_INT 1 #define PyMPI_HAVE_MPI_UNSIGNED_CHAR 1 #define PyMPI_HAVE_MPI_UNSIGNED_SHORT 1 #define PyMPI_HAVE_MPI_UNSIGNED 1 #define PyMPI_HAVE_MPI_UNSIGNED_LONG 1 #define PyMPI_HAVE_MPI_FLOAT 1 #define PyMPI_HAVE_MPI_DOUBLE 1 #define PyMPI_HAVE_MPI_LONG_DOUBLE 1 #define PyMPI_HAVE_MPI_SHORT_INT 1 #define PyMPI_HAVE_MPI_2INT 1 #define PyMPI_HAVE_MPI_LONG_INT 1 #define PyMPI_HAVE_MPI_FLOAT_INT 1 #define PyMPI_HAVE_MPI_DOUBLE_INT 1 #define PyMPI_HAVE_MPI_LONG_DOUBLE_INT 1 #define PyMPI_HAVE_MPI_CHARACTER 1 #define PyMPI_HAVE_MPI_LOGICAL 1 #define PyMPI_HAVE_MPI_INTEGER 1 #define PyMPI_HAVE_MPI_REAL 1 #define PyMPI_HAVE_MPI_DOUBLE_PRECISION 1 #define PyMPI_HAVE_MPI_COMPLEX 1 #define PyMPI_HAVE_MPI_DOUBLE_COMPLEX 1 #define PyMPI_HAVE_MPI_BOTTOM 1 #define PyMPI_HAVE_MPI_Address 1 #define PyMPI_HAVE_MPI_Type_size 1 #define PyMPI_HAVE_MPI_Type_extent 1 #define PyMPI_HAVE_MPI_Type_lb 1 #define PyMPI_HAVE_MPI_Type_ub 1 #define PyMPI_HAVE_MPI_Type_dup 1 #define PyMPI_HAVE_MPI_Type_contiguous 1 #define PyMPI_HAVE_MPI_Type_vector 1 #define PyMPI_HAVE_MPI_Type_indexed 1 #define PyMPI_HAVE_MPI_Type_hvector 1 #define PyMPI_HAVE_MPI_Type_hindexed 1 #define PyMPI_HAVE_MPI_Type_struct 1 #define PyMPI_HAVE_MPI_Type_commit 1 #define PyMPI_HAVE_MPI_Type_free 1 #define PyMPI_HAVE_MPI_Pack 1 #define PyMPI_HAVE_MPI_Unpack 1 #define PyMPI_HAVE_MPI_Pack_size 1 #define PyMPI_HAVE_MPI_Status 1 #define PyMPI_HAVE_MPI_Get_count 1 #define PyMPI_HAVE_MPI_Get_elements 1 #define PyMPI_HAVE_MPI_Test_cancelled 1 #define PyMPI_HAVE_MPI_Request 1 #define PyMPI_HAVE_MPI_REQUEST_NULL 1 #define PyMPI_HAVE_MPI_Request_free 1 #define PyMPI_HAVE_MPI_Wait 1 #define PyMPI_HAVE_MPI_Test 1 #define PyMPI_HAVE_MPI_Request_get_status 1 #define PyMPI_HAVE_MPI_Cancel 1 #define PyMPI_HAVE_MPI_Waitany 1 #define PyMPI_HAVE_MPI_Testany 1 #define PyMPI_HAVE_MPI_Waitall 1 #define PyMPI_HAVE_MPI_Testall 1 #define PyMPI_HAVE_MPI_Waitsome 1 #define PyMPI_HAVE_MPI_Testsome 1 #define PyMPI_HAVE_MPI_Start 1 #define PyMPI_HAVE_MPI_Startall 1 #define PyMPI_HAVE_MPI_Op 1 #define PyMPI_HAVE_MPI_OP_NULL 1 #define PyMPI_HAVE_MPI_MAX 1 #define PyMPI_HAVE_MPI_MIN 1 #define PyMPI_HAVE_MPI_SUM 1 #define PyMPI_HAVE_MPI_PROD 1 #define PyMPI_HAVE_MPI_LAND 1 #define PyMPI_HAVE_MPI_BAND 1 #define PyMPI_HAVE_MPI_LOR 1 #define PyMPI_HAVE_MPI_BOR 1 #define PyMPI_HAVE_MPI_LXOR 1 #define PyMPI_HAVE_MPI_BXOR 1 #define PyMPI_HAVE_MPI_MAXLOC 1 #define PyMPI_HAVE_MPI_MINLOC 1 #define PyMPI_HAVE_MPI_REPLACE 1 #define PyMPI_HAVE_MPI_Op_free 1 #define PyMPI_HAVE_MPI_User_function 1 #define PyMPI_HAVE_MPI_Op_create 1 #define PyMPI_HAVE_MPI_Group 1 #define PyMPI_HAVE_MPI_GROUP_NULL 1 #define PyMPI_HAVE_MPI_GROUP_EMPTY 1 #define PyMPI_HAVE_MPI_Group_free 1 #define PyMPI_HAVE_MPI_Group_size 1 #define PyMPI_HAVE_MPI_Group_rank 1 #define PyMPI_HAVE_MPI_Group_translate_ranks 1 #define PyMPI_HAVE_MPI_IDENT 1 #define PyMPI_HAVE_MPI_CONGRUENT 1 #define PyMPI_HAVE_MPI_SIMILAR 1 #define PyMPI_HAVE_MPI_UNEQUAL 1 #define PyMPI_HAVE_MPI_Group_compare 1 #define PyMPI_HAVE_MPI_Group_union 1 #define PyMPI_HAVE_MPI_Group_intersection 1 #define PyMPI_HAVE_MPI_Group_difference 1 #define PyMPI_HAVE_MPI_Group_incl 1 #define PyMPI_HAVE_MPI_Group_excl 1 #define PyMPI_HAVE_MPI_Group_range_incl 1 #define PyMPI_HAVE_MPI_Group_range_excl 1 #define PyMPI_HAVE_MPI_Comm 1 #define PyMPI_HAVE_MPI_COMM_NULL 1 #define PyMPI_HAVE_MPI_COMM_SELF 1 #define PyMPI_HAVE_MPI_COMM_WORLD 1 #define PyMPI_HAVE_MPI_Comm_free 1 #define PyMPI_HAVE_MPI_Comm_group 1 #define PyMPI_HAVE_MPI_Comm_size 1 #define PyMPI_HAVE_MPI_Comm_rank 1 #define PyMPI_HAVE_MPI_Comm_compare 1 #define PyMPI_HAVE_MPI_Topo_test 1 #define PyMPI_HAVE_MPI_Comm_test_inter 1 #define PyMPI_HAVE_MPI_Abort 1 #define PyMPI_HAVE_MPI_Send 1 #define PyMPI_HAVE_MPI_Recv 1 #define PyMPI_HAVE_MPI_Sendrecv 1 #define PyMPI_HAVE_MPI_Sendrecv_replace 1 #define PyMPI_HAVE_MPI_BSEND_OVERHEAD 1 #define PyMPI_HAVE_MPI_Buffer_attach 1 #define PyMPI_HAVE_MPI_Buffer_detach 1 #define PyMPI_HAVE_MPI_Bsend 1 #define PyMPI_HAVE_MPI_Ssend 1 #define PyMPI_HAVE_MPI_Rsend 1 #define PyMPI_HAVE_MPI_Isend 1 #define PyMPI_HAVE_MPI_Ibsend 1 #define PyMPI_HAVE_MPI_Issend 1 #define PyMPI_HAVE_MPI_Irsend 1 #define PyMPI_HAVE_MPI_Irecv 1 #define PyMPI_HAVE_MPI_Send_init 1 #define PyMPI_HAVE_MPI_Bsend_init 1 #define PyMPI_HAVE_MPI_Ssend_init 1 #define PyMPI_HAVE_MPI_Rsend_init 1 #define PyMPI_HAVE_MPI_Recv_init 1 #define PyMPI_HAVE_MPI_Probe 1 #define PyMPI_HAVE_MPI_Iprobe 1 #define PyMPI_HAVE_MPI_Barrier 1 #define PyMPI_HAVE_MPI_Bcast 1 #define PyMPI_HAVE_MPI_Gather 1 #define PyMPI_HAVE_MPI_Gatherv 1 #define PyMPI_HAVE_MPI_Scatter 1 #define PyMPI_HAVE_MPI_Scatterv 1 #define PyMPI_HAVE_MPI_Allgather 1 #define PyMPI_HAVE_MPI_Allgatherv 1 #define PyMPI_HAVE_MPI_Alltoall 1 #define PyMPI_HAVE_MPI_Alltoallv 1 #define PyMPI_HAVE_MPI_Reduce 1 #define PyMPI_HAVE_MPI_Allreduce 1 #define PyMPI_HAVE_MPI_Reduce_scatter 1 #define PyMPI_HAVE_MPI_Scan 1 #define PyMPI_HAVE_MPI_Comm_dup 1 #define PyMPI_HAVE_MPI_Comm_create 1 #define PyMPI_HAVE_MPI_Comm_split 1 #define PyMPI_HAVE_MPI_CART 1 #define PyMPI_HAVE_MPI_Cart_create 1 #define PyMPI_HAVE_MPI_Cartdim_get 1 #define PyMPI_HAVE_MPI_Cart_get 1 #define PyMPI_HAVE_MPI_Cart_rank 1 #define PyMPI_HAVE_MPI_Cart_coords 1 #define PyMPI_HAVE_MPI_Cart_shift 1 #define PyMPI_HAVE_MPI_Cart_sub 1 #define PyMPI_HAVE_MPI_Cart_map 1 #define PyMPI_HAVE_MPI_Dims_create 1 #define PyMPI_HAVE_MPI_GRAPH 1 #define PyMPI_HAVE_MPI_Graph_create 1 #define PyMPI_HAVE_MPI_Graphdims_get 1 #define PyMPI_HAVE_MPI_Graph_get 1 #define PyMPI_HAVE_MPI_Graph_map 1 #define PyMPI_HAVE_MPI_Graph_neighbors_count 1 #define PyMPI_HAVE_MPI_Graph_neighbors 1 #define PyMPI_HAVE_MPI_Intercomm_create 1 #define PyMPI_HAVE_MPI_Comm_remote_group 1 #define PyMPI_HAVE_MPI_Comm_remote_size 1 #define PyMPI_HAVE_MPI_Intercomm_merge 1 #define PyMPI_HAVE_MPI_Errhandler_get 1 #define PyMPI_HAVE_MPI_Errhandler_set 1 #define PyMPI_HAVE_MPI_Handler_function 1 #define PyMPI_HAVE_MPI_Errhandler_create 1 #define PyMPI_HAVE_MPI_Init 1 #define PyMPI_HAVE_MPI_Finalize 1 #define PyMPI_HAVE_MPI_Initialized 1 #define PyMPI_HAVE_MPI_Finalized 1 #define PyMPI_HAVE_MPI_MAX_PROCESSOR_NAME 1 #define PyMPI_HAVE_MPI_Get_processor_name 1 #define PyMPI_HAVE_MPI_Wtime 1 #define PyMPI_HAVE_MPI_Wtick 1 #define PyMPI_HAVE_MPI_Pcontrol 1 #define PyMPI_HAVE_MPI_Errhandler 1 #define PyMPI_HAVE_MPI_ERRHANDLER_NULL 1 #define PyMPI_HAVE_MPI_ERRORS_RETURN 1 #define PyMPI_HAVE_MPI_ERRORS_ARE_FATAL 1 #define PyMPI_HAVE_MPI_Errhandler_free 1 #define PyMPI_HAVE_MPI_KEYVAL_INVALID 1 #define PyMPI_HAVE_MPI_TAG_UB 1 #define PyMPI_HAVE_MPI_HOST 1 #define PyMPI_HAVE_MPI_IO 1 #define PyMPI_HAVE_MPI_WTIME_IS_GLOBAL 1 #define PyMPI_HAVE_MPI_Attr_get 1 #define PyMPI_HAVE_MPI_Attr_put 1 #define PyMPI_HAVE_MPI_Attr_delete 1 #define PyMPI_HAVE_MPI_Copy_function 1 #define PyMPI_HAVE_MPI_Delete_function 1 #define PyMPI_HAVE_MPI_DUP_FN 1 #define PyMPI_HAVE_MPI_NULL_COPY_FN 1 #define PyMPI_HAVE_MPI_NULL_DELETE_FN 1 #define PyMPI_HAVE_MPI_Keyval_create 1 #define PyMPI_HAVE_MPI_Keyval_free 1 #define PyMPI_HAVE_MPI_SUCCESS 1 #define PyMPI_HAVE_MPI_ERR_LASTCODE 1 #define PyMPI_HAVE_MPI_ERR_COMM 1 #define PyMPI_HAVE_MPI_ERR_GROUP 1 #define PyMPI_HAVE_MPI_ERR_TYPE 1 #define PyMPI_HAVE_MPI_ERR_REQUEST 1 #define PyMPI_HAVE_MPI_ERR_OP 1 #define PyMPI_HAVE_MPI_ERR_BUFFER 1 #define PyMPI_HAVE_MPI_ERR_COUNT 1 #define PyMPI_HAVE_MPI_ERR_TAG 1 #define PyMPI_HAVE_MPI_ERR_RANK 1 #define PyMPI_HAVE_MPI_ERR_ROOT 1 #define PyMPI_HAVE_MPI_ERR_TRUNCATE 1 #define PyMPI_HAVE_MPI_ERR_IN_STATUS 1 #define PyMPI_HAVE_MPI_ERR_PENDING 1 #define PyMPI_HAVE_MPI_ERR_TOPOLOGY 1 #define PyMPI_HAVE_MPI_ERR_DIMS 1 #define PyMPI_HAVE_MPI_ERR_ARG 1 #define PyMPI_HAVE_MPI_ERR_OTHER 1 #define PyMPI_HAVE_MPI_ERR_UNKNOWN 1 #define PyMPI_HAVE_MPI_ERR_INTERN 1 #define PyMPI_HAVE_MPI_MAX_ERROR_STRING 1 #define PyMPI_HAVE_MPI_Error_class 1 #define PyMPI_HAVE_MPI_Error_string 1 mpi4py-3.0.3/src/lib-mpi/fallback.h0000644000175000017500000007542713200562156020044 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_FALLBACK_H #define PyMPI_FALLBACK_H /* ---------------------------------------------------------------- */ #include #ifndef PyMPI_MALLOC #define PyMPI_MALLOC malloc #endif #ifndef PyMPI_FREE #define PyMPI_FREE free #endif /* ---------------------------------------------------------------- */ /* Version Number */ #ifndef PyMPI_HAVE_MPI_VERSION #if !defined(MPI_VERSION) #define MPI_VERSION 1 #endif #endif #ifndef PyMPI_HAVE_MPI_SUBVERSION #if !defined(MPI_SUBVERSION) #define MPI_SUBVERSION 0 #endif #endif #ifndef PyMPI_HAVE_MPI_Get_version static int PyMPI_Get_version(int *version, int* subversion) { if (!version) return MPI_ERR_ARG; if (!subversion) return MPI_ERR_ARG; *version = MPI_VERSION; *subversion = MPI_SUBVERSION; return MPI_SUCCESS; } #undef MPI_Get_version #define MPI_Get_version PyMPI_Get_version #endif #ifndef PyMPI_HAVE_MPI_Get_library_version #define PyMPI_MAX_LIBRARY_VERSION_STRING 8 static int PyMPI_Get_library_version(char version[], int *rlen) { if (!version) return MPI_ERR_ARG; if (!rlen) return MPI_ERR_ARG; version[0] = 'M'; version[1] = 'P'; version[2] = 'I'; version[3] = ' '; version[4] = '0' + (char) MPI_VERSION; version[5] = '.'; version[6] = '0' + (char) MPI_SUBVERSION; version[7] = 0; *rlen = 7; return MPI_SUCCESS; } #undef MPI_MAX_LIBRARY_VERSION_STRING #define MPI_MAX_LIBRARY_VERSION_STRING \ PyMPI_MAX_LIBRARY_VERSION_STRING #undef MPI_Get_library_version #define MPI_Get_library_version \ PyMPI_Get_library_version #endif /* ---------------------------------------------------------------- */ /* Threading Support */ #ifndef PyMPI_HAVE_MPI_Init_thread static int PyMPI_Init_thread(int *argc, char ***argv, int required, int *provided) { int ierr = MPI_SUCCESS; if (!provided) return MPI_ERR_ARG; ierr = MPI_Init(argc, argv); if (ierr != MPI_SUCCESS) return ierr; *provided = MPI_THREAD_SINGLE; return MPI_SUCCESS; } #undef MPI_Init_thread #define MPI_Init_thread PyMPI_Init_thread #endif #ifndef PyMPI_HAVE_MPI_Query_thread static int PyMPI_Query_thread(int *provided) { if (!provided) return MPI_ERR_ARG; provided = MPI_THREAD_SINGLE; return MPI_SUCCESS; } #undef MPI_Query_thread #define MPI_Query_thread PyMPI_Query_thread #endif #ifndef PyMPI_HAVE_MPI_Is_thread_main static int PyMPI_Is_thread_main(int *flag) { if (!flag) return MPI_ERR_ARG; *flag = 1; /* XXX this is completely broken !! */ return MPI_SUCCESS; } #undef MPI_Is_thread_main #define MPI_Is_thread_main PyMPI_Is_thread_main #endif /* ---------------------------------------------------------------- */ /* Status */ #ifndef PyMPI_HAVE_MPI_STATUS_IGNORE static MPI_Status PyMPI_STATUS_IGNORE; #undef MPI_STATUS_IGNORE #define MPI_STATUS_IGNORE ((MPI_Status*)(&PyMPI_STATUS_IGNORE)) #endif #ifndef PyMPI_HAVE_MPI_STATUSES_IGNORE #ifndef PyMPI_MPI_STATUSES_IGNORE_SIZE #if defined(__GNUC__) || defined(__ICC) || defined(__INTEL_COMPILER) #warning MPI_STATUSES_IGNORE will use static storage of size 4096 #warning Buffer overruns may occur. You were warned !!! #endif #define PyMPI_MPI_STATUSES_IGNORE_SIZE 4096 #endif static MPI_Status PyMPI_STATUSES_IGNORE[PyMPI_MPI_STATUSES_IGNORE_SIZE]; #undef MPI_STATUSES_IGNORE #define MPI_STATUSES_IGNORE ((MPI_Status*)(PyMPI_STATUSES_IGNORE)) #endif /* ---------------------------------------------------------------- */ /* Datatypes */ #ifndef PyMPI_HAVE_MPI_LONG_LONG #undef MPI_LONG_LONG #define MPI_LONG_LONG MPI_LONG_LONG_INT #endif #ifndef PyMPI_HAVE_MPI_Type_get_extent static int PyMPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent) { int ierr = MPI_SUCCESS; ierr = MPI_Type_lb(datatype, lb); if (ierr != MPI_SUCCESS) return ierr; ierr = MPI_Type_extent(datatype, extent); if (ierr != MPI_SUCCESS) return ierr; return MPI_SUCCESS; } #undef MPI_Type_get_extent #define MPI_Type_get_extent PyMPI_Type_get_extent #endif #ifndef PyMPI_HAVE_MPI_Type_dup static int PyMPI_Type_dup(MPI_Datatype datatype, MPI_Datatype *newtype) { int ierr = MPI_SUCCESS; ierr = MPI_Type_contiguous(1, datatype, newtype); if (ierr != MPI_SUCCESS) return ierr; ierr = MPI_Type_commit(newtype); /* the safe way ... */ if (ierr != MPI_SUCCESS) return ierr; return MPI_SUCCESS; } #undef MPI_Type_dup #define MPI_Type_dup PyMPI_Type_dup #endif #ifndef PyMPI_HAVE_MPI_Type_create_indexed_block static int PyMPI_Type_create_indexed_block(int count, int blocklength, int displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype) { int i, *blocklengths = 0, ierr = MPI_SUCCESS; if (count > 0) { blocklengths = (int *) PyMPI_MALLOC(count*sizeof(int)); if (!blocklengths) return MPI_ERR_INTERN; } for (i=0; i 0) { blocklengths = (int *) PyMPI_MALLOC(count*sizeof(int)); if (!blocklengths) return MPI_ERR_INTERN; } for (i=0; i 0); PyMPI_CHKARG(sizes); PyMPI_CHKARG(subsizes); PyMPI_CHKARG(starts); PyMPI_CHKARG(newtype); for (i=0; i 0); PyMPI_CHKARG(subsizes[i] > 0); PyMPI_CHKARG(starts[i] >= 0); PyMPI_CHKARG(sizes[i] >= subsizes[i]); PyMPI_CHKARG(starts[i] <= (sizes[i] - subsizes[i])); } PyMPI_CHKARG((order==MPI_ORDER_C) || (order==MPI_ORDER_FORTRAN)); ierr = MPI_Type_extent(oldtype, &extent); if (ierr != MPI_SUCCESS) return ierr; if (order == MPI_ORDER_FORTRAN) { if (ndims == 1) { ierr = MPI_Type_contiguous(subsizes[0], oldtype, &tmp1); if (ierr != MPI_SUCCESS) return ierr; } else { ierr = MPI_Type_vector(subsizes[1], subsizes[0], sizes[0], oldtype, &tmp1); if (ierr != MPI_SUCCESS) return ierr; size = sizes[0]*extent; for (i=2; i=0; i--) { size *= sizes[i+1]; ierr = MPI_Type_hvector(subsizes[i], 1, size, tmp1, &tmp2); if (ierr != MPI_SUCCESS) return ierr; ierr = MPI_Type_free(&tmp1); if (ierr != MPI_SUCCESS) return ierr; tmp1 = tmp2; } } /* add displacement and UB */ disps[1] = starts[ndims-1]; size = 1; for (i=ndims-2; i>=0; i--) { size *= sizes[i+1]; disps[1] += size*starts[i]; } } disps[1] *= extent; disps[2] = extent; for (i=0; i 0); PyMPI_CHKARG(blksize * nprocs >= global_size); } j = global_size - blksize*rank; mysize = (blksize < j) ? blksize : j; if (mysize < 0) mysize = 0; stride = orig_extent; if (order == MPI_ORDER_FORTRAN) { if (dim == 0) { ierr = MPI_Type_contiguous(mysize, type_old, type_new); if (ierr != MPI_SUCCESS) goto fn_exit; } else { for (i=0; idim; i--) stride *= gsizes[i]; ierr = MPI_Type_hvector(mysize, 1, stride, type_old, type_new); if (ierr != MPI_SUCCESS) goto fn_exit; } } *offset = blksize * rank; if (mysize == 0) *offset = 0; ierr = MPI_SUCCESS; fn_exit: return ierr; } static int PyMPI_Type_cyclic(int *gsizes, int dim, int ndims, int nprocs, int rank, int darg, int order, MPI_Aint orig_extent, MPI_Datatype type_old, MPI_Datatype *type_new, MPI_Aint *offset) { int ierr, blksize, i, blklens[3], st_index, end_index, local_size, rem, count; MPI_Aint stride, disps[3]; MPI_Datatype type_tmp, types[3]; type_tmp = MPI_DATATYPE_NULL; types[0] = types[1] = types[2] = MPI_DATATYPE_NULL; if (darg == MPI_DISTRIBUTE_DFLT_DARG) blksize = 1; else blksize = darg; PyMPI_CHKARG(blksize > 0); st_index = rank*blksize; end_index = gsizes[dim] - 1; if (end_index < st_index) local_size = 0; else { local_size = ((end_index - st_index + 1)/(nprocs*blksize))*blksize; rem = (end_index - st_index + 1) % (nprocs*blksize); local_size += (rem < blksize) ? rem : blksize; } count = local_size/blksize; rem = local_size % blksize; stride = nprocs*blksize*orig_extent; if (order == MPI_ORDER_FORTRAN) for (i=0; idim; i--) stride *= gsizes[i]; ierr = MPI_Type_hvector(count, blksize, stride, type_old, type_new); if (ierr != MPI_SUCCESS) goto fn_exit; /* if the last block is of size less than blksize, include it separately using MPI_Type_struct */ if (rem) { types[0] = *type_new; types[1] = type_old; disps[0] = 0; disps[1] = count*stride; blklens[0] = 1; blklens[1] = rem; ierr = MPI_Type_struct(2, blklens, disps, types, &type_tmp); if (ierr != MPI_SUCCESS) goto fn_exit; ierr = MPI_Type_free(type_new); if (ierr != MPI_SUCCESS) goto fn_exit; *type_new = type_tmp; } /* In the first iteration, we need to set the displacement in that dimension correctly. */ if ( ((order == MPI_ORDER_FORTRAN) && (dim == 0)) || ((order == MPI_ORDER_C) && (dim == ndims-1)) ) { types[0] = MPI_LB; disps[0] = 0; types[1] = *type_new; disps[1] = rank * blksize * orig_extent; types[2] = MPI_UB; disps[2] = orig_extent * gsizes[dim]; blklens[0] = blklens[1] = blklens[2] = 1; ierr = MPI_Type_struct(3, blklens, disps, types, &type_tmp); if (ierr != MPI_SUCCESS) goto fn_exit; ierr = MPI_Type_free(type_new); if (ierr != MPI_SUCCESS) goto fn_exit; *type_new = type_tmp; *offset = 0; } else { *offset = rank * blksize; } if (local_size == 0) *offset = 0; ierr = MPI_SUCCESS; fn_exit: return ierr; } static int PyMPI_Type_create_darray(int size, int rank, int ndims, int gsizes[], int distribs[], int dargs[], int psizes[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype) { int ierr = MPI_SUCCESS, i; int procs, tmp_rank, tmp_size, blklens[3]; MPI_Aint orig_extent, disps[3]; MPI_Datatype type_old, type_new, types[3]; int *coords = 0; MPI_Aint *offsets = 0; orig_extent=0; type_old = type_new = MPI_DATATYPE_NULL; types[0] = types[1] = types[2] = MPI_DATATYPE_NULL; ierr = MPI_Type_extent(oldtype, &orig_extent); if (ierr != MPI_SUCCESS) goto fn_exit; PyMPI_CHKARG(rank >= 0); PyMPI_CHKARG(size > 0); PyMPI_CHKARG(ndims > 0); PyMPI_CHKARG(gsizes); PyMPI_CHKARG(distribs); PyMPI_CHKARG(dargs); PyMPI_CHKARG(psizes); PyMPI_CHKARG((order==MPI_ORDER_C) || (order==MPI_ORDER_FORTRAN) ); for (i=0; i < ndims; i++) { PyMPI_CHKARG(gsizes[1] > 0); PyMPI_CHKARG(psizes[1] > 0); PyMPI_CHKARG((distribs[i] == MPI_DISTRIBUTE_NONE) || (distribs[i] == MPI_DISTRIBUTE_BLOCK) || (distribs[i] == MPI_DISTRIBUTE_CYCLIC)); PyMPI_CHKARG((dargs[i] == MPI_DISTRIBUTE_DFLT_DARG) || (dargs[i] > 0)); PyMPI_CHKARG(!((distribs[i] == MPI_DISTRIBUTE_NONE) && (psizes[i] != 1))); } /* calculate position in Cartesian grid as MPI would (row-major ordering) */ coords = (int *) PyMPI_MALLOC(ndims*sizeof(int)); if (!coords) { ierr = MPI_ERR_INTERN; goto fn_exit; } offsets = (MPI_Aint *) PyMPI_MALLOC(ndims*sizeof(MPI_Aint)); if (!offsets) { ierr = MPI_ERR_INTERN; goto fn_exit; } procs = size; tmp_rank = rank; for (i=0; i=0; i--) { if (distribs[i] == MPI_DISTRIBUTE_BLOCK) { ierr = PyMPI_Type_block(gsizes, i, ndims, psizes[i], coords[i], dargs[i], order, orig_extent, type_old, &type_new, offsets+i); if (ierr != MPI_SUCCESS) goto fn_exit; } else if (distribs[i] == MPI_DISTRIBUTE_CYCLIC) { ierr = PyMPI_Type_cyclic(gsizes, i, ndims, psizes[i], coords[i], dargs[i], order, orig_extent, type_old, &type_new, offsets+i); if (ierr != MPI_SUCCESS) goto fn_exit; } else if (distribs[i] == MPI_DISTRIBUTE_NONE) { /* treat it as a block distribution on 1 process */ ierr = PyMPI_Type_block(gsizes, i, ndims, psizes[i], coords[i], MPI_DISTRIBUTE_DFLT_DARG, order, orig_extent, type_old, &type_new, offsets+i); if (ierr != MPI_SUCCESS) goto fn_exit; } if (i != ndims-1) { ierr = MPI_Type_free(&type_old); if (ierr != MPI_SUCCESS) goto fn_exit; } type_old = type_new; } /* add displacement and UB */ disps[1] = offsets[ndims-1]; tmp_size = 1; for (i=ndims-2; i>=0; i--) { tmp_size *= gsizes[i+1]; disps[1] += tmp_size*offsets[i]; } /* rest done below for both Fortran and C order */ } disps[0] = 0; disps[1] *= orig_extent; disps[2] = orig_extent; for (i=0; i 0) p[n] = 0; #endif status->MPI_SOURCE = MPI_ANY_SOURCE; status->MPI_TAG = MPI_ANY_TAG; status->MPI_ERROR = MPI_SUCCESS; #ifdef PyMPI_HAVE_MPI_Status_set_elements (void)MPI_Status_set_elements(status, MPI_BYTE, 0); #endif #ifdef PyMPI_HAVE_MPI_Status_set_cancelled (void)MPI_Status_set_cancelled(status, 0); #endif } return MPI_SUCCESS; } #undef MPI_Request_get_status #define MPI_Request_get_status PyMPI_Request_get_status #endif #endif /* ---------------------------------------------------------------- */ #ifndef PyMPI_HAVE_MPI_Reduce_scatter_block static int PyMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { int ierr = MPI_SUCCESS; int n = 1, *recvcounts = 0; ierr = MPI_Comm_size(comm, &n); if (ierr != MPI_SUCCESS) return ierr; recvcounts = (int *) PyMPI_MALLOC(n*sizeof(int)); if (!recvcounts) return MPI_ERR_INTERN; while (n-- > 0) recvcounts[n] = recvcount; ierr = MPI_Reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm); PyMPI_FREE(recvcounts); return ierr; } #undef MPI_Reduce_scatter_block #define MPI_Reduce_scatter_block PyMPI_Reduce_scatter_block #endif /* ---------------------------------------------------------------- */ /* Communicator Info */ #ifndef PyMPI_HAVE_MPI_Comm_dup_with_info static int PyMPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm *newcomm) { int dummy, ierr; if (info != MPI_INFO_NULL) { ierr = MPI_Info_get_nkeys(info, &dummy); if (ierr != MPI_SUCCESS) return ierr; } return MPI_Comm_dup(comm, newcomm); } #undef MPI_Comm_dup_with_info #define MPI_Comm_dup_with_info PyMPI_Comm_dup_with_info #endif #ifndef PyMPI_HAVE_MPI_Comm_set_info static int PyMPI_Comm_set_info(MPI_Comm comm, MPI_Info info) { int dummy, ierr; ierr = MPI_Comm_size(comm, &dummy); if (ierr != MPI_SUCCESS) return ierr; if (info != MPI_INFO_NULL) { ierr = MPI_Info_get_nkeys(info, &dummy); if (ierr != MPI_SUCCESS) return ierr; } return MPI_SUCCESS; } #undef MPI_Comm_set_info #define MPI_Comm_set_info PyMPI_Comm_set_info #endif #ifndef PyMPI_HAVE_MPI_Comm_get_info static int PyMPI_Comm_get_info(MPI_Comm comm, MPI_Info *info) { int dummy, ierr; ierr = MPI_Comm_size(comm, &dummy); if (ierr != MPI_SUCCESS) return ierr; return MPI_Info_create(info); } #undef MPI_Comm_get_info #define MPI_Comm_get_info PyMPI_Comm_get_info #endif /* ---------------------------------------------------------------- */ #if !defined(PyMPI_HAVE_MPI_WEIGHTS_EMPTY) static const int PyMPI_WEIGHTS_EMPTY_ARRAY[1] = {MPI_UNDEFINED}; static int * const PyMPI_WEIGHTS_EMPTY = (int*)PyMPI_WEIGHTS_EMPTY_ARRAY; #undef MPI_WEIGHTS_EMPTY #define MPI_WEIGHTS_EMPTY PyMPI_WEIGHTS_EMPTY #endif /* ---------------------------------------------------------------- */ /* Memory Allocation */ #if !defined(PyMPI_HAVE_MPI_Alloc_mem) || \ !defined(PyMPI_HAVE_MPI_Free_mem) static int PyMPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr) { char *buf = 0, **basebuf = 0; if (size < 0) return MPI_ERR_ARG; if (!baseptr) return MPI_ERR_ARG; if (size == 0) size = 1; buf = (char *) PyMPI_MALLOC(size); if (!buf) return MPI_ERR_NO_MEM; basebuf = (char **) baseptr; *basebuf = buf; return MPI_SUCCESS; } #undef MPI_Alloc_mem #define MPI_Alloc_mem PyMPI_Alloc_mem static int PyMPI_Free_mem(void *baseptr) { if (!baseptr) return MPI_ERR_ARG; PyMPI_FREE(baseptr); return MPI_SUCCESS; } #undef MPI_Free_mem #define MPI_Free_mem PyMPI_Free_mem #endif /* ---------------------------------------------------------------- */ #ifndef PyMPI_HAVE_MPI_Win_allocate #ifdef PyMPI_HAVE_MPI_Win_create static int PyMPI_WIN_KEYVAL_MPIMEM = MPI_KEYVAL_INVALID; static int MPIAPI PyMPI_win_free_mpimem(MPI_Win win, int k, void *v, void *xs) { (void)win; (void)k; (void)xs; /* unused */ return MPI_Free_mem(v); } static int MPIAPI PyMPI_win_free_keyval(MPI_Comm comm, int k, void *v, void *xs) { int ierr = MPI_SUCCESS; (void)comm; (void)xs; /* unused */ ierr = MPI_Win_free_keyval((int *)v); if (ierr != MPI_SUCCESS) return ierr; ierr = MPI_Comm_free_keyval(&k); if (ierr != MPI_SUCCESS) return ierr; return MPI_SUCCESS; } static int PyMPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr_, MPI_Win *win_) { int ierr = MPI_SUCCESS; void *baseptr = MPI_BOTTOM; MPI_Win win = MPI_WIN_NULL; if (!baseptr_) return MPI_ERR_ARG; if (!win_) return MPI_ERR_ARG; ierr = MPI_Alloc_mem(size?size:1, info, &baseptr); if (ierr != MPI_SUCCESS) goto error; ierr = MPI_Win_create(baseptr, size, disp_unit, info, comm, &win); if (ierr != MPI_SUCCESS) goto error; #if defined(PyMPI_HAVE_MPI_Win_create_keyval) && \ defined(PyMPI_HAVE_MPI_Win_set_attr) if (PyMPI_WIN_KEYVAL_MPIMEM == MPI_KEYVAL_INVALID) { int comm_keyval = MPI_KEYVAL_INVALID; ierr = MPI_Win_create_keyval(MPI_WIN_NULL_COPY_FN, PyMPI_win_free_mpimem, &PyMPI_WIN_KEYVAL_MPIMEM, NULL); if (ierr != MPI_SUCCESS) goto error; ierr = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN, PyMPI_win_free_keyval, &comm_keyval, NULL); if (ierr == MPI_SUCCESS) (void)MPI_Comm_set_attr(MPI_COMM_SELF, comm_keyval, &PyMPI_WIN_KEYVAL_MPIMEM); } ierr = MPI_Win_set_attr(win, PyMPI_WIN_KEYVAL_MPIMEM, baseptr); if (ierr != MPI_SUCCESS) goto error; #endif *((void**)baseptr_) = baseptr; *win_ = win; return MPI_SUCCESS; error: if (baseptr != MPI_BOTTOM) (void)MPI_Free_mem(baseptr); if (win != MPI_WIN_NULL) (void)MPI_Win_free(&win); return ierr; } #undef MPI_Win_allocate #define MPI_Win_allocate PyMPI_Win_allocate #endif #endif #ifndef PyMPI_HAVE_MPI_Win_set_info static int PyMPI_Win_set_info(MPI_Win win, MPI_Info info) { int dummy, ierr; if (win == MPI_WIN_NULL) return MPI_ERR_WIN; if (info != MPI_INFO_NULL) { ierr = MPI_Info_get_nkeys(info, &dummy); if (ierr != MPI_SUCCESS) return ierr; } return MPI_SUCCESS; } #undef MPI_Win_set_info #define MPI_Win_set_info PyMPI_Win_set_info #endif #ifndef PyMPI_HAVE_MPI_Win_get_info static int PyMPI_Win_get_info(MPI_Win win, MPI_Info *info) { if (win == MPI_WIN_NULL) return MPI_ERR_WIN; return MPI_Info_create(info); } #undef MPI_Win_get_info #define MPI_Win_get_info PyMPI_Win_get_info #endif /* ---------------------------------------------------------------- */ #endif /* !PyMPI_FALLBACK_H */ /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/lib-mpi/compat.h0000644000175000017500000000055113200562156017552 0ustar dalcinldalcinl00000000000000#if defined(MSMPI_VER) #include "compat/msmpi.h" #elif defined(MPICH3) #include "compat/mpich3.h" #elif defined(MPICH2) #include "compat/mpich2.h" #elif defined(OPEN_MPI) #include "compat/openmpi.h" #elif defined(PLATFORM_MPI) #include "compat/pcmpi.h" #elif defined(MPICH1) #include "compat/mpich1.h" #elif defined(LAM_MPI) #include "compat/lammpi.h" #endif mpi4py-3.0.3/src/lib-mpi/missing.h0000644000175000017500000027733413157456710017770 0ustar dalcinldalcinl00000000000000#ifndef PyMPI_MISSING_H #define PyMPI_MISSING_H #ifndef PyMPI_UNUSED # if defined(__GNUC__) # if !defined(__cplusplus) || (__GNUC__>3||(__GNUC__==3&&__GNUC_MINOR__>=4)) # define PyMPI_UNUSED __attribute__ ((__unused__)) # else # define PyMPI_UNUSED # endif # elif defined(__INTEL_COMPILER) || defined(__ICC) # define PyMPI_UNUSED __attribute__ ((__unused__)) # else # define PyMPI_UNUSED # endif #endif #define PyMPI_ERR_UNAVAILABLE (-1431655766) /*0xaaaaaaaa*/ static PyMPI_UNUSED int PyMPI_UNAVAILABLE(const char *name,...) { (void)name; return PyMPI_ERR_UNAVAILABLE; } #ifndef PyMPI_HAVE_MPI_Aint #undef MPI_Aint typedef long PyMPI_MPI_Aint; #define MPI_Aint PyMPI_MPI_Aint #endif #ifndef PyMPI_HAVE_MPI_Offset #undef MPI_Offset typedef long PyMPI_MPI_Offset; #define MPI_Offset PyMPI_MPI_Offset #endif #ifndef PyMPI_HAVE_MPI_Count #undef MPI_Count typedef MPI_Offset PyMPI_MPI_Count; #define MPI_Count PyMPI_MPI_Count #endif #ifndef PyMPI_HAVE_MPI_Status #undef MPI_Status typedef struct PyMPI_MPI_Status { int MPI_SOURCE; int MPI_TAG; int MPI_ERROR; } PyMPI_MPI_Status; #define MPI_Status PyMPI_MPI_Status #endif #ifndef PyMPI_HAVE_MPI_Datatype #undef MPI_Datatype typedef void *PyMPI_MPI_Datatype; #define MPI_Datatype PyMPI_MPI_Datatype #endif #ifndef PyMPI_HAVE_MPI_Request #undef MPI_Request typedef void *PyMPI_MPI_Request; #define MPI_Request PyMPI_MPI_Request #endif #ifndef PyMPI_HAVE_MPI_Message #undef MPI_Message typedef void *PyMPI_MPI_Message; #define MPI_Message PyMPI_MPI_Message #endif #ifndef PyMPI_HAVE_MPI_Op #undef MPI_Op typedef void *PyMPI_MPI_Op; #define MPI_Op PyMPI_MPI_Op #endif #ifndef PyMPI_HAVE_MPI_Group #undef MPI_Group typedef void *PyMPI_MPI_Group; #define MPI_Group PyMPI_MPI_Group #endif #ifndef PyMPI_HAVE_MPI_Info #undef MPI_Info typedef void *PyMPI_MPI_Info; #define MPI_Info PyMPI_MPI_Info #endif #ifndef PyMPI_HAVE_MPI_Comm #undef MPI_Comm typedef void *PyMPI_MPI_Comm; #define MPI_Comm PyMPI_MPI_Comm #endif #ifndef PyMPI_HAVE_MPI_Win #undef MPI_Win typedef void *PyMPI_MPI_Win; #define MPI_Win PyMPI_MPI_Win #endif #ifndef PyMPI_HAVE_MPI_File #undef MPI_File typedef void *PyMPI_MPI_File; #define MPI_File PyMPI_MPI_File #endif #ifndef PyMPI_HAVE_MPI_Errhandler #undef MPI_Errhandler typedef void *PyMPI_MPI_Errhandler; #define MPI_Errhandler PyMPI_MPI_Errhandler #endif #ifndef PyMPI_HAVE_MPI_UNDEFINED #undef MPI_UNDEFINED #define MPI_UNDEFINED (-32766) #endif #ifndef PyMPI_HAVE_MPI_ANY_SOURCE #undef MPI_ANY_SOURCE #define MPI_ANY_SOURCE (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_ANY_TAG #undef MPI_ANY_TAG #define MPI_ANY_TAG (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_PROC_NULL #undef MPI_PROC_NULL #define MPI_PROC_NULL (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_ROOT #undef MPI_ROOT #define MPI_ROOT (MPI_PROC_NULL) #endif #ifndef PyMPI_HAVE_MPI_IDENT #undef MPI_IDENT #define MPI_IDENT (1) #endif #ifndef PyMPI_HAVE_MPI_CONGRUENT #undef MPI_CONGRUENT #define MPI_CONGRUENT (2) #endif #ifndef PyMPI_HAVE_MPI_SIMILAR #undef MPI_SIMILAR #define MPI_SIMILAR (3) #endif #ifndef PyMPI_HAVE_MPI_UNEQUAL #undef MPI_UNEQUAL #define MPI_UNEQUAL (4) #endif #ifndef PyMPI_HAVE_MPI_BOTTOM #undef MPI_BOTTOM #define MPI_BOTTOM ((void*)0) #endif #ifndef PyMPI_HAVE_MPI_IN_PLACE #undef MPI_IN_PLACE #define MPI_IN_PLACE ((void*)0) #endif #ifndef PyMPI_HAVE_MPI_KEYVAL_INVALID #undef MPI_KEYVAL_INVALID #define MPI_KEYVAL_INVALID (0) #endif #ifndef PyMPI_HAVE_MPI_MAX_OBJECT_NAME #undef MPI_MAX_OBJECT_NAME #define MPI_MAX_OBJECT_NAME (1) #endif #ifndef PyMPI_HAVE_MPI_DATATYPE_NULL #undef MPI_DATATYPE_NULL #define MPI_DATATYPE_NULL ((MPI_Datatype)0) #endif #ifndef PyMPI_HAVE_MPI_PACKED #undef MPI_PACKED #define MPI_PACKED ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_BYTE #undef MPI_BYTE #define MPI_BYTE ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_AINT #undef MPI_AINT #define MPI_AINT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_OFFSET #undef MPI_OFFSET #define MPI_OFFSET ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_COUNT #undef MPI_COUNT #define MPI_COUNT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_CHAR #undef MPI_CHAR #define MPI_CHAR ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_WCHAR #undef MPI_WCHAR #define MPI_WCHAR ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_SIGNED_CHAR #undef MPI_SIGNED_CHAR #define MPI_SIGNED_CHAR ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_SHORT #undef MPI_SHORT #define MPI_SHORT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INT #undef MPI_INT #define MPI_INT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LONG #undef MPI_LONG #define MPI_LONG ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LONG_LONG #undef MPI_LONG_LONG #define MPI_LONG_LONG ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LONG_LONG_INT #undef MPI_LONG_LONG_INT #define MPI_LONG_LONG_INT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UNSIGNED_CHAR #undef MPI_UNSIGNED_CHAR #define MPI_UNSIGNED_CHAR ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UNSIGNED_SHORT #undef MPI_UNSIGNED_SHORT #define MPI_UNSIGNED_SHORT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UNSIGNED #undef MPI_UNSIGNED #define MPI_UNSIGNED ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UNSIGNED_LONG #undef MPI_UNSIGNED_LONG #define MPI_UNSIGNED_LONG ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UNSIGNED_LONG_LONG #undef MPI_UNSIGNED_LONG_LONG #define MPI_UNSIGNED_LONG_LONG ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_FLOAT #undef MPI_FLOAT #define MPI_FLOAT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_DOUBLE #undef MPI_DOUBLE #define MPI_DOUBLE ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LONG_DOUBLE #undef MPI_LONG_DOUBLE #define MPI_LONG_DOUBLE ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_C_BOOL #undef MPI_C_BOOL #define MPI_C_BOOL ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INT8_T #undef MPI_INT8_T #define MPI_INT8_T ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INT16_T #undef MPI_INT16_T #define MPI_INT16_T ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INT32_T #undef MPI_INT32_T #define MPI_INT32_T ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INT64_T #undef MPI_INT64_T #define MPI_INT64_T ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UINT8_T #undef MPI_UINT8_T #define MPI_UINT8_T ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UINT16_T #undef MPI_UINT16_T #define MPI_UINT16_T ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UINT32_T #undef MPI_UINT32_T #define MPI_UINT32_T ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UINT64_T #undef MPI_UINT64_T #define MPI_UINT64_T ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_C_COMPLEX #undef MPI_C_COMPLEX #define MPI_C_COMPLEX ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_C_FLOAT_COMPLEX #undef MPI_C_FLOAT_COMPLEX #define MPI_C_FLOAT_COMPLEX ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_C_DOUBLE_COMPLEX #undef MPI_C_DOUBLE_COMPLEX #define MPI_C_DOUBLE_COMPLEX ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_C_LONG_DOUBLE_COMPLEX #undef MPI_C_LONG_DOUBLE_COMPLEX #define MPI_C_LONG_DOUBLE_COMPLEX ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_CXX_BOOL #undef MPI_CXX_BOOL #define MPI_CXX_BOOL ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_CXX_FLOAT_COMPLEX #undef MPI_CXX_FLOAT_COMPLEX #define MPI_CXX_FLOAT_COMPLEX ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_CXX_DOUBLE_COMPLEX #undef MPI_CXX_DOUBLE_COMPLEX #define MPI_CXX_DOUBLE_COMPLEX ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_CXX_LONG_DOUBLE_COMPLEX #undef MPI_CXX_LONG_DOUBLE_COMPLEX #define MPI_CXX_LONG_DOUBLE_COMPLEX ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_SHORT_INT #undef MPI_SHORT_INT #define MPI_SHORT_INT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_2INT #undef MPI_2INT #define MPI_2INT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LONG_INT #undef MPI_LONG_INT #define MPI_LONG_INT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_FLOAT_INT #undef MPI_FLOAT_INT #define MPI_FLOAT_INT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_DOUBLE_INT #undef MPI_DOUBLE_INT #define MPI_DOUBLE_INT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LONG_DOUBLE_INT #undef MPI_LONG_DOUBLE_INT #define MPI_LONG_DOUBLE_INT ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_CHARACTER #undef MPI_CHARACTER #define MPI_CHARACTER ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LOGICAL #undef MPI_LOGICAL #define MPI_LOGICAL ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INTEGER #undef MPI_INTEGER #define MPI_INTEGER ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_REAL #undef MPI_REAL #define MPI_REAL ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_DOUBLE_PRECISION #undef MPI_DOUBLE_PRECISION #define MPI_DOUBLE_PRECISION ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_COMPLEX #undef MPI_COMPLEX #define MPI_COMPLEX ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_DOUBLE_COMPLEX #undef MPI_DOUBLE_COMPLEX #define MPI_DOUBLE_COMPLEX ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LOGICAL1 #undef MPI_LOGICAL1 #define MPI_LOGICAL1 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LOGICAL2 #undef MPI_LOGICAL2 #define MPI_LOGICAL2 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LOGICAL4 #undef MPI_LOGICAL4 #define MPI_LOGICAL4 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LOGICAL8 #undef MPI_LOGICAL8 #define MPI_LOGICAL8 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INTEGER1 #undef MPI_INTEGER1 #define MPI_INTEGER1 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INTEGER2 #undef MPI_INTEGER2 #define MPI_INTEGER2 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INTEGER4 #undef MPI_INTEGER4 #define MPI_INTEGER4 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INTEGER8 #undef MPI_INTEGER8 #define MPI_INTEGER8 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_INTEGER16 #undef MPI_INTEGER16 #define MPI_INTEGER16 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_REAL2 #undef MPI_REAL2 #define MPI_REAL2 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_REAL4 #undef MPI_REAL4 #define MPI_REAL4 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_REAL8 #undef MPI_REAL8 #define MPI_REAL8 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_REAL16 #undef MPI_REAL16 #define MPI_REAL16 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_COMPLEX4 #undef MPI_COMPLEX4 #define MPI_COMPLEX4 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_COMPLEX8 #undef MPI_COMPLEX8 #define MPI_COMPLEX8 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_COMPLEX16 #undef MPI_COMPLEX16 #define MPI_COMPLEX16 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_COMPLEX32 #undef MPI_COMPLEX32 #define MPI_COMPLEX32 ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_UB #undef MPI_UB #define MPI_UB ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_LB #undef MPI_LB #define MPI_LB ((MPI_Datatype)MPI_DATATYPE_NULL) #endif #ifndef PyMPI_HAVE_MPI_Type_lb #undef MPI_Type_lb #define MPI_Type_lb(a1,a2) PyMPI_UNAVAILABLE("MPI_Type_lb",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_ub #undef MPI_Type_ub #define MPI_Type_ub(a1,a2) PyMPI_UNAVAILABLE("MPI_Type_ub",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_extent #undef MPI_Type_extent #define MPI_Type_extent(a1,a2) PyMPI_UNAVAILABLE("MPI_Type_extent",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Address #undef MPI_Address #define MPI_Address(a1,a2) PyMPI_UNAVAILABLE("MPI_Address",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_hvector #undef MPI_Type_hvector #define MPI_Type_hvector(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Type_hvector",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Type_hindexed #undef MPI_Type_hindexed #define MPI_Type_hindexed(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Type_hindexed",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Type_struct #undef MPI_Type_struct #define MPI_Type_struct(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Type_struct",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_HVECTOR_INTEGER #undef MPI_COMBINER_HVECTOR_INTEGER #define MPI_COMBINER_HVECTOR_INTEGER (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_HINDEXED_INTEGER #undef MPI_COMBINER_HINDEXED_INTEGER #define MPI_COMBINER_HINDEXED_INTEGER (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_STRUCT_INTEGER #undef MPI_COMBINER_STRUCT_INTEGER #define MPI_COMBINER_STRUCT_INTEGER (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_Type_dup #undef MPI_Type_dup #define MPI_Type_dup(a1,a2) PyMPI_UNAVAILABLE("MPI_Type_dup",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_contiguous #undef MPI_Type_contiguous #define MPI_Type_contiguous(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_contiguous",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Type_vector #undef MPI_Type_vector #define MPI_Type_vector(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Type_vector",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Type_indexed #undef MPI_Type_indexed #define MPI_Type_indexed(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Type_indexed",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Type_create_indexed_block #undef MPI_Type_create_indexed_block #define MPI_Type_create_indexed_block(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Type_create_indexed_block",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_ORDER_C #undef MPI_ORDER_C #define MPI_ORDER_C (0) #endif #ifndef PyMPI_HAVE_MPI_ORDER_FORTRAN #undef MPI_ORDER_FORTRAN #define MPI_ORDER_FORTRAN (1) #endif #ifndef PyMPI_HAVE_MPI_Type_create_subarray #undef MPI_Type_create_subarray #define MPI_Type_create_subarray(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Type_create_subarray",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_DISTRIBUTE_NONE #undef MPI_DISTRIBUTE_NONE #define MPI_DISTRIBUTE_NONE (0) #endif #ifndef PyMPI_HAVE_MPI_DISTRIBUTE_BLOCK #undef MPI_DISTRIBUTE_BLOCK #define MPI_DISTRIBUTE_BLOCK (1) #endif #ifndef PyMPI_HAVE_MPI_DISTRIBUTE_CYCLIC #undef MPI_DISTRIBUTE_CYCLIC #define MPI_DISTRIBUTE_CYCLIC (2) #endif #ifndef PyMPI_HAVE_MPI_DISTRIBUTE_DFLT_DARG #undef MPI_DISTRIBUTE_DFLT_DARG #define MPI_DISTRIBUTE_DFLT_DARG (4) #endif #ifndef PyMPI_HAVE_MPI_Type_create_darray #undef MPI_Type_create_darray #define MPI_Type_create_darray(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) PyMPI_UNAVAILABLE("MPI_Type_create_darray",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) #endif #ifndef PyMPI_HAVE_MPI_Get_address #undef MPI_Get_address #define MPI_Get_address MPI_Address #endif #ifndef PyMPI_HAVE_MPI_Aint_add #undef MPI_Aint_add #define MPI_Aint_add(a1,a2) PyMPI_UNAVAILABLE("MPI_Aint_add",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Aint_diff #undef MPI_Aint_diff #define MPI_Aint_diff(a1,a2) PyMPI_UNAVAILABLE("MPI_Aint_diff",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_create_hvector #undef MPI_Type_create_hvector #define MPI_Type_create_hvector MPI_Type_hvector #endif #ifndef PyMPI_HAVE_MPI_Type_create_hindexed #undef MPI_Type_create_hindexed #define MPI_Type_create_hindexed MPI_Type_hindexed #endif #ifndef PyMPI_HAVE_MPI_Type_create_hindexed_block #undef MPI_Type_create_hindexed_block #define MPI_Type_create_hindexed_block(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Type_create_hindexed_block",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Type_create_struct #undef MPI_Type_create_struct #define MPI_Type_create_struct MPI_Type_struct #endif #ifndef PyMPI_HAVE_MPI_Type_create_resized #undef MPI_Type_create_resized #define MPI_Type_create_resized(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Type_create_resized",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Type_size #undef MPI_Type_size #define MPI_Type_size(a1,a2) PyMPI_UNAVAILABLE("MPI_Type_size",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_size_x #undef MPI_Type_size_x #define MPI_Type_size_x(a1,a2) PyMPI_UNAVAILABLE("MPI_Type_size_x",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_get_extent #undef MPI_Type_get_extent #define MPI_Type_get_extent(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_get_extent",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Type_get_extent_x #undef MPI_Type_get_extent_x #define MPI_Type_get_extent_x(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_get_extent_x",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Type_get_true_extent #undef MPI_Type_get_true_extent #define MPI_Type_get_true_extent(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_get_true_extent",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Type_get_true_extent_x #undef MPI_Type_get_true_extent_x #define MPI_Type_get_true_extent_x(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_get_true_extent_x",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Type_create_f90_integer #undef MPI_Type_create_f90_integer #define MPI_Type_create_f90_integer(a1,a2) PyMPI_UNAVAILABLE("MPI_Type_create_f90_integer",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_create_f90_real #undef MPI_Type_create_f90_real #define MPI_Type_create_f90_real(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_create_f90_real",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Type_create_f90_complex #undef MPI_Type_create_f90_complex #define MPI_Type_create_f90_complex(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_create_f90_complex",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_TYPECLASS_INTEGER #undef MPI_TYPECLASS_INTEGER #define MPI_TYPECLASS_INTEGER (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_TYPECLASS_REAL #undef MPI_TYPECLASS_REAL #define MPI_TYPECLASS_REAL (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_TYPECLASS_COMPLEX #undef MPI_TYPECLASS_COMPLEX #define MPI_TYPECLASS_COMPLEX (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_Type_match_size #undef MPI_Type_match_size #define MPI_Type_match_size(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_match_size",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Type_commit #undef MPI_Type_commit #define MPI_Type_commit(a1) PyMPI_UNAVAILABLE("MPI_Type_commit",a1) #endif #ifndef PyMPI_HAVE_MPI_Type_free #undef MPI_Type_free #define MPI_Type_free(a1) PyMPI_UNAVAILABLE("MPI_Type_free",a1) #endif #ifndef PyMPI_HAVE_MPI_Pack #undef MPI_Pack #define MPI_Pack(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Pack",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Unpack #undef MPI_Unpack #define MPI_Unpack(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Unpack",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Pack_size #undef MPI_Pack_size #define MPI_Pack_size(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Pack_size",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Pack_external #undef MPI_Pack_external #define MPI_Pack_external(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Pack_external",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Unpack_external #undef MPI_Unpack_external #define MPI_Unpack_external(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Unpack_external",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Pack_external_size #undef MPI_Pack_external_size #define MPI_Pack_external_size(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Pack_external_size",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_NAMED #undef MPI_COMBINER_NAMED #define MPI_COMBINER_NAMED (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_DUP #undef MPI_COMBINER_DUP #define MPI_COMBINER_DUP (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_CONTIGUOUS #undef MPI_COMBINER_CONTIGUOUS #define MPI_COMBINER_CONTIGUOUS (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_VECTOR #undef MPI_COMBINER_VECTOR #define MPI_COMBINER_VECTOR (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_HVECTOR #undef MPI_COMBINER_HVECTOR #define MPI_COMBINER_HVECTOR (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_INDEXED #undef MPI_COMBINER_INDEXED #define MPI_COMBINER_INDEXED (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_HINDEXED #undef MPI_COMBINER_HINDEXED #define MPI_COMBINER_HINDEXED (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_INDEXED_BLOCK #undef MPI_COMBINER_INDEXED_BLOCK #define MPI_COMBINER_INDEXED_BLOCK (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_HINDEXED_BLOCK #undef MPI_COMBINER_HINDEXED_BLOCK #define MPI_COMBINER_HINDEXED_BLOCK (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_STRUCT #undef MPI_COMBINER_STRUCT #define MPI_COMBINER_STRUCT (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_SUBARRAY #undef MPI_COMBINER_SUBARRAY #define MPI_COMBINER_SUBARRAY (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_DARRAY #undef MPI_COMBINER_DARRAY #define MPI_COMBINER_DARRAY (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_F90_REAL #undef MPI_COMBINER_F90_REAL #define MPI_COMBINER_F90_REAL (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_F90_COMPLEX #undef MPI_COMBINER_F90_COMPLEX #define MPI_COMBINER_F90_COMPLEX (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_F90_INTEGER #undef MPI_COMBINER_F90_INTEGER #define MPI_COMBINER_F90_INTEGER (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_COMBINER_RESIZED #undef MPI_COMBINER_RESIZED #define MPI_COMBINER_RESIZED (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_Type_get_envelope #undef MPI_Type_get_envelope #define MPI_Type_get_envelope(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Type_get_envelope",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Type_get_contents #undef MPI_Type_get_contents #define MPI_Type_get_contents(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Type_get_contents",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Type_get_name #undef MPI_Type_get_name #define MPI_Type_get_name(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_get_name",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Type_set_name #undef MPI_Type_set_name #define MPI_Type_set_name(a1,a2) PyMPI_UNAVAILABLE("MPI_Type_set_name",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_get_attr #undef MPI_Type_get_attr #define MPI_Type_get_attr(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Type_get_attr",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Type_set_attr #undef MPI_Type_set_attr #define MPI_Type_set_attr(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Type_set_attr",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Type_delete_attr #undef MPI_Type_delete_attr #define MPI_Type_delete_attr(a1,a2) PyMPI_UNAVAILABLE("MPI_Type_delete_attr",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_copy_attr_function #undef MPI_Type_copy_attr_function typedef int (MPIAPI PyMPI_MPI_Type_copy_attr_function)(MPI_Datatype,int,void*,void*,void*,int*); #define MPI_Type_copy_attr_function PyMPI_MPI_Type_copy_attr_function #endif #ifndef PyMPI_HAVE_MPI_Type_delete_attr_function #undef MPI_Type_delete_attr_function typedef int (MPIAPI PyMPI_MPI_Type_delete_attr_function)(MPI_Datatype,int,void*,void*); #define MPI_Type_delete_attr_function PyMPI_MPI_Type_delete_attr_function #endif #ifndef PyMPI_HAVE_MPI_TYPE_NULL_COPY_FN #undef MPI_TYPE_NULL_COPY_FN #define MPI_TYPE_NULL_COPY_FN (0) #endif #ifndef PyMPI_HAVE_MPI_TYPE_DUP_FN #undef MPI_TYPE_DUP_FN #define MPI_TYPE_DUP_FN (0) #endif #ifndef PyMPI_HAVE_MPI_TYPE_NULL_DELETE_FN #undef MPI_TYPE_NULL_DELETE_FN #define MPI_TYPE_NULL_DELETE_FN (0) #endif #ifndef PyMPI_HAVE_MPI_Type_create_keyval #undef MPI_Type_create_keyval #define MPI_Type_create_keyval(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Type_create_keyval",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Type_free_keyval #undef MPI_Type_free_keyval #define MPI_Type_free_keyval(a1) PyMPI_UNAVAILABLE("MPI_Type_free_keyval",a1) #endif #ifndef PyMPI_HAVE_MPI_STATUS_IGNORE #undef MPI_STATUS_IGNORE #define MPI_STATUS_IGNORE (0) #endif #ifndef PyMPI_HAVE_MPI_STATUSES_IGNORE #undef MPI_STATUSES_IGNORE #define MPI_STATUSES_IGNORE (0) #endif #ifndef PyMPI_HAVE_MPI_Get_count #undef MPI_Get_count #define MPI_Get_count(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Get_count",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Get_elements #undef MPI_Get_elements #define MPI_Get_elements(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Get_elements",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Get_elements_x #undef MPI_Get_elements_x #define MPI_Get_elements_x(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Get_elements_x",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Status_set_elements #undef MPI_Status_set_elements #define MPI_Status_set_elements(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Status_set_elements",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Status_set_elements_x #undef MPI_Status_set_elements_x #define MPI_Status_set_elements_x(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Status_set_elements_x",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Test_cancelled #undef MPI_Test_cancelled #define MPI_Test_cancelled(a1,a2) PyMPI_UNAVAILABLE("MPI_Test_cancelled",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Status_set_cancelled #undef MPI_Status_set_cancelled #define MPI_Status_set_cancelled(a1,a2) PyMPI_UNAVAILABLE("MPI_Status_set_cancelled",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_REQUEST_NULL #undef MPI_REQUEST_NULL #define MPI_REQUEST_NULL ((MPI_Request)0) #endif #ifndef PyMPI_HAVE_MPI_Request_free #undef MPI_Request_free #define MPI_Request_free(a1) PyMPI_UNAVAILABLE("MPI_Request_free",a1) #endif #ifndef PyMPI_HAVE_MPI_Wait #undef MPI_Wait #define MPI_Wait(a1,a2) PyMPI_UNAVAILABLE("MPI_Wait",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Test #undef MPI_Test #define MPI_Test(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Test",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Request_get_status #undef MPI_Request_get_status #define MPI_Request_get_status(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Request_get_status",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Cancel #undef MPI_Cancel #define MPI_Cancel(a1) PyMPI_UNAVAILABLE("MPI_Cancel",a1) #endif #ifndef PyMPI_HAVE_MPI_Waitany #undef MPI_Waitany #define MPI_Waitany(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Waitany",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Testany #undef MPI_Testany #define MPI_Testany(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Testany",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Waitall #undef MPI_Waitall #define MPI_Waitall(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Waitall",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Testall #undef MPI_Testall #define MPI_Testall(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Testall",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Waitsome #undef MPI_Waitsome #define MPI_Waitsome(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Waitsome",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Testsome #undef MPI_Testsome #define MPI_Testsome(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Testsome",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Start #undef MPI_Start #define MPI_Start(a1) PyMPI_UNAVAILABLE("MPI_Start",a1) #endif #ifndef PyMPI_HAVE_MPI_Startall #undef MPI_Startall #define MPI_Startall(a1,a2) PyMPI_UNAVAILABLE("MPI_Startall",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Grequest_cancel_function #undef MPI_Grequest_cancel_function typedef int (MPIAPI PyMPI_MPI_Grequest_cancel_function)(void*,int); #define MPI_Grequest_cancel_function PyMPI_MPI_Grequest_cancel_function #endif #ifndef PyMPI_HAVE_MPI_Grequest_free_function #undef MPI_Grequest_free_function typedef int (MPIAPI PyMPI_MPI_Grequest_free_function)(void*); #define MPI_Grequest_free_function PyMPI_MPI_Grequest_free_function #endif #ifndef PyMPI_HAVE_MPI_Grequest_query_function #undef MPI_Grequest_query_function typedef int (MPIAPI PyMPI_MPI_Grequest_query_function)(void*,MPI_Status*); #define MPI_Grequest_query_function PyMPI_MPI_Grequest_query_function #endif #ifndef PyMPI_HAVE_MPI_Grequest_start #undef MPI_Grequest_start #define MPI_Grequest_start(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Grequest_start",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Grequest_complete #undef MPI_Grequest_complete #define MPI_Grequest_complete(a1) PyMPI_UNAVAILABLE("MPI_Grequest_complete",a1) #endif #ifndef PyMPI_HAVE_MPI_OP_NULL #undef MPI_OP_NULL #define MPI_OP_NULL ((MPI_Op)0) #endif #ifndef PyMPI_HAVE_MPI_MAX #undef MPI_MAX #define MPI_MAX ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_MIN #undef MPI_MIN #define MPI_MIN ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_SUM #undef MPI_SUM #define MPI_SUM ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_PROD #undef MPI_PROD #define MPI_PROD ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_LAND #undef MPI_LAND #define MPI_LAND ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_BAND #undef MPI_BAND #define MPI_BAND ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_LOR #undef MPI_LOR #define MPI_LOR ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_BOR #undef MPI_BOR #define MPI_BOR ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_LXOR #undef MPI_LXOR #define MPI_LXOR ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_BXOR #undef MPI_BXOR #define MPI_BXOR ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_MAXLOC #undef MPI_MAXLOC #define MPI_MAXLOC ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_MINLOC #undef MPI_MINLOC #define MPI_MINLOC ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_REPLACE #undef MPI_REPLACE #define MPI_REPLACE ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_NO_OP #undef MPI_NO_OP #define MPI_NO_OP ((MPI_Op)MPI_OP_NULL) #endif #ifndef PyMPI_HAVE_MPI_Op_free #undef MPI_Op_free #define MPI_Op_free(a1) PyMPI_UNAVAILABLE("MPI_Op_free",a1) #endif #ifndef PyMPI_HAVE_MPI_User_function #undef MPI_User_function typedef void (MPIAPI PyMPI_MPI_User_function)(void*,void*,int*,MPI_Datatype*); #define MPI_User_function PyMPI_MPI_User_function #endif #ifndef PyMPI_HAVE_MPI_Op_create #undef MPI_Op_create #define MPI_Op_create(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Op_create",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Op_commutative #undef MPI_Op_commutative #define MPI_Op_commutative(a1,a2) PyMPI_UNAVAILABLE("MPI_Op_commutative",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_INFO_NULL #undef MPI_INFO_NULL #define MPI_INFO_NULL ((MPI_Info)0) #endif #ifndef PyMPI_HAVE_MPI_INFO_ENV #undef MPI_INFO_ENV #define MPI_INFO_ENV ((MPI_Info)MPI_INFO_NULL) #endif #ifndef PyMPI_HAVE_MPI_Info_free #undef MPI_Info_free #define MPI_Info_free(a1) PyMPI_UNAVAILABLE("MPI_Info_free",a1) #endif #ifndef PyMPI_HAVE_MPI_Info_create #undef MPI_Info_create #define MPI_Info_create(a1) PyMPI_UNAVAILABLE("MPI_Info_create",a1) #endif #ifndef PyMPI_HAVE_MPI_Info_dup #undef MPI_Info_dup #define MPI_Info_dup(a1,a2) PyMPI_UNAVAILABLE("MPI_Info_dup",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_MAX_INFO_KEY #undef MPI_MAX_INFO_KEY #define MPI_MAX_INFO_KEY (1) #endif #ifndef PyMPI_HAVE_MPI_MAX_INFO_VAL #undef MPI_MAX_INFO_VAL #define MPI_MAX_INFO_VAL (1) #endif #ifndef PyMPI_HAVE_MPI_Info_get #undef MPI_Info_get #define MPI_Info_get(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Info_get",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Info_set #undef MPI_Info_set #define MPI_Info_set(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Info_set",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Info_delete #undef MPI_Info_delete #define MPI_Info_delete(a1,a2) PyMPI_UNAVAILABLE("MPI_Info_delete",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Info_get_nkeys #undef MPI_Info_get_nkeys #define MPI_Info_get_nkeys(a1,a2) PyMPI_UNAVAILABLE("MPI_Info_get_nkeys",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Info_get_nthkey #undef MPI_Info_get_nthkey #define MPI_Info_get_nthkey(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Info_get_nthkey",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Info_get_valuelen #undef MPI_Info_get_valuelen #define MPI_Info_get_valuelen(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Info_get_valuelen",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_GROUP_NULL #undef MPI_GROUP_NULL #define MPI_GROUP_NULL ((MPI_Group)0) #endif #ifndef PyMPI_HAVE_MPI_GROUP_EMPTY #undef MPI_GROUP_EMPTY #define MPI_GROUP_EMPTY ((MPI_Group)1) #endif #ifndef PyMPI_HAVE_MPI_Group_free #undef MPI_Group_free #define MPI_Group_free(a1) PyMPI_UNAVAILABLE("MPI_Group_free",a1) #endif #ifndef PyMPI_HAVE_MPI_Group_size #undef MPI_Group_size #define MPI_Group_size(a1,a2) PyMPI_UNAVAILABLE("MPI_Group_size",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Group_rank #undef MPI_Group_rank #define MPI_Group_rank(a1,a2) PyMPI_UNAVAILABLE("MPI_Group_rank",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Group_translate_ranks #undef MPI_Group_translate_ranks #define MPI_Group_translate_ranks(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Group_translate_ranks",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Group_compare #undef MPI_Group_compare #define MPI_Group_compare(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Group_compare",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Group_union #undef MPI_Group_union #define MPI_Group_union(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Group_union",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Group_intersection #undef MPI_Group_intersection #define MPI_Group_intersection(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Group_intersection",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Group_difference #undef MPI_Group_difference #define MPI_Group_difference(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Group_difference",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Group_incl #undef MPI_Group_incl #define MPI_Group_incl(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Group_incl",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Group_excl #undef MPI_Group_excl #define MPI_Group_excl(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Group_excl",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Group_range_incl #undef MPI_Group_range_incl #define MPI_Group_range_incl(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Group_range_incl",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Group_range_excl #undef MPI_Group_range_excl #define MPI_Group_range_excl(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Group_range_excl",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_COMM_NULL #undef MPI_COMM_NULL #define MPI_COMM_NULL ((MPI_Comm)0) #endif #ifndef PyMPI_HAVE_MPI_COMM_SELF #undef MPI_COMM_SELF #define MPI_COMM_SELF ((MPI_Comm)MPI_COMM_NULL) #endif #ifndef PyMPI_HAVE_MPI_COMM_WORLD #undef MPI_COMM_WORLD #define MPI_COMM_WORLD ((MPI_Comm)MPI_COMM_NULL) #endif #ifndef PyMPI_HAVE_MPI_Comm_free #undef MPI_Comm_free #define MPI_Comm_free(a1) PyMPI_UNAVAILABLE("MPI_Comm_free",a1) #endif #ifndef PyMPI_HAVE_MPI_Comm_group #undef MPI_Comm_group #define MPI_Comm_group(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_group",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Comm_size #undef MPI_Comm_size #define MPI_Comm_size(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_size",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Comm_rank #undef MPI_Comm_rank #define MPI_Comm_rank(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_rank",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Comm_compare #undef MPI_Comm_compare #define MPI_Comm_compare(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Comm_compare",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Topo_test #undef MPI_Topo_test #define MPI_Topo_test(a1,a2) PyMPI_UNAVAILABLE("MPI_Topo_test",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Comm_test_inter #undef MPI_Comm_test_inter #define MPI_Comm_test_inter(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_test_inter",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Abort #undef MPI_Abort #define MPI_Abort(a1,a2) PyMPI_UNAVAILABLE("MPI_Abort",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Send #undef MPI_Send #define MPI_Send(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Send",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Recv #undef MPI_Recv #define MPI_Recv(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Recv",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Sendrecv #undef MPI_Sendrecv #define MPI_Sendrecv(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) PyMPI_UNAVAILABLE("MPI_Sendrecv",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) #endif #ifndef PyMPI_HAVE_MPI_Sendrecv_replace #undef MPI_Sendrecv_replace #define MPI_Sendrecv_replace(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Sendrecv_replace",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_BSEND_OVERHEAD #undef MPI_BSEND_OVERHEAD #define MPI_BSEND_OVERHEAD (0) #endif #ifndef PyMPI_HAVE_MPI_Buffer_attach #undef MPI_Buffer_attach #define MPI_Buffer_attach(a1,a2) PyMPI_UNAVAILABLE("MPI_Buffer_attach",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Buffer_detach #undef MPI_Buffer_detach #define MPI_Buffer_detach(a1,a2) PyMPI_UNAVAILABLE("MPI_Buffer_detach",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Bsend #undef MPI_Bsend #define MPI_Bsend(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Bsend",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Ssend #undef MPI_Ssend #define MPI_Ssend(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Ssend",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Rsend #undef MPI_Rsend #define MPI_Rsend(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Rsend",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Isend #undef MPI_Isend #define MPI_Isend(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Isend",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Ibsend #undef MPI_Ibsend #define MPI_Ibsend(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Ibsend",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Issend #undef MPI_Issend #define MPI_Issend(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Issend",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Irsend #undef MPI_Irsend #define MPI_Irsend(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Irsend",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Irecv #undef MPI_Irecv #define MPI_Irecv(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Irecv",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Send_init #undef MPI_Send_init #define MPI_Send_init(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Send_init",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Bsend_init #undef MPI_Bsend_init #define MPI_Bsend_init(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Bsend_init",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Ssend_init #undef MPI_Ssend_init #define MPI_Ssend_init(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Ssend_init",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Rsend_init #undef MPI_Rsend_init #define MPI_Rsend_init(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Rsend_init",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Recv_init #undef MPI_Recv_init #define MPI_Recv_init(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Recv_init",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Probe #undef MPI_Probe #define MPI_Probe(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Probe",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Iprobe #undef MPI_Iprobe #define MPI_Iprobe(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Iprobe",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_MESSAGE_NULL #undef MPI_MESSAGE_NULL #define MPI_MESSAGE_NULL ((MPI_Message)0) #endif #ifndef PyMPI_HAVE_MPI_MESSAGE_NO_PROC #undef MPI_MESSAGE_NO_PROC #define MPI_MESSAGE_NO_PROC ((MPI_Message)MPI_MESSAGE_NULL) #endif #ifndef PyMPI_HAVE_MPI_Mprobe #undef MPI_Mprobe #define MPI_Mprobe(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Mprobe",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Improbe #undef MPI_Improbe #define MPI_Improbe(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Improbe",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Mrecv #undef MPI_Mrecv #define MPI_Mrecv(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Mrecv",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Imrecv #undef MPI_Imrecv #define MPI_Imrecv(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Imrecv",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Barrier #undef MPI_Barrier #define MPI_Barrier(a1) PyMPI_UNAVAILABLE("MPI_Barrier",a1) #endif #ifndef PyMPI_HAVE_MPI_Bcast #undef MPI_Bcast #define MPI_Bcast(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Bcast",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Gather #undef MPI_Gather #define MPI_Gather(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Gather",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Gatherv #undef MPI_Gatherv #define MPI_Gatherv(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Gatherv",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Scatter #undef MPI_Scatter #define MPI_Scatter(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Scatter",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Scatterv #undef MPI_Scatterv #define MPI_Scatterv(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Scatterv",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Allgather #undef MPI_Allgather #define MPI_Allgather(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Allgather",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Allgatherv #undef MPI_Allgatherv #define MPI_Allgatherv(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Allgatherv",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Alltoall #undef MPI_Alltoall #define MPI_Alltoall(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Alltoall",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Alltoallv #undef MPI_Alltoallv #define MPI_Alltoallv(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Alltoallv",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Alltoallw #undef MPI_Alltoallw #define MPI_Alltoallw(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Alltoallw",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Reduce #undef MPI_Reduce #define MPI_Reduce(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Reduce",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Allreduce #undef MPI_Allreduce #define MPI_Allreduce(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Allreduce",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Reduce_local #undef MPI_Reduce_local #define MPI_Reduce_local(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Reduce_local",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Reduce_scatter_block #undef MPI_Reduce_scatter_block #define MPI_Reduce_scatter_block(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Reduce_scatter_block",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Reduce_scatter #undef MPI_Reduce_scatter #define MPI_Reduce_scatter(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Reduce_scatter",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Scan #undef MPI_Scan #define MPI_Scan(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Scan",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Exscan #undef MPI_Exscan #define MPI_Exscan(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Exscan",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Neighbor_allgather #undef MPI_Neighbor_allgather #define MPI_Neighbor_allgather(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Neighbor_allgather",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Neighbor_allgatherv #undef MPI_Neighbor_allgatherv #define MPI_Neighbor_allgatherv(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Neighbor_allgatherv",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Neighbor_alltoall #undef MPI_Neighbor_alltoall #define MPI_Neighbor_alltoall(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Neighbor_alltoall",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Neighbor_alltoallv #undef MPI_Neighbor_alltoallv #define MPI_Neighbor_alltoallv(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Neighbor_alltoallv",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Neighbor_alltoallw #undef MPI_Neighbor_alltoallw #define MPI_Neighbor_alltoallw(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Neighbor_alltoallw",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Ibarrier #undef MPI_Ibarrier #define MPI_Ibarrier(a1,a2) PyMPI_UNAVAILABLE("MPI_Ibarrier",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Ibcast #undef MPI_Ibcast #define MPI_Ibcast(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Ibcast",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Igather #undef MPI_Igather #define MPI_Igather(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Igather",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Igatherv #undef MPI_Igatherv #define MPI_Igatherv(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) PyMPI_UNAVAILABLE("MPI_Igatherv",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) #endif #ifndef PyMPI_HAVE_MPI_Iscatter #undef MPI_Iscatter #define MPI_Iscatter(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Iscatter",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Iscatterv #undef MPI_Iscatterv #define MPI_Iscatterv(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) PyMPI_UNAVAILABLE("MPI_Iscatterv",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) #endif #ifndef PyMPI_HAVE_MPI_Iallgather #undef MPI_Iallgather #define MPI_Iallgather(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Iallgather",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Iallgatherv #undef MPI_Iallgatherv #define MPI_Iallgatherv(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Iallgatherv",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Ialltoall #undef MPI_Ialltoall #define MPI_Ialltoall(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Ialltoall",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Ialltoallv #undef MPI_Ialltoallv #define MPI_Ialltoallv(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) PyMPI_UNAVAILABLE("MPI_Ialltoallv",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) #endif #ifndef PyMPI_HAVE_MPI_Ialltoallw #undef MPI_Ialltoallw #define MPI_Ialltoallw(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) PyMPI_UNAVAILABLE("MPI_Ialltoallw",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) #endif #ifndef PyMPI_HAVE_MPI_Ireduce #undef MPI_Ireduce #define MPI_Ireduce(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Ireduce",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Iallreduce #undef MPI_Iallreduce #define MPI_Iallreduce(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Iallreduce",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Ireduce_scatter_block #undef MPI_Ireduce_scatter_block #define MPI_Ireduce_scatter_block(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Ireduce_scatter_block",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Ireduce_scatter #undef MPI_Ireduce_scatter #define MPI_Ireduce_scatter(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Ireduce_scatter",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Iscan #undef MPI_Iscan #define MPI_Iscan(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Iscan",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Iexscan #undef MPI_Iexscan #define MPI_Iexscan(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Iexscan",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Ineighbor_allgather #undef MPI_Ineighbor_allgather #define MPI_Ineighbor_allgather(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Ineighbor_allgather",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Ineighbor_allgatherv #undef MPI_Ineighbor_allgatherv #define MPI_Ineighbor_allgatherv(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Ineighbor_allgatherv",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Ineighbor_alltoall #undef MPI_Ineighbor_alltoall #define MPI_Ineighbor_alltoall(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Ineighbor_alltoall",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Ineighbor_alltoallv #undef MPI_Ineighbor_alltoallv #define MPI_Ineighbor_alltoallv(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) PyMPI_UNAVAILABLE("MPI_Ineighbor_alltoallv",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) #endif #ifndef PyMPI_HAVE_MPI_Ineighbor_alltoallw #undef MPI_Ineighbor_alltoallw #define MPI_Ineighbor_alltoallw(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) PyMPI_UNAVAILABLE("MPI_Ineighbor_alltoallw",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) #endif #ifndef PyMPI_HAVE_MPI_Comm_dup #undef MPI_Comm_dup #define MPI_Comm_dup(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_dup",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Comm_dup_with_info #undef MPI_Comm_dup_with_info #define MPI_Comm_dup_with_info(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Comm_dup_with_info",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Comm_idup #undef MPI_Comm_idup #define MPI_Comm_idup(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Comm_idup",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Comm_create #undef MPI_Comm_create #define MPI_Comm_create(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Comm_create",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Comm_create_group #undef MPI_Comm_create_group #define MPI_Comm_create_group(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Comm_create_group",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Comm_split #undef MPI_Comm_split #define MPI_Comm_split(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Comm_split",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_COMM_TYPE_SHARED #undef MPI_COMM_TYPE_SHARED #define MPI_COMM_TYPE_SHARED (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_Comm_split_type #undef MPI_Comm_split_type #define MPI_Comm_split_type(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Comm_split_type",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Comm_set_info #undef MPI_Comm_set_info #define MPI_Comm_set_info(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_set_info",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Comm_get_info #undef MPI_Comm_get_info #define MPI_Comm_get_info(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_get_info",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_CART #undef MPI_CART #define MPI_CART (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_Cart_create #undef MPI_Cart_create #define MPI_Cart_create(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Cart_create",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Cartdim_get #undef MPI_Cartdim_get #define MPI_Cartdim_get(a1,a2) PyMPI_UNAVAILABLE("MPI_Cartdim_get",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Cart_get #undef MPI_Cart_get #define MPI_Cart_get(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Cart_get",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Cart_rank #undef MPI_Cart_rank #define MPI_Cart_rank(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Cart_rank",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Cart_coords #undef MPI_Cart_coords #define MPI_Cart_coords(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Cart_coords",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Cart_shift #undef MPI_Cart_shift #define MPI_Cart_shift(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Cart_shift",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Cart_sub #undef MPI_Cart_sub #define MPI_Cart_sub(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Cart_sub",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Cart_map #undef MPI_Cart_map #define MPI_Cart_map(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Cart_map",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Dims_create #undef MPI_Dims_create #define MPI_Dims_create(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Dims_create",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_GRAPH #undef MPI_GRAPH #define MPI_GRAPH (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_Graph_create #undef MPI_Graph_create #define MPI_Graph_create(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Graph_create",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Graphdims_get #undef MPI_Graphdims_get #define MPI_Graphdims_get(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Graphdims_get",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Graph_get #undef MPI_Graph_get #define MPI_Graph_get(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Graph_get",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Graph_map #undef MPI_Graph_map #define MPI_Graph_map(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Graph_map",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Graph_neighbors_count #undef MPI_Graph_neighbors_count #define MPI_Graph_neighbors_count(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Graph_neighbors_count",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Graph_neighbors #undef MPI_Graph_neighbors #define MPI_Graph_neighbors(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Graph_neighbors",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_DIST_GRAPH #undef MPI_DIST_GRAPH #define MPI_DIST_GRAPH (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_UNWEIGHTED #undef MPI_UNWEIGHTED #define MPI_UNWEIGHTED ((int*)0) #endif #ifndef PyMPI_HAVE_MPI_WEIGHTS_EMPTY #undef MPI_WEIGHTS_EMPTY #define MPI_WEIGHTS_EMPTY ((int*)MPI_UNWEIGHTED) #endif #ifndef PyMPI_HAVE_MPI_Dist_graph_create_adjacent #undef MPI_Dist_graph_create_adjacent #define MPI_Dist_graph_create_adjacent(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) PyMPI_UNAVAILABLE("MPI_Dist_graph_create_adjacent",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) #endif #ifndef PyMPI_HAVE_MPI_Dist_graph_create #undef MPI_Dist_graph_create #define MPI_Dist_graph_create(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Dist_graph_create",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Dist_graph_neighbors_count #undef MPI_Dist_graph_neighbors_count #define MPI_Dist_graph_neighbors_count(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Dist_graph_neighbors_count",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Dist_graph_neighbors #undef MPI_Dist_graph_neighbors #define MPI_Dist_graph_neighbors(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Dist_graph_neighbors",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Intercomm_create #undef MPI_Intercomm_create #define MPI_Intercomm_create(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Intercomm_create",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Comm_remote_group #undef MPI_Comm_remote_group #define MPI_Comm_remote_group(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_remote_group",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Comm_remote_size #undef MPI_Comm_remote_size #define MPI_Comm_remote_size(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_remote_size",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Intercomm_merge #undef MPI_Intercomm_merge #define MPI_Intercomm_merge(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Intercomm_merge",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_MAX_PORT_NAME #undef MPI_MAX_PORT_NAME #define MPI_MAX_PORT_NAME (1) #endif #ifndef PyMPI_HAVE_MPI_Open_port #undef MPI_Open_port #define MPI_Open_port(a1,a2) PyMPI_UNAVAILABLE("MPI_Open_port",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Close_port #undef MPI_Close_port #define MPI_Close_port(a1) PyMPI_UNAVAILABLE("MPI_Close_port",a1) #endif #ifndef PyMPI_HAVE_MPI_Publish_name #undef MPI_Publish_name #define MPI_Publish_name(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Publish_name",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Unpublish_name #undef MPI_Unpublish_name #define MPI_Unpublish_name(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Unpublish_name",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Lookup_name #undef MPI_Lookup_name #define MPI_Lookup_name(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Lookup_name",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Comm_accept #undef MPI_Comm_accept #define MPI_Comm_accept(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Comm_accept",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Comm_connect #undef MPI_Comm_connect #define MPI_Comm_connect(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Comm_connect",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Comm_join #undef MPI_Comm_join #define MPI_Comm_join(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_join",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Comm_disconnect #undef MPI_Comm_disconnect #define MPI_Comm_disconnect(a1) PyMPI_UNAVAILABLE("MPI_Comm_disconnect",a1) #endif #ifndef PyMPI_HAVE_MPI_ARGV_NULL #undef MPI_ARGV_NULL #define MPI_ARGV_NULL ((char**)0) #endif #ifndef PyMPI_HAVE_MPI_ARGVS_NULL #undef MPI_ARGVS_NULL #define MPI_ARGVS_NULL ((char***)0) #endif #ifndef PyMPI_HAVE_MPI_ERRCODES_IGNORE #undef MPI_ERRCODES_IGNORE #define MPI_ERRCODES_IGNORE ((int*)0) #endif #ifndef PyMPI_HAVE_MPI_Comm_spawn #undef MPI_Comm_spawn #define MPI_Comm_spawn(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Comm_spawn",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Comm_spawn_multiple #undef MPI_Comm_spawn_multiple #define MPI_Comm_spawn_multiple(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Comm_spawn_multiple",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Comm_get_parent #undef MPI_Comm_get_parent #define MPI_Comm_get_parent(a1) PyMPI_UNAVAILABLE("MPI_Comm_get_parent",a1) #endif #ifndef PyMPI_HAVE_MPI_Errhandler_get #undef MPI_Errhandler_get #define MPI_Errhandler_get(a1,a2) PyMPI_UNAVAILABLE("MPI_Errhandler_get",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Errhandler_set #undef MPI_Errhandler_set #define MPI_Errhandler_set(a1,a2) PyMPI_UNAVAILABLE("MPI_Errhandler_set",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Handler_function #undef MPI_Handler_function typedef void (MPIAPI PyMPI_MPI_Handler_function)(MPI_Comm*,int*,...); #define MPI_Handler_function PyMPI_MPI_Handler_function #endif #ifndef PyMPI_HAVE_MPI_Errhandler_create #undef MPI_Errhandler_create #define MPI_Errhandler_create(a1,a2) PyMPI_UNAVAILABLE("MPI_Errhandler_create",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Attr_get #undef MPI_Attr_get #define MPI_Attr_get(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Attr_get",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Attr_put #undef MPI_Attr_put #define MPI_Attr_put(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Attr_put",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Attr_delete #undef MPI_Attr_delete #define MPI_Attr_delete(a1,a2) PyMPI_UNAVAILABLE("MPI_Attr_delete",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Copy_function #undef MPI_Copy_function typedef int (MPIAPI PyMPI_MPI_Copy_function)(MPI_Comm,int,void*,void*,void*,int*); #define MPI_Copy_function PyMPI_MPI_Copy_function #endif #ifndef PyMPI_HAVE_MPI_Delete_function #undef MPI_Delete_function typedef int (MPIAPI PyMPI_MPI_Delete_function)(MPI_Comm,int,void*,void*); #define MPI_Delete_function PyMPI_MPI_Delete_function #endif #ifndef PyMPI_HAVE_MPI_DUP_FN #undef MPI_DUP_FN #define MPI_DUP_FN (0) #endif #ifndef PyMPI_HAVE_MPI_NULL_COPY_FN #undef MPI_NULL_COPY_FN #define MPI_NULL_COPY_FN (0) #endif #ifndef PyMPI_HAVE_MPI_NULL_DELETE_FN #undef MPI_NULL_DELETE_FN #define MPI_NULL_DELETE_FN (0) #endif #ifndef PyMPI_HAVE_MPI_Keyval_create #undef MPI_Keyval_create #define MPI_Keyval_create(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Keyval_create",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Keyval_free #undef MPI_Keyval_free #define MPI_Keyval_free(a1) PyMPI_UNAVAILABLE("MPI_Keyval_free",a1) #endif #ifndef PyMPI_HAVE_MPI_Comm_get_errhandler #undef MPI_Comm_get_errhandler #define MPI_Comm_get_errhandler MPI_Errhandler_get #endif #ifndef PyMPI_HAVE_MPI_Comm_set_errhandler #undef MPI_Comm_set_errhandler #define MPI_Comm_set_errhandler MPI_Errhandler_set #endif #ifndef PyMPI_HAVE_MPI_Comm_errhandler_fn #undef MPI_Comm_errhandler_fn #define MPI_Comm_errhandler_fn MPI_Handler_function #endif #ifndef PyMPI_HAVE_MPI_Comm_errhandler_function #undef MPI_Comm_errhandler_function #define MPI_Comm_errhandler_function MPI_Comm_errhandler_fn #endif #ifndef PyMPI_HAVE_MPI_Comm_create_errhandler #undef MPI_Comm_create_errhandler #define MPI_Comm_create_errhandler MPI_Errhandler_create #endif #ifndef PyMPI_HAVE_MPI_Comm_call_errhandler #undef MPI_Comm_call_errhandler #define MPI_Comm_call_errhandler(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_call_errhandler",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Comm_get_name #undef MPI_Comm_get_name #define MPI_Comm_get_name(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Comm_get_name",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Comm_set_name #undef MPI_Comm_set_name #define MPI_Comm_set_name(a1,a2) PyMPI_UNAVAILABLE("MPI_Comm_set_name",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_TAG_UB #undef MPI_TAG_UB #define MPI_TAG_UB (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_HOST #undef MPI_HOST #define MPI_HOST (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_IO #undef MPI_IO #define MPI_IO (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_WTIME_IS_GLOBAL #undef MPI_WTIME_IS_GLOBAL #define MPI_WTIME_IS_GLOBAL (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_UNIVERSE_SIZE #undef MPI_UNIVERSE_SIZE #define MPI_UNIVERSE_SIZE (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_APPNUM #undef MPI_APPNUM #define MPI_APPNUM (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_LASTUSEDCODE #undef MPI_LASTUSEDCODE #define MPI_LASTUSEDCODE (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_Comm_get_attr #undef MPI_Comm_get_attr #define MPI_Comm_get_attr MPI_Attr_get #endif #ifndef PyMPI_HAVE_MPI_Comm_set_attr #undef MPI_Comm_set_attr #define MPI_Comm_set_attr MPI_Attr_put #endif #ifndef PyMPI_HAVE_MPI_Comm_delete_attr #undef MPI_Comm_delete_attr #define MPI_Comm_delete_attr MPI_Attr_delete #endif #ifndef PyMPI_HAVE_MPI_Comm_copy_attr_function #undef MPI_Comm_copy_attr_function #define MPI_Comm_copy_attr_function MPI_Copy_function #endif #ifndef PyMPI_HAVE_MPI_Comm_delete_attr_function #undef MPI_Comm_delete_attr_function #define MPI_Comm_delete_attr_function MPI_Delete_function #endif #ifndef PyMPI_HAVE_MPI_COMM_DUP_FN #undef MPI_COMM_DUP_FN #define MPI_COMM_DUP_FN (MPI_DUP_FN) #endif #ifndef PyMPI_HAVE_MPI_COMM_NULL_COPY_FN #undef MPI_COMM_NULL_COPY_FN #define MPI_COMM_NULL_COPY_FN (MPI_NULL_COPY_FN) #endif #ifndef PyMPI_HAVE_MPI_COMM_NULL_DELETE_FN #undef MPI_COMM_NULL_DELETE_FN #define MPI_COMM_NULL_DELETE_FN (MPI_NULL_DELETE_FN) #endif #ifndef PyMPI_HAVE_MPI_Comm_create_keyval #undef MPI_Comm_create_keyval #define MPI_Comm_create_keyval MPI_Keyval_create #endif #ifndef PyMPI_HAVE_MPI_Comm_free_keyval #undef MPI_Comm_free_keyval #define MPI_Comm_free_keyval MPI_Keyval_free #endif #ifndef PyMPI_HAVE_MPI_WIN_NULL #undef MPI_WIN_NULL #define MPI_WIN_NULL ((MPI_Win)0) #endif #ifndef PyMPI_HAVE_MPI_Win_free #undef MPI_Win_free #define MPI_Win_free(a1) PyMPI_UNAVAILABLE("MPI_Win_free",a1) #endif #ifndef PyMPI_HAVE_MPI_Win_create #undef MPI_Win_create #define MPI_Win_create(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Win_create",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Win_allocate #undef MPI_Win_allocate #define MPI_Win_allocate(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Win_allocate",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Win_allocate_shared #undef MPI_Win_allocate_shared #define MPI_Win_allocate_shared(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_Win_allocate_shared",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_Win_shared_query #undef MPI_Win_shared_query #define MPI_Win_shared_query(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Win_shared_query",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_Win_create_dynamic #undef MPI_Win_create_dynamic #define MPI_Win_create_dynamic(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Win_create_dynamic",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Win_attach #undef MPI_Win_attach #define MPI_Win_attach(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Win_attach",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Win_detach #undef MPI_Win_detach #define MPI_Win_detach(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_detach",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_set_info #undef MPI_Win_set_info #define MPI_Win_set_info(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_set_info",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_get_info #undef MPI_Win_get_info #define MPI_Win_get_info(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_get_info",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_get_group #undef MPI_Win_get_group #define MPI_Win_get_group(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_get_group",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Get #undef MPI_Get #define MPI_Get(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Get",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Put #undef MPI_Put #define MPI_Put(a1,a2,a3,a4,a5,a6,a7,a8) PyMPI_UNAVAILABLE("MPI_Put",a1,a2,a3,a4,a5,a6,a7,a8) #endif #ifndef PyMPI_HAVE_MPI_Accumulate #undef MPI_Accumulate #define MPI_Accumulate(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Accumulate",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Get_accumulate #undef MPI_Get_accumulate #define MPI_Get_accumulate(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) PyMPI_UNAVAILABLE("MPI_Get_accumulate",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) #endif #ifndef PyMPI_HAVE_MPI_Fetch_and_op #undef MPI_Fetch_and_op #define MPI_Fetch_and_op(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Fetch_and_op",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Compare_and_swap #undef MPI_Compare_and_swap #define MPI_Compare_and_swap(a1,a2,a3,a4,a5,a6,a7) PyMPI_UNAVAILABLE("MPI_Compare_and_swap",a1,a2,a3,a4,a5,a6,a7) #endif #ifndef PyMPI_HAVE_MPI_Rget #undef MPI_Rget #define MPI_Rget(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Rget",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Rput #undef MPI_Rput #define MPI_Rput(a1,a2,a3,a4,a5,a6,a7,a8,a9) PyMPI_UNAVAILABLE("MPI_Rput",a1,a2,a3,a4,a5,a6,a7,a8,a9) #endif #ifndef PyMPI_HAVE_MPI_Raccumulate #undef MPI_Raccumulate #define MPI_Raccumulate(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) PyMPI_UNAVAILABLE("MPI_Raccumulate",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) #endif #ifndef PyMPI_HAVE_MPI_Rget_accumulate #undef MPI_Rget_accumulate #define MPI_Rget_accumulate(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) PyMPI_UNAVAILABLE("MPI_Rget_accumulate",a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13) #endif #ifndef PyMPI_HAVE_MPI_MODE_NOCHECK #undef MPI_MODE_NOCHECK #define MPI_MODE_NOCHECK (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_MODE_NOSTORE #undef MPI_MODE_NOSTORE #define MPI_MODE_NOSTORE (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_MODE_NOPUT #undef MPI_MODE_NOPUT #define MPI_MODE_NOPUT (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_MODE_NOPRECEDE #undef MPI_MODE_NOPRECEDE #define MPI_MODE_NOPRECEDE (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_MODE_NOSUCCEED #undef MPI_MODE_NOSUCCEED #define MPI_MODE_NOSUCCEED (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_Win_fence #undef MPI_Win_fence #define MPI_Win_fence(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_fence",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_post #undef MPI_Win_post #define MPI_Win_post(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Win_post",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Win_start #undef MPI_Win_start #define MPI_Win_start(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Win_start",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Win_complete #undef MPI_Win_complete #define MPI_Win_complete(a1) PyMPI_UNAVAILABLE("MPI_Win_complete",a1) #endif #ifndef PyMPI_HAVE_MPI_Win_wait #undef MPI_Win_wait #define MPI_Win_wait(a1) PyMPI_UNAVAILABLE("MPI_Win_wait",a1) #endif #ifndef PyMPI_HAVE_MPI_Win_test #undef MPI_Win_test #define MPI_Win_test(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_test",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_LOCK_EXCLUSIVE #undef MPI_LOCK_EXCLUSIVE #define MPI_LOCK_EXCLUSIVE (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_LOCK_SHARED #undef MPI_LOCK_SHARED #define MPI_LOCK_SHARED (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_Win_lock #undef MPI_Win_lock #define MPI_Win_lock(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Win_lock",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Win_unlock #undef MPI_Win_unlock #define MPI_Win_unlock(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_unlock",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_lock_all #undef MPI_Win_lock_all #define MPI_Win_lock_all(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_lock_all",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_unlock_all #undef MPI_Win_unlock_all #define MPI_Win_unlock_all(a1) PyMPI_UNAVAILABLE("MPI_Win_unlock_all",a1) #endif #ifndef PyMPI_HAVE_MPI_Win_flush #undef MPI_Win_flush #define MPI_Win_flush(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_flush",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_flush_all #undef MPI_Win_flush_all #define MPI_Win_flush_all(a1) PyMPI_UNAVAILABLE("MPI_Win_flush_all",a1) #endif #ifndef PyMPI_HAVE_MPI_Win_flush_local #undef MPI_Win_flush_local #define MPI_Win_flush_local(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_flush_local",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_flush_local_all #undef MPI_Win_flush_local_all #define MPI_Win_flush_local_all(a1) PyMPI_UNAVAILABLE("MPI_Win_flush_local_all",a1) #endif #ifndef PyMPI_HAVE_MPI_Win_sync #undef MPI_Win_sync #define MPI_Win_sync(a1) PyMPI_UNAVAILABLE("MPI_Win_sync",a1) #endif #ifndef PyMPI_HAVE_MPI_Win_get_errhandler #undef MPI_Win_get_errhandler #define MPI_Win_get_errhandler(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_get_errhandler",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_set_errhandler #undef MPI_Win_set_errhandler #define MPI_Win_set_errhandler(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_set_errhandler",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_errhandler_fn #undef MPI_Win_errhandler_fn typedef void (MPIAPI PyMPI_MPI_Win_errhandler_fn)(MPI_Win*,int*,...); #define MPI_Win_errhandler_fn PyMPI_MPI_Win_errhandler_fn #endif #ifndef PyMPI_HAVE_MPI_Win_errhandler_function #undef MPI_Win_errhandler_function #define MPI_Win_errhandler_function MPI_Win_errhandler_fn #endif #ifndef PyMPI_HAVE_MPI_Win_create_errhandler #undef MPI_Win_create_errhandler #define MPI_Win_create_errhandler(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_create_errhandler",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_call_errhandler #undef MPI_Win_call_errhandler #define MPI_Win_call_errhandler(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_call_errhandler",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_get_name #undef MPI_Win_get_name #define MPI_Win_get_name(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Win_get_name",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Win_set_name #undef MPI_Win_set_name #define MPI_Win_set_name(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_set_name",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_WIN_BASE #undef MPI_WIN_BASE #define MPI_WIN_BASE (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_WIN_SIZE #undef MPI_WIN_SIZE #define MPI_WIN_SIZE (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_WIN_DISP_UNIT #undef MPI_WIN_DISP_UNIT #define MPI_WIN_DISP_UNIT (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_WIN_CREATE_FLAVOR #undef MPI_WIN_CREATE_FLAVOR #define MPI_WIN_CREATE_FLAVOR (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_WIN_MODEL #undef MPI_WIN_MODEL #define MPI_WIN_MODEL (MPI_KEYVAL_INVALID) #endif #ifndef PyMPI_HAVE_MPI_WIN_FLAVOR_CREATE #undef MPI_WIN_FLAVOR_CREATE #define MPI_WIN_FLAVOR_CREATE (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_WIN_FLAVOR_ALLOCATE #undef MPI_WIN_FLAVOR_ALLOCATE #define MPI_WIN_FLAVOR_ALLOCATE (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_WIN_FLAVOR_DYNAMIC #undef MPI_WIN_FLAVOR_DYNAMIC #define MPI_WIN_FLAVOR_DYNAMIC (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_WIN_FLAVOR_SHARED #undef MPI_WIN_FLAVOR_SHARED #define MPI_WIN_FLAVOR_SHARED (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_WIN_SEPARATE #undef MPI_WIN_SEPARATE #define MPI_WIN_SEPARATE (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_WIN_UNIFIED #undef MPI_WIN_UNIFIED #define MPI_WIN_UNIFIED (MPI_UNDEFINED) #endif #ifndef PyMPI_HAVE_MPI_Win_get_attr #undef MPI_Win_get_attr #define MPI_Win_get_attr(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Win_get_attr",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Win_set_attr #undef MPI_Win_set_attr #define MPI_Win_set_attr(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Win_set_attr",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Win_delete_attr #undef MPI_Win_delete_attr #define MPI_Win_delete_attr(a1,a2) PyMPI_UNAVAILABLE("MPI_Win_delete_attr",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Win_copy_attr_function #undef MPI_Win_copy_attr_function typedef int (MPIAPI PyMPI_MPI_Win_copy_attr_function)(MPI_Win,int,void*,void*,void*,int*); #define MPI_Win_copy_attr_function PyMPI_MPI_Win_copy_attr_function #endif #ifndef PyMPI_HAVE_MPI_Win_delete_attr_function #undef MPI_Win_delete_attr_function typedef int (MPIAPI PyMPI_MPI_Win_delete_attr_function)(MPI_Win,int,void*,void*); #define MPI_Win_delete_attr_function PyMPI_MPI_Win_delete_attr_function #endif #ifndef PyMPI_HAVE_MPI_WIN_DUP_FN #undef MPI_WIN_DUP_FN #define MPI_WIN_DUP_FN (0) #endif #ifndef PyMPI_HAVE_MPI_WIN_NULL_COPY_FN #undef MPI_WIN_NULL_COPY_FN #define MPI_WIN_NULL_COPY_FN (0) #endif #ifndef PyMPI_HAVE_MPI_WIN_NULL_DELETE_FN #undef MPI_WIN_NULL_DELETE_FN #define MPI_WIN_NULL_DELETE_FN (0) #endif #ifndef PyMPI_HAVE_MPI_Win_create_keyval #undef MPI_Win_create_keyval #define MPI_Win_create_keyval(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Win_create_keyval",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Win_free_keyval #undef MPI_Win_free_keyval #define MPI_Win_free_keyval(a1) PyMPI_UNAVAILABLE("MPI_Win_free_keyval",a1) #endif #ifndef PyMPI_HAVE_MPI_FILE_NULL #undef MPI_FILE_NULL #define MPI_FILE_NULL ((MPI_File)0) #endif #ifndef PyMPI_HAVE_MPI_MODE_RDONLY #undef MPI_MODE_RDONLY #define MPI_MODE_RDONLY (1) #endif #ifndef PyMPI_HAVE_MPI_MODE_RDWR #undef MPI_MODE_RDWR #define MPI_MODE_RDWR (2) #endif #ifndef PyMPI_HAVE_MPI_MODE_WRONLY #undef MPI_MODE_WRONLY #define MPI_MODE_WRONLY (4) #endif #ifndef PyMPI_HAVE_MPI_MODE_CREATE #undef MPI_MODE_CREATE #define MPI_MODE_CREATE (8) #endif #ifndef PyMPI_HAVE_MPI_MODE_EXCL #undef MPI_MODE_EXCL #define MPI_MODE_EXCL (16) #endif #ifndef PyMPI_HAVE_MPI_MODE_DELETE_ON_CLOSE #undef MPI_MODE_DELETE_ON_CLOSE #define MPI_MODE_DELETE_ON_CLOSE (32) #endif #ifndef PyMPI_HAVE_MPI_MODE_UNIQUE_OPEN #undef MPI_MODE_UNIQUE_OPEN #define MPI_MODE_UNIQUE_OPEN (64) #endif #ifndef PyMPI_HAVE_MPI_MODE_APPEND #undef MPI_MODE_APPEND #define MPI_MODE_APPEND (128) #endif #ifndef PyMPI_HAVE_MPI_MODE_SEQUENTIAL #undef MPI_MODE_SEQUENTIAL #define MPI_MODE_SEQUENTIAL (256) #endif #ifndef PyMPI_HAVE_MPI_File_open #undef MPI_File_open #define MPI_File_open(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_open",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_close #undef MPI_File_close #define MPI_File_close(a1) PyMPI_UNAVAILABLE("MPI_File_close",a1) #endif #ifndef PyMPI_HAVE_MPI_File_delete #undef MPI_File_delete #define MPI_File_delete(a1,a2) PyMPI_UNAVAILABLE("MPI_File_delete",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_set_size #undef MPI_File_set_size #define MPI_File_set_size(a1,a2) PyMPI_UNAVAILABLE("MPI_File_set_size",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_preallocate #undef MPI_File_preallocate #define MPI_File_preallocate(a1,a2) PyMPI_UNAVAILABLE("MPI_File_preallocate",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_get_size #undef MPI_File_get_size #define MPI_File_get_size(a1,a2) PyMPI_UNAVAILABLE("MPI_File_get_size",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_get_group #undef MPI_File_get_group #define MPI_File_get_group(a1,a2) PyMPI_UNAVAILABLE("MPI_File_get_group",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_get_amode #undef MPI_File_get_amode #define MPI_File_get_amode(a1,a2) PyMPI_UNAVAILABLE("MPI_File_get_amode",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_set_info #undef MPI_File_set_info #define MPI_File_set_info(a1,a2) PyMPI_UNAVAILABLE("MPI_File_set_info",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_get_info #undef MPI_File_get_info #define MPI_File_get_info(a1,a2) PyMPI_UNAVAILABLE("MPI_File_get_info",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_get_view #undef MPI_File_get_view #define MPI_File_get_view(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_get_view",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_set_view #undef MPI_File_set_view #define MPI_File_set_view(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_File_set_view",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_File_read_at #undef MPI_File_read_at #define MPI_File_read_at(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_File_read_at",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_File_read_at_all #undef MPI_File_read_at_all #define MPI_File_read_at_all(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_File_read_at_all",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_File_write_at #undef MPI_File_write_at #define MPI_File_write_at(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_File_write_at",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_File_write_at_all #undef MPI_File_write_at_all #define MPI_File_write_at_all(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_File_write_at_all",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_File_iread_at #undef MPI_File_iread_at #define MPI_File_iread_at(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_File_iread_at",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_File_iread_at_all #undef MPI_File_iread_at_all #define MPI_File_iread_at_all(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_File_iread_at_all",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_File_iwrite_at #undef MPI_File_iwrite_at #define MPI_File_iwrite_at(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_File_iwrite_at",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_File_iwrite_at_all #undef MPI_File_iwrite_at_all #define MPI_File_iwrite_at_all(a1,a2,a3,a4,a5,a6) PyMPI_UNAVAILABLE("MPI_File_iwrite_at_all",a1,a2,a3,a4,a5,a6) #endif #ifndef PyMPI_HAVE_MPI_SEEK_SET #undef MPI_SEEK_SET #define MPI_SEEK_SET (0) #endif #ifndef PyMPI_HAVE_MPI_SEEK_CUR #undef MPI_SEEK_CUR #define MPI_SEEK_CUR (1) #endif #ifndef PyMPI_HAVE_MPI_SEEK_END #undef MPI_SEEK_END #define MPI_SEEK_END (2) #endif #ifndef PyMPI_HAVE_MPI_DISPLACEMENT_CURRENT #undef MPI_DISPLACEMENT_CURRENT #define MPI_DISPLACEMENT_CURRENT (3) #endif #ifndef PyMPI_HAVE_MPI_File_seek #undef MPI_File_seek #define MPI_File_seek(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_seek",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_get_position #undef MPI_File_get_position #define MPI_File_get_position(a1,a2) PyMPI_UNAVAILABLE("MPI_File_get_position",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_get_byte_offset #undef MPI_File_get_byte_offset #define MPI_File_get_byte_offset(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_get_byte_offset",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_read #undef MPI_File_read #define MPI_File_read(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_read",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_read_all #undef MPI_File_read_all #define MPI_File_read_all(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_read_all",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_write #undef MPI_File_write #define MPI_File_write(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_write",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_write_all #undef MPI_File_write_all #define MPI_File_write_all(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_write_all",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_iread #undef MPI_File_iread #define MPI_File_iread(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_iread",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_iread_all #undef MPI_File_iread_all #define MPI_File_iread_all(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_iread_all",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_iwrite #undef MPI_File_iwrite #define MPI_File_iwrite(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_iwrite",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_iwrite_all #undef MPI_File_iwrite_all #define MPI_File_iwrite_all(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_iwrite_all",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_read_shared #undef MPI_File_read_shared #define MPI_File_read_shared(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_read_shared",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_write_shared #undef MPI_File_write_shared #define MPI_File_write_shared(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_write_shared",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_iread_shared #undef MPI_File_iread_shared #define MPI_File_iread_shared(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_iread_shared",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_iwrite_shared #undef MPI_File_iwrite_shared #define MPI_File_iwrite_shared(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_iwrite_shared",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_read_ordered #undef MPI_File_read_ordered #define MPI_File_read_ordered(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_read_ordered",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_write_ordered #undef MPI_File_write_ordered #define MPI_File_write_ordered(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_write_ordered",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_seek_shared #undef MPI_File_seek_shared #define MPI_File_seek_shared(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_seek_shared",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_get_position_shared #undef MPI_File_get_position_shared #define MPI_File_get_position_shared(a1,a2) PyMPI_UNAVAILABLE("MPI_File_get_position_shared",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_read_at_all_begin #undef MPI_File_read_at_all_begin #define MPI_File_read_at_all_begin(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_read_at_all_begin",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_read_at_all_end #undef MPI_File_read_at_all_end #define MPI_File_read_at_all_end(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_read_at_all_end",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_write_at_all_begin #undef MPI_File_write_at_all_begin #define MPI_File_write_at_all_begin(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_File_write_at_all_begin",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_File_write_at_all_end #undef MPI_File_write_at_all_end #define MPI_File_write_at_all_end(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_write_at_all_end",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_read_all_begin #undef MPI_File_read_all_begin #define MPI_File_read_all_begin(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_File_read_all_begin",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_File_read_all_end #undef MPI_File_read_all_end #define MPI_File_read_all_end(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_read_all_end",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_write_all_begin #undef MPI_File_write_all_begin #define MPI_File_write_all_begin(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_File_write_all_begin",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_File_write_all_end #undef MPI_File_write_all_end #define MPI_File_write_all_end(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_write_all_end",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_read_ordered_begin #undef MPI_File_read_ordered_begin #define MPI_File_read_ordered_begin(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_File_read_ordered_begin",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_File_read_ordered_end #undef MPI_File_read_ordered_end #define MPI_File_read_ordered_end(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_read_ordered_end",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_write_ordered_begin #undef MPI_File_write_ordered_begin #define MPI_File_write_ordered_begin(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_File_write_ordered_begin",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_File_write_ordered_end #undef MPI_File_write_ordered_end #define MPI_File_write_ordered_end(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_write_ordered_end",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_get_type_extent #undef MPI_File_get_type_extent #define MPI_File_get_type_extent(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_File_get_type_extent",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_File_set_atomicity #undef MPI_File_set_atomicity #define MPI_File_set_atomicity(a1,a2) PyMPI_UNAVAILABLE("MPI_File_set_atomicity",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_get_atomicity #undef MPI_File_get_atomicity #define MPI_File_get_atomicity(a1,a2) PyMPI_UNAVAILABLE("MPI_File_get_atomicity",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_sync #undef MPI_File_sync #define MPI_File_sync(a1) PyMPI_UNAVAILABLE("MPI_File_sync",a1) #endif #ifndef PyMPI_HAVE_MPI_File_get_errhandler #undef MPI_File_get_errhandler #define MPI_File_get_errhandler(a1,a2) PyMPI_UNAVAILABLE("MPI_File_get_errhandler",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_set_errhandler #undef MPI_File_set_errhandler #define MPI_File_set_errhandler(a1,a2) PyMPI_UNAVAILABLE("MPI_File_set_errhandler",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_errhandler_fn #undef MPI_File_errhandler_fn typedef void (MPIAPI PyMPI_MPI_File_errhandler_fn)(MPI_File*,int*,...); #define MPI_File_errhandler_fn PyMPI_MPI_File_errhandler_fn #endif #ifndef PyMPI_HAVE_MPI_File_errhandler_function #undef MPI_File_errhandler_function #define MPI_File_errhandler_function MPI_File_errhandler_fn #endif #ifndef PyMPI_HAVE_MPI_File_create_errhandler #undef MPI_File_create_errhandler #define MPI_File_create_errhandler(a1,a2) PyMPI_UNAVAILABLE("MPI_File_create_errhandler",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_File_call_errhandler #undef MPI_File_call_errhandler #define MPI_File_call_errhandler(a1,a2) PyMPI_UNAVAILABLE("MPI_File_call_errhandler",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Datarep_conversion_function #undef MPI_Datarep_conversion_function typedef int (MPIAPI PyMPI_MPI_Datarep_conversion_function)(void*,MPI_Datatype,int,void*,MPI_Offset,void*); #define MPI_Datarep_conversion_function PyMPI_MPI_Datarep_conversion_function #endif #ifndef PyMPI_HAVE_MPI_Datarep_extent_function #undef MPI_Datarep_extent_function typedef int (MPIAPI PyMPI_MPI_Datarep_extent_function)(MPI_Datatype,MPI_Aint*,void*); #define MPI_Datarep_extent_function PyMPI_MPI_Datarep_extent_function #endif #ifndef PyMPI_HAVE_MPI_CONVERSION_FN_NULL #undef MPI_CONVERSION_FN_NULL #define MPI_CONVERSION_FN_NULL (0) #endif #ifndef PyMPI_HAVE_MPI_MAX_DATAREP_STRING #undef MPI_MAX_DATAREP_STRING #define MPI_MAX_DATAREP_STRING (1) #endif #ifndef PyMPI_HAVE_MPI_Register_datarep #undef MPI_Register_datarep #define MPI_Register_datarep(a1,a2,a3,a4,a5) PyMPI_UNAVAILABLE("MPI_Register_datarep",a1,a2,a3,a4,a5) #endif #ifndef PyMPI_HAVE_MPI_ERRHANDLER_NULL #undef MPI_ERRHANDLER_NULL #define MPI_ERRHANDLER_NULL ((MPI_Errhandler)0) #endif #ifndef PyMPI_HAVE_MPI_ERRORS_RETURN #undef MPI_ERRORS_RETURN #define MPI_ERRORS_RETURN ((MPI_Errhandler)MPI_ERRHANDLER_NULL) #endif #ifndef PyMPI_HAVE_MPI_ERRORS_ARE_FATAL #undef MPI_ERRORS_ARE_FATAL #define MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)MPI_ERRHANDLER_NULL) #endif #ifndef PyMPI_HAVE_MPI_Errhandler_free #undef MPI_Errhandler_free #define MPI_Errhandler_free(a1) PyMPI_UNAVAILABLE("MPI_Errhandler_free",a1) #endif #ifndef PyMPI_HAVE_MPI_MAX_ERROR_STRING #undef MPI_MAX_ERROR_STRING #define MPI_MAX_ERROR_STRING (1) #endif #ifndef PyMPI_HAVE_MPI_Error_class #undef MPI_Error_class #define MPI_Error_class(a1,a2) PyMPI_UNAVAILABLE("MPI_Error_class",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Error_string #undef MPI_Error_string #define MPI_Error_string(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Error_string",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Add_error_class #undef MPI_Add_error_class #define MPI_Add_error_class(a1) PyMPI_UNAVAILABLE("MPI_Add_error_class",a1) #endif #ifndef PyMPI_HAVE_MPI_Add_error_code #undef MPI_Add_error_code #define MPI_Add_error_code(a1,a2) PyMPI_UNAVAILABLE("MPI_Add_error_code",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Add_error_string #undef MPI_Add_error_string #define MPI_Add_error_string(a1,a2) PyMPI_UNAVAILABLE("MPI_Add_error_string",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_SUCCESS #undef MPI_SUCCESS #define MPI_SUCCESS (0) #endif #ifndef PyMPI_HAVE_MPI_ERR_LASTCODE #undef MPI_ERR_LASTCODE #define MPI_ERR_LASTCODE (1) #endif #ifndef PyMPI_HAVE_MPI_ERR_COMM #undef MPI_ERR_COMM #define MPI_ERR_COMM (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_GROUP #undef MPI_ERR_GROUP #define MPI_ERR_GROUP (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_TYPE #undef MPI_ERR_TYPE #define MPI_ERR_TYPE (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_REQUEST #undef MPI_ERR_REQUEST #define MPI_ERR_REQUEST (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_OP #undef MPI_ERR_OP #define MPI_ERR_OP (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_BUFFER #undef MPI_ERR_BUFFER #define MPI_ERR_BUFFER (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_COUNT #undef MPI_ERR_COUNT #define MPI_ERR_COUNT (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_TAG #undef MPI_ERR_TAG #define MPI_ERR_TAG (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_RANK #undef MPI_ERR_RANK #define MPI_ERR_RANK (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_ROOT #undef MPI_ERR_ROOT #define MPI_ERR_ROOT (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_TRUNCATE #undef MPI_ERR_TRUNCATE #define MPI_ERR_TRUNCATE (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_IN_STATUS #undef MPI_ERR_IN_STATUS #define MPI_ERR_IN_STATUS (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_PENDING #undef MPI_ERR_PENDING #define MPI_ERR_PENDING (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_TOPOLOGY #undef MPI_ERR_TOPOLOGY #define MPI_ERR_TOPOLOGY (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_DIMS #undef MPI_ERR_DIMS #define MPI_ERR_DIMS (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_ARG #undef MPI_ERR_ARG #define MPI_ERR_ARG (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_OTHER #undef MPI_ERR_OTHER #define MPI_ERR_OTHER (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_UNKNOWN #undef MPI_ERR_UNKNOWN #define MPI_ERR_UNKNOWN (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_INTERN #undef MPI_ERR_INTERN #define MPI_ERR_INTERN (MPI_ERR_LASTCODE) #endif #ifndef PyMPI_HAVE_MPI_ERR_KEYVAL #undef MPI_ERR_KEYVAL #define MPI_ERR_KEYVAL (MPI_ERR_ARG) #endif #ifndef PyMPI_HAVE_MPI_ERR_NO_MEM #undef MPI_ERR_NO_MEM #define MPI_ERR_NO_MEM (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_INFO #undef MPI_ERR_INFO #define MPI_ERR_INFO (MPI_ERR_ARG) #endif #ifndef PyMPI_HAVE_MPI_ERR_INFO_KEY #undef MPI_ERR_INFO_KEY #define MPI_ERR_INFO_KEY (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_INFO_VALUE #undef MPI_ERR_INFO_VALUE #define MPI_ERR_INFO_VALUE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_INFO_NOKEY #undef MPI_ERR_INFO_NOKEY #define MPI_ERR_INFO_NOKEY (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_SPAWN #undef MPI_ERR_SPAWN #define MPI_ERR_SPAWN (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_PORT #undef MPI_ERR_PORT #define MPI_ERR_PORT (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_SERVICE #undef MPI_ERR_SERVICE #define MPI_ERR_SERVICE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_NAME #undef MPI_ERR_NAME #define MPI_ERR_NAME (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_FILE #undef MPI_ERR_FILE #define MPI_ERR_FILE (MPI_ERR_ARG) #endif #ifndef PyMPI_HAVE_MPI_ERR_NOT_SAME #undef MPI_ERR_NOT_SAME #define MPI_ERR_NOT_SAME (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_BAD_FILE #undef MPI_ERR_BAD_FILE #define MPI_ERR_BAD_FILE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_NO_SUCH_FILE #undef MPI_ERR_NO_SUCH_FILE #define MPI_ERR_NO_SUCH_FILE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_FILE_EXISTS #undef MPI_ERR_FILE_EXISTS #define MPI_ERR_FILE_EXISTS (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_FILE_IN_USE #undef MPI_ERR_FILE_IN_USE #define MPI_ERR_FILE_IN_USE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_AMODE #undef MPI_ERR_AMODE #define MPI_ERR_AMODE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_ACCESS #undef MPI_ERR_ACCESS #define MPI_ERR_ACCESS (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_READ_ONLY #undef MPI_ERR_READ_ONLY #define MPI_ERR_READ_ONLY (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_NO_SPACE #undef MPI_ERR_NO_SPACE #define MPI_ERR_NO_SPACE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_QUOTA #undef MPI_ERR_QUOTA #define MPI_ERR_QUOTA (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_UNSUPPORTED_DATAREP #undef MPI_ERR_UNSUPPORTED_DATAREP #define MPI_ERR_UNSUPPORTED_DATAREP (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_UNSUPPORTED_OPERATION #undef MPI_ERR_UNSUPPORTED_OPERATION #define MPI_ERR_UNSUPPORTED_OPERATION (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_CONVERSION #undef MPI_ERR_CONVERSION #define MPI_ERR_CONVERSION (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_DUP_DATAREP #undef MPI_ERR_DUP_DATAREP #define MPI_ERR_DUP_DATAREP (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_IO #undef MPI_ERR_IO #define MPI_ERR_IO (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_WIN #undef MPI_ERR_WIN #define MPI_ERR_WIN (MPI_ERR_ARG) #endif #ifndef PyMPI_HAVE_MPI_ERR_BASE #undef MPI_ERR_BASE #define MPI_ERR_BASE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_SIZE #undef MPI_ERR_SIZE #define MPI_ERR_SIZE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_DISP #undef MPI_ERR_DISP #define MPI_ERR_DISP (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_ASSERT #undef MPI_ERR_ASSERT #define MPI_ERR_ASSERT (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_LOCKTYPE #undef MPI_ERR_LOCKTYPE #define MPI_ERR_LOCKTYPE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_RMA_CONFLICT #undef MPI_ERR_RMA_CONFLICT #define MPI_ERR_RMA_CONFLICT (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_RMA_SYNC #undef MPI_ERR_RMA_SYNC #define MPI_ERR_RMA_SYNC (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_RMA_RANGE #undef MPI_ERR_RMA_RANGE #define MPI_ERR_RMA_RANGE (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_RMA_ATTACH #undef MPI_ERR_RMA_ATTACH #define MPI_ERR_RMA_ATTACH (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_RMA_SHARED #undef MPI_ERR_RMA_SHARED #define MPI_ERR_RMA_SHARED (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_ERR_RMA_FLAVOR #undef MPI_ERR_RMA_FLAVOR #define MPI_ERR_RMA_FLAVOR (MPI_ERR_UNKNOWN) #endif #ifndef PyMPI_HAVE_MPI_Alloc_mem #undef MPI_Alloc_mem #define MPI_Alloc_mem(a1,a2,a3) PyMPI_UNAVAILABLE("MPI_Alloc_mem",a1,a2,a3) #endif #ifndef PyMPI_HAVE_MPI_Free_mem #undef MPI_Free_mem #define MPI_Free_mem(a1) PyMPI_UNAVAILABLE("MPI_Free_mem",a1) #endif #ifndef PyMPI_HAVE_MPI_Init #undef MPI_Init #define MPI_Init(a1,a2) PyMPI_UNAVAILABLE("MPI_Init",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Finalize #undef MPI_Finalize #define MPI_Finalize() PyMPI_UNAVAILABLE("MPI_Finalize") #endif #ifndef PyMPI_HAVE_MPI_Initialized #undef MPI_Initialized #define MPI_Initialized(a1) PyMPI_UNAVAILABLE("MPI_Initialized",a1) #endif #ifndef PyMPI_HAVE_MPI_Finalized #undef MPI_Finalized #define MPI_Finalized(a1) PyMPI_UNAVAILABLE("MPI_Finalized",a1) #endif #ifndef PyMPI_HAVE_MPI_THREAD_SINGLE #undef MPI_THREAD_SINGLE #define MPI_THREAD_SINGLE (0) #endif #ifndef PyMPI_HAVE_MPI_THREAD_FUNNELED #undef MPI_THREAD_FUNNELED #define MPI_THREAD_FUNNELED (1) #endif #ifndef PyMPI_HAVE_MPI_THREAD_SERIALIZED #undef MPI_THREAD_SERIALIZED #define MPI_THREAD_SERIALIZED (2) #endif #ifndef PyMPI_HAVE_MPI_THREAD_MULTIPLE #undef MPI_THREAD_MULTIPLE #define MPI_THREAD_MULTIPLE (3) #endif #ifndef PyMPI_HAVE_MPI_Init_thread #undef MPI_Init_thread #define MPI_Init_thread(a1,a2,a3,a4) PyMPI_UNAVAILABLE("MPI_Init_thread",a1,a2,a3,a4) #endif #ifndef PyMPI_HAVE_MPI_Query_thread #undef MPI_Query_thread #define MPI_Query_thread(a1) PyMPI_UNAVAILABLE("MPI_Query_thread",a1) #endif #ifndef PyMPI_HAVE_MPI_Is_thread_main #undef MPI_Is_thread_main #define MPI_Is_thread_main(a1) PyMPI_UNAVAILABLE("MPI_Is_thread_main",a1) #endif #ifndef PyMPI_HAVE_MPI_VERSION #undef MPI_VERSION #define MPI_VERSION (1) #endif #ifndef PyMPI_HAVE_MPI_SUBVERSION #undef MPI_SUBVERSION #define MPI_SUBVERSION (0) #endif #ifndef PyMPI_HAVE_MPI_Get_version #undef MPI_Get_version #define MPI_Get_version(a1,a2) PyMPI_UNAVAILABLE("MPI_Get_version",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_MAX_LIBRARY_VERSION_STRING #undef MPI_MAX_LIBRARY_VERSION_STRING #define MPI_MAX_LIBRARY_VERSION_STRING (1) #endif #ifndef PyMPI_HAVE_MPI_Get_library_version #undef MPI_Get_library_version #define MPI_Get_library_version(a1,a2) PyMPI_UNAVAILABLE("MPI_Get_library_version",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_MAX_PROCESSOR_NAME #undef MPI_MAX_PROCESSOR_NAME #define MPI_MAX_PROCESSOR_NAME (1) #endif #ifndef PyMPI_HAVE_MPI_Get_processor_name #undef MPI_Get_processor_name #define MPI_Get_processor_name(a1,a2) PyMPI_UNAVAILABLE("MPI_Get_processor_name",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Wtime #undef MPI_Wtime #define MPI_Wtime() PyMPI_UNAVAILABLE("MPI_Wtime") #endif #ifndef PyMPI_HAVE_MPI_Wtick #undef MPI_Wtick #define MPI_Wtick() PyMPI_UNAVAILABLE("MPI_Wtick") #endif #ifndef PyMPI_HAVE_MPI_Pcontrol #undef MPI_Pcontrol #define MPI_Pcontrol(a1) PyMPI_UNAVAILABLE("MPI_Pcontrol",a1) #endif #ifndef PyMPI_HAVE_MPI_Fint #undef MPI_Fint typedef int PyMPI_MPI_Fint; #define MPI_Fint PyMPI_MPI_Fint #endif #ifndef PyMPI_HAVE_MPI_F_STATUS_IGNORE #undef MPI_F_STATUS_IGNORE #define MPI_F_STATUS_IGNORE ((MPI_Fint*)0) #endif #ifndef PyMPI_HAVE_MPI_F_STATUSES_IGNORE #undef MPI_F_STATUSES_IGNORE #define MPI_F_STATUSES_IGNORE ((MPI_Fint*)0) #endif #ifndef PyMPI_HAVE_MPI_Status_c2f #undef MPI_Status_c2f #define MPI_Status_c2f(a1,a2) PyMPI_UNAVAILABLE("MPI_Status_c2f",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Status_f2c #undef MPI_Status_f2c #define MPI_Status_f2c(a1,a2) PyMPI_UNAVAILABLE("MPI_Status_f2c",a1,a2) #endif #ifndef PyMPI_HAVE_MPI_Type_c2f #undef MPI_Type_c2f #define MPI_Type_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_Request_c2f #undef MPI_Request_c2f #define MPI_Request_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_Message_c2f #undef MPI_Message_c2f #define MPI_Message_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_Op_c2f #undef MPI_Op_c2f #define MPI_Op_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_Info_c2f #undef MPI_Info_c2f #define MPI_Info_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_Group_c2f #undef MPI_Group_c2f #define MPI_Group_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_Comm_c2f #undef MPI_Comm_c2f #define MPI_Comm_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_Win_c2f #undef MPI_Win_c2f #define MPI_Win_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_File_c2f #undef MPI_File_c2f #define MPI_File_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_Errhandler_c2f #undef MPI_Errhandler_c2f #define MPI_Errhandler_c2f(a1) ((MPI_Fint)0) #endif #ifndef PyMPI_HAVE_MPI_Type_f2c #undef MPI_Type_f2c #define MPI_Type_f2c(a1) MPI_DATATYPE_NULL #endif #ifndef PyMPI_HAVE_MPI_Request_f2c #undef MPI_Request_f2c #define MPI_Request_f2c(a1) MPI_REQUEST_NULL #endif #ifndef PyMPI_HAVE_MPI_Message_f2c #undef MPI_Message_f2c #define MPI_Message_f2c(a1) MPI_MESSAGE_NULL #endif #ifndef PyMPI_HAVE_MPI_Op_f2c #undef MPI_Op_f2c #define MPI_Op_f2c(a1) MPI_OP_NULL #endif #ifndef PyMPI_HAVE_MPI_Info_f2c #undef MPI_Info_f2c #define MPI_Info_f2c(a1) MPI_INFO_NULL #endif #ifndef PyMPI_HAVE_MPI_Group_f2c #undef MPI_Group_f2c #define MPI_Group_f2c(a1) MPI_GROUP_NULL #endif #ifndef PyMPI_HAVE_MPI_Comm_f2c #undef MPI_Comm_f2c #define MPI_Comm_f2c(a1) MPI_COMM_NULL #endif #ifndef PyMPI_HAVE_MPI_Win_f2c #undef MPI_Win_f2c #define MPI_Win_f2c(a1) MPI_WIN_NULL #endif #ifndef PyMPI_HAVE_MPI_File_f2c #undef MPI_File_f2c #define MPI_File_f2c(a1) MPI_FILE_NULL #endif #ifndef PyMPI_HAVE_MPI_Errhandler_f2c #undef MPI_Errhandler_f2c #define MPI_Errhandler_f2c(a1) MPI_ERRHANDLER_NULL #endif #endif /* !PyMPI_MISSING_H */ mpi4py-3.0.3/src/pympicommctx.h0000644000175000017500000001251513200562156017472 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ #include #ifndef PyMPI_MALLOC #define PyMPI_MALLOC malloc #endif #ifndef PyMPI_FREE #define PyMPI_FREE free #endif #ifndef MPIAPI #define MPIAPI #endif #undef CHKERR #define CHKERR(ierr) do { if (ierr != MPI_SUCCESS) return ierr; } while(0) typedef struct { MPI_Comm dupcomm; MPI_Comm localcomm; int tag; int low_group; } PyMPI_Commctx; static int PyMPI_Commctx_KEYVAL = MPI_KEYVAL_INVALID; static int PyMPI_Commctx_TAG_UB = -1; static int PyMPI_Commctx_new(PyMPI_Commctx **_commctx) { PyMPI_Commctx *commctx; if (PyMPI_Commctx_TAG_UB < 0) { int ierr, *attrval = NULL, flag = 0; ierr = MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, &attrval, &flag); CHKERR(ierr); PyMPI_Commctx_TAG_UB = (flag && attrval) ? *attrval : 32767; } commctx = (PyMPI_Commctx *)PyMPI_MALLOC(sizeof(PyMPI_Commctx)); if (commctx) { commctx->dupcomm = MPI_COMM_NULL; commctx->localcomm = MPI_COMM_NULL; commctx->tag = 0; commctx->low_group = -1; } *_commctx = commctx; return MPI_SUCCESS; } static int MPIAPI PyMPI_Commctx_free_fn(MPI_Comm comm, int k, void *v, void *xs) { int ierr, finalized = 1; PyMPI_Commctx *commctx = (PyMPI_Commctx *)v; (void)comm; (void)k; (void)xs; /* unused */ if (!commctx) return MPI_SUCCESS; ierr = MPI_Finalized(&finalized); CHKERR(ierr); if (finalized) goto fn_exit; if (commctx->localcomm != MPI_COMM_NULL) {ierr = MPI_Comm_free(&commctx->localcomm); CHKERR(ierr);} if (commctx->dupcomm != MPI_COMM_NULL) {ierr = MPI_Comm_free(&commctx->dupcomm); CHKERR(ierr);} fn_exit: PyMPI_FREE(commctx); return MPI_SUCCESS; } static int PyMPI_Commctx_keyval(int *keyval) { int ierr; if (PyMPI_Commctx_KEYVAL != MPI_KEYVAL_INVALID) goto fn_exit; ierr = MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN, PyMPI_Commctx_free_fn, &PyMPI_Commctx_KEYVAL, NULL); CHKERR(ierr); fn_exit: if (keyval) *keyval = PyMPI_Commctx_KEYVAL; return MPI_SUCCESS; } static int PyMPI_Commctx_lookup(MPI_Comm comm, PyMPI_Commctx **_commctx) { int ierr, found = 0, keyval = MPI_KEYVAL_INVALID; PyMPI_Commctx *commctx = NULL; ierr = PyMPI_Commctx_keyval(&keyval); CHKERR(ierr); ierr = MPI_Comm_get_attr(comm, keyval, &commctx, &found); CHKERR(ierr); if (found && commctx) goto fn_exit; ierr = PyMPI_Commctx_new(&commctx); CHKERR(ierr); if (!commctx) {(void)MPI_Comm_call_errhandler(comm, MPI_ERR_INTERN); return MPI_ERR_INTERN;} ierr = MPI_Comm_set_attr(comm, keyval, commctx); CHKERR(ierr); ierr = MPI_Comm_dup(comm, &commctx->dupcomm); CHKERR(ierr); fn_exit: if (commctx->tag >= PyMPI_Commctx_TAG_UB) commctx->tag = 0; if (_commctx) *_commctx = commctx; return MPI_SUCCESS; } static int PyMPI_Commctx_clear(MPI_Comm comm) { int ierr, found = 0, keyval = PyMPI_Commctx_KEYVAL; PyMPI_Commctx *commctx = NULL; if (keyval == MPI_KEYVAL_INVALID) return MPI_SUCCESS; ierr = MPI_Comm_get_attr(comm, keyval, &commctx, &found); CHKERR(ierr); if (found) {ierr = MPI_Comm_delete_attr(comm, keyval); CHKERR(ierr);} return MPI_SUCCESS; } static int PyMPI_Commctx_intra(MPI_Comm comm, MPI_Comm *dupcomm, int *tag) { int ierr; PyMPI_Commctx *commctx = NULL; ierr = PyMPI_Commctx_lookup(comm, &commctx);CHKERR(ierr); if (dupcomm) *dupcomm = commctx->dupcomm; if (tag) *tag = commctx->tag++; return MPI_SUCCESS; } static int PyMPI_Commctx_inter(MPI_Comm comm, MPI_Comm *dupcomm, int *tag, MPI_Comm *localcomm, int *low_group) { int ierr; PyMPI_Commctx *commctx = NULL; ierr = PyMPI_Commctx_lookup(comm, &commctx);CHKERR(ierr); if (commctx->localcomm == MPI_COMM_NULL) { int localsize, remotesize, mergerank; MPI_Comm mergecomm = MPI_COMM_NULL; ierr = MPI_Comm_size(comm, &localsize); CHKERR(ierr); ierr = MPI_Comm_remote_size(comm, &remotesize); CHKERR(ierr); ierr = MPI_Intercomm_merge(comm, localsize>remotesize, &mergecomm); CHKERR(ierr); ierr = MPI_Comm_rank(mergecomm, &mergerank); CHKERR(ierr); commctx->low_group = ((localsize>remotesize) ? 0 : (localsize 2) || (MPI_VERSION == 2 && MPI_SUBVERSION >= 2) { MPI_Group localgroup = MPI_GROUP_NULL; ierr = MPI_Comm_group(comm, &localgroup); CHKERR(ierr); ierr = MPI_Comm_create(mergecomm, localgroup, &commctx->localcomm); CHKERR(ierr); ierr = MPI_Group_free(&localgroup); CHKERR(ierr); } #else ierr = MPI_Comm_split(mergecomm, commctx->low_group, 0, &commctx->localcomm); CHKERR(ierr); #endif ierr = MPI_Comm_free(&mergecomm); CHKERR(ierr); } if (dupcomm) *dupcomm = commctx->dupcomm; if (tag) *tag = commctx->tag++; if (localcomm) *localcomm = commctx->localcomm; if (low_group) *low_group = commctx->low_group; return MPI_SUCCESS; } static int PyMPI_Commctx_finalize(void) { int ierr; if (PyMPI_Commctx_KEYVAL == MPI_KEYVAL_INVALID) return MPI_SUCCESS; ierr = PyMPI_Commctx_clear(MPI_COMM_SELF); CHKERR(ierr); ierr = PyMPI_Commctx_clear(MPI_COMM_WORLD); CHKERR(ierr); ierr = MPI_Comm_free_keyval(&PyMPI_Commctx_KEYVAL); CHKERR(ierr); PyMPI_Commctx_TAG_UB = -1; return MPI_SUCCESS; } #undef CHKERR /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/mpi4py.MPI.pyx0000644000175000017500000000056313200562156017200 0ustar dalcinldalcinl00000000000000#cython: embedsignature=True #cython: cdivision=True #cython: binding=False #cython: auto_pickle=False #cython: always_allow_keywords=True #cython: allow_none_for_extension_args=False #cython: autotestdict=False #cython: warn.multiple_declarators=False #cython: optimize.use_switch=False from __future__ import absolute_import cimport cython include "mpi4py/MPI/MPI.pyx" mpi4py-3.0.3/src/lib-pmpi/0000775000175000017500000000000013560002767016305 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/src/lib-pmpi/vt.c0000644000175000017500000000005712750576064017110 0ustar dalcinldalcinl00000000000000#include "vt.h" char pympi_pmpi_name[] = "vt"; mpi4py-3.0.3/src/lib-pmpi/vt-hyb.c0000644000175000017500000000006312750576064017665 0ustar dalcinldalcinl00000000000000#include "vt.h" char pympi_pmpi_name[] = "vt-hyb"; mpi4py-3.0.3/src/lib-pmpi/vt-mpi.c0000644000175000017500000000006312750576064017670 0ustar dalcinldalcinl00000000000000#include "vt.h" char pympi_pmpi_name[] = "vt-mpi"; mpi4py-3.0.3/src/lib-pmpi/vt.h0000644000175000017500000000172512750576064017120 0ustar dalcinldalcinl00000000000000#ifdef LIBVT_LEGACY #include #include #define LIBVT_HAVE_MPI_Init_thread 1 #if (defined(OMPI_MAJOR_VERSION) && \ defined(OMPI_MINOR_VERSION) && \ defined(OMPI_RELEASE_VERSION)) #undef OPENMPI_VERSION_NUMBER #define OPENMPI_VERSION_NUMBER \ ((OMPI_MAJOR_VERSION * 10000) + \ (OMPI_MINOR_VERSION * 100) + \ (OMPI_RELEASE_VERSION * 1)) #if ((OPENMPI_VERSION_NUMBER >= 10300) && \ (OPENMPI_VERSION_NUMBER < 10403)) #undef LIBVT_HAVE_MPI_Init_thread #endif #endif #ifdef __cplusplus extern "C" { #endif extern int POMP_MAX_ID; struct ompregdescr; extern struct ompregdescr* pomp_rd_table[]; int POMP_MAX_ID = 0; struct ompregdescr* pomp_rd_table[] = { 0 }; #ifndef LIBVT_HAVE_MPI_Init_thread int MPI_Init_thread(int *argc, char ***argv, int required, int *provided) { if (provided) *provided = MPI_THREAD_SINGLE; return MPI_Init(argc, argv); } #endif #ifdef __cplusplus } #endif #endif mpi4py-3.0.3/src/lib-pmpi/mpe.c0000644000175000017500000000004012750576064017230 0ustar dalcinldalcinl00000000000000char pympi_pmpi_name[] = "mpe"; mpi4py-3.0.3/src/atimport.h0000644000175000017500000000224613200562156016600 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ /* ------------------------------------------------------------------------- */ #include "Python.h" #include "mpi.h" /* ------------------------------------------------------------------------- */ #include "lib-mpi/config.h" #include "lib-mpi/missing.h" #include "lib-mpi/fallback.h" #include "lib-mpi/compat.h" #include "pympivendor.h" #include "pympicommctx.h" /* ------------------------------------------------------------------------- */ #include "pycompat.h" #ifdef PYPY_VERSION #define PyMPI_RUNTIME_PYPY 1 #define PyMPI_RUNTIME_CPYTHON 0 #else #define PyMPI_RUNTIME_PYPY 0 #define PyMPI_RUNTIME_CPYTHON 1 #endif /* ------------------------------------------------------------------------- */ #if !defined(PyMPI_USE_MATCHED_RECV) #if defined(PyMPI_HAVE_MPI_Mprobe) && \ defined(PyMPI_HAVE_MPI_Mrecv) && \ MPI_VERSION >= 3 #define PyMPI_USE_MATCHED_RECV 1 #else #define PyMPI_USE_MATCHED_RECV 0 #endif #endif /* ------------------------------------------------------------------------- */ /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/mpi4py.MPI.c0000664000175000017500003245304313557771005016630 0ustar dalcinldalcinl00000000000000/* Generated by Cython 0.29.14 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else #define CYTHON_ABI "0_29_14" #define CYTHON_HEX_VERSION 0x001D0EF0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #if PY_VERSION_HEX >= 0x02070000 #define HAVE_LONG_LONG #endif #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #elif !defined(CYTHON_USE_PYLONG_INTERNALS) #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif #ifndef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) #endif #ifndef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } # else # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int32 uint32_t; #endif #endif #else #include #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) && __cplusplus >= 201103L #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #elif __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__ ) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #define __Pyx_PyCFunctionFast _PyCFunctionFast #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 #define PyMem_RawMalloc(n) PyMem_Malloc(n) #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) #define PyMem_RawFree(p) PyMem_Free(p) #endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) #else #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #define PyObject_Unicode PyObject_Str #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_ERR(f_index, lineno, Ln_error) \ { \ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ } #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__mpi4py__MPI #define __PYX_HAVE_API__mpi4py__MPI /* Early includes */ #include "mpi.h" #include "atimport.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } static PyObject *__pyx_m = NULL; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_cython_runtime = NULL; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "mpi4py/MPI/asbuffer.pxi", "mpi4py/MPI/ExceptionP.pyx", "mpi4py/MPI/asmemory.pxi", "mpi4py/MPI/commimpl.pxi", "mpi4py/MPI/attrimpl.pxi", "mpi4py/MPI/msgbuffer.pxi", "mpi4py/MPI/msgpickle.pxi", "mpi4py/MPI/Comm.pyx", "mpi4py/MPI/MPI.pyx", "mpi4py/MPI/atimport.pxi", "mpi4py/MPI/asstring.pxi", "mpi4py/MPI/asarray.pxi", "mpi4py/MPI/helpers.pxi", "mpi4py/MPI/reqimpl.pxi", "mpi4py/MPI/opimpl.pxi", "mpi4py/MPI/winimpl.pxi", "mpi4py/MPI/drepimpl.pxi", "mpi4py/MPI/mpierrhdl.pxi", "mpi4py/MPI/CAPI.pxi", "mpi4py/MPI/Exception.pyx", "mpi4py/MPI/Errhandler.pyx", "mpi4py/MPI/Datatype.pyx", "mpi4py/MPI/typemap.pxi", "mpi4py/MPI/typestr.pxi", "mpi4py/MPI/Status.pyx", "mpi4py/MPI/Request.pyx", "mpi4py/MPI/Message.pyx", "mpi4py/MPI/Info.pyx", "mpi4py/MPI/Op.pyx", "mpi4py/MPI/Group.pyx", "mpi4py/MPI/Win.pyx", "mpi4py/MPI/File.pyx", "mpi4py.MPI.pyx", }; /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* NoFastGil.proto */ #define __Pyx_PyGILState_Ensure PyGILState_Ensure #define __Pyx_PyGILState_Release PyGILState_Release #define __Pyx_FastGIL_Remember() #define __Pyx_FastGIL_Forget() #define __Pyx_FastGilFuncInit() /*--- Type declarations ---*/ struct PyMPIStatusObject; struct PyMPIDatatypeObject; struct PyMPIRequestObject; struct PyMPIPrequestObject; struct PyMPIGrequestObject; struct PyMPIMessageObject; struct PyMPIOpObject; struct PyMPIGroupObject; struct PyMPIInfoObject; struct PyMPIErrhandlerObject; struct PyMPICommObject; struct PyMPIIntracommObject; struct PyMPITopocommObject; struct PyMPICartcommObject; struct PyMPIGraphcommObject; struct PyMPIDistgraphcommObject; struct PyMPIIntercommObject; struct PyMPIWinObject; struct PyMPIFileObject; struct __pyx_obj_6mpi4py_3MPI_memory; struct __pyx_obj_6mpi4py_3MPI__p_mem; struct __pyx_obj_6mpi4py_3MPI__p_greq; struct __pyx_obj_6mpi4py_3MPI__p_datarep; struct __pyx_obj_6mpi4py_3MPI__p_keyval; struct __pyx_obj_6mpi4py_3MPI__p_message; struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p; struct __pyx_obj_6mpi4py_3MPI__p_msg_cco; struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow; struct __pyx_obj_6mpi4py_3MPI__p_msg_rma; struct __pyx_obj_6mpi4py_3MPI__p_msg_io; struct __pyx_obj_6mpi4py_3MPI_Pickle; struct __pyx_t_6mpi4py_3MPI_Options; typedef struct __pyx_t_6mpi4py_3MPI_Options __pyx_t_6mpi4py_3MPI_Options; /* "mpi4py/MPI/helpers.pxi":13 * #------------------------------------------------------------------------------ * * cdef enum PyMPI_OBJECT_FLAGS: # <<<<<<<<<<<<<< * PyMPI_OWNED = 1<<1 * */ enum __pyx_t_6mpi4py_3MPI_PyMPI_OBJECT_FLAGS { /* "mpi4py/MPI/helpers.pxi":14 * * cdef enum PyMPI_OBJECT_FLAGS: * PyMPI_OWNED = 1<<1 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_e_6mpi4py_3MPI_PyMPI_OWNED = (1 << 1) }; /* "mpi4py/MPI/atimport.pxi":27 * enum: USE_MATCHED_RECV "PyMPI_USE_MATCHED_RECV" * * ctypedef struct Options: # <<<<<<<<<<<<<< * int initialize * int threads */ struct __pyx_t_6mpi4py_3MPI_Options { int initialize; int threads; int thread_level; int finalize; int fast_reduce; int recv_mprobe; int errors; }; /* "mpi4py/MPI.pxd":28 * ctypedef MPI_Count Count "MPI_Count" * * ctypedef public api class Status [ # <<<<<<<<<<<<<< * type PyMPIStatus_Type, * object PyMPIStatusObject, */ struct PyMPIStatusObject { PyObject_HEAD MPI_Status ob_mpi; unsigned int flags; }; typedef struct PyMPIStatusObject PyMPIStatusObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIStatus_Type; /* "mpi4py/MPI.pxd":35 * cdef unsigned flags * * ctypedef public api class Datatype [ # <<<<<<<<<<<<<< * type PyMPIDatatype_Type, * object PyMPIDatatypeObject, */ struct PyMPIDatatypeObject { PyObject_HEAD MPI_Datatype ob_mpi; unsigned int flags; }; typedef struct PyMPIDatatypeObject PyMPIDatatypeObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIDatatype_Type; /* "mpi4py/MPI.pxd":42 * cdef unsigned flags * * ctypedef public api class Request [ # <<<<<<<<<<<<<< * type PyMPIRequest_Type, * object PyMPIRequestObject, */ struct PyMPIRequestObject { PyObject_HEAD MPI_Request ob_mpi; unsigned int flags; PyObject *ob_buf; }; typedef struct PyMPIRequestObject PyMPIRequestObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIRequest_Type; /* "mpi4py/MPI.pxd":50 * cdef object ob_buf * * ctypedef public api class Prequest(Request) [ # <<<<<<<<<<<<<< * type PyMPIPrequest_Type, * object PyMPIPrequestObject, */ struct PyMPIPrequestObject { struct PyMPIRequestObject __pyx_base; }; typedef struct PyMPIPrequestObject PyMPIPrequestObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIPrequest_Type; /* "mpi4py/MPI.pxd":56 * pass * * ctypedef public api class Grequest(Request) [ # <<<<<<<<<<<<<< * type PyMPIGrequest_Type, * object PyMPIGrequestObject, */ struct PyMPIGrequestObject { struct PyMPIRequestObject __pyx_base; MPI_Request ob_grequest; }; typedef struct PyMPIGrequestObject PyMPIGrequestObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIGrequest_Type; /* "mpi4py/MPI.pxd":62 * cdef MPI_Request ob_grequest * * ctypedef public api class Message [ # <<<<<<<<<<<<<< * type PyMPIMessage_Type, * object PyMPIMessageObject, */ struct PyMPIMessageObject { PyObject_HEAD MPI_Message ob_mpi; unsigned int flags; PyObject *ob_buf; }; typedef struct PyMPIMessageObject PyMPIMessageObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIMessage_Type; /* "mpi4py/MPI.pxd":70 * cdef object ob_buf * * ctypedef public api class Op [ # <<<<<<<<<<<<<< * type PyMPIOp_Type, * object PyMPIOpObject, */ struct PyMPIOpObject { PyObject_HEAD MPI_Op ob_mpi; unsigned int flags; PyObject *(*ob_func)(PyObject *, PyObject *); int ob_usrid; }; typedef struct PyMPIOpObject PyMPIOpObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIOp_Type; /* "mpi4py/MPI.pxd":79 * cdef int ob_usrid * * ctypedef public api class Group [ # <<<<<<<<<<<<<< * type PyMPIGroup_Type, * object PyMPIGroupObject, */ struct PyMPIGroupObject { PyObject_HEAD MPI_Group ob_mpi; unsigned int flags; }; typedef struct PyMPIGroupObject PyMPIGroupObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIGroup_Type; /* "mpi4py/MPI.pxd":86 * cdef unsigned flags * * ctypedef public api class Info [ # <<<<<<<<<<<<<< * type PyMPIInfo_Type, * object PyMPIInfoObject, */ struct PyMPIInfoObject { PyObject_HEAD MPI_Info ob_mpi; unsigned int flags; }; typedef struct PyMPIInfoObject PyMPIInfoObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIInfo_Type; /* "mpi4py/MPI.pxd":93 * cdef unsigned flags * * ctypedef public api class Errhandler [ # <<<<<<<<<<<<<< * type PyMPIErrhandler_Type, * object PyMPIErrhandlerObject, */ struct PyMPIErrhandlerObject { PyObject_HEAD MPI_Errhandler ob_mpi; unsigned int flags; }; typedef struct PyMPIErrhandlerObject PyMPIErrhandlerObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIErrhandler_Type; /* "mpi4py/MPI.pxd":100 * cdef unsigned flags * * ctypedef public api class Comm [ # <<<<<<<<<<<<<< * type PyMPIComm_Type, * object PyMPICommObject, */ struct PyMPICommObject { PyObject_HEAD MPI_Comm ob_mpi; unsigned int flags; }; typedef struct PyMPICommObject PyMPICommObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIComm_Type; /* "mpi4py/MPI.pxd":107 * cdef unsigned flags * * ctypedef public api class Intracomm(Comm) [ # <<<<<<<<<<<<<< * type PyMPIIntracomm_Type, * object PyMPIIntracommObject, */ struct PyMPIIntracommObject { struct PyMPICommObject __pyx_base; }; typedef struct PyMPIIntracommObject PyMPIIntracommObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIIntracomm_Type; /* "mpi4py/MPI.pxd":113 * pass * * ctypedef public api class Topocomm(Intracomm) [ # <<<<<<<<<<<<<< * type PyMPITopocomm_Type, * object PyMPITopocommObject, */ struct PyMPITopocommObject { struct PyMPIIntracommObject __pyx_base; }; typedef struct PyMPITopocommObject PyMPITopocommObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPITopocomm_Type; /* "mpi4py/MPI.pxd":119 * pass * * ctypedef public api class Cartcomm(Topocomm) [ # <<<<<<<<<<<<<< * type PyMPICartcomm_Type, * object PyMPICartcommObject, */ struct PyMPICartcommObject { struct PyMPITopocommObject __pyx_base; }; typedef struct PyMPICartcommObject PyMPICartcommObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPICartcomm_Type; /* "mpi4py/MPI.pxd":125 * pass * * ctypedef public api class Graphcomm(Topocomm) [ # <<<<<<<<<<<<<< * type PyMPIGraphcomm_Type, * object PyMPIGraphcommObject, */ struct PyMPIGraphcommObject { struct PyMPITopocommObject __pyx_base; }; typedef struct PyMPIGraphcommObject PyMPIGraphcommObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIGraphcomm_Type; /* "mpi4py/MPI.pxd":131 * pass * * ctypedef public api class Distgraphcomm(Topocomm) [ # <<<<<<<<<<<<<< * type PyMPIDistgraphcomm_Type, * object PyMPIDistgraphcommObject, */ struct PyMPIDistgraphcommObject { struct PyMPITopocommObject __pyx_base; }; typedef struct PyMPIDistgraphcommObject PyMPIDistgraphcommObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIDistgraphcomm_Type; /* "mpi4py/MPI.pxd":137 * pass * * ctypedef public api class Intercomm(Comm) [ # <<<<<<<<<<<<<< * type PyMPIIntercomm_Type, * object PyMPIIntercommObject, */ struct PyMPIIntercommObject { struct PyMPICommObject __pyx_base; }; typedef struct PyMPIIntercommObject PyMPIIntercommObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIIntercomm_Type; /* "mpi4py/MPI.pxd":143 * pass * * ctypedef public api class Win [ # <<<<<<<<<<<<<< * type PyMPIWin_Type, * object PyMPIWinObject, */ struct PyMPIWinObject { PyObject_HEAD MPI_Win ob_mpi; unsigned int flags; PyObject *ob_mem; }; typedef struct PyMPIWinObject PyMPIWinObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIWin_Type; /* "mpi4py/MPI.pxd":151 * cdef object ob_mem * * ctypedef public api class File [ # <<<<<<<<<<<<<< * type PyMPIFile_Type, * object PyMPIFileObject, */ struct PyMPIFileObject { PyObject_HEAD MPI_File ob_mpi; unsigned int flags; }; typedef struct PyMPIFileObject PyMPIFileObject; __PYX_EXTERN_C DL_EXPORT(PyTypeObject) PyMPIFile_Type; /* "mpi4py/MPI/asbuffer.pxi":143 * * @cython.final * cdef class memory: # <<<<<<<<<<<<<< * * """ */ struct __pyx_obj_6mpi4py_3MPI_memory { PyObject_HEAD Py_buffer view; }; /* "mpi4py/MPI/asmemory.pxi":13 * @cython.final * @cython.internal * cdef class _p_mem: # <<<<<<<<<<<<<< * cdef void *buf * def __cinit__(self): */ struct __pyx_obj_6mpi4py_3MPI__p_mem { PyObject_HEAD void *buf; }; /* "mpi4py/MPI/reqimpl.pxi":56 * @cython.final * @cython.internal * cdef class _p_greq: # <<<<<<<<<<<<<< * * cdef object query_fn */ struct __pyx_obj_6mpi4py_3MPI__p_greq { PyObject_HEAD struct __pyx_vtabstruct_6mpi4py_3MPI__p_greq *__pyx_vtab; PyObject *query_fn; PyObject *free_fn; PyObject *cancel_fn; PyObject *args; PyObject *kargs; }; /* "mpi4py/MPI/drepimpl.pxi":7 * @cython.final * @cython.internal * cdef class _p_datarep: # <<<<<<<<<<<<<< * * cdef object read_fn */ struct __pyx_obj_6mpi4py_3MPI__p_datarep { PyObject_HEAD struct __pyx_vtabstruct_6mpi4py_3MPI__p_datarep *__pyx_vtab; PyObject *read_fn; PyObject *write_fn; PyObject *extent_fn; }; /* "mpi4py/MPI/attrimpl.pxi":5 * @cython.final * @cython.internal * cdef class _p_keyval: # <<<<<<<<<<<<<< * cdef public object copy_fn * cdef public object delete_fn */ struct __pyx_obj_6mpi4py_3MPI__p_keyval { PyObject_HEAD PyObject *copy_fn; PyObject *delete_fn; int nopython; }; /* "mpi4py/MPI/msgbuffer.pxi":64 * @cython.final * @cython.internal * cdef class _p_message: # <<<<<<<<<<<<<< * cdef memory buf * cdef object count */ struct __pyx_obj_6mpi4py_3MPI__p_message { PyObject_HEAD struct __pyx_obj_6mpi4py_3MPI_memory *buf; PyObject *count; PyObject *displ; struct PyMPIDatatypeObject *type; }; /* "mpi4py/MPI/msgbuffer.pxi":364 * @cython.final * @cython.internal * cdef class _p_msg_p2p: # <<<<<<<<<<<<<< * * # raw C-side arguments */ struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p { PyObject_HEAD struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_p2p *__pyx_vtab; void *buf; int count; MPI_Datatype dtype; PyObject *_msg; }; /* "mpi4py/MPI/msgbuffer.pxi":408 * @cython.final * @cython.internal * cdef class _p_msg_cco: # <<<<<<<<<<<<<< * * # raw C-side arguments */ struct __pyx_obj_6mpi4py_3MPI__p_msg_cco { PyObject_HEAD struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_cco *__pyx_vtab; void *sbuf; void *rbuf; int scount; int rcount; int *scounts; int *rcounts; int *sdispls; int *rdispls; MPI_Datatype stype; MPI_Datatype rtype; PyObject *_smsg; PyObject *_rmsg; PyObject *_rcnt; }; /* "mpi4py/MPI/msgbuffer.pxi":832 * @cython.final * @cython.internal * cdef class _p_msg_ccow: # <<<<<<<<<<<<<< * * # raw C-side arguments */ struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow { PyObject_HEAD struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_ccow *__pyx_vtab; void *sbuf; void *rbuf; int *scounts; int *rcounts; int *sdispls; int *rdispls; MPI_Aint *sdisplsA; MPI_Aint *rdisplsA; MPI_Datatype *stypes; MPI_Datatype *rtypes; PyObject *_smsg; PyObject *_rmsg; }; /* "mpi4py/MPI/msgbuffer.pxi":904 * @cython.final * @cython.internal * cdef class _p_msg_rma: # <<<<<<<<<<<<<< * * # raw origin arguments */ struct __pyx_obj_6mpi4py_3MPI__p_msg_rma { PyObject_HEAD struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_rma *__pyx_vtab; void *oaddr; int ocount; MPI_Datatype otype; void *caddr; int ccount; MPI_Datatype ctype; void *raddr; int rcount; MPI_Datatype rtype; MPI_Aint tdisp; int tcount; MPI_Datatype ttype; PyObject *_origin; PyObject *_compare; PyObject *_result; PyObject *_target; }; /* "mpi4py/MPI/msgbuffer.pxi":1058 * @cython.final * @cython.internal * cdef class _p_msg_io: # <<<<<<<<<<<<<< * * # raw C-side data */ struct __pyx_obj_6mpi4py_3MPI__p_msg_io { PyObject_HEAD struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_io *__pyx_vtab; void *buf; int count; MPI_Datatype dtype; PyObject *_msg; }; /* "mpi4py/MPI/msgpickle.pxi":44 * @cython.final * @cython.internal * cdef class Pickle: # <<<<<<<<<<<<<< * * """ */ struct __pyx_obj_6mpi4py_3MPI_Pickle { PyObject_HEAD struct __pyx_vtabstruct_6mpi4py_3MPI_Pickle *__pyx_vtab; PyObject *ob_dumps; PyObject *ob_loads; PyObject *ob_PROTO; }; /* "mpi4py/MPI/reqimpl.pxi":56 * @cython.final * @cython.internal * cdef class _p_greq: # <<<<<<<<<<<<<< * * cdef object query_fn */ struct __pyx_vtabstruct_6mpi4py_3MPI__p_greq { int (*query)(struct __pyx_obj_6mpi4py_3MPI__p_greq *, MPI_Status *); int (*free)(struct __pyx_obj_6mpi4py_3MPI__p_greq *); int (*cancel)(struct __pyx_obj_6mpi4py_3MPI__p_greq *, int); }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_greq *__pyx_vtabptr_6mpi4py_3MPI__p_greq; static int __pyx_f_6mpi4py_3MPI_7_p_greq_query(struct __pyx_obj_6mpi4py_3MPI__p_greq *, MPI_Status *); static int __pyx_f_6mpi4py_3MPI_7_p_greq_free(struct __pyx_obj_6mpi4py_3MPI__p_greq *); static int __pyx_f_6mpi4py_3MPI_7_p_greq_cancel(struct __pyx_obj_6mpi4py_3MPI__p_greq *, int); /* "mpi4py/MPI/drepimpl.pxi":7 * @cython.final * @cython.internal * cdef class _p_datarep: # <<<<<<<<<<<<<< * * cdef object read_fn */ struct __pyx_vtabstruct_6mpi4py_3MPI__p_datarep { int (*read)(struct __pyx_obj_6mpi4py_3MPI__p_datarep *, void *, MPI_Datatype, int, void *, MPI_Offset); int (*write)(struct __pyx_obj_6mpi4py_3MPI__p_datarep *, void *, MPI_Datatype, int, void *, MPI_Offset); int (*extent)(struct __pyx_obj_6mpi4py_3MPI__p_datarep *, MPI_Datatype, MPI_Aint *); }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_datarep *__pyx_vtabptr_6mpi4py_3MPI__p_datarep; static int __pyx_f_6mpi4py_3MPI_10_p_datarep_read(struct __pyx_obj_6mpi4py_3MPI__p_datarep *, void *, MPI_Datatype, int, void *, MPI_Offset); static int __pyx_f_6mpi4py_3MPI_10_p_datarep_write(struct __pyx_obj_6mpi4py_3MPI__p_datarep *, void *, MPI_Datatype, int, void *, MPI_Offset); static int __pyx_f_6mpi4py_3MPI_10_p_datarep_extent(struct __pyx_obj_6mpi4py_3MPI__p_datarep *, MPI_Datatype, MPI_Aint *); /* "mpi4py/MPI/msgbuffer.pxi":364 * @cython.final * @cython.internal * cdef class _p_msg_p2p: # <<<<<<<<<<<<<< * * # raw C-side arguments */ struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_p2p { int (*for_send)(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *, PyObject *, int); int (*for_recv)(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *, PyObject *, int); }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_p2p *__pyx_vtabptr_6mpi4py_3MPI__p_msg_p2p; static int __pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_send(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *, PyObject *, int); static int __pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_recv(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *, PyObject *, int); /* "mpi4py/MPI/msgbuffer.pxi":408 * @cython.final * @cython.internal * cdef class _p_msg_cco: # <<<<<<<<<<<<<< * * # raw C-side arguments */ struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_cco { int (*for_cco_send)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, int, int); int (*for_cco_recv)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, int, int); int (*for_bcast)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, int, MPI_Comm); int (*for_gather)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, int, MPI_Comm); int (*for_scatter)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, int, MPI_Comm); int (*for_allgather)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm); int (*for_alltoall)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm); int (*for_neighbor_allgather)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm); int (*for_neighbor_alltoall)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm); int (*for_cro_send)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, int); int (*for_cro_recv)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, int); int (*for_reduce)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, int, MPI_Comm); int (*for_allreduce)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm); int (*for_reduce_scatter_block)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm); int (*for_reduce_scatter)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, PyObject *, MPI_Comm); int (*for_scan)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm); int (*for_exscan)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm); }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_cco *__pyx_vtabptr_6mpi4py_3MPI__p_msg_cco; static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, int, int); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, int, int); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_bcast(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, int, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_gather(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, int, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scatter(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, int, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allgather(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_alltoall(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_allgather(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_alltoall(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, int); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, int); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, int, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allreduce(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter_block(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, PyObject *, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scan(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_exscan(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm); /* "mpi4py/MPI/msgbuffer.pxi":832 * @cython.final * @cython.internal * cdef class _p_msg_ccow: # <<<<<<<<<<<<<< * * # raw C-side arguments */ struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_ccow { int (*for_alltoallw)(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *, PyObject *, PyObject *, MPI_Comm); int (*for_neighbor_alltoallw)(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *, PyObject *, PyObject *, MPI_Comm); }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_ccow *__pyx_vtabptr_6mpi4py_3MPI__p_msg_ccow; static int __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_alltoallw(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *, PyObject *, PyObject *, MPI_Comm); static int __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_neighbor_alltoallw(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *, PyObject *, PyObject *, MPI_Comm); /* "mpi4py/MPI/msgbuffer.pxi":904 * @cython.final * @cython.internal * cdef class _p_msg_rma: # <<<<<<<<<<<<<< * * # raw origin arguments */ struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_rma { int (*for_rma)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, int, PyObject *, int, PyObject *); int (*for_put)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int, PyObject *); int (*for_get)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int, PyObject *); int (*for_acc)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int, PyObject *); int (*set_origin)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int); int (*set_compare)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int); int (*set_result)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int); int (*for_get_acc)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, PyObject *, int, PyObject *); int (*for_fetch_op)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, PyObject *, int, MPI_Aint); int (*for_cmp_swap)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, PyObject *, PyObject *, int, MPI_Aint); }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_rma *__pyx_vtabptr_6mpi4py_3MPI__p_msg_rma; static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_rma(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, int, PyObject *, int, PyObject *); static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_put(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int, PyObject *); static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int, PyObject *); static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_acc(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int, PyObject *); static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_origin(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int); static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_compare(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int); static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_result(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int); static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get_acc(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, PyObject *, int, PyObject *); static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_fetch_op(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, PyObject *, int, MPI_Aint); static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_cmp_swap(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, PyObject *, PyObject *, int, MPI_Aint); /* "mpi4py/MPI/msgbuffer.pxi":1058 * @cython.final * @cython.internal * cdef class _p_msg_io: # <<<<<<<<<<<<<< * * # raw C-side data */ struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_io { int (*for_read)(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *, PyObject *); int (*for_write)(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *, PyObject *); }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_io *__pyx_vtabptr_6mpi4py_3MPI__p_msg_io; static int __pyx_f_6mpi4py_3MPI_9_p_msg_io_for_read(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *, PyObject *); static int __pyx_f_6mpi4py_3MPI_9_p_msg_io_for_write(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *, PyObject *); /* "mpi4py/MPI/msgpickle.pxi":44 * @cython.final * @cython.internal * cdef class Pickle: # <<<<<<<<<<<<<< * * """ */ struct __pyx_vtabstruct_6mpi4py_3MPI_Pickle { PyObject *(*cdumps)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *); PyObject *(*cloads)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *); PyObject *(*dump)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *, void **, int *); PyObject *(*load)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void *, int); PyObject *(*dumpv)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *, void **, int, int *, int *); PyObject *(*loadv)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void *, int, int *, int *); PyObject *(*alloc)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void **, int); PyObject *(*allocv)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void **, int, int *, int *); }; static struct __pyx_vtabstruct_6mpi4py_3MPI_Pickle *__pyx_vtabptr_6mpi4py_3MPI_Pickle; static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_cdumps(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *); static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_cloads(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *); static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_dump(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *, void **, int *); static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_load(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void *, int); static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_dumpv(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *, void **, int, int *, int *); static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_loadv(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void *, int, int *, int *); static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_alloc(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void **, int); static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_allocv(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void **, int, int *, int *); /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* PyCFunctionFastCall.proto */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); #else #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) #endif /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCall2Args.proto */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() PyErr_Occurred() #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* StrEquals.proto */ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); /* UnpackItemEndCheck.proto */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* DictGetItem.proto */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); #define __Pyx_PyObject_Dict_GetItem(obj, name)\ (likely(PyDict_CheckExact(obj)) ?\ __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) #endif /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* SetItemInt.proto */ #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* SwapException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif /* UnpackUnboundCMethod.proto */ typedef struct { PyObject *type; PyObject **method_name; PyCFunction func; PyObject *method; int flag; } __Pyx_CachedCFunction; /* CallUnboundCMethod2.proto */ static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); #else #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) #endif /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /* dict_getitem_default.proto */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /* CallUnboundCMethod1.proto */ static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); #else #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) #endif /* PyObjectLookupSpecial.proto */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); #if PY_MAJOR_VERSION < 3 if (unlikely(PyInstance_Check(obj))) return __Pyx_PyObject_GetAttrStr(obj, attr_name); #endif res = _PyType_Lookup(tp, attr_name); if (likely(res)) { descrgetfunc f = Py_TYPE(res)->tp_descr_get; if (!f) { Py_INCREF(res); } else { res = f(res, obj, (PyObject *)tp); } } else { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #else #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) #endif /* PyObjectGetMethod.proto */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* pop_index.proto */ static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix); static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix); #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix); #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\ (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\ __Pyx__PyList_PopIndex(L, py_ix, ix) : (\ (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ __Pyx__PyObject_PopIndex(L, py_ix))) #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\ __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\ __Pyx__PyList_PopIndex(L, py_ix, ix) : (\ (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ __Pyx__PyObject_PopIndex(L, py_ix))) #else #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\ __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\ (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ __Pyx__PyObject_PopIndex(L, py_ix)) #endif /* tp_new.proto */ #define __Pyx_tp_new(type_obj, args) __Pyx_tp_new_kwargs(type_obj, args, NULL) static CYTHON_INLINE PyObject* __Pyx_tp_new_kwargs(PyObject* type_obj, PyObject* args, PyObject* kwargs) { return (PyObject*) (((PyTypeObject*)type_obj)->tp_new((PyTypeObject*)type_obj, args, kwargs)); } /* PyObjectSetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key); #else #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif /* py_dict_items.proto */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); /* CallUnboundCMethod0.proto */ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CallUnboundCMethod0(cfunc, self)\ (likely((cfunc)->func) ?\ (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\ (PY_VERSION_HEX >= 0x030700A0 ?\ (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\ (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\ __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\ __Pyx__CallUnboundCMethod0(cfunc, self)) #else #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) #endif /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } #define __Pyx_GetModuleGlobalNameUncached(var, name) {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* SliceObject.proto */ #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\ __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) static CYTHON_INLINE int __Pyx_PyObject_SetSlice( PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* SliceObject.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); /* GetNameInClass.proto */ #define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); /* CythonFunction.proto */ #define __Pyx_CyFunction_USED 1 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; #if PY_VERSION_HEX < 0x030500A0 PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; void *defaults; int defaults_pyobjects; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); /* SetNameInClass.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) #else #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) #endif /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* ClassMethod.proto */ #include "descrobject.h" static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* RegisterModuleCleanup.proto */ static void __pyx_module_cleanup(PyObject *self); #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static int __Pyx_RegisterCleanup(void); #else #define __Pyx_RegisterCleanup() (0) #endif /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MPI_Aint(MPI_Aint value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MPI_Offset(MPI_Offset value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MPI_Fint(MPI_Fint value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MPI_Count(MPI_Count value); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE MPI_Aint __Pyx_PyInt_As_MPI_Aint(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE MPI_Count __Pyx_PyInt_As_MPI_Count(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE MPI_Offset __Pyx_PyInt_As_MPI_Offset(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE MPI_Fint __Pyx_PyInt_As_MPI_Fint(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); /* FunctionExport.proto */ static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); static int __pyx_f_6mpi4py_3MPI_7_p_greq_query(struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_self, MPI_Status *__pyx_v_status); /* proto*/ static int __pyx_f_6mpi4py_3MPI_7_p_greq_free(struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_self); /* proto*/ static int __pyx_f_6mpi4py_3MPI_7_p_greq_cancel(struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_self, int __pyx_v_completed); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_datarep_read(struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_self, void *__pyx_v_userbuf, MPI_Datatype __pyx_v_datatype, int __pyx_v_count, void *__pyx_v_filebuf, MPI_Offset __pyx_v_position); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_datarep_write(struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_self, void *__pyx_v_userbuf, MPI_Datatype __pyx_v_datatype, int __pyx_v_count, void *__pyx_v_filebuf, MPI_Offset __pyx_v_position); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_datarep_extent(struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_self, MPI_Datatype __pyx_v_datatype, MPI_Aint *__pyx_v_file_extent); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_send(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_self, PyObject *__pyx_v_msg, int __pyx_v_rank); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_recv(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_self, PyObject *__pyx_v_msg, int __pyx_v_rank); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_VECTOR, PyObject *__pyx_v_amsg, int __pyx_v_rank, int __pyx_v_blocks); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_VECTOR, PyObject *__pyx_v_amsg, int __pyx_v_rank, int __pyx_v_blocks); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_bcast(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_msg, int __pyx_v_root, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_gather(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, int __pyx_v_root, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scatter(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, int __pyx_v_root, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allgather(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_alltoall(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_allgather(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_alltoall(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_amsg, int __pyx_v_root); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_amsg, int __pyx_v_root); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, int __pyx_v_root, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allreduce(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter_block(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, PyObject *__pyx_v_rcnt, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scan(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_exscan(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_alltoallw(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_neighbor_alltoallw(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_rma(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, int __pyx_v_readonly, PyObject *__pyx_v_origin, int __pyx_v_rank, PyObject *__pyx_v_target); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_put(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_rank, PyObject *__pyx_v_target); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_rank, PyObject *__pyx_v_target); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_acc(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_rank, PyObject *__pyx_v_target); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_origin(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_rank); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_compare(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_compare, int __pyx_v_rank); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_result(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_result, int __pyx_v_rank); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get_acc(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_rank, PyObject *__pyx_v_target); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_fetch_op(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_rank, MPI_Aint __pyx_v_disp); /* proto*/ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_cmp_swap(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_compare, PyObject *__pyx_v_result, int __pyx_v_rank, MPI_Aint __pyx_v_disp); /* proto*/ static int __pyx_f_6mpi4py_3MPI_9_p_msg_io_for_read(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_self, PyObject *__pyx_v_msg); /* proto*/ static int __pyx_f_6mpi4py_3MPI_9_p_msg_io_for_write(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_self, PyObject *__pyx_v_msg); /* proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_cdumps(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_cloads(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_buf); /* proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_dump(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_obj, void **__pyx_v_p, int *__pyx_v_n); /* proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_load(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, void *__pyx_v_p, int __pyx_v_n); /* proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_dumpv(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_obj, void **__pyx_v_p, int __pyx_v_n, int *__pyx_v_cnt, int *__pyx_v_dsp); /* proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_loadv(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, void *__pyx_v_p, int __pyx_v_n, int *__pyx_v_cnt, int *__pyx_v_dsp); /* proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_alloc(CYTHON_UNUSED struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, void **__pyx_v_p, int __pyx_v_n); /* proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_allocv(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, void **__pyx_v_p, int __pyx_v_n, int *__pyx_v_cnt, int *__pyx_v_dsp); /* proto*/ /* Module declarations from 'mpi4py.libmpi' */ /* Module declarations from 'cython' */ /* Module declarations from 'mpi4py.MPI' */ static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Status = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Datatype = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Request = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Prequest = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Grequest = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Message = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Op = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Group = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Info = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Errhandler = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Comm = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Intracomm = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Topocomm = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Cartcomm = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Graphcomm = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Distgraphcomm = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Intercomm = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Win = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_File = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_memory = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_mem = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_greq = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_datarep = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_keyval = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_message = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_msg_p2p = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_msg_cco = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_msg_ccow = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_msg_rma = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI__p_msg_io = 0; static PyTypeObject *__pyx_ptype_6mpi4py_3MPI_Pickle = 0; static __pyx_t_6mpi4py_3MPI_Options __pyx_v_6mpi4py_3MPI_options; static int __pyx_v_6mpi4py_3MPI_abort_status; static PyObject *__pyx_v_6mpi4py_3MPI_MPIException = 0; static PyObject *__pyx_v_6mpi4py_3MPI__pypy_sentinel = 0; static char __pyx_v_6mpi4py_3MPI_BYTE_FMT[2]; static PyTypeObject *__pyx_v_6mpi4py_3MPI_array_array = 0; static PyTypeObject *__pyx_v_6mpi4py_3MPI_numpy_array = 0; static int __pyx_v_6mpi4py_3MPI_pypy_have_numpy; static MPI_Status __pyx_v_6mpi4py_3MPI_empty_status; static PyObject *__pyx_v_6mpi4py_3MPI_op_user_registry = 0; static struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_6mpi4py_3MPI__buffer = 0; static PyObject *__pyx_v_6mpi4py_3MPI___UNWEIGHTED__ = 0; static PyObject *__pyx_v_6mpi4py_3MPI___WEIGHTS_EMPTY__ = 0; static PyObject *__pyx_v_6mpi4py_3MPI_allocate_lock = 0; static int __pyx_v_6mpi4py_3MPI_lock_keyval; static PyObject *__pyx_v_6mpi4py_3MPI_lock_registry = 0; static PyObject *__pyx_v_6mpi4py_3MPI_datarep_registry = 0; static PyObject *__pyx_v_6mpi4py_3MPI_type_keyval = 0; static PyObject *__pyx_v_6mpi4py_3MPI_comm_keyval = 0; static PyObject *__pyx_v_6mpi4py_3MPI_win_keyval = 0; static PyObject *__pyx_v_6mpi4py_3MPI___BOTTOM__ = 0; static PyObject *__pyx_v_6mpi4py_3MPI___IN_PLACE__ = 0; static PyObject *__pyx_v_6mpi4py_3MPI_PyPickle_dumps = 0; static PyObject *__pyx_v_6mpi4py_3MPI_PyPickle_loads = 0; static PyObject *__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL = 0; static PyObject *__pyx_v_6mpi4py_3MPI_PyBytesIO_New = 0; static PyObject *__pyx_v_6mpi4py_3MPI_PyPickle_loadf = 0; static struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE = 0; static struct PyMPIErrhandlerObject *__pyx_v_6mpi4py_3MPI___ERRHANDLER_NULL__ = 0; static struct PyMPIErrhandlerObject *__pyx_v_6mpi4py_3MPI___ERRORS_RETURN__ = 0; static struct PyMPIErrhandlerObject *__pyx_v_6mpi4py_3MPI___ERRORS_ARE_FATAL__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___DATATYPE_NULL__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UB__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LB__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___PACKED__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___BYTE__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___AINT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___OFFSET__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___COUNT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___CHAR__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___WCHAR__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___SIGNED_CHAR__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___SHORT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LONG__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LONG_LONG__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UNSIGNED_CHAR__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UNSIGNED__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG_LONG__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___FLOAT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___DOUBLE__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LONG_DOUBLE__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___C_BOOL__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INT8_T__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INT16_T__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INT32_T__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INT64_T__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UINT8_T__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UINT16_T__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UINT32_T__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___UINT64_T__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___C_COMPLEX__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___CXX_BOOL__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___CXX_FLOAT_COMPLEX__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___CXX_DOUBLE_COMPLEX__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___CXX_LONG_DOUBLE_COMPLEX__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___SHORT_INT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___TWOINT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LONG_INT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___FLOAT_INT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___DOUBLE_INT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LONG_DOUBLE_INT__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___CHARACTER__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LOGICAL__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INTEGER__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___REAL__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___DOUBLE_PRECISION__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___COMPLEX__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LOGICAL1__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LOGICAL2__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LOGICAL4__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___LOGICAL8__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INTEGER1__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INTEGER2__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INTEGER4__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INTEGER8__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___INTEGER16__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___REAL2__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___REAL4__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___REAL8__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___REAL16__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___COMPLEX4__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___COMPLEX8__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___COMPLEX16__ = 0; static struct PyMPIDatatypeObject *__pyx_v_6mpi4py_3MPI___COMPLEX32__ = 0; static PyObject *__pyx_v_6mpi4py_3MPI_TypeDict = 0; static PyObject *__pyx_v_6mpi4py_3MPI_CTypeDict = 0; static PyObject *__pyx_v_6mpi4py_3MPI_FTypeDict = 0; static struct PyMPIRequestObject *__pyx_v_6mpi4py_3MPI___REQUEST_NULL__ = 0; static struct PyMPIMessageObject *__pyx_v_6mpi4py_3MPI___MESSAGE_NULL__ = 0; static struct PyMPIMessageObject *__pyx_v_6mpi4py_3MPI___MESSAGE_NO_PROC__ = 0; static struct PyMPIInfoObject *__pyx_v_6mpi4py_3MPI___INFO_NULL__ = 0; static struct PyMPIInfoObject *__pyx_v_6mpi4py_3MPI___INFO_ENV__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___OP_NULL__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___MAX__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___MIN__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___SUM__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___PROD__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___LAND__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___BAND__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___LOR__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___BOR__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___LXOR__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___BXOR__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___MAXLOC__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___MINLOC__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___REPLACE__ = 0; static struct PyMPIOpObject *__pyx_v_6mpi4py_3MPI___NO_OP__ = 0; static struct PyMPIGroupObject *__pyx_v_6mpi4py_3MPI___GROUP_NULL__ = 0; static struct PyMPIGroupObject *__pyx_v_6mpi4py_3MPI___GROUP_EMPTY__ = 0; static struct PyMPICommObject *__pyx_v_6mpi4py_3MPI___COMM_NULL__ = 0; static struct PyMPIIntracommObject *__pyx_v_6mpi4py_3MPI___COMM_SELF__ = 0; static struct PyMPIIntracommObject *__pyx_v_6mpi4py_3MPI___COMM_WORLD__ = 0; static struct PyMPIIntercommObject *__pyx_v_6mpi4py_3MPI___COMM_PARENT__ = 0; static struct PyMPIWinObject *__pyx_v_6mpi4py_3MPI___WIN_NULL__ = 0; static struct PyMPIFileObject *__pyx_v_6mpi4py_3MPI___FILE_NULL__ = 0; static int __pyx_f_6mpi4py_3MPI_warnOpt(PyObject *, PyObject *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_getOptions(__pyx_t_6mpi4py_3MPI_Options *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_bootstrap(void); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_mpi_active(void); /*proto*/ static int __pyx_f_6mpi4py_3MPI_initialize(void); /*proto*/ static void __pyx_f_6mpi4py_3MPI_finalize(void); /*proto*/ static void __pyx_f_6mpi4py_3MPI_atexit(void); /*proto*/ static int __pyx_f_6mpi4py_3MPI_PyMPI_Raise(int); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_CHKERR(int); /*proto*/ static CYTHON_INLINE void __pyx_f_6mpi4py_3MPI_print_traceback(void); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_Py_IsInitialized(void); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asmpistr(PyObject *, char **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_tompistr(char const *, int); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_mpistr(char const *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_pystr(char const *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_PyPy_GetBuffer(PyObject *, Py_buffer *, int); /*proto*/ static int __pyx_f_6mpi4py_3MPI_Py27_GetBuffer(PyObject *, Py_buffer *, int); /*proto*/ static int __pyx_f_6mpi4py_3MPI_PyMPI_GetBuffer(PyObject *, Py_buffer *, int); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_newbuffer(void); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_getbuffer(PyObject *, int, int); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_getformat(struct __pyx_obj_6mpi4py_3MPI_memory *); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_getbuffer_r(PyObject *, void **, MPI_Aint *); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_getbuffer_w(PyObject *, void **, MPI_Aint *); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_asbuffer(PyObject *, void *, MPI_Aint, int); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_asmemory(PyObject *, void **, MPI_Aint *); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_tomemory(void *, MPI_Aint); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_mem *__pyx_f_6mpi4py_3MPI_allocate(Py_ssize_t, size_t, void *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_Datatype(PyObject *, int, MPI_Datatype **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_Info(PyObject *, int, MPI_Info **); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_is_string(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asstring(PyObject *, char **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_str(PyObject *, char ***); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_argv(PyObject *, char ***); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_cmds(PyObject *, int *, char ***); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_argvs(PyObject *, int, char ****); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_nprocs(PyObject *, int, int **); /*proto*/ static CYTHON_INLINE MPI_Status *__pyx_f_6mpi4py_3MPI_arg_Status(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_builtin_Datatype(MPI_Datatype); /*proto*/ static CYTHON_INLINE struct PyMPIDatatypeObject *__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_Datatype); /*proto*/ static CYTHON_INLINE struct PyMPIDatatypeObject *__pyx_f_6mpi4py_3MPI_ref_Datatype(MPI_Datatype); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Datatype(MPI_Datatype *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_acquire_rs(PyObject *, PyObject *, int *, MPI_Request **, MPI_Status **); /*proto*/ static int __pyx_f_6mpi4py_3MPI_release_rs(PyObject *, PyObject *, int, MPI_Request *, MPI_Status *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_greq_query(void *, MPI_Status *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_greq_free(void *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_greq_cancel(void *, int); /*proto*/ static int MPIAPI __pyx_f_6mpi4py_3MPI_greq_query_fn(void *, MPI_Status *); /*proto*/ static int MPIAPI __pyx_f_6mpi4py_3MPI_greq_free_fn(void *); /*proto*/ static int MPIAPI __pyx_f_6mpi4py_3MPI_greq_cancel_fn(void *, int); /*proto*/ static CYTHON_INLINE struct PyMPIRequestObject *__pyx_f_6mpi4py_3MPI_new_Request(MPI_Request); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Request(MPI_Request *); /*proto*/ static CYTHON_INLINE struct PyMPIMessageObject *__pyx_f_6mpi4py_3MPI_new_Message(MPI_Message); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Message(MPI_Message *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_MAX(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_MIN(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_SUM(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_PROD(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_BAND(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_BOR(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_BXOR(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_LAND(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_LOR(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_LXOR(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_MAXLOC(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_MINLOC(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_REPLACE(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI__op_NO_OP(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_op_user_py(int, PyObject *, PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE void __pyx_f_6mpi4py_3MPI_op_user_mpi(int, void *, void *, MPI_Aint, MPI_Datatype *); /*proto*/ static CYTHON_INLINE void __pyx_f_6mpi4py_3MPI_op_user_call(int, void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_01(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_02(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_03(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_04(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_05(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_06(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_07(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_08(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_09(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_10(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_11(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_12(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_13(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_14(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_15(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_16(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_17(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_18(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_19(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_20(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_21(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_22(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_23(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_24(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_25(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_26(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_27(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_28(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_29(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_30(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_31(void *, void *, int *, MPI_Datatype *); /*proto*/ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_32(void *, void *, int *, MPI_Datatype *); /*proto*/ static MPI_User_function *__pyx_f_6mpi4py_3MPI_op_user_map(int); /*proto*/ static int __pyx_f_6mpi4py_3MPI_op_user_new(PyObject *, MPI_User_function **); /*proto*/ static int __pyx_f_6mpi4py_3MPI_op_user_del(int *); /*proto*/ static CYTHON_INLINE struct PyMPIOpObject *__pyx_f_6mpi4py_3MPI_new_Op(MPI_Op); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Op(MPI_Op *); /*proto*/ static CYTHON_INLINE struct PyMPIInfoObject *__pyx_f_6mpi4py_3MPI_new_Info(MPI_Info); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Info(MPI_Info *); /*proto*/ static CYTHON_INLINE MPI_Info __pyx_f_6mpi4py_3MPI_arg_Info(PyObject *); /*proto*/ static CYTHON_INLINE struct PyMPIGroupObject *__pyx_f_6mpi4py_3MPI_new_Group(MPI_Group); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Group(MPI_Group *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_attach_buffer(PyObject *, void **, int *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_detach_buffer(void *, int); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_asarray_weights(PyObject *, int, int **); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_comm_neighbors_count(MPI_Comm, int *, int *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_lock_free_cb(MPI_Comm); /*proto*/ static int MPIAPI __pyx_f_6mpi4py_3MPI_lock_free_fn(MPI_Comm, int, void *, void *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_Lock_table(MPI_Comm); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_Lock(MPI_Comm, PyObject *); /*proto*/ static CYTHON_INLINE struct PyMPICommObject *__pyx_f_6mpi4py_3MPI_new_Comm(MPI_Comm); /*proto*/ static CYTHON_INLINE struct PyMPIIntracommObject *__pyx_f_6mpi4py_3MPI_new_Intracomm(MPI_Comm); /*proto*/ static CYTHON_INLINE struct PyMPIIntercommObject *__pyx_f_6mpi4py_3MPI_new_Intercomm(MPI_Comm); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Comm(MPI_Comm *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_win_get_base(MPI_Win, void **); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_win_get_size(MPI_Win, MPI_Aint *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_win_get_unit(MPI_Win, int *); /*proto*/ static CYTHON_INLINE struct PyMPIWinObject *__pyx_f_6mpi4py_3MPI_new_Win(MPI_Win); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Win(MPI_Win *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_datarep_read(void *, MPI_Datatype, int, void *, MPI_Offset, void *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_datarep_write(void *, MPI_Datatype, int, void *, MPI_Offset, void *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_datarep_extent(MPI_Datatype, MPI_Aint *, void *); /*proto*/ static int MPIAPI __pyx_f_6mpi4py_3MPI_datarep_read_fn(void *, MPI_Datatype, int, void *, MPI_Offset, void *); /*proto*/ static int MPIAPI __pyx_f_6mpi4py_3MPI_datarep_write_fn(void *, MPI_Datatype, int, void *, MPI_Offset, void *); /*proto*/ static int MPIAPI __pyx_f_6mpi4py_3MPI_datarep_extent_fn(MPI_Datatype, MPI_Aint *, void *); /*proto*/ static CYTHON_INLINE struct PyMPIFileObject *__pyx_f_6mpi4py_3MPI_new_File(MPI_File); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_File(MPI_File *); /*proto*/ static CYTHON_INLINE struct PyMPIErrhandlerObject *__pyx_f_6mpi4py_3MPI_new_Errhandler(MPI_Errhandler); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Errhandler(MPI_Errhandler *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_comm_set_eh(MPI_Comm); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_win_set_eh(MPI_Win); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_file_set_eh(MPI_File); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_is_integral(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_is_buffer(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_is_datatype(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_downcast(MPI_Aint); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_clipcount(MPI_Aint); /*proto*/ static struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_f_6mpi4py_3MPI_message_basic(PyObject *, PyObject *, int, void **, MPI_Aint *, MPI_Datatype *); /*proto*/ static struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_f_6mpi4py_3MPI_message_simple(PyObject *, int, int, int, void **, int *, MPI_Datatype *); /*proto*/ static struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_f_6mpi4py_3MPI_message_vector(PyObject *, int, int, int, void **, int **, int **, MPI_Datatype *); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_f_6mpi4py_3MPI_message_p2p_send(PyObject *, int); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_f_6mpi4py_3MPI_message_p2p_recv(PyObject *, int); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_f_6mpi4py_3MPI_message_cco(void); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_f_6mpi4py_3MPI_message_ccow(void); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_f_6mpi4py_3MPI_message_rma(void); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_f_6mpi4py_3MPI_message_io_read(PyObject *); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_f_6mpi4py_3MPI_message_io_write(PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_allocate_count_displ(int, int **, int **); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_send(PyObject *, int, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_bsend(PyObject *, int, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_ssend(PyObject *, int, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv_obarg(PyObject *, int, int, MPI_Comm, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv_match(PyObject *, int, int, MPI_Comm, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv_probe(PyObject *, int, int, MPI_Comm, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv(PyObject *, int, int, MPI_Comm, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_isend(PyObject *, int, int, MPI_Comm, MPI_Request *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_ibsend(PyObject *, int, int, MPI_Comm, MPI_Request *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_issend(PyObject *, int, int, MPI_Comm, MPI_Request *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_irecv(PyObject *, int, int, MPI_Comm, MPI_Request *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_sendrecv(PyObject *, int, int, PyObject *, int, int, MPI_Comm, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_load(MPI_Status *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_wait(struct PyMPIRequestObject *, struct PyMPIStatusObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_test(struct PyMPIRequestObject *, int *, struct PyMPIStatusObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_waitany(PyObject *, int *, struct PyMPIStatusObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_testany(PyObject *, int *, int *, struct PyMPIStatusObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_waitall(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_testall(PyObject *, int *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_probe(int, int, MPI_Comm, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_iprobe(int, int, MPI_Comm, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_mprobe(int, int, MPI_Comm, MPI_Message *, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_improbe(int, int, MPI_Comm, int *, MPI_Message *, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_mrecv(PyObject *, MPI_Message *, MPI_Status *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_imrecv(PyObject *, MPI_Message *, MPI_Request *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_barrier(MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_bcast(PyObject *, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_gather(PyObject *, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scatter(PyObject *, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allgather(PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_alltoall(PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_neighbor_allgather(PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_neighbor_alltoall(PyObject *, MPI_Comm); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI__py_reduce(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI__py_scan(PyObject *, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI__py_exscan(PyObject *, PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce_naive(PyObject *, PyObject *, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allreduce_naive(PyObject *, PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scan_naive(PyObject *, PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_exscan_naive(PyObject *, PyObject *, MPI_Comm); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_copy(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_send_p2p(PyObject *, int, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv_p2p(int, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_sendrecv_p2p(PyObject *, int, int, int, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_bcast_p2p(PyObject *, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce_p2p(PyObject *, PyObject *, int, MPI_Comm, int); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scan_p2p(PyObject *, PyObject *, MPI_Comm, int); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_exscan_p2p(PyObject *, PyObject *, MPI_Comm, int); /*proto*/ static int __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTRA(MPI_Comm, MPI_Comm *, int *); /*proto*/ static int __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTER(MPI_Comm, MPI_Comm *, int *, MPI_Comm *, int *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce_intra(PyObject *, PyObject *, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce_inter(PyObject *, PyObject *, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allreduce_intra(PyObject *, PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allreduce_inter(PyObject *, PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scan_intra(PyObject *, PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_exscan_intra(PyObject *, PyObject *, MPI_Comm); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_comm_is_intra(MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce(PyObject *, PyObject *, int, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allreduce(PyObject *, PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scan(PyObject *, PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_exscan(PyObject *, PyObject *, MPI_Comm); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIDatatype_New(MPI_Datatype); /*proto*/ static MPI_Datatype *__pyx_f_6mpi4py_3MPI_PyMPIDatatype_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIStatus_New(MPI_Status *); /*proto*/ static MPI_Status *__pyx_f_6mpi4py_3MPI_PyMPIStatus_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIRequest_New(MPI_Request); /*proto*/ static MPI_Request *__pyx_f_6mpi4py_3MPI_PyMPIRequest_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIMessage_New(MPI_Message); /*proto*/ static MPI_Message *__pyx_f_6mpi4py_3MPI_PyMPIMessage_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIOp_New(MPI_Op); /*proto*/ static MPI_Op *__pyx_f_6mpi4py_3MPI_PyMPIOp_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIInfo_New(MPI_Info); /*proto*/ static MPI_Info *__pyx_f_6mpi4py_3MPI_PyMPIInfo_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIGroup_New(MPI_Group); /*proto*/ static MPI_Group *__pyx_f_6mpi4py_3MPI_PyMPIGroup_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIComm_New(MPI_Comm); /*proto*/ static MPI_Comm *__pyx_f_6mpi4py_3MPI_PyMPIComm_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIWin_New(MPI_Win); /*proto*/ static MPI_Win *__pyx_f_6mpi4py_3MPI_PyMPIWin_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIFile_New(MPI_File); /*proto*/ static MPI_File *__pyx_f_6mpi4py_3MPI_PyMPIFile_Get(PyObject *); /*proto*/ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIErrhandler_New(MPI_Errhandler); /*proto*/ static MPI_Errhandler *__pyx_f_6mpi4py_3MPI_PyMPIErrhandler_Get(PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_AddTypeMap(PyObject *, char const *, struct PyMPIDatatypeObject *); /*proto*/ static CYTHON_INLINE char const *__pyx_f_6mpi4py_3MPI_Datatype2String(MPI_Datatype); /*proto*/ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI__mpi_type(PyObject *, PyTypeObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(int, int **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_newarray(int, MPI_Aint **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(PyObject *, int *, int **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_getarray(PyObject *, int *, MPI_Aint **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(PyObject *, int, int **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_chkarray(PyObject *, int, MPI_Aint **); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(PyObject *, MPI_Datatype, int, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(PyObject *, MPI_Comm, int, PyObject *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(PyObject *, MPI_Win, int, PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy(MPI_Datatype, int, void *, void *, void *, int *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy(MPI_Comm, int, void *, void *, void *, int *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy(MPI_Win, int, void *, void *, void *, int *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete(MPI_Datatype, int, void *, void *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete(MPI_Comm, int, void *, void *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete(MPI_Win, int, void *, void *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_cb(MPI_Datatype, int, void *, void *, void *, int *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_cb(MPI_Comm, int, void *, void *, void *, int *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_cb(MPI_Win, int, void *, void *, void *, int *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_cb(MPI_Datatype, int, void *, void *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_cb(MPI_Comm, int, void *, void *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_cb(MPI_Win, int, void *, void *); /*proto*/ static int MPIAPI __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_fn(MPI_Datatype, int, void *, void *, void *, int *); /*proto*/ static int MPIAPI __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_fn(MPI_Comm, int, void *, void *, void *, int *); /*proto*/ static int MPIAPI __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_fn(MPI_Win, int, void *, void *, void *, int *); /*proto*/ static int MPIAPI __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_fn(MPI_Datatype, int, void *, void *); /*proto*/ static int MPIAPI __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_fn(MPI_Comm, int, void *, void *); /*proto*/ static int MPIAPI __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_fn(MPI_Win, int, void *, void *); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(MPI_Datatype, int); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(MPI_Comm, int); /*proto*/ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(MPI_Win, int); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_get(MPI_Datatype, int, void *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_get(MPI_Comm, int, void *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_get(MPI_Win, int, void *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_set(MPI_Datatype, int, PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_set(MPI_Comm, int, PyObject *); /*proto*/ static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_set(MPI_Win, int, PyObject *); /*proto*/ static PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_message_vector_w(PyObject *, int, int, void **, int **, int **, MPI_Datatype **); /*proto*/ static PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_message_vector_w(PyObject *, int, int, void **, int **, MPI_Aint **, MPI_Datatype **); /*proto*/ #define __Pyx_MODULE_NAME "mpi4py.MPI" extern int __pyx_module_is_main_mpi4py__MPI; int __pyx_module_is_main_mpi4py__MPI = 0; /* Implementation of 'mpi4py.MPI' */ static PyObject *__pyx_builtin_ImportError; static PyObject *__pyx_builtin_staticmethod; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_property; static PyObject *__pyx_builtin_SystemError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_IndexError; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_KeyError; static PyObject *__pyx_builtin_NotImplemented; static PyObject *__pyx_builtin_OverflowError; static PyObject *__pyx_builtin_UserWarning; static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_NotImplementedError; static const char __pyx_k_B[] = "B"; static const char __pyx_k_i[] = "i"; static const char __pyx_k_m[] = "m"; static const char __pyx_k_n[] = "n"; static const char __pyx_k_p[] = "p"; static const char __pyx_k_r[] = "r"; static const char __pyx_k_x[] = "x"; static const char __pyx_k_y[] = "y"; static const char __pyx_k_IO[] = "IO"; static const char __pyx_k_LB[] = "LB"; static const char __pyx_k_Op[] = "Op"; static const char __pyx_k_UB[] = "UB"; static const char __pyx_k_eq[] = "__eq__"; static const char __pyx_k_ex[] = "ex"; static const char __pyx_k_fd[] = "fd"; static const char __pyx_k_ge[] = "__ge__"; static const char __pyx_k_gt[] = "__gt__"; static const char __pyx_k_io[] = "io"; static const char __pyx_k_lb[] = "lb"; static const char __pyx_k_le[] = "__le__"; static const char __pyx_k_lt[] = "__lt__"; static const char __pyx_k_ne[] = "__ne__"; static const char __pyx_k_no[] = "no"; static const char __pyx_k_op[] = "op"; static const char __pyx_k_rc[] = "rc"; static const char __pyx_k_rd[] = "rd"; static const char __pyx_k_tc[] = "tc"; static const char __pyx_k_wr[] = "wr"; static const char __pyx_k_xs[] = "xs"; static const char __pyx_k_BOR[] = "BOR"; static const char __pyx_k_DUP[] = "DUP"; static const char __pyx_k_Dup[] = "Dup"; static const char __pyx_k_Get[] = "Get"; static const char __pyx_k_INT[] = "INT"; static const char __pyx_k_LOR[] = "LOR"; static const char __pyx_k_MAX[] = "MAX"; static const char __pyx_k_MIN[] = "MIN"; static const char __pyx_k_SUM[] = "SUM"; static const char __pyx_k_Set[] = "Set"; static const char __pyx_k_Win[] = "Win"; static const char __pyx_k__23[] = ""; static const char __pyx_k_arg[] = "arg"; static const char __pyx_k_buf[] = "buf"; static const char __pyx_k_doc[] = "__doc__"; static const char __pyx_k_get[] = "get"; static const char __pyx_k_int[] = "__int__"; static const char __pyx_k_key[] = "key"; static const char __pyx_k_mem[] = "mem"; static const char __pyx_k_new[] = "__new__"; static const char __pyx_k_obj[] = "obj"; static const char __pyx_k_pop[] = "pop"; static const char __pyx_k_ptr[] = "ptr"; static const char __pyx_k_str[] = "__str__"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_tag[] = "tag"; static const char __pyx_k_tmp[] = "tmp"; static const char __pyx_k_win[] = "win"; static const char __pyx_k_yes[] = "yes"; static const char __pyx_k_AINT[] = "AINT"; static const char __pyx_k_BAND[] = "BAND"; static const char __pyx_k_BOOL[] = "BOOL"; static const char __pyx_k_BXOR[] = "BXOR"; static const char __pyx_k_BYTE[] = "BYTE"; static const char __pyx_k_CART[] = "CART"; static const char __pyx_k_CHAR[] = "CHAR"; static const char __pyx_k_Comm[] = "Comm"; static const char __pyx_k_File[] = "File"; static const char __pyx_k_HOST[] = "HOST"; static const char __pyx_k_Info[] = "Info"; static const char __pyx_k_Init[] = "Init"; static const char __pyx_k_Join[] = "Join"; static const char __pyx_k_LAND[] = "LAND"; static const char __pyx_k_LONG[] = "LONG"; static const char __pyx_k_LXOR[] = "LXOR"; static const char __pyx_k_Open[] = "Open"; static const char __pyx_k_PROD[] = "PROD"; static const char __pyx_k_REAL[] = "REAL"; static const char __pyx_k_ROOT[] = "ROOT"; static const char __pyx_k_args[] = "args"; static const char __pyx_k_base[] = "base"; static const char __pyx_k_bool[] = "__bool__"; static const char __pyx_k_call[] = "__call__"; static const char __pyx_k_char[] = "char"; static const char __pyx_k_comm[] = "comm"; static const char __pyx_k_data[] = "data"; static const char __pyx_k_dest[] = "dest"; static const char __pyx_k_dims[] = "dims"; static const char __pyx_k_disp[] = "disp"; static const char __pyx_k_exit[] = "__exit__"; static const char __pyx_k_f2py[] = "f2py"; static const char __pyx_k_file[] = "file"; static const char __pyx_k_flag[] = "flag"; static const char __pyx_k_hash[] = "__hash__"; static const char __pyx_k_high[] = "high"; static const char __pyx_k_ierr[] = "ierr"; static const char __pyx_k_info[] = "info"; static const char __pyx_k_init[] = "__init__"; static const char __pyx_k_keys[] = "keys"; static const char __pyx_k_load[] = "load"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_nlen[] = "nlen"; static const char __pyx_k_rank[] = "rank"; static const char __pyx_k_recv[] = "recv"; static const char __pyx_k_repr[] = "__repr__"; static const char __pyx_k_root[] = "root"; static const char __pyx_k_self[] = "self"; static const char __pyx_k_size[] = "size"; static const char __pyx_k_warn[] = "warn"; static const char __pyx_k_COUNT[] = "COUNT"; static const char __pyx_k_FLOAT[] = "FLOAT"; static const char __pyx_k_F_INT[] = "F_INT"; static const char __pyx_k_GRAPH[] = "GRAPH"; static const char __pyx_k_Group[] = "Group"; static const char __pyx_k_IDENT[] = "IDENT"; static const char __pyx_k_NO_OP[] = "NO_OP"; static const char __pyx_k_Probe[] = "Probe"; static const char __pyx_k_REAL2[] = "REAL2"; static const char __pyx_k_REAL4[] = "REAL4"; static const char __pyx_k_REAL8[] = "REAL8"; static const char __pyx_k_SHORT[] = "SHORT"; static const char __pyx_k_Shift[] = "Shift"; static const char __pyx_k_Start[] = "Start"; static const char __pyx_k_Union[] = "Union"; static const char __pyx_k_WCHAR[] = "WCHAR"; static const char __pyx_k_Wtick[] = "Wtick"; static const char __pyx_k_Wtime[] = "Wtime"; static const char __pyx_k_addr1[] = "addr1"; static const char __pyx_k_addr2[] = "addr2"; static const char __pyx_k_amode[] = "amode"; static const char __pyx_k_array[] = "array"; static const char __pyx_k_bcast[] = "bcast"; static const char __pyx_k_cinfo[] = "cinfo"; static const char __pyx_k_color[] = "color"; static const char __pyx_k_comm1[] = "comm1"; static const char __pyx_k_comm2[] = "comm2"; static const char __pyx_k_count[] = "count"; static const char __pyx_k_dargs[] = "dargs"; static const char __pyx_k_doc_2[] = "doc"; static const char __pyx_k_dtype[] = "dtype"; static const char __pyx_k_dumps[] = "dumps"; static const char __pyx_k_edges[] = "edges"; static const char __pyx_k_enter[] = "__enter__"; static const char __pyx_k_error[] = "error"; static const char __pyx_k_etype[] = "etype"; static const char __pyx_k_fatal[] = "fatal"; static const char __pyx_k_flags[] = "flags"; static const char __pyx_k_flush[] = "flush"; static const char __pyx_k_group[] = "group"; static const char __pyx_k_idims[] = "idims"; static const char __pyx_k_inbuf[] = "inbuf"; static const char __pyx_k_index[] = "index"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_kargs[] = "kargs"; static const char __pyx_k_level[] = "level"; static const char __pyx_k_loads[] = "loads"; static const char __pyx_k_major[] = "major"; static const char __pyx_k_micro[] = "micro"; static const char __pyx_k_minor[] = "minor"; static const char __pyx_k_ndims[] = "ndims"; static const char __pyx_k_numpy[] = "numpy"; static const char __pyx_k_order[] = "order"; static const char __pyx_k_other[] = "other"; static const char __pyx_k_probe[] = "probe"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_ranks[] = "ranks"; static const char __pyx_k_sizes[] = "sizes"; static const char __pyx_k_state[] = "state"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_APPNUM[] = "APPNUM"; static const char __pyx_k_BOTTOM[] = "BOTTOM"; static const char __pyx_k_C_BOOL[] = "C_BOOL"; static const char __pyx_k_Create[] = "Create"; static const char __pyx_k_DARRAY[] = "DARRAY"; static const char __pyx_k_DOUBLE[] = "DOUBLE"; static const char __pyx_k_Delete[] = "Delete"; static const char __pyx_k_ERR_IO[] = "ERR_IO"; static const char __pyx_k_ERR_OP[] = "ERR_OP"; static const char __pyx_k_F_BOOL[] = "F_BOOL"; static const char __pyx_k_INT8_T[] = "INT8_T"; static const char __pyx_k_Iprobe[] = "Iprobe"; static const char __pyx_k_MAXLOC[] = "MAXLOC"; static const char __pyx_k_MINLOC[] = "MINLOC"; static const char __pyx_k_OFFSET[] = "OFFSET"; static const char __pyx_k_PACKED[] = "PACKED"; static const char __pyx_k_REAL16[] = "REAL16"; static const char __pyx_k_STRUCT[] = "STRUCT"; static const char __pyx_k_Status[] = "Status"; static const char __pyx_k_TAG_UB[] = "TAG_UB"; static const char __pyx_k_TWOINT[] = "TWOINT"; static const char __pyx_k_VECTOR[] = "VECTOR"; static const char __pyx_k_append[] = "append"; static const char __pyx_k_coords[] = "coords"; static const char __pyx_k_errors[] = "errors"; static const char __pyx_k_extent[] = "extent"; static const char __pyx_k_gather[] = "gather"; static const char __pyx_k_group1[] = "group1"; static const char __pyx_k_group2[] = "group2"; static const char __pyx_k_gsizes[] = "gsizes"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_insert[] = "insert"; static const char __pyx_k_iprobe[] = "iprobe"; static const char __pyx_k_keyval[] = "keyval"; static const char __pyx_k_maxlen[] = "maxlen"; static const char __pyx_k_memory[] = "memory"; static const char __pyx_k_module[] = "__module__"; static const char __pyx_k_mpi4py[] = "mpi4py"; static const char __pyx_k_name_2[] = "name"; static const char __pyx_k_nbytes[] = "nbytes"; static const char __pyx_k_nnodes[] = "nnodes"; static const char __pyx_k_ob_mpi[] = "ob_mpi"; static const char __pyx_k_offset[] = "offset"; static const char __pyx_k_origin[] = "origin"; static const char __pyx_k_outbuf[] = "outbuf"; static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_psizes[] = "psizes"; static const char __pyx_k_ranks1[] = "ranks1"; static const char __pyx_k_result[] = "result"; static const char __pyx_k_single[] = "single"; static const char __pyx_k_sizeof[] = "_sizeof"; static const char __pyx_k_source[] = "source"; static const char __pyx_k_starts[] = "starts"; static const char __pyx_k_status[] = "status"; static const char __pyx_k_stderr[] = "stderr"; static const char __pyx_k_stride[] = "stride"; static const char __pyx_k_string[] = "string"; static const char __pyx_k_target[] = "target"; static const char __pyx_k_thread[] = "_thread"; static const char __pyx_k_whence[] = "whence"; static const char __pyx_k_ANY_TAG[] = "ANY_TAG"; static const char __pyx_k_BytesIO[] = "BytesIO"; static const char __pyx_k_COMPLEX[] = "COMPLEX"; static const char __pyx_k_Compare[] = "Compare"; static const char __pyx_k_ERR_ARG[] = "ERR_ARG"; static const char __pyx_k_ERR_TAG[] = "ERR_TAG"; static const char __pyx_k_ERR_WIN[] = "ERR_WIN"; static const char __pyx_k_F_FLOAT[] = "F_FLOAT"; static const char __pyx_k_Get_dim[] = "Get_dim"; static const char __pyx_k_Get_tag[] = "Get_tag"; static const char __pyx_k_HVECTOR[] = "HVECTOR"; static const char __pyx_k_INDEXED[] = "INDEXED"; static const char __pyx_k_INT16_T[] = "INT16_T"; static const char __pyx_k_INT32_T[] = "INT32_T"; static const char __pyx_k_INT64_T[] = "INT64_T"; static const char __pyx_k_INTEGER[] = "INTEGER"; static const char __pyx_k_INT_INT[] = "INT_INT"; static const char __pyx_k_LOGICAL[] = "LOGICAL"; static const char __pyx_k_Message[] = "Message"; static const char __pyx_k_OP_NULL[] = "OP_NULL"; static const char __pyx_k_ORDER_C[] = "ORDER_C"; static const char __pyx_k_ORDER_F[] = "ORDER_F"; static const char __pyx_k_REPLACE[] = "REPLACE"; static const char __pyx_k_RESIZED[] = "RESIZED"; static const char __pyx_k_Request[] = "Request"; static const char __pyx_k_Resized[] = "Resized"; static const char __pyx_k_SIMILAR[] = "SIMILAR"; static const char __pyx_k_SINT8_T[] = "SINT8_T"; static const char __pyx_k_SUCCESS[] = "SUCCESS"; static const char __pyx_k_Set_tag[] = "Set_tag"; static const char __pyx_k_Testall[] = "Testall"; static const char __pyx_k_Testany[] = "Testany"; static const char __pyx_k_UINT8_T[] = "UINT8_T"; static const char __pyx_k_UNEQUAL[] = "UNEQUAL"; static const char __pyx_k_VERSION[] = "VERSION"; static const char __pyx_k_Waitall[] = "Waitall"; static const char __pyx_k_Waitany[] = "Waitany"; static const char __pyx_k_address[] = "address"; static const char __pyx_k_attrval[] = "attrval"; static const char __pyx_k_baseptr[] = "baseptr"; static const char __pyx_k_cPickle[] = "cPickle"; static const char __pyx_k_command[] = "command"; static const char __pyx_k_commute[] = "commute"; static const char __pyx_k_compare[] = "compare"; static const char __pyx_k_copy_fn[] = "copy_fn"; static const char __pyx_k_cstring[] = "cstring"; static const char __pyx_k_datarep[] = "datarep"; static const char __pyx_k_default[] = "default"; static const char __pyx_k_degrees[] = "degrees"; static const char __pyx_k_free_fn[] = "free_fn"; static const char __pyx_k_message[] = "message"; static const char __pyx_k_ndarray[] = "ndarray"; static const char __pyx_k_nonzero[] = "__nonzero__"; static const char __pyx_k_numpypy[] = "numpypy"; static const char __pyx_k_periods[] = "periods"; static const char __pyx_k_prepare[] = "__prepare__"; static const char __pyx_k_read_fn[] = "read_fn"; static const char __pyx_k_recvbuf[] = "recvbuf"; static const char __pyx_k_recvtag[] = "recvtag"; static const char __pyx_k_release[] = "release"; static const char __pyx_k_reorder[] = "reorder"; static const char __pyx_k_request[] = "request"; static const char __pyx_k_scatter[] = "scatter"; static const char __pyx_k_sendbuf[] = "sendbuf"; static const char __pyx_k_sendobj[] = "sendobj"; static const char __pyx_k_sendtag[] = "sendtag"; static const char __pyx_k_sources[] = "sources"; static const char __pyx_k_testall[] = "testall"; static const char __pyx_k_testany[] = "testany"; static const char __pyx_k_threads[] = "threads"; static const char __pyx_k_version[] = "version"; static const char __pyx_k_waitall[] = "waitall"; static const char __pyx_k_waitany[] = "waitany"; static const char __pyx_k_weights[] = "weights"; static const char __pyx_k_Aint_add[] = "Aint_add"; static const char __pyx_k_Allocate[] = "Allocate"; static const char __pyx_k_COMPLEX4[] = "COMPLEX4"; static const char __pyx_k_COMPLEX8[] = "COMPLEX8"; static const char __pyx_k_CXX_BOOL[] = "CXX_BOOL"; static const char __pyx_k_Cartcomm[] = "Cartcomm"; static const char __pyx_k_DISP_CUR[] = "DISP_CUR"; static const char __pyx_k_Datatype[] = "Datatype"; static const char __pyx_k_ERR_BASE[] = "ERR_BASE"; static const char __pyx_k_ERR_COMM[] = "ERR_COMM"; static const char __pyx_k_ERR_DIMS[] = "ERR_DIMS"; static const char __pyx_k_ERR_DISP[] = "ERR_DISP"; static const char __pyx_k_ERR_FILE[] = "ERR_FILE"; static const char __pyx_k_ERR_INFO[] = "ERR_INFO"; static const char __pyx_k_ERR_NAME[] = "ERR_NAME"; static const char __pyx_k_ERR_PORT[] = "ERR_PORT"; static const char __pyx_k_ERR_RANK[] = "ERR_RANK"; static const char __pyx_k_ERR_ROOT[] = "ERR_ROOT"; static const char __pyx_k_ERR_SIZE[] = "ERR_SIZE"; static const char __pyx_k_ERR_TYPE[] = "ERR_TYPE"; static const char __pyx_k_F90_REAL[] = "F90_REAL"; static const char __pyx_k_F_DOUBLE[] = "F_DOUBLE"; static const char __pyx_k_Finalize[] = "Finalize"; static const char __pyx_k_Free_mem[] = "Free_mem"; static const char __pyx_k_Get_dims[] = "Get_dims"; static const char __pyx_k_Get_info[] = "Get_info"; static const char __pyx_k_Get_name[] = "Get_name"; static const char __pyx_k_Get_rank[] = "Get_rank"; static const char __pyx_k_Get_size[] = "Get_size"; static const char __pyx_k_Get_topo[] = "Get_topo"; static const char __pyx_k_Grequest[] = "Grequest"; static const char __pyx_k_HINDEXED[] = "HINDEXED"; static const char __pyx_k_INFO_ENV[] = "INFO_ENV"; static const char __pyx_k_INTEGER1[] = "INTEGER1"; static const char __pyx_k_INTEGER2[] = "INTEGER2"; static const char __pyx_k_INTEGER4[] = "INTEGER4"; static const char __pyx_k_INTEGER8[] = "INTEGER8"; static const char __pyx_k_IN_PLACE[] = "IN_PLACE"; static const char __pyx_k_Is_inter[] = "Is_inter"; static const char __pyx_k_Is_intra[] = "Is_intra"; static const char __pyx_k_KeyError[] = "KeyError"; static const char __pyx_k_LOGICAL1[] = "LOGICAL1"; static const char __pyx_k_LOGICAL2[] = "LOGICAL2"; static const char __pyx_k_LOGICAL4[] = "LOGICAL4"; static const char __pyx_k_LOGICAL8[] = "LOGICAL8"; static const char __pyx_k_LONG_INT[] = "LONG_INT"; static const char __pyx_k_Pcontrol[] = "Pcontrol"; static const char __pyx_k_Prequest[] = "Prequest"; static const char __pyx_k_SEEK_CUR[] = "SEEK_CUR"; static const char __pyx_k_SEEK_END[] = "SEEK_END"; static const char __pyx_k_SEEK_SET[] = "SEEK_SET"; static const char __pyx_k_SINT16_T[] = "SINT16_T"; static const char __pyx_k_SINT32_T[] = "SINT32_T"; static const char __pyx_k_SINT64_T[] = "SINT64_T"; static const char __pyx_k_SUBARRAY[] = "SUBARRAY"; static const char __pyx_k_Set_info[] = "Set_info"; static const char __pyx_k_Set_name[] = "Set_name"; static const char __pyx_k_Startall[] = "Startall"; static const char __pyx_k_StringIO[] = "StringIO"; static const char __pyx_k_Testsome[] = "Testsome"; static const char __pyx_k_Topocomm[] = "Topocomm"; static const char __pyx_k_UINT16_T[] = "UINT16_T"; static const char __pyx_k_UINT32_T[] = "UINT32_T"; static const char __pyx_k_UINT64_T[] = "UINT64_T"; static const char __pyx_k_UNSIGNED[] = "UNSIGNED"; static const char __pyx_k_WIN_BASE[] = "WIN_BASE"; static const char __pyx_k_WIN_NULL[] = "WIN_NULL"; static const char __pyx_k_WIN_SIZE[] = "WIN_SIZE"; static const char __pyx_k_Waitsome[] = "Waitsome"; static const char __pyx_k_alltoall[] = "alltoall"; static const char __pyx_k_cdatarep[] = "cdatarep"; static const char __pyx_k_datatype[] = "datatype"; static const char __pyx_k_distribs[] = "distribs"; static const char __pyx_k_errcodes[] = "errcodes"; static const char __pyx_k_filename[] = "filename"; static const char __pyx_k_filetype[] = "filetype"; static const char __pyx_k_finalize[] = "finalize"; static const char __pyx_k_function[] = "function"; static const char __pyx_k_funneled[] = "funneled"; static const char __pyx_k_handleof[] = "_handleof"; static const char __pyx_k_inoutbuf[] = "inoutbuf"; static const char __pyx_k_itemsize[] = "itemsize"; static const char __pyx_k_location[] = "location"; static const char __pyx_k_maxprocs[] = "maxprocs"; static const char __pyx_k_multiple[] = "multiple"; static const char __pyx_k_nopython[] = "nopython"; static const char __pyx_k_position[] = "position"; static const char __pyx_k_property[] = "property"; static const char __pyx_k_protocol[] = "protocol"; static const char __pyx_k_provided[] = "provided"; static const char __pyx_k_qualname[] = "__qualname__"; static const char __pyx_k_query_fn[] = "query_fn"; static const char __pyx_k_readonly[] = "readonly"; static const char __pyx_k_requests[] = "requests"; static const char __pyx_k_required[] = "required"; static const char __pyx_k_statuses[] = "statuses"; static const char __pyx_k_subsizes[] = "subsizes"; static const char __pyx_k_thread_2[] = "thread"; static const char __pyx_k_threaded[] = "threaded"; static const char __pyx_k_typecode[] = "typecode"; static const char __pyx_k_typedict[] = "_typedict"; static const char __pyx_k_warnings[] = "warnings"; static const char __pyx_k_write_fn[] = "write_fn"; static const char __pyx_k_Aint_diff[] = "Aint_diff"; static const char __pyx_k_Alloc_mem[] = "Alloc_mem"; static const char __pyx_k_CHARACTER[] = "CHARACTER"; static const char __pyx_k_COMM_NULL[] = "COMM_NULL"; static const char __pyx_k_COMM_SELF[] = "COMM_SELF"; static const char __pyx_k_COMPLEX16[] = "COMPLEX16"; static const char __pyx_k_COMPLEX32[] = "COMPLEX32"; static const char __pyx_k_CONGRUENT[] = "CONGRUENT"; static const char __pyx_k_C_COMPLEX[] = "C_COMPLEX"; static const char __pyx_k_ERR_AMODE[] = "ERR_AMODE"; static const char __pyx_k_ERR_COUNT[] = "ERR_COUNT"; static const char __pyx_k_ERR_GROUP[] = "ERR_GROUP"; static const char __pyx_k_ERR_OTHER[] = "ERR_OTHER"; static const char __pyx_k_ERR_QUOTA[] = "ERR_QUOTA"; static const char __pyx_k_ERR_SPAWN[] = "ERR_SPAWN"; static const char __pyx_k_Exception[] = "\n Exception\n "; static const char __pyx_k_FILE_NULL[] = "FILE_NULL"; static const char __pyx_k_FLOAT_INT[] = "FLOAT_INT"; static const char __pyx_k_F_COMPLEX[] = "F_COMPLEX"; static const char __pyx_k_Get_amode[] = "Get_amode"; static const char __pyx_k_Get_count[] = "Get_count"; static const char __pyx_k_Get_error[] = "Get_error"; static const char __pyx_k_Get_group[] = "Get_group"; static const char __pyx_k_Get_nkeys[] = "Get_nkeys"; static const char __pyx_k_Graphcomm[] = "Graphcomm"; static const char __pyx_k_INFO_NULL[] = "INFO_NULL"; static const char __pyx_k_INTEGER16[] = "INTEGER16"; static const char __pyx_k_Intercomm[] = "Intercomm"; static const char __pyx_k_Intersect[] = "Intersect"; static const char __pyx_k_Intracomm[] = "Intracomm"; static const char __pyx_k_LONG_LONG[] = "LONG_LONG"; static const char __pyx_k_MODE_EXCL[] = "MODE_EXCL"; static const char __pyx_k_MODE_RDWR[] = "MODE_RDWR"; static const char __pyx_k_Open_port[] = "Open_port"; static const char __pyx_k_PROC_NULL[] = "PROC_NULL"; static const char __pyx_k_SHORT_INT[] = "SHORT_INT"; static const char __pyx_k_Set_error[] = "Set_error"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_UNDEFINED[] = "UNDEFINED"; static const char __pyx_k_WIN_MODEL[] = "WIN_MODEL"; static const char __pyx_k_addressof[] = "_addressof"; static const char __pyx_k_allgather[] = "allgather"; static const char __pyx_k_assertion[] = "assertion"; static const char __pyx_k_bcast_p2p[] = "@bcast_p2p@"; static const char __pyx_k_cStringIO[] = "cStringIO"; static const char __pyx_k_cancel_fn[] = "cancel_fn"; static const char __pyx_k_cportname[] = "cportname"; static const char __pyx_k_csrvcname[] = "csrvcname"; static const char __pyx_k_datatypes[] = "datatypes"; static const char __pyx_k_delete_fn[] = "delete_fn"; static const char __pyx_k_direction[] = "direction"; static const char __pyx_k_disp_unit[] = "disp_unit"; static const char __pyx_k_errorcode[] = "errorcode"; static const char __pyx_k_exception[] = "exception"; static const char __pyx_k_extent_fn[] = "extent_fn"; static const char __pyx_k_lock_type[] = "lock_type"; static const char __pyx_k_metaclass[] = "__metaclass__"; static const char __pyx_k_peer_comm[] = "peer_comm"; static const char __pyx_k_port_name[] = "port_name"; static const char __pyx_k_print_exc[] = "print_exc"; static const char __pyx_k_resultlen[] = "resultlen"; static const char __pyx_k_traceback[] = "traceback"; static const char __pyx_k_typeclass[] = "typeclass"; static const char __pyx_k_ANY_SOURCE[] = "ANY_SOURCE"; static const char __pyx_k_COMM_WORLD[] = "COMM_WORLD"; static const char __pyx_k_CONTIGUOUS[] = "CONTIGUOUS"; static const char __pyx_k_Close_port[] = "Close_port"; static const char __pyx_k_Create_dup[] = "Create_dup"; static const char __pyx_k_DIST_GRAPH[] = "DIST_GRAPH"; static const char __pyx_k_DOUBLE_INT[] = "DOUBLE_INT"; static const char __pyx_k_Difference[] = "Difference"; static const char __pyx_k_ERR_ACCESS[] = "ERR_ACCESS"; static const char __pyx_k_ERR_ASSERT[] = "ERR_ASSERT"; static const char __pyx_k_ERR_BUFFER[] = "ERR_BUFFER"; static const char __pyx_k_ERR_INTERN[] = "ERR_INTERN"; static const char __pyx_k_ERR_KEYVAL[] = "ERR_KEYVAL"; static const char __pyx_k_ERR_NO_MEM[] = "ERR_NO_MEM"; static const char __pyx_k_Errhandler[] = "Errhandler"; static const char __pyx_k_GROUP_NULL[] = "GROUP_NULL"; static const char __pyx_k_Get_nthkey[] = "Get_nthkey"; static const char __pyx_k_Get_parent[] = "Get_parent"; static const char __pyx_k_Get_source[] = "Get_source"; static const char __pyx_k_IndexError[] = "IndexError"; static const char __pyx_k_MODE_NOPUT[] = "MODE_NOPUT"; static const char __pyx_k_Match_size[] = "Match_size"; static const char __pyx_k_SIGNED_INT[] = "SIGNED_INT"; static const char __pyx_k_SUBVERSION[] = "SUBVERSION"; static const char __pyx_k_Set_source[] = "Set_source"; static const char __pyx_k_UNWEIGHTED[] = "UNWEIGHTED"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_WIN_FLAVOR[] = "WIN_FLAVOR"; static const char __pyx_k_errhandler[] = "errhandler"; static const char __pyx_k_error_code[] = "error code"; static const char __pyx_k_errorclass[] = "errorclass"; static const char __pyx_k_frombuffer[] = "frombuffer"; static const char __pyx_k_get_vendor[] = "get_vendor"; static const char __pyx_k_initialize[] = "initialize"; static const char __pyx_k_inoutedges[] = "inoutedges"; static const char __pyx_k_lock_table[] = "_lock_table"; static const char __pyx_k_mpi4py_MPI[] = "mpi4py.MPI"; static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; static const char __pyx_k_recvcounts[] = "recvcounts"; static const char __pyx_k_serialized[] = "serialized"; static const char __pyx_k_split_type[] = "split_type"; static const char __pyx_k_subversion[] = "subversion"; static const char __pyx_k_typecode_2[] = "_typecode"; static const char __pyx_k_typedict_c[] = "_typedict_c"; static const char __pyx_k_typedict_f[] = "_typedict_f"; static const char __pyx_k_ERR_PENDING[] = "ERR_PENDING"; static const char __pyx_k_ERR_REQUEST[] = "ERR_REQUEST"; static const char __pyx_k_ERR_SERVICE[] = "ERR_SERVICE"; static const char __pyx_k_ERR_UNKNOWN[] = "ERR_UNKNOWN"; static const char __pyx_k_Exception_2[] = "Exception"; static const char __pyx_k_F90_COMPLEX[] = "F90_COMPLEX"; static const char __pyx_k_F90_INTEGER[] = "F90_INTEGER"; static const char __pyx_k_Free_keyval[] = "Free_keyval"; static const char __pyx_k_GROUP_EMPTY[] = "GROUP_EMPTY"; static const char __pyx_k_Get_address[] = "Get_address"; static const char __pyx_k_Get_version[] = "Get_version"; static const char __pyx_k_ImportError[] = "ImportError"; static const char __pyx_k_Init_thread[] = "Init_thread"; static const char __pyx_k_LOCK_SHARED[] = "LOCK_SHARED"; static const char __pyx_k_LONG_DOUBLE[] = "LONG_DOUBLE"; static const char __pyx_k_Lookup_name[] = "Lookup_name"; static const char __pyx_k_MODE_APPEND[] = "MODE_APPEND"; static const char __pyx_k_MODE_CREATE[] = "MODE_CREATE"; static const char __pyx_k_MODE_RDONLY[] = "MODE_RDONLY"; static const char __pyx_k_MODE_WRONLY[] = "MODE_WRONLY"; static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_SIGNED_CHAR[] = "SIGNED_CHAR"; static const char __pyx_k_SIGNED_LONG[] = "SIGNED_LONG"; static const char __pyx_k_SystemError[] = "SystemError"; static const char __pyx_k_UserWarning[] = "UserWarning"; static const char __pyx_k_WIN_UNIFIED[] = "WIN_UNIFIED"; static const char __pyx_k_blocklength[] = "blocklength"; static const char __pyx_k_buffer_info[] = "buffer_info"; static const char __pyx_k_destweights[] = "destweights"; static const char __pyx_k_error_class[] = "error class"; static const char __pyx_k_fast_reduce[] = "fast_reduce"; static const char __pyx_k_fromaddress[] = "fromaddress"; static const char __pyx_k_recv_mprobe[] = "recv_mprobe"; static const char __pyx_k_remain_dims[] = "remain_dims"; static const char __pyx_k_target_disp[] = "target_disp"; static const char __pyx_k_target_rank[] = "target_rank"; static const char __pyx_k_COMBINER_DUP[] = "COMBINER_DUP"; static const char __pyx_k_Compute_dims[] = "Compute_dims"; static const char __pyx_k_ERR_BAD_FILE[] = "ERR_BAD_FILE"; static const char __pyx_k_ERR_INFO_KEY[] = "ERR_INFO_KEY"; static const char __pyx_k_ERR_LASTCODE[] = "ERR_LASTCODE"; static const char __pyx_k_ERR_LOCKTYPE[] = "ERR_LOCKTYPE"; static const char __pyx_k_ERR_NOT_SAME[] = "ERR_NOT_SAME"; static const char __pyx_k_ERR_NO_SPACE[] = "ERR_NO_SPACE"; static const char __pyx_k_ERR_RMA_SYNC[] = "ERR_RMA_SYNC"; static const char __pyx_k_ERR_TOPOLOGY[] = "ERR_TOPOLOGY"; static const char __pyx_k_ERR_TRUNCATE[] = "ERR_TRUNCATE"; static const char __pyx_k_Get_contents[] = "Get_contents"; static const char __pyx_k_Get_envelope[] = "Get_envelope"; static const char __pyx_k_Get_topology[] = "Get_topology"; static const char __pyx_k_Intersection[] = "Intersection"; static const char __pyx_k_Is_cancelled[] = "Is_cancelled"; static const char __pyx_k_Is_finalized[] = "Is_finalized"; static const char __pyx_k_LASTUSEDCODE[] = "LASTUSEDCODE"; static const char __pyx_k_MAX_INFO_KEY[] = "MAX_INFO_KEY"; static const char __pyx_k_MAX_INFO_VAL[] = "MAX_INFO_VAL"; static const char __pyx_k_MESSAGE_NULL[] = "MESSAGE_NULL"; static const char __pyx_k_MODE_NOCHECK[] = "MODE_NOCHECK"; static const char __pyx_k_MODE_NOSTORE[] = "MODE_NOSTORE"; static const char __pyx_k_Publish_name[] = "Publish_name"; static const char __pyx_k_Query_thread[] = "Query_thread"; static const char __pyx_k_REQUEST_NULL[] = "REQUEST_NULL"; static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_SIGNED_SHORT[] = "SIGNED_SHORT"; static const char __pyx_k_UNSIGNED_INT[] = "UNSIGNED_INT"; static const char __pyx_k_WIN_SEPARATE[] = "WIN_SEPARATE"; static const char __pyx_k_blocklengths[] = "blocklengths"; static const char __pyx_k_destinations[] = "destinations"; static const char __pyx_k_dummy_thread[] = "_dummy_thread"; static const char __pyx_k_error_code_2[] = "error_code"; static const char __pyx_k_error_code_d[] = "error code: %d"; static const char __pyx_k_error_string[] = "error string"; static const char __pyx_k_local_leader[] = "local_leader"; static const char __pyx_k_service_name[] = "service_name"; static const char __pyx_k_staticmethod[] = "staticmethod"; static const char __pyx_k_thread_level[] = "thread_level"; static const char __pyx_k_Attach_buffer[] = "Attach_buffer"; static const char __pyx_k_Create_keyval[] = "Create_keyval"; static const char __pyx_k_Create_struct[] = "Create_struct"; static const char __pyx_k_DATATYPE_NULL[] = "DATATYPE_NULL"; static const char __pyx_k_Detach_buffer[] = "Detach_buffer"; static const char __pyx_k_Distgraphcomm[] = "Distgraphcomm"; static const char __pyx_k_ERRORS_RETURN[] = "ERRORS_RETURN"; static const char __pyx_k_ERR_IN_STATUS[] = "ERR_IN_STATUS"; static const char __pyx_k_ERR_READ_ONLY[] = "ERR_READ_ONLY"; static const char __pyx_k_ERR_RMA_RANGE[] = "ERR_RMA_RANGE"; static const char __pyx_k_Get_atomicity[] = "Get_atomicity"; static const char __pyx_k_Get_neighbors[] = "Get_neighbors"; static const char __pyx_k_INDEXED_BLOCK[] = "INDEXED_BLOCK"; static const char __pyx_k_MAX_PORT_NAME[] = "MAX_PORT_NAME"; static const char __pyx_k_ORDER_FORTRAN[] = "ORDER_FORTRAN"; static const char __pyx_k_OverflowError[] = "OverflowError"; static const char __pyx_k_Set_atomicity[] = "Set_atomicity"; static const char __pyx_k_Set_cancelled[] = "Set_cancelled"; static const char __pyx_k_THREAD_SINGLE[] = "THREAD_SINGLE"; static const char __pyx_k_UNIVERSE_SIZE[] = "UNIVERSE_SIZE"; static const char __pyx_k_UNSIGNED_CHAR[] = "UNSIGNED_CHAR"; static const char __pyx_k_UNSIGNED_LONG[] = "UNSIGNED_LONG"; static const char __pyx_k_WEIGHTS_EMPTY[] = "WEIGHTS_EMPTY"; static const char __pyx_k_WIN_DISP_UNIT[] = "WIN_DISP_UNIT"; static const char __pyx_k_allocate_lock[] = "allocate_lock"; static const char __pyx_k_commctx_inter[] = "@commctx_inter"; static const char __pyx_k_commctx_intra[] = "@commctx_intra"; static const char __pyx_k_displacements[] = "displacements"; static const char __pyx_k_error_class_2[] = "error_class"; static const char __pyx_k_remote_leader[] = "remote_leader"; static const char __pyx_k_sourceweights[] = "sourceweights"; static const char __pyx_k_Add_error_code[] = "Add_error_code"; static const char __pyx_k_AttributeError[] = "AttributeError"; static const char __pyx_k_BSEND_OVERHEAD[] = "BSEND_OVERHEAD"; static const char __pyx_k_COMBINER_NAMED[] = "COMBINER_NAMED"; static const char __pyx_k_Create_dynamic[] = "Create_dynamic"; static const char __pyx_k_Create_resized[] = "Create_resized"; static const char __pyx_k_DOUBLE_COMPLEX[] = "DOUBLE_COMPLEX"; static const char __pyx_k_ERR_CONVERSION[] = "ERR_CONVERSION"; static const char __pyx_k_ERR_INFO_NOKEY[] = "ERR_INFO_NOKEY"; static const char __pyx_k_ERR_INFO_VALUE[] = "ERR_INFO_VALUE"; static const char __pyx_k_ERR_RMA_ATTACH[] = "ERR_RMA_ATTACH"; static const char __pyx_k_ERR_RMA_FLAVOR[] = "ERR_RMA_FLAVOR"; static const char __pyx_k_ERR_RMA_SHARED[] = "ERR_RMA_SHARED"; static const char __pyx_k_Exception___eq[] = "Exception.__eq__"; static const char __pyx_k_Exception___ge[] = "Exception.__ge__"; static const char __pyx_k_Exception___gt[] = "Exception.__gt__"; static const char __pyx_k_Exception___le[] = "Exception.__le__"; static const char __pyx_k_Exception___lt[] = "Exception.__lt__"; static const char __pyx_k_Exception___ne[] = "Exception.__ne__"; static const char __pyx_k_Get_error_code[] = "Get_error_code"; static const char __pyx_k_HINDEXED_BLOCK[] = "HINDEXED_BLOCK"; static const char __pyx_k_Is_commutative[] = "Is_commutative"; static const char __pyx_k_Is_initialized[] = "Is_initialized"; static const char __pyx_k_Is_thread_main[] = "Is_thread_main"; static const char __pyx_k_KEYVAL_INVALID[] = "KEYVAL_INVALID"; static const char __pyx_k_LOCK_EXCLUSIVE[] = "LOCK_EXCLUSIVE"; static const char __pyx_k_MODE_NOPRECEDE[] = "MODE_NOPRECEDE"; static const char __pyx_k_MODE_NOSUCCEED[] = "MODE_NOSUCCEED"; static const char __pyx_k_NotImplemented[] = "NotImplemented"; static const char __pyx_k_TYPECLASS_REAL[] = "TYPECLASS_REAL"; static const char __pyx_k_UNSIGNED_SHORT[] = "UNSIGNED_SHORT"; static const char __pyx_k_Unpublish_name[] = "Unpublish_name"; static const char __pyx_k_dummy_thread_2[] = "dummy_thread"; static const char __pyx_k_error_string_2[] = "error_string"; static const char __pyx_k_Add_error_class[] = "Add_error_class"; static const char __pyx_k_Allocate_shared[] = "Allocate_shared"; static const char __pyx_k_COMBINER_DARRAY[] = "COMBINER_DARRAY"; static const char __pyx_k_COMBINER_STRUCT[] = "COMBINER_STRUCT"; static const char __pyx_k_COMBINER_VECTOR[] = "COMBINER_VECTOR"; static const char __pyx_k_C_FLOAT_COMPLEX[] = "C_FLOAT_COMPLEX"; static const char __pyx_k_Create_f90_real[] = "Create_f90_real"; static const char __pyx_k_DISTRIBUTE_NONE[] = "DISTRIBUTE_NONE"; static const char __pyx_k_ERRHANDLER_NULL[] = "ERRHANDLER_NULL"; static const char __pyx_k_ERR_DUP_DATAREP[] = "ERR_DUP_DATAREP"; static const char __pyx_k_ERR_FILE_EXISTS[] = "ERR_FILE_EXISTS"; static const char __pyx_k_ERR_FILE_IN_USE[] = "ERR_FILE_IN_USE"; static const char __pyx_k_Exception___int[] = "Exception.__int__"; static const char __pyx_k_Exception___str[] = "Exception.__str__"; static const char __pyx_k_F_FLOAT_COMPLEX[] = "F_FLOAT_COMPLEX"; static const char __pyx_k_Get_error_class[] = "Get_error_class"; static const char __pyx_k_Get_remote_size[] = "Get_remote_size"; static const char __pyx_k_LONG_DOUBLE_INT[] = "LONG_DOUBLE_INT"; static const char __pyx_k_MAX_OBJECT_NAME[] = "MAX_OBJECT_NAME"; static const char __pyx_k_MESSAGE_NO_PROC[] = "MESSAGE_NO_PROC"; static const char __pyx_k_MODE_SEQUENTIAL[] = "MODE_SEQUENTIAL"; static const char __pyx_k_MPI_Exception_d[] = "MPI.Exception(%d)"; static const char __pyx_k_THREAD_FUNNELED[] = "THREAD_FUNNELED"; static const char __pyx_k_THREAD_MULTIPLE[] = "THREAD_MULTIPLE"; static const char __pyx_k_Translate_ranks[] = "Translate_ranks"; static const char __pyx_k_WTIME_IS_GLOBAL[] = "WTIME_IS_GLOBAL"; static const char __pyx_k_array_interface[] = "__array_interface__"; static const char __pyx_k_keyval_registry[] = "_keyval_registry"; static const char __pyx_k_Add_error_string[] = "Add_error_string"; static const char __pyx_k_COMBINER_HVECTOR[] = "COMBINER_HVECTOR"; static const char __pyx_k_COMBINER_INDEXED[] = "COMBINER_INDEXED"; static const char __pyx_k_COMBINER_RESIZED[] = "COMBINER_RESIZED"; static const char __pyx_k_COMM_TYPE_SHARED[] = "COMM_TYPE_SHARED"; static const char __pyx_k_C_DOUBLE_COMPLEX[] = "C_DOUBLE_COMPLEX"; static const char __pyx_k_DEFAULT_PROTOCOL[] = "DEFAULT_PROTOCOL"; static const char __pyx_k_DISTRIBUTE_BLOCK[] = "DISTRIBUTE_BLOCK"; static const char __pyx_k_DOUBLE_PRECISION[] = "DOUBLE_PRECISION"; static const char __pyx_k_ERRORS_ARE_FATAL[] = "ERRORS_ARE_FATAL"; static const char __pyx_k_ERR_NO_SUCH_FILE[] = "ERR_NO_SUCH_FILE"; static const char __pyx_k_ERR_RMA_CONFLICT[] = "ERR_RMA_CONFLICT"; static const char __pyx_k_Exception___bool[] = "Exception.__bool__"; static const char __pyx_k_Exception___hash[] = "Exception.__hash__"; static const char __pyx_k_Exception___init[] = "Exception.__init__"; static const char __pyx_k_Exception___repr[] = "Exception.__repr__"; static const char __pyx_k_F_DOUBLE_COMPLEX[] = "F_DOUBLE_COMPLEX"; static const char __pyx_k_Get_error_string[] = "Get_error_string"; static const char __pyx_k_Get_remote_group[] = "Get_remote_group"; static const char __pyx_k_HIGHEST_PROTOCOL[] = "HIGHEST_PROTOCOL"; static const char __pyx_k_MAX_ERROR_STRING[] = "MAX_ERROR_STRING"; static const char __pyx_k_MODE_UNIQUE_OPEN[] = "MODE_UNIQUE_OPEN"; static const char __pyx_k_Register_datarep[] = "Register_datarep"; static const char __pyx_k_SIGNED_LONG_LONG[] = "SIGNED_LONG_LONG"; static const char __pyx_k_set_abort_status[] = "_set_abort_status"; static const char __pyx_k_COMBINER_F90_REAL[] = "COMBINER_F90_REAL"; static const char __pyx_k_COMBINER_HINDEXED[] = "COMBINER_HINDEXED"; static const char __pyx_k_COMBINER_SUBARRAY[] = "COMBINER_SUBARRAY"; static const char __pyx_k_CXX_FLOAT_COMPLEX[] = "CXX_FLOAT_COMPLEX"; static const char __pyx_k_DISTRIBUTE_CYCLIC[] = "DISTRIBUTE_CYCLIC"; static const char __pyx_k_THREAD_SERIALIZED[] = "THREAD_SERIALIZED"; static const char __pyx_k_TYPECLASS_COMPLEX[] = "TYPECLASS_COMPLEX"; static const char __pyx_k_TYPECLASS_INTEGER[] = "TYPECLASS_INTEGER"; static const char __pyx_k_WIN_CREATE_FLAVOR[] = "WIN_CREATE_FLAVOR"; static const char __pyx_k_WIN_FLAVOR_CREATE[] = "WIN_FLAVOR_CREATE"; static const char __pyx_k_WIN_FLAVOR_SHARED[] = "WIN_FLAVOR_SHARED"; static const char __pyx_k_neighbor_alltoall[] = "neighbor_alltoall"; static const char __pyx_k_CXX_DOUBLE_COMPLEX[] = "CXX_DOUBLE_COMPLEX"; static const char __pyx_k_Create_f90_complex[] = "Create_f90_complex"; static const char __pyx_k_Create_f90_integer[] = "Create_f90_integer"; static const char __pyx_k_Get_dist_neighbors[] = "Get_dist_neighbors"; static const char __pyx_k_Get_processor_name[] = "Get_processor_name"; static const char __pyx_k_MAX_DATAREP_STRING[] = "MAX_DATAREP_STRING"; static const char __pyx_k_MAX_PROCESSOR_NAME[] = "MAX_PROCESSOR_NAME"; static const char __pyx_k_UNSIGNED_LONG_LONG[] = "UNSIGNED_LONG_LONG"; static const char __pyx_k_WIN_FLAVOR_DYNAMIC[] = "WIN_FLAVOR_DYNAMIC"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_index_out_of_range[] = "index out of range"; static const char __pyx_k_mpi4py_MPI_MPI_pyx[] = "mpi4py/MPI/MPI.pyx"; static const char __pyx_k_neighbor_allgather[] = "neighbor_allgather"; static const char __pyx_k_numpypy_multiarray[] = "_numpypy.multiarray"; static const char __pyx_k_COMBINER_CONTIGUOUS[] = "COMBINER_CONTIGUOUS"; static const char __pyx_k_Get_library_version[] = "Get_library_version"; static const char __pyx_k_Get_neighbors_count[] = "Get_neighbors_count"; static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; static const char __pyx_k_WIN_FLAVOR_ALLOCATE[] = "WIN_FLAVOR_ALLOCATE"; static const char __pyx_k_mpi4py_MPI_Comm_pyx[] = "mpi4py/MPI/Comm.pyx"; static const char __pyx_k_mpi4py_MPI_File_pyx[] = "mpi4py/MPI/File.pyx"; static const char __pyx_k_COMBINER_F90_COMPLEX[] = "COMBINER_F90_COMPLEX"; static const char __pyx_k_COMBINER_F90_INTEGER[] = "COMBINER_F90_INTEGER"; static const char __pyx_k_DISPLACEMENT_CURRENT[] = "DISPLACEMENT_CURRENT"; static const char __pyx_k_DISTRIBUTE_DFLT_DARG[] = "DISTRIBUTE_DFLT_DARG"; static const char __pyx_k_MODE_DELETE_ON_CLOSE[] = "MODE_DELETE_ON_CLOSE"; static const char __pyx_k_unorderable_type_s_s[] = "unorderable type: '%s.%s'"; static const char __pyx_k_C_LONG_DOUBLE_COMPLEX[] = "C_LONG_DOUBLE_COMPLEX"; static const char __pyx_k_COMBINER_INDEXED_BLOCK[] = "COMBINER_INDEXED_BLOCK"; static const char __pyx_k_mpi4py_MPI_typestr_pxi[] = "mpi4py/MPI/typestr.pxi"; static const char __pyx_k_COMBINER_HINDEXED_BLOCK[] = "COMBINER_HINDEXED_BLOCK"; static const char __pyx_k_CXX_LONG_DOUBLE_COMPLEX[] = "CXX_LONG_DOUBLE_COMPLEX"; static const char __pyx_k_ERR_UNSUPPORTED_DATAREP[] = "ERR_UNSUPPORTED_DATAREP"; static const char __pyx_k_expecting_d_items_got_d[] = "expecting %d items, got %d"; static const char __pyx_k_mpi4py_MPI_Datatype_pyx[] = "mpi4py/MPI/Datatype.pyx"; static const char __pyx_k_mpi4py_MPI_asbuffer_pxi[] = "mpi4py/MPI/asbuffer.pxi"; static const char __pyx_k_mpi4py_MPI_atimport_pxi[] = "mpi4py/MPI/atimport.pxi"; static const char __pyx_k_mpi4py_MPI_commimpl_pxi[] = "mpi4py/MPI/commimpl.pxi"; static const char __pyx_k_Exception_Get_error_code[] = "Exception.Get_error_code"; static const char __pyx_k_Get_dist_neighbors_count[] = "Get_dist_neighbors_count"; static const char __pyx_k_message_negative_count_d[] = "message: negative count %d"; static const char __pyx_k_mpi4py_MPI_Exception_pyx[] = "mpi4py/MPI/Exception.pyx"; static const char __pyx_k_ERR_UNSUPPORTED_OPERATION[] = "ERR_UNSUPPORTED_OPERATION"; static const char __pyx_k_Exception_Get_error_class[] = "Exception.Get_error_class"; static const char __pyx_k_Message_Passing_Interface[] = "\nMessage Passing Interface\n"; static const char __pyx_k_expecting_an_MPI_instance[] = "expecting an MPI instance"; static const char __pyx_k_mpi4py_MPI_ExceptionP_pyx[] = "mpi4py/MPI/ExceptionP.pyx"; static const char __pyx_k_Exception_Get_error_string[] = "Exception.Get_error_string"; static const char __pyx_k_MAX_LIBRARY_VERSION_STRING[] = "MAX_LIBRARY_VERSION_STRING"; static const char __pyx_k_expecting_non_NULL_address[] = "expecting non-NULL address"; static const char __pyx_k_memory_buffer_is_read_only[] = "memory buffer is read-only"; static const char __pyx_k_Not_a_topology_communicator[] = "Not a topology communicator"; static const char __pyx_k_MPI_Init_failed_error_code_d[] = "MPI_Init() failed [error code: %d]"; static const char __pyx_k_integer_d_does_not_fit_in_int[] = "integer %d does not fit in 'int'"; static const char __pyx_k_slice_with_step_not_supported[] = "slice with step not supported"; static const char __pyx_k_expecting_an_intercommunicator[] = "expecting an intercommunicator"; static const char __pyx_k_expecting_an_intracommunicator[] = "expecting an intracommunicator"; static const char __pyx_k_index_must_be_integer_or_slice[] = "index must be integer or slice"; static const char __pyx_k_message_expecting_2_to_4_items[] = "message: expecting 2 to 4 items"; static const char __pyx_k_message_negative_diplacement_d[] = "message: negative diplacement %d"; static const char __pyx_k_mpi4py_rc_s_unexpected_value_r[] = "mpi4py.rc: '%s': unexpected value '%r'"; static const char __pyx_k_expecting_a_sequence_of_strings[] = "expecting a sequence of strings"; static const char __pyx_k_memory_allocation_with_negative[] = "memory allocation with negative size"; static const char __pyx_k_mismatch_in_receive_count_d_and[] = "mismatch in receive count %d and counts[%d] %d"; static const char __pyx_k_MPI_Init_thread_failed_error_cod[] = "MPI_Init_thread() failed [error code: %d]"; static const char __pyx_k_accessing_non_existent_buffer_se[] = "accessing non-existent buffer segment"; static const char __pyx_k_cannot_create_too_many_user_defi[] = "cannot create too many user-defined reduction operations"; static const char __pyx_k_compare_expecting_a_single_eleme[] = "compare: expecting a single element, got %d"; static const char __pyx_k_empty_weights_but_nonzero_degree[] = "empty weights but nonzero degree"; static const char __pyx_k_expecting_a_Cartesian_communicat[] = "expecting a Cartesian communicator"; static const char __pyx_k_expecting_a_distributed_graph_co[] = "expecting a distributed graph communicator"; static const char __pyx_k_expecting_a_general_graph_commun[] = "expecting a general graph communicator"; static const char __pyx_k_expecting_a_topology_communicato[] = "expecting a topology communicator"; static const char __pyx_k_expecting_an_MPI_type_or_instanc[] = "expecting an MPI type or instance"; static const char __pyx_k_expecting_non_negative_buffer_le[] = "expecting non-negative buffer length"; static const char __pyx_k_memory_allocation_size_too_large[] = "memory allocation size too large"; static const char __pyx_k_message_buffer_is_None_but_count[] = "message: buffer is None but count is %d"; static const char __pyx_k_message_cannot_handle_diplacemen[] = "message: cannot handle diplacement, datatype is null"; static const char __pyx_k_message_cannot_infer_count_buffe[] = "message: cannot infer count, buffer length %d is not a multiple of datatype extent %d (lb:%d, ub:%d)"; static const char __pyx_k_message_cannot_infer_count_datat[] = "message: cannot infer count, datatype is null"; static const char __pyx_k_message_cannot_infer_count_numbe[] = "message: cannot infer count, number of entries %d is not a multiple of required number of blocks %d"; static const char __pyx_k_message_displacement_d_out_of_bo[] = "message: displacement %d out of bounds, number of datatype entries %d"; static const char __pyx_k_message_expecting_buffer_or_list[] = "message: expecting buffer or list/tuple"; static const char __pyx_k_mismatch_in_inbuf_and_inoutbuf_M[] = "mismatch in inbuf and inoutbuf MPI datatypes"; static const char __pyx_k_mismatch_in_inbuf_count_d_and_in[] = "mismatch in inbuf count %d and inoutbuf count %d"; static const char __pyx_k_mismatch_in_origin_and_compare_M[] = "mismatch in origin and compare MPI datatypes"; static const char __pyx_k_mismatch_in_origin_and_result_MP[] = "mismatch in origin and result MPI datatypes"; static const char __pyx_k_mismatch_in_send_and_receive_MPI[] = "mismatch in send and receive MPI datatypes"; static const char __pyx_k_mismatch_in_send_count_d_and_rec[] = "mismatch in send count %d and receive count %d"; static const char __pyx_k_mismatch_in_send_count_d_and_sum[] = "mismatch in send count %d and sum(counts) %d"; static const char __pyx_k_mismatch_in_send_count_d_receive[] = "mismatch in send count %d receive count %d"; static const char __pyx_k_origin_expecting_a_single_elemen[] = "origin: expecting a single element, got %d"; static const char __pyx_k_result_expecting_a_single_elemen[] = "result: expecting a single element, got %d"; static const char __pyx_k_slice_length_does_not_match_buff[] = "slice length does not match buffer"; static const char __pyx_k_target_expecting_3_items_at_most[] = "target: expecting 3 items at most"; static const char __pyx_k_target_expecting_integral_or_lis[] = "target: expecting integral or list/tuple"; static const char __pyx_k_mismatch_in_receive_count_d_and_2[] = "mismatch in receive count %d and sum(counts) %d"; static const char __pyx_k_message_cannot_handle_diplacemen_2[] = "message: cannot handle diplacement, datatype extent %d (lb:%d, ub:%d)"; static const char __pyx_k_message_cannot_infer_count_datat_2[] = "message: cannot infer count, datatype extent %d (lb:%d, ub:%d)"; static PyObject *__pyx_n_s_AINT; static PyObject *__pyx_n_s_ANY_SOURCE; static PyObject *__pyx_n_s_ANY_TAG; static PyObject *__pyx_n_s_APPNUM; static PyObject *__pyx_n_s_Add_error_class; static PyObject *__pyx_n_s_Add_error_code; static PyObject *__pyx_n_s_Add_error_string; static PyObject *__pyx_n_s_Aint_add; static PyObject *__pyx_n_s_Aint_diff; static PyObject *__pyx_n_s_Alloc_mem; static PyObject *__pyx_n_s_Allocate; static PyObject *__pyx_n_s_Allocate_shared; static PyObject *__pyx_n_s_Attach_buffer; static PyObject *__pyx_n_s_AttributeError; static PyObject *__pyx_n_s_B; static PyObject *__pyx_n_s_BAND; static PyObject *__pyx_n_s_BOOL; static PyObject *__pyx_n_s_BOR; static PyObject *__pyx_n_s_BOTTOM; static PyObject *__pyx_n_s_BSEND_OVERHEAD; static PyObject *__pyx_n_s_BXOR; static PyObject *__pyx_n_s_BYTE; static PyObject *__pyx_n_s_BytesIO; static PyObject *__pyx_n_s_CART; static PyObject *__pyx_n_s_CHAR; static PyObject *__pyx_n_s_CHARACTER; static PyObject *__pyx_n_s_COMBINER_CONTIGUOUS; static PyObject *__pyx_n_s_COMBINER_DARRAY; static PyObject *__pyx_n_s_COMBINER_DUP; static PyObject *__pyx_n_s_COMBINER_F90_COMPLEX; static PyObject *__pyx_n_s_COMBINER_F90_INTEGER; static PyObject *__pyx_n_s_COMBINER_F90_REAL; static PyObject *__pyx_n_s_COMBINER_HINDEXED; static PyObject *__pyx_n_s_COMBINER_HINDEXED_BLOCK; static PyObject *__pyx_n_s_COMBINER_HVECTOR; static PyObject *__pyx_n_s_COMBINER_INDEXED; static PyObject *__pyx_n_s_COMBINER_INDEXED_BLOCK; static PyObject *__pyx_n_s_COMBINER_NAMED; static PyObject *__pyx_n_s_COMBINER_RESIZED; static PyObject *__pyx_n_s_COMBINER_STRUCT; static PyObject *__pyx_n_s_COMBINER_SUBARRAY; static PyObject *__pyx_n_s_COMBINER_VECTOR; static PyObject *__pyx_n_s_COMM_NULL; static PyObject *__pyx_n_s_COMM_SELF; static PyObject *__pyx_n_s_COMM_TYPE_SHARED; static PyObject *__pyx_n_s_COMM_WORLD; static PyObject *__pyx_n_s_COMPLEX; static PyObject *__pyx_n_s_COMPLEX16; static PyObject *__pyx_n_s_COMPLEX32; static PyObject *__pyx_n_s_COMPLEX4; static PyObject *__pyx_n_s_COMPLEX8; static PyObject *__pyx_n_s_CONGRUENT; static PyObject *__pyx_n_s_CONTIGUOUS; static PyObject *__pyx_n_s_COUNT; static PyObject *__pyx_n_s_CXX_BOOL; static PyObject *__pyx_n_s_CXX_DOUBLE_COMPLEX; static PyObject *__pyx_n_s_CXX_FLOAT_COMPLEX; static PyObject *__pyx_n_s_CXX_LONG_DOUBLE_COMPLEX; static PyObject *__pyx_n_s_C_BOOL; static PyObject *__pyx_n_s_C_COMPLEX; static PyObject *__pyx_n_s_C_DOUBLE_COMPLEX; static PyObject *__pyx_n_s_C_FLOAT_COMPLEX; static PyObject *__pyx_n_s_C_LONG_DOUBLE_COMPLEX; static PyObject *__pyx_n_s_Cartcomm; static PyObject *__pyx_n_s_Close_port; static PyObject *__pyx_n_s_Comm; static PyObject *__pyx_n_s_Compare; static PyObject *__pyx_n_s_Compute_dims; static PyObject *__pyx_n_s_Create; static PyObject *__pyx_n_s_Create_dup; static PyObject *__pyx_n_s_Create_dynamic; static PyObject *__pyx_n_s_Create_f90_complex; static PyObject *__pyx_n_s_Create_f90_integer; static PyObject *__pyx_n_s_Create_f90_real; static PyObject *__pyx_n_s_Create_keyval; static PyObject *__pyx_n_s_Create_resized; static PyObject *__pyx_n_s_Create_struct; static PyObject *__pyx_n_s_DARRAY; static PyObject *__pyx_n_s_DATATYPE_NULL; static PyObject *__pyx_n_s_DEFAULT_PROTOCOL; static PyObject *__pyx_n_s_DISPLACEMENT_CURRENT; static PyObject *__pyx_n_s_DISP_CUR; static PyObject *__pyx_n_s_DISTRIBUTE_BLOCK; static PyObject *__pyx_n_s_DISTRIBUTE_CYCLIC; static PyObject *__pyx_n_s_DISTRIBUTE_DFLT_DARG; static PyObject *__pyx_n_s_DISTRIBUTE_NONE; static PyObject *__pyx_n_s_DIST_GRAPH; static PyObject *__pyx_n_s_DOUBLE; static PyObject *__pyx_n_s_DOUBLE_COMPLEX; static PyObject *__pyx_n_s_DOUBLE_INT; static PyObject *__pyx_n_s_DOUBLE_PRECISION; static PyObject *__pyx_n_s_DUP; static PyObject *__pyx_n_s_Datatype; static PyObject *__pyx_n_s_Delete; static PyObject *__pyx_n_s_Detach_buffer; static PyObject *__pyx_n_s_Difference; static PyObject *__pyx_n_s_Distgraphcomm; static PyObject *__pyx_n_s_Dup; static PyObject *__pyx_n_s_ERRHANDLER_NULL; static PyObject *__pyx_n_s_ERRORS_ARE_FATAL; static PyObject *__pyx_n_s_ERRORS_RETURN; static PyObject *__pyx_n_s_ERR_ACCESS; static PyObject *__pyx_n_s_ERR_AMODE; static PyObject *__pyx_n_s_ERR_ARG; static PyObject *__pyx_n_s_ERR_ASSERT; static PyObject *__pyx_n_s_ERR_BAD_FILE; static PyObject *__pyx_n_s_ERR_BASE; static PyObject *__pyx_n_s_ERR_BUFFER; static PyObject *__pyx_n_s_ERR_COMM; static PyObject *__pyx_n_s_ERR_CONVERSION; static PyObject *__pyx_n_s_ERR_COUNT; static PyObject *__pyx_n_s_ERR_DIMS; static PyObject *__pyx_n_s_ERR_DISP; static PyObject *__pyx_n_s_ERR_DUP_DATAREP; static PyObject *__pyx_n_s_ERR_FILE; static PyObject *__pyx_n_s_ERR_FILE_EXISTS; static PyObject *__pyx_n_s_ERR_FILE_IN_USE; static PyObject *__pyx_n_s_ERR_GROUP; static PyObject *__pyx_n_s_ERR_INFO; static PyObject *__pyx_n_s_ERR_INFO_KEY; static PyObject *__pyx_n_s_ERR_INFO_NOKEY; static PyObject *__pyx_n_s_ERR_INFO_VALUE; static PyObject *__pyx_n_s_ERR_INTERN; static PyObject *__pyx_n_s_ERR_IN_STATUS; static PyObject *__pyx_n_s_ERR_IO; static PyObject *__pyx_n_s_ERR_KEYVAL; static PyObject *__pyx_n_s_ERR_LASTCODE; static PyObject *__pyx_n_s_ERR_LOCKTYPE; static PyObject *__pyx_n_s_ERR_NAME; static PyObject *__pyx_n_s_ERR_NOT_SAME; static PyObject *__pyx_n_s_ERR_NO_MEM; static PyObject *__pyx_n_s_ERR_NO_SPACE; static PyObject *__pyx_n_s_ERR_NO_SUCH_FILE; static PyObject *__pyx_n_s_ERR_OP; static PyObject *__pyx_n_s_ERR_OTHER; static PyObject *__pyx_n_s_ERR_PENDING; static PyObject *__pyx_n_s_ERR_PORT; static PyObject *__pyx_n_s_ERR_QUOTA; static PyObject *__pyx_n_s_ERR_RANK; static PyObject *__pyx_n_s_ERR_READ_ONLY; static PyObject *__pyx_n_s_ERR_REQUEST; static PyObject *__pyx_n_s_ERR_RMA_ATTACH; static PyObject *__pyx_n_s_ERR_RMA_CONFLICT; static PyObject *__pyx_n_s_ERR_RMA_FLAVOR; static PyObject *__pyx_n_s_ERR_RMA_RANGE; static PyObject *__pyx_n_s_ERR_RMA_SHARED; static PyObject *__pyx_n_s_ERR_RMA_SYNC; static PyObject *__pyx_n_s_ERR_ROOT; static PyObject *__pyx_n_s_ERR_SERVICE; static PyObject *__pyx_n_s_ERR_SIZE; static PyObject *__pyx_n_s_ERR_SPAWN; static PyObject *__pyx_n_s_ERR_TAG; static PyObject *__pyx_n_s_ERR_TOPOLOGY; static PyObject *__pyx_n_s_ERR_TRUNCATE; static PyObject *__pyx_n_s_ERR_TYPE; static PyObject *__pyx_n_s_ERR_UNKNOWN; static PyObject *__pyx_n_s_ERR_UNSUPPORTED_DATAREP; static PyObject *__pyx_n_s_ERR_UNSUPPORTED_OPERATION; static PyObject *__pyx_n_s_ERR_WIN; static PyObject *__pyx_n_s_Errhandler; static PyObject *__pyx_kp_s_Exception; static PyObject *__pyx_n_s_Exception_2; static PyObject *__pyx_n_s_Exception_Get_error_class; static PyObject *__pyx_n_s_Exception_Get_error_code; static PyObject *__pyx_n_s_Exception_Get_error_string; static PyObject *__pyx_n_s_Exception___bool; static PyObject *__pyx_n_s_Exception___eq; static PyObject *__pyx_n_s_Exception___ge; static PyObject *__pyx_n_s_Exception___gt; static PyObject *__pyx_n_s_Exception___hash; static PyObject *__pyx_n_s_Exception___init; static PyObject *__pyx_n_s_Exception___int; static PyObject *__pyx_n_s_Exception___le; static PyObject *__pyx_n_s_Exception___lt; static PyObject *__pyx_n_s_Exception___ne; static PyObject *__pyx_n_s_Exception___repr; static PyObject *__pyx_n_s_Exception___str; static PyObject *__pyx_n_s_F90_COMPLEX; static PyObject *__pyx_n_s_F90_INTEGER; static PyObject *__pyx_n_s_F90_REAL; static PyObject *__pyx_n_s_FILE_NULL; static PyObject *__pyx_n_s_FLOAT; static PyObject *__pyx_n_s_FLOAT_INT; static PyObject *__pyx_n_s_F_BOOL; static PyObject *__pyx_n_s_F_COMPLEX; static PyObject *__pyx_n_s_F_DOUBLE; static PyObject *__pyx_n_s_F_DOUBLE_COMPLEX; static PyObject *__pyx_n_s_F_FLOAT; static PyObject *__pyx_n_s_F_FLOAT_COMPLEX; static PyObject *__pyx_n_s_F_INT; static PyObject *__pyx_n_s_File; static PyObject *__pyx_n_s_Finalize; static PyObject *__pyx_n_s_Free_keyval; static PyObject *__pyx_n_s_Free_mem; static PyObject *__pyx_n_s_GRAPH; static PyObject *__pyx_n_s_GROUP_EMPTY; static PyObject *__pyx_n_s_GROUP_NULL; static PyObject *__pyx_n_s_Get; static PyObject *__pyx_n_s_Get_address; static PyObject *__pyx_n_s_Get_amode; static PyObject *__pyx_n_s_Get_atomicity; static PyObject *__pyx_n_s_Get_contents; static PyObject *__pyx_n_s_Get_count; static PyObject *__pyx_n_s_Get_dim; static PyObject *__pyx_n_s_Get_dims; static PyObject *__pyx_n_s_Get_dist_neighbors; static PyObject *__pyx_n_s_Get_dist_neighbors_count; static PyObject *__pyx_n_s_Get_envelope; static PyObject *__pyx_n_s_Get_error; static PyObject *__pyx_n_s_Get_error_class; static PyObject *__pyx_n_s_Get_error_code; static PyObject *__pyx_n_s_Get_error_string; static PyObject *__pyx_n_s_Get_group; static PyObject *__pyx_n_s_Get_info; static PyObject *__pyx_n_s_Get_library_version; static PyObject *__pyx_n_s_Get_name; static PyObject *__pyx_n_s_Get_neighbors; static PyObject *__pyx_n_s_Get_neighbors_count; static PyObject *__pyx_n_s_Get_nkeys; static PyObject *__pyx_n_s_Get_nthkey; static PyObject *__pyx_n_s_Get_parent; static PyObject *__pyx_n_s_Get_processor_name; static PyObject *__pyx_n_s_Get_rank; static PyObject *__pyx_n_s_Get_remote_group; static PyObject *__pyx_n_s_Get_remote_size; static PyObject *__pyx_n_s_Get_size; static PyObject *__pyx_n_s_Get_source; static PyObject *__pyx_n_s_Get_tag; static PyObject *__pyx_n_s_Get_topo; static PyObject *__pyx_n_s_Get_topology; static PyObject *__pyx_n_s_Get_version; static PyObject *__pyx_n_s_Graphcomm; static PyObject *__pyx_n_s_Grequest; static PyObject *__pyx_n_s_Group; static PyObject *__pyx_n_s_HIGHEST_PROTOCOL; static PyObject *__pyx_n_s_HINDEXED; static PyObject *__pyx_n_s_HINDEXED_BLOCK; static PyObject *__pyx_n_s_HOST; static PyObject *__pyx_n_s_HVECTOR; static PyObject *__pyx_n_s_IDENT; static PyObject *__pyx_n_s_INDEXED; static PyObject *__pyx_n_s_INDEXED_BLOCK; static PyObject *__pyx_n_s_INFO_ENV; static PyObject *__pyx_n_s_INFO_NULL; static PyObject *__pyx_n_s_INT; static PyObject *__pyx_n_s_INT16_T; static PyObject *__pyx_n_s_INT32_T; static PyObject *__pyx_n_s_INT64_T; static PyObject *__pyx_n_s_INT8_T; static PyObject *__pyx_n_s_INTEGER; static PyObject *__pyx_n_s_INTEGER1; static PyObject *__pyx_n_s_INTEGER16; static PyObject *__pyx_n_s_INTEGER2; static PyObject *__pyx_n_s_INTEGER4; static PyObject *__pyx_n_s_INTEGER8; static PyObject *__pyx_n_s_INT_INT; static PyObject *__pyx_n_s_IN_PLACE; static PyObject *__pyx_n_s_IO; static PyObject *__pyx_n_s_ImportError; static PyObject *__pyx_n_s_IndexError; static PyObject *__pyx_n_s_Info; static PyObject *__pyx_n_s_Init; static PyObject *__pyx_n_s_Init_thread; static PyObject *__pyx_n_s_Intercomm; static PyObject *__pyx_n_s_Intersect; static PyObject *__pyx_n_s_Intersection; static PyObject *__pyx_n_s_Intracomm; static PyObject *__pyx_n_s_Iprobe; static PyObject *__pyx_n_s_Is_cancelled; static PyObject *__pyx_n_s_Is_commutative; static PyObject *__pyx_n_s_Is_finalized; static PyObject *__pyx_n_s_Is_initialized; static PyObject *__pyx_n_s_Is_inter; static PyObject *__pyx_n_s_Is_intra; static PyObject *__pyx_n_s_Is_thread_main; static PyObject *__pyx_n_s_Join; static PyObject *__pyx_n_s_KEYVAL_INVALID; static PyObject *__pyx_n_s_KeyError; static PyObject *__pyx_n_s_LAND; static PyObject *__pyx_n_s_LASTUSEDCODE; static PyObject *__pyx_n_s_LB; static PyObject *__pyx_n_s_LOCK_EXCLUSIVE; static PyObject *__pyx_n_s_LOCK_SHARED; static PyObject *__pyx_n_s_LOGICAL; static PyObject *__pyx_n_s_LOGICAL1; static PyObject *__pyx_n_s_LOGICAL2; static PyObject *__pyx_n_s_LOGICAL4; static PyObject *__pyx_n_s_LOGICAL8; static PyObject *__pyx_n_s_LONG; static PyObject *__pyx_n_s_LONG_DOUBLE; static PyObject *__pyx_n_s_LONG_DOUBLE_INT; static PyObject *__pyx_n_s_LONG_INT; static PyObject *__pyx_n_s_LONG_LONG; static PyObject *__pyx_n_s_LOR; static PyObject *__pyx_n_s_LXOR; static PyObject *__pyx_n_s_Lookup_name; static PyObject *__pyx_n_s_MAX; static PyObject *__pyx_n_s_MAXLOC; static PyObject *__pyx_n_s_MAX_DATAREP_STRING; static PyObject *__pyx_n_s_MAX_ERROR_STRING; static PyObject *__pyx_n_s_MAX_INFO_KEY; static PyObject *__pyx_n_s_MAX_INFO_VAL; static PyObject *__pyx_n_s_MAX_LIBRARY_VERSION_STRING; static PyObject *__pyx_n_s_MAX_OBJECT_NAME; static PyObject *__pyx_n_s_MAX_PORT_NAME; static PyObject *__pyx_n_s_MAX_PROCESSOR_NAME; static PyObject *__pyx_n_s_MESSAGE_NO_PROC; static PyObject *__pyx_n_s_MESSAGE_NULL; static PyObject *__pyx_n_s_MIN; static PyObject *__pyx_n_s_MINLOC; static PyObject *__pyx_n_s_MODE_APPEND; static PyObject *__pyx_n_s_MODE_CREATE; static PyObject *__pyx_n_s_MODE_DELETE_ON_CLOSE; static PyObject *__pyx_n_s_MODE_EXCL; static PyObject *__pyx_n_s_MODE_NOCHECK; static PyObject *__pyx_n_s_MODE_NOPRECEDE; static PyObject *__pyx_n_s_MODE_NOPUT; static PyObject *__pyx_n_s_MODE_NOSTORE; static PyObject *__pyx_n_s_MODE_NOSUCCEED; static PyObject *__pyx_n_s_MODE_RDONLY; static PyObject *__pyx_n_s_MODE_RDWR; static PyObject *__pyx_n_s_MODE_SEQUENTIAL; static PyObject *__pyx_n_s_MODE_UNIQUE_OPEN; static PyObject *__pyx_n_s_MODE_WRONLY; static PyObject *__pyx_kp_s_MPI_Exception_d; static PyObject *__pyx_kp_s_MPI_Init_failed_error_code_d; static PyObject *__pyx_kp_s_MPI_Init_thread_failed_error_cod; static PyObject *__pyx_n_s_Match_size; static PyObject *__pyx_n_s_MemoryError; static PyObject *__pyx_n_s_Message; static PyObject *__pyx_kp_s_Message_Passing_Interface; static PyObject *__pyx_n_s_NO_OP; static PyObject *__pyx_n_s_NotImplemented; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_kp_s_Not_a_topology_communicator; static PyObject *__pyx_n_s_OFFSET; static PyObject *__pyx_n_s_OP_NULL; static PyObject *__pyx_n_s_ORDER_C; static PyObject *__pyx_n_s_ORDER_F; static PyObject *__pyx_n_s_ORDER_FORTRAN; static PyObject *__pyx_n_s_Op; static PyObject *__pyx_n_s_Open; static PyObject *__pyx_n_s_Open_port; static PyObject *__pyx_n_s_OverflowError; static PyObject *__pyx_n_s_PACKED; static PyObject *__pyx_n_s_PROC_NULL; static PyObject *__pyx_n_s_PROD; static PyObject *__pyx_n_s_Pcontrol; static PyObject *__pyx_n_s_Prequest; static PyObject *__pyx_n_s_Probe; static PyObject *__pyx_n_s_Publish_name; static PyObject *__pyx_n_s_Query_thread; static PyObject *__pyx_n_s_REAL; static PyObject *__pyx_n_s_REAL16; static PyObject *__pyx_n_s_REAL2; static PyObject *__pyx_n_s_REAL4; static PyObject *__pyx_n_s_REAL8; static PyObject *__pyx_n_s_REPLACE; static PyObject *__pyx_n_s_REQUEST_NULL; static PyObject *__pyx_n_s_RESIZED; static PyObject *__pyx_n_s_ROOT; static PyObject *__pyx_n_s_Register_datarep; static PyObject *__pyx_n_s_Request; static PyObject *__pyx_n_s_Resized; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_SEEK_CUR; static PyObject *__pyx_n_s_SEEK_END; static PyObject *__pyx_n_s_SEEK_SET; static PyObject *__pyx_n_s_SHORT; static PyObject *__pyx_n_s_SHORT_INT; static PyObject *__pyx_n_s_SIGNED_CHAR; static PyObject *__pyx_n_s_SIGNED_INT; static PyObject *__pyx_n_s_SIGNED_LONG; static PyObject *__pyx_n_s_SIGNED_LONG_LONG; static PyObject *__pyx_n_s_SIGNED_SHORT; static PyObject *__pyx_n_s_SIMILAR; static PyObject *__pyx_n_s_SINT16_T; static PyObject *__pyx_n_s_SINT32_T; static PyObject *__pyx_n_s_SINT64_T; static PyObject *__pyx_n_s_SINT8_T; static PyObject *__pyx_n_s_STRUCT; static PyObject *__pyx_n_s_SUBARRAY; static PyObject *__pyx_n_s_SUBVERSION; static PyObject *__pyx_n_s_SUCCESS; static PyObject *__pyx_n_s_SUM; static PyObject *__pyx_n_s_Set; static PyObject *__pyx_n_s_Set_atomicity; static PyObject *__pyx_n_s_Set_cancelled; static PyObject *__pyx_n_s_Set_error; static PyObject *__pyx_n_s_Set_info; static PyObject *__pyx_n_s_Set_name; static PyObject *__pyx_n_s_Set_source; static PyObject *__pyx_n_s_Set_tag; static PyObject *__pyx_n_s_Shift; static PyObject *__pyx_n_s_Start; static PyObject *__pyx_n_s_Startall; static PyObject *__pyx_n_s_Status; static PyObject *__pyx_n_s_StringIO; static PyObject *__pyx_n_s_SystemError; static PyObject *__pyx_n_s_TAG_UB; static PyObject *__pyx_n_s_THREAD_FUNNELED; static PyObject *__pyx_n_s_THREAD_MULTIPLE; static PyObject *__pyx_n_s_THREAD_SERIALIZED; static PyObject *__pyx_n_s_THREAD_SINGLE; static PyObject *__pyx_n_s_TWOINT; static PyObject *__pyx_n_s_TYPECLASS_COMPLEX; static PyObject *__pyx_n_s_TYPECLASS_INTEGER; static PyObject *__pyx_n_s_TYPECLASS_REAL; static PyObject *__pyx_n_s_Testall; static PyObject *__pyx_n_s_Testany; static PyObject *__pyx_n_s_Testsome; static PyObject *__pyx_n_s_Topocomm; static PyObject *__pyx_n_s_Translate_ranks; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_n_s_UB; static PyObject *__pyx_n_s_UINT16_T; static PyObject *__pyx_n_s_UINT32_T; static PyObject *__pyx_n_s_UINT64_T; static PyObject *__pyx_n_s_UINT8_T; static PyObject *__pyx_n_s_UNDEFINED; static PyObject *__pyx_n_s_UNEQUAL; static PyObject *__pyx_n_s_UNIVERSE_SIZE; static PyObject *__pyx_n_s_UNSIGNED; static PyObject *__pyx_n_s_UNSIGNED_CHAR; static PyObject *__pyx_n_s_UNSIGNED_INT; static PyObject *__pyx_n_s_UNSIGNED_LONG; static PyObject *__pyx_n_s_UNSIGNED_LONG_LONG; static PyObject *__pyx_n_s_UNSIGNED_SHORT; static PyObject *__pyx_n_s_UNWEIGHTED; static PyObject *__pyx_n_s_Union; static PyObject *__pyx_n_s_Unpublish_name; static PyObject *__pyx_n_s_UserWarning; static PyObject *__pyx_n_s_VECTOR; static PyObject *__pyx_n_s_VERSION; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_WCHAR; static PyObject *__pyx_n_s_WEIGHTS_EMPTY; static PyObject *__pyx_n_s_WIN_BASE; static PyObject *__pyx_n_s_WIN_CREATE_FLAVOR; static PyObject *__pyx_n_s_WIN_DISP_UNIT; static PyObject *__pyx_n_s_WIN_FLAVOR; static PyObject *__pyx_n_s_WIN_FLAVOR_ALLOCATE; static PyObject *__pyx_n_s_WIN_FLAVOR_CREATE; static PyObject *__pyx_n_s_WIN_FLAVOR_DYNAMIC; static PyObject *__pyx_n_s_WIN_FLAVOR_SHARED; static PyObject *__pyx_n_s_WIN_MODEL; static PyObject *__pyx_n_s_WIN_NULL; static PyObject *__pyx_n_s_WIN_SEPARATE; static PyObject *__pyx_n_s_WIN_SIZE; static PyObject *__pyx_n_s_WIN_UNIFIED; static PyObject *__pyx_n_s_WTIME_IS_GLOBAL; static PyObject *__pyx_n_s_Waitall; static PyObject *__pyx_n_s_Waitany; static PyObject *__pyx_n_s_Waitsome; static PyObject *__pyx_n_s_Win; static PyObject *__pyx_n_s_Wtick; static PyObject *__pyx_n_s_Wtime; static PyObject *__pyx_kp_b__23; static PyObject *__pyx_kp_s_accessing_non_existent_buffer_se; static PyObject *__pyx_n_s_addr1; static PyObject *__pyx_n_s_addr2; static PyObject *__pyx_n_s_address; static PyObject *__pyx_n_s_addressof; static PyObject *__pyx_n_s_allgather; static PyObject *__pyx_n_s_allocate_lock; static PyObject *__pyx_n_s_alltoall; static PyObject *__pyx_n_s_amode; static PyObject *__pyx_n_s_append; static PyObject *__pyx_n_s_arg; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_array; static PyObject *__pyx_n_s_array_interface; static PyObject *__pyx_n_s_assertion; static PyObject *__pyx_n_s_attrval; static PyObject *__pyx_n_s_base; static PyObject *__pyx_n_s_baseptr; static PyObject *__pyx_n_s_bcast; static PyObject *__pyx_kp_s_bcast_p2p; static PyObject *__pyx_n_s_blocklength; static PyObject *__pyx_n_s_blocklengths; static PyObject *__pyx_n_s_bool; static PyObject *__pyx_n_s_buf; static PyObject *__pyx_n_s_buffer_info; static PyObject *__pyx_n_s_cPickle; static PyObject *__pyx_n_s_cStringIO; static PyObject *__pyx_n_s_call; static PyObject *__pyx_n_s_cancel_fn; static PyObject *__pyx_kp_s_cannot_create_too_many_user_defi; static PyObject *__pyx_n_s_cdatarep; static PyObject *__pyx_n_s_char; static PyObject *__pyx_n_s_cinfo; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_color; static PyObject *__pyx_n_s_comm; static PyObject *__pyx_n_s_comm1; static PyObject *__pyx_n_s_comm2; static PyObject *__pyx_n_s_command; static PyObject *__pyx_kp_s_commctx_inter; static PyObject *__pyx_kp_s_commctx_intra; static PyObject *__pyx_n_s_commute; static PyObject *__pyx_n_s_compare; static PyObject *__pyx_kp_s_compare_expecting_a_single_eleme; static PyObject *__pyx_n_s_coords; static PyObject *__pyx_n_s_copy_fn; static PyObject *__pyx_n_s_count; static PyObject *__pyx_n_s_cportname; static PyObject *__pyx_n_s_csrvcname; static PyObject *__pyx_n_s_cstring; static PyObject *__pyx_n_s_dargs; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_datarep; static PyObject *__pyx_n_s_datatype; static PyObject *__pyx_n_s_datatypes; static PyObject *__pyx_n_s_default; static PyObject *__pyx_n_s_degrees; static PyObject *__pyx_n_s_delete_fn; static PyObject *__pyx_n_s_dest; static PyObject *__pyx_n_s_destinations; static PyObject *__pyx_n_s_destweights; static PyObject *__pyx_n_s_dims; static PyObject *__pyx_n_s_direction; static PyObject *__pyx_n_s_disp; static PyObject *__pyx_n_s_disp_unit; static PyObject *__pyx_n_s_displacements; static PyObject *__pyx_n_s_distribs; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_doc_2; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_dummy_thread; static PyObject *__pyx_n_s_dummy_thread_2; static PyObject *__pyx_n_s_dumps; static PyObject *__pyx_n_s_edges; static PyObject *__pyx_kp_s_empty_weights_but_nonzero_degree; static PyObject *__pyx_n_s_enter; static PyObject *__pyx_n_s_eq; static PyObject *__pyx_n_s_errcodes; static PyObject *__pyx_n_s_errhandler; static PyObject *__pyx_n_s_error; static PyObject *__pyx_kp_s_error_class; static PyObject *__pyx_n_s_error_class_2; static PyObject *__pyx_kp_s_error_code; static PyObject *__pyx_n_s_error_code_2; static PyObject *__pyx_kp_s_error_code_d; static PyObject *__pyx_kp_s_error_string; static PyObject *__pyx_n_s_error_string_2; static PyObject *__pyx_n_s_errorclass; static PyObject *__pyx_n_s_errorcode; static PyObject *__pyx_n_s_errors; static PyObject *__pyx_n_s_etype; static PyObject *__pyx_n_s_ex; static PyObject *__pyx_n_s_exception; static PyObject *__pyx_n_s_exit; static PyObject *__pyx_kp_s_expecting_a_Cartesian_communicat; static PyObject *__pyx_kp_s_expecting_a_distributed_graph_co; static PyObject *__pyx_kp_s_expecting_a_general_graph_commun; static PyObject *__pyx_kp_s_expecting_a_sequence_of_strings; static PyObject *__pyx_kp_s_expecting_a_topology_communicato; static PyObject *__pyx_kp_s_expecting_an_MPI_instance; static PyObject *__pyx_kp_s_expecting_an_MPI_type_or_instanc; static PyObject *__pyx_kp_s_expecting_an_intercommunicator; static PyObject *__pyx_kp_s_expecting_an_intracommunicator; static PyObject *__pyx_kp_s_expecting_d_items_got_d; static PyObject *__pyx_kp_s_expecting_non_NULL_address; static PyObject *__pyx_kp_s_expecting_non_negative_buffer_le; static PyObject *__pyx_n_s_extent; static PyObject *__pyx_n_s_extent_fn; static PyObject *__pyx_n_s_f2py; static PyObject *__pyx_n_s_fast_reduce; static PyObject *__pyx_n_s_fatal; static PyObject *__pyx_n_s_fd; static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_filename; static PyObject *__pyx_n_s_filetype; static PyObject *__pyx_n_s_finalize; static PyObject *__pyx_n_s_flag; static PyObject *__pyx_n_s_flags; static PyObject *__pyx_n_s_flush; static PyObject *__pyx_n_s_free_fn; static PyObject *__pyx_n_s_fromaddress; static PyObject *__pyx_n_s_frombuffer; static PyObject *__pyx_n_s_function; static PyObject *__pyx_n_s_funneled; static PyObject *__pyx_n_s_gather; static PyObject *__pyx_n_s_ge; static PyObject *__pyx_n_s_get; static PyObject *__pyx_n_s_get_vendor; static PyObject *__pyx_n_s_group; static PyObject *__pyx_n_s_group1; static PyObject *__pyx_n_s_group2; static PyObject *__pyx_n_s_gsizes; static PyObject *__pyx_n_s_gt; static PyObject *__pyx_n_s_handleof; static PyObject *__pyx_n_s_hash; static PyObject *__pyx_n_s_high; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_idims; static PyObject *__pyx_n_s_ierr; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_inbuf; static PyObject *__pyx_n_s_index; static PyObject *__pyx_kp_s_index_must_be_integer_or_slice; static PyObject *__pyx_kp_s_index_out_of_range; static PyObject *__pyx_n_s_info; static PyObject *__pyx_n_s_init; static PyObject *__pyx_n_s_initialize; static PyObject *__pyx_n_s_inoutbuf; static PyObject *__pyx_n_s_inoutedges; static PyObject *__pyx_n_s_insert; static PyObject *__pyx_n_s_int; static PyObject *__pyx_kp_s_integer_d_does_not_fit_in_int; static PyObject *__pyx_n_s_io; static PyObject *__pyx_n_s_iprobe; static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_itemsize; static PyObject *__pyx_n_s_kargs; static PyObject *__pyx_n_s_key; static PyObject *__pyx_n_s_keys; static PyObject *__pyx_n_s_keyval; static PyObject *__pyx_n_s_keyval_registry; static PyObject *__pyx_n_s_lb; static PyObject *__pyx_n_s_le; static PyObject *__pyx_n_s_level; static PyObject *__pyx_n_s_load; static PyObject *__pyx_n_s_loads; static PyObject *__pyx_n_s_local_leader; static PyObject *__pyx_n_s_location; static PyObject *__pyx_n_s_lock_table; static PyObject *__pyx_n_s_lock_type; static PyObject *__pyx_n_s_lt; static PyObject *__pyx_n_s_m; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_major; static PyObject *__pyx_n_s_maxlen; static PyObject *__pyx_n_s_maxprocs; static PyObject *__pyx_n_s_mem; static PyObject *__pyx_n_s_memory; static PyObject *__pyx_kp_s_memory_allocation_size_too_large; static PyObject *__pyx_kp_s_memory_allocation_with_negative; static PyObject *__pyx_kp_s_memory_buffer_is_read_only; static PyObject *__pyx_n_s_message; static PyObject *__pyx_kp_s_message_buffer_is_None_but_count; static PyObject *__pyx_kp_s_message_cannot_handle_diplacemen; static PyObject *__pyx_kp_s_message_cannot_handle_diplacemen_2; static PyObject *__pyx_kp_s_message_cannot_infer_count_buffe; static PyObject *__pyx_kp_s_message_cannot_infer_count_datat; static PyObject *__pyx_kp_s_message_cannot_infer_count_datat_2; static PyObject *__pyx_kp_s_message_cannot_infer_count_numbe; static PyObject *__pyx_kp_s_message_displacement_d_out_of_bo; static PyObject *__pyx_kp_s_message_expecting_2_to_4_items; static PyObject *__pyx_kp_s_message_expecting_buffer_or_list; static PyObject *__pyx_kp_s_message_negative_count_d; static PyObject *__pyx_kp_s_message_negative_diplacement_d; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_micro; static PyObject *__pyx_n_s_minor; static PyObject *__pyx_kp_s_mismatch_in_inbuf_and_inoutbuf_M; static PyObject *__pyx_kp_s_mismatch_in_inbuf_count_d_and_in; static PyObject *__pyx_kp_s_mismatch_in_origin_and_compare_M; static PyObject *__pyx_kp_s_mismatch_in_origin_and_result_MP; static PyObject *__pyx_kp_s_mismatch_in_receive_count_d_and; static PyObject *__pyx_kp_s_mismatch_in_receive_count_d_and_2; static PyObject *__pyx_kp_s_mismatch_in_send_and_receive_MPI; static PyObject *__pyx_kp_s_mismatch_in_send_count_d_and_rec; static PyObject *__pyx_kp_s_mismatch_in_send_count_d_and_sum; static PyObject *__pyx_kp_s_mismatch_in_send_count_d_receive; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_mpi4py; static PyObject *__pyx_n_s_mpi4py_MPI; static PyObject *__pyx_kp_s_mpi4py_MPI_Comm_pyx; static PyObject *__pyx_kp_s_mpi4py_MPI_Datatype_pyx; static PyObject *__pyx_kp_s_mpi4py_MPI_ExceptionP_pyx; static PyObject *__pyx_kp_s_mpi4py_MPI_Exception_pyx; static PyObject *__pyx_kp_s_mpi4py_MPI_File_pyx; static PyObject *__pyx_kp_s_mpi4py_MPI_MPI_pyx; static PyObject *__pyx_kp_s_mpi4py_MPI_asbuffer_pxi; static PyObject *__pyx_kp_s_mpi4py_MPI_atimport_pxi; static PyObject *__pyx_kp_s_mpi4py_MPI_commimpl_pxi; static PyObject *__pyx_kp_s_mpi4py_MPI_typestr_pxi; static PyObject *__pyx_kp_s_mpi4py_rc_s_unexpected_value_r; static PyObject *__pyx_n_s_multiple; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_n_s_nbytes; static PyObject *__pyx_n_s_ndarray; static PyObject *__pyx_n_s_ndims; static PyObject *__pyx_n_s_ne; static PyObject *__pyx_n_s_neighbor_allgather; static PyObject *__pyx_n_s_neighbor_alltoall; static PyObject *__pyx_n_s_new; static PyObject *__pyx_n_s_nlen; static PyObject *__pyx_n_s_nnodes; static PyObject *__pyx_n_s_no; static PyObject *__pyx_n_s_nonzero; static PyObject *__pyx_n_s_nopython; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_n_s_numpypy; static PyObject *__pyx_n_s_numpypy_multiarray; static PyObject *__pyx_n_s_ob_mpi; static PyObject *__pyx_n_s_obj; static PyObject *__pyx_n_s_offset; static PyObject *__pyx_n_s_op; static PyObject *__pyx_n_s_order; static PyObject *__pyx_n_s_origin; static PyObject *__pyx_kp_s_origin_expecting_a_single_elemen; static PyObject *__pyx_n_s_other; static PyObject *__pyx_n_s_outbuf; static PyObject *__pyx_n_s_p; static PyObject *__pyx_n_s_peer_comm; static PyObject *__pyx_n_s_periods; static PyObject *__pyx_n_s_pickle; static PyObject *__pyx_n_s_pop; static PyObject *__pyx_n_s_port_name; static PyObject *__pyx_n_s_position; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_print_exc; static PyObject *__pyx_n_s_probe; static PyObject *__pyx_n_s_property; static PyObject *__pyx_n_s_protocol; static PyObject *__pyx_n_s_provided; static PyObject *__pyx_n_s_psizes; static PyObject *__pyx_n_s_ptr; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_s_query_fn; static PyObject *__pyx_n_s_r; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_rank; static PyObject *__pyx_n_s_ranks; static PyObject *__pyx_n_s_ranks1; static PyObject *__pyx_n_s_rc; static PyObject *__pyx_n_s_rd; static PyObject *__pyx_n_s_read_fn; static PyObject *__pyx_n_s_readonly; static PyObject *__pyx_n_s_recv; static PyObject *__pyx_n_s_recv_mprobe; static PyObject *__pyx_n_s_recvbuf; static PyObject *__pyx_n_s_recvcounts; static PyObject *__pyx_n_s_recvtag; static PyObject *__pyx_n_s_release; static PyObject *__pyx_n_s_remain_dims; static PyObject *__pyx_n_s_remote_leader; static PyObject *__pyx_n_s_reorder; static PyObject *__pyx_n_s_repr; static PyObject *__pyx_n_s_request; static PyObject *__pyx_n_s_requests; static PyObject *__pyx_n_s_required; static PyObject *__pyx_n_s_result; static PyObject *__pyx_kp_s_result_expecting_a_single_elemen; static PyObject *__pyx_n_s_resultlen; static PyObject *__pyx_n_s_root; static PyObject *__pyx_n_s_scatter; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_sendbuf; static PyObject *__pyx_n_s_sendobj; static PyObject *__pyx_n_s_sendtag; static PyObject *__pyx_n_s_serialized; static PyObject *__pyx_n_s_service_name; static PyObject *__pyx_n_s_set_abort_status; static PyObject *__pyx_n_s_single; static PyObject *__pyx_n_s_size; static PyObject *__pyx_n_s_sizeof; static PyObject *__pyx_n_s_sizes; static PyObject *__pyx_kp_s_slice_length_does_not_match_buff; static PyObject *__pyx_kp_s_slice_with_step_not_supported; static PyObject *__pyx_n_s_source; static PyObject *__pyx_n_s_sources; static PyObject *__pyx_n_s_sourceweights; static PyObject *__pyx_n_s_split_type; static PyObject *__pyx_n_s_starts; static PyObject *__pyx_n_s_state; static PyObject *__pyx_n_s_staticmethod; static PyObject *__pyx_n_s_status; static PyObject *__pyx_n_s_statuses; static PyObject *__pyx_n_s_stderr; static PyObject *__pyx_n_s_str; static PyObject *__pyx_n_s_stride; static PyObject *__pyx_n_s_string; static PyObject *__pyx_n_s_subsizes; static PyObject *__pyx_n_s_subversion; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_s_tag; static PyObject *__pyx_n_s_target; static PyObject *__pyx_n_s_target_disp; static PyObject *__pyx_kp_s_target_expecting_3_items_at_most; static PyObject *__pyx_kp_s_target_expecting_integral_or_lis; static PyObject *__pyx_n_s_target_rank; static PyObject *__pyx_n_s_tc; static PyObject *__pyx_n_s_testall; static PyObject *__pyx_n_s_testany; static PyObject *__pyx_n_s_thread; static PyObject *__pyx_n_s_thread_2; static PyObject *__pyx_n_s_thread_level; static PyObject *__pyx_n_s_threaded; static PyObject *__pyx_n_s_threads; static PyObject *__pyx_n_s_tmp; static PyObject *__pyx_n_s_traceback; static PyObject *__pyx_n_s_typeclass; static PyObject *__pyx_n_s_typecode; static PyObject *__pyx_n_s_typecode_2; static PyObject *__pyx_n_s_typedict; static PyObject *__pyx_n_s_typedict_c; static PyObject *__pyx_n_s_typedict_f; static PyObject *__pyx_kp_s_unorderable_type_s_s; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_version; static PyObject *__pyx_n_s_waitall; static PyObject *__pyx_n_s_waitany; static PyObject *__pyx_n_s_warn; static PyObject *__pyx_n_s_warnings; static PyObject *__pyx_n_s_weights; static PyObject *__pyx_n_s_whence; static PyObject *__pyx_n_s_win; static PyObject *__pyx_n_s_wr; static PyObject *__pyx_n_s_write_fn; static PyObject *__pyx_n_s_x; static PyObject *__pyx_n_s_xs; static PyObject *__pyx_n_s_y; static PyObject *__pyx_n_s_yes; static PyObject *__pyx_pf_6mpi4py_3MPI__set_abort_status(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_status); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6memory___cinit__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self); /* proto */ static void __pyx_pf_6mpi4py_3MPI_6memory_2__dealloc__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_4frombuffer(PyObject *__pyx_v_obj, int __pyx_v_readonly); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_6fromaddress(PyObject *__pyx_v_address, PyObject *__pyx_v_nbytes, int __pyx_v_readonly); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_7address___get__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_6nbytes___get__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_8readonly___get__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_8tobytes(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_10release(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6memory_12__getbuffer__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, Py_buffer *__pyx_v_view, int __pyx_v_flags); /* proto */ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_6memory_14__getsegcount__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, Py_ssize_t *__pyx_v_lenp); /* proto */ #endif #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_6memory_16__getreadbuffer__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p); /* proto */ #endif #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_6memory_18__getwritebuffer__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p); /* proto */ #endif static Py_ssize_t __pyx_pf_6mpi4py_3MPI_6memory_20__len__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_22__getitem__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6memory_24__setitem__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6_p_mem___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_mem *__pyx_v_self); /* proto */ static void __pyx_pf_6mpi4py_3MPI_6_p_mem_2__dealloc__(struct __pyx_obj_6mpi4py_3MPI__p_mem *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_7_p_greq___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_self, PyObject *__pyx_v_query_fn, PyObject *__pyx_v_free_fn, PyObject *__pyx_v_cancel_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2_lock_table(CYTHON_UNUSED PyObject *__pyx_self, struct PyMPICommObject *__pyx_v_comm); /* proto */ static int __pyx_pf_6mpi4py_3MPI_10_p_datarep___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_self, PyObject *__pyx_v_read_fn, PyObject *__pyx_v_write_fn, PyObject *__pyx_v_extent_fn); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9_p_keyval___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self, PyObject *__pyx_v_copy_fn, PyObject *__pyx_v_delete_fn, PyObject *__pyx_v_nopython); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9_p_keyval_7copy_fn___get__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_7copy_fn_2__set__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_7copy_fn_4__del__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9_p_keyval_9delete_fn___get__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_9delete_fn_2__set__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_9delete_fn_4__del__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9_p_keyval_8nopython___get__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_8nopython_2__set__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6mpi4py_3MPI_10_p_msg_p2p___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_10_p_msg_cco___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_11_p_msg_ccow___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_10_p_msg_rma___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9_p_msg_io___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6Pickle___cinit__(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6Pickle_2__init__(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_dumps, PyObject *__pyx_v_loads, PyObject *__pyx_v_protocol); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Pickle_4dumps(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Pickle_6loads(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Pickle_8PROTOCOL___get__(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6Pickle_8PROTOCOL_2__set__(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_protocol); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_ierr); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_4__ne__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_6__lt__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_8__le__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_10__gt__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_12__ge__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_14__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_16__bool__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_18__int__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_20__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_22__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_24Get_error_code(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_26Get_error_class(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_28Get_error_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Get_error_class(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_errorcode); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Get_error_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_errorcode); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Add_error_class(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_10Add_error_code(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_errorclass); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_12Add_error_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_errorcode, PyObject *__pyx_v_string); /* proto */ static int __pyx_pf_6mpi4py_3MPI_10Errhandler___cinit__(struct PyMPIErrhandlerObject *__pyx_v_self, struct PyMPIErrhandlerObject *__pyx_v_errhandler); /* proto */ static void __pyx_pf_6mpi4py_3MPI_10Errhandler_2__dealloc__(struct PyMPIErrhandlerObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_10Errhandler_4__richcmp__(struct PyMPIErrhandlerObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_10Errhandler_6__bool__(struct PyMPIErrhandlerObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_10Errhandler_8Free(struct PyMPIErrhandlerObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_10Errhandler_10py2f(struct PyMPIErrhandlerObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_10Errhandler_12f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static int __pyx_pf_6mpi4py_3MPI_8Datatype___cinit__(struct PyMPIDatatypeObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype); /* proto */ static void __pyx_pf_6mpi4py_3MPI_8Datatype_2__dealloc__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_4__richcmp__(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_8Datatype_6__bool__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8Get_size(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_4size___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_10Get_extent(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_6extent___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_2lb___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_2ub___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_12Dup(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_14Create_contiguous(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_count); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_16Create_vector(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_count, int __pyx_v_blocklength, int __pyx_v_stride); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_18Create_hvector(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_count, int __pyx_v_blocklength, MPI_Aint __pyx_v_stride); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_20Create_indexed(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_blocklengths, PyObject *__pyx_v_displacements); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_22Create_hindexed(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_blocklengths, PyObject *__pyx_v_displacements); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_24Create_indexed_block(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_blocklength, PyObject *__pyx_v_displacements); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_26Create_hindexed_block(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_blocklength, PyObject *__pyx_v_displacements); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_28Create_struct(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_blocklengths, PyObject *__pyx_v_displacements, PyObject *__pyx_v_datatypes); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_30Create_subarray(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_sizes, PyObject *__pyx_v_subsizes, PyObject *__pyx_v_starts, int __pyx_v_order); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_32Create_darray(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_size, int __pyx_v_rank, PyObject *__pyx_v_gsizes, PyObject *__pyx_v_distribs, PyObject *__pyx_v_dargs, PyObject *__pyx_v_psizes, int __pyx_v_order); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_34Create_f90_integer(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_r); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_36Create_f90_real(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_p, int __pyx_v_r); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_38Create_f90_complex(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_p, int __pyx_v_r); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_40Match_size(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_typeclass, int __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_42Commit(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_44Free(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_46Create_resized(struct PyMPIDatatypeObject *__pyx_v_self, MPI_Aint __pyx_v_lb, MPI_Aint __pyx_v_extent); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_48Get_true_extent(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_11true_extent___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_7true_lb___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_7true_ub___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_50Get_envelope(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8envelope___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_52Get_contents(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8contents___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_54decode(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8combiner___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8is_named___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_13is_predefined___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_56Pack(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_inbuf, PyObject *__pyx_v_outbuf, int __pyx_v_position, struct PyMPICommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_58Unpack(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_inbuf, int __pyx_v_position, PyObject *__pyx_v_outbuf, struct PyMPICommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_60Pack_size(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_count, struct PyMPICommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_62Pack_external(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_datarep, PyObject *__pyx_v_inbuf, PyObject *__pyx_v_outbuf, MPI_Aint __pyx_v_position); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_64Unpack_external(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_datarep, PyObject *__pyx_v_inbuf, MPI_Aint __pyx_v_position, PyObject *__pyx_v_outbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_66Pack_external_size(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_datarep, int __pyx_v_count); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_68Get_attr(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_keyval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_70Set_attr(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_keyval, PyObject *__pyx_v_attrval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_72Delete_attr(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_keyval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_74Create_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_copy_fn, PyObject *__pyx_v_delete_fn, PyObject *__pyx_v_nopython); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_76Free_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_keyval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_78Get_name(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_80Set_name(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_4name___get__(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_8Datatype_4name_2__set__(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_82py2f(struct PyMPIDatatypeObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_84f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_14Get_address(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_location); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_16Aint_add(CYTHON_UNUSED PyObject *__pyx_self, MPI_Aint __pyx_v_base, MPI_Aint __pyx_v_disp); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_18Aint_diff(CYTHON_UNUSED PyObject *__pyx_self, MPI_Aint __pyx_v_addr1, MPI_Aint __pyx_v_addr2); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_20_typecode(CYTHON_UNUSED PyObject *__pyx_self, struct PyMPIDatatypeObject *__pyx_v_datatype); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6Status___cinit__(struct PyMPIStatusObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_2__richcmp__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_4Get_source(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_6Set_source(struct PyMPIStatusObject *__pyx_v_self, int __pyx_v_source); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_6source___get__(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6Status_6source_2__set__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_8Get_tag(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_10Set_tag(struct PyMPIStatusObject *__pyx_v_self, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_3tag___get__(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6Status_3tag_2__set__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_12Get_error(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_14Set_error(struct PyMPIStatusObject *__pyx_v_self, int __pyx_v_error); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_5error___get__(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6Status_5error_2__set__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_16Get_count(struct PyMPIStatusObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_5count___get__(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_18Get_elements(struct PyMPIStatusObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_20Set_elements(struct PyMPIStatusObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype, MPI_Count __pyx_v_count); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_22Is_cancelled(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_24Set_cancelled(struct PyMPIStatusObject *__pyx_v_self, int __pyx_v_flag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_9cancelled___get__(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_6Status_9cancelled_2__set__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_26py2f(struct PyMPIStatusObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_28f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static int __pyx_pf_6mpi4py_3MPI_7Request___cinit__(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIRequestObject *__pyx_v_request); /* proto */ static void __pyx_pf_6mpi4py_3MPI_7Request_2__dealloc__(struct PyMPIRequestObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_4__richcmp__(struct PyMPIRequestObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_7Request_6__bool__(struct PyMPIRequestObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_8Wait(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_10Test(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_12Free(struct PyMPIRequestObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_14Get_status(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_16Waitany(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_18Testany(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_20Waitall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_22Testall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_24Waitsome(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_26Testsome(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_28Cancel(struct PyMPIRequestObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_30py2f(struct PyMPIRequestObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_32f2py(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_34wait(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_36test(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_38waitany(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_40testany(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_42waitall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_44testall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses); /* proto */ static int __pyx_pf_6mpi4py_3MPI_8Prequest___cinit__(struct PyMPIPrequestObject *__pyx_v_self, struct PyMPIRequestObject *__pyx_v_request); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Prequest_2Start(struct PyMPIPrequestObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Prequest_4Startall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests); /* proto */ static int __pyx_pf_6mpi4py_3MPI_8Grequest___cinit__(struct PyMPIGrequestObject *__pyx_v_self, struct PyMPIRequestObject *__pyx_v_request); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Grequest_2Start(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_query_fn, PyObject *__pyx_v_free_fn, PyObject *__pyx_v_cancel_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Grequest_4Complete(struct PyMPIGrequestObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_7Message___cinit__(struct PyMPIMessageObject *__pyx_v_self, struct PyMPIMessageObject *__pyx_v_message); /* proto */ static void __pyx_pf_6mpi4py_3MPI_7Message_2__dealloc__(struct PyMPIMessageObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_4__richcmp__(struct PyMPIMessageObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_7Message_6__bool__(struct PyMPIMessageObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_8Probe(PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_10Iprobe(PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_12Recv(struct PyMPIMessageObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_14Irecv(struct PyMPIMessageObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_16probe(PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_18iprobe(PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_20recv(struct PyMPIMessageObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_22irecv(struct PyMPIMessageObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_24py2f(struct PyMPIMessageObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_26f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4Info___cinit__(struct PyMPIInfoObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static void __pyx_pf_6mpi4py_3MPI_4Info_2__dealloc__(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_4__richcmp__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4Info_6__bool__(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_8Create(CYTHON_UNUSED PyTypeObject *__pyx_v_cls); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_10Free(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_12Dup(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_14Get(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_maxlen); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_16Set(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_18Delete(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_20Get_nkeys(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_22Get_nthkey(struct PyMPIInfoObject *__pyx_v_self, int __pyx_v_n); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_24py2f(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_26f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static Py_ssize_t __pyx_pf_6mpi4py_3MPI_4Info_28__len__(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4Info_30__contains__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_32__iter__(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_34__getitem__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4Info_36__setitem__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4Info_38__delitem__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_40get(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_42keys(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_44values(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_46items(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_48update(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_kwds); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_50copy(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_52clear(struct PyMPIInfoObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_2Op___cinit__(struct PyMPIOpObject *__pyx_v_self, struct PyMPIOpObject *__pyx_v_op); /* proto */ static void __pyx_pf_6mpi4py_3MPI_2Op_2__dealloc__(struct PyMPIOpObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_4__richcmp__(struct PyMPIOpObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_2Op_6__bool__(struct PyMPIOpObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_8__call__(struct PyMPIOpObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_10Create(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_function, int __pyx_v_commute); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_12Free(struct PyMPIOpObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_14Is_commutative(struct PyMPIOpObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_14is_commutative___get__(struct PyMPIOpObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_16Reduce_local(struct PyMPIOpObject *__pyx_v_self, PyObject *__pyx_v_inbuf, PyObject *__pyx_v_inoutbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_13is_predefined___get__(struct PyMPIOpObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_18py2f(struct PyMPIOpObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_20f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static int __pyx_pf_6mpi4py_3MPI_5Group___cinit__(struct PyMPIGroupObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group); /* proto */ static void __pyx_pf_6mpi4py_3MPI_5Group_2__dealloc__(struct PyMPIGroupObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_4__richcmp__(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_5Group_6__bool__(struct PyMPIGroupObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_8Get_size(struct PyMPIGroupObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_4size___get__(struct PyMPIGroupObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_10Get_rank(struct PyMPIGroupObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_4rank___get__(struct PyMPIGroupObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_12Translate_ranks(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, PyObject *__pyx_v_ranks1, struct PyMPIGroupObject *__pyx_v_group2); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_14Compare(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, struct PyMPIGroupObject *__pyx_v_group2); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_16Dup(struct PyMPIGroupObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_18Union(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, struct PyMPIGroupObject *__pyx_v_group2); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_20Intersection(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, struct PyMPIGroupObject *__pyx_v_group2); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_22Difference(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, struct PyMPIGroupObject *__pyx_v_group2); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_24Incl(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_ranks); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_26Excl(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_ranks); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_28Range_incl(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_ranks); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_30Range_excl(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_ranks); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_32Free(struct PyMPIGroupObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_34py2f(struct PyMPIGroupObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_36f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4Comm___cinit__(struct PyMPICommObject *__pyx_v_self, struct PyMPICommObject *__pyx_v_comm); /* proto */ static void __pyx_pf_6mpi4py_3MPI_4Comm_2__dealloc__(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4__richcmp__(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4Comm_6__bool__(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_8Get_group(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_5group___get__(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_10Get_size(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4size___get__(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_12Get_rank(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4rank___get__(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_14Compare(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm1, struct PyMPICommObject *__pyx_v_comm2); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_16Clone(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_18Dup(struct PyMPICommObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_20Dup_with_info(struct PyMPICommObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_22Idup(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_24Create(struct PyMPICommObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_26Create_group(struct PyMPICommObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_28Split(struct PyMPICommObject *__pyx_v_self, int __pyx_v_color, int __pyx_v_key); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_30Split_type(struct PyMPICommObject *__pyx_v_self, int __pyx_v_split_type, int __pyx_v_key, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_32Free(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_34Set_info(struct PyMPICommObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_36Get_info(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4info___get__(struct PyMPICommObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4Comm_4info_2__set__(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_38Send(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_40Recv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_42Sendrecv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, int __pyx_v_dest, int __pyx_v_sendtag, PyObject *__pyx_v_recvbuf, int __pyx_v_source, int __pyx_v_recvtag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_44Sendrecv_replace(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_sendtag, int __pyx_v_source, int __pyx_v_recvtag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_46Isend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_48Irecv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_50Probe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_52Iprobe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_54Mprobe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_56Improbe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_58Send_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_60Recv_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_62Bsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_64Ssend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_66Rsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_68Ibsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_70Issend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_72Irsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_74Bsend_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_76Ssend_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_78Rsend_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_80Barrier(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_82Bcast(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_84Gather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_86Gatherv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_88Scatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_90Scatterv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_92Allgather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_94Allgatherv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_96Alltoall(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_98Alltoallv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_100Alltoallw(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_102Reduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_104Allreduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_106Reduce_scatter_block(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_108Reduce_scatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, PyObject *__pyx_v_recvcounts, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_110Ibarrier(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_112Ibcast(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_114Igather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_116Igatherv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_118Iscatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_120Iscatterv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_122Iallgather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_124Iallgatherv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_126Ialltoall(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_128Ialltoallv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_130Ialltoallw(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_132Ireduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_134Iallreduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_136Ireduce_scatter_block(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_138Ireduce_scatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, PyObject *__pyx_v_recvcounts, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_140Is_inter(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_8is_inter___get__(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_142Is_intra(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_8is_intra___get__(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_144Get_topology(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_8topology___get__(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_7is_topo___get__(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_146Get_parent(CYTHON_UNUSED PyTypeObject *__pyx_v_cls); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_148Disconnect(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_150Join(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_fd); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_152Get_attr(struct PyMPICommObject *__pyx_v_self, int __pyx_v_keyval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_154Set_attr(struct PyMPICommObject *__pyx_v_self, int __pyx_v_keyval, PyObject *__pyx_v_attrval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_156Delete_attr(struct PyMPICommObject *__pyx_v_self, int __pyx_v_keyval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_158Create_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_copy_fn, PyObject *__pyx_v_delete_fn, PyObject *__pyx_v_nopython); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_160Free_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_keyval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_162Get_errhandler(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_164Set_errhandler(struct PyMPICommObject *__pyx_v_self, struct PyMPIErrhandlerObject *__pyx_v_errhandler); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_166Call_errhandler(struct PyMPICommObject *__pyx_v_self, int __pyx_v_errorcode); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_168Abort(struct PyMPICommObject *__pyx_v_self, int __pyx_v_errorcode); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_170Get_name(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_172Set_name(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4name___get__(struct PyMPICommObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4Comm_4name_2__set__(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_174py2f(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_176f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_178send(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_180bsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_182ssend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_184recv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_186sendrecv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, int __pyx_v_dest, int __pyx_v_sendtag, PyObject *__pyx_v_recvbuf, int __pyx_v_source, int __pyx_v_recvtag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_188isend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_190ibsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_192issend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_194irecv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_196probe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_198iprobe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_200mprobe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_202improbe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_204barrier(struct PyMPICommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_206bcast(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_208gather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_210scatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_212allgather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_214alltoall(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_216reduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_218allreduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9Intracomm___cinit__(struct PyMPIIntracommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_2Create_cart(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_dims, PyObject *__pyx_v_periods, int __pyx_v_reorder); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_4Create_graph(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_edges, int __pyx_v_reorder); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_6Create_dist_graph_adjacent(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sources, PyObject *__pyx_v_destinations, PyObject *__pyx_v_sourceweights, PyObject *__pyx_v_destweights, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_reorder); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_8Create_dist_graph(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sources, PyObject *__pyx_v_degrees, PyObject *__pyx_v_destinations, PyObject *__pyx_v_weights, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_reorder); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_10Create_intercomm(struct PyMPIIntracommObject *__pyx_v_self, int __pyx_v_local_leader, struct PyMPIIntracommObject *__pyx_v_peer_comm, int __pyx_v_remote_leader, int __pyx_v_tag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_12Cart_map(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_dims, PyObject *__pyx_v_periods); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_14Graph_map(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_edges); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_16Scan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_18Exscan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_20Iscan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_22Iexscan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_24scan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_26exscan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_28Spawn(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_command, PyObject *__pyx_v_args, int __pyx_v_maxprocs, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_root, PyObject *__pyx_v_errcodes); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_30Spawn_multiple(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_command, PyObject *__pyx_v_args, PyObject *__pyx_v_maxprocs, PyObject *__pyx_v_info, int __pyx_v_root, PyObject *__pyx_v_errcodes); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_32Accept(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_port_name, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_root); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_34Connect(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_port_name, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_root); /* proto */ static int __pyx_pf_6mpi4py_3MPI_8Topocomm___cinit__(struct PyMPITopocommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_7degrees___get__(struct PyMPITopocommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_8indegree___get__(struct PyMPITopocommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_9outdegree___get__(struct PyMPITopocommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_10inoutedges___get__(struct PyMPITopocommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_7inedges___get__(struct PyMPITopocommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_8outedges___get__(struct PyMPITopocommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_2Neighbor_allgather(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_4Neighbor_allgatherv(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_6Neighbor_alltoall(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_8Neighbor_alltoallv(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_10Neighbor_alltoallw(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_12Ineighbor_allgather(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_14Ineighbor_allgatherv(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_16Ineighbor_alltoall(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_18Ineighbor_alltoallv(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_20Ineighbor_alltoallw(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_22neighbor_allgather(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendobj); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_24neighbor_alltoall(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendobj); /* proto */ static int __pyx_pf_6mpi4py_3MPI_8Cartcomm___cinit__(struct PyMPICartcommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_2Get_dim(struct PyMPICartcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_3dim___get__(struct PyMPICartcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_4ndim___get__(struct PyMPICartcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_4Get_topo(struct PyMPICartcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_4topo___get__(struct PyMPICartcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_4dims___get__(struct PyMPICartcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_7periods___get__(struct PyMPICartcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_6coords___get__(struct PyMPICartcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_6Get_cart_rank(struct PyMPICartcommObject *__pyx_v_self, PyObject *__pyx_v_coords); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_8Get_coords(struct PyMPICartcommObject *__pyx_v_self, int __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_10Shift(struct PyMPICartcommObject *__pyx_v_self, int __pyx_v_direction, int __pyx_v_disp); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_12Sub(struct PyMPICartcommObject *__pyx_v_self, PyObject *__pyx_v_remain_dims); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_22Compute_dims(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nnodes, PyObject *__pyx_v_dims); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9Graphcomm___cinit__(struct PyMPIGraphcommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_2Get_dims(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_4dims___get__(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_6nnodes___get__(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_6nedges___get__(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_4Get_topo(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_4topo___get__(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_5index___get__(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_5edges___get__(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_6Get_neighbors_count(struct PyMPIGraphcommObject *__pyx_v_self, int __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_10nneighbors___get__(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_8Get_neighbors(struct PyMPIGraphcommObject *__pyx_v_self, int __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_9neighbors___get__(struct PyMPIGraphcommObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_13Distgraphcomm___cinit__(struct PyMPIDistgraphcommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_13Distgraphcomm_2Get_dist_neighbors_count(struct PyMPIDistgraphcommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_13Distgraphcomm_4Get_dist_neighbors(struct PyMPIDistgraphcommObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_9Intercomm___cinit__(struct PyMPIIntercommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_2Get_remote_group(struct PyMPIIntercommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_12remote_group___get__(struct PyMPIIntercommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_4Get_remote_size(struct PyMPIIntercommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_11remote_size___get__(struct PyMPIIntercommObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_6Merge(struct PyMPIIntercommObject *__pyx_v_self, int __pyx_v_high); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_24Attach_buffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_26Detach_buffer(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_28Open_port(CYTHON_UNUSED PyObject *__pyx_self, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_30Close_port(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_port_name); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_32Publish_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_service_name, PyObject *__pyx_v_port_name, PyObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_34Unpublish_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_service_name, PyObject *__pyx_v_port_name, PyObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_36Lookup_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_service_name, PyObject *__pyx_v_info); /* proto */ static int __pyx_pf_6mpi4py_3MPI_3Win___cinit__(struct PyMPIWinObject *__pyx_v_self, struct PyMPIWinObject *__pyx_v_win); /* proto */ static void __pyx_pf_6mpi4py_3MPI_3Win_2__dealloc__(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_4__richcmp__(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_3Win_6__bool__(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_8Create(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_memory, int __pyx_v_disp_unit, struct PyMPIInfoObject *__pyx_v_info, struct PyMPIIntracommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_10Allocate(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, MPI_Aint __pyx_v_size, int __pyx_v_disp_unit, struct PyMPIInfoObject *__pyx_v_info, struct PyMPIIntracommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_12Allocate_shared(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, MPI_Aint __pyx_v_size, int __pyx_v_disp_unit, struct PyMPIInfoObject *__pyx_v_info, struct PyMPIIntracommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_14Shared_query(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_16Create_dynamic(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIInfoObject *__pyx_v_info, struct PyMPIIntracommObject *__pyx_v_comm); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_18Attach(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_memory); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_20Detach(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_memory); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_22Free(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_24Set_info(struct PyMPIWinObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_26Get_info(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_4info___get__(struct PyMPIWinObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_3Win_4info_2__set__(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_28Get_group(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_5group___get__(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_30Get_attr(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_keyval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_32Set_attr(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_keyval, PyObject *__pyx_v_attrval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_34Delete_attr(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_keyval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_36Create_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_copy_fn, PyObject *__pyx_v_delete_fn, PyObject *__pyx_v_nopython); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_38Free_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_keyval); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_5attrs___get__(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_6flavor___get__(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_5model___get__(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_40tomemory(struct PyMPIWinObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_3Win_42__getbuffer__(struct PyMPIWinObject *__pyx_v_self, Py_buffer *__pyx_v_view, int __pyx_v_flags); /* proto */ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_3Win_44__getsegcount__(struct PyMPIWinObject *__pyx_v_self, Py_ssize_t *__pyx_v_lenp); /* proto */ #endif #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_3Win_46__getreadbuffer__(struct PyMPIWinObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_bufp); /* proto */ #endif #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_3Win_48__getwritebuffer__(struct PyMPIWinObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_bufp); /* proto */ #endif static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_50Put(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_52Get(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_54Accumulate(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_56Get_accumulate(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_target_rank, PyObject *__pyx_v_target, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_58Fetch_and_op(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_target_rank, MPI_Aint __pyx_v_target_disp, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_60Compare_and_swap(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_compare, PyObject *__pyx_v_result, int __pyx_v_target_rank, MPI_Aint __pyx_v_target_disp); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_62Rput(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_64Rget(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_66Raccumulate(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_68Rget_accumulate(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_target_rank, PyObject *__pyx_v_target, struct PyMPIOpObject *__pyx_v_op); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_70Fence(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_assertion); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_72Start(struct PyMPIWinObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group, int __pyx_v_assertion); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_74Complete(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_76Post(struct PyMPIWinObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group, int __pyx_v_assertion); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_78Wait(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_80Test(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_82Lock(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank, int __pyx_v_lock_type, int __pyx_v_assertion); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_84Unlock(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_86Lock_all(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_assertion); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_88Unlock_all(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_90Flush(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_92Flush_all(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_94Flush_local(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_96Flush_local_all(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_98Sync(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_100Get_errhandler(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_102Set_errhandler(struct PyMPIWinObject *__pyx_v_self, struct PyMPIErrhandlerObject *__pyx_v_errhandler); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_104Call_errhandler(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_errorcode); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_106Get_name(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_108Set_name(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_4name___get__(struct PyMPIWinObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_3Win_4name_2__set__(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_110py2f(struct PyMPIWinObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_112f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4File___cinit__(struct PyMPIFileObject *__pyx_v_self, struct PyMPIFileObject *__pyx_v_file); /* proto */ static void __pyx_pf_6mpi4py_3MPI_4File_2__dealloc__(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_4__richcmp__(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4File_6__bool__(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_8Open(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIIntracommObject *__pyx_v_comm, PyObject *__pyx_v_filename, int __pyx_v_amode, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_10Close(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_12Delete(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_filename, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_14Set_size(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_16Preallocate(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_size); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_18Get_size(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_4size___get__(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_20Get_amode(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_5amode___get__(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_22Get_group(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_5group___get__(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_24Set_info(struct PyMPIFileObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_26Get_info(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_4info___get__(struct PyMPIFileObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4File_4info_2__set__(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_28Set_view(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_disp, struct PyMPIDatatypeObject *__pyx_v_etype, struct PyMPIDatatypeObject *__pyx_v_filetype, PyObject *__pyx_v_datarep, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_30Get_view(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_32Read_at(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_34Read_at_all(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_36Write_at(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_38Write_at_all(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_40Iread_at(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_42Iread_at_all(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_44Iwrite_at(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_46Iwrite_at_all(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_48Read(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_50Read_all(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_52Write(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_54Write_all(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_56Iread(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_58Iread_all(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_60Iwrite(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_62Iwrite_all(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_64Seek(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, int __pyx_v_whence); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_66Get_position(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_68Get_byte_offset(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_70Read_shared(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_72Write_shared(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_74Iread_shared(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_76Iwrite_shared(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_78Read_ordered(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_80Write_ordered(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_82Seek_shared(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, int __pyx_v_whence); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_84Get_position_shared(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_86Read_at_all_begin(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_88Read_at_all_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_90Write_at_all_begin(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_92Write_at_all_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_94Read_all_begin(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_96Read_all_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_98Write_all_begin(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_100Write_all_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_102Read_ordered_begin(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_104Read_ordered_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_106Write_ordered_begin(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_108Write_ordered_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_110Get_type_extent(struct PyMPIFileObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_112Set_atomicity(struct PyMPIFileObject *__pyx_v_self, int __pyx_v_flag); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_114Get_atomicity(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_9atomicity___get__(struct PyMPIFileObject *__pyx_v_self); /* proto */ static int __pyx_pf_6mpi4py_3MPI_4File_9atomicity_2__set__(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_116Sync(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_118Get_errhandler(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_120Set_errhandler(struct PyMPIFileObject *__pyx_v_self, struct PyMPIErrhandlerObject *__pyx_v_errhandler); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_122Call_errhandler(struct PyMPIFileObject *__pyx_v_self, int __pyx_v_errorcode); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_124py2f(struct PyMPIFileObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_4File_126f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_38Register_datarep(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datarep, PyObject *__pyx_v_read_fn, PyObject *__pyx_v_write_fn, PyObject *__pyx_v_extent_fn); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_40Alloc_mem(CYTHON_UNUSED PyObject *__pyx_self, MPI_Aint __pyx_v_size, struct PyMPIInfoObject *__pyx_v_info); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_42Free_mem(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mem); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_44Init(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_46Finalize(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_48Init_thread(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_required); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_50Query_thread(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_52Is_thread_main(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_54Is_initialized(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_56Is_finalized(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_58Get_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_60Get_library_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_62Get_processor_name(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_64Wtime(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_66Wtick(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_68Pcontrol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_level); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_70get_vendor(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_72_sizeof(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_74_addressof(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_6mpi4py_3MPI_76_handleof(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Status(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Datatype(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Request(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Prequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Grequest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Message(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Op(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Group(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Info(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Errhandler(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Comm(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Intracomm(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Topocomm(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Cartcomm(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Graphcomm(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Distgraphcomm(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Intercomm(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Win(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_File(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_memory(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_mem(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_greq(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_datarep(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_keyval(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_message(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_p2p(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_cco(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_ccow(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_rma(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_io(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6mpi4py_3MPI_Pickle(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get = {0, &__pyx_n_s_get, 0, 0, 0}; static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0}; static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_index = {0, &__pyx_n_s_index, 0, 0, 0}; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_neg_1; static int __pyx_k__26; static int __pyx_k__27; static struct PyMPIDatatypeObject *__pyx_k__28; static int __pyx_k__29; static int __pyx_k__30; static int __pyx_k__31; static int __pyx_k__32; static int __pyx_k__33; static int __pyx_k__34; static int __pyx_k__35; static int __pyx_k__36; static struct PyMPIInfoObject *__pyx_k__38; static int __pyx_k__39; static int __pyx_k__40; static int __pyx_k__41; static int __pyx_k__42; static int __pyx_k__43; static int __pyx_k__44; static int __pyx_k__45; static int __pyx_k__46; static int __pyx_k__47; static int __pyx_k__48; static int __pyx_k__49; static int __pyx_k__50; static int __pyx_k__51; static int __pyx_k__52; static int __pyx_k__53; static int __pyx_k__54; static int __pyx_k__55; static int __pyx_k__56; static struct PyMPIOpObject *__pyx_k__57; static struct PyMPIOpObject *__pyx_k__58; static struct PyMPIOpObject *__pyx_k__59; static struct PyMPIOpObject *__pyx_k__60; static struct PyMPIOpObject *__pyx_k__61; static struct PyMPIOpObject *__pyx_k__62; static struct PyMPIOpObject *__pyx_k__63; static struct PyMPIOpObject *__pyx_k__64; static int __pyx_k__65; static int __pyx_k__66; static int __pyx_k__67; static int __pyx_k__68; static int __pyx_k__69; static int __pyx_k__70; static int __pyx_k__71; static int __pyx_k__72; static int __pyx_k__73; static int __pyx_k__74; static int __pyx_k__75; static int __pyx_k__76; static int __pyx_k__77; static int __pyx_k__78; static PyObject *__pyx_k__79; static PyObject *__pyx_k__80; static struct PyMPIInfoObject *__pyx_k__82; static struct PyMPIInfoObject *__pyx_k__83; static struct PyMPIOpObject *__pyx_k__84; static struct PyMPIOpObject *__pyx_k__85; static struct PyMPIOpObject *__pyx_k__86; static struct PyMPIOpObject *__pyx_k__87; static PyObject *__pyx_k__88; static PyObject *__pyx_k__89; static struct PyMPIInfoObject *__pyx_k__90; static PyObject *__pyx_k__92; static struct PyMPIInfoObject *__pyx_k__93; static struct PyMPIInfoObject *__pyx_k__94; static struct PyMPIInfoObject *__pyx_k__102; static PyObject *__pyx_k__103; static PyObject *__pyx_k__104; static PyObject *__pyx_k__105; static struct PyMPIInfoObject *__pyx_k__106; static struct PyMPIIntracommObject *__pyx_k__107; static struct PyMPIInfoObject *__pyx_k__108; static struct PyMPIIntracommObject *__pyx_k__109; static struct PyMPIInfoObject *__pyx_k__110; static struct PyMPIIntracommObject *__pyx_k__111; static struct PyMPIInfoObject *__pyx_k__112; static struct PyMPIIntracommObject *__pyx_k__113; static struct PyMPIOpObject *__pyx_k__114; static struct PyMPIOpObject *__pyx_k__115; static struct PyMPIOpObject *__pyx_k__116; static struct PyMPIOpObject *__pyx_k__117; static struct PyMPIOpObject *__pyx_k__118; static int __pyx_k__119; static struct PyMPIInfoObject *__pyx_k__120; static int __pyx_k__121; static struct PyMPIInfoObject *__pyx_k__122; static struct PyMPIInfoObject *__pyx_k__123; static int __pyx_k__124; static int __pyx_k__125; static struct PyMPIInfoObject *__pyx_k__126; static int __pyx_k__127; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; static PyObject *__pyx_slice__91; static PyObject *__pyx_slice__96; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__81; static PyObject *__pyx_tuple__95; static PyObject *__pyx_tuple__97; static PyObject *__pyx_tuple__98; static PyObject *__pyx_tuple__99; static PyObject *__pyx_tuple__100; static PyObject *__pyx_tuple__101; static PyObject *__pyx_tuple__128; static PyObject *__pyx_tuple__129; static PyObject *__pyx_tuple__130; static PyObject *__pyx_tuple__132; static PyObject *__pyx_tuple__134; static PyObject *__pyx_tuple__136; static PyObject *__pyx_tuple__138; static PyObject *__pyx_tuple__139; static PyObject *__pyx_tuple__141; static PyObject *__pyx_tuple__143; static PyObject *__pyx_tuple__145; static PyObject *__pyx_tuple__147; static PyObject *__pyx_tuple__149; static PyObject *__pyx_tuple__151; static PyObject *__pyx_tuple__153; static PyObject *__pyx_tuple__155; static PyObject *__pyx_tuple__157; static PyObject *__pyx_tuple__159; static PyObject *__pyx_tuple__161; static PyObject *__pyx_tuple__163; static PyObject *__pyx_tuple__165; static PyObject *__pyx_tuple__167; static PyObject *__pyx_tuple__169; static PyObject *__pyx_tuple__171; static PyObject *__pyx_tuple__173; static PyObject *__pyx_tuple__175; static PyObject *__pyx_tuple__177; static PyObject *__pyx_tuple__179; static PyObject *__pyx_tuple__181; static PyObject *__pyx_tuple__183; static PyObject *__pyx_tuple__185; static PyObject *__pyx_tuple__187; static PyObject *__pyx_tuple__189; static PyObject *__pyx_tuple__191; static PyObject *__pyx_tuple__193; static PyObject *__pyx_tuple__195; static PyObject *__pyx_tuple__197; static PyObject *__pyx_tuple__199; static PyObject *__pyx_tuple__201; static PyObject *__pyx_tuple__203; static PyObject *__pyx_tuple__205; static PyObject *__pyx_tuple__207; static PyObject *__pyx_tuple__211; static PyObject *__pyx_tuple__213; static PyObject *__pyx_tuple__215; static PyObject *__pyx_tuple__217; static PyObject *__pyx_tuple__219; static PyObject *__pyx_tuple__221; static PyObject *__pyx_tuple__223; static PyObject *__pyx_tuple__225; static PyObject *__pyx_tuple__229; static PyObject *__pyx_tuple__231; static PyObject *__pyx_tuple__233; static PyObject *__pyx_tuple__235; static PyObject *__pyx_tuple__237; static PyObject *__pyx_codeobj__131; static PyObject *__pyx_codeobj__133; static PyObject *__pyx_codeobj__135; static PyObject *__pyx_codeobj__137; static PyObject *__pyx_codeobj__140; static PyObject *__pyx_codeobj__142; static PyObject *__pyx_codeobj__144; static PyObject *__pyx_codeobj__146; static PyObject *__pyx_codeobj__148; static PyObject *__pyx_codeobj__150; static PyObject *__pyx_codeobj__152; static PyObject *__pyx_codeobj__154; static PyObject *__pyx_codeobj__156; static PyObject *__pyx_codeobj__158; static PyObject *__pyx_codeobj__160; static PyObject *__pyx_codeobj__162; static PyObject *__pyx_codeobj__164; static PyObject *__pyx_codeobj__166; static PyObject *__pyx_codeobj__168; static PyObject *__pyx_codeobj__170; static PyObject *__pyx_codeobj__172; static PyObject *__pyx_codeobj__174; static PyObject *__pyx_codeobj__176; static PyObject *__pyx_codeobj__178; static PyObject *__pyx_codeobj__180; static PyObject *__pyx_codeobj__182; static PyObject *__pyx_codeobj__184; static PyObject *__pyx_codeobj__186; static PyObject *__pyx_codeobj__188; static PyObject *__pyx_codeobj__190; static PyObject *__pyx_codeobj__192; static PyObject *__pyx_codeobj__194; static PyObject *__pyx_codeobj__196; static PyObject *__pyx_codeobj__198; static PyObject *__pyx_codeobj__200; static PyObject *__pyx_codeobj__202; static PyObject *__pyx_codeobj__204; static PyObject *__pyx_codeobj__206; static PyObject *__pyx_codeobj__208; static PyObject *__pyx_codeobj__209; static PyObject *__pyx_codeobj__210; static PyObject *__pyx_codeobj__212; static PyObject *__pyx_codeobj__214; static PyObject *__pyx_codeobj__216; static PyObject *__pyx_codeobj__218; static PyObject *__pyx_codeobj__220; static PyObject *__pyx_codeobj__222; static PyObject *__pyx_codeobj__224; static PyObject *__pyx_codeobj__226; static PyObject *__pyx_codeobj__227; static PyObject *__pyx_codeobj__228; static PyObject *__pyx_codeobj__230; static PyObject *__pyx_codeobj__232; static PyObject *__pyx_codeobj__234; static PyObject *__pyx_codeobj__236; static PyObject *__pyx_codeobj__238; /* Late includes */ /* "mpi4py/MPI/atimport.pxi":45 * options.errors = 1 * * cdef int warnOpt(object name, object value) except -1: # <<<<<<<<<<<<<< * cdef object warn * from warnings import warn */ static int __pyx_f_6mpi4py_3MPI_warnOpt(PyObject *__pyx_v_name, PyObject *__pyx_v_value) { PyObject *__pyx_v_warn = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("warnOpt", 0); /* "mpi4py/MPI/atimport.pxi":47 * cdef int warnOpt(object name, object value) except -1: * cdef object warn * from warnings import warn # <<<<<<<<<<<<<< * warn("mpi4py.rc: '%s': unexpected value '%r'" % (name, value)) * */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_warn); __Pyx_GIVEREF(__pyx_n_s_warn); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_warn); __pyx_t_2 = __Pyx_Import(__pyx_n_s_warnings, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_warn); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_warn = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/atimport.pxi":48 * cdef object warn * from warnings import warn * warn("mpi4py.rc: '%s': unexpected value '%r'" % (name, value)) # <<<<<<<<<<<<<< * * cdef int getOptions(Options* opts) except -1: */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_name); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_value); __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_mpi4py_rc_s_unexpected_value_r, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_v_warn); __pyx_t_1 = __pyx_v_warn; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/atimport.pxi":45 * options.errors = 1 * * cdef int warnOpt(object name, object value) except -1: # <<<<<<<<<<<<<< * cdef object warn * from warnings import warn */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.warnOpt", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_warn); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/atimport.pxi":50 * warn("mpi4py.rc: '%s': unexpected value '%r'" % (name, value)) * * cdef int getOptions(Options* opts) except -1: # <<<<<<<<<<<<<< * cdef object rc * opts.initialize = 1 */ static int __pyx_f_6mpi4py_3MPI_getOptions(__pyx_t_6mpi4py_3MPI_Options *__pyx_v_opts) { PyObject *__pyx_v_rc = 0; PyObject *__pyx_v_initialize = 0; PyObject *__pyx_v_threads = 0; PyObject *__pyx_v_thread_level = 0; PyObject *__pyx_v_finalize = 0; PyObject *__pyx_v_fast_reduce = 0; PyObject *__pyx_v_recv_mprobe = 0; PyObject *__pyx_v_errors = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; __Pyx_RefNannySetupContext("getOptions", 0); /* "mpi4py/MPI/atimport.pxi":52 * cdef int getOptions(Options* opts) except -1: * cdef object rc * opts.initialize = 1 # <<<<<<<<<<<<<< * opts.threads = 1 * opts.thread_level = MPI_THREAD_MULTIPLE */ __pyx_v_opts->initialize = 1; /* "mpi4py/MPI/atimport.pxi":53 * cdef object rc * opts.initialize = 1 * opts.threads = 1 # <<<<<<<<<<<<<< * opts.thread_level = MPI_THREAD_MULTIPLE * opts.finalize = 1 */ __pyx_v_opts->threads = 1; /* "mpi4py/MPI/atimport.pxi":54 * opts.initialize = 1 * opts.threads = 1 * opts.thread_level = MPI_THREAD_MULTIPLE # <<<<<<<<<<<<<< * opts.finalize = 1 * opts.fast_reduce = 1 */ __pyx_v_opts->thread_level = MPI_THREAD_MULTIPLE; /* "mpi4py/MPI/atimport.pxi":55 * opts.threads = 1 * opts.thread_level = MPI_THREAD_MULTIPLE * opts.finalize = 1 # <<<<<<<<<<<<<< * opts.fast_reduce = 1 * opts.recv_mprobe = 1 */ __pyx_v_opts->finalize = 1; /* "mpi4py/MPI/atimport.pxi":56 * opts.thread_level = MPI_THREAD_MULTIPLE * opts.finalize = 1 * opts.fast_reduce = 1 # <<<<<<<<<<<<<< * opts.recv_mprobe = 1 * opts.errors = 1 */ __pyx_v_opts->fast_reduce = 1; /* "mpi4py/MPI/atimport.pxi":57 * opts.finalize = 1 * opts.fast_reduce = 1 * opts.recv_mprobe = 1 # <<<<<<<<<<<<<< * opts.errors = 1 * try: from mpi4py import rc */ __pyx_v_opts->recv_mprobe = 1; /* "mpi4py/MPI/atimport.pxi":58 * opts.fast_reduce = 1 * opts.recv_mprobe = 1 * opts.errors = 1 # <<<<<<<<<<<<<< * try: from mpi4py import rc * except: return 0 */ __pyx_v_opts->errors = 1; /* "mpi4py/MPI/atimport.pxi":59 * opts.recv_mprobe = 1 * opts.errors = 1 * try: from mpi4py import rc # <<<<<<<<<<<<<< * except: return 0 * # */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 59, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_rc); __Pyx_GIVEREF(__pyx_n_s_rc); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_rc); __pyx_t_5 = __Pyx_Import(__pyx_n_s_mpi4py, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(9, 59, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_rc); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 59, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_4); __pyx_v_rc = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/atimport.pxi":60 * opts.errors = 1 * try: from mpi4py import rc * except: return 0 # <<<<<<<<<<<<<< * # * cdef object initialize = True */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.getOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(9, 60, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __pyx_r = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_except_return; } __pyx_L5_except_error:; /* "mpi4py/MPI/atimport.pxi":59 * opts.recv_mprobe = 1 * opts.errors = 1 * try: from mpi4py import rc # <<<<<<<<<<<<<< * except: return 0 * # */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L8_try_end:; } /* "mpi4py/MPI/atimport.pxi":62 * except: return 0 * # * cdef object initialize = True # <<<<<<<<<<<<<< * cdef object threads = True * cdef object thread_level = 'multiple' */ __Pyx_INCREF(Py_True); __pyx_v_initialize = Py_True; /* "mpi4py/MPI/atimport.pxi":63 * # * cdef object initialize = True * cdef object threads = True # <<<<<<<<<<<<<< * cdef object thread_level = 'multiple' * cdef object finalize = None */ __Pyx_INCREF(Py_True); __pyx_v_threads = Py_True; /* "mpi4py/MPI/atimport.pxi":64 * cdef object initialize = True * cdef object threads = True * cdef object thread_level = 'multiple' # <<<<<<<<<<<<<< * cdef object finalize = None * cdef object fast_reduce = True */ __Pyx_INCREF(__pyx_n_s_multiple); __pyx_v_thread_level = __pyx_n_s_multiple; /* "mpi4py/MPI/atimport.pxi":65 * cdef object threads = True * cdef object thread_level = 'multiple' * cdef object finalize = None # <<<<<<<<<<<<<< * cdef object fast_reduce = True * cdef object recv_mprobe = True */ __Pyx_INCREF(Py_None); __pyx_v_finalize = Py_None; /* "mpi4py/MPI/atimport.pxi":66 * cdef object thread_level = 'multiple' * cdef object finalize = None * cdef object fast_reduce = True # <<<<<<<<<<<<<< * cdef object recv_mprobe = True * cdef object errors = 'exception' */ __Pyx_INCREF(Py_True); __pyx_v_fast_reduce = Py_True; /* "mpi4py/MPI/atimport.pxi":67 * cdef object finalize = None * cdef object fast_reduce = True * cdef object recv_mprobe = True # <<<<<<<<<<<<<< * cdef object errors = 'exception' * try: initialize = rc.initialize */ __Pyx_INCREF(Py_True); __pyx_v_recv_mprobe = Py_True; /* "mpi4py/MPI/atimport.pxi":68 * cdef object fast_reduce = True * cdef object recv_mprobe = True * cdef object errors = 'exception' # <<<<<<<<<<<<<< * try: initialize = rc.initialize * except: pass */ __Pyx_INCREF(__pyx_n_s_exception); __pyx_v_errors = __pyx_n_s_exception; /* "mpi4py/MPI/atimport.pxi":69 * cdef object recv_mprobe = True * cdef object errors = 'exception' * try: initialize = rc.initialize # <<<<<<<<<<<<<< * except: pass * try: threads = rc.threads */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_rc, __pyx_n_s_initialize); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 69, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_initialize, __pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L16_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/atimport.pxi":70 * cdef object errors = 'exception' * try: initialize = rc.initialize * except: pass # <<<<<<<<<<<<<< * try: threads = rc.threads * except: pass */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L12_exception_handled; } __pyx_L12_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L16_try_end:; } /* "mpi4py/MPI/atimport.pxi":71 * try: initialize = rc.initialize * except: pass * try: threads = rc.threads # <<<<<<<<<<<<<< * except: pass * try: threads = rc.threaded # backward */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_rc, __pyx_n_s_threads); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 71, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_threads, __pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L22_try_end; __pyx_L17_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/atimport.pxi":72 * except: pass * try: threads = rc.threads * except: pass # <<<<<<<<<<<<<< * try: threads = rc.threaded # backward * except: pass # compatibility */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L18_exception_handled; } __pyx_L18_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L22_try_end:; } /* "mpi4py/MPI/atimport.pxi":73 * try: threads = rc.threads * except: pass * try: threads = rc.threaded # backward # <<<<<<<<<<<<<< * except: pass # compatibility * try: thread_level = rc.thread_level */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_rc, __pyx_n_s_threaded); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 73, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_threads, __pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L28_try_end; __pyx_L23_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/atimport.pxi":74 * except: pass * try: threads = rc.threaded # backward * except: pass # compatibility # <<<<<<<<<<<<<< * try: thread_level = rc.thread_level * except: pass */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L24_exception_handled; } __pyx_L24_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L28_try_end:; } /* "mpi4py/MPI/atimport.pxi":75 * try: threads = rc.threaded # backward * except: pass # compatibility * try: thread_level = rc.thread_level # <<<<<<<<<<<<<< * except: pass * try: finalize = rc.finalize */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_rc, __pyx_n_s_thread_level); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 75, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_thread_level, __pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L34_try_end; __pyx_L29_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/atimport.pxi":76 * except: pass # compatibility * try: thread_level = rc.thread_level * except: pass # <<<<<<<<<<<<<< * try: finalize = rc.finalize * except: pass */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L30_exception_handled; } __pyx_L30_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L34_try_end:; } /* "mpi4py/MPI/atimport.pxi":77 * try: thread_level = rc.thread_level * except: pass * try: finalize = rc.finalize # <<<<<<<<<<<<<< * except: pass * try: fast_reduce = rc.fast_reduce */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_rc, __pyx_n_s_finalize); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 77, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_finalize, __pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L40_try_end; __pyx_L35_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/atimport.pxi":78 * except: pass * try: finalize = rc.finalize * except: pass # <<<<<<<<<<<<<< * try: fast_reduce = rc.fast_reduce * except: pass */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L36_exception_handled; } __pyx_L36_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L40_try_end:; } /* "mpi4py/MPI/atimport.pxi":79 * try: finalize = rc.finalize * except: pass * try: fast_reduce = rc.fast_reduce # <<<<<<<<<<<<<< * except: pass * try: recv_mprobe = rc.recv_mprobe */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_rc, __pyx_n_s_fast_reduce); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 79, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_fast_reduce, __pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L46_try_end; __pyx_L41_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/atimport.pxi":80 * except: pass * try: fast_reduce = rc.fast_reduce * except: pass # <<<<<<<<<<<<<< * try: recv_mprobe = rc.recv_mprobe * except: pass */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L42_exception_handled; } __pyx_L42_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L46_try_end:; } /* "mpi4py/MPI/atimport.pxi":81 * try: fast_reduce = rc.fast_reduce * except: pass * try: recv_mprobe = rc.recv_mprobe # <<<<<<<<<<<<<< * except: pass * try: errors = rc.errors */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_rc, __pyx_n_s_recv_mprobe); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 81, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_recv_mprobe, __pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L52_try_end; __pyx_L47_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/atimport.pxi":82 * except: pass * try: recv_mprobe = rc.recv_mprobe * except: pass # <<<<<<<<<<<<<< * try: errors = rc.errors * except: pass */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L48_exception_handled; } __pyx_L48_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_L52_try_end:; } /* "mpi4py/MPI/atimport.pxi":83 * try: recv_mprobe = rc.recv_mprobe * except: pass * try: errors = rc.errors # <<<<<<<<<<<<<< * except: pass * # */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_rc, __pyx_n_s_errors); if (unlikely(!__pyx_t_6)) __PYX_ERR(9, 83, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_errors, __pyx_t_6); __pyx_t_6 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L58_try_end; __pyx_L53_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/atimport.pxi":84 * except: pass * try: errors = rc.errors * except: pass # <<<<<<<<<<<<<< * # * if initialize in (True, 'yes'): */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L54_exception_handled; } __pyx_L54_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L58_try_end:; } /* "mpi4py/MPI/atimport.pxi":86 * except: pass * # * if initialize in (True, 'yes'): # <<<<<<<<<<<<<< * opts.initialize = 1 * elif initialize in (False, 'no'): */ __Pyx_INCREF(__pyx_v_initialize); __pyx_t_6 = __pyx_v_initialize; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 86, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L60_bool_binop_done; } __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_yes, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 86, __pyx_L1_error) __pyx_t_7 = __pyx_t_8; __pyx_L60_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "mpi4py/MPI/atimport.pxi":87 * # * if initialize in (True, 'yes'): * opts.initialize = 1 # <<<<<<<<<<<<<< * elif initialize in (False, 'no'): * opts.initialize = 0 */ __pyx_v_opts->initialize = 1; /* "mpi4py/MPI/atimport.pxi":86 * except: pass * # * if initialize in (True, 'yes'): # <<<<<<<<<<<<<< * opts.initialize = 1 * elif initialize in (False, 'no'): */ goto __pyx_L59; } /* "mpi4py/MPI/atimport.pxi":88 * if initialize in (True, 'yes'): * opts.initialize = 1 * elif initialize in (False, 'no'): # <<<<<<<<<<<<<< * opts.initialize = 0 * else: */ __Pyx_INCREF(__pyx_v_initialize); __pyx_t_6 = __pyx_v_initialize; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 88, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_7) { } else { __pyx_t_8 = __pyx_t_7; goto __pyx_L62_bool_binop_done; } __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_no, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 88, __pyx_L1_error) __pyx_t_8 = __pyx_t_7; __pyx_L62_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { /* "mpi4py/MPI/atimport.pxi":89 * opts.initialize = 1 * elif initialize in (False, 'no'): * opts.initialize = 0 # <<<<<<<<<<<<<< * else: * warnOpt("initialize", initialize) */ __pyx_v_opts->initialize = 0; /* "mpi4py/MPI/atimport.pxi":88 * if initialize in (True, 'yes'): * opts.initialize = 1 * elif initialize in (False, 'no'): # <<<<<<<<<<<<<< * opts.initialize = 0 * else: */ goto __pyx_L59; } /* "mpi4py/MPI/atimport.pxi":91 * opts.initialize = 0 * else: * warnOpt("initialize", initialize) # <<<<<<<<<<<<<< * # * if threads in (True, 'yes'): */ /*else*/ { __pyx_t_9 = __pyx_f_6mpi4py_3MPI_warnOpt(__pyx_n_s_initialize, __pyx_v_initialize); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(9, 91, __pyx_L1_error) } __pyx_L59:; /* "mpi4py/MPI/atimport.pxi":93 * warnOpt("initialize", initialize) * # * if threads in (True, 'yes'): # <<<<<<<<<<<<<< * opts.threads = 1 * elif threads in (False, 'no'): */ __Pyx_INCREF(__pyx_v_threads); __pyx_t_6 = __pyx_v_threads; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 93, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L65_bool_binop_done; } __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_yes, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 93, __pyx_L1_error) __pyx_t_7 = __pyx_t_8; __pyx_L65_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "mpi4py/MPI/atimport.pxi":94 * # * if threads in (True, 'yes'): * opts.threads = 1 # <<<<<<<<<<<<<< * elif threads in (False, 'no'): * opts.threads = 0 */ __pyx_v_opts->threads = 1; /* "mpi4py/MPI/atimport.pxi":93 * warnOpt("initialize", initialize) * # * if threads in (True, 'yes'): # <<<<<<<<<<<<<< * opts.threads = 1 * elif threads in (False, 'no'): */ goto __pyx_L64; } /* "mpi4py/MPI/atimport.pxi":95 * if threads in (True, 'yes'): * opts.threads = 1 * elif threads in (False, 'no'): # <<<<<<<<<<<<<< * opts.threads = 0 * else: */ __Pyx_INCREF(__pyx_v_threads); __pyx_t_6 = __pyx_v_threads; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 95, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_7) { } else { __pyx_t_8 = __pyx_t_7; goto __pyx_L67_bool_binop_done; } __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_no, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 95, __pyx_L1_error) __pyx_t_8 = __pyx_t_7; __pyx_L67_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { /* "mpi4py/MPI/atimport.pxi":96 * opts.threads = 1 * elif threads in (False, 'no'): * opts.threads = 0 # <<<<<<<<<<<<<< * else: * warnOpt("threads", threads) */ __pyx_v_opts->threads = 0; /* "mpi4py/MPI/atimport.pxi":95 * if threads in (True, 'yes'): * opts.threads = 1 * elif threads in (False, 'no'): # <<<<<<<<<<<<<< * opts.threads = 0 * else: */ goto __pyx_L64; } /* "mpi4py/MPI/atimport.pxi":98 * opts.threads = 0 * else: * warnOpt("threads", threads) # <<<<<<<<<<<<<< * # * if thread_level == 'single': */ /*else*/ { __pyx_t_9 = __pyx_f_6mpi4py_3MPI_warnOpt(__pyx_n_s_threads, __pyx_v_threads); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(9, 98, __pyx_L1_error) } __pyx_L64:; /* "mpi4py/MPI/atimport.pxi":100 * warnOpt("threads", threads) * # * if thread_level == 'single': # <<<<<<<<<<<<<< * opts.thread_level = MPI_THREAD_SINGLE * elif thread_level == 'funneled': */ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_thread_level, __pyx_n_s_single, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 100, __pyx_L1_error) if (__pyx_t_7) { /* "mpi4py/MPI/atimport.pxi":101 * # * if thread_level == 'single': * opts.thread_level = MPI_THREAD_SINGLE # <<<<<<<<<<<<<< * elif thread_level == 'funneled': * opts.thread_level = MPI_THREAD_FUNNELED */ __pyx_v_opts->thread_level = MPI_THREAD_SINGLE; /* "mpi4py/MPI/atimport.pxi":100 * warnOpt("threads", threads) * # * if thread_level == 'single': # <<<<<<<<<<<<<< * opts.thread_level = MPI_THREAD_SINGLE * elif thread_level == 'funneled': */ goto __pyx_L69; } /* "mpi4py/MPI/atimport.pxi":102 * if thread_level == 'single': * opts.thread_level = MPI_THREAD_SINGLE * elif thread_level == 'funneled': # <<<<<<<<<<<<<< * opts.thread_level = MPI_THREAD_FUNNELED * elif thread_level == 'serialized': */ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_thread_level, __pyx_n_s_funneled, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 102, __pyx_L1_error) if (__pyx_t_7) { /* "mpi4py/MPI/atimport.pxi":103 * opts.thread_level = MPI_THREAD_SINGLE * elif thread_level == 'funneled': * opts.thread_level = MPI_THREAD_FUNNELED # <<<<<<<<<<<<<< * elif thread_level == 'serialized': * opts.thread_level = MPI_THREAD_SERIALIZED */ __pyx_v_opts->thread_level = MPI_THREAD_FUNNELED; /* "mpi4py/MPI/atimport.pxi":102 * if thread_level == 'single': * opts.thread_level = MPI_THREAD_SINGLE * elif thread_level == 'funneled': # <<<<<<<<<<<<<< * opts.thread_level = MPI_THREAD_FUNNELED * elif thread_level == 'serialized': */ goto __pyx_L69; } /* "mpi4py/MPI/atimport.pxi":104 * elif thread_level == 'funneled': * opts.thread_level = MPI_THREAD_FUNNELED * elif thread_level == 'serialized': # <<<<<<<<<<<<<< * opts.thread_level = MPI_THREAD_SERIALIZED * elif thread_level == 'multiple': */ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_thread_level, __pyx_n_s_serialized, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 104, __pyx_L1_error) if (__pyx_t_7) { /* "mpi4py/MPI/atimport.pxi":105 * opts.thread_level = MPI_THREAD_FUNNELED * elif thread_level == 'serialized': * opts.thread_level = MPI_THREAD_SERIALIZED # <<<<<<<<<<<<<< * elif thread_level == 'multiple': * opts.thread_level = MPI_THREAD_MULTIPLE */ __pyx_v_opts->thread_level = MPI_THREAD_SERIALIZED; /* "mpi4py/MPI/atimport.pxi":104 * elif thread_level == 'funneled': * opts.thread_level = MPI_THREAD_FUNNELED * elif thread_level == 'serialized': # <<<<<<<<<<<<<< * opts.thread_level = MPI_THREAD_SERIALIZED * elif thread_level == 'multiple': */ goto __pyx_L69; } /* "mpi4py/MPI/atimport.pxi":106 * elif thread_level == 'serialized': * opts.thread_level = MPI_THREAD_SERIALIZED * elif thread_level == 'multiple': # <<<<<<<<<<<<<< * opts.thread_level = MPI_THREAD_MULTIPLE * else: */ __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_thread_level, __pyx_n_s_multiple, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 106, __pyx_L1_error) if (__pyx_t_7) { /* "mpi4py/MPI/atimport.pxi":107 * opts.thread_level = MPI_THREAD_SERIALIZED * elif thread_level == 'multiple': * opts.thread_level = MPI_THREAD_MULTIPLE # <<<<<<<<<<<<<< * else: * warnOpt("thread_level", thread_level) */ __pyx_v_opts->thread_level = MPI_THREAD_MULTIPLE; /* "mpi4py/MPI/atimport.pxi":106 * elif thread_level == 'serialized': * opts.thread_level = MPI_THREAD_SERIALIZED * elif thread_level == 'multiple': # <<<<<<<<<<<<<< * opts.thread_level = MPI_THREAD_MULTIPLE * else: */ goto __pyx_L69; } /* "mpi4py/MPI/atimport.pxi":109 * opts.thread_level = MPI_THREAD_MULTIPLE * else: * warnOpt("thread_level", thread_level) # <<<<<<<<<<<<<< * # * if finalize is None: */ /*else*/ { __pyx_t_9 = __pyx_f_6mpi4py_3MPI_warnOpt(__pyx_n_s_thread_level, __pyx_v_thread_level); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(9, 109, __pyx_L1_error) } __pyx_L69:; /* "mpi4py/MPI/atimport.pxi":111 * warnOpt("thread_level", thread_level) * # * if finalize is None: # <<<<<<<<<<<<<< * opts.finalize = opts.initialize * elif finalize in (True, 'yes'): */ __pyx_t_7 = (__pyx_v_finalize == Py_None); __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "mpi4py/MPI/atimport.pxi":112 * # * if finalize is None: * opts.finalize = opts.initialize # <<<<<<<<<<<<<< * elif finalize in (True, 'yes'): * opts.finalize = 1 */ __pyx_t_9 = __pyx_v_opts->initialize; __pyx_v_opts->finalize = __pyx_t_9; /* "mpi4py/MPI/atimport.pxi":111 * warnOpt("thread_level", thread_level) * # * if finalize is None: # <<<<<<<<<<<<<< * opts.finalize = opts.initialize * elif finalize in (True, 'yes'): */ goto __pyx_L70; } /* "mpi4py/MPI/atimport.pxi":113 * if finalize is None: * opts.finalize = opts.initialize * elif finalize in (True, 'yes'): # <<<<<<<<<<<<<< * opts.finalize = 1 * elif finalize in (False, 'no'): */ __Pyx_INCREF(__pyx_v_finalize); __pyx_t_6 = __pyx_v_finalize; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 113, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_7) { } else { __pyx_t_8 = __pyx_t_7; goto __pyx_L71_bool_binop_done; } __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_yes, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 113, __pyx_L1_error) __pyx_t_8 = __pyx_t_7; __pyx_L71_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { /* "mpi4py/MPI/atimport.pxi":114 * opts.finalize = opts.initialize * elif finalize in (True, 'yes'): * opts.finalize = 1 # <<<<<<<<<<<<<< * elif finalize in (False, 'no'): * opts.finalize = 0 */ __pyx_v_opts->finalize = 1; /* "mpi4py/MPI/atimport.pxi":113 * if finalize is None: * opts.finalize = opts.initialize * elif finalize in (True, 'yes'): # <<<<<<<<<<<<<< * opts.finalize = 1 * elif finalize in (False, 'no'): */ goto __pyx_L70; } /* "mpi4py/MPI/atimport.pxi":115 * elif finalize in (True, 'yes'): * opts.finalize = 1 * elif finalize in (False, 'no'): # <<<<<<<<<<<<<< * opts.finalize = 0 * else: */ __Pyx_INCREF(__pyx_v_finalize); __pyx_t_6 = __pyx_v_finalize; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 115, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L73_bool_binop_done; } __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_no, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 115, __pyx_L1_error) __pyx_t_7 = __pyx_t_8; __pyx_L73_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "mpi4py/MPI/atimport.pxi":116 * opts.finalize = 1 * elif finalize in (False, 'no'): * opts.finalize = 0 # <<<<<<<<<<<<<< * else: * warnOpt("finalize", finalize) */ __pyx_v_opts->finalize = 0; /* "mpi4py/MPI/atimport.pxi":115 * elif finalize in (True, 'yes'): * opts.finalize = 1 * elif finalize in (False, 'no'): # <<<<<<<<<<<<<< * opts.finalize = 0 * else: */ goto __pyx_L70; } /* "mpi4py/MPI/atimport.pxi":118 * opts.finalize = 0 * else: * warnOpt("finalize", finalize) # <<<<<<<<<<<<<< * # * if fast_reduce in (True, 'yes'): */ /*else*/ { __pyx_t_9 = __pyx_f_6mpi4py_3MPI_warnOpt(__pyx_n_s_finalize, __pyx_v_finalize); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(9, 118, __pyx_L1_error) } __pyx_L70:; /* "mpi4py/MPI/atimport.pxi":120 * warnOpt("finalize", finalize) * # * if fast_reduce in (True, 'yes'): # <<<<<<<<<<<<<< * opts.fast_reduce = 1 * elif fast_reduce in (False, 'no'): */ __Pyx_INCREF(__pyx_v_fast_reduce); __pyx_t_6 = __pyx_v_fast_reduce; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 120, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_7) { } else { __pyx_t_8 = __pyx_t_7; goto __pyx_L76_bool_binop_done; } __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_yes, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 120, __pyx_L1_error) __pyx_t_8 = __pyx_t_7; __pyx_L76_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { /* "mpi4py/MPI/atimport.pxi":121 * # * if fast_reduce in (True, 'yes'): * opts.fast_reduce = 1 # <<<<<<<<<<<<<< * elif fast_reduce in (False, 'no'): * opts.fast_reduce = 0 */ __pyx_v_opts->fast_reduce = 1; /* "mpi4py/MPI/atimport.pxi":120 * warnOpt("finalize", finalize) * # * if fast_reduce in (True, 'yes'): # <<<<<<<<<<<<<< * opts.fast_reduce = 1 * elif fast_reduce in (False, 'no'): */ goto __pyx_L75; } /* "mpi4py/MPI/atimport.pxi":122 * if fast_reduce in (True, 'yes'): * opts.fast_reduce = 1 * elif fast_reduce in (False, 'no'): # <<<<<<<<<<<<<< * opts.fast_reduce = 0 * else: */ __Pyx_INCREF(__pyx_v_fast_reduce); __pyx_t_6 = __pyx_v_fast_reduce; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 122, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L78_bool_binop_done; } __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_no, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 122, __pyx_L1_error) __pyx_t_7 = __pyx_t_8; __pyx_L78_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "mpi4py/MPI/atimport.pxi":123 * opts.fast_reduce = 1 * elif fast_reduce in (False, 'no'): * opts.fast_reduce = 0 # <<<<<<<<<<<<<< * else: * warnOpt("fast_reduce", fast_reduce) */ __pyx_v_opts->fast_reduce = 0; /* "mpi4py/MPI/atimport.pxi":122 * if fast_reduce in (True, 'yes'): * opts.fast_reduce = 1 * elif fast_reduce in (False, 'no'): # <<<<<<<<<<<<<< * opts.fast_reduce = 0 * else: */ goto __pyx_L75; } /* "mpi4py/MPI/atimport.pxi":125 * opts.fast_reduce = 0 * else: * warnOpt("fast_reduce", fast_reduce) # <<<<<<<<<<<<<< * # * if recv_mprobe in (True, 'yes'): */ /*else*/ { __pyx_t_9 = __pyx_f_6mpi4py_3MPI_warnOpt(__pyx_n_s_fast_reduce, __pyx_v_fast_reduce); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(9, 125, __pyx_L1_error) } __pyx_L75:; /* "mpi4py/MPI/atimport.pxi":127 * warnOpt("fast_reduce", fast_reduce) * # * if recv_mprobe in (True, 'yes'): # <<<<<<<<<<<<<< * opts.recv_mprobe = 1 and USE_MATCHED_RECV * elif recv_mprobe in (False, 'no'): */ __Pyx_INCREF(__pyx_v_recv_mprobe); __pyx_t_6 = __pyx_v_recv_mprobe; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 127, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_7) { } else { __pyx_t_8 = __pyx_t_7; goto __pyx_L81_bool_binop_done; } __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_yes, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(9, 127, __pyx_L1_error) __pyx_t_8 = __pyx_t_7; __pyx_L81_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { /* "mpi4py/MPI/atimport.pxi":128 * # * if recv_mprobe in (True, 'yes'): * opts.recv_mprobe = 1 and USE_MATCHED_RECV # <<<<<<<<<<<<<< * elif recv_mprobe in (False, 'no'): * opts.recv_mprobe = 0 */ __pyx_v_opts->recv_mprobe = PyMPI_USE_MATCHED_RECV; /* "mpi4py/MPI/atimport.pxi":127 * warnOpt("fast_reduce", fast_reduce) * # * if recv_mprobe in (True, 'yes'): # <<<<<<<<<<<<<< * opts.recv_mprobe = 1 and USE_MATCHED_RECV * elif recv_mprobe in (False, 'no'): */ goto __pyx_L80; } /* "mpi4py/MPI/atimport.pxi":129 * if recv_mprobe in (True, 'yes'): * opts.recv_mprobe = 1 and USE_MATCHED_RECV * elif recv_mprobe in (False, 'no'): # <<<<<<<<<<<<<< * opts.recv_mprobe = 0 * else: */ __Pyx_INCREF(__pyx_v_recv_mprobe); __pyx_t_6 = __pyx_v_recv_mprobe; __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, Py_False, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 129, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L83_bool_binop_done; } __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_n_s_no, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 129, __pyx_L1_error) __pyx_t_7 = __pyx_t_8; __pyx_L83_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "mpi4py/MPI/atimport.pxi":130 * opts.recv_mprobe = 1 and USE_MATCHED_RECV * elif recv_mprobe in (False, 'no'): * opts.recv_mprobe = 0 # <<<<<<<<<<<<<< * else: * warnOpt("recv_mprobe", recv_mprobe) */ __pyx_v_opts->recv_mprobe = 0; /* "mpi4py/MPI/atimport.pxi":129 * if recv_mprobe in (True, 'yes'): * opts.recv_mprobe = 1 and USE_MATCHED_RECV * elif recv_mprobe in (False, 'no'): # <<<<<<<<<<<<<< * opts.recv_mprobe = 0 * else: */ goto __pyx_L80; } /* "mpi4py/MPI/atimport.pxi":132 * opts.recv_mprobe = 0 * else: * warnOpt("recv_mprobe", recv_mprobe) # <<<<<<<<<<<<<< * # * if errors == 'default': */ /*else*/ { __pyx_t_9 = __pyx_f_6mpi4py_3MPI_warnOpt(__pyx_n_s_recv_mprobe, __pyx_v_recv_mprobe); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(9, 132, __pyx_L1_error) } __pyx_L80:; /* "mpi4py/MPI/atimport.pxi":134 * warnOpt("recv_mprobe", recv_mprobe) * # * if errors == 'default': # <<<<<<<<<<<<<< * opts.errors = 0 * elif errors == 'exception': */ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_errors, __pyx_n_s_default, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 134, __pyx_L1_error) if (__pyx_t_8) { /* "mpi4py/MPI/atimport.pxi":135 * # * if errors == 'default': * opts.errors = 0 # <<<<<<<<<<<<<< * elif errors == 'exception': * opts.errors = 1 */ __pyx_v_opts->errors = 0; /* "mpi4py/MPI/atimport.pxi":134 * warnOpt("recv_mprobe", recv_mprobe) * # * if errors == 'default': # <<<<<<<<<<<<<< * opts.errors = 0 * elif errors == 'exception': */ goto __pyx_L85; } /* "mpi4py/MPI/atimport.pxi":136 * if errors == 'default': * opts.errors = 0 * elif errors == 'exception': # <<<<<<<<<<<<<< * opts.errors = 1 * elif errors == 'fatal': */ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_errors, __pyx_n_s_exception, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 136, __pyx_L1_error) if (__pyx_t_8) { /* "mpi4py/MPI/atimport.pxi":137 * opts.errors = 0 * elif errors == 'exception': * opts.errors = 1 # <<<<<<<<<<<<<< * elif errors == 'fatal': * opts.errors = 2 */ __pyx_v_opts->errors = 1; /* "mpi4py/MPI/atimport.pxi":136 * if errors == 'default': * opts.errors = 0 * elif errors == 'exception': # <<<<<<<<<<<<<< * opts.errors = 1 * elif errors == 'fatal': */ goto __pyx_L85; } /* "mpi4py/MPI/atimport.pxi":138 * elif errors == 'exception': * opts.errors = 1 * elif errors == 'fatal': # <<<<<<<<<<<<<< * opts.errors = 2 * else: */ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_errors, __pyx_n_s_fatal, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 138, __pyx_L1_error) if (__pyx_t_8) { /* "mpi4py/MPI/atimport.pxi":139 * opts.errors = 1 * elif errors == 'fatal': * opts.errors = 2 # <<<<<<<<<<<<<< * else: * warnOpt("errors", errors) */ __pyx_v_opts->errors = 2; /* "mpi4py/MPI/atimport.pxi":138 * elif errors == 'exception': * opts.errors = 1 * elif errors == 'fatal': # <<<<<<<<<<<<<< * opts.errors = 2 * else: */ goto __pyx_L85; } /* "mpi4py/MPI/atimport.pxi":141 * opts.errors = 2 * else: * warnOpt("errors", errors) # <<<<<<<<<<<<<< * # * return 0 */ /*else*/ { __pyx_t_9 = __pyx_f_6mpi4py_3MPI_warnOpt(__pyx_n_s_errors, __pyx_v_errors); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(9, 141, __pyx_L1_error) } __pyx_L85:; /* "mpi4py/MPI/atimport.pxi":143 * warnOpt("errors", errors) * # * return 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":50 * warn("mpi4py.rc: '%s': unexpected value '%r'" % (name, value)) * * cdef int getOptions(Options* opts) except -1: # <<<<<<<<<<<<<< * cdef object rc * opts.initialize = 1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.getOptions", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rc); __Pyx_XDECREF(__pyx_v_initialize); __Pyx_XDECREF(__pyx_v_threads); __Pyx_XDECREF(__pyx_v_thread_level); __Pyx_XDECREF(__pyx_v_finalize); __Pyx_XDECREF(__pyx_v_fast_reduce); __Pyx_XDECREF(__pyx_v_recv_mprobe); __Pyx_XDECREF(__pyx_v_errors); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/atimport.pxi":150 * int PyMPI_Commctx_finalize() nogil * * cdef int bootstrap() except -1: # <<<<<<<<<<<<<< * # Get options from 'mpi4py.rc' module * getOptions(&options) */ static int __pyx_f_6mpi4py_3MPI_bootstrap(void) { int __pyx_v_initialized; int __pyx_v_ierr; int __pyx_v_required; int __pyx_v_provided; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("bootstrap", 0); /* "mpi4py/MPI/atimport.pxi":152 * cdef int bootstrap() except -1: * # Get options from 'mpi4py.rc' module * getOptions(&options) # <<<<<<<<<<<<<< * # Cleanup at (the very end of) Python exit * if Py_AtExit(atexit) < 0: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_getOptions((&__pyx_v_6mpi4py_3MPI_options)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(9, 152, __pyx_L1_error) /* "mpi4py/MPI/atimport.pxi":154 * getOptions(&options) * # Cleanup at (the very end of) Python exit * if Py_AtExit(atexit) < 0: # <<<<<<<<<<<<<< * PySys_WriteStderr(b"warning: could not register " * b"cleanup with Py_AtExit()%s", b"\n") */ __pyx_t_2 = ((Py_AtExit(__pyx_f_6mpi4py_3MPI_atexit) < 0) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/atimport.pxi":155 * # Cleanup at (the very end of) Python exit * if Py_AtExit(atexit) < 0: * PySys_WriteStderr(b"warning: could not register " # <<<<<<<<<<<<<< * b"cleanup with Py_AtExit()%s", b"\n") * # Do we have to initialize MPI? */ PySys_WriteStderr(((char *)"warning: could not register cleanup with Py_AtExit()%s"), ((char *)"\n")); /* "mpi4py/MPI/atimport.pxi":154 * getOptions(&options) * # Cleanup at (the very end of) Python exit * if Py_AtExit(atexit) < 0: # <<<<<<<<<<<<<< * PySys_WriteStderr(b"warning: could not register " * b"cleanup with Py_AtExit()%s", b"\n") */ } /* "mpi4py/MPI/atimport.pxi":158 * b"cleanup with Py_AtExit()%s", b"\n") * # Do we have to initialize MPI? * cdef int initialized = 1 # <<<<<<<<<<<<<< * MPI_Initialized(&initialized) * if initialized: */ __pyx_v_initialized = 1; /* "mpi4py/MPI/atimport.pxi":159 * # Do we have to initialize MPI? * cdef int initialized = 1 * MPI_Initialized(&initialized) # <<<<<<<<<<<<<< * if initialized: * options.finalize = 0 */ ((void)MPI_Initialized((&__pyx_v_initialized))); /* "mpi4py/MPI/atimport.pxi":160 * cdef int initialized = 1 * MPI_Initialized(&initialized) * if initialized: # <<<<<<<<<<<<<< * options.finalize = 0 * return 0 */ __pyx_t_2 = (__pyx_v_initialized != 0); if (__pyx_t_2) { /* "mpi4py/MPI/atimport.pxi":161 * MPI_Initialized(&initialized) * if initialized: * options.finalize = 0 # <<<<<<<<<<<<<< * return 0 * if not options.initialize: */ __pyx_v_6mpi4py_3MPI_options.finalize = 0; /* "mpi4py/MPI/atimport.pxi":162 * if initialized: * options.finalize = 0 * return 0 # <<<<<<<<<<<<<< * if not options.initialize: * return 0 */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":160 * cdef int initialized = 1 * MPI_Initialized(&initialized) * if initialized: # <<<<<<<<<<<<<< * options.finalize = 0 * return 0 */ } /* "mpi4py/MPI/atimport.pxi":163 * options.finalize = 0 * return 0 * if not options.initialize: # <<<<<<<<<<<<<< * return 0 * # MPI initialization */ __pyx_t_2 = ((!(__pyx_v_6mpi4py_3MPI_options.initialize != 0)) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/atimport.pxi":164 * return 0 * if not options.initialize: * return 0 # <<<<<<<<<<<<<< * # MPI initialization * cdef int ierr = MPI_SUCCESS */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":163 * options.finalize = 0 * return 0 * if not options.initialize: # <<<<<<<<<<<<<< * return 0 * # MPI initialization */ } /* "mpi4py/MPI/atimport.pxi":166 * return 0 * # MPI initialization * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef int required = MPI_THREAD_SINGLE * cdef int provided = MPI_THREAD_SINGLE */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/atimport.pxi":167 * # MPI initialization * cdef int ierr = MPI_SUCCESS * cdef int required = MPI_THREAD_SINGLE # <<<<<<<<<<<<<< * cdef int provided = MPI_THREAD_SINGLE * if options.threads: */ __pyx_v_required = MPI_THREAD_SINGLE; /* "mpi4py/MPI/atimport.pxi":168 * cdef int ierr = MPI_SUCCESS * cdef int required = MPI_THREAD_SINGLE * cdef int provided = MPI_THREAD_SINGLE # <<<<<<<<<<<<<< * if options.threads: * required = options.thread_level */ __pyx_v_provided = MPI_THREAD_SINGLE; /* "mpi4py/MPI/atimport.pxi":169 * cdef int required = MPI_THREAD_SINGLE * cdef int provided = MPI_THREAD_SINGLE * if options.threads: # <<<<<<<<<<<<<< * required = options.thread_level * ierr = MPI_Init_thread(NULL, NULL, required, &provided) */ __pyx_t_2 = (__pyx_v_6mpi4py_3MPI_options.threads != 0); if (__pyx_t_2) { /* "mpi4py/MPI/atimport.pxi":170 * cdef int provided = MPI_THREAD_SINGLE * if options.threads: * required = options.thread_level # <<<<<<<<<<<<<< * ierr = MPI_Init_thread(NULL, NULL, required, &provided) * if ierr != MPI_SUCCESS: raise RuntimeError( */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_options.thread_level; __pyx_v_required = __pyx_t_1; /* "mpi4py/MPI/atimport.pxi":171 * if options.threads: * required = options.thread_level * ierr = MPI_Init_thread(NULL, NULL, required, &provided) # <<<<<<<<<<<<<< * if ierr != MPI_SUCCESS: raise RuntimeError( * "MPI_Init_thread() failed [error code: %d]" % ierr) */ __pyx_v_ierr = MPI_Init_thread(NULL, NULL, __pyx_v_required, (&__pyx_v_provided)); /* "mpi4py/MPI/atimport.pxi":172 * required = options.thread_level * ierr = MPI_Init_thread(NULL, NULL, required, &provided) * if ierr != MPI_SUCCESS: raise RuntimeError( # <<<<<<<<<<<<<< * "MPI_Init_thread() failed [error code: %d]" % ierr) * else: */ __pyx_t_2 = ((__pyx_v_ierr != MPI_SUCCESS) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/atimport.pxi":173 * ierr = MPI_Init_thread(NULL, NULL, required, &provided) * if ierr != MPI_SUCCESS: raise RuntimeError( * "MPI_Init_thread() failed [error code: %d]" % ierr) # <<<<<<<<<<<<<< * else: * ierr = MPI_Init(NULL, NULL) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_MPI_Init_thread_failed_error_cod, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/atimport.pxi":172 * required = options.thread_level * ierr = MPI_Init_thread(NULL, NULL, required, &provided) * if ierr != MPI_SUCCESS: raise RuntimeError( # <<<<<<<<<<<<<< * "MPI_Init_thread() failed [error code: %d]" % ierr) * else: */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(9, 172, __pyx_L1_error) } /* "mpi4py/MPI/atimport.pxi":169 * cdef int required = MPI_THREAD_SINGLE * cdef int provided = MPI_THREAD_SINGLE * if options.threads: # <<<<<<<<<<<<<< * required = options.thread_level * ierr = MPI_Init_thread(NULL, NULL, required, &provided) */ goto __pyx_L6; } /* "mpi4py/MPI/atimport.pxi":175 * "MPI_Init_thread() failed [error code: %d]" % ierr) * else: * ierr = MPI_Init(NULL, NULL) # <<<<<<<<<<<<<< * if ierr != MPI_SUCCESS: raise RuntimeError( * "MPI_Init() failed [error code: %d]" % ierr) */ /*else*/ { __pyx_v_ierr = MPI_Init(NULL, NULL); /* "mpi4py/MPI/atimport.pxi":176 * else: * ierr = MPI_Init(NULL, NULL) * if ierr != MPI_SUCCESS: raise RuntimeError( # <<<<<<<<<<<<<< * "MPI_Init() failed [error code: %d]" % ierr) * return 0 */ __pyx_t_2 = ((__pyx_v_ierr != MPI_SUCCESS) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/atimport.pxi":177 * ierr = MPI_Init(NULL, NULL) * if ierr != MPI_SUCCESS: raise RuntimeError( * "MPI_Init() failed [error code: %d]" % ierr) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_MPI_Init_failed_error_code_d, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(9, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/atimport.pxi":176 * else: * ierr = MPI_Init(NULL, NULL) * if ierr != MPI_SUCCESS: raise RuntimeError( # <<<<<<<<<<<<<< * "MPI_Init() failed [error code: %d]" % ierr) * return 0 */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(9, 176, __pyx_L1_error) } } __pyx_L6:; /* "mpi4py/MPI/atimport.pxi":178 * if ierr != MPI_SUCCESS: raise RuntimeError( * "MPI_Init() failed [error code: %d]" % ierr) * return 0 # <<<<<<<<<<<<<< * * cdef inline int mpi_active() nogil: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":150 * int PyMPI_Commctx_finalize() nogil * * cdef int bootstrap() except -1: # <<<<<<<<<<<<<< * # Get options from 'mpi4py.rc' module * getOptions(&options) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.bootstrap", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/atimport.pxi":180 * return 0 * * cdef inline int mpi_active() nogil: # <<<<<<<<<<<<<< * cdef int ierr = MPI_SUCCESS * # MPI initialized ? */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_mpi_active(void) { int __pyx_v_ierr; int __pyx_v_initialized; int __pyx_v_finalized; int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/atimport.pxi":181 * * cdef inline int mpi_active() nogil: * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * # MPI initialized ? * cdef int initialized = 0 */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/atimport.pxi":183 * cdef int ierr = MPI_SUCCESS * # MPI initialized ? * cdef int initialized = 0 # <<<<<<<<<<<<<< * ierr = MPI_Initialized(&initialized) * if not initialized or ierr != MPI_SUCCESS: return 0 */ __pyx_v_initialized = 0; /* "mpi4py/MPI/atimport.pxi":184 * # MPI initialized ? * cdef int initialized = 0 * ierr = MPI_Initialized(&initialized) # <<<<<<<<<<<<<< * if not initialized or ierr != MPI_SUCCESS: return 0 * # MPI finalized ? */ __pyx_v_ierr = MPI_Initialized((&__pyx_v_initialized)); /* "mpi4py/MPI/atimport.pxi":185 * cdef int initialized = 0 * ierr = MPI_Initialized(&initialized) * if not initialized or ierr != MPI_SUCCESS: return 0 # <<<<<<<<<<<<<< * # MPI finalized ? * cdef int finalized = 1 */ __pyx_t_2 = ((!(__pyx_v_initialized != 0)) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = ((__pyx_v_ierr != MPI_SUCCESS) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/atimport.pxi":187 * if not initialized or ierr != MPI_SUCCESS: return 0 * # MPI finalized ? * cdef int finalized = 1 # <<<<<<<<<<<<<< * ierr = MPI_Finalized(&finalized) * if finalized or ierr != MPI_SUCCESS: return 0 */ __pyx_v_finalized = 1; /* "mpi4py/MPI/atimport.pxi":188 * # MPI finalized ? * cdef int finalized = 1 * ierr = MPI_Finalized(&finalized) # <<<<<<<<<<<<<< * if finalized or ierr != MPI_SUCCESS: return 0 * # MPI should be active ... */ __pyx_v_ierr = MPI_Finalized((&__pyx_v_finalized)); /* "mpi4py/MPI/atimport.pxi":189 * cdef int finalized = 1 * ierr = MPI_Finalized(&finalized) * if finalized or ierr != MPI_SUCCESS: return 0 # <<<<<<<<<<<<<< * # MPI should be active ... * return 1 */ __pyx_t_2 = (__pyx_v_finalized != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } __pyx_t_2 = ((__pyx_v_ierr != MPI_SUCCESS) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/atimport.pxi":191 * if finalized or ierr != MPI_SUCCESS: return 0 * # MPI should be active ... * return 1 # <<<<<<<<<<<<<< * * cdef int initialize() nogil except -1: */ __pyx_r = 1; goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":180 * return 0 * * cdef inline int mpi_active() nogil: # <<<<<<<<<<<<<< * cdef int ierr = MPI_SUCCESS * # MPI initialized ? */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/atimport.pxi":193 * return 1 * * cdef int initialize() nogil except -1: # <<<<<<<<<<<<<< * if not mpi_active(): return 0 * comm_set_eh(MPI_COMM_SELF) */ static int __pyx_f_6mpi4py_3MPI_initialize(void) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/atimport.pxi":194 * * cdef int initialize() nogil except -1: * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * comm_set_eh(MPI_COMM_SELF) * comm_set_eh(MPI_COMM_WORLD) */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/atimport.pxi":195 * cdef int initialize() nogil except -1: * if not mpi_active(): return 0 * comm_set_eh(MPI_COMM_SELF) # <<<<<<<<<<<<<< * comm_set_eh(MPI_COMM_WORLD) * return 0 */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_comm_set_eh(MPI_COMM_SELF); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(9, 195, __pyx_L1_error) /* "mpi4py/MPI/atimport.pxi":196 * if not mpi_active(): return 0 * comm_set_eh(MPI_COMM_SELF) * comm_set_eh(MPI_COMM_WORLD) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_comm_set_eh(MPI_COMM_WORLD); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(9, 196, __pyx_L1_error) /* "mpi4py/MPI/atimport.pxi":197 * comm_set_eh(MPI_COMM_SELF) * comm_set_eh(MPI_COMM_WORLD) * return 0 # <<<<<<<<<<<<<< * * cdef void finalize() nogil: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":193 * return 1 * * cdef int initialize() nogil except -1: # <<<<<<<<<<<<<< * if not mpi_active(): return 0 * comm_set_eh(MPI_COMM_SELF) */ /* function exit code */ __pyx_L1_error:; { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("mpi4py.MPI.initialize", __pyx_clineno, __pyx_lineno, __pyx_filename); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/atimport.pxi":199 * return 0 * * cdef void finalize() nogil: # <<<<<<<<<<<<<< * if not mpi_active(): return * PyMPI_Commctx_finalize() */ static void __pyx_f_6mpi4py_3MPI_finalize(void) { int __pyx_t_1; /* "mpi4py/MPI/atimport.pxi":200 * * cdef void finalize() nogil: * if not mpi_active(): return # <<<<<<<<<<<<<< * PyMPI_Commctx_finalize() * */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/atimport.pxi":201 * cdef void finalize() nogil: * if not mpi_active(): return * PyMPI_Commctx_finalize() # <<<<<<<<<<<<<< * * cdef int abort_status = 0 */ ((void)PyMPI_Commctx_finalize()); /* "mpi4py/MPI/atimport.pxi":199 * return 0 * * cdef void finalize() nogil: # <<<<<<<<<<<<<< * if not mpi_active(): return * PyMPI_Commctx_finalize() */ /* function exit code */ __pyx_L0:; } /* "mpi4py/MPI/atimport.pxi":205 * cdef int abort_status = 0 * * cdef void atexit() nogil: # <<<<<<<<<<<<<< * if not mpi_active(): return * if abort_status: */ static void __pyx_f_6mpi4py_3MPI_atexit(void) { int __pyx_t_1; /* "mpi4py/MPI/atimport.pxi":206 * * cdef void atexit() nogil: * if not mpi_active(): return # <<<<<<<<<<<<<< * if abort_status: * MPI_Abort(MPI_COMM_WORLD, abort_status) */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/atimport.pxi":207 * cdef void atexit() nogil: * if not mpi_active(): return * if abort_status: # <<<<<<<<<<<<<< * MPI_Abort(MPI_COMM_WORLD, abort_status) * finalize() */ __pyx_t_1 = (__pyx_v_6mpi4py_3MPI_abort_status != 0); if (__pyx_t_1) { /* "mpi4py/MPI/atimport.pxi":208 * if not mpi_active(): return * if abort_status: * MPI_Abort(MPI_COMM_WORLD, abort_status) # <<<<<<<<<<<<<< * finalize() * if options.finalize: */ ((void)MPI_Abort(MPI_COMM_WORLD, __pyx_v_6mpi4py_3MPI_abort_status)); /* "mpi4py/MPI/atimport.pxi":207 * cdef void atexit() nogil: * if not mpi_active(): return * if abort_status: # <<<<<<<<<<<<<< * MPI_Abort(MPI_COMM_WORLD, abort_status) * finalize() */ } /* "mpi4py/MPI/atimport.pxi":209 * if abort_status: * MPI_Abort(MPI_COMM_WORLD, abort_status) * finalize() # <<<<<<<<<<<<<< * if options.finalize: * MPI_Finalize() */ __pyx_f_6mpi4py_3MPI_finalize(); /* "mpi4py/MPI/atimport.pxi":210 * MPI_Abort(MPI_COMM_WORLD, abort_status) * finalize() * if options.finalize: # <<<<<<<<<<<<<< * MPI_Finalize() * */ __pyx_t_1 = (__pyx_v_6mpi4py_3MPI_options.finalize != 0); if (__pyx_t_1) { /* "mpi4py/MPI/atimport.pxi":211 * finalize() * if options.finalize: * MPI_Finalize() # <<<<<<<<<<<<<< * * def _set_abort_status(object status): */ ((void)MPI_Finalize()); /* "mpi4py/MPI/atimport.pxi":210 * MPI_Abort(MPI_COMM_WORLD, abort_status) * finalize() * if options.finalize: # <<<<<<<<<<<<<< * MPI_Finalize() * */ } /* "mpi4py/MPI/atimport.pxi":205 * cdef int abort_status = 0 * * cdef void atexit() nogil: # <<<<<<<<<<<<<< * if not mpi_active(): return * if abort_status: */ /* function exit code */ __pyx_L0:; } /* "mpi4py/MPI/atimport.pxi":213 * MPI_Finalize() * * def _set_abort_status(object status): # <<<<<<<<<<<<<< * "Helper for ``python -m mpi4py.run ...``" * global abort_status */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_1_set_abort_status(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI__set_abort_status[] = "_set_abort_status(status)\nHelper for ``python -m mpi4py.run ...``"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_1_set_abort_status = {"_set_abort_status", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_1_set_abort_status, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI__set_abort_status}; static PyObject *__pyx_pw_6mpi4py_3MPI_1_set_abort_status(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_abort_status (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_set_abort_status") < 0)) __PYX_ERR(9, 213, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_status = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_abort_status", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(9, 213, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI._set_abort_status", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI__set_abort_status(__pyx_self, __pyx_v_status); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI__set_abort_status(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_status) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("_set_abort_status", 0); /* "mpi4py/MPI/atimport.pxi":216 * "Helper for ``python -m mpi4py.run ...``" * global abort_status * try: # <<<<<<<<<<<<<< * abort_status = status * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/atimport.pxi":217 * global abort_status * try: * abort_status = status # <<<<<<<<<<<<<< * except: * abort_status = 1 if status else 0 */ __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_status); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 217, __pyx_L3_error) __pyx_v_6mpi4py_3MPI_abort_status = __pyx_t_4; /* "mpi4py/MPI/atimport.pxi":216 * "Helper for ``python -m mpi4py.run ...``" * global abort_status * try: # <<<<<<<<<<<<<< * abort_status = status * except: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "mpi4py/MPI/atimport.pxi":218 * try: * abort_status = status * except: # <<<<<<<<<<<<<< * abort_status = 1 if status else 0 * */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI._set_abort_status", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(9, 218, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "mpi4py/MPI/atimport.pxi":219 * abort_status = status * except: * abort_status = 1 if status else 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_status); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(9, 219, __pyx_L5_except_error) if (__pyx_t_8) { __pyx_t_4 = 1; } else { __pyx_t_4 = 0; } __pyx_v_6mpi4py_3MPI_abort_status = __pyx_t_4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/atimport.pxi":216 * "Helper for ``python -m mpi4py.run ...``" * global abort_status * try: # <<<<<<<<<<<<<< * abort_status = status * except: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/atimport.pxi":213 * MPI_Finalize() * * def _set_abort_status(object status): # <<<<<<<<<<<<<< * "Helper for ``python -m mpi4py.run ...``" * global abort_status */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI._set_abort_status", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/atimport.pxi":235 * cdef object MPIException = PyExc_RuntimeError * * cdef int PyMPI_Raise(int ierr) except -1 with gil: # <<<<<<<<<<<<<< * if ierr == PyMPI_ERR_UNAVAILABLE: * PyErr_SetObject(PyExc_NotImplementedError, None) */ static int __pyx_f_6mpi4py_3MPI_PyMPI_Raise(int __pyx_v_ierr) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("PyMPI_Raise", 0); /* "mpi4py/MPI/atimport.pxi":236 * * cdef int PyMPI_Raise(int ierr) except -1 with gil: * if ierr == PyMPI_ERR_UNAVAILABLE: # <<<<<<<<<<<<<< * PyErr_SetObject(PyExc_NotImplementedError, None) * return 0 */ __pyx_t_1 = ((__pyx_v_ierr == PyMPI_ERR_UNAVAILABLE) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/atimport.pxi":237 * cdef int PyMPI_Raise(int ierr) except -1 with gil: * if ierr == PyMPI_ERR_UNAVAILABLE: * PyErr_SetObject(PyExc_NotImplementedError, None) # <<<<<<<<<<<<<< * return 0 * if (MPIException) != NULL: */ __pyx_t_2 = ((PyObject *)PyExc_NotImplementedError); __Pyx_INCREF(__pyx_t_2); PyErr_SetObject(__pyx_t_2, Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/atimport.pxi":238 * if ierr == PyMPI_ERR_UNAVAILABLE: * PyErr_SetObject(PyExc_NotImplementedError, None) * return 0 # <<<<<<<<<<<<<< * if (MPIException) != NULL: * PyErr_SetObject(MPIException, ierr) */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":236 * * cdef int PyMPI_Raise(int ierr) except -1 with gil: * if ierr == PyMPI_ERR_UNAVAILABLE: # <<<<<<<<<<<<<< * PyErr_SetObject(PyExc_NotImplementedError, None) * return 0 */ } /* "mpi4py/MPI/atimport.pxi":239 * PyErr_SetObject(PyExc_NotImplementedError, None) * return 0 * if (MPIException) != NULL: # <<<<<<<<<<<<<< * PyErr_SetObject(MPIException, ierr) * else: */ __pyx_t_1 = ((((void *)__pyx_v_6mpi4py_3MPI_MPIException) != NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/atimport.pxi":240 * return 0 * if (MPIException) != NULL: * PyErr_SetObject(MPIException, ierr) # <<<<<<<<<<<<<< * else: * PyErr_SetObject(PyExc_RuntimeError, ierr) */ __pyx_t_2 = __pyx_v_6mpi4py_3MPI_MPIException; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_long(((long)__pyx_v_ierr)); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); PyErr_SetObject(__pyx_t_2, __pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/atimport.pxi":239 * PyErr_SetObject(PyExc_NotImplementedError, None) * return 0 * if (MPIException) != NULL: # <<<<<<<<<<<<<< * PyErr_SetObject(MPIException, ierr) * else: */ goto __pyx_L4; } /* "mpi4py/MPI/atimport.pxi":242 * PyErr_SetObject(MPIException, ierr) * else: * PyErr_SetObject(PyExc_RuntimeError, ierr) # <<<<<<<<<<<<<< * return 0 * */ /*else*/ { __pyx_t_3 = ((PyObject *)PyExc_RuntimeError); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_long(((long)__pyx_v_ierr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); PyErr_SetObject(__pyx_t_3, __pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L4:; /* "mpi4py/MPI/atimport.pxi":243 * else: * PyErr_SetObject(PyExc_RuntimeError, ierr) * return 0 # <<<<<<<<<<<<<< * * cdef inline int CHKERR(int ierr) nogil except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":235 * cdef object MPIException = PyExc_RuntimeError * * cdef int PyMPI_Raise(int ierr) except -1 with gil: # <<<<<<<<<<<<<< * if ierr == PyMPI_ERR_UNAVAILABLE: * PyErr_SetObject(PyExc_NotImplementedError, None) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_Raise", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/atimport.pxi":245 * return 0 * * cdef inline int CHKERR(int ierr) nogil except -1: # <<<<<<<<<<<<<< * if ierr == MPI_SUCCESS: return 0 * PyMPI_Raise(ierr) */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_CHKERR(int __pyx_v_ierr) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/atimport.pxi":246 * * cdef inline int CHKERR(int ierr) nogil except -1: * if ierr == MPI_SUCCESS: return 0 # <<<<<<<<<<<<<< * PyMPI_Raise(ierr) * return -1 */ __pyx_t_1 = ((__pyx_v_ierr == MPI_SUCCESS) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/atimport.pxi":247 * cdef inline int CHKERR(int ierr) nogil except -1: * if ierr == MPI_SUCCESS: return 0 * PyMPI_Raise(ierr) # <<<<<<<<<<<<<< * return -1 * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_Raise(__pyx_v_ierr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(9, 247, __pyx_L1_error) /* "mpi4py/MPI/atimport.pxi":248 * if ierr == MPI_SUCCESS: return 0 * PyMPI_Raise(ierr) * return -1 # <<<<<<<<<<<<<< * * cdef inline void print_traceback(): */ __pyx_r = -1; goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":245 * return 0 * * cdef inline int CHKERR(int ierr) nogil except -1: # <<<<<<<<<<<<<< * if ierr == MPI_SUCCESS: return 0 * PyMPI_Raise(ierr) */ /* function exit code */ __pyx_L1_error:; { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("mpi4py.MPI.CHKERR", __pyx_clineno, __pyx_lineno, __pyx_filename); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/atimport.pxi":250 * return -1 * * cdef inline void print_traceback(): # <<<<<<<<<<<<<< * cdef object sys, traceback * import sys, traceback */ static CYTHON_INLINE void __pyx_f_6mpi4py_3MPI_print_traceback(void) { PyObject *__pyx_v_sys = 0; PyObject *__pyx_v_traceback = 0; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("print_traceback", 0); /* "mpi4py/MPI/atimport.pxi":252 * cdef inline void print_traceback(): * cdef object sys, traceback * import sys, traceback # <<<<<<<<<<<<<< * traceback.print_exc() * try: sys.stderr.flush() */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sys = __pyx_t_1; __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Import(__pyx_n_s_traceback, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_traceback = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/atimport.pxi":253 * cdef object sys, traceback * import sys, traceback * traceback.print_exc() # <<<<<<<<<<<<<< * try: sys.stderr.flush() * except: pass */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_traceback, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/atimport.pxi":254 * import sys, traceback * traceback.print_exc() * try: sys.stderr.flush() # <<<<<<<<<<<<<< * except: pass * */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_sys, __pyx_n_s_stderr); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 254, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_flush); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 254, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 254, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/atimport.pxi":255 * traceback.print_exc() * try: sys.stderr.flush() * except: pass # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L8_try_end:; } /* "mpi4py/MPI/atimport.pxi":250 * return -1 * * cdef inline void print_traceback(): # <<<<<<<<<<<<<< * cdef object sys, traceback * import sys, traceback */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("mpi4py.MPI.print_traceback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF(__pyx_v_sys); __Pyx_XDECREF(__pyx_v_traceback); __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/atimport.pxi":266 * cdef object _pypy_sentinel = None * * cdef inline int Py_IsInitialized() nogil: # <<<<<<<<<<<<<< * if PYPY and (_pypy_sentinel) == NULL: return 0 * return _Py_IsInitialized() */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_Py_IsInitialized(void) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/atimport.pxi":267 * * cdef inline int Py_IsInitialized() nogil: * if PYPY and (_pypy_sentinel) == NULL: return 0 # <<<<<<<<<<<<<< * return _Py_IsInitialized() * */ if (PyMPI_RUNTIME_PYPY) { } else { __pyx_t_1 = PyMPI_RUNTIME_PYPY; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = ((((void *)__pyx_v_6mpi4py_3MPI__pypy_sentinel) == NULL) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/atimport.pxi":268 * cdef inline int Py_IsInitialized() nogil: * if PYPY and (_pypy_sentinel) == NULL: return 0 * return _Py_IsInitialized() # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = Py_IsInitialized(); goto __pyx_L0; /* "mpi4py/MPI/atimport.pxi":266 * cdef object _pypy_sentinel = None * * cdef inline int Py_IsInitialized() nogil: # <<<<<<<<<<<<<< * if PYPY and (_pypy_sentinel) == NULL: return 0 * return _Py_IsInitialized() */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/asstring.pxi":15 * #------------------------------------------------------------------------------ * * cdef inline object asmpistr(object ob, char *s[]): # <<<<<<<<<<<<<< * if PyUnicode_Check(ob): * if PY3: ob = PyUnicode_AsUTF8String(ob); */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asmpistr(PyObject *__pyx_v_ob, char **__pyx_v_s) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("asmpistr", 0); __Pyx_INCREF(__pyx_v_ob); /* "mpi4py/MPI/asstring.pxi":16 * * cdef inline object asmpistr(object ob, char *s[]): * if PyUnicode_Check(ob): # <<<<<<<<<<<<<< * if PY3: ob = PyUnicode_AsUTF8String(ob); * else: ob = PyUnicode_AsASCIIString(ob); */ __pyx_t_1 = (PyUnicode_Check(__pyx_v_ob) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asstring.pxi":17 * cdef inline object asmpistr(object ob, char *s[]): * if PyUnicode_Check(ob): * if PY3: ob = PyUnicode_AsUTF8String(ob); # <<<<<<<<<<<<<< * else: ob = PyUnicode_AsASCIIString(ob); * PyBytes_AsStringAndSize(ob, s, NULL) */ if ((PY_MAJOR_VERSION>=3)) { __pyx_t_2 = PyUnicode_AsUTF8String(__pyx_v_ob); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4; } /* "mpi4py/MPI/asstring.pxi":18 * if PyUnicode_Check(ob): * if PY3: ob = PyUnicode_AsUTF8String(ob); * else: ob = PyUnicode_AsASCIIString(ob); # <<<<<<<<<<<<<< * PyBytes_AsStringAndSize(ob, s, NULL) * return ob */ /*else*/ { __pyx_t_2 = PyUnicode_AsASCIIString(__pyx_v_ob); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_2); __pyx_t_2 = 0; } __pyx_L4:; /* "mpi4py/MPI/asstring.pxi":16 * * cdef inline object asmpistr(object ob, char *s[]): * if PyUnicode_Check(ob): # <<<<<<<<<<<<<< * if PY3: ob = PyUnicode_AsUTF8String(ob); * else: ob = PyUnicode_AsASCIIString(ob); */ } /* "mpi4py/MPI/asstring.pxi":19 * if PY3: ob = PyUnicode_AsUTF8String(ob); * else: ob = PyUnicode_AsASCIIString(ob); * PyBytes_AsStringAndSize(ob, s, NULL) # <<<<<<<<<<<<<< * return ob * */ __pyx_t_3 = PyBytes_AsStringAndSize(__pyx_v_ob, __pyx_v_s, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(10, 19, __pyx_L1_error) /* "mpi4py/MPI/asstring.pxi":20 * else: ob = PyUnicode_AsASCIIString(ob); * PyBytes_AsStringAndSize(ob, s, NULL) * return ob # <<<<<<<<<<<<<< * * cdef inline object tompistr(const char s[], int n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ob); __pyx_r = __pyx_v_ob; goto __pyx_L0; /* "mpi4py/MPI/asstring.pxi":15 * #------------------------------------------------------------------------------ * * cdef inline object asmpistr(object ob, char *s[]): # <<<<<<<<<<<<<< * if PyUnicode_Check(ob): * if PY3: ob = PyUnicode_AsUTF8String(ob); */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.asmpistr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asstring.pxi":22 * return ob * * cdef inline object tompistr(const char s[], int n): # <<<<<<<<<<<<<< * if PY3: return PyUnicode_FromStringAndSize(s, n) * else: return PyBytes_FromStringAndSize(s, n) */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_tompistr(char const *__pyx_v_s, int __pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("tompistr", 0); /* "mpi4py/MPI/asstring.pxi":23 * * cdef inline object tompistr(const char s[], int n): * if PY3: return PyUnicode_FromStringAndSize(s, n) # <<<<<<<<<<<<<< * else: return PyBytes_FromStringAndSize(s, n) * */ if ((PY_MAJOR_VERSION>=3)) { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyUnicode_FromStringAndSize(__pyx_v_s, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/asstring.pxi":24 * cdef inline object tompistr(const char s[], int n): * if PY3: return PyUnicode_FromStringAndSize(s, n) * else: return PyBytes_FromStringAndSize(s, n) # <<<<<<<<<<<<<< * * cdef inline object mpistr(const char s[]): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyBytes_FromStringAndSize(__pyx_v_s, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/asstring.pxi":22 * return ob * * cdef inline object tompistr(const char s[], int n): # <<<<<<<<<<<<<< * if PY3: return PyUnicode_FromStringAndSize(s, n) * else: return PyBytes_FromStringAndSize(s, n) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.tompistr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asstring.pxi":26 * else: return PyBytes_FromStringAndSize(s, n) * * cdef inline object mpistr(const char s[]): # <<<<<<<<<<<<<< * if PY3: return PyUnicode_FromString(s) * else: return PyBytes_FromString(s) */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_mpistr(char const *__pyx_v_s) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("mpistr", 0); /* "mpi4py/MPI/asstring.pxi":27 * * cdef inline object mpistr(const char s[]): * if PY3: return PyUnicode_FromString(s) # <<<<<<<<<<<<<< * else: return PyBytes_FromString(s) * */ if ((PY_MAJOR_VERSION>=3)) { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyUnicode_FromString(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/asstring.pxi":28 * cdef inline object mpistr(const char s[]): * if PY3: return PyUnicode_FromString(s) * else: return PyBytes_FromString(s) # <<<<<<<<<<<<<< * * cdef inline object pystr(const char s[]): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/asstring.pxi":26 * else: return PyBytes_FromStringAndSize(s, n) * * cdef inline object mpistr(const char s[]): # <<<<<<<<<<<<<< * if PY3: return PyUnicode_FromString(s) * else: return PyBytes_FromString(s) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.mpistr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asstring.pxi":30 * else: return PyBytes_FromString(s) * * cdef inline object pystr(const char s[]): # <<<<<<<<<<<<<< * if PY3: return PyUnicode_FromString(s) * else: return PyBytes_FromString(s) */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_pystr(char const *__pyx_v_s) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("pystr", 0); /* "mpi4py/MPI/asstring.pxi":31 * * cdef inline object pystr(const char s[]): * if PY3: return PyUnicode_FromString(s) # <<<<<<<<<<<<<< * else: return PyBytes_FromString(s) * */ if ((PY_MAJOR_VERSION>=3)) { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyUnicode_FromString(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/asstring.pxi":32 * cdef inline object pystr(const char s[]): * if PY3: return PyUnicode_FromString(s) * else: return PyBytes_FromString(s) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/asstring.pxi":30 * else: return PyBytes_FromString(s) * * cdef inline object pystr(const char s[]): # <<<<<<<<<<<<<< * if PY3: return PyUnicode_FromString(s) * else: return PyBytes_FromString(s) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.pystr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":81 * pass * * cdef int PyPy_GetBuffer(object obj, Py_buffer *view, int flags) except -1: # <<<<<<<<<<<<<< * cdef object addr * cdef void *buf = NULL */ static int __pyx_f_6mpi4py_3MPI_PyPy_GetBuffer(PyObject *__pyx_v_obj, Py_buffer *__pyx_v_view, int __pyx_v_flags) { PyObject *__pyx_v_addr = 0; void *__pyx_v_buf; Py_ssize_t __pyx_v_size; int __pyx_v_readonly; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; char *__pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *(*__pyx_t_13)(PyObject *); int __pyx_t_14; __Pyx_RefNannySetupContext("PyPy_GetBuffer", 0); /* "mpi4py/MPI/asbuffer.pxi":83 * cdef int PyPy_GetBuffer(object obj, Py_buffer *view, int flags) except -1: * cdef object addr * cdef void *buf = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t size = 0 * cdef bint readonly = 0 */ __pyx_v_buf = NULL; /* "mpi4py/MPI/asbuffer.pxi":84 * cdef object addr * cdef void *buf = NULL * cdef Py_ssize_t size = 0 # <<<<<<<<<<<<<< * cdef bint readonly = 0 * try: */ __pyx_v_size = 0; /* "mpi4py/MPI/asbuffer.pxi":85 * cdef void *buf = NULL * cdef Py_ssize_t size = 0 * cdef bint readonly = 0 # <<<<<<<<<<<<<< * try: * if not isinstance(obj, bytes): */ __pyx_v_readonly = 0; /* "mpi4py/MPI/asbuffer.pxi":86 * cdef Py_ssize_t size = 0 * cdef bint readonly = 0 * try: # <<<<<<<<<<<<<< * if not isinstance(obj, bytes): * if PyObject_CheckBuffer(obj): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/asbuffer.pxi":87 * cdef bint readonly = 0 * try: * if not isinstance(obj, bytes): # <<<<<<<<<<<<<< * if PyObject_CheckBuffer(obj): * return PyObject_GetBuffer(obj, view, flags) */ __pyx_t_4 = PyBytes_Check(__pyx_v_obj); __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0); if (__pyx_t_5) { /* "mpi4py/MPI/asbuffer.pxi":88 * try: * if not isinstance(obj, bytes): * if PyObject_CheckBuffer(obj): # <<<<<<<<<<<<<< * return PyObject_GetBuffer(obj, view, flags) * except SystemError: */ __pyx_t_5 = (PyObject_CheckBuffer(__pyx_v_obj) != 0); if (__pyx_t_5) { /* "mpi4py/MPI/asbuffer.pxi":89 * if not isinstance(obj, bytes): * if PyObject_CheckBuffer(obj): * return PyObject_GetBuffer(obj, view, flags) # <<<<<<<<<<<<<< * except SystemError: * pass */ __pyx_t_6 = PyObject_GetBuffer(__pyx_v_obj, __pyx_v_view, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 89, __pyx_L3_error) __pyx_r = __pyx_t_6; goto __pyx_L7_try_return; /* "mpi4py/MPI/asbuffer.pxi":88 * try: * if not isinstance(obj, bytes): * if PyObject_CheckBuffer(obj): # <<<<<<<<<<<<<< * return PyObject_GetBuffer(obj, view, flags) * except SystemError: */ } /* "mpi4py/MPI/asbuffer.pxi":87 * cdef bint readonly = 0 * try: * if not isinstance(obj, bytes): # <<<<<<<<<<<<<< * if PyObject_CheckBuffer(obj): * return PyObject_GetBuffer(obj, view, flags) */ } /* "mpi4py/MPI/asbuffer.pxi":86 * cdef Py_ssize_t size = 0 * cdef bint readonly = 0 * try: # <<<<<<<<<<<<<< * if not isinstance(obj, bytes): * if PyObject_CheckBuffer(obj): */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "mpi4py/MPI/asbuffer.pxi":90 * if PyObject_CheckBuffer(obj): * return PyObject_GetBuffer(obj, view, flags) * except SystemError: # <<<<<<<<<<<<<< * pass * except TypeError: */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_SystemError); if (__pyx_t_6) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/asbuffer.pxi":92 * except SystemError: * pass * except TypeError: # <<<<<<<<<<<<<< * pass * if isinstance(obj, bytes): */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_6) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "mpi4py/MPI/asbuffer.pxi":86 * cdef Py_ssize_t size = 0 * cdef bint readonly = 0 * try: # <<<<<<<<<<<<<< * if not isinstance(obj, bytes): * if PyObject_CheckBuffer(obj): */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/asbuffer.pxi":94 * except TypeError: * pass * if isinstance(obj, bytes): # <<<<<<<<<<<<<< * buf = PyBytes_AsString(obj) * size = PyBytes_Size(obj) */ __pyx_t_5 = PyBytes_Check(__pyx_v_obj); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/asbuffer.pxi":95 * pass * if isinstance(obj, bytes): * buf = PyBytes_AsString(obj) # <<<<<<<<<<<<<< * size = PyBytes_Size(obj) * readonly = 1 */ __pyx_t_7 = PyBytes_AsString(__pyx_v_obj); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 95, __pyx_L1_error) __pyx_v_buf = __pyx_t_7; /* "mpi4py/MPI/asbuffer.pxi":96 * if isinstance(obj, bytes): * buf = PyBytes_AsString(obj) * size = PyBytes_Size(obj) # <<<<<<<<<<<<<< * readonly = 1 * elif isinstance(obj, bytearray): */ __pyx_t_8 = PyBytes_Size(__pyx_v_obj); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 96, __pyx_L1_error) __pyx_v_size = __pyx_t_8; /* "mpi4py/MPI/asbuffer.pxi":97 * buf = PyBytes_AsString(obj) * size = PyBytes_Size(obj) * readonly = 1 # <<<<<<<<<<<<<< * elif isinstance(obj, bytearray): * buf = PyByteArray_AsString(obj) */ __pyx_v_readonly = 1; /* "mpi4py/MPI/asbuffer.pxi":94 * except TypeError: * pass * if isinstance(obj, bytes): # <<<<<<<<<<<<<< * buf = PyBytes_AsString(obj) * size = PyBytes_Size(obj) */ goto __pyx_L11; } /* "mpi4py/MPI/asbuffer.pxi":98 * size = PyBytes_Size(obj) * readonly = 1 * elif isinstance(obj, bytearray): # <<<<<<<<<<<<<< * buf = PyByteArray_AsString(obj) * size = PyByteArray_Size(obj) */ __pyx_t_4 = PyByteArray_Check(__pyx_v_obj); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "mpi4py/MPI/asbuffer.pxi":99 * readonly = 1 * elif isinstance(obj, bytearray): * buf = PyByteArray_AsString(obj) # <<<<<<<<<<<<<< * size = PyByteArray_Size(obj) * readonly = 0 */ __pyx_t_7 = PyByteArray_AsString(__pyx_v_obj); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 99, __pyx_L1_error) __pyx_v_buf = __pyx_t_7; /* "mpi4py/MPI/asbuffer.pxi":100 * elif isinstance(obj, bytearray): * buf = PyByteArray_AsString(obj) * size = PyByteArray_Size(obj) # <<<<<<<<<<<<<< * readonly = 0 * elif isinstance(obj, array_array): */ __pyx_t_8 = PyByteArray_Size(__pyx_v_obj); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 100, __pyx_L1_error) __pyx_v_size = __pyx_t_8; /* "mpi4py/MPI/asbuffer.pxi":101 * buf = PyByteArray_AsString(obj) * size = PyByteArray_Size(obj) * readonly = 0 # <<<<<<<<<<<<<< * elif isinstance(obj, array_array): * addr, size = obj.buffer_info() */ __pyx_v_readonly = 0; /* "mpi4py/MPI/asbuffer.pxi":98 * size = PyBytes_Size(obj) * readonly = 1 * elif isinstance(obj, bytearray): # <<<<<<<<<<<<<< * buf = PyByteArray_AsString(obj) * size = PyByteArray_Size(obj) */ goto __pyx_L11; } /* "mpi4py/MPI/asbuffer.pxi":102 * size = PyByteArray_Size(obj) * readonly = 0 * elif isinstance(obj, array_array): # <<<<<<<<<<<<<< * addr, size = obj.buffer_info() * buf = PyLong_AsVoidPtr(addr) */ __pyx_t_9 = ((PyObject *)__pyx_v_6mpi4py_3MPI_array_array); __Pyx_INCREF(__pyx_t_9); __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/asbuffer.pxi":103 * readonly = 0 * elif isinstance(obj, array_array): * addr, size = obj.buffer_info() # <<<<<<<<<<<<<< * buf = PyLong_AsVoidPtr(addr) * size *= obj.itemsize */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_buffer_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); } } __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { PyObject* sequence = __pyx_t_9; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 103, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_10 = PyList_GET_ITEM(sequence, 0); __pyx_t_11 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_11); #else __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_10 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_10)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 103, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L13_unpacking_done; __pyx_L12_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 103, __pyx_L1_error) __pyx_L13_unpacking_done:; } __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_11); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_addr = __pyx_t_10; __pyx_t_10 = 0; __pyx_v_size = __pyx_t_8; /* "mpi4py/MPI/asbuffer.pxi":104 * elif isinstance(obj, array_array): * addr, size = obj.buffer_info() * buf = PyLong_AsVoidPtr(addr) # <<<<<<<<<<<<<< * size *= obj.itemsize * readonly = 0 */ __pyx_v_buf = PyLong_AsVoidPtr(__pyx_v_addr); /* "mpi4py/MPI/asbuffer.pxi":105 * addr, size = obj.buffer_info() * buf = PyLong_AsVoidPtr(addr) * size *= obj.itemsize # <<<<<<<<<<<<<< * readonly = 0 * elif pypy_have_numpy and isinstance(obj, numpy_array): */ __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = PyNumber_InPlaceMultiply(__pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_10); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_size = __pyx_t_8; /* "mpi4py/MPI/asbuffer.pxi":106 * buf = PyLong_AsVoidPtr(addr) * size *= obj.itemsize * readonly = 0 # <<<<<<<<<<<<<< * elif pypy_have_numpy and isinstance(obj, numpy_array): * addr, readonly = obj.__array_interface__['data'] */ __pyx_v_readonly = 0; /* "mpi4py/MPI/asbuffer.pxi":102 * size = PyByteArray_Size(obj) * readonly = 0 * elif isinstance(obj, array_array): # <<<<<<<<<<<<<< * addr, size = obj.buffer_info() * buf = PyLong_AsVoidPtr(addr) */ goto __pyx_L11; } /* "mpi4py/MPI/asbuffer.pxi":107 * size *= obj.itemsize * readonly = 0 * elif pypy_have_numpy and isinstance(obj, numpy_array): # <<<<<<<<<<<<<< * addr, readonly = obj.__array_interface__['data'] * buf = PyLong_AsVoidPtr(addr) */ __pyx_t_5 = (__pyx_v_6mpi4py_3MPI_pypy_have_numpy != 0); if (__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L14_bool_binop_done; } __pyx_t_10 = ((PyObject *)__pyx_v_6mpi4py_3MPI_numpy_array); __Pyx_INCREF(__pyx_t_10); __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_14 = (__pyx_t_5 != 0); __pyx_t_4 = __pyx_t_14; __pyx_L14_bool_binop_done:; if (__pyx_t_4) { /* "mpi4py/MPI/asbuffer.pxi":108 * readonly = 0 * elif pypy_have_numpy and isinstance(obj, numpy_array): * addr, readonly = obj.__array_interface__['data'] # <<<<<<<<<<<<<< * buf = PyLong_AsVoidPtr(addr) * size = obj.nbytes */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_array_interface); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_s_data); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 108, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_10 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_10 = PyList_GET_ITEM(sequence, 0); __pyx_t_9 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); #else __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; index = 0; __pyx_t_10 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_10)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_9 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_9)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 108, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L17_unpacking_done; __pyx_L16_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 108, __pyx_L1_error) __pyx_L17_unpacking_done:; } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_addr = __pyx_t_10; __pyx_t_10 = 0; __pyx_v_readonly = __pyx_t_4; /* "mpi4py/MPI/asbuffer.pxi":109 * elif pypy_have_numpy and isinstance(obj, numpy_array): * addr, readonly = obj.__array_interface__['data'] * buf = PyLong_AsVoidPtr(addr) # <<<<<<<<<<<<<< * size = obj.nbytes * else: */ __pyx_v_buf = PyLong_AsVoidPtr(__pyx_v_addr); /* "mpi4py/MPI/asbuffer.pxi":110 * addr, readonly = obj.__array_interface__['data'] * buf = PyLong_AsVoidPtr(addr) * size = obj.nbytes # <<<<<<<<<<<<<< * else: * readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_nbytes); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_11); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_size = __pyx_t_8; /* "mpi4py/MPI/asbuffer.pxi":107 * size *= obj.itemsize * readonly = 0 * elif pypy_have_numpy and isinstance(obj, numpy_array): # <<<<<<<<<<<<<< * addr, readonly = obj.__array_interface__['data'] * buf = PyLong_AsVoidPtr(addr) */ goto __pyx_L11; } /* "mpi4py/MPI/asbuffer.pxi":112 * size = obj.nbytes * else: * readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE # <<<<<<<<<<<<<< * _Py2_AsBuffer(obj, readonly, &buf, &size) * if buf == NULL and size == 0: buf = emptybuffer */ /*else*/ { __pyx_v_readonly = ((__pyx_v_flags & PyBUF_WRITABLE) != PyBUF_WRITABLE); /* "mpi4py/MPI/asbuffer.pxi":113 * else: * readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE * _Py2_AsBuffer(obj, readonly, &buf, &size) # <<<<<<<<<<<<<< * if buf == NULL and size == 0: buf = emptybuffer * PyBuffer_FillInfo(view, obj, buf, size, readonly, flags) */ __pyx_t_6 = _Py2_AsBuffer(__pyx_v_obj, __pyx_v_readonly, (&__pyx_v_buf), (&__pyx_v_size)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 113, __pyx_L1_error) } __pyx_L11:; /* "mpi4py/MPI/asbuffer.pxi":114 * readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE * _Py2_AsBuffer(obj, readonly, &buf, &size) * if buf == NULL and size == 0: buf = emptybuffer # <<<<<<<<<<<<<< * PyBuffer_FillInfo(view, obj, buf, size, readonly, flags) * if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT */ __pyx_t_14 = ((__pyx_v_buf == NULL) != 0); if (__pyx_t_14) { } else { __pyx_t_4 = __pyx_t_14; goto __pyx_L19_bool_binop_done; } __pyx_t_14 = ((__pyx_v_size == 0) != 0); __pyx_t_4 = __pyx_t_14; __pyx_L19_bool_binop_done:; if (__pyx_t_4) { __pyx_v_buf = ((void*)""); } /* "mpi4py/MPI/asbuffer.pxi":115 * _Py2_AsBuffer(obj, readonly, &buf, &size) * if buf == NULL and size == 0: buf = emptybuffer * PyBuffer_FillInfo(view, obj, buf, size, readonly, flags) # <<<<<<<<<<<<<< * if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT * return 0 */ __pyx_t_6 = PyBuffer_FillInfo(__pyx_v_view, __pyx_v_obj, __pyx_v_buf, __pyx_v_size, __pyx_v_readonly, __pyx_v_flags); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 115, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":116 * if buf == NULL and size == 0: buf = emptybuffer * PyBuffer_FillInfo(view, obj, buf, size, readonly, flags) * if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_4 = (((__pyx_v_flags & PyBUF_FORMAT) == PyBUF_FORMAT) != 0); if (__pyx_t_4) { __pyx_v_view->format = __pyx_v_6mpi4py_3MPI_BYTE_FMT; } /* "mpi4py/MPI/asbuffer.pxi":117 * PyBuffer_FillInfo(view, obj, buf, size, readonly, flags) * if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT * return 0 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":81 * pass * * cdef int PyPy_GetBuffer(object obj, Py_buffer *view, int flags) except -1: # <<<<<<<<<<<<<< * cdef object addr * cdef void *buf = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("mpi4py.MPI.PyPy_GetBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_addr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":121 * #------------------------------------------------------------------------------ * * cdef int Py27_GetBuffer(object obj, Py_buffer *view, int flags) except -1: # <<<<<<<<<<<<<< * # Python 3 buffer interface (PEP 3118) * if PyObject_CheckBuffer(obj): */ static int __pyx_f_6mpi4py_3MPI_Py27_GetBuffer(PyObject *__pyx_v_obj, Py_buffer *__pyx_v_view, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Py27_GetBuffer", 0); /* "mpi4py/MPI/asbuffer.pxi":123 * cdef int Py27_GetBuffer(object obj, Py_buffer *view, int flags) except -1: * # Python 3 buffer interface (PEP 3118) * if PyObject_CheckBuffer(obj): # <<<<<<<<<<<<<< * return PyObject_GetBuffer(obj, view, flags) * # Python 2 buffer interface (legacy) */ __pyx_t_1 = (PyObject_CheckBuffer(__pyx_v_obj) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asbuffer.pxi":124 * # Python 3 buffer interface (PEP 3118) * if PyObject_CheckBuffer(obj): * return PyObject_GetBuffer(obj, view, flags) # <<<<<<<<<<<<<< * # Python 2 buffer interface (legacy) * view.readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE */ __pyx_t_2 = PyObject_GetBuffer(__pyx_v_obj, __pyx_v_view, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 124, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":123 * cdef int Py27_GetBuffer(object obj, Py_buffer *view, int flags) except -1: * # Python 3 buffer interface (PEP 3118) * if PyObject_CheckBuffer(obj): # <<<<<<<<<<<<<< * return PyObject_GetBuffer(obj, view, flags) * # Python 2 buffer interface (legacy) */ } /* "mpi4py/MPI/asbuffer.pxi":126 * return PyObject_GetBuffer(obj, view, flags) * # Python 2 buffer interface (legacy) * view.readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE # <<<<<<<<<<<<<< * _Py2_AsBuffer(obj, view.readonly, &view.buf, &view.len) * if view.buf == NULL and view.len == 0: view.buf = emptybuffer */ __pyx_v_view->readonly = ((__pyx_v_flags & PyBUF_WRITABLE) != PyBUF_WRITABLE); /* "mpi4py/MPI/asbuffer.pxi":127 * # Python 2 buffer interface (legacy) * view.readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE * _Py2_AsBuffer(obj, view.readonly, &view.buf, &view.len) # <<<<<<<<<<<<<< * if view.buf == NULL and view.len == 0: view.buf = emptybuffer * PyBuffer_FillInfo(view, obj, view.buf, view.len, view.readonly, flags) */ __pyx_t_2 = _Py2_AsBuffer(__pyx_v_obj, __pyx_v_view->readonly, (&__pyx_v_view->buf), (&__pyx_v_view->len)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 127, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":128 * view.readonly = (flags & PyBUF_WRITABLE) != PyBUF_WRITABLE * _Py2_AsBuffer(obj, view.readonly, &view.buf, &view.len) * if view.buf == NULL and view.len == 0: view.buf = emptybuffer # <<<<<<<<<<<<<< * PyBuffer_FillInfo(view, obj, view.buf, view.len, view.readonly, flags) * if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT */ __pyx_t_3 = ((__pyx_v_view->buf == NULL) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = ((__pyx_v_view->len == 0) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { __pyx_v_view->buf = ((void*)""); } /* "mpi4py/MPI/asbuffer.pxi":129 * _Py2_AsBuffer(obj, view.readonly, &view.buf, &view.len) * if view.buf == NULL and view.len == 0: view.buf = emptybuffer * PyBuffer_FillInfo(view, obj, view.buf, view.len, view.readonly, flags) # <<<<<<<<<<<<<< * if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT * return 0 */ __pyx_t_2 = PyBuffer_FillInfo(__pyx_v_view, __pyx_v_obj, __pyx_v_view->buf, __pyx_v_view->len, __pyx_v_view->readonly, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 129, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":130 * if view.buf == NULL and view.len == 0: view.buf = emptybuffer * PyBuffer_FillInfo(view, obj, view.buf, view.len, view.readonly, flags) * if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = (((__pyx_v_flags & PyBUF_FORMAT) == PyBUF_FORMAT) != 0); if (__pyx_t_1) { __pyx_v_view->format = __pyx_v_6mpi4py_3MPI_BYTE_FMT; } /* "mpi4py/MPI/asbuffer.pxi":131 * PyBuffer_FillInfo(view, obj, view.buf, view.len, view.readonly, flags) * if (flags & PyBUF_FORMAT) == PyBUF_FORMAT: view.format = BYTE_FMT * return 0 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":121 * #------------------------------------------------------------------------------ * * cdef int Py27_GetBuffer(object obj, Py_buffer *view, int flags) except -1: # <<<<<<<<<<<<<< * # Python 3 buffer interface (PEP 3118) * if PyObject_CheckBuffer(obj): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Py27_GetBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":135 * #------------------------------------------------------------------------------ * * cdef int PyMPI_GetBuffer(object obj, Py_buffer *view, int flags) except -1: # <<<<<<<<<<<<<< * if PYPY: return PyPy_GetBuffer(obj, view, flags) * if PY2: return Py27_GetBuffer(obj, view, flags) */ static int __pyx_f_6mpi4py_3MPI_PyMPI_GetBuffer(PyObject *__pyx_v_obj, Py_buffer *__pyx_v_view, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("PyMPI_GetBuffer", 0); /* "mpi4py/MPI/asbuffer.pxi":136 * * cdef int PyMPI_GetBuffer(object obj, Py_buffer *view, int flags) except -1: * if PYPY: return PyPy_GetBuffer(obj, view, flags) # <<<<<<<<<<<<<< * if PY2: return Py27_GetBuffer(obj, view, flags) * return PyObject_GetBuffer(obj, view, flags) */ if (PyMPI_RUNTIME_PYPY) { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyPy_GetBuffer(__pyx_v_obj, __pyx_v_view, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 136, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; } /* "mpi4py/MPI/asbuffer.pxi":137 * cdef int PyMPI_GetBuffer(object obj, Py_buffer *view, int flags) except -1: * if PYPY: return PyPy_GetBuffer(obj, view, flags) * if PY2: return Py27_GetBuffer(obj, view, flags) # <<<<<<<<<<<<<< * return PyObject_GetBuffer(obj, view, flags) * */ if ((PY_MAJOR_VERSION==2)) { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_Py27_GetBuffer(__pyx_v_obj, __pyx_v_view, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 137, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; } /* "mpi4py/MPI/asbuffer.pxi":138 * if PYPY: return PyPy_GetBuffer(obj, view, flags) * if PY2: return Py27_GetBuffer(obj, view, flags) * return PyObject_GetBuffer(obj, view, flags) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_t_1 = PyObject_GetBuffer(__pyx_v_obj, __pyx_v_view, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 138, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":135 * #------------------------------------------------------------------------------ * * cdef int PyMPI_GetBuffer(object obj, Py_buffer *view, int flags) except -1: # <<<<<<<<<<<<<< * if PYPY: return PyPy_GetBuffer(obj, view, flags) * if PY2: return Py27_GetBuffer(obj, view, flags) */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPI_GetBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":151 * cdef Py_buffer view * * def __cinit__(self): # <<<<<<<<<<<<<< * PyBuffer_FillInfo(&self.view, NULL, * NULL, 0, 0, PyBUF_SIMPLE) */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6memory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6memory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory___cinit__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6memory___cinit__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/asbuffer.pxi":152 * * def __cinit__(self): * PyBuffer_FillInfo(&self.view, NULL, # <<<<<<<<<<<<<< * NULL, 0, 0, PyBUF_SIMPLE) * */ __pyx_t_1 = PyBuffer_FillInfo((&__pyx_v_self->view), ((PyObject *)NULL), NULL, 0, 0, PyBUF_SIMPLE); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 152, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":151 * cdef Py_buffer view * * def __cinit__(self): # <<<<<<<<<<<<<< * PyBuffer_FillInfo(&self.view, NULL, * NULL, 0, 0, PyBUF_SIMPLE) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.memory.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":155 * NULL, 0, 0, PyBUF_SIMPLE) * * def __dealloc__(self): # <<<<<<<<<<<<<< * PyBuffer_Release(&self.view) * */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_6memory_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_6memory_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_6memory_2__dealloc__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_6memory_2__dealloc__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/asbuffer.pxi":156 * * def __dealloc__(self): * PyBuffer_Release(&self.view) # <<<<<<<<<<<<<< * * @staticmethod */ PyBuffer_Release((&__pyx_v_self->view)); /* "mpi4py/MPI/asbuffer.pxi":155 * NULL, 0, 0, PyBUF_SIMPLE) * * def __dealloc__(self): # <<<<<<<<<<<<<< * PyBuffer_Release(&self.view) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/asbuffer.pxi":159 * * @staticmethod * def frombuffer(obj, bint readonly=False): # <<<<<<<<<<<<<< * """Memory from buffer-like object""" * cdef int flags = PyBUF_SIMPLE */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_5frombuffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6memory_4frombuffer[] = "memory.frombuffer(obj, bool readonly=False)\nMemory from buffer-like object"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_6memory_5frombuffer = {"frombuffer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6memory_5frombuffer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6memory_4frombuffer}; static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_5frombuffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_readonly; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("frombuffer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_readonly,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_readonly); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "frombuffer") < 0)) __PYX_ERR(0, 159, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; if (values[1]) { __pyx_v_readonly = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_readonly == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 159, __pyx_L3_error) } else { __pyx_v_readonly = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("frombuffer", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 159, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.memory.frombuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_4frombuffer(__pyx_v_obj, __pyx_v_readonly); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_4frombuffer(PyObject *__pyx_v_obj, int __pyx_v_readonly) { int __pyx_v_flags; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_mem = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("frombuffer", 0); /* "mpi4py/MPI/asbuffer.pxi":161 * def frombuffer(obj, bint readonly=False): * """Memory from buffer-like object""" * cdef int flags = PyBUF_SIMPLE # <<<<<<<<<<<<<< * if not readonly: flags |= PyBUF_WRITABLE * cdef memory mem = memory.__new__(memory) */ __pyx_v_flags = PyBUF_SIMPLE; /* "mpi4py/MPI/asbuffer.pxi":162 * """Memory from buffer-like object""" * cdef int flags = PyBUF_SIMPLE * if not readonly: flags |= PyBUF_WRITABLE # <<<<<<<<<<<<<< * cdef memory mem = memory.__new__(memory) * PyMPI_GetBuffer(obj, &mem.view, flags) */ __pyx_t_1 = ((!(__pyx_v_readonly != 0)) != 0); if (__pyx_t_1) { __pyx_v_flags = (__pyx_v_flags | PyBUF_WRITABLE); } /* "mpi4py/MPI/asbuffer.pxi":163 * cdef int flags = PyBUF_SIMPLE * if not readonly: flags |= PyBUF_WRITABLE * cdef memory mem = memory.__new__(memory) # <<<<<<<<<<<<<< * PyMPI_GetBuffer(obj, &mem.view, flags) * mem.view.readonly = readonly */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_memory(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_memory), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_mem = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/asbuffer.pxi":164 * if not readonly: flags |= PyBUF_WRITABLE * cdef memory mem = memory.__new__(memory) * PyMPI_GetBuffer(obj, &mem.view, flags) # <<<<<<<<<<<<<< * mem.view.readonly = readonly * return mem */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_GetBuffer(__pyx_v_obj, (&__pyx_v_mem->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 164, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":165 * cdef memory mem = memory.__new__(memory) * PyMPI_GetBuffer(obj, &mem.view, flags) * mem.view.readonly = readonly # <<<<<<<<<<<<<< * return mem * */ __pyx_v_mem->view.readonly = __pyx_v_readonly; /* "mpi4py/MPI/asbuffer.pxi":166 * PyMPI_GetBuffer(obj, &mem.view, flags) * mem.view.readonly = readonly * return mem # <<<<<<<<<<<<<< * * @staticmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_mem)); __pyx_r = ((PyObject *)__pyx_v_mem); goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":159 * * @staticmethod * def frombuffer(obj, bint readonly=False): # <<<<<<<<<<<<<< * """Memory from buffer-like object""" * cdef int flags = PyBUF_SIMPLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.memory.frombuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_mem); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":169 * * @staticmethod * def fromaddress(address, nbytes, bint readonly=False): # <<<<<<<<<<<<<< * """Memory from address and size in bytes""" * cdef void *buf = PyLong_AsVoidPtr(address) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_7fromaddress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6memory_6fromaddress[] = "memory.fromaddress(address, nbytes, bool readonly=False)\nMemory from address and size in bytes"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_6memory_7fromaddress = {"fromaddress", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6memory_7fromaddress, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6memory_6fromaddress}; static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_7fromaddress(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_address = 0; PyObject *__pyx_v_nbytes = 0; int __pyx_v_readonly; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fromaddress (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_address,&__pyx_n_s_nbytes,&__pyx_n_s_readonly,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_address)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nbytes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("fromaddress", 0, 2, 3, 1); __PYX_ERR(0, 169, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_readonly); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromaddress") < 0)) __PYX_ERR(0, 169, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_address = values[0]; __pyx_v_nbytes = values[1]; if (values[2]) { __pyx_v_readonly = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_readonly == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 169, __pyx_L3_error) } else { __pyx_v_readonly = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fromaddress", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 169, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.memory.fromaddress", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_6fromaddress(__pyx_v_address, __pyx_v_nbytes, __pyx_v_readonly); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_6fromaddress(PyObject *__pyx_v_address, PyObject *__pyx_v_nbytes, int __pyx_v_readonly) { void *__pyx_v_buf; Py_ssize_t __pyx_v_size; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_mem = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("fromaddress", 0); /* "mpi4py/MPI/asbuffer.pxi":171 * def fromaddress(address, nbytes, bint readonly=False): * """Memory from address and size in bytes""" * cdef void *buf = PyLong_AsVoidPtr(address) # <<<<<<<<<<<<<< * cdef Py_ssize_t size = nbytes * if size < 0: */ __pyx_v_buf = PyLong_AsVoidPtr(__pyx_v_address); /* "mpi4py/MPI/asbuffer.pxi":172 * """Memory from address and size in bytes""" * cdef void *buf = PyLong_AsVoidPtr(address) * cdef Py_ssize_t size = nbytes # <<<<<<<<<<<<<< * if size < 0: * raise ValueError("expecting non-negative buffer length") */ __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_nbytes); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 172, __pyx_L1_error) __pyx_v_size = __pyx_t_1; /* "mpi4py/MPI/asbuffer.pxi":173 * cdef void *buf = PyLong_AsVoidPtr(address) * cdef Py_ssize_t size = nbytes * if size < 0: # <<<<<<<<<<<<<< * raise ValueError("expecting non-negative buffer length") * elif size > 0 and buf == NULL: */ __pyx_t_2 = ((__pyx_v_size < 0) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/asbuffer.pxi":174 * cdef Py_ssize_t size = nbytes * if size < 0: * raise ValueError("expecting non-negative buffer length") # <<<<<<<<<<<<<< * elif size > 0 and buf == NULL: * raise ValueError("expecting non-NULL address") */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 174, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":173 * cdef void *buf = PyLong_AsVoidPtr(address) * cdef Py_ssize_t size = nbytes * if size < 0: # <<<<<<<<<<<<<< * raise ValueError("expecting non-negative buffer length") * elif size > 0 and buf == NULL: */ } /* "mpi4py/MPI/asbuffer.pxi":175 * if size < 0: * raise ValueError("expecting non-negative buffer length") * elif size > 0 and buf == NULL: # <<<<<<<<<<<<<< * raise ValueError("expecting non-NULL address") * cdef memory mem = memory.__new__(memory) */ __pyx_t_4 = ((__pyx_v_size > 0) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = ((__pyx_v_buf == NULL) != 0); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/asbuffer.pxi":176 * raise ValueError("expecting non-negative buffer length") * elif size > 0 and buf == NULL: * raise ValueError("expecting non-NULL address") # <<<<<<<<<<<<<< * cdef memory mem = memory.__new__(memory) * PyBuffer_FillInfo(&mem.view, NULL, */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 176, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":175 * if size < 0: * raise ValueError("expecting non-negative buffer length") * elif size > 0 and buf == NULL: # <<<<<<<<<<<<<< * raise ValueError("expecting non-NULL address") * cdef memory mem = memory.__new__(memory) */ } /* "mpi4py/MPI/asbuffer.pxi":177 * elif size > 0 and buf == NULL: * raise ValueError("expecting non-NULL address") * cdef memory mem = memory.__new__(memory) # <<<<<<<<<<<<<< * PyBuffer_FillInfo(&mem.view, NULL, * buf, size, readonly, PyBUF_SIMPLE) */ __pyx_t_3 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_memory(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_memory), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_5 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_mem = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/asbuffer.pxi":178 * raise ValueError("expecting non-NULL address") * cdef memory mem = memory.__new__(memory) * PyBuffer_FillInfo(&mem.view, NULL, # <<<<<<<<<<<<<< * buf, size, readonly, PyBUF_SIMPLE) * return mem */ __pyx_t_6 = PyBuffer_FillInfo((&__pyx_v_mem->view), ((PyObject *)NULL), __pyx_v_buf, __pyx_v_size, __pyx_v_readonly, PyBUF_SIMPLE); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 178, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":180 * PyBuffer_FillInfo(&mem.view, NULL, * buf, size, readonly, PyBUF_SIMPLE) * return mem # <<<<<<<<<<<<<< * * # properties */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_mem)); __pyx_r = ((PyObject *)__pyx_v_mem); goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":169 * * @staticmethod * def fromaddress(address, nbytes, bint readonly=False): # <<<<<<<<<<<<<< * """Memory from address and size in bytes""" * cdef void *buf = PyLong_AsVoidPtr(address) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.memory.fromaddress", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_mem); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":186 * property address: * """Memory address""" * def __get__(self): # <<<<<<<<<<<<<< * return PyLong_FromVoidPtr(self.view.buf) * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_7address_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_7address_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_7address___get__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_7address___get__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/asbuffer.pxi":187 * """Memory address""" * def __get__(self): * return PyLong_FromVoidPtr(self.view.buf) # <<<<<<<<<<<<<< * * property nbytes: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyLong_FromVoidPtr(__pyx_v_self->view.buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":186 * property address: * """Memory address""" * def __get__(self): # <<<<<<<<<<<<<< * return PyLong_FromVoidPtr(self.view.buf) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.memory.address.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":191 * property nbytes: * """Memory size (in bytes)""" * def __get__(self): # <<<<<<<<<<<<<< * return self.view.len * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_6nbytes_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_6nbytes___get__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_6nbytes___get__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/asbuffer.pxi":192 * """Memory size (in bytes)""" * def __get__(self): * return self.view.len # <<<<<<<<<<<<<< * * property readonly: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":191 * property nbytes: * """Memory size (in bytes)""" * def __get__(self): # <<<<<<<<<<<<<< * return self.view.len * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.memory.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":196 * property readonly: * """Boolean indicating whether the memory is read-only""" * def __get__(self): # <<<<<<<<<<<<<< * return self.view.readonly * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_8readonly_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_8readonly_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_8readonly___get__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_8readonly___get__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/asbuffer.pxi":197 * """Boolean indicating whether the memory is read-only""" * def __get__(self): * return self.view.readonly # <<<<<<<<<<<<<< * * # convenience methods */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->view.readonly); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":196 * property readonly: * """Boolean indicating whether the memory is read-only""" * def __get__(self): # <<<<<<<<<<<<<< * return self.view.readonly * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.memory.readonly.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":201 * # convenience methods * * def tobytes(self): # <<<<<<<<<<<<<< * """Return the data in the buffer as a byte string""" * return PyBytes_FromStringAndSize(self.view.buf, self.view.len) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_9tobytes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6memory_8tobytes[] = "memory.tobytes(self)\nReturn the data in the buffer as a byte string"; static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_9tobytes(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tobytes (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("tobytes", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "tobytes", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_8tobytes(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_8tobytes(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("tobytes", 0); /* "mpi4py/MPI/asbuffer.pxi":203 * def tobytes(self): * """Return the data in the buffer as a byte string""" * return PyBytes_FromStringAndSize(self.view.buf, self.view.len) # <<<<<<<<<<<<<< * * def release(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyBytes_FromStringAndSize(((char *)__pyx_v_self->view.buf), __pyx_v_self->view.len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":201 * # convenience methods * * def tobytes(self): # <<<<<<<<<<<<<< * """Return the data in the buffer as a byte string""" * return PyBytes_FromStringAndSize(self.view.buf, self.view.len) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.memory.tobytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":205 * return PyBytes_FromStringAndSize(self.view.buf, self.view.len) * * def release(self): # <<<<<<<<<<<<<< * """Release the underlying buffer exposed by the memory object""" * PyBuffer_Release(&self.view) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_11release(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6memory_10release[] = "memory.release(self)\nRelease the underlying buffer exposed by the memory object"; static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_11release(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("release (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("release", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "release", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_10release(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_10release(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("release", 0); /* "mpi4py/MPI/asbuffer.pxi":207 * def release(self): * """Release the underlying buffer exposed by the memory object""" * PyBuffer_Release(&self.view) # <<<<<<<<<<<<<< * PyBuffer_FillInfo(&self.view, NULL, * NULL, 0, 0, PyBUF_SIMPLE) */ PyBuffer_Release((&__pyx_v_self->view)); /* "mpi4py/MPI/asbuffer.pxi":208 * """Release the underlying buffer exposed by the memory object""" * PyBuffer_Release(&self.view) * PyBuffer_FillInfo(&self.view, NULL, # <<<<<<<<<<<<<< * NULL, 0, 0, PyBUF_SIMPLE) * */ __pyx_t_1 = PyBuffer_FillInfo((&__pyx_v_self->view), ((PyObject *)NULL), NULL, 0, 0, PyBUF_SIMPLE); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 208, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":205 * return PyBytes_FromStringAndSize(self.view.buf, self.view.len) * * def release(self): # <<<<<<<<<<<<<< * """Release the underlying buffer exposed by the memory object""" * PyBuffer_Release(&self.view) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.memory.release", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":213 * # buffer interface (PEP 3118) * * def __getbuffer__(self, Py_buffer *view, int flags): # <<<<<<<<<<<<<< * if view.obj == Py_None: Py_CLEAR(view.obj) * PyBuffer_FillInfo(view, self, */ /* Python wrapper */ static CYTHON_UNUSED int __pyx_pw_6mpi4py_3MPI_6memory_13__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_view, int __pyx_v_flags); /*proto*/ static CYTHON_UNUSED int __pyx_pw_6mpi4py_3MPI_6memory_13__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_view, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_12__getbuffer__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self), ((Py_buffer *)__pyx_v_view), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6memory_12__getbuffer__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, Py_buffer *__pyx_v_view, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; if (__pyx_v_view == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_view->obj = NULL; /* "mpi4py/MPI/asbuffer.pxi":214 * * def __getbuffer__(self, Py_buffer *view, int flags): * if view.obj == Py_None: Py_CLEAR(view.obj) # <<<<<<<<<<<<<< * PyBuffer_FillInfo(view, self, * self.view.buf, self.view.len, */ __pyx_t_1 = ((__pyx_v_view->obj == Py_None) != 0); if (__pyx_t_1) { Py_CLEAR(__pyx_v_view->obj); } /* "mpi4py/MPI/asbuffer.pxi":215 * def __getbuffer__(self, Py_buffer *view, int flags): * if view.obj == Py_None: Py_CLEAR(view.obj) * PyBuffer_FillInfo(view, self, # <<<<<<<<<<<<<< * self.view.buf, self.view.len, * self.view.readonly, flags) */ __pyx_t_2 = PyBuffer_FillInfo(__pyx_v_view, ((PyObject *)__pyx_v_self), __pyx_v_self->view.buf, __pyx_v_self->view.len, __pyx_v_self->view.readonly, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 215, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":213 * # buffer interface (PEP 3118) * * def __getbuffer__(self, Py_buffer *view, int flags): # <<<<<<<<<<<<<< * if view.obj == Py_None: Py_CLEAR(view.obj) * PyBuffer_FillInfo(view, self, */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.memory.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; Py_CLEAR(__pyx_v_view->obj); goto __pyx_L2; __pyx_L0:; __pyx_L2:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":221 * # buffer interface (legacy) * * def __getsegcount__(self, Py_ssize_t *lenp): # <<<<<<<<<<<<<< * if lenp != NULL: * lenp[0] = self.view.len */ /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pw_6mpi4py_3MPI_6memory_15__getsegcount__(PyObject *__pyx_v_self, Py_ssize_t *__pyx_v_lenp); /*proto*/ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_6memory_15__getsegcount__(PyObject *__pyx_v_self, Py_ssize_t *__pyx_v_lenp) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getsegcount__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_14__getsegcount__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self), ((Py_ssize_t *)__pyx_v_lenp)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_6memory_14__getsegcount__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, Py_ssize_t *__pyx_v_lenp) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("__getsegcount__", 0); /* "mpi4py/MPI/asbuffer.pxi":222 * * def __getsegcount__(self, Py_ssize_t *lenp): * if lenp != NULL: # <<<<<<<<<<<<<< * lenp[0] = self.view.len * return 1 */ __pyx_t_1 = ((__pyx_v_lenp != NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asbuffer.pxi":223 * def __getsegcount__(self, Py_ssize_t *lenp): * if lenp != NULL: * lenp[0] = self.view.len # <<<<<<<<<<<<<< * return 1 * */ __pyx_t_2 = __pyx_v_self->view.len; (__pyx_v_lenp[0]) = __pyx_t_2; /* "mpi4py/MPI/asbuffer.pxi":222 * * def __getsegcount__(self, Py_ssize_t *lenp): * if lenp != NULL: # <<<<<<<<<<<<<< * lenp[0] = self.view.len * return 1 */ } /* "mpi4py/MPI/asbuffer.pxi":224 * if lenp != NULL: * lenp[0] = self.view.len * return 1 # <<<<<<<<<<<<<< * * def __getreadbuffer__(self, Py_ssize_t idx, void **p): */ __pyx_r = 1; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":221 * # buffer interface (legacy) * * def __getsegcount__(self, Py_ssize_t *lenp): # <<<<<<<<<<<<<< * if lenp != NULL: * lenp[0] = self.view.len */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ /* "mpi4py/MPI/asbuffer.pxi":226 * return 1 * * def __getreadbuffer__(self, Py_ssize_t idx, void **p): # <<<<<<<<<<<<<< * if idx != 0: * raise SystemError("accessing non-existent buffer segment") */ /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pw_6mpi4py_3MPI_6memory_17__getreadbuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p); /*proto*/ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_6memory_17__getreadbuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getreadbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_16__getreadbuffer__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self), ((Py_ssize_t)__pyx_v_idx), ((void **)__pyx_v_p)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_6memory_16__getreadbuffer__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; void *__pyx_t_3; __Pyx_RefNannySetupContext("__getreadbuffer__", 0); /* "mpi4py/MPI/asbuffer.pxi":227 * * def __getreadbuffer__(self, Py_ssize_t idx, void **p): * if idx != 0: # <<<<<<<<<<<<<< * raise SystemError("accessing non-existent buffer segment") * p[0] = self.view.buf */ __pyx_t_1 = ((__pyx_v_idx != 0) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/asbuffer.pxi":228 * def __getreadbuffer__(self, Py_ssize_t idx, void **p): * if idx != 0: * raise SystemError("accessing non-existent buffer segment") # <<<<<<<<<<<<<< * p[0] = self.view.buf * return self.view.len */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_SystemError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 228, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":227 * * def __getreadbuffer__(self, Py_ssize_t idx, void **p): * if idx != 0: # <<<<<<<<<<<<<< * raise SystemError("accessing non-existent buffer segment") * p[0] = self.view.buf */ } /* "mpi4py/MPI/asbuffer.pxi":229 * if idx != 0: * raise SystemError("accessing non-existent buffer segment") * p[0] = self.view.buf # <<<<<<<<<<<<<< * return self.view.len * */ __pyx_t_3 = __pyx_v_self->view.buf; (__pyx_v_p[0]) = __pyx_t_3; /* "mpi4py/MPI/asbuffer.pxi":230 * raise SystemError("accessing non-existent buffer segment") * p[0] = self.view.buf * return self.view.len # <<<<<<<<<<<<<< * * def __getwritebuffer__(self, Py_ssize_t idx, void **p): */ __pyx_r = __pyx_v_self->view.len; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":226 * return 1 * * def __getreadbuffer__(self, Py_ssize_t idx, void **p): # <<<<<<<<<<<<<< * if idx != 0: * raise SystemError("accessing non-existent buffer segment") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.memory.__getreadbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ /* "mpi4py/MPI/asbuffer.pxi":232 * return self.view.len * * def __getwritebuffer__(self, Py_ssize_t idx, void **p): # <<<<<<<<<<<<<< * if self.view.readonly: * raise TypeError("memory buffer is read-only") */ /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pw_6mpi4py_3MPI_6memory_19__getwritebuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p); /*proto*/ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_6memory_19__getwritebuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getwritebuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_18__getwritebuffer__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self), ((Py_ssize_t)__pyx_v_idx), ((void **)__pyx_v_p)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_6memory_18__getwritebuffer__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_p) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; void *__pyx_t_3; __Pyx_RefNannySetupContext("__getwritebuffer__", 0); /* "mpi4py/MPI/asbuffer.pxi":233 * * def __getwritebuffer__(self, Py_ssize_t idx, void **p): * if self.view.readonly: # <<<<<<<<<<<<<< * raise TypeError("memory buffer is read-only") * if idx != 0: */ __pyx_t_1 = (__pyx_v_self->view.readonly != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/asbuffer.pxi":234 * def __getwritebuffer__(self, Py_ssize_t idx, void **p): * if self.view.readonly: * raise TypeError("memory buffer is read-only") # <<<<<<<<<<<<<< * if idx != 0: * raise SystemError("accessing non-existent buffer segment") */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 234, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":233 * * def __getwritebuffer__(self, Py_ssize_t idx, void **p): * if self.view.readonly: # <<<<<<<<<<<<<< * raise TypeError("memory buffer is read-only") * if idx != 0: */ } /* "mpi4py/MPI/asbuffer.pxi":235 * if self.view.readonly: * raise TypeError("memory buffer is read-only") * if idx != 0: # <<<<<<<<<<<<<< * raise SystemError("accessing non-existent buffer segment") * p[0] = self.view.buf */ __pyx_t_1 = ((__pyx_v_idx != 0) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/asbuffer.pxi":236 * raise TypeError("memory buffer is read-only") * if idx != 0: * raise SystemError("accessing non-existent buffer segment") # <<<<<<<<<<<<<< * p[0] = self.view.buf * return self.view.len */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_SystemError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 236, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":235 * if self.view.readonly: * raise TypeError("memory buffer is read-only") * if idx != 0: # <<<<<<<<<<<<<< * raise SystemError("accessing non-existent buffer segment") * p[0] = self.view.buf */ } /* "mpi4py/MPI/asbuffer.pxi":237 * if idx != 0: * raise SystemError("accessing non-existent buffer segment") * p[0] = self.view.buf # <<<<<<<<<<<<<< * return self.view.len * */ __pyx_t_3 = __pyx_v_self->view.buf; (__pyx_v_p[0]) = __pyx_t_3; /* "mpi4py/MPI/asbuffer.pxi":238 * raise SystemError("accessing non-existent buffer segment") * p[0] = self.view.buf * return self.view.len # <<<<<<<<<<<<<< * * # sequence interface (basic) */ __pyx_r = __pyx_v_self->view.len; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":232 * return self.view.len * * def __getwritebuffer__(self, Py_ssize_t idx, void **p): # <<<<<<<<<<<<<< * if self.view.readonly: * raise TypeError("memory buffer is read-only") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.memory.__getwritebuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ /* "mpi4py/MPI/asbuffer.pxi":242 * # sequence interface (basic) * * def __len__(self): # <<<<<<<<<<<<<< * return self.view.len * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_6memory_21__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_6memory_21__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_20__len__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6mpi4py_3MPI_6memory_20__len__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); /* "mpi4py/MPI/asbuffer.pxi":243 * * def __len__(self): * return self.view.len # <<<<<<<<<<<<<< * * def __getitem__(self, object item): */ __pyx_r = __pyx_v_self->view.len; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":242 * # sequence interface (basic) * * def __len__(self): # <<<<<<<<<<<<<< * return self.view.len * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":245 * return self.view.len * * def __getitem__(self, object item): # <<<<<<<<<<<<<< * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 * cdef unsigned char *buf = self.view.buf */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_23__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6memory_23__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_22__getitem__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6memory_22__getitem__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, PyObject *__pyx_v_item) { Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; Py_ssize_t __pyx_v_step; Py_ssize_t __pyx_v_slen; unsigned char *__pyx_v_buf; Py_ssize_t __pyx_v_blen; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("__getitem__", 0); /* "mpi4py/MPI/asbuffer.pxi":246 * * def __getitem__(self, object item): * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 # <<<<<<<<<<<<<< * cdef unsigned char *buf = self.view.buf * cdef Py_ssize_t blen = self.view.len */ __pyx_v_start = 0; __pyx_v_stop = 0; __pyx_v_step = 1; __pyx_v_slen = 0; /* "mpi4py/MPI/asbuffer.pxi":247 * def __getitem__(self, object item): * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 * cdef unsigned char *buf = self.view.buf # <<<<<<<<<<<<<< * cdef Py_ssize_t blen = self.view.len * if PyIndex_Check(item): */ __pyx_v_buf = ((unsigned char *)__pyx_v_self->view.buf); /* "mpi4py/MPI/asbuffer.pxi":248 * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 * cdef unsigned char *buf = self.view.buf * cdef Py_ssize_t blen = self.view.len # <<<<<<<<<<<<<< * if PyIndex_Check(item): * start = PyNumber_AsSsize_t(item, IndexError) */ __pyx_t_1 = __pyx_v_self->view.len; __pyx_v_blen = __pyx_t_1; /* "mpi4py/MPI/asbuffer.pxi":249 * cdef unsigned char *buf = self.view.buf * cdef Py_ssize_t blen = self.view.len * if PyIndex_Check(item): # <<<<<<<<<<<<<< * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen */ __pyx_t_2 = (PyIndex_Check(__pyx_v_item) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/asbuffer.pxi":250 * cdef Py_ssize_t blen = self.view.len * if PyIndex_Check(item): * start = PyNumber_AsSsize_t(item, IndexError) # <<<<<<<<<<<<<< * if start < 0: start += blen * if start < 0 or start >= blen: */ __pyx_t_1 = PyNumber_AsSsize_t(__pyx_v_item, __pyx_builtin_IndexError); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 250, __pyx_L1_error) __pyx_v_start = __pyx_t_1; /* "mpi4py/MPI/asbuffer.pxi":251 * if PyIndex_Check(item): * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen # <<<<<<<<<<<<<< * if start < 0 or start >= blen: * raise IndexError("index out of range") */ __pyx_t_2 = ((__pyx_v_start < 0) != 0); if (__pyx_t_2) { __pyx_v_start = (__pyx_v_start + __pyx_v_blen); } /* "mpi4py/MPI/asbuffer.pxi":252 * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen * if start < 0 or start >= blen: # <<<<<<<<<<<<<< * raise IndexError("index out of range") * return buf[start] */ __pyx_t_3 = ((__pyx_v_start < 0) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = ((__pyx_v_start >= __pyx_v_blen) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L6_bool_binop_done:; if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/asbuffer.pxi":253 * if start < 0: start += blen * if start < 0 or start >= blen: * raise IndexError("index out of range") # <<<<<<<<<<<<<< * return buf[start] * elif PySlice_Check(item): */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 253, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":252 * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen * if start < 0 or start >= blen: # <<<<<<<<<<<<<< * raise IndexError("index out of range") * return buf[start] */ } /* "mpi4py/MPI/asbuffer.pxi":254 * if start < 0 or start >= blen: * raise IndexError("index out of range") * return buf[start] # <<<<<<<<<<<<<< * elif PySlice_Check(item): * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_long(((long)(__pyx_v_buf[__pyx_v_start]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":249 * cdef unsigned char *buf = self.view.buf * cdef Py_ssize_t blen = self.view.len * if PyIndex_Check(item): # <<<<<<<<<<<<<< * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen */ } /* "mpi4py/MPI/asbuffer.pxi":255 * raise IndexError("index out of range") * return buf[start] * elif PySlice_Check(item): # <<<<<<<<<<<<<< * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") */ __pyx_t_2 = (PySlice_Check(__pyx_v_item) != 0); if (likely(__pyx_t_2)) { /* "mpi4py/MPI/asbuffer.pxi":256 * return buf[start] * elif PySlice_Check(item): * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) # <<<<<<<<<<<<<< * if step != 1: raise IndexError("slice with step not supported") * return asbuffer(self, buf+start, slen, self.view.readonly) */ __pyx_t_5 = PySlice_GetIndicesEx(__pyx_v_item, __pyx_v_blen, (&__pyx_v_start), (&__pyx_v_stop), (&__pyx_v_step), (&__pyx_v_slen)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 256, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":257 * elif PySlice_Check(item): * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") # <<<<<<<<<<<<<< * return asbuffer(self, buf+start, slen, self.view.readonly) * else: */ __pyx_t_2 = ((__pyx_v_step != 1) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 257, __pyx_L1_error) } /* "mpi4py/MPI/asbuffer.pxi":258 * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") * return asbuffer(self, buf+start, slen, self.view.readonly) # <<<<<<<<<<<<<< * else: * raise TypeError("index must be integer or slice") */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = ((PyObject *)__pyx_f_6mpi4py_3MPI_asbuffer(((PyObject *)__pyx_v_self), (__pyx_v_buf + __pyx_v_start), __pyx_v_slen, __pyx_v_self->view.readonly)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":255 * raise IndexError("index out of range") * return buf[start] * elif PySlice_Check(item): # <<<<<<<<<<<<<< * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") */ } /* "mpi4py/MPI/asbuffer.pxi":260 * return asbuffer(self, buf+start, slen, self.view.readonly) * else: * raise TypeError("index must be integer or slice") # <<<<<<<<<<<<<< * * def __setitem__(self, object item, object value): */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 260, __pyx_L1_error) } /* "mpi4py/MPI/asbuffer.pxi":245 * return self.view.len * * def __getitem__(self, object item): # <<<<<<<<<<<<<< * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 * cdef unsigned char *buf = self.view.buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.memory.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":262 * raise TypeError("index must be integer or slice") * * def __setitem__(self, object item, object value): # <<<<<<<<<<<<<< * if self.view.readonly: * raise TypeError("memory buffer is read-only") */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6memory_25__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6memory_25__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6memory_24__setitem__(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6memory_24__setitem__(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) { Py_ssize_t __pyx_v_start; Py_ssize_t __pyx_v_stop; Py_ssize_t __pyx_v_step; Py_ssize_t __pyx_v_slen; unsigned char *__pyx_v_buf; Py_ssize_t __pyx_v_blen; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_inmem = 0; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; int __pyx_t_4; unsigned char __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("__setitem__", 0); /* "mpi4py/MPI/asbuffer.pxi":263 * * def __setitem__(self, object item, object value): * if self.view.readonly: # <<<<<<<<<<<<<< * raise TypeError("memory buffer is read-only") * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 */ __pyx_t_1 = (__pyx_v_self->view.readonly != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/asbuffer.pxi":264 * def __setitem__(self, object item, object value): * if self.view.readonly: * raise TypeError("memory buffer is read-only") # <<<<<<<<<<<<<< * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 * cdef unsigned char *buf = self.view.buf */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 264, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":263 * * def __setitem__(self, object item, object value): * if self.view.readonly: # <<<<<<<<<<<<<< * raise TypeError("memory buffer is read-only") * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 */ } /* "mpi4py/MPI/asbuffer.pxi":265 * if self.view.readonly: * raise TypeError("memory buffer is read-only") * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 # <<<<<<<<<<<<<< * cdef unsigned char *buf = self.view.buf * cdef Py_ssize_t blen = self.view.len */ __pyx_v_start = 0; __pyx_v_stop = 0; __pyx_v_step = 1; __pyx_v_slen = 0; /* "mpi4py/MPI/asbuffer.pxi":266 * raise TypeError("memory buffer is read-only") * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 * cdef unsigned char *buf = self.view.buf # <<<<<<<<<<<<<< * cdef Py_ssize_t blen = self.view.len * cdef memory inmem */ __pyx_v_buf = ((unsigned char *)__pyx_v_self->view.buf); /* "mpi4py/MPI/asbuffer.pxi":267 * cdef Py_ssize_t start=0, stop=0, step=1, slen=0 * cdef unsigned char *buf = self.view.buf * cdef Py_ssize_t blen = self.view.len # <<<<<<<<<<<<<< * cdef memory inmem * if PyIndex_Check(item): */ __pyx_t_3 = __pyx_v_self->view.len; __pyx_v_blen = __pyx_t_3; /* "mpi4py/MPI/asbuffer.pxi":269 * cdef Py_ssize_t blen = self.view.len * cdef memory inmem * if PyIndex_Check(item): # <<<<<<<<<<<<<< * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen */ __pyx_t_1 = (PyIndex_Check(__pyx_v_item) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asbuffer.pxi":270 * cdef memory inmem * if PyIndex_Check(item): * start = PyNumber_AsSsize_t(item, IndexError) # <<<<<<<<<<<<<< * if start < 0: start += blen * if start < 0 or start >= blen: */ __pyx_t_3 = PyNumber_AsSsize_t(__pyx_v_item, __pyx_builtin_IndexError); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 270, __pyx_L1_error) __pyx_v_start = __pyx_t_3; /* "mpi4py/MPI/asbuffer.pxi":271 * if PyIndex_Check(item): * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen # <<<<<<<<<<<<<< * if start < 0 or start >= blen: * raise IndexError("index out of range") */ __pyx_t_1 = ((__pyx_v_start < 0) != 0); if (__pyx_t_1) { __pyx_v_start = (__pyx_v_start + __pyx_v_blen); } /* "mpi4py/MPI/asbuffer.pxi":272 * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen * if start < 0 or start >= blen: # <<<<<<<<<<<<<< * raise IndexError("index out of range") * buf[start] = value */ __pyx_t_4 = ((__pyx_v_start < 0) != 0); if (!__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L7_bool_binop_done; } __pyx_t_4 = ((__pyx_v_start >= __pyx_v_blen) != 0); __pyx_t_1 = __pyx_t_4; __pyx_L7_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/asbuffer.pxi":273 * if start < 0: start += blen * if start < 0 or start >= blen: * raise IndexError("index out of range") # <<<<<<<<<<<<<< * buf[start] = value * elif PySlice_Check(item): */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 273, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":272 * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen * if start < 0 or start >= blen: # <<<<<<<<<<<<<< * raise IndexError("index out of range") * buf[start] = value */ } /* "mpi4py/MPI/asbuffer.pxi":274 * if start < 0 or start >= blen: * raise IndexError("index out of range") * buf[start] = value # <<<<<<<<<<<<<< * elif PySlice_Check(item): * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) */ __pyx_t_5 = __Pyx_PyInt_As_unsigned_char(__pyx_v_value); if (unlikely((__pyx_t_5 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 274, __pyx_L1_error) (__pyx_v_buf[__pyx_v_start]) = ((unsigned char)__pyx_t_5); /* "mpi4py/MPI/asbuffer.pxi":269 * cdef Py_ssize_t blen = self.view.len * cdef memory inmem * if PyIndex_Check(item): # <<<<<<<<<<<<<< * start = PyNumber_AsSsize_t(item, IndexError) * if start < 0: start += blen */ goto __pyx_L4; } /* "mpi4py/MPI/asbuffer.pxi":275 * raise IndexError("index out of range") * buf[start] = value * elif PySlice_Check(item): # <<<<<<<<<<<<<< * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") */ __pyx_t_1 = (PySlice_Check(__pyx_v_item) != 0); if (likely(__pyx_t_1)) { /* "mpi4py/MPI/asbuffer.pxi":276 * buf[start] = value * elif PySlice_Check(item): * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) # <<<<<<<<<<<<<< * if step != 1: raise IndexError("slice with step not supported") * if PyIndex_Check(value): */ __pyx_t_6 = PySlice_GetIndicesEx(__pyx_v_item, __pyx_v_blen, (&__pyx_v_start), (&__pyx_v_stop), (&__pyx_v_step), (&__pyx_v_slen)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":277 * elif PySlice_Check(item): * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") # <<<<<<<<<<<<<< * if PyIndex_Check(value): * memset(buf+start, value, slen) */ __pyx_t_1 = ((__pyx_v_step != 1) != 0); if (unlikely(__pyx_t_1)) { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 277, __pyx_L1_error) } /* "mpi4py/MPI/asbuffer.pxi":278 * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") * if PyIndex_Check(value): # <<<<<<<<<<<<<< * memset(buf+start, value, slen) * else: */ __pyx_t_1 = (PyIndex_Check(__pyx_v_value) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asbuffer.pxi":279 * if step != 1: raise IndexError("slice with step not supported") * if PyIndex_Check(value): * memset(buf+start, value, slen) # <<<<<<<<<<<<<< * else: * inmem = getbuffer(value, 1, 0) */ __pyx_t_5 = __Pyx_PyInt_As_unsigned_char(__pyx_v_value); if (unlikely((__pyx_t_5 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L1_error) ((void)memset((__pyx_v_buf + __pyx_v_start), ((unsigned char)__pyx_t_5), ((size_t)__pyx_v_slen))); /* "mpi4py/MPI/asbuffer.pxi":278 * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") * if PyIndex_Check(value): # <<<<<<<<<<<<<< * memset(buf+start, value, slen) * else: */ goto __pyx_L10; } /* "mpi4py/MPI/asbuffer.pxi":281 * memset(buf+start, value, slen) * else: * inmem = getbuffer(value, 1, 0) # <<<<<<<<<<<<<< * if inmem.view.len != slen: * raise ValueError("slice length does not match buffer") */ /*else*/ { __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer(__pyx_v_value, 1, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_inmem = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/asbuffer.pxi":282 * else: * inmem = getbuffer(value, 1, 0) * if inmem.view.len != slen: # <<<<<<<<<<<<<< * raise ValueError("slice length does not match buffer") * memmove(buf+start, inmem.view.buf, slen) */ __pyx_t_1 = ((__pyx_v_inmem->view.len != __pyx_v_slen) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/asbuffer.pxi":283 * inmem = getbuffer(value, 1, 0) * if inmem.view.len != slen: * raise ValueError("slice length does not match buffer") # <<<<<<<<<<<<<< * memmove(buf+start, inmem.view.buf, slen) * else: */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 283, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":282 * else: * inmem = getbuffer(value, 1, 0) * if inmem.view.len != slen: # <<<<<<<<<<<<<< * raise ValueError("slice length does not match buffer") * memmove(buf+start, inmem.view.buf, slen) */ } /* "mpi4py/MPI/asbuffer.pxi":284 * if inmem.view.len != slen: * raise ValueError("slice length does not match buffer") * memmove(buf+start, inmem.view.buf, slen) # <<<<<<<<<<<<<< * else: * raise TypeError("index must be integer or slice") */ ((void)memmove((__pyx_v_buf + __pyx_v_start), __pyx_v_inmem->view.buf, ((size_t)__pyx_v_slen))); } __pyx_L10:; /* "mpi4py/MPI/asbuffer.pxi":275 * raise IndexError("index out of range") * buf[start] = value * elif PySlice_Check(item): # <<<<<<<<<<<<<< * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") */ goto __pyx_L4; } /* "mpi4py/MPI/asbuffer.pxi":286 * memmove(buf+start, inmem.view.buf, slen) * else: * raise TypeError("index must be integer or slice") # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 286, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/asbuffer.pxi":262 * raise TypeError("index must be integer or slice") * * def __setitem__(self, object item, object value): # <<<<<<<<<<<<<< * if self.view.readonly: * raise TypeError("memory buffer is read-only") */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.memory.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_inmem); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":290 * #------------------------------------------------------------------------------ * * cdef inline memory newbuffer(): # <<<<<<<<<<<<<< * return memory.__new__(memory) * */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_newbuffer(void) { struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("newbuffer", 0); /* "mpi4py/MPI/asbuffer.pxi":291 * * cdef inline memory newbuffer(): * return memory.__new__(memory) # <<<<<<<<<<<<<< * * cdef inline memory getbuffer(object ob, bint readonly, bint format): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_memory(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_memory), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_1))); __pyx_r = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":290 * #------------------------------------------------------------------------------ * * cdef inline memory newbuffer(): # <<<<<<<<<<<<<< * return memory.__new__(memory) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.newbuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":293 * return memory.__new__(memory) * * cdef inline memory getbuffer(object ob, bint readonly, bint format): # <<<<<<<<<<<<<< * cdef memory buf = newbuffer() * cdef int flags = PyBUF_ANY_CONTIGUOUS */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_getbuffer(PyObject *__pyx_v_ob, int __pyx_v_readonly, int __pyx_v_format) { struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_buf = 0; int __pyx_v_flags; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("getbuffer", 0); /* "mpi4py/MPI/asbuffer.pxi":294 * * cdef inline memory getbuffer(object ob, bint readonly, bint format): * cdef memory buf = newbuffer() # <<<<<<<<<<<<<< * cdef int flags = PyBUF_ANY_CONTIGUOUS * if not readonly: */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_newbuffer()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/asbuffer.pxi":295 * cdef inline memory getbuffer(object ob, bint readonly, bint format): * cdef memory buf = newbuffer() * cdef int flags = PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<< * if not readonly: * flags |= PyBUF_WRITABLE */ __pyx_v_flags = PyBUF_ANY_CONTIGUOUS; /* "mpi4py/MPI/asbuffer.pxi":296 * cdef memory buf = newbuffer() * cdef int flags = PyBUF_ANY_CONTIGUOUS * if not readonly: # <<<<<<<<<<<<<< * flags |= PyBUF_WRITABLE * if format: */ __pyx_t_2 = ((!(__pyx_v_readonly != 0)) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/asbuffer.pxi":297 * cdef int flags = PyBUF_ANY_CONTIGUOUS * if not readonly: * flags |= PyBUF_WRITABLE # <<<<<<<<<<<<<< * if format: * flags |= PyBUF_FORMAT */ __pyx_v_flags = (__pyx_v_flags | PyBUF_WRITABLE); /* "mpi4py/MPI/asbuffer.pxi":296 * cdef memory buf = newbuffer() * cdef int flags = PyBUF_ANY_CONTIGUOUS * if not readonly: # <<<<<<<<<<<<<< * flags |= PyBUF_WRITABLE * if format: */ } /* "mpi4py/MPI/asbuffer.pxi":298 * if not readonly: * flags |= PyBUF_WRITABLE * if format: # <<<<<<<<<<<<<< * flags |= PyBUF_FORMAT * PyMPI_GetBuffer(ob, &buf.view, flags) */ __pyx_t_2 = (__pyx_v_format != 0); if (__pyx_t_2) { /* "mpi4py/MPI/asbuffer.pxi":299 * flags |= PyBUF_WRITABLE * if format: * flags |= PyBUF_FORMAT # <<<<<<<<<<<<<< * PyMPI_GetBuffer(ob, &buf.view, flags) * return buf */ __pyx_v_flags = (__pyx_v_flags | PyBUF_FORMAT); /* "mpi4py/MPI/asbuffer.pxi":298 * if not readonly: * flags |= PyBUF_WRITABLE * if format: # <<<<<<<<<<<<<< * flags |= PyBUF_FORMAT * PyMPI_GetBuffer(ob, &buf.view, flags) */ } /* "mpi4py/MPI/asbuffer.pxi":300 * if format: * flags |= PyBUF_FORMAT * PyMPI_GetBuffer(ob, &buf.view, flags) # <<<<<<<<<<<<<< * return buf * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_GetBuffer(__pyx_v_ob, (&__pyx_v_buf->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 300, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":301 * flags |= PyBUF_FORMAT * PyMPI_GetBuffer(ob, &buf.view, flags) * return buf # <<<<<<<<<<<<<< * * cdef inline object getformat(memory buf): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_buf)); __pyx_r = __pyx_v_buf; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":293 * return memory.__new__(memory) * * cdef inline memory getbuffer(object ob, bint readonly, bint format): # <<<<<<<<<<<<<< * cdef memory buf = newbuffer() * cdef int flags = PyBUF_ANY_CONTIGUOUS */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.getbuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_buf); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":303 * return buf * * cdef inline object getformat(memory buf): # <<<<<<<<<<<<<< * cdef Py_buffer *view = &buf.view * # */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_getformat(struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_buf) { Py_buffer *__pyx_v_view; PyObject *__pyx_v_ob = 0; PyObject *__pyx_v_format = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("getformat", 0); /* "mpi4py/MPI/asbuffer.pxi":304 * * cdef inline object getformat(memory buf): * cdef Py_buffer *view = &buf.view # <<<<<<<<<<<<<< * # * if view.obj == NULL: */ __pyx_v_view = (&__pyx_v_buf->view); /* "mpi4py/MPI/asbuffer.pxi":306 * cdef Py_buffer *view = &buf.view * # * if view.obj == NULL: # <<<<<<<<<<<<<< * if view.format != NULL: * return pystr(view.format) */ __pyx_t_1 = ((__pyx_v_view->obj == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asbuffer.pxi":307 * # * if view.obj == NULL: * if view.format != NULL: # <<<<<<<<<<<<<< * return pystr(view.format) * else: */ __pyx_t_1 = ((__pyx_v_view->format != NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asbuffer.pxi":308 * if view.obj == NULL: * if view.format != NULL: * return pystr(view.format) # <<<<<<<<<<<<<< * else: * return "B" */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_pystr(__pyx_v_view->format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":307 * # * if view.obj == NULL: * if view.format != NULL: # <<<<<<<<<<<<<< * return pystr(view.format) * else: */ } /* "mpi4py/MPI/asbuffer.pxi":310 * return pystr(view.format) * else: * return "B" # <<<<<<<<<<<<<< * elif view.format != NULL: * # XXX this is a hack */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_B); __pyx_r = __pyx_n_s_B; goto __pyx_L0; } /* "mpi4py/MPI/asbuffer.pxi":306 * cdef Py_buffer *view = &buf.view * # * if view.obj == NULL: # <<<<<<<<<<<<<< * if view.format != NULL: * return pystr(view.format) */ } /* "mpi4py/MPI/asbuffer.pxi":311 * else: * return "B" * elif view.format != NULL: # <<<<<<<<<<<<<< * # XXX this is a hack * if view.format != BYTE_FMT: */ __pyx_t_1 = ((__pyx_v_view->format != NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asbuffer.pxi":313 * elif view.format != NULL: * # XXX this is a hack * if view.format != BYTE_FMT: # <<<<<<<<<<<<<< * return pystr(view.format) * # */ __pyx_t_1 = ((__pyx_v_view->format != __pyx_v_6mpi4py_3MPI_BYTE_FMT) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asbuffer.pxi":314 * # XXX this is a hack * if view.format != BYTE_FMT: * return pystr(view.format) # <<<<<<<<<<<<<< * # * cdef object ob = view.obj */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_pystr(__pyx_v_view->format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":313 * elif view.format != NULL: * # XXX this is a hack * if view.format != BYTE_FMT: # <<<<<<<<<<<<<< * return pystr(view.format) * # */ } /* "mpi4py/MPI/asbuffer.pxi":311 * else: * return "B" * elif view.format != NULL: # <<<<<<<<<<<<<< * # XXX this is a hack * if view.format != BYTE_FMT: */ } /* "mpi4py/MPI/asbuffer.pxi":316 * return pystr(view.format) * # * cdef object ob = view.obj # <<<<<<<<<<<<<< * cdef object format = None * try: # numpy.ndarray */ __pyx_t_2 = ((PyObject *)__pyx_v_view->obj); __Pyx_INCREF(__pyx_t_2); __pyx_v_ob = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/asbuffer.pxi":317 * # * cdef object ob = view.obj * cdef object format = None # <<<<<<<<<<<<<< * try: # numpy.ndarray * format = ob.dtype.char */ __Pyx_INCREF(Py_None); __pyx_v_format = Py_None; /* "mpi4py/MPI/asbuffer.pxi":318 * cdef object ob = view.obj * cdef object format = None * try: # numpy.ndarray # <<<<<<<<<<<<<< * format = ob.dtype.char * except (AttributeError, TypeError): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "mpi4py/MPI/asbuffer.pxi":319 * cdef object format = None * try: # numpy.ndarray * format = ob.dtype.char # <<<<<<<<<<<<<< * except (AttributeError, TypeError): * try: # array.array */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ob, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_char); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 319, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/asbuffer.pxi":318 * cdef object ob = view.obj * cdef object format = None * try: # numpy.ndarray # <<<<<<<<<<<<<< * format = ob.dtype.char * except (AttributeError, TypeError): */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/asbuffer.pxi":320 * try: # numpy.ndarray * format = ob.dtype.char * except (AttributeError, TypeError): # <<<<<<<<<<<<<< * try: # array.array * format = ob.typecode */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_7) { __Pyx_AddTraceback("mpi4py.MPI.getformat", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_8) < 0) __PYX_ERR(0, 320, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_8); /* "mpi4py/MPI/asbuffer.pxi":321 * format = ob.dtype.char * except (AttributeError, TypeError): * try: # array.array # <<<<<<<<<<<<<< * format = ob.typecode * except (AttributeError, TypeError): */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "mpi4py/MPI/asbuffer.pxi":322 * except (AttributeError, TypeError): * try: # array.array * format = ob.typecode # <<<<<<<<<<<<<< * except (AttributeError, TypeError): * if view.format != NULL: */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_ob, __pyx_n_s_typecode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 322, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_12); __pyx_t_12 = 0; /* "mpi4py/MPI/asbuffer.pxi":321 * format = ob.dtype.char * except (AttributeError, TypeError): * try: # array.array # <<<<<<<<<<<<<< * format = ob.typecode * except (AttributeError, TypeError): */ } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L21_try_end; __pyx_L14_error:; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; /* "mpi4py/MPI/asbuffer.pxi":323 * try: # array.array * format = ob.typecode * except (AttributeError, TypeError): # <<<<<<<<<<<<<< * if view.format != NULL: * format = pystr(view.format) */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); if (__pyx_t_7) { __Pyx_AddTraceback("mpi4py.MPI.getformat", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14) < 0) __PYX_ERR(0, 323, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_14); /* "mpi4py/MPI/asbuffer.pxi":324 * format = ob.typecode * except (AttributeError, TypeError): * if view.format != NULL: # <<<<<<<<<<<<<< * format = pystr(view.format) * return format */ __pyx_t_1 = ((__pyx_v_view->format != NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/asbuffer.pxi":325 * except (AttributeError, TypeError): * if view.format != NULL: * format = pystr(view.format) # <<<<<<<<<<<<<< * return format * */ __pyx_t_15 = __pyx_f_6mpi4py_3MPI_pystr(__pyx_v_view->format); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 325, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_15); __pyx_t_15 = 0; /* "mpi4py/MPI/asbuffer.pxi":324 * format = ob.typecode * except (AttributeError, TypeError): * if view.format != NULL: # <<<<<<<<<<<<<< * format = pystr(view.format) * return format */ } __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L15_exception_handled; } goto __pyx_L16_except_error; __pyx_L16_except_error:; /* "mpi4py/MPI/asbuffer.pxi":321 * format = ob.dtype.char * except (AttributeError, TypeError): * try: # array.array # <<<<<<<<<<<<<< * format = ob.typecode * except (AttributeError, TypeError): */ __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L8_except_error; __pyx_L15_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L21_try_end:; } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; __pyx_L8_except_error:; /* "mpi4py/MPI/asbuffer.pxi":318 * cdef object ob = view.obj * cdef object format = None * try: # numpy.ndarray # <<<<<<<<<<<<<< * format = ob.dtype.char * except (AttributeError, TypeError): */ __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L11_try_end:; } /* "mpi4py/MPI/asbuffer.pxi":326 * if view.format != NULL: * format = pystr(view.format) * return format # <<<<<<<<<<<<<< * * cdef inline memory getbuffer_r(object ob, void **base, MPI_Aint *size): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_format); __pyx_r = __pyx_v_format; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":303 * return buf * * cdef inline object getformat(memory buf): # <<<<<<<<<<<<<< * cdef Py_buffer *view = &buf.view * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("mpi4py.MPI.getformat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XDECREF(__pyx_v_format); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":328 * return format * * cdef inline memory getbuffer_r(object ob, void **base, MPI_Aint *size): # <<<<<<<<<<<<<< * cdef memory buf = getbuffer(ob, 1, 0) * if base != NULL: base[0] = buf.view.buf */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_getbuffer_r(PyObject *__pyx_v_ob, void **__pyx_v_base, MPI_Aint *__pyx_v_size) { struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_buf = 0; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; void *__pyx_t_3; Py_ssize_t __pyx_t_4; __Pyx_RefNannySetupContext("getbuffer_r", 0); /* "mpi4py/MPI/asbuffer.pxi":329 * * cdef inline memory getbuffer_r(object ob, void **base, MPI_Aint *size): * cdef memory buf = getbuffer(ob, 1, 0) # <<<<<<<<<<<<<< * if base != NULL: base[0] = buf.view.buf * if size != NULL: size[0] = buf.view.len */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer(__pyx_v_ob, 1, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/asbuffer.pxi":330 * cdef inline memory getbuffer_r(object ob, void **base, MPI_Aint *size): * cdef memory buf = getbuffer(ob, 1, 0) * if base != NULL: base[0] = buf.view.buf # <<<<<<<<<<<<<< * if size != NULL: size[0] = buf.view.len * return buf */ __pyx_t_2 = ((__pyx_v_base != NULL) != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_buf->view.buf; (__pyx_v_base[0]) = __pyx_t_3; } /* "mpi4py/MPI/asbuffer.pxi":331 * cdef memory buf = getbuffer(ob, 1, 0) * if base != NULL: base[0] = buf.view.buf * if size != NULL: size[0] = buf.view.len # <<<<<<<<<<<<<< * return buf * */ __pyx_t_2 = ((__pyx_v_size != NULL) != 0); if (__pyx_t_2) { __pyx_t_4 = __pyx_v_buf->view.len; (__pyx_v_size[0]) = __pyx_t_4; } /* "mpi4py/MPI/asbuffer.pxi":332 * if base != NULL: base[0] = buf.view.buf * if size != NULL: size[0] = buf.view.len * return buf # <<<<<<<<<<<<<< * * cdef inline memory getbuffer_w(object ob, void **base, MPI_Aint *size): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_buf)); __pyx_r = __pyx_v_buf; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":328 * return format * * cdef inline memory getbuffer_r(object ob, void **base, MPI_Aint *size): # <<<<<<<<<<<<<< * cdef memory buf = getbuffer(ob, 1, 0) * if base != NULL: base[0] = buf.view.buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.getbuffer_r", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_buf); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":334 * return buf * * cdef inline memory getbuffer_w(object ob, void **base, MPI_Aint *size): # <<<<<<<<<<<<<< * cdef memory buf = getbuffer(ob, 0, 0) * if base != NULL: base[0] = buf.view.buf */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_getbuffer_w(PyObject *__pyx_v_ob, void **__pyx_v_base, MPI_Aint *__pyx_v_size) { struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_buf = 0; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; void *__pyx_t_3; Py_ssize_t __pyx_t_4; __Pyx_RefNannySetupContext("getbuffer_w", 0); /* "mpi4py/MPI/asbuffer.pxi":335 * * cdef inline memory getbuffer_w(object ob, void **base, MPI_Aint *size): * cdef memory buf = getbuffer(ob, 0, 0) # <<<<<<<<<<<<<< * if base != NULL: base[0] = buf.view.buf * if size != NULL: size[0] = buf.view.len */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer(__pyx_v_ob, 0, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/asbuffer.pxi":336 * cdef inline memory getbuffer_w(object ob, void **base, MPI_Aint *size): * cdef memory buf = getbuffer(ob, 0, 0) * if base != NULL: base[0] = buf.view.buf # <<<<<<<<<<<<<< * if size != NULL: size[0] = buf.view.len * return buf */ __pyx_t_2 = ((__pyx_v_base != NULL) != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_v_buf->view.buf; (__pyx_v_base[0]) = __pyx_t_3; } /* "mpi4py/MPI/asbuffer.pxi":337 * cdef memory buf = getbuffer(ob, 0, 0) * if base != NULL: base[0] = buf.view.buf * if size != NULL: size[0] = buf.view.len # <<<<<<<<<<<<<< * return buf * */ __pyx_t_2 = ((__pyx_v_size != NULL) != 0); if (__pyx_t_2) { __pyx_t_4 = __pyx_v_buf->view.len; (__pyx_v_size[0]) = __pyx_t_4; } /* "mpi4py/MPI/asbuffer.pxi":338 * if base != NULL: base[0] = buf.view.buf * if size != NULL: size[0] = buf.view.len * return buf # <<<<<<<<<<<<<< * * cdef inline memory asbuffer(object ob, void *base, MPI_Aint size, bint ro): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_buf)); __pyx_r = __pyx_v_buf; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":334 * return buf * * cdef inline memory getbuffer_w(object ob, void **base, MPI_Aint *size): # <<<<<<<<<<<<<< * cdef memory buf = getbuffer(ob, 0, 0) * if base != NULL: base[0] = buf.view.buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.getbuffer_w", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_buf); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":340 * return buf * * cdef inline memory asbuffer(object ob, void *base, MPI_Aint size, bint ro): # <<<<<<<<<<<<<< * cdef memory buf = newbuffer() * PyBuffer_FillInfo(&buf.view, ob, base, size, ro, PyBUF_SIMPLE) */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_asbuffer(PyObject *__pyx_v_ob, void *__pyx_v_base, MPI_Aint __pyx_v_size, int __pyx_v_ro) { struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_buf = 0; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("asbuffer", 0); /* "mpi4py/MPI/asbuffer.pxi":341 * * cdef inline memory asbuffer(object ob, void *base, MPI_Aint size, bint ro): * cdef memory buf = newbuffer() # <<<<<<<<<<<<<< * PyBuffer_FillInfo(&buf.view, ob, base, size, ro, PyBUF_SIMPLE) * return buf */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_newbuffer()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/asbuffer.pxi":342 * cdef inline memory asbuffer(object ob, void *base, MPI_Aint size, bint ro): * cdef memory buf = newbuffer() * PyBuffer_FillInfo(&buf.view, ob, base, size, ro, PyBUF_SIMPLE) # <<<<<<<<<<<<<< * return buf * */ __pyx_t_2 = PyBuffer_FillInfo((&__pyx_v_buf->view), __pyx_v_ob, __pyx_v_base, __pyx_v_size, __pyx_v_ro, PyBUF_SIMPLE); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 342, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":343 * cdef memory buf = newbuffer() * PyBuffer_FillInfo(&buf.view, ob, base, size, ro, PyBUF_SIMPLE) * return buf # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_buf)); __pyx_r = __pyx_v_buf; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":340 * return buf * * cdef inline memory asbuffer(object ob, void *base, MPI_Aint size, bint ro): # <<<<<<<<<<<<<< * cdef memory buf = newbuffer() * PyBuffer_FillInfo(&buf.view, ob, base, size, ro, PyBUF_SIMPLE) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.asbuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_buf); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":347 * #------------------------------------------------------------------------------ * * cdef inline memory asmemory(object ob, void **base, MPI_Aint *size): # <<<<<<<<<<<<<< * cdef memory mem * if type(ob) is memory: */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_asmemory(PyObject *__pyx_v_ob, void **__pyx_v_base, MPI_Aint *__pyx_v_size) { struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_mem = 0; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; void *__pyx_t_4; Py_ssize_t __pyx_t_5; __Pyx_RefNannySetupContext("asmemory", 0); /* "mpi4py/MPI/asbuffer.pxi":349 * cdef inline memory asmemory(object ob, void **base, MPI_Aint *size): * cdef memory mem * if type(ob) is memory: # <<<<<<<<<<<<<< * mem = ob * else: */ __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_ob)) == ((PyObject *)__pyx_ptype_6mpi4py_3MPI_memory)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/asbuffer.pxi":350 * cdef memory mem * if type(ob) is memory: * mem = ob # <<<<<<<<<<<<<< * else: * mem = getbuffer(ob, 1, 0) */ __pyx_t_3 = __pyx_v_ob; __Pyx_INCREF(__pyx_t_3); __pyx_v_mem = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/asbuffer.pxi":349 * cdef inline memory asmemory(object ob, void **base, MPI_Aint *size): * cdef memory mem * if type(ob) is memory: # <<<<<<<<<<<<<< * mem = ob * else: */ goto __pyx_L3; } /* "mpi4py/MPI/asbuffer.pxi":352 * mem = ob * else: * mem = getbuffer(ob, 1, 0) # <<<<<<<<<<<<<< * if base != NULL: base[0] = mem.view.buf * if size != NULL: size[0] = mem.view.len */ /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer(__pyx_v_ob, 1, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mem = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "mpi4py/MPI/asbuffer.pxi":353 * else: * mem = getbuffer(ob, 1, 0) * if base != NULL: base[0] = mem.view.buf # <<<<<<<<<<<<<< * if size != NULL: size[0] = mem.view.len * return mem */ __pyx_t_2 = ((__pyx_v_base != NULL) != 0); if (__pyx_t_2) { __pyx_t_4 = __pyx_v_mem->view.buf; (__pyx_v_base[0]) = __pyx_t_4; } /* "mpi4py/MPI/asbuffer.pxi":354 * mem = getbuffer(ob, 1, 0) * if base != NULL: base[0] = mem.view.buf * if size != NULL: size[0] = mem.view.len # <<<<<<<<<<<<<< * return mem * */ __pyx_t_2 = ((__pyx_v_size != NULL) != 0); if (__pyx_t_2) { __pyx_t_5 = __pyx_v_mem->view.len; (__pyx_v_size[0]) = __pyx_t_5; } /* "mpi4py/MPI/asbuffer.pxi":355 * if base != NULL: base[0] = mem.view.buf * if size != NULL: size[0] = mem.view.len * return mem # <<<<<<<<<<<<<< * * cdef inline memory tomemory(void *base, MPI_Aint size): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_mem)); __pyx_r = __pyx_v_mem; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":347 * #------------------------------------------------------------------------------ * * cdef inline memory asmemory(object ob, void **base, MPI_Aint *size): # <<<<<<<<<<<<<< * cdef memory mem * if type(ob) is memory: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.asmemory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_mem); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asbuffer.pxi":357 * return mem * * cdef inline memory tomemory(void *base, MPI_Aint size): # <<<<<<<<<<<<<< * cdef memory mem = memory.__new__(memory) * PyBuffer_FillInfo(&mem.view, NULL, base, size, 0, PyBUF_SIMPLE) */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_f_6mpi4py_3MPI_tomemory(void *__pyx_v_base, MPI_Aint __pyx_v_size) { struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_mem = 0; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("tomemory", 0); /* "mpi4py/MPI/asbuffer.pxi":358 * * cdef inline memory tomemory(void *base, MPI_Aint size): * cdef memory mem = memory.__new__(memory) # <<<<<<<<<<<<<< * PyBuffer_FillInfo(&mem.view, NULL, base, size, 0, PyBUF_SIMPLE) * return mem */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_memory(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_memory), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_mem = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/asbuffer.pxi":359 * cdef inline memory tomemory(void *base, MPI_Aint size): * cdef memory mem = memory.__new__(memory) * PyBuffer_FillInfo(&mem.view, NULL, base, size, 0, PyBUF_SIMPLE) # <<<<<<<<<<<<<< * return mem * */ __pyx_t_3 = PyBuffer_FillInfo((&__pyx_v_mem->view), ((PyObject *)NULL), __pyx_v_base, __pyx_v_size, 0, PyBUF_SIMPLE); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 359, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":360 * cdef memory mem = memory.__new__(memory) * PyBuffer_FillInfo(&mem.view, NULL, base, size, 0, PyBUF_SIMPLE) * return mem # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_mem)); __pyx_r = __pyx_v_mem; goto __pyx_L0; /* "mpi4py/MPI/asbuffer.pxi":357 * return mem * * cdef inline memory tomemory(void *base, MPI_Aint size): # <<<<<<<<<<<<<< * cdef memory mem = memory.__new__(memory) * PyBuffer_FillInfo(&mem.view, NULL, base, size, 0, PyBUF_SIMPLE) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.tomemory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_mem); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asmemory.pxi":15 * cdef class _p_mem: * cdef void *buf * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * def __dealloc__(self): */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6_p_mem_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6_p_mem_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6mpi4py_3MPI_6_p_mem___cinit__(((struct __pyx_obj_6mpi4py_3MPI__p_mem *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6_p_mem___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_mem *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/asmemory.pxi":16 * cdef void *buf * def __cinit__(self): * self.buf = NULL # <<<<<<<<<<<<<< * def __dealloc__(self): * PyMem_Free(self.buf) */ __pyx_v_self->buf = NULL; /* "mpi4py/MPI/asmemory.pxi":15 * cdef class _p_mem: * cdef void *buf * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * def __dealloc__(self): */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asmemory.pxi":17 * def __cinit__(self): * self.buf = NULL * def __dealloc__(self): # <<<<<<<<<<<<<< * PyMem_Free(self.buf) * */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_6_p_mem_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_6_p_mem_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_6_p_mem_2__dealloc__(((struct __pyx_obj_6mpi4py_3MPI__p_mem *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_6_p_mem_2__dealloc__(struct __pyx_obj_6mpi4py_3MPI__p_mem *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/asmemory.pxi":18 * self.buf = NULL * def __dealloc__(self): * PyMem_Free(self.buf) # <<<<<<<<<<<<<< * * cdef inline _p_mem allocate(Py_ssize_t m, size_t b, void *buf): */ PyMem_Free(__pyx_v_self->buf); /* "mpi4py/MPI/asmemory.pxi":17 * def __cinit__(self): * self.buf = NULL * def __dealloc__(self): # <<<<<<<<<<<<<< * PyMem_Free(self.buf) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/asmemory.pxi":20 * PyMem_Free(self.buf) * * cdef inline _p_mem allocate(Py_ssize_t m, size_t b, void *buf): # <<<<<<<<<<<<<< * if m > PY_SSIZE_T_MAX/b: * raise MemoryError("memory allocation size too large") */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_mem *__pyx_f_6mpi4py_3MPI_allocate(Py_ssize_t __pyx_v_m, size_t __pyx_v_b, void *__pyx_v_buf) { size_t __pyx_v_n; struct __pyx_obj_6mpi4py_3MPI__p_mem *__pyx_v_ob = 0; struct __pyx_obj_6mpi4py_3MPI__p_mem *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; void *__pyx_t_4; __Pyx_RefNannySetupContext("allocate", 0); /* "mpi4py/MPI/asmemory.pxi":21 * * cdef inline _p_mem allocate(Py_ssize_t m, size_t b, void *buf): * if m > PY_SSIZE_T_MAX/b: # <<<<<<<<<<<<<< * raise MemoryError("memory allocation size too large") * if m < 0: */ __pyx_t_1 = ((__pyx_v_m > (PY_SSIZE_T_MAX / ((Py_ssize_t)__pyx_v_b))) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/asmemory.pxi":22 * cdef inline _p_mem allocate(Py_ssize_t m, size_t b, void *buf): * if m > PY_SSIZE_T_MAX/b: * raise MemoryError("memory allocation size too large") # <<<<<<<<<<<<<< * if m < 0: * raise RuntimeError("memory allocation with negative size") */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(2, 22, __pyx_L1_error) /* "mpi4py/MPI/asmemory.pxi":21 * * cdef inline _p_mem allocate(Py_ssize_t m, size_t b, void *buf): * if m > PY_SSIZE_T_MAX/b: # <<<<<<<<<<<<<< * raise MemoryError("memory allocation size too large") * if m < 0: */ } /* "mpi4py/MPI/asmemory.pxi":23 * if m > PY_SSIZE_T_MAX/b: * raise MemoryError("memory allocation size too large") * if m < 0: # <<<<<<<<<<<<<< * raise RuntimeError("memory allocation with negative size") * cdef size_t n = m * b */ __pyx_t_1 = ((__pyx_v_m < 0) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/asmemory.pxi":24 * raise MemoryError("memory allocation size too large") * if m < 0: * raise RuntimeError("memory allocation with negative size") # <<<<<<<<<<<<<< * cdef size_t n = m * b * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(2, 24, __pyx_L1_error) /* "mpi4py/MPI/asmemory.pxi":23 * if m > PY_SSIZE_T_MAX/b: * raise MemoryError("memory allocation size too large") * if m < 0: # <<<<<<<<<<<<<< * raise RuntimeError("memory allocation with negative size") * cdef size_t n = m * b */ } /* "mpi4py/MPI/asmemory.pxi":25 * if m < 0: * raise RuntimeError("memory allocation with negative size") * cdef size_t n = m * b # <<<<<<<<<<<<<< * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) * ob.buf = PyMem_Malloc(n) */ __pyx_v_n = (((size_t)__pyx_v_m) * __pyx_v_b); /* "mpi4py/MPI/asmemory.pxi":26 * raise RuntimeError("memory allocation with negative size") * cdef size_t n = m * b * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) # <<<<<<<<<<<<<< * ob.buf = PyMem_Malloc(n) * if ob.buf == NULL: raise MemoryError */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI__p_mem(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI__p_mem), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 26, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_ob = ((struct __pyx_obj_6mpi4py_3MPI__p_mem *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/asmemory.pxi":27 * cdef size_t n = m * b * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) * ob.buf = PyMem_Malloc(n) # <<<<<<<<<<<<<< * if ob.buf == NULL: raise MemoryError * if buf != NULL: (buf)[0] = ob.buf */ __pyx_v_ob->buf = PyMem_Malloc(__pyx_v_n); /* "mpi4py/MPI/asmemory.pxi":28 * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) * ob.buf = PyMem_Malloc(n) * if ob.buf == NULL: raise MemoryError # <<<<<<<<<<<<<< * if buf != NULL: (buf)[0] = ob.buf * return ob */ __pyx_t_1 = ((__pyx_v_ob->buf == NULL) != 0); if (unlikely(__pyx_t_1)) { PyErr_NoMemory(); __PYX_ERR(2, 28, __pyx_L1_error) } /* "mpi4py/MPI/asmemory.pxi":29 * ob.buf = PyMem_Malloc(n) * if ob.buf == NULL: raise MemoryError * if buf != NULL: (buf)[0] = ob.buf # <<<<<<<<<<<<<< * return ob * */ __pyx_t_1 = ((__pyx_v_buf != NULL) != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_v_ob->buf; (((void **)__pyx_v_buf)[0]) = __pyx_t_4; } /* "mpi4py/MPI/asmemory.pxi":30 * if ob.buf == NULL: raise MemoryError * if buf != NULL: (buf)[0] = ob.buf * return ob # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_ob)); __pyx_r = __pyx_v_ob; goto __pyx_L0; /* "mpi4py/MPI/asmemory.pxi":20 * PyMem_Free(self.buf) * * cdef inline _p_mem allocate(Py_ssize_t m, size_t b, void *buf): # <<<<<<<<<<<<<< * if m > PY_SSIZE_T_MAX/b: * raise MemoryError("memory allocation size too large") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.allocate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_ob); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":7 * MPI_Aint * * cdef inline object newarray(int n, integral_t **p): # <<<<<<<<<<<<<< * return allocate(n, sizeof(integral_t), p) * */ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(int __pyx_v_n, int **__pyx_v_p) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_0newarray", 0); /* "mpi4py/MPI/asarray.pxi":8 * * cdef inline object newarray(int n, integral_t **p): * return allocate(n, sizeof(integral_t), p) # <<<<<<<<<<<<<< * * cdef inline object getarray(object ob, int *n, integral_t **p): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_n, (sizeof(int)), __pyx_v_p)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":7 * MPI_Aint * * cdef inline object newarray(int n, integral_t **p): # <<<<<<<<<<<<<< * return allocate(n, sizeof(integral_t), p) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.newarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_newarray(int __pyx_v_n, MPI_Aint **__pyx_v_p) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_1newarray", 0); /* "mpi4py/MPI/asarray.pxi":8 * * cdef inline object newarray(int n, integral_t **p): * return allocate(n, sizeof(integral_t), p) # <<<<<<<<<<<<<< * * cdef inline object getarray(object ob, int *n, integral_t **p): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_n, (sizeof(MPI_Aint)), __pyx_v_p)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":7 * MPI_Aint * * cdef inline object newarray(int n, integral_t **p): # <<<<<<<<<<<<<< * return allocate(n, sizeof(integral_t), p) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.newarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":10 * return allocate(n, sizeof(integral_t), p) * * cdef inline object getarray(object ob, int *n, integral_t **p): # <<<<<<<<<<<<<< * cdef Py_ssize_t olen = len(ob) * cdef integral_t *base = NULL */ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(PyObject *__pyx_v_ob, int *__pyx_v_n, int **__pyx_v_p) { Py_ssize_t __pyx_v_olen; int *__pyx_v_base; int __pyx_v_i; int __pyx_v_size; PyObject *__pyx_v_mem = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__pyx_fuse_0getarray", 0); /* "mpi4py/MPI/asarray.pxi":11 * * cdef inline object getarray(object ob, int *n, integral_t **p): * cdef Py_ssize_t olen = len(ob) # <<<<<<<<<<<<<< * cdef integral_t *base = NULL * cdef int i = 0, size = downcast(olen) */ __pyx_t_1 = PyObject_Length(__pyx_v_ob); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(11, 11, __pyx_L1_error) __pyx_v_olen = __pyx_t_1; /* "mpi4py/MPI/asarray.pxi":12 * cdef inline object getarray(object ob, int *n, integral_t **p): * cdef Py_ssize_t olen = len(ob) * cdef integral_t *base = NULL # <<<<<<<<<<<<<< * cdef int i = 0, size = downcast(olen) * cdef object mem = newarray(size, &base) */ __pyx_v_base = NULL; /* "mpi4py/MPI/asarray.pxi":13 * cdef Py_ssize_t olen = len(ob) * cdef integral_t *base = NULL * cdef int i = 0, size = downcast(olen) # <<<<<<<<<<<<<< * cdef object mem = newarray(size, &base) * for i from 0 <= i < size: base[i] = ob[i] */ __pyx_v_i = 0; __pyx_t_2 = __pyx_f_6mpi4py_3MPI_downcast(__pyx_v_olen); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(11, 13, __pyx_L1_error) __pyx_v_size = __pyx_t_2; /* "mpi4py/MPI/asarray.pxi":14 * cdef integral_t *base = NULL * cdef int i = 0, size = downcast(olen) * cdef object mem = newarray(size, &base) # <<<<<<<<<<<<<< * for i from 0 <= i < size: base[i] = ob[i] * n[0] = size */ __pyx_t_3 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_size, (&__pyx_v_base)); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mem = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/asarray.pxi":15 * cdef int i = 0, size = downcast(olen) * cdef object mem = newarray(size, &base) * for i from 0 <= i < size: base[i] = ob[i] # <<<<<<<<<<<<<< * n[0] = size * p[0] = base */ __pyx_t_2 = __pyx_v_size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_ob, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_base[__pyx_v_i]) = __pyx_t_4; } /* "mpi4py/MPI/asarray.pxi":16 * cdef object mem = newarray(size, &base) * for i from 0 <= i < size: base[i] = ob[i] * n[0] = size # <<<<<<<<<<<<<< * p[0] = base * return mem */ (__pyx_v_n[0]) = __pyx_v_size; /* "mpi4py/MPI/asarray.pxi":17 * for i from 0 <= i < size: base[i] = ob[i] * n[0] = size * p[0] = base # <<<<<<<<<<<<<< * return mem * */ (__pyx_v_p[0]) = __pyx_v_base; /* "mpi4py/MPI/asarray.pxi":18 * n[0] = size * p[0] = base * return mem # <<<<<<<<<<<<<< * * cdef inline object chkarray(object ob, int n, integral_t **p): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_mem); __pyx_r = __pyx_v_mem; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":10 * return allocate(n, sizeof(integral_t), p) * * cdef inline object getarray(object ob, int *n, integral_t **p): # <<<<<<<<<<<<<< * cdef Py_ssize_t olen = len(ob) * cdef integral_t *base = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.getarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_mem); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_getarray(PyObject *__pyx_v_ob, int *__pyx_v_n, MPI_Aint **__pyx_v_p) { Py_ssize_t __pyx_v_olen; MPI_Aint *__pyx_v_base; int __pyx_v_i; int __pyx_v_size; PyObject *__pyx_v_mem = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; MPI_Aint __pyx_t_4; __Pyx_RefNannySetupContext("__pyx_fuse_1getarray", 0); /* "mpi4py/MPI/asarray.pxi":11 * * cdef inline object getarray(object ob, int *n, integral_t **p): * cdef Py_ssize_t olen = len(ob) # <<<<<<<<<<<<<< * cdef integral_t *base = NULL * cdef int i = 0, size = downcast(olen) */ __pyx_t_1 = PyObject_Length(__pyx_v_ob); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(11, 11, __pyx_L1_error) __pyx_v_olen = __pyx_t_1; /* "mpi4py/MPI/asarray.pxi":12 * cdef inline object getarray(object ob, int *n, integral_t **p): * cdef Py_ssize_t olen = len(ob) * cdef integral_t *base = NULL # <<<<<<<<<<<<<< * cdef int i = 0, size = downcast(olen) * cdef object mem = newarray(size, &base) */ __pyx_v_base = NULL; /* "mpi4py/MPI/asarray.pxi":13 * cdef Py_ssize_t olen = len(ob) * cdef integral_t *base = NULL * cdef int i = 0, size = downcast(olen) # <<<<<<<<<<<<<< * cdef object mem = newarray(size, &base) * for i from 0 <= i < size: base[i] = ob[i] */ __pyx_v_i = 0; __pyx_t_2 = __pyx_f_6mpi4py_3MPI_downcast(__pyx_v_olen); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(11, 13, __pyx_L1_error) __pyx_v_size = __pyx_t_2; /* "mpi4py/MPI/asarray.pxi":14 * cdef integral_t *base = NULL * cdef int i = 0, size = downcast(olen) * cdef object mem = newarray(size, &base) # <<<<<<<<<<<<<< * for i from 0 <= i < size: base[i] = ob[i] * n[0] = size */ __pyx_t_3 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_size, (&__pyx_v_base)); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mem = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/asarray.pxi":15 * cdef int i = 0, size = downcast(olen) * cdef object mem = newarray(size, &base) * for i from 0 <= i < size: base[i] = ob[i] # <<<<<<<<<<<<<< * n[0] = size * p[0] = base */ __pyx_t_2 = __pyx_v_size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_ob, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_As_MPI_Aint(__pyx_t_3); if (unlikely((__pyx_t_4 == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(11, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_base[__pyx_v_i]) = __pyx_t_4; } /* "mpi4py/MPI/asarray.pxi":16 * cdef object mem = newarray(size, &base) * for i from 0 <= i < size: base[i] = ob[i] * n[0] = size # <<<<<<<<<<<<<< * p[0] = base * return mem */ (__pyx_v_n[0]) = __pyx_v_size; /* "mpi4py/MPI/asarray.pxi":17 * for i from 0 <= i < size: base[i] = ob[i] * n[0] = size * p[0] = base # <<<<<<<<<<<<<< * return mem * */ (__pyx_v_p[0]) = __pyx_v_base; /* "mpi4py/MPI/asarray.pxi":18 * n[0] = size * p[0] = base * return mem # <<<<<<<<<<<<<< * * cdef inline object chkarray(object ob, int n, integral_t **p): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_mem); __pyx_r = __pyx_v_mem; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":10 * return allocate(n, sizeof(integral_t), p) * * cdef inline object getarray(object ob, int *n, integral_t **p): # <<<<<<<<<<<<<< * cdef Py_ssize_t olen = len(ob) * cdef integral_t *base = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.getarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_mem); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":20 * return mem * * cdef inline object chkarray(object ob, int n, integral_t **p): # <<<<<<<<<<<<<< * cdef int size = 0 * cdef object mem = getarray(ob, &size, p) */ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(PyObject *__pyx_v_ob, int __pyx_v_n, int **__pyx_v_p) { int __pyx_v_size; PyObject *__pyx_v_mem = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_0chkarray", 0); /* "mpi4py/MPI/asarray.pxi":21 * * cdef inline object chkarray(object ob, int n, integral_t **p): * cdef int size = 0 # <<<<<<<<<<<<<< * cdef object mem = getarray(ob, &size, p) * if n != size: raise ValueError( */ __pyx_v_size = 0; /* "mpi4py/MPI/asarray.pxi":22 * cdef inline object chkarray(object ob, int n, integral_t **p): * cdef int size = 0 * cdef object mem = getarray(ob, &size, p) # <<<<<<<<<<<<<< * if n != size: raise ValueError( * "expecting %d items, got %d" % (n, size)) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_ob, (&__pyx_v_size), __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mem = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/asarray.pxi":23 * cdef int size = 0 * cdef object mem = getarray(ob, &size, p) * if n != size: raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (n, size)) * return mem */ __pyx_t_2 = ((__pyx_v_n != __pyx_v_size) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/asarray.pxi":24 * cdef object mem = getarray(ob, &size, p) * if n != size: raise ValueError( * "expecting %d items, got %d" % (n, size)) # <<<<<<<<<<<<<< * return mem * */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_expecting_d_items_got_d, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/asarray.pxi":23 * cdef int size = 0 * cdef object mem = getarray(ob, &size, p) * if n != size: raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (n, size)) * return mem */ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(11, 23, __pyx_L1_error) } /* "mpi4py/MPI/asarray.pxi":25 * if n != size: raise ValueError( * "expecting %d items, got %d" % (n, size)) * return mem # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_mem); __pyx_r = __pyx_v_mem; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":20 * return mem * * cdef inline object chkarray(object ob, int n, integral_t **p): # <<<<<<<<<<<<<< * cdef int size = 0 * cdef object mem = getarray(ob, &size, p) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.chkarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_mem); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_chkarray(PyObject *__pyx_v_ob, int __pyx_v_n, MPI_Aint **__pyx_v_p) { int __pyx_v_size; PyObject *__pyx_v_mem = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_1chkarray", 0); /* "mpi4py/MPI/asarray.pxi":21 * * cdef inline object chkarray(object ob, int n, integral_t **p): * cdef int size = 0 # <<<<<<<<<<<<<< * cdef object mem = getarray(ob, &size, p) * if n != size: raise ValueError( */ __pyx_v_size = 0; /* "mpi4py/MPI/asarray.pxi":22 * cdef inline object chkarray(object ob, int n, integral_t **p): * cdef int size = 0 * cdef object mem = getarray(ob, &size, p) # <<<<<<<<<<<<<< * if n != size: raise ValueError( * "expecting %d items, got %d" % (n, size)) */ __pyx_t_1 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_ob, (&__pyx_v_size), __pyx_v_p); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mem = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/asarray.pxi":23 * cdef int size = 0 * cdef object mem = getarray(ob, &size, p) * if n != size: raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (n, size)) * return mem */ __pyx_t_2 = ((__pyx_v_n != __pyx_v_size) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/asarray.pxi":24 * cdef object mem = getarray(ob, &size, p) * if n != size: raise ValueError( * "expecting %d items, got %d" % (n, size)) # <<<<<<<<<<<<<< * return mem * */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_expecting_d_items_got_d, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/asarray.pxi":23 * cdef int size = 0 * cdef object mem = getarray(ob, &size, p) * if n != size: raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (n, size)) * return mem */ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(11, 23, __pyx_L1_error) } /* "mpi4py/MPI/asarray.pxi":25 * if n != size: raise ValueError( * "expecting %d items, got %d" % (n, size)) * return mem # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_mem); __pyx_r = __pyx_v_mem; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":20 * return mem * * cdef inline object chkarray(object ob, int n, integral_t **p): # <<<<<<<<<<<<<< * cdef int size = 0 * cdef object mem = getarray(ob, &size, p) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.chkarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_mem); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":29 * # ----------------------------------------------------------------------------- * * cdef inline object asarray_Datatype(object sequence, # <<<<<<<<<<<<<< * int size, MPI_Datatype **p): * cdef int i = 0 */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_Datatype(PyObject *__pyx_v_sequence, int __pyx_v_size, MPI_Datatype **__pyx_v_p) { int __pyx_v_i; MPI_Datatype *__pyx_v_array; PyObject *__pyx_v_ob = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; MPI_Datatype __pyx_t_7; __Pyx_RefNannySetupContext("asarray_Datatype", 0); /* "mpi4py/MPI/asarray.pxi":31 * cdef inline object asarray_Datatype(object sequence, * int size, MPI_Datatype **p): * cdef int i = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype *array = NULL * if size != len(sequence): raise ValueError( */ __pyx_v_i = 0; /* "mpi4py/MPI/asarray.pxi":32 * int size, MPI_Datatype **p): * cdef int i = 0 * cdef MPI_Datatype *array = NULL # <<<<<<<<<<<<<< * if size != len(sequence): raise ValueError( * "expecting %d items, got %d" % (size, len(sequence))) */ __pyx_v_array = NULL; /* "mpi4py/MPI/asarray.pxi":33 * cdef int i = 0 * cdef MPI_Datatype *array = NULL * if size != len(sequence): raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (size, len(sequence))) * cdef object ob = allocate(size, sizeof(MPI_Datatype), &array) */ __pyx_t_1 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(11, 33, __pyx_L1_error) __pyx_t_2 = ((__pyx_v_size != __pyx_t_1) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/asarray.pxi":34 * cdef MPI_Datatype *array = NULL * if size != len(sequence): raise ValueError( * "expecting %d items, got %d" % (size, len(sequence))) # <<<<<<<<<<<<<< * cdef object ob = allocate(size, sizeof(MPI_Datatype), &array) * for i from 0 <= i < size: */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(11, 34, __pyx_L1_error) __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_expecting_d_items_got_d, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/asarray.pxi":33 * cdef int i = 0 * cdef MPI_Datatype *array = NULL * if size != len(sequence): raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (size, len(sequence))) * cdef object ob = allocate(size, sizeof(MPI_Datatype), &array) */ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(11, 33, __pyx_L1_error) } /* "mpi4py/MPI/asarray.pxi":35 * if size != len(sequence): raise ValueError( * "expecting %d items, got %d" % (size, len(sequence))) * cdef object ob = allocate(size, sizeof(MPI_Datatype), &array) # <<<<<<<<<<<<<< * for i from 0 <= i < size: * array[i] = (sequence[i]).ob_mpi */ __pyx_t_5 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_size, (sizeof(MPI_Datatype)), (&__pyx_v_array))); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_ob = __pyx_t_5; __pyx_t_5 = 0; /* "mpi4py/MPI/asarray.pxi":36 * "expecting %d items, got %d" % (size, len(sequence))) * cdef object ob = allocate(size, sizeof(MPI_Datatype), &array) * for i from 0 <= i < size: # <<<<<<<<<<<<<< * array[i] = (sequence[i]).ob_mpi * p[0] = array */ __pyx_t_6 = __pyx_v_size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "mpi4py/MPI/asarray.pxi":37 * cdef object ob = allocate(size, sizeof(MPI_Datatype), &array) * for i from 0 <= i < size: * array[i] = (sequence[i]).ob_mpi # <<<<<<<<<<<<<< * p[0] = array * return ob */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_sequence, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (!(likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6mpi4py_3MPI_Datatype)))) __PYX_ERR(11, 37, __pyx_L1_error) __pyx_t_7 = ((struct PyMPIDatatypeObject *)__pyx_t_5)->ob_mpi; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; (__pyx_v_array[__pyx_v_i]) = __pyx_t_7; } /* "mpi4py/MPI/asarray.pxi":38 * for i from 0 <= i < size: * array[i] = (sequence[i]).ob_mpi * p[0] = array # <<<<<<<<<<<<<< * return ob * */ (__pyx_v_p[0]) = __pyx_v_array; /* "mpi4py/MPI/asarray.pxi":39 * array[i] = (sequence[i]).ob_mpi * p[0] = array * return ob # <<<<<<<<<<<<<< * * cdef inline object asarray_Info(object sequence, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ob); __pyx_r = __pyx_v_ob; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":29 * # ----------------------------------------------------------------------------- * * cdef inline object asarray_Datatype(object sequence, # <<<<<<<<<<<<<< * int size, MPI_Datatype **p): * cdef int i = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.asarray_Datatype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":41 * return ob * * cdef inline object asarray_Info(object sequence, # <<<<<<<<<<<<<< * int size, MPI_Info **p): * cdef int i = 0 */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_Info(PyObject *__pyx_v_sequence, int __pyx_v_size, MPI_Info **__pyx_v_p) { int __pyx_v_i; MPI_Info *__pyx_v_array; MPI_Info __pyx_v_info; PyObject *__pyx_v_ob = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; MPI_Info __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("asarray_Info", 0); /* "mpi4py/MPI/asarray.pxi":43 * cdef inline object asarray_Info(object sequence, * int size, MPI_Info **p): * cdef int i = 0 # <<<<<<<<<<<<<< * cdef MPI_Info *array = NULL * cdef MPI_Info info = MPI_INFO_NULL */ __pyx_v_i = 0; /* "mpi4py/MPI/asarray.pxi":44 * int size, MPI_Info **p): * cdef int i = 0 * cdef MPI_Info *array = NULL # <<<<<<<<<<<<<< * cdef MPI_Info info = MPI_INFO_NULL * cdef object ob */ __pyx_v_array = NULL; /* "mpi4py/MPI/asarray.pxi":45 * cdef int i = 0 * cdef MPI_Info *array = NULL * cdef MPI_Info info = MPI_INFO_NULL # <<<<<<<<<<<<<< * cdef object ob * if sequence is None or isinstance(sequence, Info): */ __pyx_v_info = MPI_INFO_NULL; /* "mpi4py/MPI/asarray.pxi":47 * cdef MPI_Info info = MPI_INFO_NULL * cdef object ob * if sequence is None or isinstance(sequence, Info): # <<<<<<<<<<<<<< * if sequence is not None: * info = (sequence).ob_mpi */ __pyx_t_2 = (__pyx_v_sequence == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_sequence, __pyx_ptype_6mpi4py_3MPI_Info); __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/asarray.pxi":48 * cdef object ob * if sequence is None or isinstance(sequence, Info): * if sequence is not None: # <<<<<<<<<<<<<< * info = (sequence).ob_mpi * ob = allocate(size, sizeof(MPI_Info), &array) */ __pyx_t_1 = (__pyx_v_sequence != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/asarray.pxi":49 * if sequence is None or isinstance(sequence, Info): * if sequence is not None: * info = (sequence).ob_mpi # <<<<<<<<<<<<<< * ob = allocate(size, sizeof(MPI_Info), &array) * for i from 0 <= i < size: */ if (!(likely(__Pyx_TypeTest(__pyx_v_sequence, __pyx_ptype_6mpi4py_3MPI_Info)))) __PYX_ERR(11, 49, __pyx_L1_error) __pyx_t_4 = ((struct PyMPIInfoObject *)__pyx_v_sequence)->ob_mpi; __pyx_v_info = __pyx_t_4; /* "mpi4py/MPI/asarray.pxi":48 * cdef object ob * if sequence is None or isinstance(sequence, Info): * if sequence is not None: # <<<<<<<<<<<<<< * info = (sequence).ob_mpi * ob = allocate(size, sizeof(MPI_Info), &array) */ } /* "mpi4py/MPI/asarray.pxi":50 * if sequence is not None: * info = (sequence).ob_mpi * ob = allocate(size, sizeof(MPI_Info), &array) # <<<<<<<<<<<<<< * for i from 0 <= i < size: * array[i] = info */ __pyx_t_5 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_size, (sizeof(MPI_Info)), (&__pyx_v_array))); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_ob = __pyx_t_5; __pyx_t_5 = 0; /* "mpi4py/MPI/asarray.pxi":51 * info = (sequence).ob_mpi * ob = allocate(size, sizeof(MPI_Info), &array) * for i from 0 <= i < size: # <<<<<<<<<<<<<< * array[i] = info * else: */ __pyx_t_6 = __pyx_v_size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "mpi4py/MPI/asarray.pxi":52 * ob = allocate(size, sizeof(MPI_Info), &array) * for i from 0 <= i < size: * array[i] = info # <<<<<<<<<<<<<< * else: * if size != len(sequence): raise ValueError( */ (__pyx_v_array[__pyx_v_i]) = __pyx_v_info; } /* "mpi4py/MPI/asarray.pxi":47 * cdef MPI_Info info = MPI_INFO_NULL * cdef object ob * if sequence is None or isinstance(sequence, Info): # <<<<<<<<<<<<<< * if sequence is not None: * info = (sequence).ob_mpi */ goto __pyx_L3; } /* "mpi4py/MPI/asarray.pxi":54 * array[i] = info * else: * if size != len(sequence): raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (size, len(sequence))) * ob = allocate(size, sizeof(MPI_Datatype), &array) */ /*else*/ { __pyx_t_7 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(11, 54, __pyx_L1_error) __pyx_t_2 = ((__pyx_v_size != __pyx_t_7) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/asarray.pxi":55 * else: * if size != len(sequence): raise ValueError( * "expecting %d items, got %d" % (size, len(sequence))) # <<<<<<<<<<<<<< * ob = allocate(size, sizeof(MPI_Datatype), &array) * for i from 0 <= i < size: */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(11, 55, __pyx_L1_error) __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8); __pyx_t_5 = 0; __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_expecting_d_items_got_d, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/asarray.pxi":54 * array[i] = info * else: * if size != len(sequence): raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (size, len(sequence))) * ob = allocate(size, sizeof(MPI_Datatype), &array) */ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(11, 54, __pyx_L1_error) } /* "mpi4py/MPI/asarray.pxi":56 * if size != len(sequence): raise ValueError( * "expecting %d items, got %d" % (size, len(sequence))) * ob = allocate(size, sizeof(MPI_Datatype), &array) # <<<<<<<<<<<<<< * for i from 0 <= i < size: * array[i] = (sequence[i]).ob_mpi */ __pyx_t_9 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_size, (sizeof(MPI_Datatype)), (&__pyx_v_array))); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_v_ob = __pyx_t_9; __pyx_t_9 = 0; /* "mpi4py/MPI/asarray.pxi":57 * "expecting %d items, got %d" % (size, len(sequence))) * ob = allocate(size, sizeof(MPI_Datatype), &array) * for i from 0 <= i < size: # <<<<<<<<<<<<<< * array[i] = (sequence[i]).ob_mpi * p[0] = array */ __pyx_t_6 = __pyx_v_size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { /* "mpi4py/MPI/asarray.pxi":58 * ob = allocate(size, sizeof(MPI_Datatype), &array) * for i from 0 <= i < size: * array[i] = (sequence[i]).ob_mpi # <<<<<<<<<<<<<< * p[0] = array * return ob */ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_sequence, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (!(likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_6mpi4py_3MPI_Info)))) __PYX_ERR(11, 58, __pyx_L1_error) __pyx_t_4 = ((struct PyMPIInfoObject *)__pyx_t_9)->ob_mpi; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; (__pyx_v_array[__pyx_v_i]) = __pyx_t_4; } } __pyx_L3:; /* "mpi4py/MPI/asarray.pxi":59 * for i from 0 <= i < size: * array[i] = (sequence[i]).ob_mpi * p[0] = array # <<<<<<<<<<<<<< * return ob * */ (__pyx_v_p[0]) = __pyx_v_array; /* "mpi4py/MPI/asarray.pxi":60 * array[i] = (sequence[i]).ob_mpi * p[0] = array * return ob # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ob); __pyx_r = __pyx_v_ob; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":41 * return ob * * cdef inline object asarray_Info(object sequence, # <<<<<<<<<<<<<< * int size, MPI_Info **p): * cdef int i = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("mpi4py.MPI.asarray_Info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":64 * # ----------------------------------------------------------------------------- * * cdef inline int is_string(object obj): # <<<<<<<<<<<<<< * return (isinstance(obj, str) or * isinstance(obj, bytes) or */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_is_string(PyObject *__pyx_v_obj) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("is_string", 0); /* "mpi4py/MPI/asarray.pxi":65 * * cdef inline int is_string(object obj): * return (isinstance(obj, str) or # <<<<<<<<<<<<<< * isinstance(obj, bytes) or * isinstance(obj, unicode)) */ __pyx_t_2 = PyString_Check(__pyx_v_obj); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/asarray.pxi":66 * cdef inline int is_string(object obj): * return (isinstance(obj, str) or * isinstance(obj, bytes) or # <<<<<<<<<<<<<< * isinstance(obj, unicode)) * */ __pyx_t_2 = PyBytes_Check(__pyx_v_obj); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/asarray.pxi":67 * return (isinstance(obj, str) or * isinstance(obj, bytes) or * isinstance(obj, unicode)) # <<<<<<<<<<<<<< * * cdef inline object asstring(object ob, char *s[]): */ __pyx_t_2 = PyUnicode_Check(__pyx_v_obj); __pyx_t_1 = __pyx_t_2; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":64 * # ----------------------------------------------------------------------------- * * cdef inline int is_string(object obj): # <<<<<<<<<<<<<< * return (isinstance(obj, str) or * isinstance(obj, bytes) or */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":69 * isinstance(obj, unicode)) * * cdef inline object asstring(object ob, char *s[]): # <<<<<<<<<<<<<< * cdef Py_ssize_t n = 0 * cdef char *p = NULL, *q = NULL */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asstring(PyObject *__pyx_v_ob, char **__pyx_v_s) { Py_ssize_t __pyx_v_n; char *__pyx_v_p; char *__pyx_v_q; PyObject *__pyx_v_mem = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("asstring", 0); __Pyx_INCREF(__pyx_v_ob); /* "mpi4py/MPI/asarray.pxi":70 * * cdef inline object asstring(object ob, char *s[]): * cdef Py_ssize_t n = 0 # <<<<<<<<<<<<<< * cdef char *p = NULL, *q = NULL * ob = asmpistr(ob, &p) */ __pyx_v_n = 0; /* "mpi4py/MPI/asarray.pxi":71 * cdef inline object asstring(object ob, char *s[]): * cdef Py_ssize_t n = 0 * cdef char *p = NULL, *q = NULL # <<<<<<<<<<<<<< * ob = asmpistr(ob, &p) * PyBytes_AsStringAndSize(ob, &p, &n) */ __pyx_v_p = NULL; __pyx_v_q = NULL; /* "mpi4py/MPI/asarray.pxi":72 * cdef Py_ssize_t n = 0 * cdef char *p = NULL, *q = NULL * ob = asmpistr(ob, &p) # <<<<<<<<<<<<<< * PyBytes_AsStringAndSize(ob, &p, &n) * cdef object mem = allocate(n+1, sizeof(char), &q) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_ob, (&__pyx_v_p)); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/asarray.pxi":73 * cdef char *p = NULL, *q = NULL * ob = asmpistr(ob, &p) * PyBytes_AsStringAndSize(ob, &p, &n) # <<<<<<<<<<<<<< * cdef object mem = allocate(n+1, sizeof(char), &q) * memcpy(q, p, n) */ __pyx_t_2 = PyBytes_AsStringAndSize(__pyx_v_ob, (&__pyx_v_p), (&__pyx_v_n)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(11, 73, __pyx_L1_error) /* "mpi4py/MPI/asarray.pxi":74 * ob = asmpistr(ob, &p) * PyBytes_AsStringAndSize(ob, &p, &n) * cdef object mem = allocate(n+1, sizeof(char), &q) # <<<<<<<<<<<<<< * memcpy(q, p, n) * q[n] = 0; s[0] = q; */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate((__pyx_v_n + 1), (sizeof(char)), (&__pyx_v_q))); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mem = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/asarray.pxi":75 * PyBytes_AsStringAndSize(ob, &p, &n) * cdef object mem = allocate(n+1, sizeof(char), &q) * memcpy(q, p, n) # <<<<<<<<<<<<<< * q[n] = 0; s[0] = q; * return mem */ ((void)memcpy(__pyx_v_q, __pyx_v_p, ((size_t)__pyx_v_n))); /* "mpi4py/MPI/asarray.pxi":76 * cdef object mem = allocate(n+1, sizeof(char), &q) * memcpy(q, p, n) * q[n] = 0; s[0] = q; # <<<<<<<<<<<<<< * return mem * */ (__pyx_v_q[__pyx_v_n]) = 0; (__pyx_v_s[0]) = __pyx_v_q; /* "mpi4py/MPI/asarray.pxi":77 * memcpy(q, p, n) * q[n] = 0; s[0] = q; * return mem # <<<<<<<<<<<<<< * * cdef inline object asarray_str(object sequence, char ***p): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_mem); __pyx_r = __pyx_v_mem; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":69 * isinstance(obj, unicode)) * * cdef inline object asstring(object ob, char *s[]): # <<<<<<<<<<<<<< * cdef Py_ssize_t n = 0 * cdef char *p = NULL, *q = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.asstring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_mem); __Pyx_XDECREF(__pyx_v_ob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":79 * return mem * * cdef inline object asarray_str(object sequence, char ***p): # <<<<<<<<<<<<<< * cdef char** array = NULL * cdef Py_ssize_t i = 0, size = len(sequence) */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_str(PyObject *__pyx_v_sequence, char ***__pyx_v_p) { char **__pyx_v_array; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_size; PyObject *__pyx_v_ob = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("asarray_str", 0); /* "mpi4py/MPI/asarray.pxi":80 * * cdef inline object asarray_str(object sequence, char ***p): * cdef char** array = NULL # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, size = len(sequence) * cdef object ob = allocate(size+1, sizeof(char*), &array) */ __pyx_v_array = NULL; /* "mpi4py/MPI/asarray.pxi":81 * cdef inline object asarray_str(object sequence, char ***p): * cdef char** array = NULL * cdef Py_ssize_t i = 0, size = len(sequence) # <<<<<<<<<<<<<< * cdef object ob = allocate(size+1, sizeof(char*), &array) * for i from 0 <= i < size: */ __pyx_v_i = 0; __pyx_t_1 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(11, 81, __pyx_L1_error) __pyx_v_size = __pyx_t_1; /* "mpi4py/MPI/asarray.pxi":82 * cdef char** array = NULL * cdef Py_ssize_t i = 0, size = len(sequence) * cdef object ob = allocate(size+1, sizeof(char*), &array) # <<<<<<<<<<<<<< * for i from 0 <= i < size: * sequence[i] = asstring(sequence[i], &array[i]) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate((__pyx_v_size + 1), (sizeof(char *)), (&__pyx_v_array))); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_ob = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/asarray.pxi":83 * cdef Py_ssize_t i = 0, size = len(sequence) * cdef object ob = allocate(size+1, sizeof(char*), &array) * for i from 0 <= i < size: # <<<<<<<<<<<<<< * sequence[i] = asstring(sequence[i], &array[i]) * array[size] = NULL */ __pyx_t_1 = __pyx_v_size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "mpi4py/MPI/asarray.pxi":84 * cdef object ob = allocate(size+1, sizeof(char*), &array) * for i from 0 <= i < size: * sequence[i] = asstring(sequence[i], &array[i]) # <<<<<<<<<<<<<< * array[size] = NULL * p[0] = array */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_sequence, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asstring(__pyx_t_2, (&(__pyx_v_array[__pyx_v_i]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_sequence, __pyx_v_i, __pyx_t_3, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(11, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/asarray.pxi":85 * for i from 0 <= i < size: * sequence[i] = asstring(sequence[i], &array[i]) * array[size] = NULL # <<<<<<<<<<<<<< * p[0] = array * return (sequence, ob) */ (__pyx_v_array[__pyx_v_size]) = NULL; /* "mpi4py/MPI/asarray.pxi":86 * sequence[i] = asstring(sequence[i], &array[i]) * array[size] = NULL * p[0] = array # <<<<<<<<<<<<<< * return (sequence, ob) * */ (__pyx_v_p[0]) = __pyx_v_array; /* "mpi4py/MPI/asarray.pxi":87 * array[size] = NULL * p[0] = array * return (sequence, ob) # <<<<<<<<<<<<<< * * cdef inline object asarray_argv(object sequence, char ***p): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_sequence); __Pyx_GIVEREF(__pyx_v_sequence); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_sequence); __Pyx_INCREF(__pyx_v_ob); __Pyx_GIVEREF(__pyx_v_ob); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_ob); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":79 * return mem * * cdef inline object asarray_str(object sequence, char ***p): # <<<<<<<<<<<<<< * cdef char** array = NULL * cdef Py_ssize_t i = 0, size = len(sequence) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.asarray_str", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":89 * return (sequence, ob) * * cdef inline object asarray_argv(object sequence, char ***p): # <<<<<<<<<<<<<< * if sequence is None: * p[0] = MPI_ARGV_NULL */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_argv(PyObject *__pyx_v_sequence, char ***__pyx_v_p) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("asarray_argv", 0); __Pyx_INCREF(__pyx_v_sequence); /* "mpi4py/MPI/asarray.pxi":90 * * cdef inline object asarray_argv(object sequence, char ***p): * if sequence is None: # <<<<<<<<<<<<<< * p[0] = MPI_ARGV_NULL * return None */ __pyx_t_1 = (__pyx_v_sequence == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/asarray.pxi":91 * cdef inline object asarray_argv(object sequence, char ***p): * if sequence is None: * p[0] = MPI_ARGV_NULL # <<<<<<<<<<<<<< * return None * if is_string(sequence): */ (__pyx_v_p[0]) = MPI_ARGV_NULL; /* "mpi4py/MPI/asarray.pxi":92 * if sequence is None: * p[0] = MPI_ARGV_NULL * return None # <<<<<<<<<<<<<< * if is_string(sequence): * sequence = [sequence] */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":90 * * cdef inline object asarray_argv(object sequence, char ***p): * if sequence is None: # <<<<<<<<<<<<<< * p[0] = MPI_ARGV_NULL * return None */ } /* "mpi4py/MPI/asarray.pxi":93 * p[0] = MPI_ARGV_NULL * return None * if is_string(sequence): # <<<<<<<<<<<<<< * sequence = [sequence] * else: */ __pyx_t_2 = (__pyx_f_6mpi4py_3MPI_is_string(__pyx_v_sequence) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/asarray.pxi":94 * return None * if is_string(sequence): * sequence = [sequence] # <<<<<<<<<<<<<< * else: * sequence = list(sequence) */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_sequence); __Pyx_GIVEREF(__pyx_v_sequence); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_sequence); __Pyx_DECREF_SET(__pyx_v_sequence, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/asarray.pxi":93 * p[0] = MPI_ARGV_NULL * return None * if is_string(sequence): # <<<<<<<<<<<<<< * sequence = [sequence] * else: */ goto __pyx_L4; } /* "mpi4py/MPI/asarray.pxi":96 * sequence = [sequence] * else: * sequence = list(sequence) # <<<<<<<<<<<<<< * return asarray_str(sequence, p) * */ /*else*/ { __pyx_t_3 = PySequence_List(__pyx_v_sequence); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_sequence, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; /* "mpi4py/MPI/asarray.pxi":97 * else: * sequence = list(sequence) * return asarray_str(sequence, p) # <<<<<<<<<<<<<< * * cdef inline object asarray_cmds(object sequence, int *count, char ***p): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asarray_str(__pyx_v_sequence, __pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":89 * return (sequence, ob) * * cdef inline object asarray_argv(object sequence, char ***p): # <<<<<<<<<<<<<< * if sequence is None: * p[0] = MPI_ARGV_NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.asarray_argv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sequence); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":99 * return asarray_str(sequence, p) * * cdef inline object asarray_cmds(object sequence, int *count, char ***p): # <<<<<<<<<<<<<< * if is_string(sequence): * raise ValueError("expecting a sequence of strings") */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_cmds(PyObject *__pyx_v_sequence, int *__pyx_v_count, char ***__pyx_v_p) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; __Pyx_RefNannySetupContext("asarray_cmds", 0); __Pyx_INCREF(__pyx_v_sequence); /* "mpi4py/MPI/asarray.pxi":100 * * cdef inline object asarray_cmds(object sequence, int *count, char ***p): * if is_string(sequence): # <<<<<<<<<<<<<< * raise ValueError("expecting a sequence of strings") * sequence = list(sequence) */ __pyx_t_1 = (__pyx_f_6mpi4py_3MPI_is_string(__pyx_v_sequence) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/asarray.pxi":101 * cdef inline object asarray_cmds(object sequence, int *count, char ***p): * if is_string(sequence): * raise ValueError("expecting a sequence of strings") # <<<<<<<<<<<<<< * sequence = list(sequence) * count[0] = len(sequence) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(11, 101, __pyx_L1_error) /* "mpi4py/MPI/asarray.pxi":100 * * cdef inline object asarray_cmds(object sequence, int *count, char ***p): * if is_string(sequence): # <<<<<<<<<<<<<< * raise ValueError("expecting a sequence of strings") * sequence = list(sequence) */ } /* "mpi4py/MPI/asarray.pxi":102 * if is_string(sequence): * raise ValueError("expecting a sequence of strings") * sequence = list(sequence) # <<<<<<<<<<<<<< * count[0] = len(sequence) * return asarray_str(sequence, p) */ __pyx_t_2 = PySequence_List(__pyx_v_sequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_sequence, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/asarray.pxi":103 * raise ValueError("expecting a sequence of strings") * sequence = list(sequence) * count[0] = len(sequence) # <<<<<<<<<<<<<< * return asarray_str(sequence, p) * */ __pyx_t_3 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(11, 103, __pyx_L1_error) (__pyx_v_count[0]) = ((int)__pyx_t_3); /* "mpi4py/MPI/asarray.pxi":104 * sequence = list(sequence) * count[0] = len(sequence) * return asarray_str(sequence, p) # <<<<<<<<<<<<<< * * cdef inline object asarray_argvs(object sequence, int size, char ****p): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_asarray_str(__pyx_v_sequence, __pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":99 * return asarray_str(sequence, p) * * cdef inline object asarray_cmds(object sequence, int *count, char ***p): # <<<<<<<<<<<<<< * if is_string(sequence): * raise ValueError("expecting a sequence of strings") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.asarray_cmds", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sequence); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":106 * return asarray_str(sequence, p) * * cdef inline object asarray_argvs(object sequence, int size, char ****p): # <<<<<<<<<<<<<< * if sequence is None: * p[0] = MPI_ARGVS_NULL */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_argvs(PyObject *__pyx_v_sequence, int __pyx_v_size, char ****__pyx_v_p) { int __pyx_v_i; char ***__pyx_v_array; PyObject *__pyx_v_ob = 0; PyObject *__pyx_v_argv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("asarray_argvs", 0); __Pyx_INCREF(__pyx_v_sequence); /* "mpi4py/MPI/asarray.pxi":107 * * cdef inline object asarray_argvs(object sequence, int size, char ****p): * if sequence is None: # <<<<<<<<<<<<<< * p[0] = MPI_ARGVS_NULL * return None */ __pyx_t_1 = (__pyx_v_sequence == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/asarray.pxi":108 * cdef inline object asarray_argvs(object sequence, int size, char ****p): * if sequence is None: * p[0] = MPI_ARGVS_NULL # <<<<<<<<<<<<<< * return None * if is_string(sequence): */ (__pyx_v_p[0]) = MPI_ARGVS_NULL; /* "mpi4py/MPI/asarray.pxi":109 * if sequence is None: * p[0] = MPI_ARGVS_NULL * return None # <<<<<<<<<<<<<< * if is_string(sequence): * sequence = [sequence] * size */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":107 * * cdef inline object asarray_argvs(object sequence, int size, char ****p): * if sequence is None: # <<<<<<<<<<<<<< * p[0] = MPI_ARGVS_NULL * return None */ } /* "mpi4py/MPI/asarray.pxi":110 * p[0] = MPI_ARGVS_NULL * return None * if is_string(sequence): # <<<<<<<<<<<<<< * sequence = [sequence] * size * else: */ __pyx_t_2 = (__pyx_f_6mpi4py_3MPI_is_string(__pyx_v_sequence) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/asarray.pxi":111 * return None * if is_string(sequence): * sequence = [sequence] * size # <<<<<<<<<<<<<< * else: * sequence = list(sequence) */ __pyx_t_3 = PyList_New(1 * ((__pyx_v_size<0) ? 0:__pyx_v_size)); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_size; __pyx_temp++) { __Pyx_INCREF(__pyx_v_sequence); __Pyx_GIVEREF(__pyx_v_sequence); PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_v_sequence); } } __Pyx_DECREF_SET(__pyx_v_sequence, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/asarray.pxi":110 * p[0] = MPI_ARGVS_NULL * return None * if is_string(sequence): # <<<<<<<<<<<<<< * sequence = [sequence] * size * else: */ goto __pyx_L4; } /* "mpi4py/MPI/asarray.pxi":113 * sequence = [sequence] * size * else: * sequence = list(sequence) # <<<<<<<<<<<<<< * if size != len(sequence): raise ValueError( * "expecting %d items, got %d" % (size, len(sequence))) */ /*else*/ { __pyx_t_3 = PySequence_List(__pyx_v_sequence); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_sequence, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/asarray.pxi":114 * else: * sequence = list(sequence) * if size != len(sequence): raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (size, len(sequence))) * cdef int i = 0 */ __pyx_t_4 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(11, 114, __pyx_L1_error) __pyx_t_2 = ((__pyx_v_size != __pyx_t_4) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/asarray.pxi":115 * sequence = list(sequence) * if size != len(sequence): raise ValueError( * "expecting %d items, got %d" % (size, len(sequence))) # <<<<<<<<<<<<<< * cdef int i = 0 * cdef char*** array = NULL */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(11, 115, __pyx_L1_error) __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_expecting_d_items_got_d, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/asarray.pxi":114 * else: * sequence = list(sequence) * if size != len(sequence): raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (size, len(sequence))) * cdef int i = 0 */ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(11, 114, __pyx_L1_error) } } __pyx_L4:; /* "mpi4py/MPI/asarray.pxi":116 * if size != len(sequence): raise ValueError( * "expecting %d items, got %d" % (size, len(sequence))) * cdef int i = 0 # <<<<<<<<<<<<<< * cdef char*** array = NULL * cdef object ob = allocate(size+1, sizeof(char**), &array) */ __pyx_v_i = 0; /* "mpi4py/MPI/asarray.pxi":117 * "expecting %d items, got %d" % (size, len(sequence))) * cdef int i = 0 * cdef char*** array = NULL # <<<<<<<<<<<<<< * cdef object ob = allocate(size+1, sizeof(char**), &array) * cdef object argv */ __pyx_v_array = NULL; /* "mpi4py/MPI/asarray.pxi":118 * cdef int i = 0 * cdef char*** array = NULL * cdef object ob = allocate(size+1, sizeof(char**), &array) # <<<<<<<<<<<<<< * cdef object argv * for i from 0 <= i < size: */ __pyx_t_6 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate((__pyx_v_size + 1), (sizeof(char **)), (&__pyx_v_array))); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_ob = __pyx_t_6; __pyx_t_6 = 0; /* "mpi4py/MPI/asarray.pxi":120 * cdef object ob = allocate(size+1, sizeof(char**), &array) * cdef object argv * for i from 0 <= i < size: # <<<<<<<<<<<<<< * argv = sequence[i] * if argv is None: argv = [] */ __pyx_t_7 = __pyx_v_size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { /* "mpi4py/MPI/asarray.pxi":121 * cdef object argv * for i from 0 <= i < size: * argv = sequence[i] # <<<<<<<<<<<<<< * if argv is None: argv = [] * sequence[i] = asarray_argv(argv, &array[i]) */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_sequence, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_argv, __pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/asarray.pxi":122 * for i from 0 <= i < size: * argv = sequence[i] * if argv is None: argv = [] # <<<<<<<<<<<<<< * sequence[i] = asarray_argv(argv, &array[i]) * array[size] = NULL */ __pyx_t_2 = (__pyx_v_argv == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_argv, __pyx_t_6); __pyx_t_6 = 0; } /* "mpi4py/MPI/asarray.pxi":123 * argv = sequence[i] * if argv is None: argv = [] * sequence[i] = asarray_argv(argv, &array[i]) # <<<<<<<<<<<<<< * array[size] = NULL * p[0] = array */ __pyx_t_6 = __pyx_f_6mpi4py_3MPI_asarray_argv(__pyx_v_argv, (&(__pyx_v_array[__pyx_v_i]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_SetItemInt(__pyx_v_sequence, __pyx_v_i, __pyx_t_6, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(11, 123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "mpi4py/MPI/asarray.pxi":124 * if argv is None: argv = [] * sequence[i] = asarray_argv(argv, &array[i]) * array[size] = NULL # <<<<<<<<<<<<<< * p[0] = array * return (sequence, ob) */ (__pyx_v_array[__pyx_v_size]) = NULL; /* "mpi4py/MPI/asarray.pxi":125 * sequence[i] = asarray_argv(argv, &array[i]) * array[size] = NULL * p[0] = array # <<<<<<<<<<<<<< * return (sequence, ob) * */ (__pyx_v_p[0]) = __pyx_v_array; /* "mpi4py/MPI/asarray.pxi":126 * array[size] = NULL * p[0] = array * return (sequence, ob) # <<<<<<<<<<<<<< * * cdef inline object asarray_nprocs(object sequence, int size, int **p): */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(11, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_sequence); __Pyx_GIVEREF(__pyx_v_sequence); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_sequence); __Pyx_INCREF(__pyx_v_ob); __Pyx_GIVEREF(__pyx_v_ob); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_ob); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":106 * return asarray_str(sequence, p) * * cdef inline object asarray_argvs(object sequence, int size, char ****p): # <<<<<<<<<<<<<< * if sequence is None: * p[0] = MPI_ARGVS_NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.asarray_argvs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XDECREF(__pyx_v_argv); __Pyx_XDECREF(__pyx_v_sequence); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/asarray.pxi":128 * return (sequence, ob) * * cdef inline object asarray_nprocs(object sequence, int size, int **p): # <<<<<<<<<<<<<< * cdef object ob * cdef int *array = NULL */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_asarray_nprocs(PyObject *__pyx_v_sequence, int __pyx_v_size, int **__pyx_v_p) { PyObject *__pyx_v_ob = 0; int *__pyx_v_array; int __pyx_v_i; int __pyx_v_value; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("asarray_nprocs", 0); /* "mpi4py/MPI/asarray.pxi":130 * cdef inline object asarray_nprocs(object sequence, int size, int **p): * cdef object ob * cdef int *array = NULL # <<<<<<<<<<<<<< * cdef int i = 0, value = 1 * if sequence is None or is_integral(sequence): */ __pyx_v_array = NULL; /* "mpi4py/MPI/asarray.pxi":131 * cdef object ob * cdef int *array = NULL * cdef int i = 0, value = 1 # <<<<<<<<<<<<<< * if sequence is None or is_integral(sequence): * if sequence is not None: */ __pyx_v_i = 0; __pyx_v_value = 1; /* "mpi4py/MPI/asarray.pxi":132 * cdef int *array = NULL * cdef int i = 0, value = 1 * if sequence is None or is_integral(sequence): # <<<<<<<<<<<<<< * if sequence is not None: * value = sequence */ __pyx_t_2 = (__pyx_v_sequence == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = (__pyx_f_6mpi4py_3MPI_is_integral(__pyx_v_sequence) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/asarray.pxi":133 * cdef int i = 0, value = 1 * if sequence is None or is_integral(sequence): * if sequence is not None: # <<<<<<<<<<<<<< * value = sequence * ob = newarray(size, &array) */ __pyx_t_1 = (__pyx_v_sequence != Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/asarray.pxi":134 * if sequence is None or is_integral(sequence): * if sequence is not None: * value = sequence # <<<<<<<<<<<<<< * ob = newarray(size, &array) * for i from 0 <= i < size: */ __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_sequence); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 134, __pyx_L1_error) __pyx_v_value = __pyx_t_4; /* "mpi4py/MPI/asarray.pxi":133 * cdef int i = 0, value = 1 * if sequence is None or is_integral(sequence): * if sequence is not None: # <<<<<<<<<<<<<< * value = sequence * ob = newarray(size, &array) */ } /* "mpi4py/MPI/asarray.pxi":135 * if sequence is not None: * value = sequence * ob = newarray(size, &array) # <<<<<<<<<<<<<< * for i from 0 <= i < size: * array[i] = value */ __pyx_t_5 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_size, (&__pyx_v_array)); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_ob = __pyx_t_5; __pyx_t_5 = 0; /* "mpi4py/MPI/asarray.pxi":136 * value = sequence * ob = newarray(size, &array) * for i from 0 <= i < size: # <<<<<<<<<<<<<< * array[i] = value * else: */ __pyx_t_4 = __pyx_v_size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "mpi4py/MPI/asarray.pxi":137 * ob = newarray(size, &array) * for i from 0 <= i < size: * array[i] = value # <<<<<<<<<<<<<< * else: * ob = chkarray(sequence, size, &array) */ (__pyx_v_array[__pyx_v_i]) = __pyx_v_value; } /* "mpi4py/MPI/asarray.pxi":132 * cdef int *array = NULL * cdef int i = 0, value = 1 * if sequence is None or is_integral(sequence): # <<<<<<<<<<<<<< * if sequence is not None: * value = sequence */ goto __pyx_L3; } /* "mpi4py/MPI/asarray.pxi":139 * array[i] = value * else: * ob = chkarray(sequence, size, &array) # <<<<<<<<<<<<<< * p[0] = array * return ob */ /*else*/ { __pyx_t_5 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_sequence, __pyx_v_size, (&__pyx_v_array)); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_ob = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L3:; /* "mpi4py/MPI/asarray.pxi":140 * else: * ob = chkarray(sequence, size, &array) * p[0] = array # <<<<<<<<<<<<<< * return ob * */ (__pyx_v_p[0]) = __pyx_v_array; /* "mpi4py/MPI/asarray.pxi":141 * ob = chkarray(sequence, size, &array) * p[0] = array * return ob # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ob); __pyx_r = __pyx_v_ob; goto __pyx_L0; /* "mpi4py/MPI/asarray.pxi":128 * return (sequence, ob) * * cdef inline object asarray_nprocs(object sequence, int size, int **p): # <<<<<<<<<<<<<< * cdef object ob * cdef int *array = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.asarray_nprocs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":19 * # Status * * cdef inline MPI_Status *arg_Status(object status): # <<<<<<<<<<<<<< * if status is None: return MPI_STATUS_IGNORE * return &((status).ob_mpi) */ static CYTHON_INLINE MPI_Status *__pyx_f_6mpi4py_3MPI_arg_Status(PyObject *__pyx_v_status) { MPI_Status *__pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("arg_Status", 0); /* "mpi4py/MPI/helpers.pxi":20 * * cdef inline MPI_Status *arg_Status(object status): * if status is None: return MPI_STATUS_IGNORE # <<<<<<<<<<<<<< * return &((status).ob_mpi) * */ __pyx_t_1 = (__pyx_v_status == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = MPI_STATUS_IGNORE; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":21 * cdef inline MPI_Status *arg_Status(object status): * if status is None: return MPI_STATUS_IGNORE * return &((status).ob_mpi) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = (&((struct PyMPIStatusObject *)__pyx_v_status)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":19 * # Status * * cdef inline MPI_Status *arg_Status(object status): # <<<<<<<<<<<<<< * if status is None: return MPI_STATUS_IGNORE * return &((status).ob_mpi) */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":26 * # Datatype * * cdef inline int builtin_Datatype(MPI_Datatype ob): # <<<<<<<<<<<<<< * cdef int ni = 0, na = 0, nt = 0, combiner = MPI_UNDEFINED * if ob == MPI_DATATYPE_NULL: return 1 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_builtin_Datatype(MPI_Datatype __pyx_v_ob) { int __pyx_v_ni; int __pyx_v_na; int __pyx_v_nt; int __pyx_v_combiner; int __pyx_v_ierr; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("builtin_Datatype", 0); /* "mpi4py/MPI/helpers.pxi":27 * * cdef inline int builtin_Datatype(MPI_Datatype ob): * cdef int ni = 0, na = 0, nt = 0, combiner = MPI_UNDEFINED # <<<<<<<<<<<<<< * if ob == MPI_DATATYPE_NULL: return 1 * cdef int ierr = MPI_Type_get_envelope(ob, &ni, &na, &nt, &combiner) */ __pyx_v_ni = 0; __pyx_v_na = 0; __pyx_v_nt = 0; __pyx_v_combiner = MPI_UNDEFINED; /* "mpi4py/MPI/helpers.pxi":28 * cdef inline int builtin_Datatype(MPI_Datatype ob): * cdef int ni = 0, na = 0, nt = 0, combiner = MPI_UNDEFINED * if ob == MPI_DATATYPE_NULL: return 1 # <<<<<<<<<<<<<< * cdef int ierr = MPI_Type_get_envelope(ob, &ni, &na, &nt, &combiner) * if ierr != MPI_SUCCESS: return 0 # XXX */ __pyx_t_1 = ((__pyx_v_ob == MPI_DATATYPE_NULL) != 0); if (__pyx_t_1) { __pyx_r = 1; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":29 * cdef int ni = 0, na = 0, nt = 0, combiner = MPI_UNDEFINED * if ob == MPI_DATATYPE_NULL: return 1 * cdef int ierr = MPI_Type_get_envelope(ob, &ni, &na, &nt, &combiner) # <<<<<<<<<<<<<< * if ierr != MPI_SUCCESS: return 0 # XXX * return (combiner == MPI_COMBINER_NAMED or */ __pyx_v_ierr = MPI_Type_get_envelope(__pyx_v_ob, (&__pyx_v_ni), (&__pyx_v_na), (&__pyx_v_nt), (&__pyx_v_combiner)); /* "mpi4py/MPI/helpers.pxi":30 * if ob == MPI_DATATYPE_NULL: return 1 * cdef int ierr = MPI_Type_get_envelope(ob, &ni, &na, &nt, &combiner) * if ierr != MPI_SUCCESS: return 0 # XXX # <<<<<<<<<<<<<< * return (combiner == MPI_COMBINER_NAMED or * combiner == MPI_COMBINER_F90_INTEGER or */ __pyx_t_1 = ((__pyx_v_ierr != MPI_SUCCESS) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":31 * cdef int ierr = MPI_Type_get_envelope(ob, &ni, &na, &nt, &combiner) * if ierr != MPI_SUCCESS: return 0 # XXX * return (combiner == MPI_COMBINER_NAMED or # <<<<<<<<<<<<<< * combiner == MPI_COMBINER_F90_INTEGER or * combiner == MPI_COMBINER_F90_REAL or */ __pyx_t_1 = (__pyx_v_combiner == MPI_COMBINER_NAMED); if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L5_bool_binop_done; } /* "mpi4py/MPI/helpers.pxi":32 * if ierr != MPI_SUCCESS: return 0 # XXX * return (combiner == MPI_COMBINER_NAMED or * combiner == MPI_COMBINER_F90_INTEGER or # <<<<<<<<<<<<<< * combiner == MPI_COMBINER_F90_REAL or * combiner == MPI_COMBINER_F90_COMPLEX) */ __pyx_t_1 = (__pyx_v_combiner == MPI_COMBINER_F90_INTEGER); if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L5_bool_binop_done; } /* "mpi4py/MPI/helpers.pxi":33 * return (combiner == MPI_COMBINER_NAMED or * combiner == MPI_COMBINER_F90_INTEGER or * combiner == MPI_COMBINER_F90_REAL or # <<<<<<<<<<<<<< * combiner == MPI_COMBINER_F90_COMPLEX) * */ __pyx_t_1 = (__pyx_v_combiner == MPI_COMBINER_F90_REAL); if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L5_bool_binop_done; } /* "mpi4py/MPI/helpers.pxi":34 * combiner == MPI_COMBINER_F90_INTEGER or * combiner == MPI_COMBINER_F90_REAL or * combiner == MPI_COMBINER_F90_COMPLEX) # <<<<<<<<<<<<<< * * cdef inline Datatype new_Datatype(MPI_Datatype ob): */ __pyx_t_1 = (__pyx_v_combiner == MPI_COMBINER_F90_COMPLEX); __pyx_t_2 = __pyx_t_1; __pyx_L5_bool_binop_done:; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":26 * # Datatype * * cdef inline int builtin_Datatype(MPI_Datatype ob): # <<<<<<<<<<<<<< * cdef int ni = 0, na = 0, nt = 0, combiner = MPI_UNDEFINED * if ob == MPI_DATATYPE_NULL: return 1 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":36 * combiner == MPI_COMBINER_F90_COMPLEX) * * cdef inline Datatype new_Datatype(MPI_Datatype ob): # <<<<<<<<<<<<<< * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIDatatypeObject *__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_Datatype __pyx_v_ob) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; struct PyMPIDatatypeObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Datatype", 0); /* "mpi4py/MPI/helpers.pxi":37 * * cdef inline Datatype new_Datatype(MPI_Datatype ob): * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * datatype.ob_mpi = ob * return datatype */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 37, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":38 * cdef inline Datatype new_Datatype(MPI_Datatype ob): * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = ob # <<<<<<<<<<<<<< * return datatype * */ __pyx_v_datatype->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":39 * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = ob * return datatype # <<<<<<<<<<<<<< * * cdef inline Datatype ref_Datatype(MPI_Datatype ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = __pyx_v_datatype; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":36 * combiner == MPI_COMBINER_F90_COMPLEX) * * cdef inline Datatype new_Datatype(MPI_Datatype ob): # <<<<<<<<<<<<<< * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Datatype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":41 * return datatype * * cdef inline Datatype ref_Datatype(MPI_Datatype ob): # <<<<<<<<<<<<<< * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIDatatypeObject *__pyx_f_6mpi4py_3MPI_ref_Datatype(MPI_Datatype __pyx_v_ob) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; struct PyMPIDatatypeObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("ref_Datatype", 0); /* "mpi4py/MPI/helpers.pxi":42 * * cdef inline Datatype ref_Datatype(MPI_Datatype ob): * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * datatype.ob_mpi = ob * return datatype */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 42, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":43 * cdef inline Datatype ref_Datatype(MPI_Datatype ob): * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = ob # <<<<<<<<<<<<<< * return datatype * */ __pyx_v_datatype->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":44 * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = ob * return datatype # <<<<<<<<<<<<<< * * cdef inline int del_Datatype(MPI_Datatype* ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = __pyx_v_datatype; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":41 * return datatype * * cdef inline Datatype ref_Datatype(MPI_Datatype ob): # <<<<<<<<<<<<<< * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.ref_Datatype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":46 * return datatype * * cdef inline int del_Datatype(MPI_Datatype* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_DATATYPE_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Datatype(MPI_Datatype *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_Datatype", 0); /* "mpi4py/MPI/helpers.pxi":47 * * cdef inline int del_Datatype(MPI_Datatype* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_DATATYPE_NULL : return 0 * if ob[0] == MPI_UB : return 0 */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":48 * cdef inline int del_Datatype(MPI_Datatype* ob): * if ob == NULL : return 0 * if ob[0] == MPI_DATATYPE_NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UB : return 0 * if ob[0] == MPI_LB : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_DATATYPE_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":49 * if ob == NULL : return 0 * if ob[0] == MPI_DATATYPE_NULL : return 0 * if ob[0] == MPI_UB : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LB : return 0 * if ob[0] == MPI_PACKED : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UB) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":50 * if ob[0] == MPI_DATATYPE_NULL : return 0 * if ob[0] == MPI_UB : return 0 * if ob[0] == MPI_LB : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_PACKED : return 0 * if ob[0] == MPI_BYTE : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LB) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":51 * if ob[0] == MPI_UB : return 0 * if ob[0] == MPI_LB : return 0 * if ob[0] == MPI_PACKED : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_BYTE : return 0 * if ob[0] == MPI_AINT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_PACKED) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":52 * if ob[0] == MPI_LB : return 0 * if ob[0] == MPI_PACKED : return 0 * if ob[0] == MPI_BYTE : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_AINT : return 0 * if ob[0] == MPI_OFFSET : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_BYTE) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":53 * if ob[0] == MPI_PACKED : return 0 * if ob[0] == MPI_BYTE : return 0 * if ob[0] == MPI_AINT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_OFFSET : return 0 * if ob[0] == MPI_COUNT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_AINT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":54 * if ob[0] == MPI_BYTE : return 0 * if ob[0] == MPI_AINT : return 0 * if ob[0] == MPI_OFFSET : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_COUNT : return 0 * if ob[0] == MPI_CHAR : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_OFFSET) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":55 * if ob[0] == MPI_AINT : return 0 * if ob[0] == MPI_OFFSET : return 0 * if ob[0] == MPI_COUNT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_CHAR : return 0 * if ob[0] == MPI_WCHAR : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_COUNT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":56 * if ob[0] == MPI_OFFSET : return 0 * if ob[0] == MPI_COUNT : return 0 * if ob[0] == MPI_CHAR : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_WCHAR : return 0 * if ob[0] == MPI_SIGNED_CHAR : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_CHAR) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":57 * if ob[0] == MPI_COUNT : return 0 * if ob[0] == MPI_CHAR : return 0 * if ob[0] == MPI_WCHAR : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_SIGNED_CHAR : return 0 * if ob[0] == MPI_SHORT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_WCHAR) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":58 * if ob[0] == MPI_CHAR : return 0 * if ob[0] == MPI_WCHAR : return 0 * if ob[0] == MPI_SIGNED_CHAR : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_SHORT : return 0 * if ob[0] == MPI_INT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_SIGNED_CHAR) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":59 * if ob[0] == MPI_WCHAR : return 0 * if ob[0] == MPI_SIGNED_CHAR : return 0 * if ob[0] == MPI_SHORT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INT : return 0 * if ob[0] == MPI_LONG : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_SHORT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":60 * if ob[0] == MPI_SIGNED_CHAR : return 0 * if ob[0] == MPI_SHORT : return 0 * if ob[0] == MPI_INT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LONG : return 0 * if ob[0] == MPI_LONG_LONG : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":61 * if ob[0] == MPI_SHORT : return 0 * if ob[0] == MPI_INT : return 0 * if ob[0] == MPI_LONG : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LONG_LONG : return 0 * if ob[0] == MPI_UNSIGNED_CHAR : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LONG) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":62 * if ob[0] == MPI_INT : return 0 * if ob[0] == MPI_LONG : return 0 * if ob[0] == MPI_LONG_LONG : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UNSIGNED_CHAR : return 0 * if ob[0] == MPI_UNSIGNED_SHORT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LONG_LONG) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":63 * if ob[0] == MPI_LONG : return 0 * if ob[0] == MPI_LONG_LONG : return 0 * if ob[0] == MPI_UNSIGNED_CHAR : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UNSIGNED_SHORT : return 0 * if ob[0] == MPI_UNSIGNED : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UNSIGNED_CHAR) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":64 * if ob[0] == MPI_LONG_LONG : return 0 * if ob[0] == MPI_UNSIGNED_CHAR : return 0 * if ob[0] == MPI_UNSIGNED_SHORT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UNSIGNED : return 0 * if ob[0] == MPI_UNSIGNED_LONG : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UNSIGNED_SHORT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":65 * if ob[0] == MPI_UNSIGNED_CHAR : return 0 * if ob[0] == MPI_UNSIGNED_SHORT : return 0 * if ob[0] == MPI_UNSIGNED : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UNSIGNED_LONG : return 0 * if ob[0] == MPI_UNSIGNED_LONG_LONG : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UNSIGNED) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":66 * if ob[0] == MPI_UNSIGNED_SHORT : return 0 * if ob[0] == MPI_UNSIGNED : return 0 * if ob[0] == MPI_UNSIGNED_LONG : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UNSIGNED_LONG_LONG : return 0 * if ob[0] == MPI_FLOAT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UNSIGNED_LONG) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":67 * if ob[0] == MPI_UNSIGNED : return 0 * if ob[0] == MPI_UNSIGNED_LONG : return 0 * if ob[0] == MPI_UNSIGNED_LONG_LONG : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_FLOAT : return 0 * if ob[0] == MPI_DOUBLE : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UNSIGNED_LONG_LONG) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":68 * if ob[0] == MPI_UNSIGNED_LONG : return 0 * if ob[0] == MPI_UNSIGNED_LONG_LONG : return 0 * if ob[0] == MPI_FLOAT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_DOUBLE : return 0 * if ob[0] == MPI_LONG_DOUBLE : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_FLOAT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":69 * if ob[0] == MPI_UNSIGNED_LONG_LONG : return 0 * if ob[0] == MPI_FLOAT : return 0 * if ob[0] == MPI_DOUBLE : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LONG_DOUBLE : return 0 * if ob[0] == MPI_C_BOOL : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_DOUBLE) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":70 * if ob[0] == MPI_FLOAT : return 0 * if ob[0] == MPI_DOUBLE : return 0 * if ob[0] == MPI_LONG_DOUBLE : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_C_BOOL : return 0 * if ob[0] == MPI_INT8_T : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LONG_DOUBLE) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":71 * if ob[0] == MPI_DOUBLE : return 0 * if ob[0] == MPI_LONG_DOUBLE : return 0 * if ob[0] == MPI_C_BOOL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INT8_T : return 0 * if ob[0] == MPI_INT16_T : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_C_BOOL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":72 * if ob[0] == MPI_LONG_DOUBLE : return 0 * if ob[0] == MPI_C_BOOL : return 0 * if ob[0] == MPI_INT8_T : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INT16_T : return 0 * if ob[0] == MPI_INT32_T : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INT8_T) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":73 * if ob[0] == MPI_C_BOOL : return 0 * if ob[0] == MPI_INT8_T : return 0 * if ob[0] == MPI_INT16_T : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INT32_T : return 0 * if ob[0] == MPI_INT64_T : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INT16_T) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":74 * if ob[0] == MPI_INT8_T : return 0 * if ob[0] == MPI_INT16_T : return 0 * if ob[0] == MPI_INT32_T : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INT64_T : return 0 * if ob[0] == MPI_UINT8_T : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INT32_T) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":75 * if ob[0] == MPI_INT16_T : return 0 * if ob[0] == MPI_INT32_T : return 0 * if ob[0] == MPI_INT64_T : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UINT8_T : return 0 * if ob[0] == MPI_UINT16_T : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INT64_T) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":76 * if ob[0] == MPI_INT32_T : return 0 * if ob[0] == MPI_INT64_T : return 0 * if ob[0] == MPI_UINT8_T : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UINT16_T : return 0 * if ob[0] == MPI_UINT32_T : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UINT8_T) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":77 * if ob[0] == MPI_INT64_T : return 0 * if ob[0] == MPI_UINT8_T : return 0 * if ob[0] == MPI_UINT16_T : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UINT32_T : return 0 * if ob[0] == MPI_UINT64_T : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UINT16_T) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":78 * if ob[0] == MPI_UINT8_T : return 0 * if ob[0] == MPI_UINT16_T : return 0 * if ob[0] == MPI_UINT32_T : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_UINT64_T : return 0 * if ob[0] == MPI_C_COMPLEX : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UINT32_T) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":79 * if ob[0] == MPI_UINT16_T : return 0 * if ob[0] == MPI_UINT32_T : return 0 * if ob[0] == MPI_UINT64_T : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_C_COMPLEX : return 0 * if ob[0] == MPI_C_FLOAT_COMPLEX : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_UINT64_T) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":80 * if ob[0] == MPI_UINT32_T : return 0 * if ob[0] == MPI_UINT64_T : return 0 * if ob[0] == MPI_C_COMPLEX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_C_FLOAT_COMPLEX : return 0 * if ob[0] == MPI_C_DOUBLE_COMPLEX : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_C_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":81 * if ob[0] == MPI_UINT64_T : return 0 * if ob[0] == MPI_C_COMPLEX : return 0 * if ob[0] == MPI_C_FLOAT_COMPLEX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_C_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_C_LONG_DOUBLE_COMPLEX : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_C_FLOAT_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":82 * if ob[0] == MPI_C_COMPLEX : return 0 * if ob[0] == MPI_C_FLOAT_COMPLEX : return 0 * if ob[0] == MPI_C_DOUBLE_COMPLEX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_C_LONG_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_CXX_BOOL : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_C_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":83 * if ob[0] == MPI_C_FLOAT_COMPLEX : return 0 * if ob[0] == MPI_C_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_C_LONG_DOUBLE_COMPLEX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_CXX_BOOL : return 0 * if ob[0] == MPI_CXX_FLOAT_COMPLEX : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_C_LONG_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":84 * if ob[0] == MPI_C_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_C_LONG_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_CXX_BOOL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_CXX_FLOAT_COMPLEX : return 0 * if ob[0] == MPI_CXX_DOUBLE_COMPLEX : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_CXX_BOOL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":85 * if ob[0] == MPI_C_LONG_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_CXX_BOOL : return 0 * if ob[0] == MPI_CXX_FLOAT_COMPLEX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_CXX_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_CXX_LONG_DOUBLE_COMPLEX : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_CXX_FLOAT_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":86 * if ob[0] == MPI_CXX_BOOL : return 0 * if ob[0] == MPI_CXX_FLOAT_COMPLEX : return 0 * if ob[0] == MPI_CXX_DOUBLE_COMPLEX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_CXX_LONG_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_SHORT_INT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_CXX_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":87 * if ob[0] == MPI_CXX_FLOAT_COMPLEX : return 0 * if ob[0] == MPI_CXX_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_CXX_LONG_DOUBLE_COMPLEX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_SHORT_INT : return 0 * if ob[0] == MPI_2INT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_CXX_LONG_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":88 * if ob[0] == MPI_CXX_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_CXX_LONG_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_SHORT_INT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_2INT : return 0 * if ob[0] == MPI_LONG_INT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_SHORT_INT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":89 * if ob[0] == MPI_CXX_LONG_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_SHORT_INT : return 0 * if ob[0] == MPI_2INT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LONG_INT : return 0 * if ob[0] == MPI_FLOAT_INT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_2INT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":90 * if ob[0] == MPI_SHORT_INT : return 0 * if ob[0] == MPI_2INT : return 0 * if ob[0] == MPI_LONG_INT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_FLOAT_INT : return 0 * if ob[0] == MPI_DOUBLE_INT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LONG_INT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":91 * if ob[0] == MPI_2INT : return 0 * if ob[0] == MPI_LONG_INT : return 0 * if ob[0] == MPI_FLOAT_INT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_DOUBLE_INT : return 0 * if ob[0] == MPI_LONG_DOUBLE_INT : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_FLOAT_INT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":92 * if ob[0] == MPI_LONG_INT : return 0 * if ob[0] == MPI_FLOAT_INT : return 0 * if ob[0] == MPI_DOUBLE_INT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LONG_DOUBLE_INT : return 0 * if ob[0] == MPI_CHARACTER : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_DOUBLE_INT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":93 * if ob[0] == MPI_FLOAT_INT : return 0 * if ob[0] == MPI_DOUBLE_INT : return 0 * if ob[0] == MPI_LONG_DOUBLE_INT : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_CHARACTER : return 0 * if ob[0] == MPI_LOGICAL : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LONG_DOUBLE_INT) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":94 * if ob[0] == MPI_DOUBLE_INT : return 0 * if ob[0] == MPI_LONG_DOUBLE_INT : return 0 * if ob[0] == MPI_CHARACTER : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LOGICAL : return 0 * if ob[0] == MPI_INTEGER : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_CHARACTER) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":95 * if ob[0] == MPI_LONG_DOUBLE_INT : return 0 * if ob[0] == MPI_CHARACTER : return 0 * if ob[0] == MPI_LOGICAL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INTEGER : return 0 * if ob[0] == MPI_REAL : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LOGICAL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":96 * if ob[0] == MPI_CHARACTER : return 0 * if ob[0] == MPI_LOGICAL : return 0 * if ob[0] == MPI_INTEGER : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_REAL : return 0 * if ob[0] == MPI_DOUBLE_PRECISION : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INTEGER) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":97 * if ob[0] == MPI_LOGICAL : return 0 * if ob[0] == MPI_INTEGER : return 0 * if ob[0] == MPI_REAL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_DOUBLE_PRECISION : return 0 * if ob[0] == MPI_COMPLEX : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_REAL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":98 * if ob[0] == MPI_INTEGER : return 0 * if ob[0] == MPI_REAL : return 0 * if ob[0] == MPI_DOUBLE_PRECISION : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_COMPLEX : return 0 * if ob[0] == MPI_DOUBLE_COMPLEX : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_DOUBLE_PRECISION) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":99 * if ob[0] == MPI_REAL : return 0 * if ob[0] == MPI_DOUBLE_PRECISION : return 0 * if ob[0] == MPI_COMPLEX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_LOGICAL1 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":100 * if ob[0] == MPI_DOUBLE_PRECISION : return 0 * if ob[0] == MPI_COMPLEX : return 0 * if ob[0] == MPI_DOUBLE_COMPLEX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LOGICAL1 : return 0 * if ob[0] == MPI_LOGICAL2 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":101 * if ob[0] == MPI_COMPLEX : return 0 * if ob[0] == MPI_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_LOGICAL1 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LOGICAL2 : return 0 * if ob[0] == MPI_LOGICAL4 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LOGICAL1) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":102 * if ob[0] == MPI_DOUBLE_COMPLEX : return 0 * if ob[0] == MPI_LOGICAL1 : return 0 * if ob[0] == MPI_LOGICAL2 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LOGICAL4 : return 0 * if ob[0] == MPI_LOGICAL8 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LOGICAL2) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":103 * if ob[0] == MPI_LOGICAL1 : return 0 * if ob[0] == MPI_LOGICAL2 : return 0 * if ob[0] == MPI_LOGICAL4 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LOGICAL8 : return 0 * if ob[0] == MPI_INTEGER1 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LOGICAL4) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":104 * if ob[0] == MPI_LOGICAL2 : return 0 * if ob[0] == MPI_LOGICAL4 : return 0 * if ob[0] == MPI_LOGICAL8 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INTEGER1 : return 0 * if ob[0] == MPI_INTEGER2 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LOGICAL8) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":105 * if ob[0] == MPI_LOGICAL4 : return 0 * if ob[0] == MPI_LOGICAL8 : return 0 * if ob[0] == MPI_INTEGER1 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INTEGER2 : return 0 * if ob[0] == MPI_INTEGER4 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INTEGER1) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":106 * if ob[0] == MPI_LOGICAL8 : return 0 * if ob[0] == MPI_INTEGER1 : return 0 * if ob[0] == MPI_INTEGER2 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INTEGER4 : return 0 * if ob[0] == MPI_INTEGER8 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INTEGER2) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":107 * if ob[0] == MPI_INTEGER1 : return 0 * if ob[0] == MPI_INTEGER2 : return 0 * if ob[0] == MPI_INTEGER4 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INTEGER8 : return 0 * if ob[0] == MPI_INTEGER16 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INTEGER4) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":108 * if ob[0] == MPI_INTEGER2 : return 0 * if ob[0] == MPI_INTEGER4 : return 0 * if ob[0] == MPI_INTEGER8 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INTEGER16 : return 0 * if ob[0] == MPI_REAL2 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INTEGER8) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":109 * if ob[0] == MPI_INTEGER4 : return 0 * if ob[0] == MPI_INTEGER8 : return 0 * if ob[0] == MPI_INTEGER16 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_REAL2 : return 0 * if ob[0] == MPI_REAL4 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INTEGER16) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":110 * if ob[0] == MPI_INTEGER8 : return 0 * if ob[0] == MPI_INTEGER16 : return 0 * if ob[0] == MPI_REAL2 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_REAL4 : return 0 * if ob[0] == MPI_REAL8 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_REAL2) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":111 * if ob[0] == MPI_INTEGER16 : return 0 * if ob[0] == MPI_REAL2 : return 0 * if ob[0] == MPI_REAL4 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_REAL8 : return 0 * if ob[0] == MPI_REAL16 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_REAL4) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":112 * if ob[0] == MPI_REAL2 : return 0 * if ob[0] == MPI_REAL4 : return 0 * if ob[0] == MPI_REAL8 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_REAL16 : return 0 * if ob[0] == MPI_COMPLEX4 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_REAL8) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":113 * if ob[0] == MPI_REAL4 : return 0 * if ob[0] == MPI_REAL8 : return 0 * if ob[0] == MPI_REAL16 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_COMPLEX4 : return 0 * if ob[0] == MPI_COMPLEX8 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_REAL16) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":114 * if ob[0] == MPI_REAL8 : return 0 * if ob[0] == MPI_REAL16 : return 0 * if ob[0] == MPI_COMPLEX4 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_COMPLEX8 : return 0 * if ob[0] == MPI_COMPLEX16 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_COMPLEX4) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":115 * if ob[0] == MPI_REAL16 : return 0 * if ob[0] == MPI_COMPLEX4 : return 0 * if ob[0] == MPI_COMPLEX8 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_COMPLEX16 : return 0 * if ob[0] == MPI_COMPLEX32 : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_COMPLEX8) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":116 * if ob[0] == MPI_COMPLEX4 : return 0 * if ob[0] == MPI_COMPLEX8 : return 0 * if ob[0] == MPI_COMPLEX16 : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_COMPLEX32 : return 0 * # */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_COMPLEX16) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":117 * if ob[0] == MPI_COMPLEX8 : return 0 * if ob[0] == MPI_COMPLEX16 : return 0 * if ob[0] == MPI_COMPLEX32 : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_COMPLEX32) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":119 * if ob[0] == MPI_COMPLEX32 : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * if builtin_Datatype(ob[0]): return 0 * # */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":120 * # * if not mpi_active(): return 0 * if builtin_Datatype(ob[0]): return 0 # <<<<<<<<<<<<<< * # * return MPI_Type_free(ob) */ __pyx_t_1 = (__pyx_f_6mpi4py_3MPI_builtin_Datatype((__pyx_v_ob[0])) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":122 * if builtin_Datatype(ob[0]): return 0 * # * return MPI_Type_free(ob) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = MPI_Type_free(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":46 * return datatype * * cdef inline int del_Datatype(MPI_Datatype* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_DATATYPE_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":8 * empty_status.MPI_ERROR = MPI_SUCCESS * * cdef object acquire_rs(object requests, # <<<<<<<<<<<<<< * object statuses, * int *count, */ static PyObject *__pyx_f_6mpi4py_3MPI_acquire_rs(PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses, int *__pyx_v_count, MPI_Request **__pyx_v_rp, MPI_Status **__pyx_v_sp) { MPI_Request *__pyx_v_array_r; MPI_Status *__pyx_v_array_s; PyObject *__pyx_v_ob_r = 0; PyObject *__pyx_v_ob_s = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; MPI_Request __pyx_t_3; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("acquire_rs", 0); /* "mpi4py/MPI/reqimpl.pxi":13 * MPI_Request *rp[], * MPI_Status *sp[]): * cdef MPI_Request *array_r = NULL # <<<<<<<<<<<<<< * cdef MPI_Status *array_s = NULL * cdef object ob_r = None, ob_s = None */ __pyx_v_array_r = NULL; /* "mpi4py/MPI/reqimpl.pxi":14 * MPI_Status *sp[]): * cdef MPI_Request *array_r = NULL * cdef MPI_Status *array_s = NULL # <<<<<<<<<<<<<< * cdef object ob_r = None, ob_s = None * cdef Py_ssize_t i = 0, n = len(requests) */ __pyx_v_array_s = NULL; /* "mpi4py/MPI/reqimpl.pxi":15 * cdef MPI_Request *array_r = NULL * cdef MPI_Status *array_s = NULL * cdef object ob_r = None, ob_s = None # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0, n = len(requests) * count[0] = n */ __Pyx_INCREF(Py_None); __pyx_v_ob_r = Py_None; __Pyx_INCREF(Py_None); __pyx_v_ob_s = Py_None; /* "mpi4py/MPI/reqimpl.pxi":16 * cdef MPI_Status *array_s = NULL * cdef object ob_r = None, ob_s = None * cdef Py_ssize_t i = 0, n = len(requests) # <<<<<<<<<<<<<< * count[0] = n * ob_r = allocate(n, sizeof(MPI_Request), &array_r) */ __pyx_v_i = 0; __pyx_t_1 = PyObject_Length(__pyx_v_requests); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(13, 16, __pyx_L1_error) __pyx_v_n = __pyx_t_1; /* "mpi4py/MPI/reqimpl.pxi":17 * cdef object ob_r = None, ob_s = None * cdef Py_ssize_t i = 0, n = len(requests) * count[0] = n # <<<<<<<<<<<<<< * ob_r = allocate(n, sizeof(MPI_Request), &array_r) * for i from 0 <= i < n: */ (__pyx_v_count[0]) = ((int)__pyx_v_n); /* "mpi4py/MPI/reqimpl.pxi":18 * cdef Py_ssize_t i = 0, n = len(requests) * count[0] = n * ob_r = allocate(n, sizeof(MPI_Request), &array_r) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * array_r[i] = (requests[i]).ob_mpi */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_n, (sizeof(MPI_Request)), (&__pyx_v_array_r))); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_ob_r, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/reqimpl.pxi":19 * count[0] = n * ob_r = allocate(n, sizeof(MPI_Request), &array_r) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * array_r[i] = (requests[i]).ob_mpi * rp[0] = array_r */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "mpi4py/MPI/reqimpl.pxi":20 * ob_r = allocate(n, sizeof(MPI_Request), &array_r) * for i from 0 <= i < n: * array_r[i] = (requests[i]).ob_mpi # <<<<<<<<<<<<<< * rp[0] = array_r * if statuses is not None: */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_requests, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6mpi4py_3MPI_Request)))) __PYX_ERR(13, 20, __pyx_L1_error) __pyx_t_3 = ((struct PyMPIRequestObject *)__pyx_t_2)->ob_mpi; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_array_r[__pyx_v_i]) = __pyx_t_3; } /* "mpi4py/MPI/reqimpl.pxi":21 * for i from 0 <= i < n: * array_r[i] = (requests[i]).ob_mpi * rp[0] = array_r # <<<<<<<<<<<<<< * if statuses is not None: * ob_s = allocate(n, sizeof(MPI_Status), &array_s) */ (__pyx_v_rp[0]) = __pyx_v_array_r; /* "mpi4py/MPI/reqimpl.pxi":22 * array_r[i] = (requests[i]).ob_mpi * rp[0] = array_r * if statuses is not None: # <<<<<<<<<<<<<< * ob_s = allocate(n, sizeof(MPI_Status), &array_s) * for i from 0 <= i < n: */ __pyx_t_4 = (__pyx_v_statuses != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "mpi4py/MPI/reqimpl.pxi":23 * rp[0] = array_r * if statuses is not None: * ob_s = allocate(n, sizeof(MPI_Status), &array_s) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * array_s[i] = empty_status */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_n, (sizeof(MPI_Status)), (&__pyx_v_array_s))); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_ob_s, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/reqimpl.pxi":24 * if statuses is not None: * ob_s = allocate(n, sizeof(MPI_Status), &array_s) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * array_s[i] = empty_status * sp[0] = array_s */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "mpi4py/MPI/reqimpl.pxi":25 * ob_s = allocate(n, sizeof(MPI_Status), &array_s) * for i from 0 <= i < n: * array_s[i] = empty_status # <<<<<<<<<<<<<< * sp[0] = array_s * return (ob_r, ob_s) */ (__pyx_v_array_s[__pyx_v_i]) = __pyx_v_6mpi4py_3MPI_empty_status; } /* "mpi4py/MPI/reqimpl.pxi":26 * for i from 0 <= i < n: * array_s[i] = empty_status * sp[0] = array_s # <<<<<<<<<<<<<< * return (ob_r, ob_s) * */ (__pyx_v_sp[0]) = __pyx_v_array_s; /* "mpi4py/MPI/reqimpl.pxi":22 * array_r[i] = (requests[i]).ob_mpi * rp[0] = array_r * if statuses is not None: # <<<<<<<<<<<<<< * ob_s = allocate(n, sizeof(MPI_Status), &array_s) * for i from 0 <= i < n: */ } /* "mpi4py/MPI/reqimpl.pxi":27 * array_s[i] = empty_status * sp[0] = array_s * return (ob_r, ob_s) # <<<<<<<<<<<<<< * * cdef int release_rs(object requests, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_ob_r); __Pyx_GIVEREF(__pyx_v_ob_r); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ob_r); __Pyx_INCREF(__pyx_v_ob_s); __Pyx_GIVEREF(__pyx_v_ob_s); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ob_s); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":8 * empty_status.MPI_ERROR = MPI_SUCCESS * * cdef object acquire_rs(object requests, # <<<<<<<<<<<<<< * object statuses, * int *count, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.acquire_rs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob_r); __Pyx_XDECREF(__pyx_v_ob_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":29 * return (ob_r, ob_s) * * cdef int release_rs(object requests, # <<<<<<<<<<<<<< * object statuses, * int count, */ static int __pyx_f_6mpi4py_3MPI_release_rs(PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses, int __pyx_v_count, MPI_Request *__pyx_v_rp, MPI_Status *__pyx_v_sp) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_nr; Py_ssize_t __pyx_v_ns; struct PyMPIRequestObject *__pyx_v_req = 0; int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("release_rs", 0); __Pyx_INCREF(__pyx_v_statuses); /* "mpi4py/MPI/reqimpl.pxi":34 * MPI_Request rp[], * MPI_Status sp[]) except -1: * cdef Py_ssize_t i = 0, nr = count, ns = 0 # <<<<<<<<<<<<<< * cdef Request req = None * for i from 0 <= i < nr: */ __pyx_v_i = 0; __pyx_v_nr = __pyx_v_count; __pyx_v_ns = 0; /* "mpi4py/MPI/reqimpl.pxi":35 * MPI_Status sp[]) except -1: * cdef Py_ssize_t i = 0, nr = count, ns = 0 * cdef Request req = None # <<<<<<<<<<<<<< * for i from 0 <= i < nr: * req = requests[i] */ __Pyx_INCREF(Py_None); __pyx_v_req = ((struct PyMPIRequestObject *)Py_None); /* "mpi4py/MPI/reqimpl.pxi":36 * cdef Py_ssize_t i = 0, nr = count, ns = 0 * cdef Request req = None * for i from 0 <= i < nr: # <<<<<<<<<<<<<< * req = requests[i] * req.ob_mpi = rp[i] */ __pyx_t_1 = __pyx_v_nr; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "mpi4py/MPI/reqimpl.pxi":37 * cdef Request req = None * for i from 0 <= i < nr: * req = requests[i] # <<<<<<<<<<<<<< * req.ob_mpi = rp[i] * if rp[i] == MPI_REQUEST_NULL: */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_requests, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_req, ((struct PyMPIRequestObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "mpi4py/MPI/reqimpl.pxi":38 * for i from 0 <= i < nr: * req = requests[i] * req.ob_mpi = rp[i] # <<<<<<<<<<<<<< * if rp[i] == MPI_REQUEST_NULL: * req.ob_buf = None */ __pyx_v_req->ob_mpi = (__pyx_v_rp[__pyx_v_i]); /* "mpi4py/MPI/reqimpl.pxi":39 * req = requests[i] * req.ob_mpi = rp[i] * if rp[i] == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * req.ob_buf = None * if statuses is not None: */ __pyx_t_4 = (((__pyx_v_rp[__pyx_v_i]) == MPI_REQUEST_NULL) != 0); if (__pyx_t_4) { /* "mpi4py/MPI/reqimpl.pxi":40 * req.ob_mpi = rp[i] * if rp[i] == MPI_REQUEST_NULL: * req.ob_buf = None # <<<<<<<<<<<<<< * if statuses is not None: * ns = len(statuses) */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_req->ob_buf); __Pyx_DECREF(__pyx_v_req->ob_buf); __pyx_v_req->ob_buf = Py_None; /* "mpi4py/MPI/reqimpl.pxi":39 * req = requests[i] * req.ob_mpi = rp[i] * if rp[i] == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * req.ob_buf = None * if statuses is not None: */ } } /* "mpi4py/MPI/reqimpl.pxi":41 * if rp[i] == MPI_REQUEST_NULL: * req.ob_buf = None * if statuses is not None: # <<<<<<<<<<<<<< * ns = len(statuses) * if nr > ns : */ __pyx_t_4 = (__pyx_v_statuses != Py_None); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "mpi4py/MPI/reqimpl.pxi":42 * req.ob_buf = None * if statuses is not None: * ns = len(statuses) # <<<<<<<<<<<<<< * if nr > ns : * if isinstance(statuses, list): */ __pyx_t_1 = PyObject_Length(__pyx_v_statuses); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(13, 42, __pyx_L1_error) __pyx_v_ns = __pyx_t_1; /* "mpi4py/MPI/reqimpl.pxi":43 * if statuses is not None: * ns = len(statuses) * if nr > ns : # <<<<<<<<<<<<<< * if isinstance(statuses, list): * statuses += [Status.__new__(Status) */ __pyx_t_5 = ((__pyx_v_nr > __pyx_v_ns) != 0); if (__pyx_t_5) { /* "mpi4py/MPI/reqimpl.pxi":44 * ns = len(statuses) * if nr > ns : * if isinstance(statuses, list): # <<<<<<<<<<<<<< * statuses += [Status.__new__(Status) * for i from ns <= i < nr] */ __pyx_t_5 = PyList_Check(__pyx_v_statuses); __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/reqimpl.pxi":45 * if nr > ns : * if isinstance(statuses, list): * statuses += [Status.__new__(Status) # <<<<<<<<<<<<<< * for i from ns <= i < nr] * ns = nr */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/reqimpl.pxi":46 * if isinstance(statuses, list): * statuses += [Status.__new__(Status) * for i from ns <= i < nr] # <<<<<<<<<<<<<< * ns = nr * for i from 0 <= i < ns: */ __pyx_t_1 = __pyx_v_nr; for (__pyx_v_i = __pyx_v_ns; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "mpi4py/MPI/reqimpl.pxi":45 * if nr > ns : * if isinstance(statuses, list): * statuses += [Status.__new__(Status) # <<<<<<<<<<<<<< * for i from ns <= i < nr] * ns = nr */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Status(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Status), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 45, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(13, 45, __pyx_L1_error) __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; } __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_statuses, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_statuses, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/reqimpl.pxi":47 * statuses += [Status.__new__(Status) * for i from ns <= i < nr] * ns = nr # <<<<<<<<<<<<<< * for i from 0 <= i < ns: * (statuses[i]).ob_mpi = sp[i] */ __pyx_v_ns = __pyx_v_nr; /* "mpi4py/MPI/reqimpl.pxi":44 * ns = len(statuses) * if nr > ns : * if isinstance(statuses, list): # <<<<<<<<<<<<<< * statuses += [Status.__new__(Status) * for i from ns <= i < nr] */ } /* "mpi4py/MPI/reqimpl.pxi":43 * if statuses is not None: * ns = len(statuses) * if nr > ns : # <<<<<<<<<<<<<< * if isinstance(statuses, list): * statuses += [Status.__new__(Status) */ } /* "mpi4py/MPI/reqimpl.pxi":48 * for i from ns <= i < nr] * ns = nr * for i from 0 <= i < ns: # <<<<<<<<<<<<<< * (statuses[i]).ob_mpi = sp[i] * return 0 */ __pyx_t_1 = __pyx_v_ns; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "mpi4py/MPI/reqimpl.pxi":49 * ns = nr * for i from 0 <= i < ns: * (statuses[i]).ob_mpi = sp[i] # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_statuses, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6mpi4py_3MPI_Status)))) __PYX_ERR(13, 49, __pyx_L1_error) ((struct PyMPIStatusObject *)__pyx_t_2)->ob_mpi = (__pyx_v_sp[__pyx_v_i]); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } /* "mpi4py/MPI/reqimpl.pxi":41 * if rp[i] == MPI_REQUEST_NULL: * req.ob_buf = None * if statuses is not None: # <<<<<<<<<<<<<< * ns = len(statuses) * if nr > ns : */ } /* "mpi4py/MPI/reqimpl.pxi":50 * for i from 0 <= i < ns: * (statuses[i]).ob_mpi = sp[i] * return 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":29 * return (ob_r, ob_s) * * cdef int release_rs(object requests, # <<<<<<<<<<<<<< * object statuses, * int count, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.release_rs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_req); __Pyx_XDECREF(__pyx_v_statuses); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":64 * cdef dict kargs * * def __cinit__(self, query_fn, free_fn, cancel_fn, args, kargs): # <<<<<<<<<<<<<< * self.query_fn = query_fn * self.free_fn = free_fn */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_7_p_greq_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_7_p_greq_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_query_fn = 0; PyObject *__pyx_v_free_fn = 0; PyObject *__pyx_v_cancel_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kargs = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query_fn,&__pyx_n_s_free_fn,&__pyx_n_s_cancel_fn,&__pyx_n_s_args,&__pyx_n_s_kargs,0}; PyObject* values[5] = {0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_query_fn)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_free_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 1); __PYX_ERR(13, 64, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cancel_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 2); __PYX_ERR(13, 64, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 3); __PYX_ERR(13, 64, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kargs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, 4); __PYX_ERR(13, 64, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(13, 64, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); } __pyx_v_query_fn = values[0]; __pyx_v_free_fn = values[1]; __pyx_v_cancel_fn = values[2]; __pyx_v_args = values[3]; __pyx_v_kargs = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(13, 64, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI._p_greq.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7_p_greq___cinit__(((struct __pyx_obj_6mpi4py_3MPI__p_greq *)__pyx_v_self), __pyx_v_query_fn, __pyx_v_free_fn, __pyx_v_cancel_fn, __pyx_v_args, __pyx_v_kargs); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_7_p_greq___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_self, PyObject *__pyx_v_query_fn, PyObject *__pyx_v_free_fn, PyObject *__pyx_v_cancel_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/reqimpl.pxi":65 * * def __cinit__(self, query_fn, free_fn, cancel_fn, args, kargs): * self.query_fn = query_fn # <<<<<<<<<<<<<< * self.free_fn = free_fn * self.cancel_fn = cancel_fn */ __Pyx_INCREF(__pyx_v_query_fn); __Pyx_GIVEREF(__pyx_v_query_fn); __Pyx_GOTREF(__pyx_v_self->query_fn); __Pyx_DECREF(__pyx_v_self->query_fn); __pyx_v_self->query_fn = __pyx_v_query_fn; /* "mpi4py/MPI/reqimpl.pxi":66 * def __cinit__(self, query_fn, free_fn, cancel_fn, args, kargs): * self.query_fn = query_fn * self.free_fn = free_fn # <<<<<<<<<<<<<< * self.cancel_fn = cancel_fn * self.args = tuple(args) if args is not None else () */ __Pyx_INCREF(__pyx_v_free_fn); __Pyx_GIVEREF(__pyx_v_free_fn); __Pyx_GOTREF(__pyx_v_self->free_fn); __Pyx_DECREF(__pyx_v_self->free_fn); __pyx_v_self->free_fn = __pyx_v_free_fn; /* "mpi4py/MPI/reqimpl.pxi":67 * self.query_fn = query_fn * self.free_fn = free_fn * self.cancel_fn = cancel_fn # <<<<<<<<<<<<<< * self.args = tuple(args) if args is not None else () * self.kargs = dict(kargs) if kargs is not None else {} */ __Pyx_INCREF(__pyx_v_cancel_fn); __Pyx_GIVEREF(__pyx_v_cancel_fn); __Pyx_GOTREF(__pyx_v_self->cancel_fn); __Pyx_DECREF(__pyx_v_self->cancel_fn); __pyx_v_self->cancel_fn = __pyx_v_cancel_fn; /* "mpi4py/MPI/reqimpl.pxi":68 * self.free_fn = free_fn * self.cancel_fn = cancel_fn * self.args = tuple(args) if args is not None else () # <<<<<<<<<<<<<< * self.kargs = dict(kargs) if kargs is not None else {} * */ __pyx_t_2 = (__pyx_v_args != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_empty_tuple); __pyx_t_1 = __pyx_empty_tuple; } __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->args); __Pyx_DECREF(__pyx_v_self->args); __pyx_v_self->args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/reqimpl.pxi":69 * self.cancel_fn = cancel_fn * self.args = tuple(args) if args is not None else () * self.kargs = dict(kargs) if kargs is not None else {} # <<<<<<<<<<<<<< * * cdef int query(self, MPI_Status *status) except -1: */ __pyx_t_2 = (__pyx_v_kargs != Py_None); if ((__pyx_t_2 != 0)) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_kargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->kargs); __Pyx_DECREF(__pyx_v_self->kargs); __pyx_v_self->kargs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/reqimpl.pxi":64 * cdef dict kargs * * def __cinit__(self, query_fn, free_fn, cancel_fn, args, kargs): # <<<<<<<<<<<<<< * self.query_fn = query_fn * self.free_fn = free_fn */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._p_greq.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":71 * self.kargs = dict(kargs) if kargs is not None else {} * * cdef int query(self, MPI_Status *status) except -1: # <<<<<<<<<<<<<< * status.MPI_SOURCE = MPI_ANY_SOURCE * status.MPI_TAG = MPI_ANY_TAG */ static int __pyx_f_6mpi4py_3MPI_7_p_greq_query(struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_self, MPI_Status *__pyx_v_status) { struct PyMPIStatusObject *__pyx_v_sts = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; MPI_Status __pyx_t_5; __Pyx_RefNannySetupContext("query", 0); /* "mpi4py/MPI/reqimpl.pxi":72 * * cdef int query(self, MPI_Status *status) except -1: * status.MPI_SOURCE = MPI_ANY_SOURCE # <<<<<<<<<<<<<< * status.MPI_TAG = MPI_ANY_TAG * MPI_Status_set_elements(status, MPI_BYTE, 0) */ __pyx_v_status->MPI_SOURCE = MPI_ANY_SOURCE; /* "mpi4py/MPI/reqimpl.pxi":73 * cdef int query(self, MPI_Status *status) except -1: * status.MPI_SOURCE = MPI_ANY_SOURCE * status.MPI_TAG = MPI_ANY_TAG # <<<<<<<<<<<<<< * MPI_Status_set_elements(status, MPI_BYTE, 0) * MPI_Status_set_cancelled(status, 0) */ __pyx_v_status->MPI_TAG = MPI_ANY_TAG; /* "mpi4py/MPI/reqimpl.pxi":74 * status.MPI_SOURCE = MPI_ANY_SOURCE * status.MPI_TAG = MPI_ANY_TAG * MPI_Status_set_elements(status, MPI_BYTE, 0) # <<<<<<<<<<<<<< * MPI_Status_set_cancelled(status, 0) * cdef Status sts = Status.__new__(Status) */ ((void)MPI_Status_set_elements(__pyx_v_status, MPI_BYTE, 0)); /* "mpi4py/MPI/reqimpl.pxi":75 * status.MPI_TAG = MPI_ANY_TAG * MPI_Status_set_elements(status, MPI_BYTE, 0) * MPI_Status_set_cancelled(status, 0) # <<<<<<<<<<<<<< * cdef Status sts = Status.__new__(Status) * if self.query_fn is not None: */ ((void)MPI_Status_set_cancelled(__pyx_v_status, 0)); /* "mpi4py/MPI/reqimpl.pxi":76 * MPI_Status_set_elements(status, MPI_BYTE, 0) * MPI_Status_set_cancelled(status, 0) * cdef Status sts = Status.__new__(Status) # <<<<<<<<<<<<<< * if self.query_fn is not None: * sts.ob_mpi = status[0] */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Status(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Status), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 76, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_sts = ((struct PyMPIStatusObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/reqimpl.pxi":77 * MPI_Status_set_cancelled(status, 0) * cdef Status sts = Status.__new__(Status) * if self.query_fn is not None: # <<<<<<<<<<<<<< * sts.ob_mpi = status[0] * self.query_fn(sts, *self.args, **self.kargs) */ __pyx_t_3 = (__pyx_v_self->query_fn != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/reqimpl.pxi":78 * cdef Status sts = Status.__new__(Status) * if self.query_fn is not None: * sts.ob_mpi = status[0] # <<<<<<<<<<<<<< * self.query_fn(sts, *self.args, **self.kargs) * status[0] = sts.ob_mpi */ __pyx_v_sts->ob_mpi = (__pyx_v_status[0]); /* "mpi4py/MPI/reqimpl.pxi":79 * if self.query_fn is not None: * sts.ob_mpi = status[0] * self.query_fn(sts, *self.args, **self.kargs) # <<<<<<<<<<<<<< * status[0] = sts.ob_mpi * if self.cancel_fn is None: */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_sts)); __Pyx_GIVEREF(((PyObject *)__pyx_v_sts)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_sts)); if (unlikely(__pyx_v_self->args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(13, 79, __pyx_L1_error) } __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_v_self->args); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_self->kargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(13, 79, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_self->query_fn, __pyx_t_1, __pyx_v_self->kargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(13, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/reqimpl.pxi":80 * sts.ob_mpi = status[0] * self.query_fn(sts, *self.args, **self.kargs) * status[0] = sts.ob_mpi # <<<<<<<<<<<<<< * if self.cancel_fn is None: * MPI_Status_set_cancelled(status, 0) */ __pyx_t_5 = __pyx_v_sts->ob_mpi; (__pyx_v_status[0]) = __pyx_t_5; /* "mpi4py/MPI/reqimpl.pxi":81 * self.query_fn(sts, *self.args, **self.kargs) * status[0] = sts.ob_mpi * if self.cancel_fn is None: # <<<<<<<<<<<<<< * MPI_Status_set_cancelled(status, 0) * return MPI_SUCCESS */ __pyx_t_4 = (__pyx_v_self->cancel_fn == Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/reqimpl.pxi":82 * status[0] = sts.ob_mpi * if self.cancel_fn is None: * MPI_Status_set_cancelled(status, 0) # <<<<<<<<<<<<<< * return MPI_SUCCESS * */ ((void)MPI_Status_set_cancelled(__pyx_v_status, 0)); /* "mpi4py/MPI/reqimpl.pxi":81 * self.query_fn(sts, *self.args, **self.kargs) * status[0] = sts.ob_mpi * if self.cancel_fn is None: # <<<<<<<<<<<<<< * MPI_Status_set_cancelled(status, 0) * return MPI_SUCCESS */ } /* "mpi4py/MPI/reqimpl.pxi":77 * MPI_Status_set_cancelled(status, 0) * cdef Status sts = Status.__new__(Status) * if self.query_fn is not None: # <<<<<<<<<<<<<< * sts.ob_mpi = status[0] * self.query_fn(sts, *self.args, **self.kargs) */ } /* "mpi4py/MPI/reqimpl.pxi":83 * if self.cancel_fn is None: * MPI_Status_set_cancelled(status, 0) * return MPI_SUCCESS # <<<<<<<<<<<<<< * * cdef int free(self) except -1: */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":71 * self.kargs = dict(kargs) if kargs is not None else {} * * cdef int query(self, MPI_Status *status) except -1: # <<<<<<<<<<<<<< * status.MPI_SOURCE = MPI_ANY_SOURCE * status.MPI_TAG = MPI_ANY_TAG */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI._p_greq.query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_sts); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":85 * return MPI_SUCCESS * * cdef int free(self) except -1: # <<<<<<<<<<<<<< * if self.free_fn is not None: * self.free_fn(*self.args, **self.kargs) */ static int __pyx_f_6mpi4py_3MPI_7_p_greq_free(struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("free", 0); /* "mpi4py/MPI/reqimpl.pxi":86 * * cdef int free(self) except -1: * if self.free_fn is not None: # <<<<<<<<<<<<<< * self.free_fn(*self.args, **self.kargs) * return MPI_SUCCESS */ __pyx_t_1 = (__pyx_v_self->free_fn != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/reqimpl.pxi":87 * cdef int free(self) except -1: * if self.free_fn is not None: * self.free_fn(*self.args, **self.kargs) # <<<<<<<<<<<<<< * return MPI_SUCCESS * */ if (unlikely(__pyx_v_self->args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(13, 87, __pyx_L1_error) } if (unlikely(__pyx_v_self->kargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(13, 87, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->free_fn, __pyx_v_self->args, __pyx_v_self->kargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/reqimpl.pxi":86 * * cdef int free(self) except -1: * if self.free_fn is not None: # <<<<<<<<<<<<<< * self.free_fn(*self.args, **self.kargs) * return MPI_SUCCESS */ } /* "mpi4py/MPI/reqimpl.pxi":88 * if self.free_fn is not None: * self.free_fn(*self.args, **self.kargs) * return MPI_SUCCESS # <<<<<<<<<<<<<< * * cdef int cancel(self, bint completed) except -1: */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":85 * return MPI_SUCCESS * * cdef int free(self) except -1: # <<<<<<<<<<<<<< * if self.free_fn is not None: * self.free_fn(*self.args, **self.kargs) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._p_greq.free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":90 * return MPI_SUCCESS * * cdef int cancel(self, bint completed) except -1: # <<<<<<<<<<<<<< * if self.cancel_fn is not None: * self.cancel_fn(completed, *self.args, **self.kargs) */ static int __pyx_f_6mpi4py_3MPI_7_p_greq_cancel(struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_self, int __pyx_v_completed) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("cancel", 0); /* "mpi4py/MPI/reqimpl.pxi":91 * * cdef int cancel(self, bint completed) except -1: * if self.cancel_fn is not None: # <<<<<<<<<<<<<< * self.cancel_fn(completed, *self.args, **self.kargs) * return MPI_SUCCESS */ __pyx_t_1 = (__pyx_v_self->cancel_fn != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/reqimpl.pxi":92 * cdef int cancel(self, bint completed) except -1: * if self.cancel_fn is not None: * self.cancel_fn(completed, *self.args, **self.kargs) # <<<<<<<<<<<<<< * return MPI_SUCCESS * */ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_completed); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_v_self->args == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(13, 92, __pyx_L1_error) } __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_v_self->args); if (unlikely(!__pyx_t_3)) __PYX_ERR(13, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_v_self->kargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(13, 92, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_self->cancel_fn, __pyx_t_3, __pyx_v_self->kargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(13, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/reqimpl.pxi":91 * * cdef int cancel(self, bint completed) except -1: * if self.cancel_fn is not None: # <<<<<<<<<<<<<< * self.cancel_fn(completed, *self.args, **self.kargs) * return MPI_SUCCESS */ } /* "mpi4py/MPI/reqimpl.pxi":93 * if self.cancel_fn is not None: * self.cancel_fn(completed, *self.args, **self.kargs) * return MPI_SUCCESS # <<<<<<<<<<<<<< * * # --- */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":90 * return MPI_SUCCESS * * cdef int cancel(self, bint completed) except -1: # <<<<<<<<<<<<<< * if self.cancel_fn is not None: * self.cancel_fn(completed, *self.args, **self.kargs) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI._p_greq.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":97 * # --- * * cdef int greq_query(void *extra_state, MPI_Status *status) \ # <<<<<<<<<<<<<< * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state */ static int __pyx_f_6mpi4py_3MPI_greq_query(void *__pyx_v_extra_state, MPI_Status *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_state = 0; int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("greq_query", 0); /* "mpi4py/MPI/reqimpl.pxi":99 * cdef int greq_query(void *extra_state, MPI_Status *status) \ * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state # <<<<<<<<<<<<<< * cdef int ierr = MPI_SUCCESS * cdef object exc */ __pyx_t_1 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_greq *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/reqimpl.pxi":100 * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/reqimpl.pxi":102 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.query(status) * except MPIException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "mpi4py/MPI/reqimpl.pxi":103 * cdef object exc * try: * state.query(status) # <<<<<<<<<<<<<< * except MPIException as exc: * print_traceback() */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_7_p_greq_query(__pyx_v_state, __pyx_v_status); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(13, 103, __pyx_L3_error) /* "mpi4py/MPI/reqimpl.pxi":102 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.query(status) * except MPIException as exc: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/reqimpl.pxi":104 * try: * state.query(status) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_5) { __Pyx_AddTraceback("mpi4py.MPI.greq_query", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(13, 104, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/reqimpl.pxi":105 * state.query(status) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/reqimpl.pxi":106 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 106, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 106, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 106, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_5; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/reqimpl.pxi":107 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.greq_query", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(13, 107, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/reqimpl.pxi":108 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/reqimpl.pxi":109 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/reqimpl.pxi":102 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.query(status) * except MPIException as exc: */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/reqimpl.pxi":110 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * cdef int greq_free(void *extra_state) \ */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":97 * # --- * * cdef int greq_query(void *extra_state, MPI_Status *status) \ # <<<<<<<<<<<<<< * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.greq_query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":112 * return ierr * * cdef int greq_free(void *extra_state) \ # <<<<<<<<<<<<<< * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state */ static int __pyx_f_6mpi4py_3MPI_greq_free(void *__pyx_v_extra_state) { struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_state = 0; int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("greq_free", 0); /* "mpi4py/MPI/reqimpl.pxi":114 * cdef int greq_free(void *extra_state) \ * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state # <<<<<<<<<<<<<< * cdef int ierr = MPI_SUCCESS * cdef object exc */ __pyx_t_1 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_greq *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/reqimpl.pxi":115 * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/reqimpl.pxi":117 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.free() * except MPIException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "mpi4py/MPI/reqimpl.pxi":118 * cdef object exc * try: * state.free() # <<<<<<<<<<<<<< * except MPIException as exc: * print_traceback() */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_7_p_greq_free(__pyx_v_state); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(13, 118, __pyx_L3_error) /* "mpi4py/MPI/reqimpl.pxi":117 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.free() * except MPIException as exc: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/reqimpl.pxi":119 * try: * state.free() * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_5) { __Pyx_AddTraceback("mpi4py.MPI.greq_free", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(13, 119, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/reqimpl.pxi":120 * state.free() * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/reqimpl.pxi":121 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 121, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 121, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 121, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_5; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/reqimpl.pxi":122 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.greq_free", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(13, 122, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/reqimpl.pxi":123 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * Py_DECREF(extra_state) */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/reqimpl.pxi":124 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * Py_DECREF(extra_state) * return ierr */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/reqimpl.pxi":117 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.free() * except MPIException as exc: */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/reqimpl.pxi":125 * print_traceback() * ierr = MPI_ERR_OTHER * Py_DECREF(extra_state) # <<<<<<<<<<<<<< * return ierr * */ Py_DECREF(((PyObject *)__pyx_v_extra_state)); /* "mpi4py/MPI/reqimpl.pxi":126 * ierr = MPI_ERR_OTHER * Py_DECREF(extra_state) * return ierr # <<<<<<<<<<<<<< * * cdef int greq_cancel(void *extra_state, int completed) \ */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":112 * return ierr * * cdef int greq_free(void *extra_state) \ # <<<<<<<<<<<<<< * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.greq_free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":128 * return ierr * * cdef int greq_cancel(void *extra_state, int completed) \ # <<<<<<<<<<<<<< * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state */ static int __pyx_f_6mpi4py_3MPI_greq_cancel(void *__pyx_v_extra_state, int __pyx_v_completed) { struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_state = 0; int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("greq_cancel", 0); /* "mpi4py/MPI/reqimpl.pxi":130 * cdef int greq_cancel(void *extra_state, int completed) \ * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state # <<<<<<<<<<<<<< * cdef int ierr = MPI_SUCCESS * cdef object exc */ __pyx_t_1 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_greq *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/reqimpl.pxi":131 * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/reqimpl.pxi":133 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.cancel(completed) * except MPIException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "mpi4py/MPI/reqimpl.pxi":134 * cdef object exc * try: * state.cancel(completed) # <<<<<<<<<<<<<< * except MPIException as exc: * print_traceback() */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_7_p_greq_cancel(__pyx_v_state, __pyx_v_completed); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(13, 134, __pyx_L3_error) /* "mpi4py/MPI/reqimpl.pxi":133 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.cancel(completed) * except MPIException as exc: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/reqimpl.pxi":135 * try: * state.cancel(completed) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_5) { __Pyx_AddTraceback("mpi4py.MPI.greq_cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(13, 135, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/reqimpl.pxi":136 * state.cancel(completed) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/reqimpl.pxi":137 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(13, 137, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(13, 137, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(13, 137, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_5; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/reqimpl.pxi":138 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.greq_cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(13, 138, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/reqimpl.pxi":139 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/reqimpl.pxi":140 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/reqimpl.pxi":133 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.cancel(completed) * except MPIException as exc: */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/reqimpl.pxi":141 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * # --- */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":128 * return ierr * * cdef int greq_cancel(void *extra_state, int completed) \ # <<<<<<<<<<<<<< * except MPI_ERR_UNKNOWN with gil: * cdef _p_greq state = <_p_greq>extra_state */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.greq_cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":146 * * @cython.callspec("MPIAPI") * cdef int greq_query_fn(void *extra_state, MPI_Status *status) nogil: # <<<<<<<<<<<<<< * if extra_state == NULL: * return MPI_ERR_INTERN */ static int MPIAPI __pyx_f_6mpi4py_3MPI_greq_query_fn(void *__pyx_v_extra_state, MPI_Status *__pyx_v_status) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/reqimpl.pxi":147 * @cython.callspec("MPIAPI") * cdef int greq_query_fn(void *extra_state, MPI_Status *status) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if status == NULL: */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/reqimpl.pxi":148 * cdef int greq_query_fn(void *extra_state, MPI_Status *status) nogil: * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if status == NULL: * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":147 * @cython.callspec("MPIAPI") * cdef int greq_query_fn(void *extra_state, MPI_Status *status) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if status == NULL: */ } /* "mpi4py/MPI/reqimpl.pxi":149 * if extra_state == NULL: * return MPI_ERR_INTERN * if status == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_status == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/reqimpl.pxi":150 * return MPI_ERR_INTERN * if status == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":149 * if extra_state == NULL: * return MPI_ERR_INTERN * if status == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/reqimpl.pxi":151 * if status == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return greq_query(extra_state, status) */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/reqimpl.pxi":152 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * return greq_query(extra_state, status) * */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":151 * if status == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return greq_query(extra_state, status) */ } /* "mpi4py/MPI/reqimpl.pxi":153 * if not Py_IsInitialized(): * return MPI_ERR_INTERN * return greq_query(extra_state, status) # <<<<<<<<<<<<<< * * @cython.callspec("MPIAPI") */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_greq_query(__pyx_v_extra_state, __pyx_v_status); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(13, 153, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":146 * * @cython.callspec("MPIAPI") * cdef int greq_query_fn(void *extra_state, MPI_Status *status) nogil: # <<<<<<<<<<<<<< * if extra_state == NULL: * return MPI_ERR_INTERN */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.greq_query_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":156 * * @cython.callspec("MPIAPI") * cdef int greq_free_fn(void *extra_state) nogil: # <<<<<<<<<<<<<< * if extra_state == NULL: * return MPI_ERR_INTERN */ static int MPIAPI __pyx_f_6mpi4py_3MPI_greq_free_fn(void *__pyx_v_extra_state) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/reqimpl.pxi":157 * @cython.callspec("MPIAPI") * cdef int greq_free_fn(void *extra_state) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/reqimpl.pxi":158 * cdef int greq_free_fn(void *extra_state) nogil: * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":157 * @cython.callspec("MPIAPI") * cdef int greq_free_fn(void *extra_state) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/reqimpl.pxi":159 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return greq_free(extra_state) */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/reqimpl.pxi":160 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * return greq_free(extra_state) * */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":159 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return greq_free(extra_state) */ } /* "mpi4py/MPI/reqimpl.pxi":161 * if not Py_IsInitialized(): * return MPI_ERR_INTERN * return greq_free(extra_state) # <<<<<<<<<<<<<< * * @cython.callspec("MPIAPI") */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_greq_free(__pyx_v_extra_state); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(13, 161, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":156 * * @cython.callspec("MPIAPI") * cdef int greq_free_fn(void *extra_state) nogil: # <<<<<<<<<<<<<< * if extra_state == NULL: * return MPI_ERR_INTERN */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.greq_free_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/reqimpl.pxi":164 * * @cython.callspec("MPIAPI") * cdef int greq_cancel_fn(void *extra_state, int completed) nogil: # <<<<<<<<<<<<<< * if extra_state == NULL: * return MPI_ERR_INTERN */ static int MPIAPI __pyx_f_6mpi4py_3MPI_greq_cancel_fn(void *__pyx_v_extra_state, int __pyx_v_completed) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/reqimpl.pxi":165 * @cython.callspec("MPIAPI") * cdef int greq_cancel_fn(void *extra_state, int completed) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/reqimpl.pxi":166 * cdef int greq_cancel_fn(void *extra_state, int completed) nogil: * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":165 * @cython.callspec("MPIAPI") * cdef int greq_cancel_fn(void *extra_state, int completed) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/reqimpl.pxi":167 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return greq_cancel(extra_state, completed) */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/reqimpl.pxi":168 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * return greq_cancel(extra_state, completed) * */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":167 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return greq_cancel(extra_state, completed) */ } /* "mpi4py/MPI/reqimpl.pxi":169 * if not Py_IsInitialized(): * return MPI_ERR_INTERN * return greq_cancel(extra_state, completed) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_greq_cancel(__pyx_v_extra_state, __pyx_v_completed); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(13, 169, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/reqimpl.pxi":164 * * @cython.callspec("MPIAPI") * cdef int greq_cancel_fn(void *extra_state, int completed) nogil: # <<<<<<<<<<<<<< * if extra_state == NULL: * return MPI_ERR_INTERN */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.greq_cancel_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":129 * include "reqimpl.pxi" * * cdef inline Request new_Request(MPI_Request ob): # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * request.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIRequestObject *__pyx_f_6mpi4py_3MPI_new_Request(MPI_Request __pyx_v_ob) { struct PyMPIRequestObject *__pyx_v_request = 0; struct PyMPIRequestObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Request", 0); /* "mpi4py/MPI/helpers.pxi":130 * * cdef inline Request new_Request(MPI_Request ob): * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * request.ob_mpi = ob * return request */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 130, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":131 * cdef inline Request new_Request(MPI_Request ob): * cdef Request request = Request.__new__(Request) * request.ob_mpi = ob # <<<<<<<<<<<<<< * return request * */ __pyx_v_request->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":132 * cdef Request request = Request.__new__(Request) * request.ob_mpi = ob * return request # <<<<<<<<<<<<<< * * cdef inline int del_Request(MPI_Request* ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = __pyx_v_request; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":129 * include "reqimpl.pxi" * * cdef inline Request new_Request(MPI_Request ob): # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * request.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Request", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":134 * return request * * cdef inline int del_Request(MPI_Request* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_REQUEST_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Request(MPI_Request *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_Request", 0); /* "mpi4py/MPI/helpers.pxi":135 * * cdef inline int del_Request(MPI_Request* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_REQUEST_NULL : return 0 * # */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":136 * cdef inline int del_Request(MPI_Request* ob): * if ob == NULL : return 0 * if ob[0] == MPI_REQUEST_NULL : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_REQUEST_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":138 * if ob[0] == MPI_REQUEST_NULL : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * return MPI_Request_free(ob) * */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":139 * # * if not mpi_active(): return 0 * return MPI_Request_free(ob) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = MPI_Request_free(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":134 * return request * * cdef inline int del_Request(MPI_Request* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_REQUEST_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":144 * # Message * * cdef inline Message new_Message(MPI_Message ob): # <<<<<<<<<<<<<< * cdef Message message = Message.__new__(Message) * message.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIMessageObject *__pyx_f_6mpi4py_3MPI_new_Message(MPI_Message __pyx_v_ob) { struct PyMPIMessageObject *__pyx_v_message = 0; struct PyMPIMessageObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Message", 0); /* "mpi4py/MPI/helpers.pxi":145 * * cdef inline Message new_Message(MPI_Message ob): * cdef Message message = Message.__new__(Message) # <<<<<<<<<<<<<< * message.ob_mpi = ob * return message */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Message(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 145, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":146 * cdef inline Message new_Message(MPI_Message ob): * cdef Message message = Message.__new__(Message) * message.ob_mpi = ob # <<<<<<<<<<<<<< * return message * */ __pyx_v_message->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":147 * cdef Message message = Message.__new__(Message) * message.ob_mpi = ob * return message # <<<<<<<<<<<<<< * * cdef inline int del_Message(MPI_Message* ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = __pyx_v_message; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":144 * # Message * * cdef inline Message new_Message(MPI_Message ob): # <<<<<<<<<<<<<< * cdef Message message = Message.__new__(Message) * message.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Message", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":149 * return message * * cdef inline int del_Message(MPI_Message* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_MESSAGE_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Message(MPI_Message *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_Message", 0); /* "mpi4py/MPI/helpers.pxi":150 * * cdef inline int del_Message(MPI_Message* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_MESSAGE_NULL : return 0 * if ob[0] == MPI_MESSAGE_NO_PROC : return 0 */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":151 * cdef inline int del_Message(MPI_Message* ob): * if ob == NULL : return 0 * if ob[0] == MPI_MESSAGE_NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_MESSAGE_NO_PROC : return 0 * # */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_MESSAGE_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":152 * if ob == NULL : return 0 * if ob[0] == MPI_MESSAGE_NULL : return 0 * if ob[0] == MPI_MESSAGE_NO_PROC : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_MESSAGE_NO_PROC) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":154 * if ob[0] == MPI_MESSAGE_NO_PROC : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * # ob[0] = MPI_MESSAGE_NULL * return 0 */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":156 * if not mpi_active(): return 0 * # ob[0] = MPI_MESSAGE_NULL * return 0 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":149 * return message * * cdef inline int del_Message(MPI_Message* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_MESSAGE_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":3 * # ----------------------------------------------------------------------------- * * cdef object _op_MAX(object x, object y): # <<<<<<<<<<<<<< * """maximum""" * if y > x: */ static PyObject *__pyx_f_6mpi4py_3MPI__op_MAX(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_op_MAX", 0); /* "mpi4py/MPI/opimpl.pxi":5 * cdef object _op_MAX(object x, object y): * """maximum""" * if y > x: # <<<<<<<<<<<<<< * return y * else: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_y, __pyx_v_x, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 5, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(14, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "mpi4py/MPI/opimpl.pxi":6 * """maximum""" * if y > x: * return y # <<<<<<<<<<<<<< * else: * return x */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_y); __pyx_r = __pyx_v_y; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":5 * cdef object _op_MAX(object x, object y): * """maximum""" * if y > x: # <<<<<<<<<<<<<< * return y * else: */ } /* "mpi4py/MPI/opimpl.pxi":8 * return y * else: * return x # <<<<<<<<<<<<<< * * cdef object _op_MIN(object x, object y): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_x); __pyx_r = __pyx_v_x; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":3 * # ----------------------------------------------------------------------------- * * cdef object _op_MAX(object x, object y): # <<<<<<<<<<<<<< * """maximum""" * if y > x: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._op_MAX", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":10 * return x * * cdef object _op_MIN(object x, object y): # <<<<<<<<<<<<<< * """minimum""" * if y < x: */ static PyObject *__pyx_f_6mpi4py_3MPI__op_MIN(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("_op_MIN", 0); /* "mpi4py/MPI/opimpl.pxi":12 * cdef object _op_MIN(object x, object y): * """minimum""" * if y < x: # <<<<<<<<<<<<<< * return y * else: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_y, __pyx_v_x, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 12, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(14, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "mpi4py/MPI/opimpl.pxi":13 * """minimum""" * if y < x: * return y # <<<<<<<<<<<<<< * else: * return x */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_y); __pyx_r = __pyx_v_y; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":12 * cdef object _op_MIN(object x, object y): * """minimum""" * if y < x: # <<<<<<<<<<<<<< * return y * else: */ } /* "mpi4py/MPI/opimpl.pxi":15 * return y * else: * return x # <<<<<<<<<<<<<< * * cdef object _op_SUM(object x, object y): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_x); __pyx_r = __pyx_v_x; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":10 * return x * * cdef object _op_MIN(object x, object y): # <<<<<<<<<<<<<< * """minimum""" * if y < x: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._op_MIN", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":17 * return x * * cdef object _op_SUM(object x, object y): # <<<<<<<<<<<<<< * """sum""" * return x + y */ static PyObject *__pyx_f_6mpi4py_3MPI__op_SUM(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_op_SUM", 0); /* "mpi4py/MPI/opimpl.pxi":19 * cdef object _op_SUM(object x, object y): * """sum""" * return x + y # <<<<<<<<<<<<<< * * cdef object _op_PROD(object x, object y): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Add(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":17 * return x * * cdef object _op_SUM(object x, object y): # <<<<<<<<<<<<<< * """sum""" * return x + y */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._op_SUM", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":21 * return x + y * * cdef object _op_PROD(object x, object y): # <<<<<<<<<<<<<< * """product""" * return x * y */ static PyObject *__pyx_f_6mpi4py_3MPI__op_PROD(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_op_PROD", 0); /* "mpi4py/MPI/opimpl.pxi":23 * cdef object _op_PROD(object x, object y): * """product""" * return x * y # <<<<<<<<<<<<<< * * cdef object _op_BAND(object x, object y): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Multiply(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":21 * return x + y * * cdef object _op_PROD(object x, object y): # <<<<<<<<<<<<<< * """product""" * return x * y */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._op_PROD", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":25 * return x * y * * cdef object _op_BAND(object x, object y): # <<<<<<<<<<<<<< * """bit-wise and""" * return x & y */ static PyObject *__pyx_f_6mpi4py_3MPI__op_BAND(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_op_BAND", 0); /* "mpi4py/MPI/opimpl.pxi":27 * cdef object _op_BAND(object x, object y): * """bit-wise and""" * return x & y # <<<<<<<<<<<<<< * * cdef object _op_BOR(object x, object y): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_And(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":25 * return x * y * * cdef object _op_BAND(object x, object y): # <<<<<<<<<<<<<< * """bit-wise and""" * return x & y */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._op_BAND", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":29 * return x & y * * cdef object _op_BOR(object x, object y): # <<<<<<<<<<<<<< * """bit-wise or""" * return x | y */ static PyObject *__pyx_f_6mpi4py_3MPI__op_BOR(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_op_BOR", 0); /* "mpi4py/MPI/opimpl.pxi":31 * cdef object _op_BOR(object x, object y): * """bit-wise or""" * return x | y # <<<<<<<<<<<<<< * * cdef object _op_BXOR(object x, object y): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Or(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":29 * return x & y * * cdef object _op_BOR(object x, object y): # <<<<<<<<<<<<<< * """bit-wise or""" * return x | y */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._op_BOR", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":33 * return x | y * * cdef object _op_BXOR(object x, object y): # <<<<<<<<<<<<<< * """bit-wise xor""" * return x ^ y */ static PyObject *__pyx_f_6mpi4py_3MPI__op_BXOR(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_op_BXOR", 0); /* "mpi4py/MPI/opimpl.pxi":35 * cdef object _op_BXOR(object x, object y): * """bit-wise xor""" * return x ^ y # <<<<<<<<<<<<<< * * cdef object _op_LAND(object x, object y): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyNumber_Xor(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":33 * return x | y * * cdef object _op_BXOR(object x, object y): # <<<<<<<<<<<<<< * """bit-wise xor""" * return x ^ y */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._op_BXOR", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":37 * return x ^ y * * cdef object _op_LAND(object x, object y): # <<<<<<<<<<<<<< * """logical and""" * return bool(x) & bool(y) */ static PyObject *__pyx_f_6mpi4py_3MPI__op_LAND(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_op_LAND", 0); /* "mpi4py/MPI/opimpl.pxi":39 * cdef object _op_LAND(object x, object y): * """logical and""" * return bool(x) & bool(y) # <<<<<<<<<<<<<< * * cdef object _op_LOR(object x, object y): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_x); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 39, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_y); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 39, __pyx_L1_error) __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_And(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":37 * return x ^ y * * cdef object _op_LAND(object x, object y): # <<<<<<<<<<<<<< * """logical and""" * return bool(x) & bool(y) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI._op_LAND", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":41 * return bool(x) & bool(y) * * cdef object _op_LOR(object x, object y): # <<<<<<<<<<<<<< * """logical or""" * return bool(x) | bool(y) */ static PyObject *__pyx_f_6mpi4py_3MPI__op_LOR(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_op_LOR", 0); /* "mpi4py/MPI/opimpl.pxi":43 * cdef object _op_LOR(object x, object y): * """logical or""" * return bool(x) | bool(y) # <<<<<<<<<<<<<< * * cdef object _op_LXOR(object x, object y): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_x); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 43, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_y); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 43, __pyx_L1_error) __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Or(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":41 * return bool(x) & bool(y) * * cdef object _op_LOR(object x, object y): # <<<<<<<<<<<<<< * """logical or""" * return bool(x) | bool(y) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI._op_LOR", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":45 * return bool(x) | bool(y) * * cdef object _op_LXOR(object x, object y): # <<<<<<<<<<<<<< * """logical xor""" * return bool(x) ^ bool(y) */ static PyObject *__pyx_f_6mpi4py_3MPI__op_LXOR(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_op_LXOR", 0); /* "mpi4py/MPI/opimpl.pxi":47 * cdef object _op_LXOR(object x, object y): * """logical xor""" * return bool(x) ^ bool(y) # <<<<<<<<<<<<<< * * cdef object _op_MAXLOC(object x, object y): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_x); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 47, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_y); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(14, 47, __pyx_L1_error) __pyx_t_3 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Xor(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":45 * return bool(x) | bool(y) * * cdef object _op_LXOR(object x, object y): # <<<<<<<<<<<<<< * """logical xor""" * return bool(x) ^ bool(y) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI._op_LXOR", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":49 * return bool(x) ^ bool(y) * * cdef object _op_MAXLOC(object x, object y): # <<<<<<<<<<<<<< * """maximum and location""" * cdef object i, j, u, v */ static PyObject *__pyx_f_6mpi4py_3MPI__op_MAXLOC(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_v_i = 0; PyObject *__pyx_v_j = 0; PyObject *__pyx_v_u = 0; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); int __pyx_t_5; __Pyx_RefNannySetupContext("_op_MAXLOC", 0); /* "mpi4py/MPI/opimpl.pxi":52 * """maximum and location""" * cdef object i, j, u, v * u, i = x # <<<<<<<<<<<<<< * v, j = y * if u > v: */ if ((likely(PyTuple_CheckExact(__pyx_v_x))) || (PyList_CheckExact(__pyx_v_x))) { PyObject* sequence = __pyx_v_x; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(14, 52, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(14, 52, __pyx_L1_error) __pyx_t_4 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(14, 52, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_u = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_i = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/opimpl.pxi":53 * cdef object i, j, u, v * u, i = x * v, j = y # <<<<<<<<<<<<<< * if u > v: * return u, i */ if ((likely(PyTuple_CheckExact(__pyx_v_y))) || (PyList_CheckExact(__pyx_v_y))) { PyObject* sequence = __pyx_v_y; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(14, 53, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(14, 53, __pyx_L1_error) __pyx_t_4 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(14, 53, __pyx_L1_error) __pyx_L6_unpacking_done:; } __pyx_v_v = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_j = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/opimpl.pxi":54 * u, i = x * v, j = y * if u > v: # <<<<<<<<<<<<<< * return u, i * elif v > u: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_u, __pyx_v_v, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 54, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(14, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "mpi4py/MPI/opimpl.pxi":55 * v, j = y * if u > v: * return u, i # <<<<<<<<<<<<<< * elif v > u: * return v, j */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_u); __Pyx_GIVEREF(__pyx_v_u); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_u); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_i); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":54 * u, i = x * v, j = y * if u > v: # <<<<<<<<<<<<<< * return u, i * elif v > u: */ } /* "mpi4py/MPI/opimpl.pxi":56 * if u > v: * return u, i * elif v > u: # <<<<<<<<<<<<<< * return v, j * elif j < i: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, __pyx_v_u, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 56, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(14, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "mpi4py/MPI/opimpl.pxi":57 * return u, i * elif v > u: * return v, j # <<<<<<<<<<<<<< * elif j < i: * return v, j */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v); __Pyx_INCREF(__pyx_v_j); __Pyx_GIVEREF(__pyx_v_j); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_j); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":56 * if u > v: * return u, i * elif v > u: # <<<<<<<<<<<<<< * return v, j * elif j < i: */ } /* "mpi4py/MPI/opimpl.pxi":58 * elif v > u: * return v, j * elif j < i: # <<<<<<<<<<<<<< * return v, j * else: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_j, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 58, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(14, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "mpi4py/MPI/opimpl.pxi":59 * return v, j * elif j < i: * return v, j # <<<<<<<<<<<<<< * else: * return u, i */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v); __Pyx_INCREF(__pyx_v_j); __Pyx_GIVEREF(__pyx_v_j); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_j); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":58 * elif v > u: * return v, j * elif j < i: # <<<<<<<<<<<<<< * return v, j * else: */ } /* "mpi4py/MPI/opimpl.pxi":61 * return v, j * else: * return u, i # <<<<<<<<<<<<<< * * cdef object _op_MINLOC(object x, object y): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_u); __Pyx_GIVEREF(__pyx_v_u); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_u); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_i); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":49 * return bool(x) ^ bool(y) * * cdef object _op_MAXLOC(object x, object y): # <<<<<<<<<<<<<< * """maximum and location""" * cdef object i, j, u, v */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._op_MAXLOC", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_j); __Pyx_XDECREF(__pyx_v_u); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":63 * return u, i * * cdef object _op_MINLOC(object x, object y): # <<<<<<<<<<<<<< * """minimum and location""" * cdef object i, j, u, v */ static PyObject *__pyx_f_6mpi4py_3MPI__op_MINLOC(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_v_i = 0; PyObject *__pyx_v_j = 0; PyObject *__pyx_v_u = 0; PyObject *__pyx_v_v = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); int __pyx_t_5; __Pyx_RefNannySetupContext("_op_MINLOC", 0); /* "mpi4py/MPI/opimpl.pxi":66 * """minimum and location""" * cdef object i, j, u, v * u, i = x # <<<<<<<<<<<<<< * v, j = y * if u < v: */ if ((likely(PyTuple_CheckExact(__pyx_v_x))) || (PyList_CheckExact(__pyx_v_x))) { PyObject* sequence = __pyx_v_x; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(14, 66, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_2 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(14, 66, __pyx_L1_error) __pyx_t_4 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(14, 66, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_u = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_i = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/opimpl.pxi":67 * cdef object i, j, u, v * u, i = x * v, j = y # <<<<<<<<<<<<<< * if u < v: * return u, i */ if ((likely(PyTuple_CheckExact(__pyx_v_y))) || (PyList_CheckExact(__pyx_v_y))) { PyObject* sequence = __pyx_v_y; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(14, 67, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_1 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); #else __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(14, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; index = 0; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(14, 67, __pyx_L1_error) __pyx_t_4 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(14, 67, __pyx_L1_error) __pyx_L6_unpacking_done:; } __pyx_v_v = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_j = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/opimpl.pxi":68 * u, i = x * v, j = y * if u < v: # <<<<<<<<<<<<<< * return u, i * elif v < u: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_u, __pyx_v_v, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 68, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(14, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "mpi4py/MPI/opimpl.pxi":69 * v, j = y * if u < v: * return u, i # <<<<<<<<<<<<<< * elif v < u: * return v, j */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_u); __Pyx_GIVEREF(__pyx_v_u); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_u); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_i); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":68 * u, i = x * v, j = y * if u < v: # <<<<<<<<<<<<<< * return u, i * elif v < u: */ } /* "mpi4py/MPI/opimpl.pxi":70 * if u < v: * return u, i * elif v < u: # <<<<<<<<<<<<<< * return v, j * elif j < i: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, __pyx_v_u, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 70, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(14, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "mpi4py/MPI/opimpl.pxi":71 * return u, i * elif v < u: * return v, j # <<<<<<<<<<<<<< * elif j < i: * return v, j */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v); __Pyx_INCREF(__pyx_v_j); __Pyx_GIVEREF(__pyx_v_j); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_j); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":70 * if u < v: * return u, i * elif v < u: # <<<<<<<<<<<<<< * return v, j * elif j < i: */ } /* "mpi4py/MPI/opimpl.pxi":72 * elif v < u: * return v, j * elif j < i: # <<<<<<<<<<<<<< * return v, j * else: */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_j, __pyx_v_i, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 72, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(14, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "mpi4py/MPI/opimpl.pxi":73 * return v, j * elif j < i: * return v, j # <<<<<<<<<<<<<< * else: * return u, i */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_v); __Pyx_GIVEREF(__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v); __Pyx_INCREF(__pyx_v_j); __Pyx_GIVEREF(__pyx_v_j); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_j); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":72 * elif v < u: * return v, j * elif j < i: # <<<<<<<<<<<<<< * return v, j * else: */ } /* "mpi4py/MPI/opimpl.pxi":75 * return v, j * else: * return u, i # <<<<<<<<<<<<<< * * cdef object _op_REPLACE(object x, object y): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_u); __Pyx_GIVEREF(__pyx_v_u); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_u); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_i); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":63 * return u, i * * cdef object _op_MINLOC(object x, object y): # <<<<<<<<<<<<<< * """minimum and location""" * cdef object i, j, u, v */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._op_MINLOC", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_j); __Pyx_XDECREF(__pyx_v_u); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":77 * return u, i * * cdef object _op_REPLACE(object x, object y): # <<<<<<<<<<<<<< * """replace, (x, y) -> y""" * return y */ static PyObject *__pyx_f_6mpi4py_3MPI__op_REPLACE(CYTHON_UNUSED PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_op_REPLACE", 0); /* "mpi4py/MPI/opimpl.pxi":79 * cdef object _op_REPLACE(object x, object y): * """replace, (x, y) -> y""" * return y # <<<<<<<<<<<<<< * * cdef object _op_NO_OP(object x, object y): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_y); __pyx_r = __pyx_v_y; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":77 * return u, i * * cdef object _op_REPLACE(object x, object y): # <<<<<<<<<<<<<< * """replace, (x, y) -> y""" * return y */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":81 * return y * * cdef object _op_NO_OP(object x, object y): # <<<<<<<<<<<<<< * """no-op, (x, y) -> x""" * return x */ static PyObject *__pyx_f_6mpi4py_3MPI__op_NO_OP(PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_op_NO_OP", 0); /* "mpi4py/MPI/opimpl.pxi":83 * cdef object _op_NO_OP(object x, object y): * """no-op, (x, y) -> x""" * return x # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_x); __pyx_r = __pyx_v_x; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":81 * return y * * cdef object _op_NO_OP(object x, object y): # <<<<<<<<<<<<<< * """no-op, (x, y) -> x""" * return x */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":89 * cdef list op_user_registry = [None]*(1+32) * * cdef inline object op_user_py(int index, object x, object y, object dt): # <<<<<<<<<<<<<< * return op_user_registry[index](x, y, dt) * */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_op_user_py(int __pyx_v_index, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_dt) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("op_user_py", 0); /* "mpi4py/MPI/opimpl.pxi":90 * * cdef inline object op_user_py(int index, object x, object y, object dt): * return op_user_registry[index](x, y, dt) # <<<<<<<<<<<<<< * * cdef inline void op_user_mpi( */ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_6mpi4py_3MPI_op_user_registry == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(14, 90, __pyx_L1_error) } __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_6mpi4py_3MPI_op_user_registry, __pyx_v_index, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(14, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_4 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_x, __pyx_v_y, __pyx_v_dt}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 90, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_x, __pyx_v_y, __pyx_v_dt}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 90, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_x); __Pyx_INCREF(__pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_y); __Pyx_INCREF(__pyx_v_dt); __Pyx_GIVEREF(__pyx_v_dt); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_dt); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":89 * cdef list op_user_registry = [None]*(1+32) * * cdef inline object op_user_py(int index, object x, object y, object dt): # <<<<<<<<<<<<<< * return op_user_registry[index](x, y, dt) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.op_user_py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":92 * return op_user_registry[index](x, y, dt) * * cdef inline void op_user_mpi( # <<<<<<<<<<<<<< * int index, void *a, void *b, MPI_Aint n, MPI_Datatype *t) with gil: * cdef Datatype datatype */ static CYTHON_INLINE void __pyx_f_6mpi4py_3MPI_op_user_mpi(int __pyx_v_index, void *__pyx_v_a, void *__pyx_v_b, MPI_Aint __pyx_v_n, MPI_Datatype *__pyx_v_t) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; char const *__pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("op_user_mpi", 0); /* "mpi4py/MPI/opimpl.pxi":96 * cdef Datatype datatype * # errors in user-defined reduction operations are unrecoverable * try: # <<<<<<<<<<<<<< * datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = t[0] */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/opimpl.pxi":97 * # errors in user-defined reduction operations are unrecoverable * try: * datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * datatype.ob_mpi = t[0] * try: op_user_py(index, tomemory(a, n), tomemory(b, n), datatype) */ __pyx_t_4 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 97, __pyx_L3_error) __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_5 = ((PyObject *)__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/opimpl.pxi":98 * try: * datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = t[0] # <<<<<<<<<<<<<< * try: op_user_py(index, tomemory(a, n), tomemory(b, n), datatype) * finally: datatype.ob_mpi = MPI_DATATYPE_NULL */ __pyx_v_datatype->ob_mpi = (__pyx_v_t[0]); /* "mpi4py/MPI/opimpl.pxi":99 * datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = t[0] * try: op_user_py(index, tomemory(a, n), tomemory(b, n), datatype) # <<<<<<<<<<<<<< * finally: datatype.ob_mpi = MPI_DATATYPE_NULL * except: */ /*try:*/ { __pyx_t_5 = ((PyObject *)__pyx_f_6mpi4py_3MPI_tomemory(__pyx_v_a, __pyx_v_n)); if (unlikely(!__pyx_t_5)) __PYX_ERR(14, 99, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = ((PyObject *)__pyx_f_6mpi4py_3MPI_tomemory(__pyx_v_b, __pyx_v_n)); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 99, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_f_6mpi4py_3MPI_op_user_py(__pyx_v_index, __pyx_t_5, __pyx_t_4, ((PyObject *)__pyx_v_datatype)); if (unlikely(!__pyx_t_6)) __PYX_ERR(14, 99, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "mpi4py/MPI/opimpl.pxi":100 * datatype.ob_mpi = t[0] * try: op_user_py(index, tomemory(a, n), tomemory(b, n), datatype) * finally: datatype.ob_mpi = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * except: * # print the full exception traceback and abort. */ /*finally:*/ { /*normal exit:*/{ __pyx_v_datatype->ob_mpi = MPI_DATATYPE_NULL; goto __pyx_L11; } __pyx_L10_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename; { __pyx_v_datatype->ob_mpi = MPI_DATATYPE_NULL; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); } __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9; goto __pyx_L3_error; } __pyx_L11:; } /* "mpi4py/MPI/opimpl.pxi":96 * cdef Datatype datatype * # errors in user-defined reduction operations are unrecoverable * try: # <<<<<<<<<<<<<< * datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = t[0] */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/opimpl.pxi":101 * try: op_user_py(index, tomemory(a, n), tomemory(b, n), datatype) * finally: datatype.ob_mpi = MPI_DATATYPE_NULL * except: # <<<<<<<<<<<<<< * # print the full exception traceback and abort. * PySys_WriteStderr(b"Fatal Python error: %s\n", */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.op_user_mpi", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(14, 101, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); /* "mpi4py/MPI/opimpl.pxi":103 * except: * # print the full exception traceback and abort. * PySys_WriteStderr(b"Fatal Python error: %s\n", # <<<<<<<<<<<<<< * b"exception in user-defined reduction operation") * try: print_traceback() */ PySys_WriteStderr(((char *)"Fatal Python error: %s\n"), ((char *)"exception in user-defined reduction operation")); /* "mpi4py/MPI/opimpl.pxi":105 * PySys_WriteStderr(b"Fatal Python error: %s\n", * b"exception in user-defined reduction operation") * try: print_traceback() # <<<<<<<<<<<<<< * finally: MPI_Abort(MPI_COMM_WORLD, 1) * */ /*try:*/ { __pyx_f_6mpi4py_3MPI_print_traceback(); } /* "mpi4py/MPI/opimpl.pxi":106 * b"exception in user-defined reduction operation") * try: print_traceback() * finally: MPI_Abort(MPI_COMM_WORLD, 1) # <<<<<<<<<<<<<< * * cdef inline void op_user_call( */ /*finally:*/ { /*normal exit:*/{ ((void)MPI_Abort(MPI_COMM_WORLD, 1)); goto __pyx_L20; } __pyx_L20:; } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/opimpl.pxi":96 * cdef Datatype datatype * # errors in user-defined reduction operations are unrecoverable * try: # <<<<<<<<<<<<<< * datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = t[0] */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/opimpl.pxi":92 * return op_user_registry[index](x, y, dt) * * cdef inline void op_user_mpi( # <<<<<<<<<<<<<< * int index, void *a, void *b, MPI_Aint n, MPI_Datatype *t) with gil: * cdef Datatype datatype */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_WriteUnraisable("mpi4py.MPI.op_user_mpi", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } /* "mpi4py/MPI/opimpl.pxi":108 * finally: MPI_Abort(MPI_COMM_WORLD, 1) * * cdef inline void op_user_call( # <<<<<<<<<<<<<< * int index, void *a, void *b, int *plen, MPI_Datatype *t) nogil: * # make it abort if Python has finalized */ static CYTHON_INLINE void __pyx_f_6mpi4py_3MPI_op_user_call(int __pyx_v_index, void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_plen, MPI_Datatype *__pyx_v_t) { MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_extent; MPI_Aint __pyx_v_n; int __pyx_t_1; /* "mpi4py/MPI/opimpl.pxi":111 * int index, void *a, void *b, int *plen, MPI_Datatype *t) nogil: * # make it abort if Python has finalized * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * MPI_Abort(MPI_COMM_WORLD, 1) * # make it abort if module clenaup has been done */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/opimpl.pxi":112 * # make it abort if Python has finalized * if not Py_IsInitialized(): * MPI_Abort(MPI_COMM_WORLD, 1) # <<<<<<<<<<<<<< * # make it abort if module clenaup has been done * if (op_user_registry) == NULL: */ ((void)MPI_Abort(MPI_COMM_WORLD, 1)); /* "mpi4py/MPI/opimpl.pxi":111 * int index, void *a, void *b, int *plen, MPI_Datatype *t) nogil: * # make it abort if Python has finalized * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * MPI_Abort(MPI_COMM_WORLD, 1) * # make it abort if module clenaup has been done */ } /* "mpi4py/MPI/opimpl.pxi":114 * MPI_Abort(MPI_COMM_WORLD, 1) * # make it abort if module clenaup has been done * if (op_user_registry) == NULL: # <<<<<<<<<<<<<< * MPI_Abort(MPI_COMM_WORLD, 1) * # compute the byte-size of memory buffers */ __pyx_t_1 = ((((void *)__pyx_v_6mpi4py_3MPI_op_user_registry) == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/opimpl.pxi":115 * # make it abort if module clenaup has been done * if (op_user_registry) == NULL: * MPI_Abort(MPI_COMM_WORLD, 1) # <<<<<<<<<<<<<< * # compute the byte-size of memory buffers * cdef MPI_Aint lb=0, extent=0 */ ((void)MPI_Abort(MPI_COMM_WORLD, 1)); /* "mpi4py/MPI/opimpl.pxi":114 * MPI_Abort(MPI_COMM_WORLD, 1) * # make it abort if module clenaup has been done * if (op_user_registry) == NULL: # <<<<<<<<<<<<<< * MPI_Abort(MPI_COMM_WORLD, 1) * # compute the byte-size of memory buffers */ } /* "mpi4py/MPI/opimpl.pxi":117 * MPI_Abort(MPI_COMM_WORLD, 1) * # compute the byte-size of memory buffers * cdef MPI_Aint lb=0, extent=0 # <<<<<<<<<<<<<< * MPI_Type_get_extent(t[0], &lb, &extent) * cdef MPI_Aint n = plen[0] * extent */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/opimpl.pxi":118 * # compute the byte-size of memory buffers * cdef MPI_Aint lb=0, extent=0 * MPI_Type_get_extent(t[0], &lb, &extent) # <<<<<<<<<<<<<< * cdef MPI_Aint n = plen[0] * extent * # make the actual GIL-safe Python call */ ((void)MPI_Type_get_extent((__pyx_v_t[0]), (&__pyx_v_lb), (&__pyx_v_extent))); /* "mpi4py/MPI/opimpl.pxi":119 * cdef MPI_Aint lb=0, extent=0 * MPI_Type_get_extent(t[0], &lb, &extent) * cdef MPI_Aint n = plen[0] * extent # <<<<<<<<<<<<<< * # make the actual GIL-safe Python call * op_user_mpi(index, a, b, n, t) */ __pyx_v_n = (((MPI_Aint)(__pyx_v_plen[0])) * __pyx_v_extent); /* "mpi4py/MPI/opimpl.pxi":121 * cdef MPI_Aint n = plen[0] * extent * # make the actual GIL-safe Python call * op_user_mpi(index, a, b, n, t) # <<<<<<<<<<<<<< * * @cython.callspec("MPIAPI") */ __pyx_f_6mpi4py_3MPI_op_user_mpi(__pyx_v_index, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":108 * finally: MPI_Abort(MPI_COMM_WORLD, 1) * * cdef inline void op_user_call( # <<<<<<<<<<<<<< * int index, void *a, void *b, int *plen, MPI_Datatype *t) nogil: * # make it abort if Python has finalized */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":124 * * @cython.callspec("MPIAPI") * cdef void op_user_01(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 1, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_01(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":125 * @cython.callspec("MPIAPI") * cdef void op_user_01(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call( 1, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_02(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(1, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":124 * * @cython.callspec("MPIAPI") * cdef void op_user_01(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 1, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":127 * op_user_call( 1, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_02(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 2, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_02(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":128 * @cython.callspec("MPIAPI") * cdef void op_user_02(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call( 2, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_03(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(2, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":127 * op_user_call( 1, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_02(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 2, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":130 * op_user_call( 2, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_03(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 3, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_03(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":131 * @cython.callspec("MPIAPI") * cdef void op_user_03(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call( 3, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_04(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(3, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":130 * op_user_call( 2, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_03(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 3, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":133 * op_user_call( 3, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_04(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 4, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_04(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":134 * @cython.callspec("MPIAPI") * cdef void op_user_04(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call( 4, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_05(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(4, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":133 * op_user_call( 3, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_04(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 4, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":136 * op_user_call( 4, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_05(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 5, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_05(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":137 * @cython.callspec("MPIAPI") * cdef void op_user_05(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call( 5, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_06(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(5, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":136 * op_user_call( 4, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_05(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 5, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":139 * op_user_call( 5, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_06(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 6, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_06(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":140 * @cython.callspec("MPIAPI") * cdef void op_user_06(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call( 6, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_07(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(6, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":139 * op_user_call( 5, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_06(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 6, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":142 * op_user_call( 6, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_07(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 7, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_07(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":143 * @cython.callspec("MPIAPI") * cdef void op_user_07(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call( 7, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_08(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(7, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":142 * op_user_call( 6, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_07(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 7, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":145 * op_user_call( 7, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_08(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 8, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_08(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":146 * @cython.callspec("MPIAPI") * cdef void op_user_08(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call( 8, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_09(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(8, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":145 * op_user_call( 7, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_08(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 8, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":148 * op_user_call( 8, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_09(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 9, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_09(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":149 * @cython.callspec("MPIAPI") * cdef void op_user_09(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call( 9, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_10(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(9, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":148 * op_user_call( 8, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_09(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call( 9, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":151 * op_user_call( 9, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_10(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(10, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_10(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":152 * @cython.callspec("MPIAPI") * cdef void op_user_10(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(10, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_11(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(10, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":151 * op_user_call( 9, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_10(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(10, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":154 * op_user_call(10, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_11(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(11, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_11(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":155 * @cython.callspec("MPIAPI") * cdef void op_user_11(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(11, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_12(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(11, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":154 * op_user_call(10, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_11(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(11, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":157 * op_user_call(11, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_12(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(12, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_12(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":158 * @cython.callspec("MPIAPI") * cdef void op_user_12(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(12, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_13(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(12, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":157 * op_user_call(11, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_12(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(12, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":160 * op_user_call(12, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_13(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(13, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_13(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":161 * @cython.callspec("MPIAPI") * cdef void op_user_13(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(13, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_14(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(13, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":160 * op_user_call(12, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_13(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(13, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":163 * op_user_call(13, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_14(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(14, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_14(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":164 * @cython.callspec("MPIAPI") * cdef void op_user_14(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(14, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_15(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(14, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":163 * op_user_call(13, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_14(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(14, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":166 * op_user_call(14, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_15(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(15, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_15(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":167 * @cython.callspec("MPIAPI") * cdef void op_user_15(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(15, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_16(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(15, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":166 * op_user_call(14, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_15(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(15, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":169 * op_user_call(15, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_16(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(16, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_16(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":170 * @cython.callspec("MPIAPI") * cdef void op_user_16(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(16, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_17(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(16, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":169 * op_user_call(15, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_16(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(16, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":172 * op_user_call(16, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_17(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(17, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_17(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":173 * @cython.callspec("MPIAPI") * cdef void op_user_17(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(17, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_18(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(17, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":172 * op_user_call(16, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_17(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(17, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":175 * op_user_call(17, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_18(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(18, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_18(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":176 * @cython.callspec("MPIAPI") * cdef void op_user_18(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(18, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_19(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(18, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":175 * op_user_call(17, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_18(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(18, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":178 * op_user_call(18, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_19(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(19, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_19(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":179 * @cython.callspec("MPIAPI") * cdef void op_user_19(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(19, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_20(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(19, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":178 * op_user_call(18, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_19(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(19, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":181 * op_user_call(19, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_20(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(20, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_20(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":182 * @cython.callspec("MPIAPI") * cdef void op_user_20(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(20, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_21(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(20, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":181 * op_user_call(19, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_20(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(20, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":184 * op_user_call(20, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_21(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(21, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_21(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":185 * @cython.callspec("MPIAPI") * cdef void op_user_21(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(21, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_22(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(21, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":184 * op_user_call(20, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_21(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(21, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":187 * op_user_call(21, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_22(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(22, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_22(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":188 * @cython.callspec("MPIAPI") * cdef void op_user_22(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(22, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_23(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(22, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":187 * op_user_call(21, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_22(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(22, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":190 * op_user_call(22, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_23(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(23, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_23(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":191 * @cython.callspec("MPIAPI") * cdef void op_user_23(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(23, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_24(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(23, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":190 * op_user_call(22, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_23(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(23, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":193 * op_user_call(23, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_24(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(24, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_24(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":194 * @cython.callspec("MPIAPI") * cdef void op_user_24(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(24, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_25(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(24, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":193 * op_user_call(23, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_24(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(24, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":196 * op_user_call(24, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_25(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(25, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_25(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":197 * @cython.callspec("MPIAPI") * cdef void op_user_25(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(25, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_26(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(25, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":196 * op_user_call(24, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_25(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(25, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":199 * op_user_call(25, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_26(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(26, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_26(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":200 * @cython.callspec("MPIAPI") * cdef void op_user_26(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(26, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_27(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(26, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":199 * op_user_call(25, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_26(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(26, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":202 * op_user_call(26, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_27(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(27, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_27(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":203 * @cython.callspec("MPIAPI") * cdef void op_user_27(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(27, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_28(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(27, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":202 * op_user_call(26, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_27(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(27, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":205 * op_user_call(27, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_28(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(28, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_28(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":206 * @cython.callspec("MPIAPI") * cdef void op_user_28(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(28, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_29(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(28, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":205 * op_user_call(27, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_28(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(28, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":208 * op_user_call(28, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_29(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(29, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_29(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":209 * @cython.callspec("MPIAPI") * cdef void op_user_29(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(29, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_30(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(29, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":208 * op_user_call(28, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_29(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(29, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":211 * op_user_call(29, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_30(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(30, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_30(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":212 * @cython.callspec("MPIAPI") * cdef void op_user_30(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(30, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_31(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(30, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":211 * op_user_call(29, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_30(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(30, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":214 * op_user_call(30, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_31(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(31, a, b, n, t) * @cython.callspec("MPIAPI") */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_31(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":215 * @cython.callspec("MPIAPI") * cdef void op_user_31(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(31, a, b, n, t) # <<<<<<<<<<<<<< * @cython.callspec("MPIAPI") * cdef void op_user_32(void *a, void *b, int *n, MPI_Datatype *t) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(31, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":214 * op_user_call(30, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_31(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(31, a, b, n, t) * @cython.callspec("MPIAPI") */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":217 * op_user_call(31, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_32(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(32, a, b, n, t) * */ static void MPIAPI __pyx_f_6mpi4py_3MPI_op_user_32(void *__pyx_v_a, void *__pyx_v_b, int *__pyx_v_n, MPI_Datatype *__pyx_v_t) { /* "mpi4py/MPI/opimpl.pxi":218 * @cython.callspec("MPIAPI") * cdef void op_user_32(void *a, void *b, int *n, MPI_Datatype *t) nogil: * op_user_call(32, a, b, n, t) # <<<<<<<<<<<<<< * * cdef MPI_User_function *op_user_map(int index) nogil: */ __pyx_f_6mpi4py_3MPI_op_user_call(32, __pyx_v_a, __pyx_v_b, __pyx_v_n, __pyx_v_t); /* "mpi4py/MPI/opimpl.pxi":217 * op_user_call(31, a, b, n, t) * @cython.callspec("MPIAPI") * cdef void op_user_32(void *a, void *b, int *n, MPI_Datatype *t) nogil: # <<<<<<<<<<<<<< * op_user_call(32, a, b, n, t) * */ /* function exit code */ } /* "mpi4py/MPI/opimpl.pxi":220 * op_user_call(32, a, b, n, t) * * cdef MPI_User_function *op_user_map(int index) nogil: # <<<<<<<<<<<<<< * if index == 1: return op_user_01 * elif index == 2: return op_user_02 */ static MPI_User_function *__pyx_f_6mpi4py_3MPI_op_user_map(int __pyx_v_index) { MPI_User_function *__pyx_r; int __pyx_t_1; /* "mpi4py/MPI/opimpl.pxi":221 * * cdef MPI_User_function *op_user_map(int index) nogil: * if index == 1: return op_user_01 # <<<<<<<<<<<<<< * elif index == 2: return op_user_02 * elif index == 3: return op_user_03 */ __pyx_t_1 = ((__pyx_v_index == 1) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_01; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":222 * cdef MPI_User_function *op_user_map(int index) nogil: * if index == 1: return op_user_01 * elif index == 2: return op_user_02 # <<<<<<<<<<<<<< * elif index == 3: return op_user_03 * elif index == 4: return op_user_04 */ __pyx_t_1 = ((__pyx_v_index == 2) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_02; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":223 * if index == 1: return op_user_01 * elif index == 2: return op_user_02 * elif index == 3: return op_user_03 # <<<<<<<<<<<<<< * elif index == 4: return op_user_04 * elif index == 5: return op_user_05 */ __pyx_t_1 = ((__pyx_v_index == 3) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_03; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":224 * elif index == 2: return op_user_02 * elif index == 3: return op_user_03 * elif index == 4: return op_user_04 # <<<<<<<<<<<<<< * elif index == 5: return op_user_05 * elif index == 6: return op_user_06 */ __pyx_t_1 = ((__pyx_v_index == 4) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_04; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":225 * elif index == 3: return op_user_03 * elif index == 4: return op_user_04 * elif index == 5: return op_user_05 # <<<<<<<<<<<<<< * elif index == 6: return op_user_06 * elif index == 7: return op_user_07 */ __pyx_t_1 = ((__pyx_v_index == 5) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_05; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":226 * elif index == 4: return op_user_04 * elif index == 5: return op_user_05 * elif index == 6: return op_user_06 # <<<<<<<<<<<<<< * elif index == 7: return op_user_07 * elif index == 8: return op_user_08 */ __pyx_t_1 = ((__pyx_v_index == 6) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_06; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":227 * elif index == 5: return op_user_05 * elif index == 6: return op_user_06 * elif index == 7: return op_user_07 # <<<<<<<<<<<<<< * elif index == 8: return op_user_08 * elif index == 9: return op_user_09 */ __pyx_t_1 = ((__pyx_v_index == 7) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_07; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":228 * elif index == 6: return op_user_06 * elif index == 7: return op_user_07 * elif index == 8: return op_user_08 # <<<<<<<<<<<<<< * elif index == 9: return op_user_09 * elif index == 10: return op_user_10 */ __pyx_t_1 = ((__pyx_v_index == 8) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_08; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":229 * elif index == 7: return op_user_07 * elif index == 8: return op_user_08 * elif index == 9: return op_user_09 # <<<<<<<<<<<<<< * elif index == 10: return op_user_10 * elif index == 11: return op_user_11 */ __pyx_t_1 = ((__pyx_v_index == 9) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_09; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":230 * elif index == 8: return op_user_08 * elif index == 9: return op_user_09 * elif index == 10: return op_user_10 # <<<<<<<<<<<<<< * elif index == 11: return op_user_11 * elif index == 12: return op_user_12 */ __pyx_t_1 = ((__pyx_v_index == 10) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_10; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":231 * elif index == 9: return op_user_09 * elif index == 10: return op_user_10 * elif index == 11: return op_user_11 # <<<<<<<<<<<<<< * elif index == 12: return op_user_12 * elif index == 13: return op_user_13 */ __pyx_t_1 = ((__pyx_v_index == 11) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_11; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":232 * elif index == 10: return op_user_10 * elif index == 11: return op_user_11 * elif index == 12: return op_user_12 # <<<<<<<<<<<<<< * elif index == 13: return op_user_13 * elif index == 14: return op_user_14 */ __pyx_t_1 = ((__pyx_v_index == 12) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_12; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":233 * elif index == 11: return op_user_11 * elif index == 12: return op_user_12 * elif index == 13: return op_user_13 # <<<<<<<<<<<<<< * elif index == 14: return op_user_14 * elif index == 15: return op_user_15 */ __pyx_t_1 = ((__pyx_v_index == 13) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_13; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":234 * elif index == 12: return op_user_12 * elif index == 13: return op_user_13 * elif index == 14: return op_user_14 # <<<<<<<<<<<<<< * elif index == 15: return op_user_15 * elif index == 16: return op_user_16 */ __pyx_t_1 = ((__pyx_v_index == 14) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_14; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":235 * elif index == 13: return op_user_13 * elif index == 14: return op_user_14 * elif index == 15: return op_user_15 # <<<<<<<<<<<<<< * elif index == 16: return op_user_16 * elif index == 17: return op_user_17 */ __pyx_t_1 = ((__pyx_v_index == 15) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_15; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":236 * elif index == 14: return op_user_14 * elif index == 15: return op_user_15 * elif index == 16: return op_user_16 # <<<<<<<<<<<<<< * elif index == 17: return op_user_17 * elif index == 18: return op_user_18 */ __pyx_t_1 = ((__pyx_v_index == 16) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_16; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":237 * elif index == 15: return op_user_15 * elif index == 16: return op_user_16 * elif index == 17: return op_user_17 # <<<<<<<<<<<<<< * elif index == 18: return op_user_18 * elif index == 19: return op_user_19 */ __pyx_t_1 = ((__pyx_v_index == 17) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_17; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":238 * elif index == 16: return op_user_16 * elif index == 17: return op_user_17 * elif index == 18: return op_user_18 # <<<<<<<<<<<<<< * elif index == 19: return op_user_19 * elif index == 20: return op_user_20 */ __pyx_t_1 = ((__pyx_v_index == 18) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_18; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":239 * elif index == 17: return op_user_17 * elif index == 18: return op_user_18 * elif index == 19: return op_user_19 # <<<<<<<<<<<<<< * elif index == 20: return op_user_20 * elif index == 21: return op_user_21 */ __pyx_t_1 = ((__pyx_v_index == 19) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_19; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":240 * elif index == 18: return op_user_18 * elif index == 19: return op_user_19 * elif index == 20: return op_user_20 # <<<<<<<<<<<<<< * elif index == 21: return op_user_21 * elif index == 22: return op_user_22 */ __pyx_t_1 = ((__pyx_v_index == 20) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_20; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":241 * elif index == 19: return op_user_19 * elif index == 20: return op_user_20 * elif index == 21: return op_user_21 # <<<<<<<<<<<<<< * elif index == 22: return op_user_22 * elif index == 23: return op_user_23 */ __pyx_t_1 = ((__pyx_v_index == 21) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_21; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":242 * elif index == 20: return op_user_20 * elif index == 21: return op_user_21 * elif index == 22: return op_user_22 # <<<<<<<<<<<<<< * elif index == 23: return op_user_23 * elif index == 24: return op_user_24 */ __pyx_t_1 = ((__pyx_v_index == 22) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_22; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":243 * elif index == 21: return op_user_21 * elif index == 22: return op_user_22 * elif index == 23: return op_user_23 # <<<<<<<<<<<<<< * elif index == 24: return op_user_24 * elif index == 25: return op_user_25 */ __pyx_t_1 = ((__pyx_v_index == 23) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_23; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":244 * elif index == 22: return op_user_22 * elif index == 23: return op_user_23 * elif index == 24: return op_user_24 # <<<<<<<<<<<<<< * elif index == 25: return op_user_25 * elif index == 26: return op_user_26 */ __pyx_t_1 = ((__pyx_v_index == 24) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_24; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":245 * elif index == 23: return op_user_23 * elif index == 24: return op_user_24 * elif index == 25: return op_user_25 # <<<<<<<<<<<<<< * elif index == 26: return op_user_26 * elif index == 27: return op_user_27 */ __pyx_t_1 = ((__pyx_v_index == 25) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_25; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":246 * elif index == 24: return op_user_24 * elif index == 25: return op_user_25 * elif index == 26: return op_user_26 # <<<<<<<<<<<<<< * elif index == 27: return op_user_27 * elif index == 28: return op_user_28 */ __pyx_t_1 = ((__pyx_v_index == 26) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_26; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":247 * elif index == 25: return op_user_25 * elif index == 26: return op_user_26 * elif index == 27: return op_user_27 # <<<<<<<<<<<<<< * elif index == 28: return op_user_28 * elif index == 29: return op_user_29 */ __pyx_t_1 = ((__pyx_v_index == 27) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_27; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":248 * elif index == 26: return op_user_26 * elif index == 27: return op_user_27 * elif index == 28: return op_user_28 # <<<<<<<<<<<<<< * elif index == 29: return op_user_29 * elif index == 30: return op_user_30 */ __pyx_t_1 = ((__pyx_v_index == 28) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_28; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":249 * elif index == 27: return op_user_27 * elif index == 28: return op_user_28 * elif index == 29: return op_user_29 # <<<<<<<<<<<<<< * elif index == 30: return op_user_30 * elif index == 31: return op_user_31 */ __pyx_t_1 = ((__pyx_v_index == 29) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_29; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":250 * elif index == 28: return op_user_28 * elif index == 29: return op_user_29 * elif index == 30: return op_user_30 # <<<<<<<<<<<<<< * elif index == 31: return op_user_31 * elif index == 32: return op_user_32 */ __pyx_t_1 = ((__pyx_v_index == 30) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_30; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":251 * elif index == 29: return op_user_29 * elif index == 30: return op_user_30 * elif index == 31: return op_user_31 # <<<<<<<<<<<<<< * elif index == 32: return op_user_32 * else: return NULL */ __pyx_t_1 = ((__pyx_v_index == 31) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_31; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":252 * elif index == 30: return op_user_30 * elif index == 31: return op_user_31 * elif index == 32: return op_user_32 # <<<<<<<<<<<<<< * else: return NULL * */ __pyx_t_1 = ((__pyx_v_index == 32) != 0); if (__pyx_t_1) { __pyx_r = __pyx_f_6mpi4py_3MPI_op_user_32; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":253 * elif index == 31: return op_user_31 * elif index == 32: return op_user_32 * else: return NULL # <<<<<<<<<<<<<< * * cdef int op_user_new(object function, MPI_User_function **cfunction) except -1: */ /*else*/ { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/opimpl.pxi":220 * op_user_call(32, a, b, n, t) * * cdef MPI_User_function *op_user_map(int index) nogil: # <<<<<<<<<<<<<< * if index == 1: return op_user_01 * elif index == 2: return op_user_02 */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":255 * else: return NULL * * cdef int op_user_new(object function, MPI_User_function **cfunction) except -1: # <<<<<<<<<<<<<< * # find a free slot in the registry * cdef int index = 0 */ static int __pyx_f_6mpi4py_3MPI_op_user_new(PyObject *__pyx_v_function, MPI_User_function **__pyx_v_cfunction) { int __pyx_v_index; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("op_user_new", 0); /* "mpi4py/MPI/opimpl.pxi":257 * cdef int op_user_new(object function, MPI_User_function **cfunction) except -1: * # find a free slot in the registry * cdef int index = 0 # <<<<<<<<<<<<<< * try: * index = op_user_registry.index(None, 1) */ __pyx_v_index = 0; /* "mpi4py/MPI/opimpl.pxi":258 * # find a free slot in the registry * cdef int index = 0 * try: # <<<<<<<<<<<<<< * index = op_user_registry.index(None, 1) * except ValueError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/opimpl.pxi":259 * cdef int index = 0 * try: * index = op_user_registry.index(None, 1) # <<<<<<<<<<<<<< * except ValueError: * raise RuntimeError("cannot create too many " */ __pyx_t_4 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyList_Type_index, __pyx_v_6mpi4py_3MPI_op_user_registry, Py_None, __pyx_int_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(14, 259, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(14, 259, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_index = __pyx_t_5; /* "mpi4py/MPI/opimpl.pxi":258 * # find a free slot in the registry * cdef int index = 0 * try: # <<<<<<<<<<<<<< * index = op_user_registry.index(None, 1) * except ValueError: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/opimpl.pxi":260 * try: * index = op_user_registry.index(None, 1) * except ValueError: # <<<<<<<<<<<<<< * raise RuntimeError("cannot create too many " * "user-defined reduction operations") */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_5) { __Pyx_AddTraceback("mpi4py.MPI.op_user_new", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(14, 260, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "mpi4py/MPI/opimpl.pxi":261 * index = op_user_registry.index(None, 1) * except ValueError: * raise RuntimeError("cannot create too many " # <<<<<<<<<<<<<< * "user-defined reduction operations") * # the line below will fail */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(14, 261, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(14, 261, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "mpi4py/MPI/opimpl.pxi":258 * # find a free slot in the registry * cdef int index = 0 * try: # <<<<<<<<<<<<<< * index = op_user_registry.index(None, 1) * except ValueError: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "mpi4py/MPI/opimpl.pxi":265 * # the line below will fail * # if the function is not callable * function.__call__ # <<<<<<<<<<<<<< * # register the Python function, * # map it to the associated C function, */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_function, __pyx_n_s_call); if (unlikely(!__pyx_t_7)) __PYX_ERR(14, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "mpi4py/MPI/opimpl.pxi":269 * # map it to the associated C function, * # and return the slot index in registry * op_user_registry[index] = function # <<<<<<<<<<<<<< * cfunction[0] = op_user_map(index) * return index */ if (unlikely(__pyx_v_6mpi4py_3MPI_op_user_registry == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(14, 269, __pyx_L1_error) } if (unlikely(__Pyx_SetItemInt(__pyx_v_6mpi4py_3MPI_op_user_registry, __pyx_v_index, __pyx_v_function, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) __PYX_ERR(14, 269, __pyx_L1_error) /* "mpi4py/MPI/opimpl.pxi":270 * # and return the slot index in registry * op_user_registry[index] = function * cfunction[0] = op_user_map(index) # <<<<<<<<<<<<<< * return index * */ (__pyx_v_cfunction[0]) = __pyx_f_6mpi4py_3MPI_op_user_map(__pyx_v_index); /* "mpi4py/MPI/opimpl.pxi":271 * op_user_registry[index] = function * cfunction[0] = op_user_map(index) * return index # <<<<<<<<<<<<<< * * cdef int op_user_del(int *indexp) except -1: */ __pyx_r = __pyx_v_index; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":255 * else: return NULL * * cdef int op_user_new(object function, MPI_User_function **cfunction) except -1: # <<<<<<<<<<<<<< * # find a free slot in the registry * cdef int index = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("mpi4py.MPI.op_user_new", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/opimpl.pxi":273 * return index * * cdef int op_user_del(int *indexp) except -1: # <<<<<<<<<<<<<< * # free slot in the registry * cdef int index = indexp[0] */ static int __pyx_f_6mpi4py_3MPI_op_user_del(int *__pyx_v_indexp) { int __pyx_v_index; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("op_user_del", 0); /* "mpi4py/MPI/opimpl.pxi":275 * cdef int op_user_del(int *indexp) except -1: * # free slot in the registry * cdef int index = indexp[0] # <<<<<<<<<<<<<< * indexp[0] = 0 # clear the value * op_user_registry[index] = None */ __pyx_v_index = (__pyx_v_indexp[0]); /* "mpi4py/MPI/opimpl.pxi":276 * # free slot in the registry * cdef int index = indexp[0] * indexp[0] = 0 # clear the value # <<<<<<<<<<<<<< * op_user_registry[index] = None * return 0 */ (__pyx_v_indexp[0]) = 0; /* "mpi4py/MPI/opimpl.pxi":277 * cdef int index = indexp[0] * indexp[0] = 0 # clear the value * op_user_registry[index] = None # <<<<<<<<<<<<<< * return 0 * */ if (unlikely(__pyx_v_6mpi4py_3MPI_op_user_registry == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(14, 277, __pyx_L1_error) } if (unlikely(__Pyx_SetItemInt(__pyx_v_6mpi4py_3MPI_op_user_registry, __pyx_v_index, Py_None, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) __PYX_ERR(14, 277, __pyx_L1_error) /* "mpi4py/MPI/opimpl.pxi":278 * indexp[0] = 0 # clear the value * op_user_registry[index] = None * return 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/opimpl.pxi":273 * return index * * cdef int op_user_del(int *indexp) except -1: # <<<<<<<<<<<<<< * # free slot in the registry * cdef int index = indexp[0] */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.op_user_del", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":163 * include "opimpl.pxi" * * cdef inline Op new_Op(MPI_Op ob): # <<<<<<<<<<<<<< * cdef Op op = Op.__new__(Op) * op.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIOpObject *__pyx_f_6mpi4py_3MPI_new_Op(MPI_Op __pyx_v_ob) { struct PyMPIOpObject *__pyx_v_op = 0; struct PyMPIOpObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("new_Op", 0); /* "mpi4py/MPI/helpers.pxi":164 * * cdef inline Op new_Op(MPI_Op ob): * cdef Op op = Op.__new__(Op) # <<<<<<<<<<<<<< * op.ob_mpi = ob * if ob == MPI_OP_NULL : op.ob_func = NULL */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Op(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Op), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 164, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_op = ((struct PyMPIOpObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":165 * cdef inline Op new_Op(MPI_Op ob): * cdef Op op = Op.__new__(Op) * op.ob_mpi = ob # <<<<<<<<<<<<<< * if ob == MPI_OP_NULL : op.ob_func = NULL * elif ob == MPI_MAX : op.ob_func = _op_MAX */ __pyx_v_op->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":166 * cdef Op op = Op.__new__(Op) * op.ob_mpi = ob * if ob == MPI_OP_NULL : op.ob_func = NULL # <<<<<<<<<<<<<< * elif ob == MPI_MAX : op.ob_func = _op_MAX * elif ob == MPI_MIN : op.ob_func = _op_MIN */ __pyx_t_3 = ((__pyx_v_ob == MPI_OP_NULL) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = NULL; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":167 * op.ob_mpi = ob * if ob == MPI_OP_NULL : op.ob_func = NULL * elif ob == MPI_MAX : op.ob_func = _op_MAX # <<<<<<<<<<<<<< * elif ob == MPI_MIN : op.ob_func = _op_MIN * elif ob == MPI_SUM : op.ob_func = _op_SUM */ __pyx_t_3 = ((__pyx_v_ob == MPI_MAX) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_MAX; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":168 * if ob == MPI_OP_NULL : op.ob_func = NULL * elif ob == MPI_MAX : op.ob_func = _op_MAX * elif ob == MPI_MIN : op.ob_func = _op_MIN # <<<<<<<<<<<<<< * elif ob == MPI_SUM : op.ob_func = _op_SUM * elif ob == MPI_PROD : op.ob_func = _op_PROD */ __pyx_t_3 = ((__pyx_v_ob == MPI_MIN) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_MIN; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":169 * elif ob == MPI_MAX : op.ob_func = _op_MAX * elif ob == MPI_MIN : op.ob_func = _op_MIN * elif ob == MPI_SUM : op.ob_func = _op_SUM # <<<<<<<<<<<<<< * elif ob == MPI_PROD : op.ob_func = _op_PROD * elif ob == MPI_LAND : op.ob_func = _op_LAND */ __pyx_t_3 = ((__pyx_v_ob == MPI_SUM) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_SUM; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":170 * elif ob == MPI_MIN : op.ob_func = _op_MIN * elif ob == MPI_SUM : op.ob_func = _op_SUM * elif ob == MPI_PROD : op.ob_func = _op_PROD # <<<<<<<<<<<<<< * elif ob == MPI_LAND : op.ob_func = _op_LAND * elif ob == MPI_BAND : op.ob_func = _op_BAND */ __pyx_t_3 = ((__pyx_v_ob == MPI_PROD) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_PROD; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":171 * elif ob == MPI_SUM : op.ob_func = _op_SUM * elif ob == MPI_PROD : op.ob_func = _op_PROD * elif ob == MPI_LAND : op.ob_func = _op_LAND # <<<<<<<<<<<<<< * elif ob == MPI_BAND : op.ob_func = _op_BAND * elif ob == MPI_LOR : op.ob_func = _op_LOR */ __pyx_t_3 = ((__pyx_v_ob == MPI_LAND) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_LAND; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":172 * elif ob == MPI_PROD : op.ob_func = _op_PROD * elif ob == MPI_LAND : op.ob_func = _op_LAND * elif ob == MPI_BAND : op.ob_func = _op_BAND # <<<<<<<<<<<<<< * elif ob == MPI_LOR : op.ob_func = _op_LOR * elif ob == MPI_BOR : op.ob_func = _op_BOR */ __pyx_t_3 = ((__pyx_v_ob == MPI_BAND) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_BAND; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":173 * elif ob == MPI_LAND : op.ob_func = _op_LAND * elif ob == MPI_BAND : op.ob_func = _op_BAND * elif ob == MPI_LOR : op.ob_func = _op_LOR # <<<<<<<<<<<<<< * elif ob == MPI_BOR : op.ob_func = _op_BOR * elif ob == MPI_LXOR : op.ob_func = _op_LXOR */ __pyx_t_3 = ((__pyx_v_ob == MPI_LOR) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_LOR; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":174 * elif ob == MPI_BAND : op.ob_func = _op_BAND * elif ob == MPI_LOR : op.ob_func = _op_LOR * elif ob == MPI_BOR : op.ob_func = _op_BOR # <<<<<<<<<<<<<< * elif ob == MPI_LXOR : op.ob_func = _op_LXOR * elif ob == MPI_BXOR : op.ob_func = _op_BXOR */ __pyx_t_3 = ((__pyx_v_ob == MPI_BOR) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_BOR; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":175 * elif ob == MPI_LOR : op.ob_func = _op_LOR * elif ob == MPI_BOR : op.ob_func = _op_BOR * elif ob == MPI_LXOR : op.ob_func = _op_LXOR # <<<<<<<<<<<<<< * elif ob == MPI_BXOR : op.ob_func = _op_BXOR * elif ob == MPI_MAXLOC : op.ob_func = _op_MAXLOC */ __pyx_t_3 = ((__pyx_v_ob == MPI_LXOR) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_LXOR; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":176 * elif ob == MPI_BOR : op.ob_func = _op_BOR * elif ob == MPI_LXOR : op.ob_func = _op_LXOR * elif ob == MPI_BXOR : op.ob_func = _op_BXOR # <<<<<<<<<<<<<< * elif ob == MPI_MAXLOC : op.ob_func = _op_MAXLOC * elif ob == MPI_MINLOC : op.ob_func = _op_MINLOC */ __pyx_t_3 = ((__pyx_v_ob == MPI_BXOR) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_BXOR; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":177 * elif ob == MPI_LXOR : op.ob_func = _op_LXOR * elif ob == MPI_BXOR : op.ob_func = _op_BXOR * elif ob == MPI_MAXLOC : op.ob_func = _op_MAXLOC # <<<<<<<<<<<<<< * elif ob == MPI_MINLOC : op.ob_func = _op_MINLOC * elif ob == MPI_REPLACE : op.ob_func = _op_REPLACE */ __pyx_t_3 = ((__pyx_v_ob == MPI_MAXLOC) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_MAXLOC; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":178 * elif ob == MPI_BXOR : op.ob_func = _op_BXOR * elif ob == MPI_MAXLOC : op.ob_func = _op_MAXLOC * elif ob == MPI_MINLOC : op.ob_func = _op_MINLOC # <<<<<<<<<<<<<< * elif ob == MPI_REPLACE : op.ob_func = _op_REPLACE * elif ob == MPI_NO_OP : op.ob_func = _op_NO_OP */ __pyx_t_3 = ((__pyx_v_ob == MPI_MINLOC) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_MINLOC; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":179 * elif ob == MPI_MAXLOC : op.ob_func = _op_MAXLOC * elif ob == MPI_MINLOC : op.ob_func = _op_MINLOC * elif ob == MPI_REPLACE : op.ob_func = _op_REPLACE # <<<<<<<<<<<<<< * elif ob == MPI_NO_OP : op.ob_func = _op_NO_OP * return op */ __pyx_t_3 = ((__pyx_v_ob == MPI_REPLACE) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_REPLACE; goto __pyx_L3; } /* "mpi4py/MPI/helpers.pxi":180 * elif ob == MPI_MINLOC : op.ob_func = _op_MINLOC * elif ob == MPI_REPLACE : op.ob_func = _op_REPLACE * elif ob == MPI_NO_OP : op.ob_func = _op_NO_OP # <<<<<<<<<<<<<< * return op * */ __pyx_t_3 = ((__pyx_v_ob == MPI_NO_OP) != 0); if (__pyx_t_3) { __pyx_v_op->ob_func = __pyx_f_6mpi4py_3MPI__op_NO_OP; } __pyx_L3:; /* "mpi4py/MPI/helpers.pxi":181 * elif ob == MPI_REPLACE : op.ob_func = _op_REPLACE * elif ob == MPI_NO_OP : op.ob_func = _op_NO_OP * return op # <<<<<<<<<<<<<< * * cdef inline int del_Op(MPI_Op* ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_op)); __pyx_r = __pyx_v_op; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":163 * include "opimpl.pxi" * * cdef inline Op new_Op(MPI_Op ob): # <<<<<<<<<<<<<< * cdef Op op = Op.__new__(Op) * op.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Op", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_op); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":183 * return op * * cdef inline int del_Op(MPI_Op* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_OP_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Op(MPI_Op *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_Op", 0); /* "mpi4py/MPI/helpers.pxi":184 * * cdef inline int del_Op(MPI_Op* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_OP_NULL : return 0 * if ob[0] == MPI_MAX : return 0 */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":185 * cdef inline int del_Op(MPI_Op* ob): * if ob == NULL : return 0 * if ob[0] == MPI_OP_NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_MAX : return 0 * if ob[0] == MPI_MIN : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_OP_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":186 * if ob == NULL : return 0 * if ob[0] == MPI_OP_NULL : return 0 * if ob[0] == MPI_MAX : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_MIN : return 0 * if ob[0] == MPI_SUM : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_MAX) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":187 * if ob[0] == MPI_OP_NULL : return 0 * if ob[0] == MPI_MAX : return 0 * if ob[0] == MPI_MIN : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_SUM : return 0 * if ob[0] == MPI_PROD : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_MIN) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":188 * if ob[0] == MPI_MAX : return 0 * if ob[0] == MPI_MIN : return 0 * if ob[0] == MPI_SUM : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_PROD : return 0 * if ob[0] == MPI_LAND : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_SUM) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":189 * if ob[0] == MPI_MIN : return 0 * if ob[0] == MPI_SUM : return 0 * if ob[0] == MPI_PROD : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LAND : return 0 * if ob[0] == MPI_BAND : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_PROD) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":190 * if ob[0] == MPI_SUM : return 0 * if ob[0] == MPI_PROD : return 0 * if ob[0] == MPI_LAND : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_BAND : return 0 * if ob[0] == MPI_LOR : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LAND) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":191 * if ob[0] == MPI_PROD : return 0 * if ob[0] == MPI_LAND : return 0 * if ob[0] == MPI_BAND : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LOR : return 0 * if ob[0] == MPI_BOR : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_BAND) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":192 * if ob[0] == MPI_LAND : return 0 * if ob[0] == MPI_BAND : return 0 * if ob[0] == MPI_LOR : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_BOR : return 0 * if ob[0] == MPI_LXOR : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LOR) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":193 * if ob[0] == MPI_BAND : return 0 * if ob[0] == MPI_LOR : return 0 * if ob[0] == MPI_BOR : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_LXOR : return 0 * if ob[0] == MPI_BXOR : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_BOR) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":194 * if ob[0] == MPI_LOR : return 0 * if ob[0] == MPI_BOR : return 0 * if ob[0] == MPI_LXOR : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_BXOR : return 0 * if ob[0] == MPI_MAXLOC : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_LXOR) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":195 * if ob[0] == MPI_BOR : return 0 * if ob[0] == MPI_LXOR : return 0 * if ob[0] == MPI_BXOR : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_MAXLOC : return 0 * if ob[0] == MPI_MINLOC : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_BXOR) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":196 * if ob[0] == MPI_LXOR : return 0 * if ob[0] == MPI_BXOR : return 0 * if ob[0] == MPI_MAXLOC : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_MINLOC : return 0 * if ob[0] == MPI_REPLACE : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_MAXLOC) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":197 * if ob[0] == MPI_BXOR : return 0 * if ob[0] == MPI_MAXLOC : return 0 * if ob[0] == MPI_MINLOC : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_REPLACE : return 0 * if ob[0] == MPI_NO_OP : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_MINLOC) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":198 * if ob[0] == MPI_MAXLOC : return 0 * if ob[0] == MPI_MINLOC : return 0 * if ob[0] == MPI_REPLACE : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_NO_OP : return 0 * # */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_REPLACE) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":199 * if ob[0] == MPI_MINLOC : return 0 * if ob[0] == MPI_REPLACE : return 0 * if ob[0] == MPI_NO_OP : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_NO_OP) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":201 * if ob[0] == MPI_NO_OP : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * return MPI_Op_free(ob) * */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":202 * # * if not mpi_active(): return 0 * return MPI_Op_free(ob) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = MPI_Op_free(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":183 * return op * * cdef inline int del_Op(MPI_Op* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_OP_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":207 * # Info * * cdef inline Info new_Info(MPI_Info ob): # <<<<<<<<<<<<<< * cdef Info info = Info.__new__(Info) * info.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIInfoObject *__pyx_f_6mpi4py_3MPI_new_Info(MPI_Info __pyx_v_ob) { struct PyMPIInfoObject *__pyx_v_info = 0; struct PyMPIInfoObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Info", 0); /* "mpi4py/MPI/helpers.pxi":208 * * cdef inline Info new_Info(MPI_Info ob): * cdef Info info = Info.__new__(Info) # <<<<<<<<<<<<<< * info.ob_mpi = ob * return info */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Info(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 208, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_info = ((struct PyMPIInfoObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":209 * cdef inline Info new_Info(MPI_Info ob): * cdef Info info = Info.__new__(Info) * info.ob_mpi = ob # <<<<<<<<<<<<<< * return info * */ __pyx_v_info->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":210 * cdef Info info = Info.__new__(Info) * info.ob_mpi = ob * return info # <<<<<<<<<<<<<< * * cdef inline int del_Info(MPI_Info* ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_info)); __pyx_r = __pyx_v_info; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":207 * # Info * * cdef inline Info new_Info(MPI_Info ob): # <<<<<<<<<<<<<< * cdef Info info = Info.__new__(Info) * info.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_info); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":212 * return info * * cdef inline int del_Info(MPI_Info* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_INFO_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Info(MPI_Info *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_Info", 0); /* "mpi4py/MPI/helpers.pxi":213 * * cdef inline int del_Info(MPI_Info* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INFO_NULL : return 0 * if ob[0] == MPI_INFO_ENV : return 0 */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":214 * cdef inline int del_Info(MPI_Info* ob): * if ob == NULL : return 0 * if ob[0] == MPI_INFO_NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_INFO_ENV : return 0 * # */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INFO_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":215 * if ob == NULL : return 0 * if ob[0] == MPI_INFO_NULL : return 0 * if ob[0] == MPI_INFO_ENV : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_INFO_ENV) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":217 * if ob[0] == MPI_INFO_ENV : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * return MPI_Info_free(ob) * */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":218 * # * if not mpi_active(): return 0 * return MPI_Info_free(ob) # <<<<<<<<<<<<<< * * cdef inline MPI_Info arg_Info(object info): */ __pyx_r = MPI_Info_free(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":212 * return info * * cdef inline int del_Info(MPI_Info* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_INFO_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":220 * return MPI_Info_free(ob) * * cdef inline MPI_Info arg_Info(object info): # <<<<<<<<<<<<<< * if info is None: return MPI_INFO_NULL * return (info).ob_mpi */ static CYTHON_INLINE MPI_Info __pyx_f_6mpi4py_3MPI_arg_Info(PyObject *__pyx_v_info) { MPI_Info __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("arg_Info", 0); /* "mpi4py/MPI/helpers.pxi":221 * * cdef inline MPI_Info arg_Info(object info): * if info is None: return MPI_INFO_NULL # <<<<<<<<<<<<<< * return (info).ob_mpi * */ __pyx_t_1 = (__pyx_v_info == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = MPI_INFO_NULL; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":222 * cdef inline MPI_Info arg_Info(object info): * if info is None: return MPI_INFO_NULL * return (info).ob_mpi # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = ((struct PyMPIInfoObject *)__pyx_v_info)->ob_mpi; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":220 * return MPI_Info_free(ob) * * cdef inline MPI_Info arg_Info(object info): # <<<<<<<<<<<<<< * if info is None: return MPI_INFO_NULL * return (info).ob_mpi */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":227 * # Group * * cdef inline Group new_Group(MPI_Group ob): # <<<<<<<<<<<<<< * cdef Group group = Group.__new__(Group) * group.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIGroupObject *__pyx_f_6mpi4py_3MPI_new_Group(MPI_Group __pyx_v_ob) { struct PyMPIGroupObject *__pyx_v_group = 0; struct PyMPIGroupObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Group", 0); /* "mpi4py/MPI/helpers.pxi":228 * * cdef inline Group new_Group(MPI_Group ob): * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * group.ob_mpi = ob * return group */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 228, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":229 * cdef inline Group new_Group(MPI_Group ob): * cdef Group group = Group.__new__(Group) * group.ob_mpi = ob # <<<<<<<<<<<<<< * return group * */ __pyx_v_group->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":230 * cdef Group group = Group.__new__(Group) * group.ob_mpi = ob * return group # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = __pyx_v_group; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":227 * # Group * * cdef inline Group new_Group(MPI_Group ob): # <<<<<<<<<<<<<< * cdef Group group = Group.__new__(Group) * group.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Group", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":233 * * * cdef inline int del_Group(MPI_Group* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_GROUP_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Group(MPI_Group *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_Group", 0); /* "mpi4py/MPI/helpers.pxi":234 * * cdef inline int del_Group(MPI_Group* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_GROUP_NULL : return 0 * if ob[0] == MPI_GROUP_EMPTY : return 0 */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":235 * cdef inline int del_Group(MPI_Group* ob): * if ob == NULL : return 0 * if ob[0] == MPI_GROUP_NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_GROUP_EMPTY : return 0 * # */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_GROUP_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":236 * if ob == NULL : return 0 * if ob[0] == MPI_GROUP_NULL : return 0 * if ob[0] == MPI_GROUP_EMPTY : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_GROUP_EMPTY) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":238 * if ob[0] == MPI_GROUP_EMPTY : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * return MPI_Group_free(ob) * */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":239 * # * if not mpi_active(): return 0 * return MPI_Group_free(ob) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = MPI_Group_free(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":233 * * * cdef inline int del_Group(MPI_Group* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_GROUP_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/commimpl.pxi":5 * cdef memory _buffer = None * * cdef inline int attach_buffer(ob, void **p, int *n) except -1: # <<<<<<<<<<<<<< * global _buffer * cdef void *bptr = NULL */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_attach_buffer(PyObject *__pyx_v_ob, void **__pyx_v_p, int *__pyx_v_n) { void *__pyx_v_bptr; MPI_Aint __pyx_v_blen; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("attach_buffer", 0); /* "mpi4py/MPI/commimpl.pxi":7 * cdef inline int attach_buffer(ob, void **p, int *n) except -1: * global _buffer * cdef void *bptr = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint blen = 0 * _buffer = getbuffer_w(ob, &bptr, &blen) */ __pyx_v_bptr = NULL; /* "mpi4py/MPI/commimpl.pxi":8 * global _buffer * cdef void *bptr = NULL * cdef MPI_Aint blen = 0 # <<<<<<<<<<<<<< * _buffer = getbuffer_w(ob, &bptr, &blen) * p[0] = bptr */ __pyx_v_blen = 0; /* "mpi4py/MPI/commimpl.pxi":9 * cdef void *bptr = NULL * cdef MPI_Aint blen = 0 * _buffer = getbuffer_w(ob, &bptr, &blen) # <<<<<<<<<<<<<< * p[0] = bptr * n[0] = clipcount(blen) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_ob, (&__pyx_v_bptr), (&__pyx_v_blen))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI__buffer)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI__buffer, ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/commimpl.pxi":10 * cdef MPI_Aint blen = 0 * _buffer = getbuffer_w(ob, &bptr, &blen) * p[0] = bptr # <<<<<<<<<<<<<< * n[0] = clipcount(blen) * return 0 */ (__pyx_v_p[0]) = __pyx_v_bptr; /* "mpi4py/MPI/commimpl.pxi":11 * _buffer = getbuffer_w(ob, &bptr, &blen) * p[0] = bptr * n[0] = clipcount(blen) # <<<<<<<<<<<<<< * return 0 * */ (__pyx_v_n[0]) = __pyx_f_6mpi4py_3MPI_clipcount(__pyx_v_blen); /* "mpi4py/MPI/commimpl.pxi":12 * p[0] = bptr * n[0] = clipcount(blen) * return 0 # <<<<<<<<<<<<<< * * cdef inline object detach_buffer(void *p, int n): */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":5 * cdef memory _buffer = None * * cdef inline int attach_buffer(ob, void **p, int *n) except -1: # <<<<<<<<<<<<<< * global _buffer * cdef void *bptr = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.attach_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/commimpl.pxi":14 * return 0 * * cdef inline object detach_buffer(void *p, int n): # <<<<<<<<<<<<<< * global _buffer * cdef object ob = None */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_detach_buffer(void *__pyx_v_p, int __pyx_v_n) { PyObject *__pyx_v_ob = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; char const *__pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("detach_buffer", 0); /* "mpi4py/MPI/commimpl.pxi":16 * cdef inline object detach_buffer(void *p, int n): * global _buffer * cdef object ob = None # <<<<<<<<<<<<<< * try: * if (_buffer is not None and */ __Pyx_INCREF(Py_None); __pyx_v_ob = Py_None; /* "mpi4py/MPI/commimpl.pxi":17 * global _buffer * cdef object ob = None * try: # <<<<<<<<<<<<<< * if (_buffer is not None and * _buffer.view.buf == p and */ /*try:*/ { /* "mpi4py/MPI/commimpl.pxi":18 * cdef object ob = None * try: * if (_buffer is not None and # <<<<<<<<<<<<<< * _buffer.view.buf == p and * _buffer.view.obj != NULL): */ __pyx_t_2 = (((PyObject *)__pyx_v_6mpi4py_3MPI__buffer) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L7_bool_binop_done; } /* "mpi4py/MPI/commimpl.pxi":19 * try: * if (_buffer is not None and * _buffer.view.buf == p and # <<<<<<<<<<<<<< * _buffer.view.obj != NULL): * ob = _buffer.view.obj */ __pyx_t_3 = ((__pyx_v_6mpi4py_3MPI__buffer->view.buf == __pyx_v_p) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L7_bool_binop_done; } /* "mpi4py/MPI/commimpl.pxi":20 * if (_buffer is not None and * _buffer.view.buf == p and * _buffer.view.obj != NULL): # <<<<<<<<<<<<<< * ob = _buffer.view.obj * else: */ __pyx_t_3 = ((__pyx_v_6mpi4py_3MPI__buffer->view.obj != NULL) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L7_bool_binop_done:; /* "mpi4py/MPI/commimpl.pxi":18 * cdef object ob = None * try: * if (_buffer is not None and # <<<<<<<<<<<<<< * _buffer.view.buf == p and * _buffer.view.obj != NULL): */ if (__pyx_t_1) { /* "mpi4py/MPI/commimpl.pxi":21 * _buffer.view.buf == p and * _buffer.view.obj != NULL): * ob = _buffer.view.obj # <<<<<<<<<<<<<< * else: * ob = tomemory(p, n) */ __pyx_t_4 = ((PyObject *)__pyx_v_6mpi4py_3MPI__buffer->view.obj); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/commimpl.pxi":18 * cdef object ob = None * try: * if (_buffer is not None and # <<<<<<<<<<<<<< * _buffer.view.buf == p and * _buffer.view.obj != NULL): */ goto __pyx_L6; } /* "mpi4py/MPI/commimpl.pxi":23 * ob = _buffer.view.obj * else: * ob = tomemory(p, n) # <<<<<<<<<<<<<< * finally: * _buffer = None */ /*else*/ { __pyx_t_4 = ((PyObject *)__pyx_f_6mpi4py_3MPI_tomemory(__pyx_v_p, __pyx_v_n)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 23, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L6:; } /* "mpi4py/MPI/commimpl.pxi":25 * ob = tomemory(p, n) * finally: * _buffer = None # <<<<<<<<<<<<<< * return ob * */ /*finally:*/ { /*normal exit:*/{ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI__buffer)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI__buffer, ((struct __pyx_obj_6mpi4py_3MPI_memory *)Py_None)); __Pyx_GIVEREF(Py_None); goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; { __Pyx_INCREF(Py_None); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI__buffer)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI__buffer, ((struct __pyx_obj_6mpi4py_3MPI_memory *)Py_None)); __Pyx_GIVEREF(Py_None); } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/commimpl.pxi":26 * finally: * _buffer = None * return ob # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ob); __pyx_r = __pyx_v_ob; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":14 * return 0 * * cdef inline object detach_buffer(void *p, int n): # <<<<<<<<<<<<<< * global _buffer * cdef object ob = None */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.detach_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/commimpl.pxi":34 * cdef object __WEIGHTS_EMPTY__ = MPI_WEIGHTS_EMPTY * * cdef object asarray_weights(object weights, int nweight, int **iweight): # <<<<<<<<<<<<<< * if weights is None: * iweight[0] = MPI_UNWEIGHTED */ static PyObject *__pyx_f_6mpi4py_3MPI_asarray_weights(PyObject *__pyx_v_weights, int __pyx_v_nweight, int **__pyx_v_iweight) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("asarray_weights", 0); /* "mpi4py/MPI/commimpl.pxi":35 * * cdef object asarray_weights(object weights, int nweight, int **iweight): * if weights is None: # <<<<<<<<<<<<<< * iweight[0] = MPI_UNWEIGHTED * return None */ __pyx_t_1 = (__pyx_v_weights == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/commimpl.pxi":36 * cdef object asarray_weights(object weights, int nweight, int **iweight): * if weights is None: * iweight[0] = MPI_UNWEIGHTED # <<<<<<<<<<<<<< * return None * if weights is __UNWEIGHTED__: */ (__pyx_v_iweight[0]) = MPI_UNWEIGHTED; /* "mpi4py/MPI/commimpl.pxi":37 * if weights is None: * iweight[0] = MPI_UNWEIGHTED * return None # <<<<<<<<<<<<<< * if weights is __UNWEIGHTED__: * iweight[0] = MPI_UNWEIGHTED */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":35 * * cdef object asarray_weights(object weights, int nweight, int **iweight): * if weights is None: # <<<<<<<<<<<<<< * iweight[0] = MPI_UNWEIGHTED * return None */ } /* "mpi4py/MPI/commimpl.pxi":38 * iweight[0] = MPI_UNWEIGHTED * return None * if weights is __UNWEIGHTED__: # <<<<<<<<<<<<<< * iweight[0] = MPI_UNWEIGHTED * return None */ __pyx_t_2 = (__pyx_v_weights == __pyx_v_6mpi4py_3MPI___UNWEIGHTED__); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/commimpl.pxi":39 * return None * if weights is __UNWEIGHTED__: * iweight[0] = MPI_UNWEIGHTED # <<<<<<<<<<<<<< * return None * if weights is __WEIGHTS_EMPTY__: */ (__pyx_v_iweight[0]) = MPI_UNWEIGHTED; /* "mpi4py/MPI/commimpl.pxi":40 * if weights is __UNWEIGHTED__: * iweight[0] = MPI_UNWEIGHTED * return None # <<<<<<<<<<<<<< * if weights is __WEIGHTS_EMPTY__: * if nweight > 0: raise ValueError("empty weights but nonzero degree") */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":38 * iweight[0] = MPI_UNWEIGHTED * return None * if weights is __UNWEIGHTED__: # <<<<<<<<<<<<<< * iweight[0] = MPI_UNWEIGHTED * return None */ } /* "mpi4py/MPI/commimpl.pxi":41 * iweight[0] = MPI_UNWEIGHTED * return None * if weights is __WEIGHTS_EMPTY__: # <<<<<<<<<<<<<< * if nweight > 0: raise ValueError("empty weights but nonzero degree") * iweight[0] = MPI_WEIGHTS_EMPTY */ __pyx_t_1 = (__pyx_v_weights == __pyx_v_6mpi4py_3MPI___WEIGHTS_EMPTY__); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/commimpl.pxi":42 * return None * if weights is __WEIGHTS_EMPTY__: * if nweight > 0: raise ValueError("empty weights but nonzero degree") # <<<<<<<<<<<<<< * iweight[0] = MPI_WEIGHTS_EMPTY * return None */ __pyx_t_2 = ((__pyx_v_nweight > 0) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(3, 42, __pyx_L1_error) } /* "mpi4py/MPI/commimpl.pxi":43 * if weights is __WEIGHTS_EMPTY__: * if nweight > 0: raise ValueError("empty weights but nonzero degree") * iweight[0] = MPI_WEIGHTS_EMPTY # <<<<<<<<<<<<<< * return None * return chkarray(weights, nweight, iweight) */ (__pyx_v_iweight[0]) = MPI_WEIGHTS_EMPTY; /* "mpi4py/MPI/commimpl.pxi":44 * if nweight > 0: raise ValueError("empty weights but nonzero degree") * iweight[0] = MPI_WEIGHTS_EMPTY * return None # <<<<<<<<<<<<<< * return chkarray(weights, nweight, iweight) * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":41 * iweight[0] = MPI_UNWEIGHTED * return None * if weights is __WEIGHTS_EMPTY__: # <<<<<<<<<<<<<< * if nweight > 0: raise ValueError("empty weights but nonzero degree") * iweight[0] = MPI_WEIGHTS_EMPTY */ } /* "mpi4py/MPI/commimpl.pxi":45 * iweight[0] = MPI_WEIGHTS_EMPTY * return None * return chkarray(weights, nweight, iweight) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_weights, __pyx_v_nweight, __pyx_v_iweight); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":34 * cdef object __WEIGHTS_EMPTY__ = MPI_WEIGHTS_EMPTY * * cdef object asarray_weights(object weights, int nweight, int **iweight): # <<<<<<<<<<<<<< * if weights is None: * iweight[0] = MPI_UNWEIGHTED */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.asarray_weights", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/commimpl.pxi":49 * # ----------------------------------------------------------------------------- * * cdef inline int comm_neighbors_count(MPI_Comm comm, # <<<<<<<<<<<<<< * int *incoming, * int *outgoing, */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_comm_neighbors_count(MPI_Comm __pyx_v_comm, int *__pyx_v_incoming, int *__pyx_v_outgoing) { int __pyx_v_topo; int __pyx_v_size; int __pyx_v_ndims; int __pyx_v_rank; int __pyx_v_nneighbors; int __pyx_v_indegree; int __pyx_v_outdegree; int __pyx_v_weighted; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("comm_neighbors_count", 0); /* "mpi4py/MPI/commimpl.pxi":53 * int *outgoing, * ) except -1: * cdef int topo = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef int size=0, ndims=0, rank=0, nneighbors=0 * cdef int indegree=0, outdegree=0, weighted=0 */ __pyx_v_topo = MPI_UNDEFINED; /* "mpi4py/MPI/commimpl.pxi":54 * ) except -1: * cdef int topo = MPI_UNDEFINED * cdef int size=0, ndims=0, rank=0, nneighbors=0 # <<<<<<<<<<<<<< * cdef int indegree=0, outdegree=0, weighted=0 * CHKERR( MPI_Topo_test(comm, &topo) ) */ __pyx_v_size = 0; __pyx_v_ndims = 0; __pyx_v_rank = 0; __pyx_v_nneighbors = 0; /* "mpi4py/MPI/commimpl.pxi":55 * cdef int topo = MPI_UNDEFINED * cdef int size=0, ndims=0, rank=0, nneighbors=0 * cdef int indegree=0, outdegree=0, weighted=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Topo_test(comm, &topo) ) * if topo == MPI_UNDEFINED: # XXX */ __pyx_v_indegree = 0; __pyx_v_outdegree = 0; __pyx_v_weighted = 0; /* "mpi4py/MPI/commimpl.pxi":56 * cdef int size=0, ndims=0, rank=0, nneighbors=0 * cdef int indegree=0, outdegree=0, weighted=0 * CHKERR( MPI_Topo_test(comm, &topo) ) # <<<<<<<<<<<<<< * if topo == MPI_UNDEFINED: # XXX * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Topo_test(__pyx_v_comm, (&__pyx_v_topo))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 56, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":57 * cdef int indegree=0, outdegree=0, weighted=0 * CHKERR( MPI_Topo_test(comm, &topo) ) * if topo == MPI_UNDEFINED: # XXX # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * indegree = outdegree = size */ __pyx_t_2 = ((__pyx_v_topo == MPI_UNDEFINED) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/commimpl.pxi":58 * CHKERR( MPI_Topo_test(comm, &topo) ) * if topo == MPI_UNDEFINED: # XXX * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * indegree = outdegree = size * elif topo == MPI_CART: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 58, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":59 * if topo == MPI_UNDEFINED: # XXX * CHKERR( MPI_Comm_size(comm, &size) ) * indegree = outdegree = size # <<<<<<<<<<<<<< * elif topo == MPI_CART: * CHKERR( MPI_Cartdim_get(comm, &ndims) ) */ __pyx_v_indegree = __pyx_v_size; __pyx_v_outdegree = __pyx_v_size; /* "mpi4py/MPI/commimpl.pxi":57 * cdef int indegree=0, outdegree=0, weighted=0 * CHKERR( MPI_Topo_test(comm, &topo) ) * if topo == MPI_UNDEFINED: # XXX # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * indegree = outdegree = size */ goto __pyx_L3; } /* "mpi4py/MPI/commimpl.pxi":60 * CHKERR( MPI_Comm_size(comm, &size) ) * indegree = outdegree = size * elif topo == MPI_CART: # <<<<<<<<<<<<<< * CHKERR( MPI_Cartdim_get(comm, &ndims) ) * indegree = outdegree = 2*ndims */ __pyx_t_2 = ((__pyx_v_topo == MPI_CART) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/commimpl.pxi":61 * indegree = outdegree = size * elif topo == MPI_CART: * CHKERR( MPI_Cartdim_get(comm, &ndims) ) # <<<<<<<<<<<<<< * indegree = outdegree = 2*ndims * elif topo == MPI_GRAPH: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cartdim_get(__pyx_v_comm, (&__pyx_v_ndims))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 61, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":62 * elif topo == MPI_CART: * CHKERR( MPI_Cartdim_get(comm, &ndims) ) * indegree = outdegree = 2*ndims # <<<<<<<<<<<<<< * elif topo == MPI_GRAPH: * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_t_1 = (((int)2) * __pyx_v_ndims); __pyx_v_indegree = __pyx_t_1; __pyx_v_outdegree = __pyx_t_1; /* "mpi4py/MPI/commimpl.pxi":60 * CHKERR( MPI_Comm_size(comm, &size) ) * indegree = outdegree = size * elif topo == MPI_CART: # <<<<<<<<<<<<<< * CHKERR( MPI_Cartdim_get(comm, &ndims) ) * indegree = outdegree = 2*ndims */ goto __pyx_L3; } /* "mpi4py/MPI/commimpl.pxi":63 * CHKERR( MPI_Cartdim_get(comm, &ndims) ) * indegree = outdegree = 2*ndims * elif topo == MPI_GRAPH: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * CHKERR( MPI_Graph_neighbors_count( */ __pyx_t_2 = ((__pyx_v_topo == MPI_GRAPH) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/commimpl.pxi":64 * indegree = outdegree = 2*ndims * elif topo == MPI_GRAPH: * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Graph_neighbors_count( * comm, rank, &nneighbors) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 64, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":65 * elif topo == MPI_GRAPH: * CHKERR( MPI_Comm_rank(comm, &rank) ) * CHKERR( MPI_Graph_neighbors_count( # <<<<<<<<<<<<<< * comm, rank, &nneighbors) ) * indegree = outdegree = nneighbors */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Graph_neighbors_count(__pyx_v_comm, __pyx_v_rank, (&__pyx_v_nneighbors))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 65, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":67 * CHKERR( MPI_Graph_neighbors_count( * comm, rank, &nneighbors) ) * indegree = outdegree = nneighbors # <<<<<<<<<<<<<< * elif topo == MPI_DIST_GRAPH: * CHKERR( MPI_Dist_graph_neighbors_count( */ __pyx_v_indegree = __pyx_v_nneighbors; __pyx_v_outdegree = __pyx_v_nneighbors; /* "mpi4py/MPI/commimpl.pxi":63 * CHKERR( MPI_Cartdim_get(comm, &ndims) ) * indegree = outdegree = 2*ndims * elif topo == MPI_GRAPH: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * CHKERR( MPI_Graph_neighbors_count( */ goto __pyx_L3; } /* "mpi4py/MPI/commimpl.pxi":68 * comm, rank, &nneighbors) ) * indegree = outdegree = nneighbors * elif topo == MPI_DIST_GRAPH: # <<<<<<<<<<<<<< * CHKERR( MPI_Dist_graph_neighbors_count( * comm, &indegree, &outdegree, &weighted) ) */ __pyx_t_2 = ((__pyx_v_topo == MPI_DIST_GRAPH) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/commimpl.pxi":69 * indegree = outdegree = nneighbors * elif topo == MPI_DIST_GRAPH: * CHKERR( MPI_Dist_graph_neighbors_count( # <<<<<<<<<<<<<< * comm, &indegree, &outdegree, &weighted) ) * if incoming != NULL: incoming[0] = indegree */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Dist_graph_neighbors_count(__pyx_v_comm, (&__pyx_v_indegree), (&__pyx_v_outdegree), (&__pyx_v_weighted))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 69, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":68 * comm, rank, &nneighbors) ) * indegree = outdegree = nneighbors * elif topo == MPI_DIST_GRAPH: # <<<<<<<<<<<<<< * CHKERR( MPI_Dist_graph_neighbors_count( * comm, &indegree, &outdegree, &weighted) ) */ } __pyx_L3:; /* "mpi4py/MPI/commimpl.pxi":71 * CHKERR( MPI_Dist_graph_neighbors_count( * comm, &indegree, &outdegree, &weighted) ) * if incoming != NULL: incoming[0] = indegree # <<<<<<<<<<<<<< * if outgoing != NULL: outgoing[0] = outdegree * return 0 */ __pyx_t_2 = ((__pyx_v_incoming != NULL) != 0); if (__pyx_t_2) { (__pyx_v_incoming[0]) = __pyx_v_indegree; } /* "mpi4py/MPI/commimpl.pxi":72 * comm, &indegree, &outdegree, &weighted) ) * if incoming != NULL: incoming[0] = indegree * if outgoing != NULL: outgoing[0] = outdegree # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = ((__pyx_v_outgoing != NULL) != 0); if (__pyx_t_2) { (__pyx_v_outgoing[0]) = __pyx_v_outdegree; } /* "mpi4py/MPI/commimpl.pxi":73 * if incoming != NULL: incoming[0] = indegree * if outgoing != NULL: outgoing[0] = outdegree * return 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":49 * # ----------------------------------------------------------------------------- * * cdef inline int comm_neighbors_count(MPI_Comm comm, # <<<<<<<<<<<<<< * int *incoming, * int *outgoing, */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.comm_neighbors_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/commimpl.pxi":92 * cdef dict lock_registry = {} * * cdef inline int lock_free_cb(MPI_Comm comm) \ # <<<<<<<<<<<<<< * except MPI_ERR_UNKNOWN with gil: * try: del lock_registry[comm] */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_lock_free_cb(MPI_Comm __pyx_v_comm) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("lock_free_cb", 0); /* "mpi4py/MPI/commimpl.pxi":94 * cdef inline int lock_free_cb(MPI_Comm comm) \ * except MPI_ERR_UNKNOWN with gil: * try: del lock_registry[comm] # <<<<<<<<<<<<<< * except KeyError: pass * return MPI_SUCCESS */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { if (unlikely(__pyx_v_6mpi4py_3MPI_lock_registry == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 94, __pyx_L3_error) } __pyx_t_4 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)__pyx_v_comm)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 94, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyDict_DelItem(__pyx_v_6mpi4py_3MPI_lock_registry, __pyx_t_4) < 0)) __PYX_ERR(3, 94, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/commimpl.pxi":95 * except MPI_ERR_UNKNOWN with gil: * try: del lock_registry[comm] * except KeyError: pass # <<<<<<<<<<<<<< * return MPI_SUCCESS * */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_5) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "mpi4py/MPI/commimpl.pxi":94 * cdef inline int lock_free_cb(MPI_Comm comm) \ * except MPI_ERR_UNKNOWN with gil: * try: del lock_registry[comm] # <<<<<<<<<<<<<< * except KeyError: pass * return MPI_SUCCESS */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/commimpl.pxi":96 * try: del lock_registry[comm] * except KeyError: pass * return MPI_SUCCESS # <<<<<<<<<<<<<< * * @cython.callspec("MPIAPI") */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":92 * cdef dict lock_registry = {} * * cdef inline int lock_free_cb(MPI_Comm comm) \ # <<<<<<<<<<<<<< * except MPI_ERR_UNKNOWN with gil: * try: del lock_registry[comm] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.lock_free_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/commimpl.pxi":99 * * @cython.callspec("MPIAPI") * cdef int lock_free_fn(MPI_Comm comm, int keyval, # <<<<<<<<<<<<<< * void *attrval, void *xstate) nogil: * if comm == MPI_COMM_SELF: */ static int MPIAPI __pyx_f_6mpi4py_3MPI_lock_free_fn(MPI_Comm __pyx_v_comm, CYTHON_UNUSED int __pyx_v_keyval, CYTHON_UNUSED void *__pyx_v_attrval, CYTHON_UNUSED void *__pyx_v_xstate) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/commimpl.pxi":101 * cdef int lock_free_fn(MPI_Comm comm, int keyval, * void *attrval, void *xstate) nogil: * if comm == MPI_COMM_SELF: # <<<<<<<<<<<<<< * return MPI_Comm_free_keyval(&lock_keyval) * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_SELF) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/commimpl.pxi":102 * void *attrval, void *xstate) nogil: * if comm == MPI_COMM_SELF: * return MPI_Comm_free_keyval(&lock_keyval) # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_SUCCESS */ __pyx_r = MPI_Comm_free_keyval((&__pyx_v_6mpi4py_3MPI_lock_keyval)); goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":101 * cdef int lock_free_fn(MPI_Comm comm, int keyval, * void *attrval, void *xstate) nogil: * if comm == MPI_COMM_SELF: # <<<<<<<<<<<<<< * return MPI_Comm_free_keyval(&lock_keyval) * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/commimpl.pxi":103 * if comm == MPI_COMM_SELF: * return MPI_Comm_free_keyval(&lock_keyval) * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * if lock_registry == NULL: */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/commimpl.pxi":104 * return MPI_Comm_free_keyval(&lock_keyval) * if not Py_IsInitialized(): * return MPI_SUCCESS # <<<<<<<<<<<<<< * if lock_registry == NULL: * return MPI_SUCCESS */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":103 * if comm == MPI_COMM_SELF: * return MPI_Comm_free_keyval(&lock_keyval) * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * if lock_registry == NULL: */ } /* "mpi4py/MPI/commimpl.pxi":105 * if not Py_IsInitialized(): * return MPI_SUCCESS * if lock_registry == NULL: # <<<<<<<<<<<<<< * return MPI_SUCCESS * return lock_free_cb(comm) */ __pyx_t_1 = ((((void *)__pyx_v_6mpi4py_3MPI_lock_registry) == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/commimpl.pxi":106 * return MPI_SUCCESS * if lock_registry == NULL: * return MPI_SUCCESS # <<<<<<<<<<<<<< * return lock_free_cb(comm) * */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":105 * if not Py_IsInitialized(): * return MPI_SUCCESS * if lock_registry == NULL: # <<<<<<<<<<<<<< * return MPI_SUCCESS * return lock_free_cb(comm) */ } /* "mpi4py/MPI/commimpl.pxi":107 * if lock_registry == NULL: * return MPI_SUCCESS * return lock_free_cb(comm) # <<<<<<<<<<<<<< * * cdef inline dict PyMPI_Lock_table(MPI_Comm comm): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_lock_free_cb(__pyx_v_comm); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(3, 107, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":99 * * @cython.callspec("MPIAPI") * cdef int lock_free_fn(MPI_Comm comm, int keyval, # <<<<<<<<<<<<<< * void *attrval, void *xstate) nogil: * if comm == MPI_COMM_SELF: */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.lock_free_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/commimpl.pxi":109 * return lock_free_cb(comm) * * cdef inline dict PyMPI_Lock_table(MPI_Comm comm): # <<<<<<<<<<<<<< * cdef dict table * cdef int found = 0 */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_Lock_table(MPI_Comm __pyx_v_comm) { PyObject *__pyx_v_table = 0; int __pyx_v_found; void *__pyx_v_attrval; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("PyMPI_Lock_table", 0); /* "mpi4py/MPI/commimpl.pxi":111 * cdef inline dict PyMPI_Lock_table(MPI_Comm comm): * cdef dict table * cdef int found = 0 # <<<<<<<<<<<<<< * cdef void *attrval = NULL * if lock_keyval == MPI_KEYVAL_INVALID: */ __pyx_v_found = 0; /* "mpi4py/MPI/commimpl.pxi":112 * cdef dict table * cdef int found = 0 * cdef void *attrval = NULL # <<<<<<<<<<<<<< * if lock_keyval == MPI_KEYVAL_INVALID: * CHKERR( MPI_Comm_create_keyval( */ __pyx_v_attrval = NULL; /* "mpi4py/MPI/commimpl.pxi":113 * cdef int found = 0 * cdef void *attrval = NULL * if lock_keyval == MPI_KEYVAL_INVALID: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_create_keyval( * MPI_COMM_NULL_COPY_FN, lock_free_fn, &lock_keyval, NULL) ) */ __pyx_t_1 = ((__pyx_v_6mpi4py_3MPI_lock_keyval == MPI_KEYVAL_INVALID) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/commimpl.pxi":114 * cdef void *attrval = NULL * if lock_keyval == MPI_KEYVAL_INVALID: * CHKERR( MPI_Comm_create_keyval( # <<<<<<<<<<<<<< * MPI_COMM_NULL_COPY_FN, lock_free_fn, &lock_keyval, NULL) ) * lock_registry[MPI_COMM_SELF] = table = {} */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_create_keyval(MPI_COMM_NULL_COPY_FN, __pyx_f_6mpi4py_3MPI_lock_free_fn, (&__pyx_v_6mpi4py_3MPI_lock_keyval), NULL)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 114, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":116 * CHKERR( MPI_Comm_create_keyval( * MPI_COMM_NULL_COPY_FN, lock_free_fn, &lock_keyval, NULL) ) * lock_registry[MPI_COMM_SELF] = table = {} # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_set_attr(MPI_COMM_SELF, lock_keyval, table) ) * CHKERR( MPI_Comm_get_attr(comm, lock_keyval, &attrval, &found) ) */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_6mpi4py_3MPI_lock_registry == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 116, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)MPI_COMM_SELF)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyDict_SetItem(__pyx_v_6mpi4py_3MPI_lock_registry, __pyx_t_4, __pyx_t_3) < 0)) __PYX_ERR(3, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_t_3); __pyx_v_table = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/commimpl.pxi":117 * MPI_COMM_NULL_COPY_FN, lock_free_fn, &lock_keyval, NULL) ) * lock_registry[MPI_COMM_SELF] = table = {} * CHKERR( MPI_Comm_set_attr(MPI_COMM_SELF, lock_keyval, table) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_get_attr(comm, lock_keyval, &attrval, &found) ) * if not found: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_set_attr(MPI_COMM_SELF, __pyx_v_6mpi4py_3MPI_lock_keyval, ((void *)__pyx_v_table))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 117, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":113 * cdef int found = 0 * cdef void *attrval = NULL * if lock_keyval == MPI_KEYVAL_INVALID: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_create_keyval( * MPI_COMM_NULL_COPY_FN, lock_free_fn, &lock_keyval, NULL) ) */ } /* "mpi4py/MPI/commimpl.pxi":118 * lock_registry[MPI_COMM_SELF] = table = {} * CHKERR( MPI_Comm_set_attr(MPI_COMM_SELF, lock_keyval, table) ) * CHKERR( MPI_Comm_get_attr(comm, lock_keyval, &attrval, &found) ) # <<<<<<<<<<<<<< * if not found: * lock_registry[comm] = table = {} */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_get_attr(__pyx_v_comm, __pyx_v_6mpi4py_3MPI_lock_keyval, (&__pyx_v_attrval), (&__pyx_v_found))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 118, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":119 * CHKERR( MPI_Comm_set_attr(MPI_COMM_SELF, lock_keyval, table) ) * CHKERR( MPI_Comm_get_attr(comm, lock_keyval, &attrval, &found) ) * if not found: # <<<<<<<<<<<<<< * lock_registry[comm] = table = {} * CHKERR( MPI_Comm_set_attr(comm, lock_keyval, table) ) */ __pyx_t_1 = ((!(__pyx_v_found != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/commimpl.pxi":120 * CHKERR( MPI_Comm_get_attr(comm, lock_keyval, &attrval, &found) ) * if not found: * lock_registry[comm] = table = {} # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_set_attr(comm, lock_keyval, table) ) * else: */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_6mpi4py_3MPI_lock_registry == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 120, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)__pyx_v_comm)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyDict_SetItem(__pyx_v_6mpi4py_3MPI_lock_registry, __pyx_t_4, __pyx_t_3) < 0)) __PYX_ERR(3, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_table, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/commimpl.pxi":121 * if not found: * lock_registry[comm] = table = {} * CHKERR( MPI_Comm_set_attr(comm, lock_keyval, table) ) # <<<<<<<<<<<<<< * else: * if PYPY: table = lock_registry[comm] */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_set_attr(__pyx_v_comm, __pyx_v_6mpi4py_3MPI_lock_keyval, ((void *)__pyx_v_table))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 121, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":119 * CHKERR( MPI_Comm_set_attr(MPI_COMM_SELF, lock_keyval, table) ) * CHKERR( MPI_Comm_get_attr(comm, lock_keyval, &attrval, &found) ) * if not found: # <<<<<<<<<<<<<< * lock_registry[comm] = table = {} * CHKERR( MPI_Comm_set_attr(comm, lock_keyval, table) ) */ goto __pyx_L4; } /* "mpi4py/MPI/commimpl.pxi":123 * CHKERR( MPI_Comm_set_attr(comm, lock_keyval, table) ) * else: * if PYPY: table = lock_registry[comm] # <<<<<<<<<<<<<< * else: table = attrval * return table */ /*else*/ { if (PyMPI_RUNTIME_PYPY) { if (unlikely(__pyx_v_6mpi4py_3MPI_lock_registry == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 123, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)__pyx_v_comm)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_6mpi4py_3MPI_lock_registry, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyDict_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(3, 123, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_table, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; goto __pyx_L5; } /* "mpi4py/MPI/commimpl.pxi":124 * else: * if PYPY: table = lock_registry[comm] * else: table = attrval # <<<<<<<<<<<<<< * return table * */ /*else*/ { __pyx_t_4 = ((PyObject *)__pyx_v_attrval); __Pyx_INCREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_table, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; } __pyx_L5:; } __pyx_L4:; /* "mpi4py/MPI/commimpl.pxi":125 * if PYPY: table = lock_registry[comm] * else: table = attrval * return table # <<<<<<<<<<<<<< * * cdef inline object PyMPI_Lock(MPI_Comm comm, object key): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_table); __pyx_r = __pyx_v_table; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":109 * return lock_free_cb(comm) * * cdef inline dict PyMPI_Lock_table(MPI_Comm comm): # <<<<<<<<<<<<<< * cdef dict table * cdef int found = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_Lock_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_table); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/commimpl.pxi":127 * return table * * cdef inline object PyMPI_Lock(MPI_Comm comm, object key): # <<<<<<<<<<<<<< * cdef dict table = PyMPI_Lock_table(comm) * cdef object lock */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_Lock(MPI_Comm __pyx_v_comm, PyObject *__pyx_v_key) { PyObject *__pyx_v_table = 0; PyObject *__pyx_v_lock = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("PyMPI_Lock", 0); /* "mpi4py/MPI/commimpl.pxi":128 * * cdef inline object PyMPI_Lock(MPI_Comm comm, object key): * cdef dict table = PyMPI_Lock_table(comm) # <<<<<<<<<<<<<< * cdef object lock * try: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock_table(__pyx_v_comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_table = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/commimpl.pxi":130 * cdef dict table = PyMPI_Lock_table(comm) * cdef object lock * try: # <<<<<<<<<<<<<< * lock = table[key] * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "mpi4py/MPI/commimpl.pxi":131 * cdef object lock * try: * lock = table[key] # <<<<<<<<<<<<<< * except KeyError: * lock = table[key] = allocate_lock() */ if (unlikely(__pyx_v_table == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 131, __pyx_L3_error) } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_table, __pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 131, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_lock = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/commimpl.pxi":130 * cdef dict table = PyMPI_Lock_table(comm) * cdef object lock * try: # <<<<<<<<<<<<<< * lock = table[key] * except KeyError: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/commimpl.pxi":132 * try: * lock = table[key] * except KeyError: # <<<<<<<<<<<<<< * lock = table[key] = allocate_lock() * return lock */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_5) { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_Lock", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 132, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "mpi4py/MPI/commimpl.pxi":133 * lock = table[key] * except KeyError: * lock = table[key] = allocate_lock() # <<<<<<<<<<<<<< * return lock * */ __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_allocate_lock); __pyx_t_9 = __pyx_v_6mpi4py_3MPI_allocate_lock; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 133, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_INCREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_v_lock, __pyx_t_8); if (unlikely(__pyx_v_table == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(3, 133, __pyx_L5_except_error) } if (unlikely(PyDict_SetItem(__pyx_v_table, __pyx_v_key, __pyx_t_8) < 0)) __PYX_ERR(3, 133, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "mpi4py/MPI/commimpl.pxi":130 * cdef dict table = PyMPI_Lock_table(comm) * cdef object lock * try: # <<<<<<<<<<<<<< * lock = table[key] * except KeyError: */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/commimpl.pxi":134 * except KeyError: * lock = table[key] = allocate_lock() * return lock # <<<<<<<<<<<<<< * * def _lock_table(Comm comm): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_lock); __pyx_r = __pyx_v_lock; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":127 * return table * * cdef inline object PyMPI_Lock(MPI_Comm comm, object key): # <<<<<<<<<<<<<< * cdef dict table = PyMPI_Lock_table(comm) * cdef object lock */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_Lock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_table); __Pyx_XDECREF(__pyx_v_lock); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/commimpl.pxi":136 * return lock * * def _lock_table(Comm comm): # <<<<<<<<<<<<<< * "Internal communicator lock table" * return PyMPI_Lock_table(comm.ob_mpi) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3_lock_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_2_lock_table[] = "_lock_table(Comm comm)\nInternal communicator lock table"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_3_lock_table = {"_lock_table", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3_lock_table, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_2_lock_table}; static PyObject *__pyx_pw_6mpi4py_3MPI_3_lock_table(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_lock_table (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_lock_table") < 0)) __PYX_ERR(3, 136, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_lock_table", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(3, 136, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI._lock_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm", 0))) __PYX_ERR(3, 136, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_2_lock_table(__pyx_self, __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2_lock_table(CYTHON_UNUSED PyObject *__pyx_self, struct PyMPICommObject *__pyx_v_comm) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_lock_table", 0); /* "mpi4py/MPI/commimpl.pxi":138 * def _lock_table(Comm comm): * "Internal communicator lock table" * return PyMPI_Lock_table(comm.ob_mpi) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock_table(__pyx_v_comm->ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/commimpl.pxi":136 * return lock * * def _lock_table(Comm comm): # <<<<<<<<<<<<<< * "Internal communicator lock table" * return PyMPI_Lock_table(comm.ob_mpi) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._lock_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":246 * include "commimpl.pxi" * * cdef inline Comm new_Comm(MPI_Comm ob): # <<<<<<<<<<<<<< * cdef Comm comm = Comm.__new__(Comm) * comm.ob_mpi = ob */ static CYTHON_INLINE struct PyMPICommObject *__pyx_f_6mpi4py_3MPI_new_Comm(MPI_Comm __pyx_v_ob) { struct PyMPICommObject *__pyx_v_comm = 0; struct PyMPICommObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Comm", 0); /* "mpi4py/MPI/helpers.pxi":247 * * cdef inline Comm new_Comm(MPI_Comm ob): * cdef Comm comm = Comm.__new__(Comm) # <<<<<<<<<<<<<< * comm.ob_mpi = ob * return comm */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Comm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Comm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 247, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPICommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":248 * cdef inline Comm new_Comm(MPI_Comm ob): * cdef Comm comm = Comm.__new__(Comm) * comm.ob_mpi = ob # <<<<<<<<<<<<<< * return comm * */ __pyx_v_comm->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":249 * cdef Comm comm = Comm.__new__(Comm) * comm.ob_mpi = ob * return comm # <<<<<<<<<<<<<< * * cdef inline Intracomm new_Intracomm(MPI_Comm ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = __pyx_v_comm; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":246 * include "commimpl.pxi" * * cdef inline Comm new_Comm(MPI_Comm ob): # <<<<<<<<<<<<<< * cdef Comm comm = Comm.__new__(Comm) * comm.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Comm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":251 * return comm * * cdef inline Intracomm new_Intracomm(MPI_Comm ob): # <<<<<<<<<<<<<< * cdef Intracomm comm = Intracomm.__new__(Intracomm) * comm.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIIntracommObject *__pyx_f_6mpi4py_3MPI_new_Intracomm(MPI_Comm __pyx_v_ob) { struct PyMPIIntracommObject *__pyx_v_comm = 0; struct PyMPIIntracommObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Intracomm", 0); /* "mpi4py/MPI/helpers.pxi":252 * * cdef inline Intracomm new_Intracomm(MPI_Comm ob): * cdef Intracomm comm = Intracomm.__new__(Intracomm) # <<<<<<<<<<<<<< * comm.ob_mpi = ob * return comm */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Intracomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Intracomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 252, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPIIntracommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":253 * cdef inline Intracomm new_Intracomm(MPI_Comm ob): * cdef Intracomm comm = Intracomm.__new__(Intracomm) * comm.ob_mpi = ob # <<<<<<<<<<<<<< * return comm * */ __pyx_v_comm->__pyx_base.ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":254 * cdef Intracomm comm = Intracomm.__new__(Intracomm) * comm.ob_mpi = ob * return comm # <<<<<<<<<<<<<< * * cdef inline Intercomm new_Intercomm(MPI_Comm ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = __pyx_v_comm; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":251 * return comm * * cdef inline Intracomm new_Intracomm(MPI_Comm ob): # <<<<<<<<<<<<<< * cdef Intracomm comm = Intracomm.__new__(Intracomm) * comm.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Intracomm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":256 * return comm * * cdef inline Intercomm new_Intercomm(MPI_Comm ob): # <<<<<<<<<<<<<< * cdef Intercomm comm = Intercomm.__new__(Intercomm) * comm.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIIntercommObject *__pyx_f_6mpi4py_3MPI_new_Intercomm(MPI_Comm __pyx_v_ob) { struct PyMPIIntercommObject *__pyx_v_comm = 0; struct PyMPIIntercommObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Intercomm", 0); /* "mpi4py/MPI/helpers.pxi":257 * * cdef inline Intercomm new_Intercomm(MPI_Comm ob): * cdef Intercomm comm = Intercomm.__new__(Intercomm) # <<<<<<<<<<<<<< * comm.ob_mpi = ob * return comm */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Intercomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 257, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPIIntercommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":258 * cdef inline Intercomm new_Intercomm(MPI_Comm ob): * cdef Intercomm comm = Intercomm.__new__(Intercomm) * comm.ob_mpi = ob # <<<<<<<<<<<<<< * return comm * */ __pyx_v_comm->__pyx_base.ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":259 * cdef Intercomm comm = Intercomm.__new__(Intercomm) * comm.ob_mpi = ob * return comm # <<<<<<<<<<<<<< * * cdef inline int del_Comm(MPI_Comm* ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = __pyx_v_comm; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":256 * return comm * * cdef inline Intercomm new_Intercomm(MPI_Comm ob): # <<<<<<<<<<<<<< * cdef Intercomm comm = Intercomm.__new__(Intercomm) * comm.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Intercomm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":261 * return comm * * cdef inline int del_Comm(MPI_Comm* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_COMM_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Comm(MPI_Comm *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_Comm", 0); /* "mpi4py/MPI/helpers.pxi":262 * * cdef inline int del_Comm(MPI_Comm* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_COMM_NULL : return 0 * if ob[0] == MPI_COMM_SELF : return 0 */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":263 * cdef inline int del_Comm(MPI_Comm* ob): * if ob == NULL : return 0 * if ob[0] == MPI_COMM_NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_COMM_SELF : return 0 * if ob[0] == MPI_COMM_WORLD : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":264 * if ob == NULL : return 0 * if ob[0] == MPI_COMM_NULL : return 0 * if ob[0] == MPI_COMM_SELF : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_COMM_WORLD : return 0 * # */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_COMM_SELF) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":265 * if ob[0] == MPI_COMM_NULL : return 0 * if ob[0] == MPI_COMM_SELF : return 0 * if ob[0] == MPI_COMM_WORLD : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_COMM_WORLD) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":267 * if ob[0] == MPI_COMM_WORLD : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * return MPI_Comm_free(ob) * */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":268 * # * if not mpi_active(): return 0 * return MPI_Comm_free(ob) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = MPI_Comm_free(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":261 * return comm * * cdef inline int del_Comm(MPI_Comm* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_COMM_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/winimpl.pxi":3 * #------------------------------------------------------------------------------ * * cdef inline int win_get_base(MPI_Win win,void **base) except -1: # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef void *attr = NULL */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_win_get_base(MPI_Win __pyx_v_win, void **__pyx_v_base) { int __pyx_v_flag; void *__pyx_v_attr; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; void *__pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("win_get_base", 0); /* "mpi4py/MPI/winimpl.pxi":4 * * cdef inline int win_get_base(MPI_Win win,void **base) except -1: * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef void *attr = NULL * CHKERR( MPI_Win_get_attr(win, MPI_WIN_BASE, &attr, &flag) ) */ __pyx_v_flag = 0; /* "mpi4py/MPI/winimpl.pxi":5 * cdef inline int win_get_base(MPI_Win win,void **base) except -1: * cdef int flag = 0 * cdef void *attr = NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_attr(win, MPI_WIN_BASE, &attr, &flag) ) * base[0] = attr if flag and attr != NULL else NULL */ __pyx_v_attr = NULL; /* "mpi4py/MPI/winimpl.pxi":6 * cdef int flag = 0 * cdef void *attr = NULL * CHKERR( MPI_Win_get_attr(win, MPI_WIN_BASE, &attr, &flag) ) # <<<<<<<<<<<<<< * base[0] = attr if flag and attr != NULL else NULL * return 0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_attr(__pyx_v_win, MPI_WIN_BASE, (&__pyx_v_attr), (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 6, __pyx_L1_error) /* "mpi4py/MPI/winimpl.pxi":7 * cdef void *attr = NULL * CHKERR( MPI_Win_get_attr(win, MPI_WIN_BASE, &attr, &flag) ) * base[0] = attr if flag and attr != NULL else NULL # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_4 = (__pyx_v_flag != 0); if (__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L3_bool_binop_done; } __pyx_t_4 = ((__pyx_v_attr != NULL) != 0); __pyx_t_3 = __pyx_t_4; __pyx_L3_bool_binop_done:; if (__pyx_t_3) { __pyx_t_2 = __pyx_v_attr; } else { __pyx_t_2 = NULL; } (__pyx_v_base[0]) = __pyx_t_2; /* "mpi4py/MPI/winimpl.pxi":8 * CHKERR( MPI_Win_get_attr(win, MPI_WIN_BASE, &attr, &flag) ) * base[0] = attr if flag and attr != NULL else NULL * return 0 # <<<<<<<<<<<<<< * * cdef inline int win_get_size(MPI_Win win,MPI_Aint *size) except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/winimpl.pxi":3 * #------------------------------------------------------------------------------ * * cdef inline int win_get_base(MPI_Win win,void **base) except -1: # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef void *attr = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.win_get_base", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/winimpl.pxi":10 * return 0 * * cdef inline int win_get_size(MPI_Win win,MPI_Aint *size) except -1: # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef MPI_Aint *attr = NULL */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_win_get_size(MPI_Win __pyx_v_win, MPI_Aint *__pyx_v_size) { int __pyx_v_flag; MPI_Aint *__pyx_v_attr; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; MPI_Aint __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("win_get_size", 0); /* "mpi4py/MPI/winimpl.pxi":11 * * cdef inline int win_get_size(MPI_Win win,MPI_Aint *size) except -1: * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef MPI_Aint *attr = NULL * CHKERR( MPI_Win_get_attr(win, MPI_WIN_SIZE, &attr, &flag) ) */ __pyx_v_flag = 0; /* "mpi4py/MPI/winimpl.pxi":12 * cdef inline int win_get_size(MPI_Win win,MPI_Aint *size) except -1: * cdef int flag = 0 * cdef MPI_Aint *attr = NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_attr(win, MPI_WIN_SIZE, &attr, &flag) ) * size[0] = attr[0] if flag and attr != NULL else 0 */ __pyx_v_attr = NULL; /* "mpi4py/MPI/winimpl.pxi":13 * cdef int flag = 0 * cdef MPI_Aint *attr = NULL * CHKERR( MPI_Win_get_attr(win, MPI_WIN_SIZE, &attr, &flag) ) # <<<<<<<<<<<<<< * size[0] = attr[0] if flag and attr != NULL else 0 * return 0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_attr(__pyx_v_win, MPI_WIN_SIZE, (&__pyx_v_attr), (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 13, __pyx_L1_error) /* "mpi4py/MPI/winimpl.pxi":14 * cdef MPI_Aint *attr = NULL * CHKERR( MPI_Win_get_attr(win, MPI_WIN_SIZE, &attr, &flag) ) * size[0] = attr[0] if flag and attr != NULL else 0 # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_4 = (__pyx_v_flag != 0); if (__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L3_bool_binop_done; } __pyx_t_4 = ((__pyx_v_attr != NULL) != 0); __pyx_t_3 = __pyx_t_4; __pyx_L3_bool_binop_done:; if (__pyx_t_3) { __pyx_t_2 = (__pyx_v_attr[0]); } else { __pyx_t_2 = 0; } (__pyx_v_size[0]) = __pyx_t_2; /* "mpi4py/MPI/winimpl.pxi":15 * CHKERR( MPI_Win_get_attr(win, MPI_WIN_SIZE, &attr, &flag) ) * size[0] = attr[0] if flag and attr != NULL else 0 * return 0 # <<<<<<<<<<<<<< * * cdef inline int win_get_unit(MPI_Win win,int *disp_unit) except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/winimpl.pxi":10 * return 0 * * cdef inline int win_get_size(MPI_Win win,MPI_Aint *size) except -1: # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef MPI_Aint *attr = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.win_get_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/winimpl.pxi":17 * return 0 * * cdef inline int win_get_unit(MPI_Win win,int *disp_unit) except -1: # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef int *attr = NULL */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_win_get_unit(MPI_Win __pyx_v_win, int *__pyx_v_disp_unit) { int __pyx_v_flag; int *__pyx_v_attr; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("win_get_unit", 0); /* "mpi4py/MPI/winimpl.pxi":18 * * cdef inline int win_get_unit(MPI_Win win,int *disp_unit) except -1: * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef int *attr = NULL * CHKERR( MPI_Win_get_attr(win, MPI_WIN_DISP_UNIT, &attr, &flag) ) */ __pyx_v_flag = 0; /* "mpi4py/MPI/winimpl.pxi":19 * cdef inline int win_get_unit(MPI_Win win,int *disp_unit) except -1: * cdef int flag = 0 * cdef int *attr = NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_attr(win, MPI_WIN_DISP_UNIT, &attr, &flag) ) * disp_unit[0] = attr[0] if flag and attr != NULL else 1 */ __pyx_v_attr = NULL; /* "mpi4py/MPI/winimpl.pxi":20 * cdef int flag = 0 * cdef int *attr = NULL * CHKERR( MPI_Win_get_attr(win, MPI_WIN_DISP_UNIT, &attr, &flag) ) # <<<<<<<<<<<<<< * disp_unit[0] = attr[0] if flag and attr != NULL else 1 * return 0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_attr(__pyx_v_win, MPI_WIN_DISP_UNIT, (&__pyx_v_attr), (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(15, 20, __pyx_L1_error) /* "mpi4py/MPI/winimpl.pxi":21 * cdef int *attr = NULL * CHKERR( MPI_Win_get_attr(win, MPI_WIN_DISP_UNIT, &attr, &flag) ) * disp_unit[0] = attr[0] if flag and attr != NULL else 1 # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_3 = (__pyx_v_flag != 0); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L3_bool_binop_done; } __pyx_t_3 = ((__pyx_v_attr != NULL) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L3_bool_binop_done:; if (__pyx_t_2) { __pyx_t_1 = (__pyx_v_attr[0]); } else { __pyx_t_1 = 1; } (__pyx_v_disp_unit[0]) = __pyx_t_1; /* "mpi4py/MPI/winimpl.pxi":22 * CHKERR( MPI_Win_get_attr(win, MPI_WIN_DISP_UNIT, &attr, &flag) ) * disp_unit[0] = attr[0] if flag and attr != NULL else 1 * return 0 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/winimpl.pxi":17 * return 0 * * cdef inline int win_get_unit(MPI_Win win,int *disp_unit) except -1: # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef int *attr = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.win_get_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":275 * include "winimpl.pxi" * * cdef inline Win new_Win(MPI_Win ob): # <<<<<<<<<<<<<< * cdef Win win = Win.__new__(Win) * win.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIWinObject *__pyx_f_6mpi4py_3MPI_new_Win(MPI_Win __pyx_v_ob) { struct PyMPIWinObject *__pyx_v_win = 0; struct PyMPIWinObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Win", 0); /* "mpi4py/MPI/helpers.pxi":276 * * cdef inline Win new_Win(MPI_Win ob): * cdef Win win = Win.__new__(Win) # <<<<<<<<<<<<<< * win.ob_mpi = ob * return win */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Win(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Win), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 276, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_win = ((struct PyMPIWinObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":277 * cdef inline Win new_Win(MPI_Win ob): * cdef Win win = Win.__new__(Win) * win.ob_mpi = ob # <<<<<<<<<<<<<< * return win * */ __pyx_v_win->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":278 * cdef Win win = Win.__new__(Win) * win.ob_mpi = ob * return win # <<<<<<<<<<<<<< * * cdef inline int del_Win(MPI_Win* ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_win)); __pyx_r = __pyx_v_win; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":275 * include "winimpl.pxi" * * cdef inline Win new_Win(MPI_Win ob): # <<<<<<<<<<<<<< * cdef Win win = Win.__new__(Win) * win.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Win", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_win); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":280 * return win * * cdef inline int del_Win(MPI_Win* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_WIN_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Win(MPI_Win *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_Win", 0); /* "mpi4py/MPI/helpers.pxi":281 * * cdef inline int del_Win(MPI_Win* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_WIN_NULL : return 0 * # */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":282 * cdef inline int del_Win(MPI_Win* ob): * if ob == NULL : return 0 * if ob[0] == MPI_WIN_NULL : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_WIN_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":284 * if ob[0] == MPI_WIN_NULL : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * return MPI_Win_free(ob) * */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":285 * # * if not mpi_active(): return 0 * return MPI_Win_free(ob) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = MPI_Win_free(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":280 * return win * * cdef inline int del_Win(MPI_Win* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_WIN_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":13 * cdef object extent_fn * * def __cinit__(self, read_fn, write_fn, extent_fn): # <<<<<<<<<<<<<< * self.read_fn = read_fn * self.write_fn = write_fn */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_10_p_datarep_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_10_p_datarep_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_read_fn = 0; PyObject *__pyx_v_write_fn = 0; PyObject *__pyx_v_extent_fn = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_read_fn,&__pyx_n_s_write_fn,&__pyx_n_s_extent_fn,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_read_fn)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_write_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(16, 13, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extent_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(16, 13, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(16, 13, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_read_fn = values[0]; __pyx_v_write_fn = values[1]; __pyx_v_extent_fn = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(16, 13, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI._p_datarep.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_10_p_datarep___cinit__(((struct __pyx_obj_6mpi4py_3MPI__p_datarep *)__pyx_v_self), __pyx_v_read_fn, __pyx_v_write_fn, __pyx_v_extent_fn); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_10_p_datarep___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_self, PyObject *__pyx_v_read_fn, PyObject *__pyx_v_write_fn, PyObject *__pyx_v_extent_fn) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/drepimpl.pxi":14 * * def __cinit__(self, read_fn, write_fn, extent_fn): * self.read_fn = read_fn # <<<<<<<<<<<<<< * self.write_fn = write_fn * self.extent_fn = extent_fn */ __Pyx_INCREF(__pyx_v_read_fn); __Pyx_GIVEREF(__pyx_v_read_fn); __Pyx_GOTREF(__pyx_v_self->read_fn); __Pyx_DECREF(__pyx_v_self->read_fn); __pyx_v_self->read_fn = __pyx_v_read_fn; /* "mpi4py/MPI/drepimpl.pxi":15 * def __cinit__(self, read_fn, write_fn, extent_fn): * self.read_fn = read_fn * self.write_fn = write_fn # <<<<<<<<<<<<<< * self.extent_fn = extent_fn * */ __Pyx_INCREF(__pyx_v_write_fn); __Pyx_GIVEREF(__pyx_v_write_fn); __Pyx_GOTREF(__pyx_v_self->write_fn); __Pyx_DECREF(__pyx_v_self->write_fn); __pyx_v_self->write_fn = __pyx_v_write_fn; /* "mpi4py/MPI/drepimpl.pxi":16 * self.read_fn = read_fn * self.write_fn = write_fn * self.extent_fn = extent_fn # <<<<<<<<<<<<<< * * cdef int read(self, */ __Pyx_INCREF(__pyx_v_extent_fn); __Pyx_GIVEREF(__pyx_v_extent_fn); __Pyx_GOTREF(__pyx_v_self->extent_fn); __Pyx_DECREF(__pyx_v_self->extent_fn); __pyx_v_self->extent_fn = __pyx_v_extent_fn; /* "mpi4py/MPI/drepimpl.pxi":13 * cdef object extent_fn * * def __cinit__(self, read_fn, write_fn, extent_fn): # <<<<<<<<<<<<<< * self.read_fn = read_fn * self.write_fn = write_fn */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":18 * self.extent_fn = extent_fn * * cdef int read(self, # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ static int __pyx_f_6mpi4py_3MPI_10_p_datarep_read(struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_self, void *__pyx_v_userbuf, MPI_Datatype __pyx_v_datatype, int __pyx_v_count, void *__pyx_v_filebuf, MPI_Offset __pyx_v_position) { MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_extent; int __pyx_v_ierr; MPI_Aint __pyx_v_ulen; MPI_Aint __pyx_v_flen; PyObject *__pyx_v_ubuf = 0; PyObject *__pyx_v_fbuf = 0; struct PyMPIDatatypeObject *__pyx_v_dtype = 0; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; char const *__pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; __Pyx_RefNannySetupContext("read", 0); /* "mpi4py/MPI/drepimpl.pxi":25 * MPI_Offset position, * ) except -1: * cdef MPI_Aint lb=0, extent=0 # <<<<<<<<<<<<<< * cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) * if ierr != MPI_SUCCESS: return ierr */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/drepimpl.pxi":26 * ) except -1: * cdef MPI_Aint lb=0, extent=0 * cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) # <<<<<<<<<<<<<< * if ierr != MPI_SUCCESS: return ierr * cdef MPI_Aint ulen = (position+count) * extent */ __pyx_v_ierr = MPI_Type_get_extent(__pyx_v_datatype, (&__pyx_v_lb), (&__pyx_v_extent)); /* "mpi4py/MPI/drepimpl.pxi":27 * cdef MPI_Aint lb=0, extent=0 * cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) * if ierr != MPI_SUCCESS: return ierr # <<<<<<<<<<<<<< * cdef MPI_Aint ulen = (position+count) * extent * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX */ __pyx_t_1 = ((__pyx_v_ierr != MPI_SUCCESS) != 0); if (__pyx_t_1) { __pyx_r = __pyx_v_ierr; goto __pyx_L0; } /* "mpi4py/MPI/drepimpl.pxi":28 * cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) * if ierr != MPI_SUCCESS: return ierr * cdef MPI_Aint ulen = (position+count) * extent # <<<<<<<<<<<<<< * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX * cdef object ubuf = tomemory(userbuf, ulen) */ __pyx_v_ulen = (((MPI_Aint)(__pyx_v_position + __pyx_v_count)) * __pyx_v_extent); /* "mpi4py/MPI/drepimpl.pxi":29 * if ierr != MPI_SUCCESS: return ierr * cdef MPI_Aint ulen = (position+count) * extent * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX # <<<<<<<<<<<<<< * cdef object ubuf = tomemory(userbuf, ulen) * cdef object fbuf = tomemory(filebuf, flen) */ __pyx_v_flen = ((MPI_Aint)PY_SSIZE_T_MAX); /* "mpi4py/MPI/drepimpl.pxi":30 * cdef MPI_Aint ulen = (position+count) * extent * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX * cdef object ubuf = tomemory(userbuf, ulen) # <<<<<<<<<<<<<< * cdef object fbuf = tomemory(filebuf, flen) * cdef Datatype dtype = Datatype.__new__(Datatype) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_tomemory(__pyx_v_userbuf, __pyx_v_ulen)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_ubuf = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/drepimpl.pxi":31 * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX * cdef object ubuf = tomemory(userbuf, ulen) * cdef object fbuf = tomemory(filebuf, flen) # <<<<<<<<<<<<<< * cdef Datatype dtype = Datatype.__new__(Datatype) * dtype.ob_mpi = datatype */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_tomemory(__pyx_v_filebuf, __pyx_v_flen)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_fbuf = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/drepimpl.pxi":32 * cdef object ubuf = tomemory(userbuf, ulen) * cdef object fbuf = tomemory(filebuf, flen) * cdef Datatype dtype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * dtype.ob_mpi = datatype * try: self.read_fn(ubuf, dtype, count, fbuf, position) */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 32, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_dtype = ((struct PyMPIDatatypeObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/drepimpl.pxi":33 * cdef object fbuf = tomemory(filebuf, flen) * cdef Datatype dtype = Datatype.__new__(Datatype) * dtype.ob_mpi = datatype # <<<<<<<<<<<<<< * try: self.read_fn(ubuf, dtype, count, fbuf, position) * finally: dtype.ob_mpi = MPI_DATATYPE_NULL */ __pyx_v_dtype->ob_mpi = __pyx_v_datatype; /* "mpi4py/MPI/drepimpl.pxi":34 * cdef Datatype dtype = Datatype.__new__(Datatype) * dtype.ob_mpi = datatype * try: self.read_fn(ubuf, dtype, count, fbuf, position) # <<<<<<<<<<<<<< * finally: dtype.ob_mpi = MPI_DATATYPE_NULL * return MPI_SUCCESS */ /*try:*/ { __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 34, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_MPI_Offset(__pyx_v_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 34, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->read_fn); __pyx_t_5 = __pyx_v_self->read_fn; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_ubuf, ((PyObject *)__pyx_v_dtype), __pyx_t_2, __pyx_v_fbuf, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 34, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_ubuf, ((PyObject *)__pyx_v_dtype), __pyx_t_2, __pyx_v_fbuf, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 34, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 34, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_ubuf); __Pyx_GIVEREF(__pyx_v_ubuf); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_ubuf); __Pyx_INCREF(((PyObject *)__pyx_v_dtype)); __Pyx_GIVEREF(((PyObject *)__pyx_v_dtype)); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, ((PyObject *)__pyx_v_dtype)); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_2); __Pyx_INCREF(__pyx_v_fbuf); __Pyx_GIVEREF(__pyx_v_fbuf); PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_v_fbuf); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 34, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/drepimpl.pxi":35 * dtype.ob_mpi = datatype * try: self.read_fn(ubuf, dtype, count, fbuf, position) * finally: dtype.ob_mpi = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * return MPI_SUCCESS * */ /*finally:*/ { /*normal exit:*/{ __pyx_v_dtype->ob_mpi = MPI_DATATYPE_NULL; goto __pyx_L6; } __pyx_L5_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __pyx_t_7 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; { __pyx_v_dtype->ob_mpi = MPI_DATATYPE_NULL; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; goto __pyx_L1_error; } __pyx_L6:; } /* "mpi4py/MPI/drepimpl.pxi":36 * try: self.read_fn(ubuf, dtype, count, fbuf, position) * finally: dtype.ob_mpi = MPI_DATATYPE_NULL * return MPI_SUCCESS # <<<<<<<<<<<<<< * * cdef int write(self, */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":18 * self.extent_fn = extent_fn * * cdef int read(self, # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("mpi4py.MPI._p_datarep.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ubuf); __Pyx_XDECREF(__pyx_v_fbuf); __Pyx_XDECREF((PyObject *)__pyx_v_dtype); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":38 * return MPI_SUCCESS * * cdef int write(self, # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ static int __pyx_f_6mpi4py_3MPI_10_p_datarep_write(struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_self, void *__pyx_v_userbuf, MPI_Datatype __pyx_v_datatype, int __pyx_v_count, void *__pyx_v_filebuf, MPI_Offset __pyx_v_position) { MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_extent; int __pyx_v_ierr; MPI_Aint __pyx_v_ulen; MPI_Aint __pyx_v_flen; PyObject *__pyx_v_ubuf = 0; PyObject *__pyx_v_fbuf = 0; struct PyMPIDatatypeObject *__pyx_v_dtype = 0; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; char const *__pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; __Pyx_RefNannySetupContext("write", 0); /* "mpi4py/MPI/drepimpl.pxi":45 * MPI_Offset position, * ) except -1: * cdef MPI_Aint lb=0, extent=0 # <<<<<<<<<<<<<< * cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) * if ierr != MPI_SUCCESS: return ierr */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/drepimpl.pxi":46 * ) except -1: * cdef MPI_Aint lb=0, extent=0 * cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) # <<<<<<<<<<<<<< * if ierr != MPI_SUCCESS: return ierr * cdef MPI_Aint ulen = (position+count) * extent */ __pyx_v_ierr = MPI_Type_get_extent(__pyx_v_datatype, (&__pyx_v_lb), (&__pyx_v_extent)); /* "mpi4py/MPI/drepimpl.pxi":47 * cdef MPI_Aint lb=0, extent=0 * cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) * if ierr != MPI_SUCCESS: return ierr # <<<<<<<<<<<<<< * cdef MPI_Aint ulen = (position+count) * extent * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX */ __pyx_t_1 = ((__pyx_v_ierr != MPI_SUCCESS) != 0); if (__pyx_t_1) { __pyx_r = __pyx_v_ierr; goto __pyx_L0; } /* "mpi4py/MPI/drepimpl.pxi":48 * cdef int ierr = MPI_Type_get_extent(datatype, &lb, &extent) * if ierr != MPI_SUCCESS: return ierr * cdef MPI_Aint ulen = (position+count) * extent # <<<<<<<<<<<<<< * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX * cdef object ubuf = tomemory(userbuf, ulen) */ __pyx_v_ulen = (((MPI_Aint)(__pyx_v_position + __pyx_v_count)) * __pyx_v_extent); /* "mpi4py/MPI/drepimpl.pxi":49 * if ierr != MPI_SUCCESS: return ierr * cdef MPI_Aint ulen = (position+count) * extent * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX # <<<<<<<<<<<<<< * cdef object ubuf = tomemory(userbuf, ulen) * cdef object fbuf = tomemory(filebuf, flen) */ __pyx_v_flen = ((MPI_Aint)PY_SSIZE_T_MAX); /* "mpi4py/MPI/drepimpl.pxi":50 * cdef MPI_Aint ulen = (position+count) * extent * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX * cdef object ubuf = tomemory(userbuf, ulen) # <<<<<<<<<<<<<< * cdef object fbuf = tomemory(filebuf, flen) * cdef Datatype dtype = Datatype.__new__(Datatype) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_tomemory(__pyx_v_userbuf, __pyx_v_ulen)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_ubuf = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/drepimpl.pxi":51 * cdef MPI_Aint flen = PY_SSIZE_T_MAX # XXX * cdef object ubuf = tomemory(userbuf, ulen) * cdef object fbuf = tomemory(filebuf, flen) # <<<<<<<<<<<<<< * cdef Datatype dtype = Datatype.__new__(Datatype) * dtype.ob_mpi = datatype */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_tomemory(__pyx_v_filebuf, __pyx_v_flen)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_fbuf = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/drepimpl.pxi":52 * cdef object ubuf = tomemory(userbuf, ulen) * cdef object fbuf = tomemory(filebuf, flen) * cdef Datatype dtype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * dtype.ob_mpi = datatype * try: self.write_fn(ubuf, dtype, count, fbuf, position) */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 52, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_dtype = ((struct PyMPIDatatypeObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/drepimpl.pxi":53 * cdef object fbuf = tomemory(filebuf, flen) * cdef Datatype dtype = Datatype.__new__(Datatype) * dtype.ob_mpi = datatype # <<<<<<<<<<<<<< * try: self.write_fn(ubuf, dtype, count, fbuf, position) * finally: dtype.ob_mpi = MPI_DATATYPE_NULL */ __pyx_v_dtype->ob_mpi = __pyx_v_datatype; /* "mpi4py/MPI/drepimpl.pxi":54 * cdef Datatype dtype = Datatype.__new__(Datatype) * dtype.ob_mpi = datatype * try: self.write_fn(ubuf, dtype, count, fbuf, position) # <<<<<<<<<<<<<< * finally: dtype.ob_mpi = MPI_DATATYPE_NULL * return MPI_SUCCESS */ /*try:*/ { __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 54, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_From_MPI_Offset(__pyx_v_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(16, 54, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->write_fn); __pyx_t_5 = __pyx_v_self->write_fn; __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_ubuf, ((PyObject *)__pyx_v_dtype), __pyx_t_2, __pyx_v_fbuf, __pyx_t_4}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 54, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[6] = {__pyx_t_6, __pyx_v_ubuf, ((PyObject *)__pyx_v_dtype), __pyx_t_2, __pyx_v_fbuf, __pyx_t_4}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 54, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 54, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_ubuf); __Pyx_GIVEREF(__pyx_v_ubuf); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_ubuf); __Pyx_INCREF(((PyObject *)__pyx_v_dtype)); __Pyx_GIVEREF(((PyObject *)__pyx_v_dtype)); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, ((PyObject *)__pyx_v_dtype)); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_2); __Pyx_INCREF(__pyx_v_fbuf); __Pyx_GIVEREF(__pyx_v_fbuf); PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_v_fbuf); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 54, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/drepimpl.pxi":55 * dtype.ob_mpi = datatype * try: self.write_fn(ubuf, dtype, count, fbuf, position) * finally: dtype.ob_mpi = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * return MPI_SUCCESS * */ /*finally:*/ { /*normal exit:*/{ __pyx_v_dtype->ob_mpi = MPI_DATATYPE_NULL; goto __pyx_L6; } __pyx_L5_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __pyx_t_7 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; { __pyx_v_dtype->ob_mpi = MPI_DATATYPE_NULL; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; goto __pyx_L1_error; } __pyx_L6:; } /* "mpi4py/MPI/drepimpl.pxi":56 * try: self.write_fn(ubuf, dtype, count, fbuf, position) * finally: dtype.ob_mpi = MPI_DATATYPE_NULL * return MPI_SUCCESS # <<<<<<<<<<<<<< * * cdef int extent(self, */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":38 * return MPI_SUCCESS * * cdef int write(self, # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("mpi4py.MPI._p_datarep.write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ubuf); __Pyx_XDECREF(__pyx_v_fbuf); __Pyx_XDECREF((PyObject *)__pyx_v_dtype); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":58 * return MPI_SUCCESS * * cdef int extent(self, # <<<<<<<<<<<<<< * MPI_Datatype datatype, * MPI_Aint *file_extent, */ static int __pyx_f_6mpi4py_3MPI_10_p_datarep_extent(struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_self, MPI_Datatype __pyx_v_datatype, MPI_Aint *__pyx_v_file_extent) { struct PyMPIDatatypeObject *__pyx_v_dtype = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; MPI_Aint __pyx_t_4; int __pyx_t_5; int __pyx_t_6; char const *__pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("extent", 0); /* "mpi4py/MPI/drepimpl.pxi":62 * MPI_Aint *file_extent, * ) except -1: * cdef Datatype dtype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * dtype.ob_mpi = datatype * try: file_extent[0] = self.extent_fn(dtype) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 62, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_dtype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/drepimpl.pxi":63 * ) except -1: * cdef Datatype dtype = Datatype.__new__(Datatype) * dtype.ob_mpi = datatype # <<<<<<<<<<<<<< * try: file_extent[0] = self.extent_fn(dtype) * finally: dtype.ob_mpi = MPI_DATATYPE_NULL */ __pyx_v_dtype->ob_mpi = __pyx_v_datatype; /* "mpi4py/MPI/drepimpl.pxi":64 * cdef Datatype dtype = Datatype.__new__(Datatype) * dtype.ob_mpi = datatype * try: file_extent[0] = self.extent_fn(dtype) # <<<<<<<<<<<<<< * finally: dtype.ob_mpi = MPI_DATATYPE_NULL * return MPI_SUCCESS */ /*try:*/ { __Pyx_INCREF(__pyx_v_self->extent_fn); __pyx_t_1 = __pyx_v_self->extent_fn; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, ((PyObject *)__pyx_v_dtype)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_dtype)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(16, 64, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_MPI_Aint(__pyx_t_2); if (unlikely((__pyx_t_4 == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(16, 64, __pyx_L4_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_file_extent[0]) = __pyx_t_4; } /* "mpi4py/MPI/drepimpl.pxi":65 * dtype.ob_mpi = datatype * try: file_extent[0] = self.extent_fn(dtype) * finally: dtype.ob_mpi = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * return MPI_SUCCESS * */ /*finally:*/ { /*normal exit:*/{ __pyx_v_dtype->ob_mpi = MPI_DATATYPE_NULL; goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; { __pyx_v_dtype->ob_mpi = MPI_DATATYPE_NULL; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/drepimpl.pxi":66 * try: file_extent[0] = self.extent_fn(dtype) * finally: dtype.ob_mpi = MPI_DATATYPE_NULL * return MPI_SUCCESS # <<<<<<<<<<<<<< * * # --- */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":58 * return MPI_SUCCESS * * cdef int extent(self, # <<<<<<<<<<<<<< * MPI_Datatype datatype, * MPI_Aint *file_extent, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._p_datarep.extent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_dtype); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":70 * # --- * * cdef int datarep_read( # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ static int __pyx_f_6mpi4py_3MPI_datarep_read(void *__pyx_v_userbuf, MPI_Datatype __pyx_v_datatype, int __pyx_v_count, void *__pyx_v_filebuf, MPI_Offset __pyx_v_position, void *__pyx_v_extra_state) { struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_state = 0; int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("datarep_read", 0); /* "mpi4py/MPI/drepimpl.pxi":78 * void *extra_state, * ) except MPI_ERR_UNKNOWN with gil: * cdef _p_datarep state = <_p_datarep>extra_state # <<<<<<<<<<<<<< * cdef int ierr = MPI_SUCCESS * cdef object exc */ __pyx_t_1 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_datarep *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/drepimpl.pxi":79 * ) except MPI_ERR_UNKNOWN with gil: * cdef _p_datarep state = <_p_datarep>extra_state * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/drepimpl.pxi":81 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.read(userbuf, datatype, count, filebuf, position) * except MPIException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "mpi4py/MPI/drepimpl.pxi":82 * cdef object exc * try: * state.read(userbuf, datatype, count, filebuf, position) # <<<<<<<<<<<<<< * except MPIException as exc: * print_traceback() */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_10_p_datarep_read(__pyx_v_state, __pyx_v_userbuf, __pyx_v_datatype, __pyx_v_count, __pyx_v_filebuf, __pyx_v_position); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 82, __pyx_L3_error) /* "mpi4py/MPI/drepimpl.pxi":81 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.read(userbuf, datatype, count, filebuf, position) * except MPIException as exc: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/drepimpl.pxi":83 * try: * state.read(userbuf, datatype, count, filebuf, position) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_5) { __Pyx_AddTraceback("mpi4py.MPI.datarep_read", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(16, 83, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/drepimpl.pxi":84 * state.read(userbuf, datatype, count, filebuf, position) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/drepimpl.pxi":85 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(16, 85, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 85, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 85, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_5; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/drepimpl.pxi":86 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.datarep_read", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(16, 86, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/drepimpl.pxi":87 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/drepimpl.pxi":88 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/drepimpl.pxi":81 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.read(userbuf, datatype, count, filebuf, position) * except MPIException as exc: */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/drepimpl.pxi":89 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * cdef int datarep_write( */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":70 * # --- * * cdef int datarep_read( # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.datarep_read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":91 * return ierr * * cdef int datarep_write( # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ static int __pyx_f_6mpi4py_3MPI_datarep_write(void *__pyx_v_userbuf, MPI_Datatype __pyx_v_datatype, int __pyx_v_count, void *__pyx_v_filebuf, MPI_Offset __pyx_v_position, void *__pyx_v_extra_state) { struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_state = 0; int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("datarep_write", 0); /* "mpi4py/MPI/drepimpl.pxi":99 * void *extra_state, * ) except MPI_ERR_UNKNOWN with gil: * cdef _p_datarep state = <_p_datarep>extra_state # <<<<<<<<<<<<<< * cdef int ierr = MPI_SUCCESS * cdef object exc */ __pyx_t_1 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_datarep *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/drepimpl.pxi":100 * ) except MPI_ERR_UNKNOWN with gil: * cdef _p_datarep state = <_p_datarep>extra_state * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/drepimpl.pxi":102 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.write(userbuf, datatype, count, filebuf, position) * except MPIException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "mpi4py/MPI/drepimpl.pxi":103 * cdef object exc * try: * state.write(userbuf, datatype, count, filebuf, position) # <<<<<<<<<<<<<< * except MPIException as exc: * print_traceback() */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_10_p_datarep_write(__pyx_v_state, __pyx_v_userbuf, __pyx_v_datatype, __pyx_v_count, __pyx_v_filebuf, __pyx_v_position); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 103, __pyx_L3_error) /* "mpi4py/MPI/drepimpl.pxi":102 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.write(userbuf, datatype, count, filebuf, position) * except MPIException as exc: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/drepimpl.pxi":104 * try: * state.write(userbuf, datatype, count, filebuf, position) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_5) { __Pyx_AddTraceback("mpi4py.MPI.datarep_write", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(16, 104, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/drepimpl.pxi":105 * state.write(userbuf, datatype, count, filebuf, position) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/drepimpl.pxi":106 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(16, 106, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 106, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 106, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_5; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/drepimpl.pxi":107 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.datarep_write", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(16, 107, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/drepimpl.pxi":108 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/drepimpl.pxi":109 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/drepimpl.pxi":102 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.write(userbuf, datatype, count, filebuf, position) * except MPIException as exc: */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/drepimpl.pxi":110 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * cdef int datarep_extent( */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":91 * return ierr * * cdef int datarep_write( # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.datarep_write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":112 * return ierr * * cdef int datarep_extent( # <<<<<<<<<<<<<< * MPI_Datatype datatype, * MPI_Aint *file_extent, */ static int __pyx_f_6mpi4py_3MPI_datarep_extent(MPI_Datatype __pyx_v_datatype, MPI_Aint *__pyx_v_file_extent, void *__pyx_v_extra_state) { struct __pyx_obj_6mpi4py_3MPI__p_datarep *__pyx_v_state = 0; int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("datarep_extent", 0); /* "mpi4py/MPI/drepimpl.pxi":117 * void *extra_state, * ) except MPI_ERR_UNKNOWN with gil: * cdef _p_datarep state = <_p_datarep>extra_state # <<<<<<<<<<<<<< * cdef int ierr = MPI_SUCCESS * cdef object exc */ __pyx_t_1 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_datarep *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/drepimpl.pxi":118 * ) except MPI_ERR_UNKNOWN with gil: * cdef _p_datarep state = <_p_datarep>extra_state * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/drepimpl.pxi":120 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.extent(datatype, file_extent) * except MPIException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { /* "mpi4py/MPI/drepimpl.pxi":121 * cdef object exc * try: * state.extent(datatype, file_extent) # <<<<<<<<<<<<<< * except MPIException as exc: * print_traceback() */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_10_p_datarep_extent(__pyx_v_state, __pyx_v_datatype, __pyx_v_file_extent); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(16, 121, __pyx_L3_error) /* "mpi4py/MPI/drepimpl.pxi":120 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.extent(datatype, file_extent) * except MPIException as exc: */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/drepimpl.pxi":122 * try: * state.extent(datatype, file_extent) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_5) { __Pyx_AddTraceback("mpi4py.MPI.datarep_extent", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(16, 122, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/drepimpl.pxi":123 * state.extent(datatype, file_extent) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/drepimpl.pxi":124 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(16, 124, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(16, 124, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(16, 124, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_5; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/drepimpl.pxi":125 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.datarep_extent", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(16, 125, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/drepimpl.pxi":126 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/drepimpl.pxi":127 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/drepimpl.pxi":120 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * state.extent(datatype, file_extent) * except MPIException as exc: */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/drepimpl.pxi":128 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * # --- */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":112 * return ierr * * cdef int datarep_extent( # <<<<<<<<<<<<<< * MPI_Datatype datatype, * MPI_Aint *file_extent, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.datarep_extent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":133 * * @cython.callspec("MPIAPI") * cdef int datarep_read_fn( # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ static int MPIAPI __pyx_f_6mpi4py_3MPI_datarep_read_fn(void *__pyx_v_userbuf, MPI_Datatype __pyx_v_datatype, int __pyx_v_count, void *__pyx_v_filebuf, MPI_Offset __pyx_v_position, void *__pyx_v_extra_state) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/drepimpl.pxi":141 * void *extra_state * ) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/drepimpl.pxi":142 * ) nogil: * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":141 * void *extra_state * ) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/drepimpl.pxi":143 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return datarep_read(userbuf, datatype, count, */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/drepimpl.pxi":144 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * return datarep_read(userbuf, datatype, count, * filebuf, position, extra_state) */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":143 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return datarep_read(userbuf, datatype, count, */ } /* "mpi4py/MPI/drepimpl.pxi":145 * if not Py_IsInitialized(): * return MPI_ERR_INTERN * return datarep_read(userbuf, datatype, count, # <<<<<<<<<<<<<< * filebuf, position, extra_state) * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_datarep_read(__pyx_v_userbuf, __pyx_v_datatype, __pyx_v_count, __pyx_v_filebuf, __pyx_v_position, __pyx_v_extra_state); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(16, 145, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":133 * * @cython.callspec("MPIAPI") * cdef int datarep_read_fn( # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.datarep_read_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":149 * * @cython.callspec("MPIAPI") * cdef int datarep_write_fn( # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ static int MPIAPI __pyx_f_6mpi4py_3MPI_datarep_write_fn(void *__pyx_v_userbuf, MPI_Datatype __pyx_v_datatype, int __pyx_v_count, void *__pyx_v_filebuf, MPI_Offset __pyx_v_position, void *__pyx_v_extra_state) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/drepimpl.pxi":157 * void *extra_state * ) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/drepimpl.pxi":158 * ) nogil: * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":157 * void *extra_state * ) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/drepimpl.pxi":159 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return datarep_write(userbuf, datatype, count, */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/drepimpl.pxi":160 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * return datarep_write(userbuf, datatype, count, * filebuf, position, extra_state) */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":159 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return datarep_write(userbuf, datatype, count, */ } /* "mpi4py/MPI/drepimpl.pxi":161 * if not Py_IsInitialized(): * return MPI_ERR_INTERN * return datarep_write(userbuf, datatype, count, # <<<<<<<<<<<<<< * filebuf, position, extra_state) * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_datarep_write(__pyx_v_userbuf, __pyx_v_datatype, __pyx_v_count, __pyx_v_filebuf, __pyx_v_position, __pyx_v_extra_state); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(16, 161, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":149 * * @cython.callspec("MPIAPI") * cdef int datarep_write_fn( # <<<<<<<<<<<<<< * void *userbuf, * MPI_Datatype datatype, */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.datarep_write_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/drepimpl.pxi":165 * * @cython.callspec("MPIAPI") * cdef int datarep_extent_fn( # <<<<<<<<<<<<<< * MPI_Datatype datatype, * MPI_Aint *file_extent, */ static int MPIAPI __pyx_f_6mpi4py_3MPI_datarep_extent_fn(MPI_Datatype __pyx_v_datatype, MPI_Aint *__pyx_v_file_extent, void *__pyx_v_extra_state) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/drepimpl.pxi":170 * void *extra_state * ) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/drepimpl.pxi":171 * ) nogil: * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":170 * void *extra_state * ) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/drepimpl.pxi":172 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return datarep_extent(datatype, file_extent, extra_state) */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/drepimpl.pxi":173 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * return datarep_extent(datatype, file_extent, extra_state) * */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":172 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * return datarep_extent(datatype, file_extent, extra_state) */ } /* "mpi4py/MPI/drepimpl.pxi":174 * if not Py_IsInitialized(): * return MPI_ERR_INTERN * return datarep_extent(datatype, file_extent, extra_state) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_datarep_extent(__pyx_v_datatype, __pyx_v_file_extent, __pyx_v_extra_state); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(16, 174, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/drepimpl.pxi":165 * * @cython.callspec("MPIAPI") * cdef int datarep_extent_fn( # <<<<<<<<<<<<<< * MPI_Datatype datatype, * MPI_Aint *file_extent, */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.datarep_extent_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":292 * include "drepimpl.pxi" * * cdef inline File new_File(MPI_File ob): # <<<<<<<<<<<<<< * cdef File file = File.__new__(File) * file.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIFileObject *__pyx_f_6mpi4py_3MPI_new_File(MPI_File __pyx_v_ob) { struct PyMPIFileObject *__pyx_v_file = 0; struct PyMPIFileObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_File", 0); /* "mpi4py/MPI/helpers.pxi":293 * * cdef inline File new_File(MPI_File ob): * cdef File file = File.__new__(File) # <<<<<<<<<<<<<< * file.ob_mpi = ob * return file */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_File(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_File), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 293, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_file = ((struct PyMPIFileObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":294 * cdef inline File new_File(MPI_File ob): * cdef File file = File.__new__(File) * file.ob_mpi = ob # <<<<<<<<<<<<<< * return file * */ __pyx_v_file->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":295 * cdef File file = File.__new__(File) * file.ob_mpi = ob * return file # <<<<<<<<<<<<<< * * cdef inline int del_File(MPI_File* ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_file)); __pyx_r = __pyx_v_file; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":292 * include "drepimpl.pxi" * * cdef inline File new_File(MPI_File ob): # <<<<<<<<<<<<<< * cdef File file = File.__new__(File) * file.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_File", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_file); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":297 * return file * * cdef inline int del_File(MPI_File* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_FILE_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_File(MPI_File *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_File", 0); /* "mpi4py/MPI/helpers.pxi":298 * * cdef inline int del_File(MPI_File* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_FILE_NULL : return 0 * # */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":299 * cdef inline int del_File(MPI_File* ob): * if ob == NULL : return 0 * if ob[0] == MPI_FILE_NULL : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_FILE_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":301 * if ob[0] == MPI_FILE_NULL : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * return MPI_File_close(ob) * */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":302 * # * if not mpi_active(): return 0 * return MPI_File_close(ob) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = MPI_File_close(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":297 * return file * * cdef inline int del_File(MPI_File* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_FILE_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":307 * # Errhandler * * cdef inline Errhandler new_Errhandler(MPI_Errhandler ob): # <<<<<<<<<<<<<< * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * errhandler.ob_mpi = ob */ static CYTHON_INLINE struct PyMPIErrhandlerObject *__pyx_f_6mpi4py_3MPI_new_Errhandler(MPI_Errhandler __pyx_v_ob) { struct PyMPIErrhandlerObject *__pyx_v_errhandler = 0; struct PyMPIErrhandlerObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("new_Errhandler", 0); /* "mpi4py/MPI/helpers.pxi":308 * * cdef inline Errhandler new_Errhandler(MPI_Errhandler ob): * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) # <<<<<<<<<<<<<< * errhandler.ob_mpi = ob * return errhandler */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Errhandler(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Errhandler), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 308, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_errhandler = ((struct PyMPIErrhandlerObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/helpers.pxi":309 * cdef inline Errhandler new_Errhandler(MPI_Errhandler ob): * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * errhandler.ob_mpi = ob # <<<<<<<<<<<<<< * return errhandler * */ __pyx_v_errhandler->ob_mpi = __pyx_v_ob; /* "mpi4py/MPI/helpers.pxi":310 * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * errhandler.ob_mpi = ob * return errhandler # <<<<<<<<<<<<<< * * cdef inline int del_Errhandler(MPI_Errhandler* ob): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_errhandler)); __pyx_r = __pyx_v_errhandler; goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":307 * # Errhandler * * cdef inline Errhandler new_Errhandler(MPI_Errhandler ob): # <<<<<<<<<<<<<< * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * errhandler.ob_mpi = ob */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.new_Errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_errhandler); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/helpers.pxi":312 * return errhandler * * cdef inline int del_Errhandler(MPI_Errhandler* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_ERRHANDLER_NULL : return 0 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_del_Errhandler(MPI_Errhandler *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("del_Errhandler", 0); /* "mpi4py/MPI/helpers.pxi":313 * * cdef inline int del_Errhandler(MPI_Errhandler* ob): * if ob == NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_ERRHANDLER_NULL : return 0 * if ob[0] == MPI_ERRORS_RETURN : return 0 */ __pyx_t_1 = ((__pyx_v_ob == NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":314 * cdef inline int del_Errhandler(MPI_Errhandler* ob): * if ob == NULL : return 0 * if ob[0] == MPI_ERRHANDLER_NULL : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_ERRORS_RETURN : return 0 * if ob[0] == MPI_ERRORS_ARE_FATAL : return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_ERRHANDLER_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":315 * if ob == NULL : return 0 * if ob[0] == MPI_ERRHANDLER_NULL : return 0 * if ob[0] == MPI_ERRORS_RETURN : return 0 # <<<<<<<<<<<<<< * if ob[0] == MPI_ERRORS_ARE_FATAL : return 0 * # */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_ERRORS_RETURN) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":316 * if ob[0] == MPI_ERRHANDLER_NULL : return 0 * if ob[0] == MPI_ERRORS_RETURN : return 0 * if ob[0] == MPI_ERRORS_ARE_FATAL : return 0 # <<<<<<<<<<<<<< * # * if not mpi_active(): return 0 */ __pyx_t_1 = (((__pyx_v_ob[0]) == MPI_ERRORS_ARE_FATAL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":318 * if ob[0] == MPI_ERRORS_ARE_FATAL : return 0 * # * if not mpi_active(): return 0 # <<<<<<<<<<<<<< * return MPI_Errhandler_free(ob) * */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/helpers.pxi":319 * # * if not mpi_active(): return 0 * return MPI_Errhandler_free(ob) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = MPI_Errhandler_free(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/helpers.pxi":312 * return errhandler * * cdef inline int del_Errhandler(MPI_Errhandler* ob): # <<<<<<<<<<<<<< * if ob == NULL : return 0 * if ob[0] == MPI_ERRHANDLER_NULL : return 0 */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":9 * cdef public object delete_fn * cdef public bint nopython * def __cinit__(self, copy_fn, delete_fn, nopython): # <<<<<<<<<<<<<< * if copy_fn is False: copy_fn = None * if delete_fn is False: delete_fn = None */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_copy_fn = 0; PyObject *__pyx_v_delete_fn = 0; PyObject *__pyx_v_nopython = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_copy_fn,&__pyx_n_s_delete_fn,&__pyx_n_s_nopython,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_copy_fn)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delete_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(4, 9, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nopython)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(4, 9, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(4, 9, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_copy_fn = values[0]; __pyx_v_delete_fn = values[1]; __pyx_v_nopython = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(4, 9, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI._p_keyval.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_keyval___cinit__(((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_v_self), __pyx_v_copy_fn, __pyx_v_delete_fn, __pyx_v_nopython); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9_p_keyval___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self, PyObject *__pyx_v_copy_fn, PyObject *__pyx_v_delete_fn, PyObject *__pyx_v_nopython) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__cinit__", 0); __Pyx_INCREF(__pyx_v_copy_fn); __Pyx_INCREF(__pyx_v_delete_fn); /* "mpi4py/MPI/attrimpl.pxi":10 * cdef public bint nopython * def __cinit__(self, copy_fn, delete_fn, nopython): * if copy_fn is False: copy_fn = None # <<<<<<<<<<<<<< * if delete_fn is False: delete_fn = None * if delete_fn is True: delete_fn = None */ __pyx_t_1 = (__pyx_v_copy_fn == Py_False); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_copy_fn, Py_None); } /* "mpi4py/MPI/attrimpl.pxi":11 * def __cinit__(self, copy_fn, delete_fn, nopython): * if copy_fn is False: copy_fn = None * if delete_fn is False: delete_fn = None # <<<<<<<<<<<<<< * if delete_fn is True: delete_fn = None * self.copy_fn = copy_fn */ __pyx_t_2 = (__pyx_v_delete_fn == Py_False); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_delete_fn, Py_None); } /* "mpi4py/MPI/attrimpl.pxi":12 * if copy_fn is False: copy_fn = None * if delete_fn is False: delete_fn = None * if delete_fn is True: delete_fn = None # <<<<<<<<<<<<<< * self.copy_fn = copy_fn * self.delete_fn = delete_fn */ __pyx_t_1 = (__pyx_v_delete_fn == Py_True); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_delete_fn, Py_None); } /* "mpi4py/MPI/attrimpl.pxi":13 * if delete_fn is False: delete_fn = None * if delete_fn is True: delete_fn = None * self.copy_fn = copy_fn # <<<<<<<<<<<<<< * self.delete_fn = delete_fn * self.nopython = nopython */ __Pyx_INCREF(__pyx_v_copy_fn); __Pyx_GIVEREF(__pyx_v_copy_fn); __Pyx_GOTREF(__pyx_v_self->copy_fn); __Pyx_DECREF(__pyx_v_self->copy_fn); __pyx_v_self->copy_fn = __pyx_v_copy_fn; /* "mpi4py/MPI/attrimpl.pxi":14 * if delete_fn is True: delete_fn = None * self.copy_fn = copy_fn * self.delete_fn = delete_fn # <<<<<<<<<<<<<< * self.nopython = nopython * */ __Pyx_INCREF(__pyx_v_delete_fn); __Pyx_GIVEREF(__pyx_v_delete_fn); __Pyx_GOTREF(__pyx_v_self->delete_fn); __Pyx_DECREF(__pyx_v_self->delete_fn); __pyx_v_self->delete_fn = __pyx_v_delete_fn; /* "mpi4py/MPI/attrimpl.pxi":15 * self.copy_fn = copy_fn * self.delete_fn = delete_fn * self.nopython = nopython # <<<<<<<<<<<<<< * * cdef dict type_keyval = {} */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_nopython); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 15, __pyx_L1_error) __pyx_v_self->nopython = __pyx_t_2; /* "mpi4py/MPI/attrimpl.pxi":9 * cdef public object delete_fn * cdef public bint nopython * def __cinit__(self, copy_fn, delete_fn, nopython): # <<<<<<<<<<<<<< * if copy_fn is False: copy_fn = None * if delete_fn is False: delete_fn = None */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_keyval.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_copy_fn); __Pyx_XDECREF(__pyx_v_delete_fn); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":6 * @cython.internal * cdef class _p_keyval: * cdef public object copy_fn # <<<<<<<<<<<<<< * cdef public object delete_fn * cdef public bint nopython */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9_p_keyval_7copy_fn_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9_p_keyval_7copy_fn_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_keyval_7copy_fn___get__(((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9_p_keyval_7copy_fn___get__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->copy_fn); __pyx_r = __pyx_v_self->copy_fn; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_7copy_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_7copy_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_keyval_7copy_fn_2__set__(((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_7copy_fn_2__set__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->copy_fn); __Pyx_DECREF(__pyx_v_self->copy_fn); __pyx_v_self->copy_fn = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_7copy_fn_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_7copy_fn_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_keyval_7copy_fn_4__del__(((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_7copy_fn_4__del__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->copy_fn); __Pyx_DECREF(__pyx_v_self->copy_fn); __pyx_v_self->copy_fn = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":7 * cdef class _p_keyval: * cdef public object copy_fn * cdef public object delete_fn # <<<<<<<<<<<<<< * cdef public bint nopython * def __cinit__(self, copy_fn, delete_fn, nopython): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9_p_keyval_9delete_fn_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9_p_keyval_9delete_fn_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_keyval_9delete_fn___get__(((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9_p_keyval_9delete_fn___get__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->delete_fn); __pyx_r = __pyx_v_self->delete_fn; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_9delete_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_9delete_fn_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_keyval_9delete_fn_2__set__(((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_9delete_fn_2__set__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->delete_fn); __Pyx_DECREF(__pyx_v_self->delete_fn); __pyx_v_self->delete_fn = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_9delete_fn_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_9delete_fn_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_keyval_9delete_fn_4__del__(((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_9delete_fn_4__del__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->delete_fn); __Pyx_DECREF(__pyx_v_self->delete_fn); __pyx_v_self->delete_fn = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":8 * cdef public object copy_fn * cdef public object delete_fn * cdef public bint nopython # <<<<<<<<<<<<<< * def __cinit__(self, copy_fn, delete_fn, nopython): * if copy_fn is False: copy_fn = None */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9_p_keyval_8nopython_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9_p_keyval_8nopython_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_keyval_8nopython___get__(((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9_p_keyval_8nopython___get__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->nopython); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_keyval.nopython.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_8nopython_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9_p_keyval_8nopython_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_keyval_8nopython_2__set__(((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9_p_keyval_8nopython_2__set__(struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 8, __pyx_L1_error) __pyx_v_self->nopython = __pyx_t_1; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_keyval.nopython.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":34 * MPI_Win * * cdef inline object PyMPI_attr_call( # <<<<<<<<<<<<<< * object function, * PyMPI_attr_type hdl, */ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(PyObject *__pyx_v_function, MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval, PyObject *__pyx_v_attrval) { PyObject *__pyx_v_ob = 0; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; char const *__pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_0PyMPI_attr_call", 0); /* "mpi4py/MPI/attrimpl.pxi":42 * cdef object result * if PyMPI_attr_type is MPI_Datatype: * ob = new_Datatype(hdl) # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Comm: * ob = new_Comm(hdl) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(__pyx_v_hdl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ob = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":47 * if PyMPI_attr_type is MPI_Win: * ob = new_Win (hdl) * try: # <<<<<<<<<<<<<< * result = function(ob, keyval, attrval) * finally: */ /*try:*/ { /* "mpi4py/MPI/attrimpl.pxi":48 * ob = new_Win (hdl) * try: * result = function(ob, keyval, attrval) # <<<<<<<<<<<<<< * finally: * if PyMPI_attr_type is MPI_Datatype: */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_function); __pyx_t_3 = __pyx_v_function; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_ob, __pyx_t_2, __pyx_v_attrval}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_ob, __pyx_t_2, __pyx_v_attrval}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_ob); __Pyx_GIVEREF(__pyx_v_ob); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_ob); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_v_attrval); __Pyx_GIVEREF(__pyx_v_attrval); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_attrval); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; } /* "mpi4py/MPI/attrimpl.pxi":50 * result = function(ob, keyval, attrval) * finally: * if PyMPI_attr_type is MPI_Datatype: # <<<<<<<<<<<<<< * (ob).ob_mpi = MPI_DATATYPE_NULL * if PyMPI_attr_type is MPI_Comm: */ /*finally:*/ { /*normal exit:*/{ /* "mpi4py/MPI/attrimpl.pxi":51 * finally: * if PyMPI_attr_type is MPI_Datatype: * (ob).ob_mpi = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Comm: * (ob).ob_mpi = MPI_COMM_NULL */ ((struct PyMPIDatatypeObject *)__pyx_v_ob)->ob_mpi = MPI_DATATYPE_NULL; /* "mpi4py/MPI/attrimpl.pxi":54 * if PyMPI_attr_type is MPI_Comm: * (ob).ob_mpi = MPI_COMM_NULL * if PyMPI_attr_type is MPI_Win: # <<<<<<<<<<<<<< * (ob).ob_mpi = MPI_WIN_NULL * return result */ goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __pyx_t_5 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; { /* "mpi4py/MPI/attrimpl.pxi":51 * finally: * if PyMPI_attr_type is MPI_Datatype: * (ob).ob_mpi = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Comm: * (ob).ob_mpi = MPI_COMM_NULL */ ((struct PyMPIDatatypeObject *)__pyx_v_ob)->ob_mpi = MPI_DATATYPE_NULL; /* "mpi4py/MPI/attrimpl.pxi":54 * if PyMPI_attr_type is MPI_Comm: * (ob).ob_mpi = MPI_COMM_NULL * if PyMPI_attr_type is MPI_Win: # <<<<<<<<<<<<<< * (ob).ob_mpi = MPI_WIN_NULL * return result */ } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/attrimpl.pxi":56 * if PyMPI_attr_type is MPI_Win: * (ob).ob_mpi = MPI_WIN_NULL * return result # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_copy( */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":34 * MPI_Win * * cdef inline object PyMPI_attr_call( # <<<<<<<<<<<<<< * object function, * PyMPI_attr_type hdl, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(PyObject *__pyx_v_function, MPI_Comm __pyx_v_hdl, int __pyx_v_keyval, PyObject *__pyx_v_attrval) { PyObject *__pyx_v_ob = 0; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; char const *__pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_1PyMPI_attr_call", 0); /* "mpi4py/MPI/attrimpl.pxi":44 * ob = new_Datatype(hdl) * if PyMPI_attr_type is MPI_Comm: * ob = new_Comm(hdl) # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Win: * ob = new_Win (hdl) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Comm(__pyx_v_hdl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ob = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":47 * if PyMPI_attr_type is MPI_Win: * ob = new_Win (hdl) * try: # <<<<<<<<<<<<<< * result = function(ob, keyval, attrval) * finally: */ /*try:*/ { /* "mpi4py/MPI/attrimpl.pxi":48 * ob = new_Win (hdl) * try: * result = function(ob, keyval, attrval) # <<<<<<<<<<<<<< * finally: * if PyMPI_attr_type is MPI_Datatype: */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_function); __pyx_t_3 = __pyx_v_function; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_ob, __pyx_t_2, __pyx_v_attrval}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_ob, __pyx_t_2, __pyx_v_attrval}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_ob); __Pyx_GIVEREF(__pyx_v_ob); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_ob); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_v_attrval); __Pyx_GIVEREF(__pyx_v_attrval); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_attrval); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; } /* "mpi4py/MPI/attrimpl.pxi":50 * result = function(ob, keyval, attrval) * finally: * if PyMPI_attr_type is MPI_Datatype: # <<<<<<<<<<<<<< * (ob).ob_mpi = MPI_DATATYPE_NULL * if PyMPI_attr_type is MPI_Comm: */ /*finally:*/ { /*normal exit:*/{ /* "mpi4py/MPI/attrimpl.pxi":53 * (ob).ob_mpi = MPI_DATATYPE_NULL * if PyMPI_attr_type is MPI_Comm: * (ob).ob_mpi = MPI_COMM_NULL # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Win: * (ob).ob_mpi = MPI_WIN_NULL */ ((struct PyMPICommObject *)__pyx_v_ob)->ob_mpi = MPI_COMM_NULL; /* "mpi4py/MPI/attrimpl.pxi":54 * if PyMPI_attr_type is MPI_Comm: * (ob).ob_mpi = MPI_COMM_NULL * if PyMPI_attr_type is MPI_Win: # <<<<<<<<<<<<<< * (ob).ob_mpi = MPI_WIN_NULL * return result */ goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __pyx_t_5 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; { /* "mpi4py/MPI/attrimpl.pxi":53 * (ob).ob_mpi = MPI_DATATYPE_NULL * if PyMPI_attr_type is MPI_Comm: * (ob).ob_mpi = MPI_COMM_NULL # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Win: * (ob).ob_mpi = MPI_WIN_NULL */ ((struct PyMPICommObject *)__pyx_v_ob)->ob_mpi = MPI_COMM_NULL; /* "mpi4py/MPI/attrimpl.pxi":54 * if PyMPI_attr_type is MPI_Comm: * (ob).ob_mpi = MPI_COMM_NULL * if PyMPI_attr_type is MPI_Win: # <<<<<<<<<<<<<< * (ob).ob_mpi = MPI_WIN_NULL * return result */ } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/attrimpl.pxi":56 * if PyMPI_attr_type is MPI_Win: * (ob).ob_mpi = MPI_WIN_NULL * return result # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_copy( */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":34 * MPI_Win * * cdef inline object PyMPI_attr_call( # <<<<<<<<<<<<<< * object function, * PyMPI_attr_type hdl, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE PyObject *__pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(PyObject *__pyx_v_function, MPI_Win __pyx_v_hdl, int __pyx_v_keyval, PyObject *__pyx_v_attrval) { PyObject *__pyx_v_ob = 0; PyObject *__pyx_v_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; char const *__pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_2PyMPI_attr_call", 0); /* "mpi4py/MPI/attrimpl.pxi":46 * ob = new_Comm(hdl) * if PyMPI_attr_type is MPI_Win: * ob = new_Win (hdl) # <<<<<<<<<<<<<< * try: * result = function(ob, keyval, attrval) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Win(__pyx_v_hdl)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ob = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":47 * if PyMPI_attr_type is MPI_Win: * ob = new_Win (hdl) * try: # <<<<<<<<<<<<<< * result = function(ob, keyval, attrval) * finally: */ /*try:*/ { /* "mpi4py/MPI/attrimpl.pxi":48 * ob = new_Win (hdl) * try: * result = function(ob, keyval, attrval) # <<<<<<<<<<<<<< * finally: * if PyMPI_attr_type is MPI_Datatype: */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_function); __pyx_t_3 = __pyx_v_function; __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_ob, __pyx_t_2, __pyx_v_attrval}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_ob, __pyx_t_2, __pyx_v_attrval}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_ob); __Pyx_GIVEREF(__pyx_v_ob); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_ob); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_v_attrval); __Pyx_GIVEREF(__pyx_v_attrval); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_attrval); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 48, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; } /* "mpi4py/MPI/attrimpl.pxi":50 * result = function(ob, keyval, attrval) * finally: * if PyMPI_attr_type is MPI_Datatype: # <<<<<<<<<<<<<< * (ob).ob_mpi = MPI_DATATYPE_NULL * if PyMPI_attr_type is MPI_Comm: */ /*finally:*/ { /*normal exit:*/{ /* "mpi4py/MPI/attrimpl.pxi":55 * (ob).ob_mpi = MPI_COMM_NULL * if PyMPI_attr_type is MPI_Win: * (ob).ob_mpi = MPI_WIN_NULL # <<<<<<<<<<<<<< * return result * */ ((struct PyMPIWinObject *)__pyx_v_ob)->ob_mpi = MPI_WIN_NULL; goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __pyx_t_5 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; { /* "mpi4py/MPI/attrimpl.pxi":52 * if PyMPI_attr_type is MPI_Datatype: * (ob).ob_mpi = MPI_DATATYPE_NULL * if PyMPI_attr_type is MPI_Comm: # <<<<<<<<<<<<<< * (ob).ob_mpi = MPI_COMM_NULL * if PyMPI_attr_type is MPI_Win: */ ((struct PyMPIWinObject *)__pyx_v_ob)->ob_mpi = MPI_WIN_NULL; } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/attrimpl.pxi":56 * if PyMPI_attr_type is MPI_Win: * (ob).ob_mpi = MPI_WIN_NULL * return result # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_copy( */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":34 * MPI_Win * * cdef inline object PyMPI_attr_call( # <<<<<<<<<<<<<< * object function, * PyMPI_attr_type hdl, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ob); __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":58 * return result * * cdef inline int PyMPI_attr_copy( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy(MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_extra_state, void *__pyx_v_attrval_in, void *__pyx_v_attrval_out, int *__pyx_v_flag) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; int __pyx_v_p; PyObject *__pyx_v_attrval = 0; void **__pyx_v_outval; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_0PyMPI_attr_copy", 0); /* "mpi4py/MPI/attrimpl.pxi":65 * void *attrval_out, * int *flag) except -1: * if flag != NULL: flag[0] = 0 # <<<<<<<<<<<<<< * cdef _p_keyval state = <_p_keyval>extra_state * if state.copy_fn is None: return 0 */ __pyx_t_1 = ((__pyx_v_flag != NULL) != 0); if (__pyx_t_1) { (__pyx_v_flag[0]) = 0; } /* "mpi4py/MPI/attrimpl.pxi":66 * int *flag) except -1: * if flag != NULL: flag[0] = 0 * cdef _p_keyval state = <_p_keyval>extra_state # <<<<<<<<<<<<<< * if state.copy_fn is None: return 0 * cdef int p = not state.nopython */ __pyx_t_2 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_2); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/attrimpl.pxi":67 * if flag != NULL: flag[0] = 0 * cdef _p_keyval state = <_p_keyval>extra_state * if state.copy_fn is None: return 0 # <<<<<<<<<<<<<< * cdef int p = not state.nopython * if p: assert attrval_in != NULL */ __pyx_t_1 = (__pyx_v_state->copy_fn == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/attrimpl.pxi":68 * cdef _p_keyval state = <_p_keyval>extra_state * if state.copy_fn is None: return 0 * cdef int p = not state.nopython # <<<<<<<<<<<<<< * if p: assert attrval_in != NULL * cdef object attrval */ __pyx_v_p = (!(__pyx_v_state->nopython != 0)); /* "mpi4py/MPI/attrimpl.pxi":69 * if state.copy_fn is None: return 0 * cdef int p = not state.nopython * if p: assert attrval_in != NULL # <<<<<<<<<<<<<< * cdef object attrval * if p: attrval = attrval_in */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_attrval_in != NULL) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(4, 69, __pyx_L1_error) } } #endif } /* "mpi4py/MPI/attrimpl.pxi":71 * if p: assert attrval_in != NULL * cdef object attrval * if p: attrval = attrval_in # <<<<<<<<<<<<<< * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { __pyx_t_2 = ((PyObject *)__pyx_v_attrval_in); __Pyx_INCREF(__pyx_t_2); __pyx_v_attrval = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L6; } /* "mpi4py/MPI/attrimpl.pxi":72 * cdef object attrval * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) # <<<<<<<<<<<<<< * if state.copy_fn is not True: * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) */ /*else*/ { __pyx_t_2 = PyLong_FromVoidPtr(__pyx_v_attrval_in); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_attrval = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L6:; /* "mpi4py/MPI/attrimpl.pxi":73 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: # <<<<<<<<<<<<<< * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 */ __pyx_t_3 = (__pyx_v_state->copy_fn != Py_True); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":74 * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) # <<<<<<<<<<<<<< * if attrval is NotImplemented: return 0 * cdef void **outval = attrval_out */ __pyx_t_2 = __pyx_v_state->copy_fn; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(__pyx_t_2, __pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_attrval, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/attrimpl.pxi":75 * if state.copy_fn is not True: * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 # <<<<<<<<<<<<<< * cdef void **outval = attrval_out * if p: outval[0] = attrval */ __pyx_t_1 = (__pyx_v_attrval == __pyx_builtin_NotImplemented); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/attrimpl.pxi":73 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: # <<<<<<<<<<<<<< * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 */ } /* "mpi4py/MPI/attrimpl.pxi":76 * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 * cdef void **outval = attrval_out # <<<<<<<<<<<<<< * if p: outval[0] = attrval * else: outval[0] = PyLong_AsVoidPtr(attrval) */ __pyx_v_outval = ((void **)__pyx_v_attrval_out); /* "mpi4py/MPI/attrimpl.pxi":77 * if attrval is NotImplemented: return 0 * cdef void **outval = attrval_out * if p: outval[0] = attrval # <<<<<<<<<<<<<< * else: outval[0] = PyLong_AsVoidPtr(attrval) * if flag != NULL: flag[0] = 1 */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { (__pyx_v_outval[0]) = ((void *)__pyx_v_attrval); goto __pyx_L9; } /* "mpi4py/MPI/attrimpl.pxi":78 * cdef void **outval = attrval_out * if p: outval[0] = attrval * else: outval[0] = PyLong_AsVoidPtr(attrval) # <<<<<<<<<<<<<< * if flag != NULL: flag[0] = 1 * if p: Py_INCREF(attrval) */ /*else*/ { (__pyx_v_outval[0]) = PyLong_AsVoidPtr(__pyx_v_attrval); } __pyx_L9:; /* "mpi4py/MPI/attrimpl.pxi":79 * if p: outval[0] = attrval * else: outval[0] = PyLong_AsVoidPtr(attrval) * if flag != NULL: flag[0] = 1 # <<<<<<<<<<<<<< * if p: Py_INCREF(attrval) * Py_INCREF(state) */ __pyx_t_3 = ((__pyx_v_flag != NULL) != 0); if (__pyx_t_3) { (__pyx_v_flag[0]) = 1; } /* "mpi4py/MPI/attrimpl.pxi":80 * else: outval[0] = PyLong_AsVoidPtr(attrval) * if flag != NULL: flag[0] = 1 * if p: Py_INCREF(attrval) # <<<<<<<<<<<<<< * Py_INCREF(state) * return 0 */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { Py_INCREF(__pyx_v_attrval); } /* "mpi4py/MPI/attrimpl.pxi":81 * if flag != NULL: flag[0] = 1 * if p: Py_INCREF(attrval) * Py_INCREF(state) # <<<<<<<<<<<<<< * return 0 * */ Py_INCREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/attrimpl.pxi":82 * if p: Py_INCREF(attrval) * Py_INCREF(state) * return 0 # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_delete( */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":58 * return result * * cdef inline int PyMPI_attr_copy( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_attrval); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy(MPI_Comm __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_extra_state, void *__pyx_v_attrval_in, void *__pyx_v_attrval_out, int *__pyx_v_flag) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; int __pyx_v_p; PyObject *__pyx_v_attrval = 0; void **__pyx_v_outval; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_1PyMPI_attr_copy", 0); /* "mpi4py/MPI/attrimpl.pxi":65 * void *attrval_out, * int *flag) except -1: * if flag != NULL: flag[0] = 0 # <<<<<<<<<<<<<< * cdef _p_keyval state = <_p_keyval>extra_state * if state.copy_fn is None: return 0 */ __pyx_t_1 = ((__pyx_v_flag != NULL) != 0); if (__pyx_t_1) { (__pyx_v_flag[0]) = 0; } /* "mpi4py/MPI/attrimpl.pxi":66 * int *flag) except -1: * if flag != NULL: flag[0] = 0 * cdef _p_keyval state = <_p_keyval>extra_state # <<<<<<<<<<<<<< * if state.copy_fn is None: return 0 * cdef int p = not state.nopython */ __pyx_t_2 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_2); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/attrimpl.pxi":67 * if flag != NULL: flag[0] = 0 * cdef _p_keyval state = <_p_keyval>extra_state * if state.copy_fn is None: return 0 # <<<<<<<<<<<<<< * cdef int p = not state.nopython * if p: assert attrval_in != NULL */ __pyx_t_1 = (__pyx_v_state->copy_fn == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/attrimpl.pxi":68 * cdef _p_keyval state = <_p_keyval>extra_state * if state.copy_fn is None: return 0 * cdef int p = not state.nopython # <<<<<<<<<<<<<< * if p: assert attrval_in != NULL * cdef object attrval */ __pyx_v_p = (!(__pyx_v_state->nopython != 0)); /* "mpi4py/MPI/attrimpl.pxi":69 * if state.copy_fn is None: return 0 * cdef int p = not state.nopython * if p: assert attrval_in != NULL # <<<<<<<<<<<<<< * cdef object attrval * if p: attrval = attrval_in */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_attrval_in != NULL) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(4, 69, __pyx_L1_error) } } #endif } /* "mpi4py/MPI/attrimpl.pxi":71 * if p: assert attrval_in != NULL * cdef object attrval * if p: attrval = attrval_in # <<<<<<<<<<<<<< * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { __pyx_t_2 = ((PyObject *)__pyx_v_attrval_in); __Pyx_INCREF(__pyx_t_2); __pyx_v_attrval = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L6; } /* "mpi4py/MPI/attrimpl.pxi":72 * cdef object attrval * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) # <<<<<<<<<<<<<< * if state.copy_fn is not True: * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) */ /*else*/ { __pyx_t_2 = PyLong_FromVoidPtr(__pyx_v_attrval_in); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_attrval = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L6:; /* "mpi4py/MPI/attrimpl.pxi":73 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: # <<<<<<<<<<<<<< * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 */ __pyx_t_3 = (__pyx_v_state->copy_fn != Py_True); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":74 * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) # <<<<<<<<<<<<<< * if attrval is NotImplemented: return 0 * cdef void **outval = attrval_out */ __pyx_t_2 = __pyx_v_state->copy_fn; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(__pyx_t_2, __pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_attrval, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/attrimpl.pxi":75 * if state.copy_fn is not True: * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 # <<<<<<<<<<<<<< * cdef void **outval = attrval_out * if p: outval[0] = attrval */ __pyx_t_1 = (__pyx_v_attrval == __pyx_builtin_NotImplemented); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/attrimpl.pxi":73 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: # <<<<<<<<<<<<<< * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 */ } /* "mpi4py/MPI/attrimpl.pxi":76 * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 * cdef void **outval = attrval_out # <<<<<<<<<<<<<< * if p: outval[0] = attrval * else: outval[0] = PyLong_AsVoidPtr(attrval) */ __pyx_v_outval = ((void **)__pyx_v_attrval_out); /* "mpi4py/MPI/attrimpl.pxi":77 * if attrval is NotImplemented: return 0 * cdef void **outval = attrval_out * if p: outval[0] = attrval # <<<<<<<<<<<<<< * else: outval[0] = PyLong_AsVoidPtr(attrval) * if flag != NULL: flag[0] = 1 */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { (__pyx_v_outval[0]) = ((void *)__pyx_v_attrval); goto __pyx_L9; } /* "mpi4py/MPI/attrimpl.pxi":78 * cdef void **outval = attrval_out * if p: outval[0] = attrval * else: outval[0] = PyLong_AsVoidPtr(attrval) # <<<<<<<<<<<<<< * if flag != NULL: flag[0] = 1 * if p: Py_INCREF(attrval) */ /*else*/ { (__pyx_v_outval[0]) = PyLong_AsVoidPtr(__pyx_v_attrval); } __pyx_L9:; /* "mpi4py/MPI/attrimpl.pxi":79 * if p: outval[0] = attrval * else: outval[0] = PyLong_AsVoidPtr(attrval) * if flag != NULL: flag[0] = 1 # <<<<<<<<<<<<<< * if p: Py_INCREF(attrval) * Py_INCREF(state) */ __pyx_t_3 = ((__pyx_v_flag != NULL) != 0); if (__pyx_t_3) { (__pyx_v_flag[0]) = 1; } /* "mpi4py/MPI/attrimpl.pxi":80 * else: outval[0] = PyLong_AsVoidPtr(attrval) * if flag != NULL: flag[0] = 1 * if p: Py_INCREF(attrval) # <<<<<<<<<<<<<< * Py_INCREF(state) * return 0 */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { Py_INCREF(__pyx_v_attrval); } /* "mpi4py/MPI/attrimpl.pxi":81 * if flag != NULL: flag[0] = 1 * if p: Py_INCREF(attrval) * Py_INCREF(state) # <<<<<<<<<<<<<< * return 0 * */ Py_INCREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/attrimpl.pxi":82 * if p: Py_INCREF(attrval) * Py_INCREF(state) * return 0 # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_delete( */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":58 * return result * * cdef inline int PyMPI_attr_copy( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_attrval); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy(MPI_Win __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_extra_state, void *__pyx_v_attrval_in, void *__pyx_v_attrval_out, int *__pyx_v_flag) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; int __pyx_v_p; PyObject *__pyx_v_attrval = 0; void **__pyx_v_outval; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_2PyMPI_attr_copy", 0); /* "mpi4py/MPI/attrimpl.pxi":65 * void *attrval_out, * int *flag) except -1: * if flag != NULL: flag[0] = 0 # <<<<<<<<<<<<<< * cdef _p_keyval state = <_p_keyval>extra_state * if state.copy_fn is None: return 0 */ __pyx_t_1 = ((__pyx_v_flag != NULL) != 0); if (__pyx_t_1) { (__pyx_v_flag[0]) = 0; } /* "mpi4py/MPI/attrimpl.pxi":66 * int *flag) except -1: * if flag != NULL: flag[0] = 0 * cdef _p_keyval state = <_p_keyval>extra_state # <<<<<<<<<<<<<< * if state.copy_fn is None: return 0 * cdef int p = not state.nopython */ __pyx_t_2 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_2); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/attrimpl.pxi":67 * if flag != NULL: flag[0] = 0 * cdef _p_keyval state = <_p_keyval>extra_state * if state.copy_fn is None: return 0 # <<<<<<<<<<<<<< * cdef int p = not state.nopython * if p: assert attrval_in != NULL */ __pyx_t_1 = (__pyx_v_state->copy_fn == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/attrimpl.pxi":68 * cdef _p_keyval state = <_p_keyval>extra_state * if state.copy_fn is None: return 0 * cdef int p = not state.nopython # <<<<<<<<<<<<<< * if p: assert attrval_in != NULL * cdef object attrval */ __pyx_v_p = (!(__pyx_v_state->nopython != 0)); /* "mpi4py/MPI/attrimpl.pxi":69 * if state.copy_fn is None: return 0 * cdef int p = not state.nopython * if p: assert attrval_in != NULL # <<<<<<<<<<<<<< * cdef object attrval * if p: attrval = attrval_in */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_attrval_in != NULL) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(4, 69, __pyx_L1_error) } } #endif } /* "mpi4py/MPI/attrimpl.pxi":71 * if p: assert attrval_in != NULL * cdef object attrval * if p: attrval = attrval_in # <<<<<<<<<<<<<< * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { __pyx_t_2 = ((PyObject *)__pyx_v_attrval_in); __Pyx_INCREF(__pyx_t_2); __pyx_v_attrval = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L6; } /* "mpi4py/MPI/attrimpl.pxi":72 * cdef object attrval * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) # <<<<<<<<<<<<<< * if state.copy_fn is not True: * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) */ /*else*/ { __pyx_t_2 = PyLong_FromVoidPtr(__pyx_v_attrval_in); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_attrval = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L6:; /* "mpi4py/MPI/attrimpl.pxi":73 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: # <<<<<<<<<<<<<< * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 */ __pyx_t_3 = (__pyx_v_state->copy_fn != Py_True); __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":74 * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) # <<<<<<<<<<<<<< * if attrval is NotImplemented: return 0 * cdef void **outval = attrval_out */ __pyx_t_2 = __pyx_v_state->copy_fn; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(__pyx_t_2, __pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_attrval, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/attrimpl.pxi":75 * if state.copy_fn is not True: * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 # <<<<<<<<<<<<<< * cdef void **outval = attrval_out * if p: outval[0] = attrval */ __pyx_t_1 = (__pyx_v_attrval == __pyx_builtin_NotImplemented); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/attrimpl.pxi":73 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.copy_fn is not True: # <<<<<<<<<<<<<< * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 */ } /* "mpi4py/MPI/attrimpl.pxi":76 * attrval = PyMPI_attr_call(state.copy_fn, hdl, keyval, attrval) * if attrval is NotImplemented: return 0 * cdef void **outval = attrval_out # <<<<<<<<<<<<<< * if p: outval[0] = attrval * else: outval[0] = PyLong_AsVoidPtr(attrval) */ __pyx_v_outval = ((void **)__pyx_v_attrval_out); /* "mpi4py/MPI/attrimpl.pxi":77 * if attrval is NotImplemented: return 0 * cdef void **outval = attrval_out * if p: outval[0] = attrval # <<<<<<<<<<<<<< * else: outval[0] = PyLong_AsVoidPtr(attrval) * if flag != NULL: flag[0] = 1 */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { (__pyx_v_outval[0]) = ((void *)__pyx_v_attrval); goto __pyx_L9; } /* "mpi4py/MPI/attrimpl.pxi":78 * cdef void **outval = attrval_out * if p: outval[0] = attrval * else: outval[0] = PyLong_AsVoidPtr(attrval) # <<<<<<<<<<<<<< * if flag != NULL: flag[0] = 1 * if p: Py_INCREF(attrval) */ /*else*/ { (__pyx_v_outval[0]) = PyLong_AsVoidPtr(__pyx_v_attrval); } __pyx_L9:; /* "mpi4py/MPI/attrimpl.pxi":79 * if p: outval[0] = attrval * else: outval[0] = PyLong_AsVoidPtr(attrval) * if flag != NULL: flag[0] = 1 # <<<<<<<<<<<<<< * if p: Py_INCREF(attrval) * Py_INCREF(state) */ __pyx_t_3 = ((__pyx_v_flag != NULL) != 0); if (__pyx_t_3) { (__pyx_v_flag[0]) = 1; } /* "mpi4py/MPI/attrimpl.pxi":80 * else: outval[0] = PyLong_AsVoidPtr(attrval) * if flag != NULL: flag[0] = 1 * if p: Py_INCREF(attrval) # <<<<<<<<<<<<<< * Py_INCREF(state) * return 0 */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { Py_INCREF(__pyx_v_attrval); } /* "mpi4py/MPI/attrimpl.pxi":81 * if flag != NULL: flag[0] = 1 * if p: Py_INCREF(attrval) * Py_INCREF(state) # <<<<<<<<<<<<<< * return 0 * */ Py_INCREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/attrimpl.pxi":82 * if p: Py_INCREF(attrval) * Py_INCREF(state) * return 0 # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_delete( */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":58 * return result * * cdef inline int PyMPI_attr_copy( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_attrval); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":84 * return 0 * * cdef inline int PyMPI_attr_delete( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete(MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval_in, void *__pyx_v_extra_state) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; int __pyx_v_p; PyObject *__pyx_v_attrval = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_0PyMPI_attr_delete", 0); /* "mpi4py/MPI/attrimpl.pxi":89 * void *attrval_in, * void *extra_state) except -1: * cdef _p_keyval state = <_p_keyval>extra_state # <<<<<<<<<<<<<< * cdef int p = not state.nopython * if p: assert attrval_in != NULL */ __pyx_t_1 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":90 * void *extra_state) except -1: * cdef _p_keyval state = <_p_keyval>extra_state * cdef int p = not state.nopython # <<<<<<<<<<<<<< * if p: assert attrval_in != NULL * cdef object attrval */ __pyx_v_p = (!(__pyx_v_state->nopython != 0)); /* "mpi4py/MPI/attrimpl.pxi":91 * cdef _p_keyval state = <_p_keyval>extra_state * cdef int p = not state.nopython * if p: assert attrval_in != NULL # <<<<<<<<<<<<<< * cdef object attrval * if p: attrval = attrval_in */ __pyx_t_2 = (__pyx_v_p != 0); if (__pyx_t_2) { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_attrval_in != NULL) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(4, 91, __pyx_L1_error) } } #endif } /* "mpi4py/MPI/attrimpl.pxi":93 * if p: assert attrval_in != NULL * cdef object attrval * if p: attrval = attrval_in # <<<<<<<<<<<<<< * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: */ __pyx_t_2 = (__pyx_v_p != 0); if (__pyx_t_2) { __pyx_t_1 = ((PyObject *)__pyx_v_attrval_in); __Pyx_INCREF(__pyx_t_1); __pyx_v_attrval = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L4; } /* "mpi4py/MPI/attrimpl.pxi":94 * cdef object attrval * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) # <<<<<<<<<<<<<< * if state.delete_fn is not None: * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) */ /*else*/ { __pyx_t_1 = PyLong_FromVoidPtr(__pyx_v_attrval_in); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attrval = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L4:; /* "mpi4py/MPI/attrimpl.pxi":95 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: # <<<<<<<<<<<<<< * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) */ __pyx_t_2 = (__pyx_v_state->delete_fn != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/attrimpl.pxi":96 * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) # <<<<<<<<<<<<<< * if p: Py_DECREF(attrval) * Py_DECREF(state) */ __pyx_t_1 = __pyx_v_state->delete_fn; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(__pyx_t_1, __pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/attrimpl.pxi":95 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: # <<<<<<<<<<<<<< * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) */ } /* "mpi4py/MPI/attrimpl.pxi":97 * if state.delete_fn is not None: * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) # <<<<<<<<<<<<<< * Py_DECREF(state) * return 0 */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { Py_DECREF(__pyx_v_attrval); } /* "mpi4py/MPI/attrimpl.pxi":98 * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) * Py_DECREF(state) # <<<<<<<<<<<<<< * return 0 * */ Py_DECREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/attrimpl.pxi":99 * if p: Py_DECREF(attrval) * Py_DECREF(state) * return 0 # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_copy_cb( */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":84 * return 0 * * cdef inline int PyMPI_attr_delete( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_delete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_attrval); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete(MPI_Comm __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval_in, void *__pyx_v_extra_state) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; int __pyx_v_p; PyObject *__pyx_v_attrval = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_1PyMPI_attr_delete", 0); /* "mpi4py/MPI/attrimpl.pxi":89 * void *attrval_in, * void *extra_state) except -1: * cdef _p_keyval state = <_p_keyval>extra_state # <<<<<<<<<<<<<< * cdef int p = not state.nopython * if p: assert attrval_in != NULL */ __pyx_t_1 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":90 * void *extra_state) except -1: * cdef _p_keyval state = <_p_keyval>extra_state * cdef int p = not state.nopython # <<<<<<<<<<<<<< * if p: assert attrval_in != NULL * cdef object attrval */ __pyx_v_p = (!(__pyx_v_state->nopython != 0)); /* "mpi4py/MPI/attrimpl.pxi":91 * cdef _p_keyval state = <_p_keyval>extra_state * cdef int p = not state.nopython * if p: assert attrval_in != NULL # <<<<<<<<<<<<<< * cdef object attrval * if p: attrval = attrval_in */ __pyx_t_2 = (__pyx_v_p != 0); if (__pyx_t_2) { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_attrval_in != NULL) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(4, 91, __pyx_L1_error) } } #endif } /* "mpi4py/MPI/attrimpl.pxi":93 * if p: assert attrval_in != NULL * cdef object attrval * if p: attrval = attrval_in # <<<<<<<<<<<<<< * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: */ __pyx_t_2 = (__pyx_v_p != 0); if (__pyx_t_2) { __pyx_t_1 = ((PyObject *)__pyx_v_attrval_in); __Pyx_INCREF(__pyx_t_1); __pyx_v_attrval = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L4; } /* "mpi4py/MPI/attrimpl.pxi":94 * cdef object attrval * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) # <<<<<<<<<<<<<< * if state.delete_fn is not None: * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) */ /*else*/ { __pyx_t_1 = PyLong_FromVoidPtr(__pyx_v_attrval_in); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attrval = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L4:; /* "mpi4py/MPI/attrimpl.pxi":95 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: # <<<<<<<<<<<<<< * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) */ __pyx_t_2 = (__pyx_v_state->delete_fn != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/attrimpl.pxi":96 * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) # <<<<<<<<<<<<<< * if p: Py_DECREF(attrval) * Py_DECREF(state) */ __pyx_t_1 = __pyx_v_state->delete_fn; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(__pyx_t_1, __pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/attrimpl.pxi":95 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: # <<<<<<<<<<<<<< * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) */ } /* "mpi4py/MPI/attrimpl.pxi":97 * if state.delete_fn is not None: * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) # <<<<<<<<<<<<<< * Py_DECREF(state) * return 0 */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { Py_DECREF(__pyx_v_attrval); } /* "mpi4py/MPI/attrimpl.pxi":98 * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) * Py_DECREF(state) # <<<<<<<<<<<<<< * return 0 * */ Py_DECREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/attrimpl.pxi":99 * if p: Py_DECREF(attrval) * Py_DECREF(state) * return 0 # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_copy_cb( */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":84 * return 0 * * cdef inline int PyMPI_attr_delete( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_delete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_attrval); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete(MPI_Win __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval_in, void *__pyx_v_extra_state) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; int __pyx_v_p; PyObject *__pyx_v_attrval = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_2PyMPI_attr_delete", 0); /* "mpi4py/MPI/attrimpl.pxi":89 * void *attrval_in, * void *extra_state) except -1: * cdef _p_keyval state = <_p_keyval>extra_state # <<<<<<<<<<<<<< * cdef int p = not state.nopython * if p: assert attrval_in != NULL */ __pyx_t_1 = ((PyObject *)__pyx_v_extra_state); __Pyx_INCREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":90 * void *extra_state) except -1: * cdef _p_keyval state = <_p_keyval>extra_state * cdef int p = not state.nopython # <<<<<<<<<<<<<< * if p: assert attrval_in != NULL * cdef object attrval */ __pyx_v_p = (!(__pyx_v_state->nopython != 0)); /* "mpi4py/MPI/attrimpl.pxi":91 * cdef _p_keyval state = <_p_keyval>extra_state * cdef int p = not state.nopython * if p: assert attrval_in != NULL # <<<<<<<<<<<<<< * cdef object attrval * if p: attrval = attrval_in */ __pyx_t_2 = (__pyx_v_p != 0); if (__pyx_t_2) { #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_attrval_in != NULL) != 0))) { PyErr_SetNone(PyExc_AssertionError); __PYX_ERR(4, 91, __pyx_L1_error) } } #endif } /* "mpi4py/MPI/attrimpl.pxi":93 * if p: assert attrval_in != NULL * cdef object attrval * if p: attrval = attrval_in # <<<<<<<<<<<<<< * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: */ __pyx_t_2 = (__pyx_v_p != 0); if (__pyx_t_2) { __pyx_t_1 = ((PyObject *)__pyx_v_attrval_in); __Pyx_INCREF(__pyx_t_1); __pyx_v_attrval = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L4; } /* "mpi4py/MPI/attrimpl.pxi":94 * cdef object attrval * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) # <<<<<<<<<<<<<< * if state.delete_fn is not None: * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) */ /*else*/ { __pyx_t_1 = PyLong_FromVoidPtr(__pyx_v_attrval_in); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attrval = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L4:; /* "mpi4py/MPI/attrimpl.pxi":95 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: # <<<<<<<<<<<<<< * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) */ __pyx_t_2 = (__pyx_v_state->delete_fn != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/attrimpl.pxi":96 * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) # <<<<<<<<<<<<<< * if p: Py_DECREF(attrval) * Py_DECREF(state) */ __pyx_t_1 = __pyx_v_state->delete_fn; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_call(__pyx_t_1, __pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/attrimpl.pxi":95 * if p: attrval = attrval_in * else: attrval = PyLong_FromVoidPtr(attrval_in) * if state.delete_fn is not None: # <<<<<<<<<<<<<< * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) */ } /* "mpi4py/MPI/attrimpl.pxi":97 * if state.delete_fn is not None: * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) # <<<<<<<<<<<<<< * Py_DECREF(state) * return 0 */ __pyx_t_3 = (__pyx_v_p != 0); if (__pyx_t_3) { Py_DECREF(__pyx_v_attrval); } /* "mpi4py/MPI/attrimpl.pxi":98 * PyMPI_attr_call(state.delete_fn, hdl, keyval, attrval) * if p: Py_DECREF(attrval) * Py_DECREF(state) # <<<<<<<<<<<<<< * return 0 * */ Py_DECREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/attrimpl.pxi":99 * if p: Py_DECREF(attrval) * Py_DECREF(state) * return 0 # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_copy_cb( */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":84 * return 0 * * cdef inline int PyMPI_attr_delete( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_delete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XDECREF(__pyx_v_attrval); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":101 * return 0 * * cdef inline int PyMPI_attr_copy_cb( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_cb(MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_extra_state, void *__pyx_v_attrval_in, void *__pyx_v_attrval_out, int *__pyx_v_flag) { int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__pyx_fuse_0PyMPI_attr_copy_cb", 0); /* "mpi4py/MPI/attrimpl.pxi":109 * int *flag, * ) except MPI_ERR_UNKNOWN with gil: * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/attrimpl.pxi":111 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/attrimpl.pxi":112 * cdef object exc * try: * PyMPI_attr_copy(hdl, keyval, extra_state, # <<<<<<<<<<<<<< * attrval_in, attrval_out, flag) * except MPIException as exc: */ __pyx_t_4 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_extra_state, __pyx_v_attrval_in, __pyx_v_attrval_out, __pyx_v_flag); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 112, __pyx_L3_error) /* "mpi4py/MPI/attrimpl.pxi":111 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "mpi4py/MPI/attrimpl.pxi":114 * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_4) { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_0PyMPI_attr_copy_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 114, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/attrimpl.pxi":115 * attrval_in, attrval_out, flag) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":116 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 116, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 116, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 116, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/attrimpl.pxi":117 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_0PyMPI_attr_copy_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(4, 117, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); /* "mpi4py/MPI/attrimpl.pxi":118 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":119 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/attrimpl.pxi":111 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/attrimpl.pxi":120 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_delete_cb( */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":101 * return 0 * * cdef inline int PyMPI_attr_copy_cb( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_copy_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_cb(MPI_Comm __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_extra_state, void *__pyx_v_attrval_in, void *__pyx_v_attrval_out, int *__pyx_v_flag) { int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__pyx_fuse_1PyMPI_attr_copy_cb", 0); /* "mpi4py/MPI/attrimpl.pxi":109 * int *flag, * ) except MPI_ERR_UNKNOWN with gil: * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/attrimpl.pxi":111 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/attrimpl.pxi":112 * cdef object exc * try: * PyMPI_attr_copy(hdl, keyval, extra_state, # <<<<<<<<<<<<<< * attrval_in, attrval_out, flag) * except MPIException as exc: */ __pyx_t_4 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_extra_state, __pyx_v_attrval_in, __pyx_v_attrval_out, __pyx_v_flag); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 112, __pyx_L3_error) /* "mpi4py/MPI/attrimpl.pxi":111 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "mpi4py/MPI/attrimpl.pxi":114 * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_4) { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_1PyMPI_attr_copy_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 114, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/attrimpl.pxi":115 * attrval_in, attrval_out, flag) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":116 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 116, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 116, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 116, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/attrimpl.pxi":117 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_1PyMPI_attr_copy_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(4, 117, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); /* "mpi4py/MPI/attrimpl.pxi":118 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":119 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/attrimpl.pxi":111 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/attrimpl.pxi":120 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_delete_cb( */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":101 * return 0 * * cdef inline int PyMPI_attr_copy_cb( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_copy_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_cb(MPI_Win __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_extra_state, void *__pyx_v_attrval_in, void *__pyx_v_attrval_out, int *__pyx_v_flag) { int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__pyx_fuse_2PyMPI_attr_copy_cb", 0); /* "mpi4py/MPI/attrimpl.pxi":109 * int *flag, * ) except MPI_ERR_UNKNOWN with gil: * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/attrimpl.pxi":111 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/attrimpl.pxi":112 * cdef object exc * try: * PyMPI_attr_copy(hdl, keyval, extra_state, # <<<<<<<<<<<<<< * attrval_in, attrval_out, flag) * except MPIException as exc: */ __pyx_t_4 = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_extra_state, __pyx_v_attrval_in, __pyx_v_attrval_out, __pyx_v_flag); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 112, __pyx_L3_error) /* "mpi4py/MPI/attrimpl.pxi":111 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "mpi4py/MPI/attrimpl.pxi":114 * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_4) { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_2PyMPI_attr_copy_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 114, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/attrimpl.pxi":115 * attrval_in, attrval_out, flag) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":116 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 116, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 116, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 116, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/attrimpl.pxi":117 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_2PyMPI_attr_copy_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(4, 117, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); /* "mpi4py/MPI/attrimpl.pxi":118 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":119 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/attrimpl.pxi":111 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_copy(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/attrimpl.pxi":120 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_delete_cb( */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":101 * return 0 * * cdef inline int PyMPI_attr_copy_cb( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_copy_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":122 * return ierr * * cdef inline int PyMPI_attr_delete_cb( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_cb(MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval, void *__pyx_v_extra_state) { int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__pyx_fuse_0PyMPI_attr_delete_cb", 0); /* "mpi4py/MPI/attrimpl.pxi":128 * void *extra_state, * ) except MPI_ERR_UNKNOWN with gil: * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/attrimpl.pxi":130 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/attrimpl.pxi":131 * cdef object exc * try: * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) # <<<<<<<<<<<<<< * except MPIException as exc: * print_traceback() */ __pyx_t_4 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval, __pyx_v_extra_state); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 131, __pyx_L3_error) /* "mpi4py/MPI/attrimpl.pxi":130 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "mpi4py/MPI/attrimpl.pxi":132 * try: * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_4) { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_0PyMPI_attr_delete_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 132, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/attrimpl.pxi":133 * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":134 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 134, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 134, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 134, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/attrimpl.pxi":135 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_0PyMPI_attr_delete_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(4, 135, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); /* "mpi4py/MPI/attrimpl.pxi":136 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":137 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/attrimpl.pxi":130 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/attrimpl.pxi":138 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":122 * return ierr * * cdef inline int PyMPI_attr_delete_cb( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_delete_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_cb(MPI_Comm __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval, void *__pyx_v_extra_state) { int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__pyx_fuse_1PyMPI_attr_delete_cb", 0); /* "mpi4py/MPI/attrimpl.pxi":128 * void *extra_state, * ) except MPI_ERR_UNKNOWN with gil: * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/attrimpl.pxi":130 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/attrimpl.pxi":131 * cdef object exc * try: * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) # <<<<<<<<<<<<<< * except MPIException as exc: * print_traceback() */ __pyx_t_4 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval, __pyx_v_extra_state); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 131, __pyx_L3_error) /* "mpi4py/MPI/attrimpl.pxi":130 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "mpi4py/MPI/attrimpl.pxi":132 * try: * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_4) { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_1PyMPI_attr_delete_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 132, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/attrimpl.pxi":133 * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":134 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 134, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 134, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 134, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/attrimpl.pxi":135 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_1PyMPI_attr_delete_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(4, 135, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); /* "mpi4py/MPI/attrimpl.pxi":136 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":137 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/attrimpl.pxi":130 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/attrimpl.pxi":138 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":122 * return ierr * * cdef inline int PyMPI_attr_delete_cb( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_delete_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_cb(MPI_Win __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval, void *__pyx_v_extra_state) { int __pyx_v_ierr; PyObject *__pyx_v_exc = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_RefNannySetupContext("__pyx_fuse_2PyMPI_attr_delete_cb", 0); /* "mpi4py/MPI/attrimpl.pxi":128 * void *extra_state, * ) except MPI_ERR_UNKNOWN with gil: * cdef int ierr = MPI_SUCCESS # <<<<<<<<<<<<<< * cdef object exc * try: */ __pyx_v_ierr = MPI_SUCCESS; /* "mpi4py/MPI/attrimpl.pxi":130 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/attrimpl.pxi":131 * cdef object exc * try: * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) # <<<<<<<<<<<<<< * except MPIException as exc: * print_traceback() */ __pyx_t_4 = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval, __pyx_v_extra_state); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(4, 131, __pyx_L3_error) /* "mpi4py/MPI/attrimpl.pxi":130 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "mpi4py/MPI/attrimpl.pxi":132 * try: * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: # <<<<<<<<<<<<<< * print_traceback() * ierr = exc.Get_error_code() */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_v_6mpi4py_3MPI_MPIException); if (__pyx_t_4) { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_2PyMPI_attr_delete_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(4, 132, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_v_exc = __pyx_t_6; /* "mpi4py/MPI/attrimpl.pxi":133 * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: * print_traceback() # <<<<<<<<<<<<<< * ierr = exc.Get_error_code() * except: */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":134 * except MPIException as exc: * print_traceback() * ierr = exc.Get_error_code() # <<<<<<<<<<<<<< * except: * print_traceback() */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exc, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 134, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 134, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 134, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_ierr = __pyx_t_4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } /* "mpi4py/MPI/attrimpl.pxi":135 * print_traceback() * ierr = exc.Get_error_code() * except: # <<<<<<<<<<<<<< * print_traceback() * ierr = MPI_ERR_OTHER */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.__pyx_fuse_2PyMPI_attr_delete_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(4, 135, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); /* "mpi4py/MPI/attrimpl.pxi":136 * ierr = exc.Get_error_code() * except: * print_traceback() # <<<<<<<<<<<<<< * ierr = MPI_ERR_OTHER * return ierr */ __pyx_f_6mpi4py_3MPI_print_traceback(); /* "mpi4py/MPI/attrimpl.pxi":137 * except: * print_traceback() * ierr = MPI_ERR_OTHER # <<<<<<<<<<<<<< * return ierr * */ __pyx_v_ierr = MPI_ERR_OTHER; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/attrimpl.pxi":130 * cdef int ierr = MPI_SUCCESS * cdef object exc * try: # <<<<<<<<<<<<<< * PyMPI_attr_delete(hdl, keyval, attrval, extra_state) * except MPIException as exc: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/attrimpl.pxi":138 * print_traceback() * ierr = MPI_ERR_OTHER * return ierr # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_ierr; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":122 * return ierr * * cdef inline int PyMPI_attr_delete_cb( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_delete_cb", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = MPI_ERR_UNKNOWN; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_RefNannyFinishContext(); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":142 * * @cython.callspec("MPIAPI") * cdef int PyMPI_attr_copy_fn(PyMPI_attr_type hdl, # <<<<<<<<<<<<<< * int keyval, * void *extra_state, */ static int MPIAPI __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_fn(MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_extra_state, void *__pyx_v_attrval_in, void *__pyx_v_attrval_out, int *__pyx_v_flag) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/attrimpl.pxi":148 * void *attrval_out, * int *flag) nogil: * if flag != NULL: flag[0] = 0 # <<<<<<<<<<<<<< * if extra_state == NULL: * return MPI_ERR_INTERN */ __pyx_t_1 = ((__pyx_v_flag != NULL) != 0); if (__pyx_t_1) { (__pyx_v_flag[0]) = 0; } /* "mpi4py/MPI/attrimpl.pxi":149 * int *flag) nogil: * if flag != NULL: flag[0] = 0 * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if attrval_out == NULL: */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":150 * if flag != NULL: flag[0] = 0 * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if attrval_out == NULL: * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":149 * int *flag) nogil: * if flag != NULL: flag[0] = 0 * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if attrval_out == NULL: */ } /* "mpi4py/MPI/attrimpl.pxi":151 * if extra_state == NULL: * return MPI_ERR_INTERN * if attrval_out == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_attrval_out == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":152 * return MPI_ERR_INTERN * if attrval_out == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_SUCCESS */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":151 * if extra_state == NULL: * return MPI_ERR_INTERN * if attrval_out == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/attrimpl.pxi":153 * if attrval_out == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":154 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_SUCCESS # <<<<<<<<<<<<<< * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":153 * if attrval_out == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, */ } /* "mpi4py/MPI/attrimpl.pxi":155 * if not Py_IsInitialized(): * return MPI_SUCCESS * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, # <<<<<<<<<<<<<< * attrval_in, attrval_out, flag) * */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_cb(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_extra_state, __pyx_v_attrval_in, __pyx_v_attrval_out, __pyx_v_flag); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(4, 155, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":142 * * @cython.callspec("MPIAPI") * cdef int PyMPI_attr_copy_fn(PyMPI_attr_type hdl, # <<<<<<<<<<<<<< * int keyval, * void *extra_state, */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.PyMPI_attr_copy_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static int MPIAPI __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_fn(MPI_Comm __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_extra_state, void *__pyx_v_attrval_in, void *__pyx_v_attrval_out, int *__pyx_v_flag) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/attrimpl.pxi":148 * void *attrval_out, * int *flag) nogil: * if flag != NULL: flag[0] = 0 # <<<<<<<<<<<<<< * if extra_state == NULL: * return MPI_ERR_INTERN */ __pyx_t_1 = ((__pyx_v_flag != NULL) != 0); if (__pyx_t_1) { (__pyx_v_flag[0]) = 0; } /* "mpi4py/MPI/attrimpl.pxi":149 * int *flag) nogil: * if flag != NULL: flag[0] = 0 * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if attrval_out == NULL: */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":150 * if flag != NULL: flag[0] = 0 * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if attrval_out == NULL: * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":149 * int *flag) nogil: * if flag != NULL: flag[0] = 0 * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if attrval_out == NULL: */ } /* "mpi4py/MPI/attrimpl.pxi":151 * if extra_state == NULL: * return MPI_ERR_INTERN * if attrval_out == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_attrval_out == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":152 * return MPI_ERR_INTERN * if attrval_out == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_SUCCESS */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":151 * if extra_state == NULL: * return MPI_ERR_INTERN * if attrval_out == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/attrimpl.pxi":153 * if attrval_out == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":154 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_SUCCESS # <<<<<<<<<<<<<< * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":153 * if attrval_out == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, */ } /* "mpi4py/MPI/attrimpl.pxi":155 * if not Py_IsInitialized(): * return MPI_SUCCESS * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, # <<<<<<<<<<<<<< * attrval_in, attrval_out, flag) * */ __pyx_t_2 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_cb(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_extra_state, __pyx_v_attrval_in, __pyx_v_attrval_out, __pyx_v_flag); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(4, 155, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":142 * * @cython.callspec("MPIAPI") * cdef int PyMPI_attr_copy_fn(PyMPI_attr_type hdl, # <<<<<<<<<<<<<< * int keyval, * void *extra_state, */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.PyMPI_attr_copy_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static int MPIAPI __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_fn(MPI_Win __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_extra_state, void *__pyx_v_attrval_in, void *__pyx_v_attrval_out, int *__pyx_v_flag) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/attrimpl.pxi":148 * void *attrval_out, * int *flag) nogil: * if flag != NULL: flag[0] = 0 # <<<<<<<<<<<<<< * if extra_state == NULL: * return MPI_ERR_INTERN */ __pyx_t_1 = ((__pyx_v_flag != NULL) != 0); if (__pyx_t_1) { (__pyx_v_flag[0]) = 0; } /* "mpi4py/MPI/attrimpl.pxi":149 * int *flag) nogil: * if flag != NULL: flag[0] = 0 * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if attrval_out == NULL: */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":150 * if flag != NULL: flag[0] = 0 * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if attrval_out == NULL: * return MPI_ERR_INTERN */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":149 * int *flag) nogil: * if flag != NULL: flag[0] = 0 * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if attrval_out == NULL: */ } /* "mpi4py/MPI/attrimpl.pxi":151 * if extra_state == NULL: * return MPI_ERR_INTERN * if attrval_out == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_attrval_out == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":152 * return MPI_ERR_INTERN * if attrval_out == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_SUCCESS */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":151 * if extra_state == NULL: * return MPI_ERR_INTERN * if attrval_out == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/attrimpl.pxi":153 * if attrval_out == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":154 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_SUCCESS # <<<<<<<<<<<<<< * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, * attrval_in, attrval_out, flag) */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":153 * if attrval_out == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, */ } /* "mpi4py/MPI/attrimpl.pxi":155 * if not Py_IsInitialized(): * return MPI_SUCCESS * return PyMPI_attr_copy_cb(hdl, keyval, extra_state, # <<<<<<<<<<<<<< * attrval_in, attrval_out, flag) * */ __pyx_t_2 = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_cb(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_extra_state, __pyx_v_attrval_in, __pyx_v_attrval_out, __pyx_v_flag); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(4, 155, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":142 * * @cython.callspec("MPIAPI") * cdef int PyMPI_attr_copy_fn(PyMPI_attr_type hdl, # <<<<<<<<<<<<<< * int keyval, * void *extra_state, */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.PyMPI_attr_copy_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":159 * * @cython.callspec("MPIAPI") * cdef int PyMPI_attr_delete_fn(PyMPI_attr_type hdl, # <<<<<<<<<<<<<< * int keyval, * void *attrval, */ static int MPIAPI __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_fn(MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval, void *__pyx_v_extra_state) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/attrimpl.pxi":163 * void *attrval, * void *extra_state) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":164 * void *extra_state) nogil: * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_SUCCESS */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":163 * void *attrval, * void *extra_state) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/attrimpl.pxi":165 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":166 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_SUCCESS # <<<<<<<<<<<<<< * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) * */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":165 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) */ } /* "mpi4py/MPI/attrimpl.pxi":167 * if not Py_IsInitialized(): * return MPI_SUCCESS * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_cb(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval, __pyx_v_extra_state); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(4, 167, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":159 * * @cython.callspec("MPIAPI") * cdef int PyMPI_attr_delete_fn(PyMPI_attr_type hdl, # <<<<<<<<<<<<<< * int keyval, * void *attrval, */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.PyMPI_attr_delete_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static int MPIAPI __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_fn(MPI_Comm __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval, void *__pyx_v_extra_state) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/attrimpl.pxi":163 * void *attrval, * void *extra_state) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":164 * void *extra_state) nogil: * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_SUCCESS */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":163 * void *attrval, * void *extra_state) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/attrimpl.pxi":165 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":166 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_SUCCESS # <<<<<<<<<<<<<< * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) * */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":165 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) */ } /* "mpi4py/MPI/attrimpl.pxi":167 * if not Py_IsInitialized(): * return MPI_SUCCESS * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_t_2 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_cb(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval, __pyx_v_extra_state); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(4, 167, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":159 * * @cython.callspec("MPIAPI") * cdef int PyMPI_attr_delete_fn(PyMPI_attr_type hdl, # <<<<<<<<<<<<<< * int keyval, * void *attrval, */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.PyMPI_attr_delete_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } static int MPIAPI __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_fn(MPI_Win __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval, void *__pyx_v_extra_state) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/attrimpl.pxi":163 * void *attrval, * void *extra_state) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ __pyx_t_1 = ((__pyx_v_extra_state == NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":164 * void *extra_state) nogil: * if extra_state == NULL: * return MPI_ERR_INTERN # <<<<<<<<<<<<<< * if not Py_IsInitialized(): * return MPI_SUCCESS */ __pyx_r = MPI_ERR_INTERN; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":163 * void *attrval, * void *extra_state) nogil: * if extra_state == NULL: # <<<<<<<<<<<<<< * return MPI_ERR_INTERN * if not Py_IsInitialized(): */ } /* "mpi4py/MPI/attrimpl.pxi":165 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_Py_IsInitialized() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/attrimpl.pxi":166 * return MPI_ERR_INTERN * if not Py_IsInitialized(): * return MPI_SUCCESS # <<<<<<<<<<<<<< * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) * */ __pyx_r = MPI_SUCCESS; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":165 * if extra_state == NULL: * return MPI_ERR_INTERN * if not Py_IsInitialized(): # <<<<<<<<<<<<<< * return MPI_SUCCESS * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) */ } /* "mpi4py/MPI/attrimpl.pxi":167 * if not Py_IsInitialized(): * return MPI_SUCCESS * return PyMPI_attr_delete_cb(hdl, keyval, attrval, extra_state) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_t_2 = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_cb(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_attrval, __pyx_v_extra_state); if (unlikely(__pyx_t_2 == ((int)MPI_ERR_UNKNOWN))) __PYX_ERR(4, 167, __pyx_L1_error) __pyx_r = __pyx_t_2; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":159 * * @cython.callspec("MPIAPI") * cdef int PyMPI_attr_delete_fn(PyMPI_attr_type hdl, # <<<<<<<<<<<<<< * int keyval, * void *attrval, */ /* function exit code */ __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.PyMPI_attr_delete_fn", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); __pyx_r = 0; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":171 * #------------------------------------------------------------------------------ * * cdef inline _p_keyval PyMPI_attr_state( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval): */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_0PyMPI_attr_state", 0); /* "mpi4py/MPI/attrimpl.pxi":174 * PyMPI_attr_type hdl, * int keyval): * hdl # unused # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Datatype: * return <_p_keyval>type_keyval.get(keyval) */ ((void)__pyx_v_hdl); /* "mpi4py/MPI/attrimpl.pxi":176 * hdl # unused * if PyMPI_attr_type is MPI_Datatype: * return <_p_keyval>type_keyval.get(keyval) # <<<<<<<<<<<<<< * elif PyMPI_attr_type is MPI_Comm: * return <_p_keyval>comm_keyval.get(keyval) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(__pyx_v_6mpi4py_3MPI_type_keyval == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); __PYX_ERR(4, 176, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_6mpi4py_3MPI_type_keyval, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_2))); __pyx_r = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":171 * #------------------------------------------------------------------------------ * * cdef inline _p_keyval PyMPI_attr_state( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(MPI_Comm __pyx_v_hdl, int __pyx_v_keyval) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_1PyMPI_attr_state", 0); /* "mpi4py/MPI/attrimpl.pxi":174 * PyMPI_attr_type hdl, * int keyval): * hdl # unused # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Datatype: * return <_p_keyval>type_keyval.get(keyval) */ ((void)__pyx_v_hdl); /* "mpi4py/MPI/attrimpl.pxi":178 * return <_p_keyval>type_keyval.get(keyval) * elif PyMPI_attr_type is MPI_Comm: * return <_p_keyval>comm_keyval.get(keyval) # <<<<<<<<<<<<<< * elif PyMPI_attr_type is MPI_Win: * return <_p_keyval>win_keyval.get(keyval) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(__pyx_v_6mpi4py_3MPI_comm_keyval == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); __PYX_ERR(4, 178, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_6mpi4py_3MPI_comm_keyval, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_2))); __pyx_r = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":171 * #------------------------------------------------------------------------------ * * cdef inline _p_keyval PyMPI_attr_state( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(MPI_Win __pyx_v_hdl, int __pyx_v_keyval) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__pyx_fuse_2PyMPI_attr_state", 0); /* "mpi4py/MPI/attrimpl.pxi":174 * PyMPI_attr_type hdl, * int keyval): * hdl # unused # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Datatype: * return <_p_keyval>type_keyval.get(keyval) */ ((void)__pyx_v_hdl); /* "mpi4py/MPI/attrimpl.pxi":180 * return <_p_keyval>comm_keyval.get(keyval) * elif PyMPI_attr_type is MPI_Win: * return <_p_keyval>win_keyval.get(keyval) # <<<<<<<<<<<<<< * * cdef inline object PyMPI_attr_get( */ __Pyx_XDECREF(((PyObject *)__pyx_r)); if (unlikely(__pyx_v_6mpi4py_3MPI_win_keyval == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); __PYX_ERR(4, 180, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_6mpi4py_3MPI_win_keyval, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(((PyObject *)((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_2))); __pyx_r = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":171 * #------------------------------------------------------------------------------ * * cdef inline _p_keyval PyMPI_attr_state( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":182 * return <_p_keyval>win_keyval.get(keyval) * * cdef inline object PyMPI_attr_get( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ static CYTHON_INLINE PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_get(MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("__pyx_fuse_0PyMPI_attr_get", 0); /* "mpi4py/MPI/attrimpl.pxi":186 * int keyval, * void *attrval): * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) # <<<<<<<<<<<<<< * if state is not None and not state.nopython: * return attrval */ __pyx_t_1 = ((PyObject *)__pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(__pyx_v_hdl, __pyx_v_keyval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":187 * void *attrval): * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * return attrval * else: */ __pyx_t_3 = (((PyObject *)__pyx_v_state) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = ((!(__pyx_v_state->nopython != 0)) != 0); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/attrimpl.pxi":188 * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * if state is not None and not state.nopython: * return attrval # <<<<<<<<<<<<<< * else: * return PyLong_FromVoidPtr(attrval) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_attrval)); __pyx_r = ((PyObject *)__pyx_v_attrval); goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":187 * void *attrval): * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * return attrval * else: */ } /* "mpi4py/MPI/attrimpl.pxi":190 * return attrval * else: * return PyLong_FromVoidPtr(attrval) # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_set( */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyLong_FromVoidPtr(__pyx_v_attrval); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/attrimpl.pxi":182 * return <_p_keyval>win_keyval.get(keyval) * * cdef inline object PyMPI_attr_get( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_get(MPI_Comm __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("__pyx_fuse_1PyMPI_attr_get", 0); /* "mpi4py/MPI/attrimpl.pxi":186 * int keyval, * void *attrval): * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) # <<<<<<<<<<<<<< * if state is not None and not state.nopython: * return attrval */ __pyx_t_1 = ((PyObject *)__pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(__pyx_v_hdl, __pyx_v_keyval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":187 * void *attrval): * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * return attrval * else: */ __pyx_t_3 = (((PyObject *)__pyx_v_state) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = ((!(__pyx_v_state->nopython != 0)) != 0); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/attrimpl.pxi":188 * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * if state is not None and not state.nopython: * return attrval # <<<<<<<<<<<<<< * else: * return PyLong_FromVoidPtr(attrval) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_attrval)); __pyx_r = ((PyObject *)__pyx_v_attrval); goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":187 * void *attrval): * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * return attrval * else: */ } /* "mpi4py/MPI/attrimpl.pxi":190 * return attrval * else: * return PyLong_FromVoidPtr(attrval) # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_set( */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyLong_FromVoidPtr(__pyx_v_attrval); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/attrimpl.pxi":182 * return <_p_keyval>win_keyval.get(keyval) * * cdef inline object PyMPI_attr_get( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE PyObject *__pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_get(MPI_Win __pyx_v_hdl, int __pyx_v_keyval, void *__pyx_v_attrval) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("__pyx_fuse_2PyMPI_attr_get", 0); /* "mpi4py/MPI/attrimpl.pxi":186 * int keyval, * void *attrval): * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) # <<<<<<<<<<<<<< * if state is not None and not state.nopython: * return attrval */ __pyx_t_1 = ((PyObject *)__pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(__pyx_v_hdl, __pyx_v_keyval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":187 * void *attrval): * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * return attrval * else: */ __pyx_t_3 = (((PyObject *)__pyx_v_state) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = ((!(__pyx_v_state->nopython != 0)) != 0); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/attrimpl.pxi":188 * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * if state is not None and not state.nopython: * return attrval # <<<<<<<<<<<<<< * else: * return PyLong_FromVoidPtr(attrval) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_attrval)); __pyx_r = ((PyObject *)__pyx_v_attrval); goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":187 * void *attrval): * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * return attrval * else: */ } /* "mpi4py/MPI/attrimpl.pxi":190 * return attrval * else: * return PyLong_FromVoidPtr(attrval) # <<<<<<<<<<<<<< * * cdef inline int PyMPI_attr_set( */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyLong_FromVoidPtr(__pyx_v_attrval); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "mpi4py/MPI/attrimpl.pxi":182 * return <_p_keyval>win_keyval.get(keyval) * * cdef inline object PyMPI_attr_get( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/attrimpl.pxi":192 * return PyLong_FromVoidPtr(attrval) * * cdef inline int PyMPI_attr_set( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ static CYTHON_INLINE int __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_set(MPI_Datatype __pyx_v_hdl, int __pyx_v_keyval, PyObject *__pyx_v_attrval) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; void *__pyx_v_valptr; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("__pyx_fuse_0PyMPI_attr_set", 0); /* "mpi4py/MPI/attrimpl.pxi":197 * object attrval, * ) except -1: * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) # <<<<<<<<<<<<<< * cdef void *valptr = NULL * if state is not None and not state.nopython: */ __pyx_t_1 = ((PyObject *)__pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(__pyx_v_hdl, __pyx_v_keyval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":198 * ) except -1: * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * cdef void *valptr = NULL # <<<<<<<<<<<<<< * if state is not None and not state.nopython: * valptr = attrval */ __pyx_v_valptr = NULL; /* "mpi4py/MPI/attrimpl.pxi":199 * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * cdef void *valptr = NULL * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * valptr = attrval * else: */ __pyx_t_3 = (((PyObject *)__pyx_v_state) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = ((!(__pyx_v_state->nopython != 0)) != 0); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/attrimpl.pxi":200 * cdef void *valptr = NULL * if state is not None and not state.nopython: * valptr = attrval # <<<<<<<<<<<<<< * else: * valptr = PyLong_AsVoidPtr(attrval) */ __pyx_v_valptr = ((void *)__pyx_v_attrval); /* "mpi4py/MPI/attrimpl.pxi":199 * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * cdef void *valptr = NULL * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * valptr = attrval * else: */ goto __pyx_L3; } /* "mpi4py/MPI/attrimpl.pxi":202 * valptr = attrval * else: * valptr = PyLong_AsVoidPtr(attrval) # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Datatype: * CHKERR( MPI_Type_set_attr(hdl, keyval, valptr) ) */ /*else*/ { __pyx_v_valptr = PyLong_AsVoidPtr(__pyx_v_attrval); } __pyx_L3:; /* "mpi4py/MPI/attrimpl.pxi":204 * valptr = PyLong_AsVoidPtr(attrval) * if PyMPI_attr_type is MPI_Datatype: * CHKERR( MPI_Type_set_attr(hdl, keyval, valptr) ) # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Comm: * CHKERR( MPI_Comm_set_attr(hdl, keyval, valptr) ) */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_set_attr(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_valptr)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(4, 204, __pyx_L1_error) /* "mpi4py/MPI/attrimpl.pxi":209 * if PyMPI_attr_type is MPI_Win: * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: # <<<<<<<<<<<<<< * if not state.nopython: * Py_INCREF(attrval) */ __pyx_t_2 = (((PyObject *)__pyx_v_state) != Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/attrimpl.pxi":210 * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: * if not state.nopython: # <<<<<<<<<<<<<< * Py_INCREF(attrval) * Py_INCREF(state) */ __pyx_t_4 = ((!(__pyx_v_state->nopython != 0)) != 0); if (__pyx_t_4) { /* "mpi4py/MPI/attrimpl.pxi":211 * if state is not None: * if not state.nopython: * Py_INCREF(attrval) # <<<<<<<<<<<<<< * Py_INCREF(state) * return 0 */ Py_INCREF(__pyx_v_attrval); /* "mpi4py/MPI/attrimpl.pxi":210 * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: * if not state.nopython: # <<<<<<<<<<<<<< * Py_INCREF(attrval) * Py_INCREF(state) */ } /* "mpi4py/MPI/attrimpl.pxi":212 * if not state.nopython: * Py_INCREF(attrval) * Py_INCREF(state) # <<<<<<<<<<<<<< * return 0 * */ Py_INCREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/attrimpl.pxi":209 * if PyMPI_attr_type is MPI_Win: * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: # <<<<<<<<<<<<<< * if not state.nopython: * Py_INCREF(attrval) */ } /* "mpi4py/MPI/attrimpl.pxi":213 * Py_INCREF(attrval) * Py_INCREF(state) * return 0 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":192 * return PyLong_FromVoidPtr(attrval) * * cdef inline int PyMPI_attr_set( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_set(MPI_Comm __pyx_v_hdl, int __pyx_v_keyval, PyObject *__pyx_v_attrval) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; void *__pyx_v_valptr; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("__pyx_fuse_1PyMPI_attr_set", 0); /* "mpi4py/MPI/attrimpl.pxi":197 * object attrval, * ) except -1: * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) # <<<<<<<<<<<<<< * cdef void *valptr = NULL * if state is not None and not state.nopython: */ __pyx_t_1 = ((PyObject *)__pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(__pyx_v_hdl, __pyx_v_keyval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":198 * ) except -1: * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * cdef void *valptr = NULL # <<<<<<<<<<<<<< * if state is not None and not state.nopython: * valptr = attrval */ __pyx_v_valptr = NULL; /* "mpi4py/MPI/attrimpl.pxi":199 * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * cdef void *valptr = NULL * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * valptr = attrval * else: */ __pyx_t_3 = (((PyObject *)__pyx_v_state) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = ((!(__pyx_v_state->nopython != 0)) != 0); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/attrimpl.pxi":200 * cdef void *valptr = NULL * if state is not None and not state.nopython: * valptr = attrval # <<<<<<<<<<<<<< * else: * valptr = PyLong_AsVoidPtr(attrval) */ __pyx_v_valptr = ((void *)__pyx_v_attrval); /* "mpi4py/MPI/attrimpl.pxi":199 * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * cdef void *valptr = NULL * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * valptr = attrval * else: */ goto __pyx_L3; } /* "mpi4py/MPI/attrimpl.pxi":202 * valptr = attrval * else: * valptr = PyLong_AsVoidPtr(attrval) # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Datatype: * CHKERR( MPI_Type_set_attr(hdl, keyval, valptr) ) */ /*else*/ { __pyx_v_valptr = PyLong_AsVoidPtr(__pyx_v_attrval); } __pyx_L3:; /* "mpi4py/MPI/attrimpl.pxi":206 * CHKERR( MPI_Type_set_attr(hdl, keyval, valptr) ) * if PyMPI_attr_type is MPI_Comm: * CHKERR( MPI_Comm_set_attr(hdl, keyval, valptr) ) # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Win: * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_set_attr(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_valptr)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(4, 206, __pyx_L1_error) /* "mpi4py/MPI/attrimpl.pxi":209 * if PyMPI_attr_type is MPI_Win: * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: # <<<<<<<<<<<<<< * if not state.nopython: * Py_INCREF(attrval) */ __pyx_t_2 = (((PyObject *)__pyx_v_state) != Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/attrimpl.pxi":210 * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: * if not state.nopython: # <<<<<<<<<<<<<< * Py_INCREF(attrval) * Py_INCREF(state) */ __pyx_t_4 = ((!(__pyx_v_state->nopython != 0)) != 0); if (__pyx_t_4) { /* "mpi4py/MPI/attrimpl.pxi":211 * if state is not None: * if not state.nopython: * Py_INCREF(attrval) # <<<<<<<<<<<<<< * Py_INCREF(state) * return 0 */ Py_INCREF(__pyx_v_attrval); /* "mpi4py/MPI/attrimpl.pxi":210 * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: * if not state.nopython: # <<<<<<<<<<<<<< * Py_INCREF(attrval) * Py_INCREF(state) */ } /* "mpi4py/MPI/attrimpl.pxi":212 * if not state.nopython: * Py_INCREF(attrval) * Py_INCREF(state) # <<<<<<<<<<<<<< * return 0 * */ Py_INCREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/attrimpl.pxi":209 * if PyMPI_attr_type is MPI_Win: * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: # <<<<<<<<<<<<<< * if not state.nopython: * Py_INCREF(attrval) */ } /* "mpi4py/MPI/attrimpl.pxi":213 * Py_INCREF(attrval) * Py_INCREF(state) * return 0 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":192 * return PyLong_FromVoidPtr(attrval) * * cdef inline int PyMPI_attr_set( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_RefNannyFinishContext(); return __pyx_r; } static CYTHON_INLINE int __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_set(MPI_Win __pyx_v_hdl, int __pyx_v_keyval, PyObject *__pyx_v_attrval) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *__pyx_v_state = 0; void *__pyx_v_valptr; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("__pyx_fuse_2PyMPI_attr_set", 0); /* "mpi4py/MPI/attrimpl.pxi":197 * object attrval, * ) except -1: * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) # <<<<<<<<<<<<<< * cdef void *valptr = NULL * if state is not None and not state.nopython: */ __pyx_t_1 = ((PyObject *)__pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_state(__pyx_v_hdl, __pyx_v_keyval)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/attrimpl.pxi":198 * ) except -1: * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * cdef void *valptr = NULL # <<<<<<<<<<<<<< * if state is not None and not state.nopython: * valptr = attrval */ __pyx_v_valptr = NULL; /* "mpi4py/MPI/attrimpl.pxi":199 * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * cdef void *valptr = NULL * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * valptr = attrval * else: */ __pyx_t_3 = (((PyObject *)__pyx_v_state) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = ((!(__pyx_v_state->nopython != 0)) != 0); __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/attrimpl.pxi":200 * cdef void *valptr = NULL * if state is not None and not state.nopython: * valptr = attrval # <<<<<<<<<<<<<< * else: * valptr = PyLong_AsVoidPtr(attrval) */ __pyx_v_valptr = ((void *)__pyx_v_attrval); /* "mpi4py/MPI/attrimpl.pxi":199 * cdef _p_keyval state = PyMPI_attr_state(hdl, keyval) * cdef void *valptr = NULL * if state is not None and not state.nopython: # <<<<<<<<<<<<<< * valptr = attrval * else: */ goto __pyx_L3; } /* "mpi4py/MPI/attrimpl.pxi":202 * valptr = attrval * else: * valptr = PyLong_AsVoidPtr(attrval) # <<<<<<<<<<<<<< * if PyMPI_attr_type is MPI_Datatype: * CHKERR( MPI_Type_set_attr(hdl, keyval, valptr) ) */ /*else*/ { __pyx_v_valptr = PyLong_AsVoidPtr(__pyx_v_attrval); } __pyx_L3:; /* "mpi4py/MPI/attrimpl.pxi":208 * CHKERR( MPI_Comm_set_attr(hdl, keyval, valptr) ) * if PyMPI_attr_type is MPI_Win: * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) # <<<<<<<<<<<<<< * if state is not None: * if not state.nopython: */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_set_attr(__pyx_v_hdl, __pyx_v_keyval, __pyx_v_valptr)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(4, 208, __pyx_L1_error) /* "mpi4py/MPI/attrimpl.pxi":209 * if PyMPI_attr_type is MPI_Win: * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: # <<<<<<<<<<<<<< * if not state.nopython: * Py_INCREF(attrval) */ __pyx_t_2 = (((PyObject *)__pyx_v_state) != Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/attrimpl.pxi":210 * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: * if not state.nopython: # <<<<<<<<<<<<<< * Py_INCREF(attrval) * Py_INCREF(state) */ __pyx_t_4 = ((!(__pyx_v_state->nopython != 0)) != 0); if (__pyx_t_4) { /* "mpi4py/MPI/attrimpl.pxi":211 * if state is not None: * if not state.nopython: * Py_INCREF(attrval) # <<<<<<<<<<<<<< * Py_INCREF(state) * return 0 */ Py_INCREF(__pyx_v_attrval); /* "mpi4py/MPI/attrimpl.pxi":210 * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: * if not state.nopython: # <<<<<<<<<<<<<< * Py_INCREF(attrval) * Py_INCREF(state) */ } /* "mpi4py/MPI/attrimpl.pxi":212 * if not state.nopython: * Py_INCREF(attrval) * Py_INCREF(state) # <<<<<<<<<<<<<< * return 0 * */ Py_INCREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/attrimpl.pxi":209 * if PyMPI_attr_type is MPI_Win: * CHKERR( MPI_Win_set_attr(hdl, keyval, valptr) ) * if state is not None: # <<<<<<<<<<<<<< * if not state.nopython: * Py_INCREF(attrval) */ } /* "mpi4py/MPI/attrimpl.pxi":213 * Py_INCREF(attrval) * Py_INCREF(state) * return 0 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/attrimpl.pxi":192 * return PyLong_FromVoidPtr(attrval) * * cdef inline int PyMPI_attr_set( # <<<<<<<<<<<<<< * PyMPI_attr_type hdl, * int keyval, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_attr_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/mpierrhdl.pxi":3 * # ----------------------------------------------------------------------------- * * cdef inline int comm_set_eh(MPI_Comm ob) nogil except -1: # <<<<<<<<<<<<<< * if ob == MPI_COMM_NULL: return 0 * cdef int opt = options.errors */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_comm_set_eh(MPI_Comm __pyx_v_ob) { int __pyx_v_opt; int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/mpierrhdl.pxi":4 * * cdef inline int comm_set_eh(MPI_Comm ob) nogil except -1: * if ob == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int opt = options.errors * if opt == 0: pass */ __pyx_t_1 = ((__pyx_v_ob == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/mpierrhdl.pxi":5 * cdef inline int comm_set_eh(MPI_Comm ob) nogil except -1: * if ob == MPI_COMM_NULL: return 0 * cdef int opt = options.errors # <<<<<<<<<<<<<< * if opt == 0: pass * elif opt == 1: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_RETURN) ) */ __pyx_t_2 = __pyx_v_6mpi4py_3MPI_options.errors; __pyx_v_opt = __pyx_t_2; /* "mpi4py/MPI/mpierrhdl.pxi":6 * if ob == MPI_COMM_NULL: return 0 * cdef int opt = options.errors * if opt == 0: pass # <<<<<<<<<<<<<< * elif opt == 1: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_RETURN) ) * elif opt == 2: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) */ __pyx_t_1 = ((__pyx_v_opt == 0) != 0); if (__pyx_t_1) { goto __pyx_L4; } /* "mpi4py/MPI/mpierrhdl.pxi":7 * cdef int opt = options.errors * if opt == 0: pass * elif opt == 1: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_RETURN) ) # <<<<<<<<<<<<<< * elif opt == 2: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) * return 0 */ __pyx_t_1 = ((__pyx_v_opt == 1) != 0); if (__pyx_t_1) { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_set_errhandler(__pyx_v_ob, MPI_ERRORS_RETURN)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 7, __pyx_L1_error) goto __pyx_L4; } /* "mpi4py/MPI/mpierrhdl.pxi":8 * if opt == 0: pass * elif opt == 1: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_RETURN) ) * elif opt == 2: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = ((__pyx_v_opt == 2) != 0); if (__pyx_t_1) { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_set_errhandler(__pyx_v_ob, MPI_ERRORS_ARE_FATAL)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 8, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/mpierrhdl.pxi":9 * elif opt == 1: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_RETURN) ) * elif opt == 2: CHKERR( MPI_Comm_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) * return 0 # <<<<<<<<<<<<<< * * cdef inline int win_set_eh(MPI_Win ob) nogil except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/mpierrhdl.pxi":3 * # ----------------------------------------------------------------------------- * * cdef inline int comm_set_eh(MPI_Comm ob) nogil except -1: # <<<<<<<<<<<<<< * if ob == MPI_COMM_NULL: return 0 * cdef int opt = options.errors */ /* function exit code */ __pyx_L1_error:; { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("mpi4py.MPI.comm_set_eh", __pyx_clineno, __pyx_lineno, __pyx_filename); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/mpierrhdl.pxi":11 * return 0 * * cdef inline int win_set_eh(MPI_Win ob) nogil except -1: # <<<<<<<<<<<<<< * if ob == MPI_WIN_NULL: return 0 * cdef int opt = options.errors */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_win_set_eh(MPI_Win __pyx_v_ob) { int __pyx_v_opt; int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/mpierrhdl.pxi":12 * * cdef inline int win_set_eh(MPI_Win ob) nogil except -1: * if ob == MPI_WIN_NULL: return 0 # <<<<<<<<<<<<<< * cdef int opt = options.errors * if opt == 0: pass */ __pyx_t_1 = ((__pyx_v_ob == MPI_WIN_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/mpierrhdl.pxi":13 * cdef inline int win_set_eh(MPI_Win ob) nogil except -1: * if ob == MPI_WIN_NULL: return 0 * cdef int opt = options.errors # <<<<<<<<<<<<<< * if opt == 0: pass * elif opt == 1: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_RETURN) ) */ __pyx_t_2 = __pyx_v_6mpi4py_3MPI_options.errors; __pyx_v_opt = __pyx_t_2; /* "mpi4py/MPI/mpierrhdl.pxi":14 * if ob == MPI_WIN_NULL: return 0 * cdef int opt = options.errors * if opt == 0: pass # <<<<<<<<<<<<<< * elif opt == 1: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_RETURN) ) * elif opt == 2: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) */ __pyx_t_1 = ((__pyx_v_opt == 0) != 0); if (__pyx_t_1) { goto __pyx_L4; } /* "mpi4py/MPI/mpierrhdl.pxi":15 * cdef int opt = options.errors * if opt == 0: pass * elif opt == 1: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_RETURN) ) # <<<<<<<<<<<<<< * elif opt == 2: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) * return 0 */ __pyx_t_1 = ((__pyx_v_opt == 1) != 0); if (__pyx_t_1) { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_set_errhandler(__pyx_v_ob, MPI_ERRORS_RETURN)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 15, __pyx_L1_error) goto __pyx_L4; } /* "mpi4py/MPI/mpierrhdl.pxi":16 * if opt == 0: pass * elif opt == 1: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_RETURN) ) * elif opt == 2: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = ((__pyx_v_opt == 2) != 0); if (__pyx_t_1) { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_set_errhandler(__pyx_v_ob, MPI_ERRORS_ARE_FATAL)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 16, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/mpierrhdl.pxi":17 * elif opt == 1: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_RETURN) ) * elif opt == 2: CHKERR( MPI_Win_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) * return 0 # <<<<<<<<<<<<<< * * cdef inline int file_set_eh(MPI_File ob) nogil except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/mpierrhdl.pxi":11 * return 0 * * cdef inline int win_set_eh(MPI_Win ob) nogil except -1: # <<<<<<<<<<<<<< * if ob == MPI_WIN_NULL: return 0 * cdef int opt = options.errors */ /* function exit code */ __pyx_L1_error:; { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("mpi4py.MPI.win_set_eh", __pyx_clineno, __pyx_lineno, __pyx_filename); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/mpierrhdl.pxi":19 * return 0 * * cdef inline int file_set_eh(MPI_File ob) nogil except -1: # <<<<<<<<<<<<<< * if ob == MPI_FILE_NULL: return 0 * cdef int opt = options.errors */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_file_set_eh(MPI_File __pyx_v_ob) { int __pyx_v_opt; int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/mpierrhdl.pxi":20 * * cdef inline int file_set_eh(MPI_File ob) nogil except -1: * if ob == MPI_FILE_NULL: return 0 # <<<<<<<<<<<<<< * cdef int opt = options.errors * if opt == 0: pass */ __pyx_t_1 = ((__pyx_v_ob == MPI_FILE_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/mpierrhdl.pxi":21 * cdef inline int file_set_eh(MPI_File ob) nogil except -1: * if ob == MPI_FILE_NULL: return 0 * cdef int opt = options.errors # <<<<<<<<<<<<<< * if opt == 0: pass * elif opt == 1: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_RETURN) ) */ __pyx_t_2 = __pyx_v_6mpi4py_3MPI_options.errors; __pyx_v_opt = __pyx_t_2; /* "mpi4py/MPI/mpierrhdl.pxi":22 * if ob == MPI_FILE_NULL: return 0 * cdef int opt = options.errors * if opt == 0: pass # <<<<<<<<<<<<<< * elif opt == 1: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_RETURN) ) * elif opt == 2: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) */ __pyx_t_1 = ((__pyx_v_opt == 0) != 0); if (__pyx_t_1) { goto __pyx_L4; } /* "mpi4py/MPI/mpierrhdl.pxi":23 * cdef int opt = options.errors * if opt == 0: pass * elif opt == 1: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_RETURN) ) # <<<<<<<<<<<<<< * elif opt == 2: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) * return 0 */ __pyx_t_1 = ((__pyx_v_opt == 1) != 0); if (__pyx_t_1) { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_set_errhandler(__pyx_v_ob, MPI_ERRORS_RETURN)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 23, __pyx_L1_error) goto __pyx_L4; } /* "mpi4py/MPI/mpierrhdl.pxi":24 * if opt == 0: pass * elif opt == 1: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_RETURN) ) * elif opt == 2: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = ((__pyx_v_opt == 2) != 0); if (__pyx_t_1) { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_set_errhandler(__pyx_v_ob, MPI_ERRORS_ARE_FATAL)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(17, 24, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/mpierrhdl.pxi":25 * elif opt == 1: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_RETURN) ) * elif opt == 2: CHKERR( MPI_File_set_errhandler(ob, MPI_ERRORS_ARE_FATAL) ) * return 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/mpierrhdl.pxi":19 * return 0 * * cdef inline int file_set_eh(MPI_File ob) nogil except -1: # <<<<<<<<<<<<<< * if ob == MPI_FILE_NULL: return 0 * cdef int opt = options.errors */ /* function exit code */ __pyx_L1_error:; { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("mpi4py.MPI.file_set_eh", __pyx_clineno, __pyx_lineno, __pyx_filename); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":13 * Py_ssize_t PySequence_Size(object) except -1 * * cdef inline int is_integral(object ob): # <<<<<<<<<<<<<< * if not PyIndex_Check(ob): return 0 * if not PySequence_Check(ob): return 1 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_is_integral(PyObject *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("is_integral", 0); /* "mpi4py/MPI/msgbuffer.pxi":14 * * cdef inline int is_integral(object ob): * if not PyIndex_Check(ob): return 0 # <<<<<<<<<<<<<< * if not PySequence_Check(ob): return 1 * try: PySequence_Size(ob) */ __pyx_t_1 = ((!(PyIndex_Check(__pyx_v_ob) != 0)) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":15 * cdef inline int is_integral(object ob): * if not PyIndex_Check(ob): return 0 * if not PySequence_Check(ob): return 1 # <<<<<<<<<<<<<< * try: PySequence_Size(ob) * except: pass */ __pyx_t_1 = ((!(PySequence_Check(__pyx_v_ob) != 0)) != 0); if (__pyx_t_1) { __pyx_r = 1; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":16 * if not PyIndex_Check(ob): return 0 * if not PySequence_Check(ob): return 1 * try: PySequence_Size(ob) # <<<<<<<<<<<<<< * except: pass * else: return 0 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { __pyx_t_5 = PySequence_Size(__pyx_v_ob); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1L))) __PYX_ERR(5, 16, __pyx_L5_error) } /* "mpi4py/MPI/msgbuffer.pxi":18 * try: PySequence_Size(ob) * except: pass * else: return 0 # <<<<<<<<<<<<<< * try: PyNumber_Index(ob) * except: return 0 */ /*else:*/ { __pyx_r = 0; goto __pyx_L8_except_return; } __pyx_L5_error:; /* "mpi4py/MPI/msgbuffer.pxi":17 * if not PySequence_Check(ob): return 1 * try: PySequence_Size(ob) * except: pass # <<<<<<<<<<<<<< * else: return 0 * try: PyNumber_Index(ob) */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L6_exception_handled; } __pyx_L8_except_return:; /* "mpi4py/MPI/msgbuffer.pxi":16 * if not PyIndex_Check(ob): return 0 * if not PySequence_Check(ob): return 1 * try: PySequence_Size(ob) # <<<<<<<<<<<<<< * except: pass * else: return 0 */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L6_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); } /* "mpi4py/MPI/msgbuffer.pxi":19 * except: pass * else: return 0 * try: PyNumber_Index(ob) # <<<<<<<<<<<<<< * except: return 0 * else: return 1 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_3, &__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); /*try:*/ { __pyx_t_6 = PyNumber_Index(__pyx_v_ob); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 19, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "mpi4py/MPI/msgbuffer.pxi":21 * try: PyNumber_Index(ob) * except: return 0 * else: return 1 # <<<<<<<<<<<<<< * * cdef inline int is_buffer(object ob): */ /*else:*/ { __pyx_r = 1; goto __pyx_L14_except_return; } __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":20 * else: return 0 * try: PyNumber_Index(ob) * except: return 0 # <<<<<<<<<<<<<< * else: return 1 * */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.is_integral", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(5, 20, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); __pyx_r = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L14_except_return; } __pyx_L13_except_error:; /* "mpi4py/MPI/msgbuffer.pxi":19 * except: pass * else: return 0 * try: PyNumber_Index(ob) # <<<<<<<<<<<<<< * except: return 0 * else: return 1 */ __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); goto __pyx_L1_error; __pyx_L14_except_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_3, __pyx_t_2); goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":13 * Py_ssize_t PySequence_Size(object) except -1 * * cdef inline int is_integral(object ob): # <<<<<<<<<<<<<< * if not PyIndex_Check(ob): return 0 * if not PySequence_Check(ob): return 1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_WriteUnraisable("mpi4py.MPI.is_integral", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":23 * else: return 1 * * cdef inline int is_buffer(object ob): # <<<<<<<<<<<<<< * if PY3: * return PyObject_CheckBuffer(ob) */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_is_buffer(PyObject *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("is_buffer", 0); /* "mpi4py/MPI/msgbuffer.pxi":24 * * cdef inline int is_buffer(object ob): * if PY3: # <<<<<<<<<<<<<< * return PyObject_CheckBuffer(ob) * else: */ if ((PY_MAJOR_VERSION>=3)) { /* "mpi4py/MPI/msgbuffer.pxi":25 * cdef inline int is_buffer(object ob): * if PY3: * return PyObject_CheckBuffer(ob) # <<<<<<<<<<<<<< * else: * return PyObject_CheckBuffer(ob) or _Py2_IsBuffer(ob) */ __pyx_r = PyObject_CheckBuffer(__pyx_v_ob); goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":24 * * cdef inline int is_buffer(object ob): * if PY3: # <<<<<<<<<<<<<< * return PyObject_CheckBuffer(ob) * else: */ } /* "mpi4py/MPI/msgbuffer.pxi":27 * return PyObject_CheckBuffer(ob) * else: * return PyObject_CheckBuffer(ob) or _Py2_IsBuffer(ob) # <<<<<<<<<<<<<< * * cdef inline int is_datatype(object ob): */ /*else*/ { __pyx_t_2 = PyObject_CheckBuffer(__pyx_v_ob); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = _Py2_IsBuffer(__pyx_v_ob); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":23 * else: return 1 * * cdef inline int is_buffer(object ob): # <<<<<<<<<<<<<< * if PY3: * return PyObject_CheckBuffer(ob) */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":29 * return PyObject_CheckBuffer(ob) or _Py2_IsBuffer(ob) * * cdef inline int is_datatype(object ob): # <<<<<<<<<<<<<< * if isinstance(ob, Datatype): return 1 * if PY3: */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_is_datatype(PyObject *__pyx_v_ob) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("is_datatype", 0); /* "mpi4py/MPI/msgbuffer.pxi":30 * * cdef inline int is_datatype(object ob): * if isinstance(ob, Datatype): return 1 # <<<<<<<<<<<<<< * if PY3: * if isinstance(ob, unicode): return 1 */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_ob, __pyx_ptype_6mpi4py_3MPI_Datatype); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 1; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":31 * cdef inline int is_datatype(object ob): * if isinstance(ob, Datatype): return 1 * if PY3: # <<<<<<<<<<<<<< * if isinstance(ob, unicode): return 1 * else: */ if ((PY_MAJOR_VERSION>=3)) { /* "mpi4py/MPI/msgbuffer.pxi":32 * if isinstance(ob, Datatype): return 1 * if PY3: * if isinstance(ob, unicode): return 1 # <<<<<<<<<<<<<< * else: * if isinstance(ob, bytes): return 1 */ __pyx_t_2 = PyUnicode_Check(__pyx_v_ob); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_r = 1; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":31 * cdef inline int is_datatype(object ob): * if isinstance(ob, Datatype): return 1 * if PY3: # <<<<<<<<<<<<<< * if isinstance(ob, unicode): return 1 * else: */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":34 * if isinstance(ob, unicode): return 1 * else: * if isinstance(ob, bytes): return 1 # <<<<<<<<<<<<<< * return 0 * */ /*else*/ { __pyx_t_1 = PyBytes_Check(__pyx_v_ob); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 1; goto __pyx_L0; } } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":35 * else: * if isinstance(ob, bytes): return 1 * return 0 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":29 * return PyObject_CheckBuffer(ob) or _Py2_IsBuffer(ob) * * cdef inline int is_datatype(object ob): # <<<<<<<<<<<<<< * if isinstance(ob, Datatype): return 1 * if PY3: */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":42 * int INT_MAX * * cdef inline int downcast(MPI_Aint value) except? -1: # <<<<<<<<<<<<<< * if value > INT_MAX: * raise OverflowError("integer %d does not fit in 'int'" % value) */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_downcast(MPI_Aint __pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("downcast", 0); /* "mpi4py/MPI/msgbuffer.pxi":43 * * cdef inline int downcast(MPI_Aint value) except? -1: * if value > INT_MAX: # <<<<<<<<<<<<<< * raise OverflowError("integer %d does not fit in 'int'" % value) * else: */ __pyx_t_1 = ((__pyx_v_value > ((MPI_Aint)INT_MAX)) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":44 * cdef inline int downcast(MPI_Aint value) except? -1: * if value > INT_MAX: * raise OverflowError("integer %d does not fit in 'int'" % value) # <<<<<<<<<<<<<< * else: * return value */ __pyx_t_2 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_integer_d_does_not_fit_in_int, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_OverflowError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(5, 44, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":43 * * cdef inline int downcast(MPI_Aint value) except? -1: * if value > INT_MAX: # <<<<<<<<<<<<<< * raise OverflowError("integer %d does not fit in 'int'" % value) * else: */ } /* "mpi4py/MPI/msgbuffer.pxi":46 * raise OverflowError("integer %d does not fit in 'int'" % value) * else: * return value # <<<<<<<<<<<<<< * * cdef inline int clipcount(MPI_Aint value): */ /*else*/ { __pyx_r = ((int)__pyx_v_value); goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":42 * int INT_MAX * * cdef inline int downcast(MPI_Aint value) except? -1: # <<<<<<<<<<<<<< * if value > INT_MAX: * raise OverflowError("integer %d does not fit in 'int'" % value) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.downcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":48 * return value * * cdef inline int clipcount(MPI_Aint value): # <<<<<<<<<<<<<< * if value > INT_MAX: * return INT_MAX */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_clipcount(MPI_Aint __pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("clipcount", 0); /* "mpi4py/MPI/msgbuffer.pxi":49 * * cdef inline int clipcount(MPI_Aint value): * if value > INT_MAX: # <<<<<<<<<<<<<< * return INT_MAX * else: */ __pyx_t_1 = ((__pyx_v_value > ((MPI_Aint)INT_MAX)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":50 * cdef inline int clipcount(MPI_Aint value): * if value > INT_MAX: * return INT_MAX # <<<<<<<<<<<<<< * else: * return value */ __pyx_r = INT_MAX; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":49 * * cdef inline int clipcount(MPI_Aint value): * if value > INT_MAX: # <<<<<<<<<<<<<< * return INT_MAX * else: */ } /* "mpi4py/MPI/msgbuffer.pxi":52 * return INT_MAX * else: * return value # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ /*else*/ { __pyx_r = ((int)__pyx_v_value); goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":48 * return value * * cdef inline int clipcount(MPI_Aint value): # <<<<<<<<<<<<<< * if value > INT_MAX: * return INT_MAX */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":70 * cdef Datatype type * * cdef _p_message message_basic(object o_buf, # <<<<<<<<<<<<<< * object o_type, * bint readonly, */ static struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_f_6mpi4py_3MPI_message_basic(PyObject *__pyx_v_o_buf, PyObject *__pyx_v_o_type, int __pyx_v_readonly, void **__pyx_v_baddr, MPI_Aint *__pyx_v_bsize, MPI_Datatype *__pyx_v_btype) { struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_v_m = 0; int __pyx_v_fmt; struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; MPI_Datatype __pyx_t_6; __Pyx_RefNannySetupContext("message_basic", 0); /* "mpi4py/MPI/msgbuffer.pxi":78 * MPI_Datatype *btype, * ): * cdef _p_message m = <_p_message>_p_message.__new__(_p_message) # <<<<<<<<<<<<<< * # special-case for BOTTOM or None, * # an explicit MPI datatype is required */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI__p_message(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI__p_message), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 78, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_message *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":81 * # special-case for BOTTOM or None, * # an explicit MPI datatype is required * if o_buf is __BOTTOM__ or o_buf is None: # <<<<<<<<<<<<<< * if isinstance(o_type, Datatype): * m.type = o_type */ __pyx_t_4 = (__pyx_v_o_buf == __pyx_v_6mpi4py_3MPI___BOTTOM__); __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = (__pyx_v_o_buf == Py_None); __pyx_t_4 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":82 * # an explicit MPI datatype is required * if o_buf is __BOTTOM__ or o_buf is None: * if isinstance(o_type, Datatype): # <<<<<<<<<<<<<< * m.type = o_type * else: */ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_o_type, __pyx_ptype_6mpi4py_3MPI_Datatype); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/msgbuffer.pxi":83 * if o_buf is __BOTTOM__ or o_buf is None: * if isinstance(o_type, Datatype): * m.type = o_type # <<<<<<<<<<<<<< * else: * m.type = TypeDict[o_type] */ __pyx_t_2 = __pyx_v_o_type; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_m->type); __Pyx_DECREF(((PyObject *)__pyx_v_m->type)); __pyx_v_m->type = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":82 * # an explicit MPI datatype is required * if o_buf is __BOTTOM__ or o_buf is None: * if isinstance(o_type, Datatype): # <<<<<<<<<<<<<< * m.type = o_type * else: */ goto __pyx_L6; } /* "mpi4py/MPI/msgbuffer.pxi":85 * m.type = o_type * else: * m.type = TypeDict[o_type] # <<<<<<<<<<<<<< * m.buf = newbuffer() * baddr[0] = MPI_BOTTOM */ /*else*/ { if (unlikely(__pyx_v_6mpi4py_3MPI_TypeDict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(5, 85, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_6mpi4py_3MPI_TypeDict, __pyx_v_o_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6mpi4py_3MPI_Datatype))))) __PYX_ERR(5, 85, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_m->type); __Pyx_DECREF(((PyObject *)__pyx_v_m->type)); __pyx_v_m->type = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L6:; /* "mpi4py/MPI/msgbuffer.pxi":86 * else: * m.type = TypeDict[o_type] * m.buf = newbuffer() # <<<<<<<<<<<<<< * baddr[0] = MPI_BOTTOM * bsize[0] = 0 */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_newbuffer()); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_m->buf); __Pyx_DECREF(((PyObject *)__pyx_v_m->buf)); __pyx_v_m->buf = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":87 * m.type = TypeDict[o_type] * m.buf = newbuffer() * baddr[0] = MPI_BOTTOM # <<<<<<<<<<<<<< * bsize[0] = 0 * btype[0] = m.type.ob_mpi */ (__pyx_v_baddr[0]) = MPI_BOTTOM; /* "mpi4py/MPI/msgbuffer.pxi":88 * m.buf = newbuffer() * baddr[0] = MPI_BOTTOM * bsize[0] = 0 # <<<<<<<<<<<<<< * btype[0] = m.type.ob_mpi * return m */ (__pyx_v_bsize[0]) = 0; /* "mpi4py/MPI/msgbuffer.pxi":89 * baddr[0] = MPI_BOTTOM * bsize[0] = 0 * btype[0] = m.type.ob_mpi # <<<<<<<<<<<<<< * return m * # get buffer base address and length */ __pyx_t_6 = __pyx_v_m->type->ob_mpi; (__pyx_v_btype[0]) = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":90 * bsize[0] = 0 * btype[0] = m.type.ob_mpi * return m # <<<<<<<<<<<<<< * # get buffer base address and length * cdef bint fmt = (o_type is None) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_m)); __pyx_r = __pyx_v_m; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":81 * # special-case for BOTTOM or None, * # an explicit MPI datatype is required * if o_buf is __BOTTOM__ or o_buf is None: # <<<<<<<<<<<<<< * if isinstance(o_type, Datatype): * m.type = o_type */ } /* "mpi4py/MPI/msgbuffer.pxi":92 * return m * # get buffer base address and length * cdef bint fmt = (o_type is None) # <<<<<<<<<<<<<< * m.buf = getbuffer(o_buf, readonly, fmt) * baddr[0] = m.buf.view.buf */ __pyx_t_4 = (__pyx_v_o_type == Py_None); __pyx_v_fmt = __pyx_t_4; /* "mpi4py/MPI/msgbuffer.pxi":93 * # get buffer base address and length * cdef bint fmt = (o_type is None) * m.buf = getbuffer(o_buf, readonly, fmt) # <<<<<<<<<<<<<< * baddr[0] = m.buf.view.buf * bsize[0] = m.buf.view.len */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer(__pyx_v_o_buf, __pyx_v_readonly, __pyx_v_fmt)); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_m->buf); __Pyx_DECREF(((PyObject *)__pyx_v_m->buf)); __pyx_v_m->buf = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":94 * cdef bint fmt = (o_type is None) * m.buf = getbuffer(o_buf, readonly, fmt) * baddr[0] = m.buf.view.buf # <<<<<<<<<<<<<< * bsize[0] = m.buf.view.len * # lookup datatype if not provided or not a Datatype */ (__pyx_v_baddr[0]) = ((void *)__pyx_v_m->buf->view.buf); /* "mpi4py/MPI/msgbuffer.pxi":95 * m.buf = getbuffer(o_buf, readonly, fmt) * baddr[0] = m.buf.view.buf * bsize[0] = m.buf.view.len # <<<<<<<<<<<<<< * # lookup datatype if not provided or not a Datatype * if isinstance(o_type, Datatype): */ (__pyx_v_bsize[0]) = ((MPI_Aint)__pyx_v_m->buf->view.len); /* "mpi4py/MPI/msgbuffer.pxi":97 * bsize[0] = m.buf.view.len * # lookup datatype if not provided or not a Datatype * if isinstance(o_type, Datatype): # <<<<<<<<<<<<<< * m.type = o_type * elif o_type is None: */ __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_o_type, __pyx_ptype_6mpi4py_3MPI_Datatype); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":98 * # lookup datatype if not provided or not a Datatype * if isinstance(o_type, Datatype): * m.type = o_type # <<<<<<<<<<<<<< * elif o_type is None: * m.type = TypeDict[getformat(m.buf)] */ __pyx_t_2 = __pyx_v_o_type; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_m->type); __Pyx_DECREF(((PyObject *)__pyx_v_m->type)); __pyx_v_m->type = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":97 * bsize[0] = m.buf.view.len * # lookup datatype if not provided or not a Datatype * if isinstance(o_type, Datatype): # <<<<<<<<<<<<<< * m.type = o_type * elif o_type is None: */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":99 * if isinstance(o_type, Datatype): * m.type = o_type * elif o_type is None: # <<<<<<<<<<<<<< * m.type = TypeDict[getformat(m.buf)] * else: */ __pyx_t_3 = (__pyx_v_o_type == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/msgbuffer.pxi":100 * m.type = o_type * elif o_type is None: * m.type = TypeDict[getformat(m.buf)] # <<<<<<<<<<<<<< * else: * m.type = TypeDict[o_type] */ if (unlikely(__pyx_v_6mpi4py_3MPI_TypeDict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(5, 100, __pyx_L1_error) } __pyx_t_2 = ((PyObject *)__pyx_v_m->buf); __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_getformat(((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_6mpi4py_3MPI_TypeDict, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6mpi4py_3MPI_Datatype))))) __PYX_ERR(5, 100, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_m->type); __Pyx_DECREF(((PyObject *)__pyx_v_m->type)); __pyx_v_m->type = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":99 * if isinstance(o_type, Datatype): * m.type = o_type * elif o_type is None: # <<<<<<<<<<<<<< * m.type = TypeDict[getformat(m.buf)] * else: */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":102 * m.type = TypeDict[getformat(m.buf)] * else: * m.type = TypeDict[o_type] # <<<<<<<<<<<<<< * btype[0] = m.type.ob_mpi * # and we are done ... */ /*else*/ { if (unlikely(__pyx_v_6mpi4py_3MPI_TypeDict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(5, 102, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_6mpi4py_3MPI_TypeDict, __pyx_v_o_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6mpi4py_3MPI_Datatype))))) __PYX_ERR(5, 102, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_m->type); __Pyx_DECREF(((PyObject *)__pyx_v_m->type)); __pyx_v_m->type = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L7:; /* "mpi4py/MPI/msgbuffer.pxi":103 * else: * m.type = TypeDict[o_type] * btype[0] = m.type.ob_mpi # <<<<<<<<<<<<<< * # and we are done ... * return m */ __pyx_t_6 = __pyx_v_m->type->ob_mpi; (__pyx_v_btype[0]) = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":105 * btype[0] = m.type.ob_mpi * # and we are done ... * return m # <<<<<<<<<<<<<< * * cdef _p_message message_simple(object msg, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_m)); __pyx_r = __pyx_v_m; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":70 * cdef Datatype type * * cdef _p_message message_basic(object o_buf, # <<<<<<<<<<<<<< * object o_type, * bint readonly, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.message_basic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":107 * return m * * cdef _p_message message_simple(object msg, # <<<<<<<<<<<<<< * int readonly, * int rank, */ static struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_f_6mpi4py_3MPI_message_simple(PyObject *__pyx_v_msg, int __pyx_v_readonly, int __pyx_v_rank, int __pyx_v_blocks, void **__pyx_v__addr, int *__pyx_v__count, MPI_Datatype *__pyx_v__type) { Py_ssize_t __pyx_v_nargs; PyObject *__pyx_v_o_buf = 0; PyObject *__pyx_v_o_count = 0; PyObject *__pyx_v_o_displ = 0; PyObject *__pyx_v_o_type = 0; void *__pyx_v_baddr; MPI_Aint __pyx_v_bsize; MPI_Datatype __pyx_v_btype; struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_v_m = 0; int __pyx_v_count; int __pyx_v_displ; MPI_Aint __pyx_v_extent; MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_length; MPI_Aint __pyx_v_offset; struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; __Pyx_RefNannySetupContext("message_simple", 0); /* "mpi4py/MPI/msgbuffer.pxi":117 * ): * # special-case PROC_NULL target rank * if rank == MPI_PROC_NULL: # <<<<<<<<<<<<<< * _addr[0] = NULL * _count[0] = 0 */ __pyx_t_1 = ((__pyx_v_rank == MPI_PROC_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":118 * # special-case PROC_NULL target rank * if rank == MPI_PROC_NULL: * _addr[0] = NULL # <<<<<<<<<<<<<< * _count[0] = 0 * _type[0] = MPI_BYTE */ (__pyx_v__addr[0]) = NULL; /* "mpi4py/MPI/msgbuffer.pxi":119 * if rank == MPI_PROC_NULL: * _addr[0] = NULL * _count[0] = 0 # <<<<<<<<<<<<<< * _type[0] = MPI_BYTE * return None */ (__pyx_v__count[0]) = 0; /* "mpi4py/MPI/msgbuffer.pxi":120 * _addr[0] = NULL * _count[0] = 0 * _type[0] = MPI_BYTE # <<<<<<<<<<<<<< * return None * # unpack message list/tuple */ (__pyx_v__type[0]) = MPI_BYTE; /* "mpi4py/MPI/msgbuffer.pxi":121 * _count[0] = 0 * _type[0] = MPI_BYTE * return None # <<<<<<<<<<<<<< * # unpack message list/tuple * cdef Py_ssize_t nargs = 0 */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_r = ((struct __pyx_obj_6mpi4py_3MPI__p_message *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":117 * ): * # special-case PROC_NULL target rank * if rank == MPI_PROC_NULL: # <<<<<<<<<<<<<< * _addr[0] = NULL * _count[0] = 0 */ } /* "mpi4py/MPI/msgbuffer.pxi":123 * return None * # unpack message list/tuple * cdef Py_ssize_t nargs = 0 # <<<<<<<<<<<<<< * cdef object o_buf = None * cdef object o_count = None */ __pyx_v_nargs = 0; /* "mpi4py/MPI/msgbuffer.pxi":124 * # unpack message list/tuple * cdef Py_ssize_t nargs = 0 * cdef object o_buf = None # <<<<<<<<<<<<<< * cdef object o_count = None * cdef object o_displ = None */ __Pyx_INCREF(Py_None); __pyx_v_o_buf = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":125 * cdef Py_ssize_t nargs = 0 * cdef object o_buf = None * cdef object o_count = None # <<<<<<<<<<<<<< * cdef object o_displ = None * cdef object o_type = None */ __Pyx_INCREF(Py_None); __pyx_v_o_count = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":126 * cdef object o_buf = None * cdef object o_count = None * cdef object o_displ = None # <<<<<<<<<<<<<< * cdef object o_type = None * if is_buffer(msg): */ __Pyx_INCREF(Py_None); __pyx_v_o_displ = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":127 * cdef object o_count = None * cdef object o_displ = None * cdef object o_type = None # <<<<<<<<<<<<<< * if is_buffer(msg): * o_buf = msg */ __Pyx_INCREF(Py_None); __pyx_v_o_type = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":128 * cdef object o_displ = None * cdef object o_type = None * if is_buffer(msg): # <<<<<<<<<<<<<< * o_buf = msg * elif is_list(msg) or is_tuple(msg): */ __pyx_t_1 = (__pyx_f_6mpi4py_3MPI_is_buffer(__pyx_v_msg) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":129 * cdef object o_type = None * if is_buffer(msg): * o_buf = msg # <<<<<<<<<<<<<< * elif is_list(msg) or is_tuple(msg): * nargs = len(msg) */ __Pyx_INCREF(__pyx_v_msg); __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_v_msg); /* "mpi4py/MPI/msgbuffer.pxi":128 * cdef object o_displ = None * cdef object o_type = None * if is_buffer(msg): # <<<<<<<<<<<<<< * o_buf = msg * elif is_list(msg) or is_tuple(msg): */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":130 * if is_buffer(msg): * o_buf = msg * elif is_list(msg) or is_tuple(msg): # <<<<<<<<<<<<<< * nargs = len(msg) * if nargs == 2: */ __pyx_t_2 = (PyList_Check(__pyx_v_msg) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = (PyTuple_Check(__pyx_v_msg) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":131 * o_buf = msg * elif is_list(msg) or is_tuple(msg): * nargs = len(msg) # <<<<<<<<<<<<<< * if nargs == 2: * (o_buf, o_count) = msg */ __pyx_t_3 = PyObject_Length(__pyx_v_msg); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(5, 131, __pyx_L1_error) __pyx_v_nargs = __pyx_t_3; /* "mpi4py/MPI/msgbuffer.pxi":132 * elif is_list(msg) or is_tuple(msg): * nargs = len(msg) * if nargs == 2: # <<<<<<<<<<<<<< * (o_buf, o_count) = msg * if is_datatype(o_count): */ __pyx_t_1 = ((__pyx_v_nargs == 2) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":133 * nargs = len(msg) * if nargs == 2: * (o_buf, o_count) = msg # <<<<<<<<<<<<<< * if is_datatype(o_count): * (o_count, o_type) = None, o_count */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 133, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(5, 133, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 133, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_o_count, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":134 * if nargs == 2: * (o_buf, o_count) = msg * if is_datatype(o_count): # <<<<<<<<<<<<<< * (o_count, o_type) = None, o_count * elif is_tuple(o_count) or is_list(o_count): */ __pyx_t_1 = (__pyx_f_6mpi4py_3MPI_is_datatype(__pyx_v_o_count) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":135 * (o_buf, o_count) = msg * if is_datatype(o_count): * (o_count, o_type) = None, o_count # <<<<<<<<<<<<<< * elif is_tuple(o_count) or is_list(o_count): * (o_count, o_displ) = o_count */ __pyx_t_5 = Py_None; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = __pyx_v_o_count; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_o_count, __pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_o_type, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgbuffer.pxi":134 * if nargs == 2: * (o_buf, o_count) = msg * if is_datatype(o_count): # <<<<<<<<<<<<<< * (o_count, o_type) = None, o_count * elif is_tuple(o_count) or is_list(o_count): */ goto __pyx_L10; } /* "mpi4py/MPI/msgbuffer.pxi":136 * if is_datatype(o_count): * (o_count, o_type) = None, o_count * elif is_tuple(o_count) or is_list(o_count): # <<<<<<<<<<<<<< * (o_count, o_displ) = o_count * elif nargs == 3: */ __pyx_t_2 = (PyTuple_Check(__pyx_v_o_count) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L11_bool_binop_done; } __pyx_t_2 = (PyList_Check(__pyx_v_o_count) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L11_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":137 * (o_count, o_type) = None, o_count * elif is_tuple(o_count) or is_list(o_count): * (o_count, o_displ) = o_count # <<<<<<<<<<<<<< * elif nargs == 3: * (o_buf, o_count, o_type) = msg */ if ((likely(PyTuple_CheckExact(__pyx_v_o_count))) || (PyList_CheckExact(__pyx_v_o_count))) { PyObject* sequence = __pyx_v_o_count; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 137, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_o_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(5, 137, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L14_unpacking_done; __pyx_L13_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 137, __pyx_L1_error) __pyx_L14_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_count, __pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_o_displ, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":136 * if is_datatype(o_count): * (o_count, o_type) = None, o_count * elif is_tuple(o_count) or is_list(o_count): # <<<<<<<<<<<<<< * (o_count, o_displ) = o_count * elif nargs == 3: */ } __pyx_L10:; /* "mpi4py/MPI/msgbuffer.pxi":132 * elif is_list(msg) or is_tuple(msg): * nargs = len(msg) * if nargs == 2: # <<<<<<<<<<<<<< * (o_buf, o_count) = msg * if is_datatype(o_count): */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":138 * elif is_tuple(o_count) or is_list(o_count): * (o_count, o_displ) = o_count * elif nargs == 3: # <<<<<<<<<<<<<< * (o_buf, o_count, o_type) = msg * if is_tuple(o_count) or is_list(o_count): */ __pyx_t_1 = ((__pyx_v_nargs == 3) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":139 * (o_count, o_displ) = o_count * elif nargs == 3: * (o_buf, o_count, o_type) = msg # <<<<<<<<<<<<<< * if is_tuple(o_count) or is_list(o_count): * (o_count, o_displ) = o_count */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 139, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); __pyx_t_6 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_7(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 2; __pyx_t_6 = __pyx_t_7(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_8), 3) < 0) __PYX_ERR(5, 139, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L16_unpacking_done; __pyx_L15_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 139, __pyx_L1_error) __pyx_L16_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_o_count, __pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_o_type, __pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":140 * elif nargs == 3: * (o_buf, o_count, o_type) = msg * if is_tuple(o_count) or is_list(o_count): # <<<<<<<<<<<<<< * (o_count, o_displ) = o_count * elif nargs == 4: */ __pyx_t_2 = (PyTuple_Check(__pyx_v_o_count) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L18_bool_binop_done; } __pyx_t_2 = (PyList_Check(__pyx_v_o_count) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L18_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":141 * (o_buf, o_count, o_type) = msg * if is_tuple(o_count) or is_list(o_count): * (o_count, o_displ) = o_count # <<<<<<<<<<<<<< * elif nargs == 4: * (o_buf, o_count, o_displ, o_type) = msg */ if ((likely(PyTuple_CheckExact(__pyx_v_o_count))) || (PyList_CheckExact(__pyx_v_o_count))) { PyObject* sequence = __pyx_v_o_count; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 141, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_o_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L20_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L20_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 2) < 0) __PYX_ERR(5, 141, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L21_unpacking_done; __pyx_L20_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 141, __pyx_L1_error) __pyx_L21_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_count, __pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_o_displ, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgbuffer.pxi":140 * elif nargs == 3: * (o_buf, o_count, o_type) = msg * if is_tuple(o_count) or is_list(o_count): # <<<<<<<<<<<<<< * (o_count, o_displ) = o_count * elif nargs == 4: */ } /* "mpi4py/MPI/msgbuffer.pxi":138 * elif is_tuple(o_count) or is_list(o_count): * (o_count, o_displ) = o_count * elif nargs == 3: # <<<<<<<<<<<<<< * (o_buf, o_count, o_type) = msg * if is_tuple(o_count) or is_list(o_count): */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":142 * if is_tuple(o_count) or is_list(o_count): * (o_count, o_displ) = o_count * elif nargs == 4: # <<<<<<<<<<<<<< * (o_buf, o_count, o_displ, o_type) = msg * else: */ __pyx_t_1 = ((__pyx_v_nargs == 4) != 0); if (likely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":143 * (o_count, o_displ) = o_count * elif nargs == 4: * (o_buf, o_count, o_displ, o_type) = msg # <<<<<<<<<<<<<< * else: * raise ValueError("message: expecting 2 to 4 items") */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 143, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); __pyx_t_5 = PyList_GET_ITEM(sequence, 2); __pyx_t_8 = PyList_GET_ITEM(sequence, 3); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); #else { Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_6,&__pyx_t_5,&__pyx_t_8}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(5, 143, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_6,&__pyx_t_5,&__pyx_t_8}; __pyx_t_9 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = Py_TYPE(__pyx_t_9)->tp_iternext; for (index=0; index < 4; index++) { PyObject* item = __pyx_t_7(__pyx_t_9); if (unlikely(!item)) goto __pyx_L22_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_9), 4) < 0) __PYX_ERR(5, 143, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L23_unpacking_done; __pyx_L22_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 143, __pyx_L1_error) __pyx_L23_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_o_count, __pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_o_displ, __pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_o_type, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":142 * if is_tuple(o_count) or is_list(o_count): * (o_count, o_displ) = o_count * elif nargs == 4: # <<<<<<<<<<<<<< * (o_buf, o_count, o_displ, o_type) = msg * else: */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":145 * (o_buf, o_count, o_displ, o_type) = msg * else: * raise ValueError("message: expecting 2 to 4 items") # <<<<<<<<<<<<<< * elif PYPY: * o_buf = msg */ /*else*/ { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 145, __pyx_L1_error) } __pyx_L7:; /* "mpi4py/MPI/msgbuffer.pxi":130 * if is_buffer(msg): * o_buf = msg * elif is_list(msg) or is_tuple(msg): # <<<<<<<<<<<<<< * nargs = len(msg) * if nargs == 2: */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":146 * else: * raise ValueError("message: expecting 2 to 4 items") * elif PYPY: # <<<<<<<<<<<<<< * o_buf = msg * else: */ if (likely(PyMPI_RUNTIME_PYPY)) { /* "mpi4py/MPI/msgbuffer.pxi":147 * raise ValueError("message: expecting 2 to 4 items") * elif PYPY: * o_buf = msg # <<<<<<<<<<<<<< * else: * raise TypeError("message: expecting buffer or list/tuple") */ __Pyx_INCREF(__pyx_v_msg); __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_v_msg); /* "mpi4py/MPI/msgbuffer.pxi":146 * else: * raise ValueError("message: expecting 2 to 4 items") * elif PYPY: # <<<<<<<<<<<<<< * o_buf = msg * else: */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":149 * o_buf = msg * else: * raise TypeError("message: expecting buffer or list/tuple") # <<<<<<<<<<<<<< * # buffer: address, length, and datatype * cdef void *baddr = NULL */ /*else*/ { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 149, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":151 * raise TypeError("message: expecting buffer or list/tuple") * # buffer: address, length, and datatype * cdef void *baddr = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint bsize = 0 * cdef MPI_Datatype btype = MPI_DATATYPE_NULL */ __pyx_v_baddr = NULL; /* "mpi4py/MPI/msgbuffer.pxi":152 * # buffer: address, length, and datatype * cdef void *baddr = NULL * cdef MPI_Aint bsize = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype btype = MPI_DATATYPE_NULL * cdef _p_message m = message_basic(o_buf, o_type, readonly, */ __pyx_v_bsize = 0; /* "mpi4py/MPI/msgbuffer.pxi":153 * cdef void *baddr = NULL * cdef MPI_Aint bsize = 0 * cdef MPI_Datatype btype = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * cdef _p_message m = message_basic(o_buf, o_type, readonly, * &baddr, &bsize, &btype) */ __pyx_v_btype = MPI_DATATYPE_NULL; /* "mpi4py/MPI/msgbuffer.pxi":154 * cdef MPI_Aint bsize = 0 * cdef MPI_Datatype btype = MPI_DATATYPE_NULL * cdef _p_message m = message_basic(o_buf, o_type, readonly, # <<<<<<<<<<<<<< * &baddr, &bsize, &btype) * # buffer: count and displacement */ __pyx_t_8 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_basic(__pyx_v_o_buf, __pyx_v_o_type, __pyx_v_readonly, (&__pyx_v_baddr), (&__pyx_v_bsize), (&__pyx_v_btype))); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_message *)__pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":157 * &baddr, &bsize, &btype) * # buffer: count and displacement * cdef int count = 0 # number of datatype entries # <<<<<<<<<<<<<< * cdef int displ = 0 # from base buffer, in datatype entries * cdef MPI_Aint extent = 0, lb = 0 # datatype extent */ __pyx_v_count = 0; /* "mpi4py/MPI/msgbuffer.pxi":158 * # buffer: count and displacement * cdef int count = 0 # number of datatype entries * cdef int displ = 0 # from base buffer, in datatype entries # <<<<<<<<<<<<<< * cdef MPI_Aint extent = 0, lb = 0 # datatype extent * cdef MPI_Aint length = bsize # in bytes */ __pyx_v_displ = 0; /* "mpi4py/MPI/msgbuffer.pxi":159 * cdef int count = 0 # number of datatype entries * cdef int displ = 0 # from base buffer, in datatype entries * cdef MPI_Aint extent = 0, lb = 0 # datatype extent # <<<<<<<<<<<<<< * cdef MPI_Aint length = bsize # in bytes * cdef MPI_Aint offset = 0 # from base buffer, in bytes */ __pyx_v_extent = 0; __pyx_v_lb = 0; /* "mpi4py/MPI/msgbuffer.pxi":160 * cdef int displ = 0 # from base buffer, in datatype entries * cdef MPI_Aint extent = 0, lb = 0 # datatype extent * cdef MPI_Aint length = bsize # in bytes # <<<<<<<<<<<<<< * cdef MPI_Aint offset = 0 # from base buffer, in bytes * if o_displ is not None: */ __pyx_v_length = __pyx_v_bsize; /* "mpi4py/MPI/msgbuffer.pxi":161 * cdef MPI_Aint extent = 0, lb = 0 # datatype extent * cdef MPI_Aint length = bsize # in bytes * cdef MPI_Aint offset = 0 # from base buffer, in bytes # <<<<<<<<<<<<<< * if o_displ is not None: * displ = o_displ */ __pyx_v_offset = 0; /* "mpi4py/MPI/msgbuffer.pxi":162 * cdef MPI_Aint length = bsize # in bytes * cdef MPI_Aint offset = 0 # from base buffer, in bytes * if o_displ is not None: # <<<<<<<<<<<<<< * displ = o_displ * if displ < 0: raise ValueError( */ __pyx_t_1 = (__pyx_v_o_displ != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":163 * cdef MPI_Aint offset = 0 # from base buffer, in bytes * if o_displ is not None: * displ = o_displ # <<<<<<<<<<<<<< * if displ < 0: raise ValueError( * "message: negative diplacement %d" % displ) */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_o_displ); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 163, __pyx_L1_error) __pyx_v_displ = ((int)__pyx_t_10); /* "mpi4py/MPI/msgbuffer.pxi":164 * if o_displ is not None: * displ = o_displ * if displ < 0: raise ValueError( # <<<<<<<<<<<<<< * "message: negative diplacement %d" % displ) * if displ > 0: */ __pyx_t_2 = ((__pyx_v_displ < 0) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":165 * displ = o_displ * if displ < 0: raise ValueError( * "message: negative diplacement %d" % displ) # <<<<<<<<<<<<<< * if displ > 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( */ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_displ); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_message_negative_diplacement_d, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":164 * if o_displ is not None: * displ = o_displ * if displ < 0: raise ValueError( # <<<<<<<<<<<<<< * "message: negative diplacement %d" % displ) * if displ > 0: */ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 164, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":166 * if displ < 0: raise ValueError( * "message: negative diplacement %d" % displ) * if displ > 0: # <<<<<<<<<<<<<< * if btype == MPI_DATATYPE_NULL: raise ValueError( * "message: cannot handle diplacement, datatype is null") */ __pyx_t_2 = ((__pyx_v_displ > 0) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":167 * "message: negative diplacement %d" % displ) * if displ > 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( # <<<<<<<<<<<<<< * "message: cannot handle diplacement, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) */ __pyx_t_2 = ((__pyx_v_btype == MPI_DATATYPE_NULL) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 167, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":169 * if btype == MPI_DATATYPE_NULL: raise ValueError( * "message: cannot handle diplacement, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) # <<<<<<<<<<<<<< * if extent <= 0: raise ValueError( * ("message: cannot handle diplacement, " */ __pyx_t_10 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent(__pyx_v_btype, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 169, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":170 * "message: cannot handle diplacement, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) * if extent <= 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot handle diplacement, " * "datatype extent %d (lb:%d, ub:%d)" */ __pyx_t_2 = ((__pyx_v_extent <= 0) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":173 * ("message: cannot handle diplacement, " * "datatype extent %d (lb:%d, ub:%d)" * ) % (extent, lb, lb+extent)) # <<<<<<<<<<<<<< * if displ*extent > length: raise ValueError( * ("message: displacement %d out of bounds, " */ __pyx_t_8 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_extent); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_lb); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_lb + __pyx_v_extent)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6); __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_message_cannot_handle_diplacemen_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgbuffer.pxi":170 * "message: cannot handle diplacement, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) * if extent <= 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot handle diplacement, " * "datatype extent %d (lb:%d, ub:%d)" */ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(5, 170, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":174 * "datatype extent %d (lb:%d, ub:%d)" * ) % (extent, lb, lb+extent)) * if displ*extent > length: raise ValueError( # <<<<<<<<<<<<<< * ("message: displacement %d out of bounds, " * "number of datatype entries %d" */ __pyx_t_2 = (((__pyx_v_displ * __pyx_v_extent) > __pyx_v_length) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":177 * ("message: displacement %d out of bounds, " * "number of datatype entries %d" * ) % (displ, length//extent)) # <<<<<<<<<<<<<< * offset = displ*extent * length -= offset */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_displ); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_length / __pyx_v_extent)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_message_displacement_d_out_of_bo, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":174 * "datatype extent %d (lb:%d, ub:%d)" * ) % (extent, lb, lb+extent)) * if displ*extent > length: raise ValueError( # <<<<<<<<<<<<<< * ("message: displacement %d out of bounds, " * "number of datatype entries %d" */ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 174, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":178 * "number of datatype entries %d" * ) % (displ, length//extent)) * offset = displ*extent # <<<<<<<<<<<<<< * length -= offset * if o_count is not None: */ __pyx_v_offset = (__pyx_v_displ * __pyx_v_extent); /* "mpi4py/MPI/msgbuffer.pxi":179 * ) % (displ, length//extent)) * offset = displ*extent * length -= offset # <<<<<<<<<<<<<< * if o_count is not None: * count = o_count */ __pyx_v_length = (__pyx_v_length - __pyx_v_offset); /* "mpi4py/MPI/msgbuffer.pxi":166 * if displ < 0: raise ValueError( * "message: negative diplacement %d" % displ) * if displ > 0: # <<<<<<<<<<<<<< * if btype == MPI_DATATYPE_NULL: raise ValueError( * "message: cannot handle diplacement, datatype is null") */ } /* "mpi4py/MPI/msgbuffer.pxi":162 * cdef MPI_Aint length = bsize # in bytes * cdef MPI_Aint offset = 0 # from base buffer, in bytes * if o_displ is not None: # <<<<<<<<<<<<<< * displ = o_displ * if displ < 0: raise ValueError( */ } /* "mpi4py/MPI/msgbuffer.pxi":180 * offset = displ*extent * length -= offset * if o_count is not None: # <<<<<<<<<<<<<< * count = o_count * if count < 0: raise ValueError( */ __pyx_t_2 = (__pyx_v_o_count != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":181 * length -= offset * if o_count is not None: * count = o_count # <<<<<<<<<<<<<< * if count < 0: raise ValueError( * "message: negative count %d" % count) */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_o_count); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 181, __pyx_L1_error) __pyx_v_count = ((int)__pyx_t_10); /* "mpi4py/MPI/msgbuffer.pxi":182 * if o_count is not None: * count = o_count * if count < 0: raise ValueError( # <<<<<<<<<<<<<< * "message: negative count %d" % count) * if count > 0 and o_buf is None: raise ValueError( */ __pyx_t_1 = ((__pyx_v_count < 0) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":183 * count = o_count * if count < 0: raise ValueError( * "message: negative count %d" % count) # <<<<<<<<<<<<<< * if count > 0 and o_buf is None: raise ValueError( * "message: buffer is None but count is %d" % count) */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_message_negative_count_d, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":182 * if o_count is not None: * count = o_count * if count < 0: raise ValueError( # <<<<<<<<<<<<<< * "message: negative count %d" % count) * if count > 0 and o_buf is None: raise ValueError( */ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 182, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":184 * if count < 0: raise ValueError( * "message: negative count %d" % count) * if count > 0 and o_buf is None: raise ValueError( # <<<<<<<<<<<<<< * "message: buffer is None but count is %d" % count) * elif length > 0: */ __pyx_t_2 = ((__pyx_v_count > 0) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L33_bool_binop_done; } __pyx_t_2 = (__pyx_v_o_buf == Py_None); __pyx_t_11 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_11; __pyx_L33_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":185 * "message: negative count %d" % count) * if count > 0 and o_buf is None: raise ValueError( * "message: buffer is None but count is %d" % count) # <<<<<<<<<<<<<< * elif length > 0: * if extent == 0: */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_message_buffer_is_None_but_count, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":184 * if count < 0: raise ValueError( * "message: negative count %d" % count) * if count > 0 and o_buf is None: raise ValueError( # <<<<<<<<<<<<<< * "message: buffer is None but count is %d" % count) * elif length > 0: */ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 184, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":180 * offset = displ*extent * length -= offset * if o_count is not None: # <<<<<<<<<<<<<< * count = o_count * if count < 0: raise ValueError( */ goto __pyx_L30; } /* "mpi4py/MPI/msgbuffer.pxi":186 * if count > 0 and o_buf is None: raise ValueError( * "message: buffer is None but count is %d" % count) * elif length > 0: # <<<<<<<<<<<<<< * if extent == 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( */ __pyx_t_1 = ((__pyx_v_length > 0) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":187 * "message: buffer is None but count is %d" % count) * elif length > 0: * if extent == 0: # <<<<<<<<<<<<<< * if btype == MPI_DATATYPE_NULL: raise ValueError( * "message: cannot infer count, datatype is null") */ __pyx_t_1 = ((__pyx_v_extent == 0) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":188 * elif length > 0: * if extent == 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( # <<<<<<<<<<<<<< * "message: cannot infer count, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) */ __pyx_t_1 = ((__pyx_v_btype == MPI_DATATYPE_NULL) != 0); if (unlikely(__pyx_t_1)) { __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 188, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":190 * if btype == MPI_DATATYPE_NULL: raise ValueError( * "message: cannot infer count, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) # <<<<<<<<<<<<<< * if extent <= 0: raise ValueError( * ("message: cannot infer count, " */ __pyx_t_10 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent(__pyx_v_btype, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 190, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":191 * "message: cannot infer count, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) * if extent <= 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "datatype extent %d (lb:%d, ub:%d)" */ __pyx_t_1 = ((__pyx_v_extent <= 0) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":194 * ("message: cannot infer count, " * "datatype extent %d (lb:%d, ub:%d)" * ) % (extent, lb, lb+extent)) # <<<<<<<<<<<<<< * if (length % extent) != 0: raise ValueError( * ("message: cannot infer count, " */ __pyx_t_5 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_extent); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_lb); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_lb + __pyx_v_extent)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_message_cannot_infer_count_datat_2, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":191 * "message: cannot infer count, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) * if extent <= 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "datatype extent %d (lb:%d, ub:%d)" */ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 191, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":187 * "message: buffer is None but count is %d" % count) * elif length > 0: * if extent == 0: # <<<<<<<<<<<<<< * if btype == MPI_DATATYPE_NULL: raise ValueError( * "message: cannot infer count, datatype is null") */ } /* "mpi4py/MPI/msgbuffer.pxi":195 * "datatype extent %d (lb:%d, ub:%d)" * ) % (extent, lb, lb+extent)) * if (length % extent) != 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "buffer length %d is not a multiple of " */ __pyx_t_1 = (((__pyx_v_length % __pyx_v_extent) != 0) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":199 * "buffer length %d is not a multiple of " * "datatype extent %d (lb:%d, ub:%d)" * ) % (length, extent, lb, lb+extent)) # <<<<<<<<<<<<<< * if blocks < 2: * count = downcast(length // extent) */ __pyx_t_8 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_length); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_extent); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_lb); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_lb + __pyx_v_extent)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_5); __pyx_t_8 = 0; __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_message_cannot_infer_count_buffe, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgbuffer.pxi":195 * "datatype extent %d (lb:%d, ub:%d)" * ) % (extent, lb, lb+extent)) * if (length % extent) != 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "buffer length %d is not a multiple of " */ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(5, 195, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":200 * "datatype extent %d (lb:%d, ub:%d)" * ) % (length, extent, lb, lb+extent)) * if blocks < 2: # <<<<<<<<<<<<<< * count = downcast(length // extent) * else: */ __pyx_t_1 = ((__pyx_v_blocks < 2) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":201 * ) % (length, extent, lb, lb+extent)) * if blocks < 2: * count = downcast(length // extent) # <<<<<<<<<<<<<< * else: * if ((length // extent) % blocks) != 0: raise ValueError( */ __pyx_t_10 = __pyx_f_6mpi4py_3MPI_downcast((__pyx_v_length / __pyx_v_extent)); if (unlikely(__pyx_t_10 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(5, 201, __pyx_L1_error) __pyx_v_count = __pyx_t_10; /* "mpi4py/MPI/msgbuffer.pxi":200 * "datatype extent %d (lb:%d, ub:%d)" * ) % (length, extent, lb, lb+extent)) * if blocks < 2: # <<<<<<<<<<<<<< * count = downcast(length // extent) * else: */ goto __pyx_L39; } /* "mpi4py/MPI/msgbuffer.pxi":203 * count = downcast(length // extent) * else: * if ((length // extent) % blocks) != 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "number of entries %d is not a multiple of " */ /*else*/ { __pyx_t_1 = ((((__pyx_v_length / __pyx_v_extent) % __pyx_v_blocks) != 0) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":207 * "number of entries %d is not a multiple of " * "required number of blocks %d" * ) % (length//extent, blocks)) # <<<<<<<<<<<<<< * count = downcast((length // extent) // blocks) * # return collected message data */ __pyx_t_9 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_length / __pyx_v_extent)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_blocks); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __pyx_t_9 = 0; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_message_cannot_infer_count_numbe, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":203 * count = downcast(length // extent) * else: * if ((length // extent) % blocks) != 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "number of entries %d is not a multiple of " */ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(5, 203, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":208 * "required number of blocks %d" * ) % (length//extent, blocks)) * count = downcast((length // extent) // blocks) # <<<<<<<<<<<<<< * # return collected message data * m.count = o_count if o_count is not None else count */ __pyx_t_10 = __pyx_f_6mpi4py_3MPI_downcast(((__pyx_v_length / __pyx_v_extent) / __pyx_v_blocks)); if (unlikely(__pyx_t_10 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(5, 208, __pyx_L1_error) __pyx_v_count = __pyx_t_10; } __pyx_L39:; /* "mpi4py/MPI/msgbuffer.pxi":186 * if count > 0 and o_buf is None: raise ValueError( * "message: buffer is None but count is %d" % count) * elif length > 0: # <<<<<<<<<<<<<< * if extent == 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( */ } __pyx_L30:; /* "mpi4py/MPI/msgbuffer.pxi":210 * count = downcast((length // extent) // blocks) * # return collected message data * m.count = o_count if o_count is not None else count # <<<<<<<<<<<<<< * m.displ = o_displ if o_displ is not None else displ * _addr[0] = (baddr + offset) */ __pyx_t_1 = (__pyx_v_o_count != Py_None); if ((__pyx_t_1 != 0)) { __Pyx_INCREF(__pyx_v_o_count); __pyx_t_6 = __pyx_v_o_count; } else { __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_count); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_m->count); __Pyx_DECREF(__pyx_v_m->count); __pyx_v_m->count = __pyx_t_6; __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":211 * # return collected message data * m.count = o_count if o_count is not None else count * m.displ = o_displ if o_displ is not None else displ # <<<<<<<<<<<<<< * _addr[0] = (baddr + offset) * _count[0] = count */ __pyx_t_1 = (__pyx_v_o_displ != Py_None); if ((__pyx_t_1 != 0)) { __Pyx_INCREF(__pyx_v_o_displ); __pyx_t_6 = __pyx_v_o_displ; } else { __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_displ); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_m->displ); __Pyx_DECREF(__pyx_v_m->displ); __pyx_v_m->displ = __pyx_t_6; __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":212 * m.count = o_count if o_count is not None else count * m.displ = o_displ if o_displ is not None else displ * _addr[0] = (baddr + offset) # <<<<<<<<<<<<<< * _count[0] = count * _type[0] = btype */ (__pyx_v__addr[0]) = ((void *)(((char *)__pyx_v_baddr) + __pyx_v_offset)); /* "mpi4py/MPI/msgbuffer.pxi":213 * m.displ = o_displ if o_displ is not None else displ * _addr[0] = (baddr + offset) * _count[0] = count # <<<<<<<<<<<<<< * _type[0] = btype * return m */ (__pyx_v__count[0]) = __pyx_v_count; /* "mpi4py/MPI/msgbuffer.pxi":214 * _addr[0] = (baddr + offset) * _count[0] = count * _type[0] = btype # <<<<<<<<<<<<<< * return m * */ (__pyx_v__type[0]) = __pyx_v_btype; /* "mpi4py/MPI/msgbuffer.pxi":215 * _count[0] = count * _type[0] = btype * return m # <<<<<<<<<<<<<< * * cdef _p_message message_vector(object msg, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_m)); __pyx_r = __pyx_v_m; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":107 * return m * * cdef _p_message message_simple(object msg, # <<<<<<<<<<<<<< * int readonly, * int rank, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("mpi4py.MPI.message_simple", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_o_buf); __Pyx_XDECREF(__pyx_v_o_count); __Pyx_XDECREF(__pyx_v_o_displ); __Pyx_XDECREF(__pyx_v_o_type); __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":217 * return m * * cdef _p_message message_vector(object msg, # <<<<<<<<<<<<<< * int readonly, * int rank, */ static struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_f_6mpi4py_3MPI_message_vector(PyObject *__pyx_v_msg, int __pyx_v_readonly, int __pyx_v_rank, int __pyx_v_blocks, void **__pyx_v__addr, int **__pyx_v__counts, int **__pyx_v__displs, MPI_Datatype *__pyx_v__type) { Py_ssize_t __pyx_v_nargs; PyObject *__pyx_v_o_buf = 0; PyObject *__pyx_v_o_counts = 0; PyObject *__pyx_v_o_displs = 0; PyObject *__pyx_v_o_type = 0; void *__pyx_v_baddr; MPI_Aint __pyx_v_bsize; MPI_Datatype __pyx_v_btype; struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_v_m = 0; int *__pyx_v_counts; int *__pyx_v_displs; int __pyx_v_i; int __pyx_v_val; MPI_Aint __pyx_v_extent; MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_asize; MPI_Aint __pyx_v_aval; struct __pyx_obj_6mpi4py_3MPI__p_message *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; __Pyx_RefNannySetupContext("message_vector", 0); /* "mpi4py/MPI/msgbuffer.pxi":228 * ): * # special-case PROC_NULL target rank * if rank == MPI_PROC_NULL: # <<<<<<<<<<<<<< * _addr[0] = NULL * _counts[0] = NULL */ __pyx_t_1 = ((__pyx_v_rank == MPI_PROC_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":229 * # special-case PROC_NULL target rank * if rank == MPI_PROC_NULL: * _addr[0] = NULL # <<<<<<<<<<<<<< * _counts[0] = NULL * _displs[0] = NULL */ (__pyx_v__addr[0]) = NULL; /* "mpi4py/MPI/msgbuffer.pxi":230 * if rank == MPI_PROC_NULL: * _addr[0] = NULL * _counts[0] = NULL # <<<<<<<<<<<<<< * _displs[0] = NULL * _type[0] = MPI_BYTE */ (__pyx_v__counts[0]) = NULL; /* "mpi4py/MPI/msgbuffer.pxi":231 * _addr[0] = NULL * _counts[0] = NULL * _displs[0] = NULL # <<<<<<<<<<<<<< * _type[0] = MPI_BYTE * return None */ (__pyx_v__displs[0]) = NULL; /* "mpi4py/MPI/msgbuffer.pxi":232 * _counts[0] = NULL * _displs[0] = NULL * _type[0] = MPI_BYTE # <<<<<<<<<<<<<< * return None * # unpack message list/tuple */ (__pyx_v__type[0]) = MPI_BYTE; /* "mpi4py/MPI/msgbuffer.pxi":233 * _displs[0] = NULL * _type[0] = MPI_BYTE * return None # <<<<<<<<<<<<<< * # unpack message list/tuple * cdef Py_ssize_t nargs = 0 */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_r = ((struct __pyx_obj_6mpi4py_3MPI__p_message *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":228 * ): * # special-case PROC_NULL target rank * if rank == MPI_PROC_NULL: # <<<<<<<<<<<<<< * _addr[0] = NULL * _counts[0] = NULL */ } /* "mpi4py/MPI/msgbuffer.pxi":235 * return None * # unpack message list/tuple * cdef Py_ssize_t nargs = 0 # <<<<<<<<<<<<<< * cdef object o_buf = None * cdef object o_counts = None */ __pyx_v_nargs = 0; /* "mpi4py/MPI/msgbuffer.pxi":236 * # unpack message list/tuple * cdef Py_ssize_t nargs = 0 * cdef object o_buf = None # <<<<<<<<<<<<<< * cdef object o_counts = None * cdef object o_displs = None */ __Pyx_INCREF(Py_None); __pyx_v_o_buf = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":237 * cdef Py_ssize_t nargs = 0 * cdef object o_buf = None * cdef object o_counts = None # <<<<<<<<<<<<<< * cdef object o_displs = None * cdef object o_type = None */ __Pyx_INCREF(Py_None); __pyx_v_o_counts = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":238 * cdef object o_buf = None * cdef object o_counts = None * cdef object o_displs = None # <<<<<<<<<<<<<< * cdef object o_type = None * if is_buffer(msg): */ __Pyx_INCREF(Py_None); __pyx_v_o_displs = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":239 * cdef object o_counts = None * cdef object o_displs = None * cdef object o_type = None # <<<<<<<<<<<<<< * if is_buffer(msg): * o_buf = msg */ __Pyx_INCREF(Py_None); __pyx_v_o_type = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":240 * cdef object o_displs = None * cdef object o_type = None * if is_buffer(msg): # <<<<<<<<<<<<<< * o_buf = msg * elif is_list(msg) or is_tuple(msg): */ __pyx_t_1 = (__pyx_f_6mpi4py_3MPI_is_buffer(__pyx_v_msg) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":241 * cdef object o_type = None * if is_buffer(msg): * o_buf = msg # <<<<<<<<<<<<<< * elif is_list(msg) or is_tuple(msg): * nargs = len(msg) */ __Pyx_INCREF(__pyx_v_msg); __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_v_msg); /* "mpi4py/MPI/msgbuffer.pxi":240 * cdef object o_displs = None * cdef object o_type = None * if is_buffer(msg): # <<<<<<<<<<<<<< * o_buf = msg * elif is_list(msg) or is_tuple(msg): */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":242 * if is_buffer(msg): * o_buf = msg * elif is_list(msg) or is_tuple(msg): # <<<<<<<<<<<<<< * nargs = len(msg) * if nargs == 2: */ __pyx_t_2 = (PyList_Check(__pyx_v_msg) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = (PyTuple_Check(__pyx_v_msg) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":243 * o_buf = msg * elif is_list(msg) or is_tuple(msg): * nargs = len(msg) # <<<<<<<<<<<<<< * if nargs == 2: * (o_buf, o_counts) = msg */ __pyx_t_3 = PyObject_Length(__pyx_v_msg); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(5, 243, __pyx_L1_error) __pyx_v_nargs = __pyx_t_3; /* "mpi4py/MPI/msgbuffer.pxi":244 * elif is_list(msg) or is_tuple(msg): * nargs = len(msg) * if nargs == 2: # <<<<<<<<<<<<<< * (o_buf, o_counts) = msg * if is_datatype(o_counts): */ __pyx_t_1 = ((__pyx_v_nargs == 2) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":245 * nargs = len(msg) * if nargs == 2: * (o_buf, o_counts) = msg # <<<<<<<<<<<<<< * if is_datatype(o_counts): * (o_counts, o_type) = None, o_counts */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 245, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(5, 245, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 245, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":246 * if nargs == 2: * (o_buf, o_counts) = msg * if is_datatype(o_counts): # <<<<<<<<<<<<<< * (o_counts, o_type) = None, o_counts * elif is_tuple(o_counts): */ __pyx_t_1 = (__pyx_f_6mpi4py_3MPI_is_datatype(__pyx_v_o_counts) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":247 * (o_buf, o_counts) = msg * if is_datatype(o_counts): * (o_counts, o_type) = None, o_counts # <<<<<<<<<<<<<< * elif is_tuple(o_counts): * (o_counts, o_displs) = o_counts */ __pyx_t_5 = Py_None; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = __pyx_v_o_counts; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_o_type, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgbuffer.pxi":246 * if nargs == 2: * (o_buf, o_counts) = msg * if is_datatype(o_counts): # <<<<<<<<<<<<<< * (o_counts, o_type) = None, o_counts * elif is_tuple(o_counts): */ goto __pyx_L10; } /* "mpi4py/MPI/msgbuffer.pxi":248 * if is_datatype(o_counts): * (o_counts, o_type) = None, o_counts * elif is_tuple(o_counts): # <<<<<<<<<<<<<< * (o_counts, o_displs) = o_counts * elif nargs == 3: */ __pyx_t_1 = (PyTuple_Check(__pyx_v_o_counts) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":249 * (o_counts, o_type) = None, o_counts * elif is_tuple(o_counts): * (o_counts, o_displs) = o_counts # <<<<<<<<<<<<<< * elif nargs == 3: * (o_buf, o_counts, o_type) = msg */ if ((likely(PyTuple_CheckExact(__pyx_v_o_counts))) || (PyList_CheckExact(__pyx_v_o_counts))) { PyObject* sequence = __pyx_v_o_counts; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 249, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_o_counts); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(5, 249, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 249, __pyx_L1_error) __pyx_L12_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":248 * if is_datatype(o_counts): * (o_counts, o_type) = None, o_counts * elif is_tuple(o_counts): # <<<<<<<<<<<<<< * (o_counts, o_displs) = o_counts * elif nargs == 3: */ } __pyx_L10:; /* "mpi4py/MPI/msgbuffer.pxi":244 * elif is_list(msg) or is_tuple(msg): * nargs = len(msg) * if nargs == 2: # <<<<<<<<<<<<<< * (o_buf, o_counts) = msg * if is_datatype(o_counts): */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":250 * elif is_tuple(o_counts): * (o_counts, o_displs) = o_counts * elif nargs == 3: # <<<<<<<<<<<<<< * (o_buf, o_counts, o_type) = msg * if is_tuple(o_counts): */ __pyx_t_1 = ((__pyx_v_nargs == 3) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":251 * (o_counts, o_displs) = o_counts * elif nargs == 3: * (o_buf, o_counts, o_type) = msg # <<<<<<<<<<<<<< * if is_tuple(o_counts): * (o_counts, o_displs) = o_counts */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 251, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); __pyx_t_6 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_7(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_8); if (unlikely(!__pyx_t_4)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 2; __pyx_t_6 = __pyx_t_7(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_8), 3) < 0) __PYX_ERR(5, 251, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L14_unpacking_done; __pyx_L13_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 251, __pyx_L1_error) __pyx_L14_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_o_type, __pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":252 * elif nargs == 3: * (o_buf, o_counts, o_type) = msg * if is_tuple(o_counts): # <<<<<<<<<<<<<< * (o_counts, o_displs) = o_counts * elif nargs == 4: */ __pyx_t_1 = (PyTuple_Check(__pyx_v_o_counts) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":253 * (o_buf, o_counts, o_type) = msg * if is_tuple(o_counts): * (o_counts, o_displs) = o_counts # <<<<<<<<<<<<<< * elif nargs == 4: * (o_buf, o_counts, o_displs, o_type) = msg */ if ((likely(PyTuple_CheckExact(__pyx_v_o_counts))) || (PyList_CheckExact(__pyx_v_o_counts))) { PyObject* sequence = __pyx_v_o_counts; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 253, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_6 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_o_counts); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 2) < 0) __PYX_ERR(5, 253, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L17_unpacking_done; __pyx_L16_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 253, __pyx_L1_error) __pyx_L17_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgbuffer.pxi":252 * elif nargs == 3: * (o_buf, o_counts, o_type) = msg * if is_tuple(o_counts): # <<<<<<<<<<<<<< * (o_counts, o_displs) = o_counts * elif nargs == 4: */ } /* "mpi4py/MPI/msgbuffer.pxi":250 * elif is_tuple(o_counts): * (o_counts, o_displs) = o_counts * elif nargs == 3: # <<<<<<<<<<<<<< * (o_buf, o_counts, o_type) = msg * if is_tuple(o_counts): */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":254 * if is_tuple(o_counts): * (o_counts, o_displs) = o_counts * elif nargs == 4: # <<<<<<<<<<<<<< * (o_buf, o_counts, o_displs, o_type) = msg * else: */ __pyx_t_1 = ((__pyx_v_nargs == 4) != 0); if (likely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":255 * (o_counts, o_displs) = o_counts * elif nargs == 4: * (o_buf, o_counts, o_displs, o_type) = msg # <<<<<<<<<<<<<< * else: * raise ValueError("message: expecting 2 to 4 items") */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 255, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); __pyx_t_5 = PyList_GET_ITEM(sequence, 2); __pyx_t_8 = PyList_GET_ITEM(sequence, 3); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); #else { Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_6,&__pyx_t_5,&__pyx_t_8}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(5, 255, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_6,&__pyx_t_5,&__pyx_t_8}; __pyx_t_9 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = Py_TYPE(__pyx_t_9)->tp_iternext; for (index=0; index < 4; index++) { PyObject* item = __pyx_t_7(__pyx_t_9); if (unlikely(!item)) goto __pyx_L18_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_9), 4) < 0) __PYX_ERR(5, 255, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L19_unpacking_done; __pyx_L18_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 255, __pyx_L1_error) __pyx_L19_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_o_type, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":254 * if is_tuple(o_counts): * (o_counts, o_displs) = o_counts * elif nargs == 4: # <<<<<<<<<<<<<< * (o_buf, o_counts, o_displs, o_type) = msg * else: */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":257 * (o_buf, o_counts, o_displs, o_type) = msg * else: * raise ValueError("message: expecting 2 to 4 items") # <<<<<<<<<<<<<< * elif PYPY: * o_buf = msg */ /*else*/ { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 257, __pyx_L1_error) } __pyx_L7:; /* "mpi4py/MPI/msgbuffer.pxi":242 * if is_buffer(msg): * o_buf = msg * elif is_list(msg) or is_tuple(msg): # <<<<<<<<<<<<<< * nargs = len(msg) * if nargs == 2: */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":258 * else: * raise ValueError("message: expecting 2 to 4 items") * elif PYPY: # <<<<<<<<<<<<<< * o_buf = msg * else: */ if (likely(PyMPI_RUNTIME_PYPY)) { /* "mpi4py/MPI/msgbuffer.pxi":259 * raise ValueError("message: expecting 2 to 4 items") * elif PYPY: * o_buf = msg # <<<<<<<<<<<<<< * else: * raise TypeError("message: expecting buffer or list/tuple") */ __Pyx_INCREF(__pyx_v_msg); __Pyx_DECREF_SET(__pyx_v_o_buf, __pyx_v_msg); /* "mpi4py/MPI/msgbuffer.pxi":258 * else: * raise ValueError("message: expecting 2 to 4 items") * elif PYPY: # <<<<<<<<<<<<<< * o_buf = msg * else: */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":261 * o_buf = msg * else: * raise TypeError("message: expecting buffer or list/tuple") # <<<<<<<<<<<<<< * # buffer: address, length, and datatype * cdef void *baddr = NULL */ /*else*/ { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 261, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":263 * raise TypeError("message: expecting buffer or list/tuple") * # buffer: address, length, and datatype * cdef void *baddr = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint bsize = 0 * cdef MPI_Datatype btype = MPI_DATATYPE_NULL */ __pyx_v_baddr = NULL; /* "mpi4py/MPI/msgbuffer.pxi":264 * # buffer: address, length, and datatype * cdef void *baddr = NULL * cdef MPI_Aint bsize = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype btype = MPI_DATATYPE_NULL * cdef _p_message m = message_basic(o_buf, o_type, readonly, */ __pyx_v_bsize = 0; /* "mpi4py/MPI/msgbuffer.pxi":265 * cdef void *baddr = NULL * cdef MPI_Aint bsize = 0 * cdef MPI_Datatype btype = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * cdef _p_message m = message_basic(o_buf, o_type, readonly, * &baddr, &bsize, &btype) */ __pyx_v_btype = MPI_DATATYPE_NULL; /* "mpi4py/MPI/msgbuffer.pxi":266 * cdef MPI_Aint bsize = 0 * cdef MPI_Datatype btype = MPI_DATATYPE_NULL * cdef _p_message m = message_basic(o_buf, o_type, readonly, # <<<<<<<<<<<<<< * &baddr, &bsize, &btype) * # counts and displacements */ __pyx_t_8 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_basic(__pyx_v_o_buf, __pyx_v_o_type, __pyx_v_readonly, (&__pyx_v_baddr), (&__pyx_v_bsize), (&__pyx_v_btype))); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_message *)__pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":269 * &baddr, &bsize, &btype) * # counts and displacements * cdef int *counts = NULL # <<<<<<<<<<<<<< * cdef int *displs = NULL * cdef int i=0, val=0 */ __pyx_v_counts = NULL; /* "mpi4py/MPI/msgbuffer.pxi":270 * # counts and displacements * cdef int *counts = NULL * cdef int *displs = NULL # <<<<<<<<<<<<<< * cdef int i=0, val=0 * cdef MPI_Aint extent=0, lb=0 */ __pyx_v_displs = NULL; /* "mpi4py/MPI/msgbuffer.pxi":271 * cdef int *counts = NULL * cdef int *displs = NULL * cdef int i=0, val=0 # <<<<<<<<<<<<<< * cdef MPI_Aint extent=0, lb=0 * cdef MPI_Aint asize=0, aval=0 */ __pyx_v_i = 0; __pyx_v_val = 0; /* "mpi4py/MPI/msgbuffer.pxi":272 * cdef int *displs = NULL * cdef int i=0, val=0 * cdef MPI_Aint extent=0, lb=0 # <<<<<<<<<<<<<< * cdef MPI_Aint asize=0, aval=0 * if o_counts is None: */ __pyx_v_extent = 0; __pyx_v_lb = 0; /* "mpi4py/MPI/msgbuffer.pxi":273 * cdef int i=0, val=0 * cdef MPI_Aint extent=0, lb=0 * cdef MPI_Aint asize=0, aval=0 # <<<<<<<<<<<<<< * if o_counts is None: * if bsize > 0: */ __pyx_v_asize = 0; __pyx_v_aval = 0; /* "mpi4py/MPI/msgbuffer.pxi":274 * cdef MPI_Aint extent=0, lb=0 * cdef MPI_Aint asize=0, aval=0 * if o_counts is None: # <<<<<<<<<<<<<< * if bsize > 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( */ __pyx_t_1 = (__pyx_v_o_counts == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":275 * cdef MPI_Aint asize=0, aval=0 * if o_counts is None: * if bsize > 0: # <<<<<<<<<<<<<< * if btype == MPI_DATATYPE_NULL: raise ValueError( * "message: cannot infer count, " */ __pyx_t_2 = ((__pyx_v_bsize > 0) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":276 * if o_counts is None: * if bsize > 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( # <<<<<<<<<<<<<< * "message: cannot infer count, " * "datatype is null") */ __pyx_t_2 = ((__pyx_v_btype == MPI_DATATYPE_NULL) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 276, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":279 * "message: cannot infer count, " * "datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) # <<<<<<<<<<<<<< * if extent <= 0: raise ValueError( * ("message: cannot infer count, " */ __pyx_t_10 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent(__pyx_v_btype, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(5, 279, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":280 * "datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) * if extent <= 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "datatype extent %d (lb:%d, ub:%d)" */ __pyx_t_2 = ((__pyx_v_extent <= 0) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":283 * ("message: cannot infer count, " * "datatype extent %d (lb:%d, ub:%d)" * ) % (extent, lb, lb+extent)) # <<<<<<<<<<<<<< * if (bsize % extent) != 0: raise ValueError( * ("message: cannot infer count, " */ __pyx_t_8 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_extent); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_lb); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_lb + __pyx_v_extent)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6); __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_message_cannot_infer_count_datat_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgbuffer.pxi":280 * "datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) * if extent <= 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "datatype extent %d (lb:%d, ub:%d)" */ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(5, 280, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":284 * "datatype extent %d (lb:%d, ub:%d)" * ) % (extent, lb, lb+extent)) * if (bsize % extent) != 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "buffer length %d is not a multiple of " */ __pyx_t_2 = (((__pyx_v_bsize % __pyx_v_extent) != 0) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":288 * "buffer length %d is not a multiple of " * "datatype extent %d (lb:%d, ub:%d)" * ) % (bsize, extent, lb, lb+extent)) # <<<<<<<<<<<<<< * asize = bsize // extent * o_counts = newarray(blocks, &counts) */ __pyx_t_4 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_bsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_extent); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_lb); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_lb + __pyx_v_extent)); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_8); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_message_cannot_infer_count_buffe, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgbuffer.pxi":284 * "datatype extent %d (lb:%d, ub:%d)" * ) % (extent, lb, lb+extent)) * if (bsize % extent) != 0: raise ValueError( # <<<<<<<<<<<<<< * ("message: cannot infer count, " * "buffer length %d is not a multiple of " */ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(5, 284, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":289 * "datatype extent %d (lb:%d, ub:%d)" * ) % (bsize, extent, lb, lb+extent)) * asize = bsize // extent # <<<<<<<<<<<<<< * o_counts = newarray(blocks, &counts) * for i from 0 <= i < blocks: */ __pyx_v_asize = (__pyx_v_bsize / __pyx_v_extent); /* "mpi4py/MPI/msgbuffer.pxi":275 * cdef MPI_Aint asize=0, aval=0 * if o_counts is None: * if bsize > 0: # <<<<<<<<<<<<<< * if btype == MPI_DATATYPE_NULL: raise ValueError( * "message: cannot infer count, " */ } /* "mpi4py/MPI/msgbuffer.pxi":290 * ) % (bsize, extent, lb, lb+extent)) * asize = bsize // extent * o_counts = newarray(blocks, &counts) # <<<<<<<<<<<<<< * for i from 0 <= i < blocks: * aval = (asize // blocks) + (asize % blocks > i) */ __pyx_t_9 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_blocks, (&__pyx_v_counts)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgbuffer.pxi":291 * asize = bsize // extent * o_counts = newarray(blocks, &counts) * for i from 0 <= i < blocks: # <<<<<<<<<<<<<< * aval = (asize // blocks) + (asize % blocks > i) * counts[i] = downcast(aval) */ __pyx_t_10 = __pyx_v_blocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "mpi4py/MPI/msgbuffer.pxi":292 * o_counts = newarray(blocks, &counts) * for i from 0 <= i < blocks: * aval = (asize // blocks) + (asize % blocks > i) # <<<<<<<<<<<<<< * counts[i] = downcast(aval) * elif is_integral(o_counts): */ __pyx_v_aval = ((__pyx_v_asize / __pyx_v_blocks) + ((__pyx_v_asize % __pyx_v_blocks) > __pyx_v_i)); /* "mpi4py/MPI/msgbuffer.pxi":293 * for i from 0 <= i < blocks: * aval = (asize // blocks) + (asize % blocks > i) * counts[i] = downcast(aval) # <<<<<<<<<<<<<< * elif is_integral(o_counts): * val = o_counts */ __pyx_t_11 = __pyx_f_6mpi4py_3MPI_downcast(__pyx_v_aval); if (unlikely(__pyx_t_11 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(5, 293, __pyx_L1_error) (__pyx_v_counts[__pyx_v_i]) = __pyx_t_11; } /* "mpi4py/MPI/msgbuffer.pxi":274 * cdef MPI_Aint extent=0, lb=0 * cdef MPI_Aint asize=0, aval=0 * if o_counts is None: # <<<<<<<<<<<<<< * if bsize > 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( */ goto __pyx_L20; } /* "mpi4py/MPI/msgbuffer.pxi":294 * aval = (asize // blocks) + (asize % blocks > i) * counts[i] = downcast(aval) * elif is_integral(o_counts): # <<<<<<<<<<<<<< * val = o_counts * o_counts = newarray(blocks, &counts) */ __pyx_t_2 = (__pyx_f_6mpi4py_3MPI_is_integral(__pyx_v_o_counts) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":295 * counts[i] = downcast(aval) * elif is_integral(o_counts): * val = o_counts # <<<<<<<<<<<<<< * o_counts = newarray(blocks, &counts) * for i from 0 <= i < blocks: */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_o_counts); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 295, __pyx_L1_error) __pyx_v_val = ((int)__pyx_t_10); /* "mpi4py/MPI/msgbuffer.pxi":296 * elif is_integral(o_counts): * val = o_counts * o_counts = newarray(blocks, &counts) # <<<<<<<<<<<<<< * for i from 0 <= i < blocks: * counts[i] = val */ __pyx_t_9 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_blocks, (&__pyx_v_counts)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgbuffer.pxi":297 * val = o_counts * o_counts = newarray(blocks, &counts) * for i from 0 <= i < blocks: # <<<<<<<<<<<<<< * counts[i] = val * else: */ __pyx_t_10 = __pyx_v_blocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "mpi4py/MPI/msgbuffer.pxi":298 * o_counts = newarray(blocks, &counts) * for i from 0 <= i < blocks: * counts[i] = val # <<<<<<<<<<<<<< * else: * o_counts = chkarray(o_counts, blocks, &counts) */ (__pyx_v_counts[__pyx_v_i]) = __pyx_v_val; } /* "mpi4py/MPI/msgbuffer.pxi":294 * aval = (asize // blocks) + (asize % blocks > i) * counts[i] = downcast(aval) * elif is_integral(o_counts): # <<<<<<<<<<<<<< * val = o_counts * o_counts = newarray(blocks, &counts) */ goto __pyx_L20; } /* "mpi4py/MPI/msgbuffer.pxi":300 * counts[i] = val * else: * o_counts = chkarray(o_counts, blocks, &counts) # <<<<<<<<<<<<<< * if o_displs is None: # contiguous * val = 0 */ /*else*/ { __pyx_t_9 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_o_counts, __pyx_v_blocks, (&__pyx_v_counts)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_9); __pyx_t_9 = 0; } __pyx_L20:; /* "mpi4py/MPI/msgbuffer.pxi":301 * else: * o_counts = chkarray(o_counts, blocks, &counts) * if o_displs is None: # contiguous # <<<<<<<<<<<<<< * val = 0 * o_displs = newarray(blocks, &displs) */ __pyx_t_2 = (__pyx_v_o_displs == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":302 * o_counts = chkarray(o_counts, blocks, &counts) * if o_displs is None: # contiguous * val = 0 # <<<<<<<<<<<<<< * o_displs = newarray(blocks, &displs) * for i from 0 <= i < blocks: */ __pyx_v_val = 0; /* "mpi4py/MPI/msgbuffer.pxi":303 * if o_displs is None: # contiguous * val = 0 * o_displs = newarray(blocks, &displs) # <<<<<<<<<<<<<< * for i from 0 <= i < blocks: * displs[i] = val */ __pyx_t_9 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_blocks, (&__pyx_v_displs)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgbuffer.pxi":304 * val = 0 * o_displs = newarray(blocks, &displs) * for i from 0 <= i < blocks: # <<<<<<<<<<<<<< * displs[i] = val * val += counts[i] */ __pyx_t_10 = __pyx_v_blocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "mpi4py/MPI/msgbuffer.pxi":305 * o_displs = newarray(blocks, &displs) * for i from 0 <= i < blocks: * displs[i] = val # <<<<<<<<<<<<<< * val += counts[i] * elif is_integral(o_displs): # strided */ (__pyx_v_displs[__pyx_v_i]) = __pyx_v_val; /* "mpi4py/MPI/msgbuffer.pxi":306 * for i from 0 <= i < blocks: * displs[i] = val * val += counts[i] # <<<<<<<<<<<<<< * elif is_integral(o_displs): # strided * val = o_displs */ __pyx_v_val = (__pyx_v_val + (__pyx_v_counts[__pyx_v_i])); } /* "mpi4py/MPI/msgbuffer.pxi":301 * else: * o_counts = chkarray(o_counts, blocks, &counts) * if o_displs is None: # contiguous # <<<<<<<<<<<<<< * val = 0 * o_displs = newarray(blocks, &displs) */ goto __pyx_L29; } /* "mpi4py/MPI/msgbuffer.pxi":307 * displs[i] = val * val += counts[i] * elif is_integral(o_displs): # strided # <<<<<<<<<<<<<< * val = o_displs * o_displs = newarray(blocks, &displs) */ __pyx_t_1 = (__pyx_f_6mpi4py_3MPI_is_integral(__pyx_v_o_displs) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":308 * val += counts[i] * elif is_integral(o_displs): # strided * val = o_displs # <<<<<<<<<<<<<< * o_displs = newarray(blocks, &displs) * for i from 0 <= i < blocks: */ __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_o_displs); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 308, __pyx_L1_error) __pyx_v_val = ((int)__pyx_t_10); /* "mpi4py/MPI/msgbuffer.pxi":309 * elif is_integral(o_displs): # strided * val = o_displs * o_displs = newarray(blocks, &displs) # <<<<<<<<<<<<<< * for i from 0 <= i < blocks: * displs[i] = val * i */ __pyx_t_9 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_blocks, (&__pyx_v_displs)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgbuffer.pxi":310 * val = o_displs * o_displs = newarray(blocks, &displs) * for i from 0 <= i < blocks: # <<<<<<<<<<<<<< * displs[i] = val * i * else: # general */ __pyx_t_10 = __pyx_v_blocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_10; __pyx_v_i++) { /* "mpi4py/MPI/msgbuffer.pxi":311 * o_displs = newarray(blocks, &displs) * for i from 0 <= i < blocks: * displs[i] = val * i # <<<<<<<<<<<<<< * else: # general * o_displs = chkarray(o_displs, blocks, &displs) */ (__pyx_v_displs[__pyx_v_i]) = (__pyx_v_val * __pyx_v_i); } /* "mpi4py/MPI/msgbuffer.pxi":307 * displs[i] = val * val += counts[i] * elif is_integral(o_displs): # strided # <<<<<<<<<<<<<< * val = o_displs * o_displs = newarray(blocks, &displs) */ goto __pyx_L29; } /* "mpi4py/MPI/msgbuffer.pxi":313 * displs[i] = val * i * else: # general * o_displs = chkarray(o_displs, blocks, &displs) # <<<<<<<<<<<<<< * # return collected message data * m.count = o_counts */ /*else*/ { __pyx_t_9 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_o_displs, __pyx_v_blocks, (&__pyx_v_displs)); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_9); __pyx_t_9 = 0; } __pyx_L29:; /* "mpi4py/MPI/msgbuffer.pxi":315 * o_displs = chkarray(o_displs, blocks, &displs) * # return collected message data * m.count = o_counts # <<<<<<<<<<<<<< * m.displ = o_displs * _addr[0] = baddr */ __Pyx_INCREF(__pyx_v_o_counts); __Pyx_GIVEREF(__pyx_v_o_counts); __Pyx_GOTREF(__pyx_v_m->count); __Pyx_DECREF(__pyx_v_m->count); __pyx_v_m->count = __pyx_v_o_counts; /* "mpi4py/MPI/msgbuffer.pxi":316 * # return collected message data * m.count = o_counts * m.displ = o_displs # <<<<<<<<<<<<<< * _addr[0] = baddr * _counts[0] = counts */ __Pyx_INCREF(__pyx_v_o_displs); __Pyx_GIVEREF(__pyx_v_o_displs); __Pyx_GOTREF(__pyx_v_m->displ); __Pyx_DECREF(__pyx_v_m->displ); __pyx_v_m->displ = __pyx_v_o_displs; /* "mpi4py/MPI/msgbuffer.pxi":317 * m.count = o_counts * m.displ = o_displs * _addr[0] = baddr # <<<<<<<<<<<<<< * _counts[0] = counts * _displs[0] = displs */ (__pyx_v__addr[0]) = __pyx_v_baddr; /* "mpi4py/MPI/msgbuffer.pxi":318 * m.displ = o_displs * _addr[0] = baddr * _counts[0] = counts # <<<<<<<<<<<<<< * _displs[0] = displs * _type[0] = btype */ (__pyx_v__counts[0]) = __pyx_v_counts; /* "mpi4py/MPI/msgbuffer.pxi":319 * _addr[0] = baddr * _counts[0] = counts * _displs[0] = displs # <<<<<<<<<<<<<< * _type[0] = btype * return m */ (__pyx_v__displs[0]) = __pyx_v_displs; /* "mpi4py/MPI/msgbuffer.pxi":320 * _counts[0] = counts * _displs[0] = displs * _type[0] = btype # <<<<<<<<<<<<<< * return m * */ (__pyx_v__type[0]) = __pyx_v_btype; /* "mpi4py/MPI/msgbuffer.pxi":321 * _displs[0] = displs * _type[0] = btype * return m # <<<<<<<<<<<<<< * * cdef tuple message_vector_w(object msg, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_m)); __pyx_r = __pyx_v_m; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":217 * return m * * cdef _p_message message_vector(object msg, # <<<<<<<<<<<<<< * int readonly, * int rank, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("mpi4py.MPI.message_vector", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_o_buf); __Pyx_XDECREF(__pyx_v_o_counts); __Pyx_XDECREF(__pyx_v_o_displs); __Pyx_XDECREF(__pyx_v_o_type); __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":323 * return m * * cdef tuple message_vector_w(object msg, # <<<<<<<<<<<<<< * int readonly, * int blocks, */ static PyObject *__pyx_fuse_0__pyx_f_6mpi4py_3MPI_message_vector_w(PyObject *__pyx_v_msg, int __pyx_v_readonly, int __pyx_v_blocks, void **__pyx_v__addr, int **__pyx_v__counts, int **__pyx_v__displs, MPI_Datatype **__pyx_v__types) { int __pyx_v_i; Py_ssize_t __pyx_v_nargs; PyObject *__pyx_v_o_buffer = 0; PyObject *__pyx_v_o_counts = 0; PyObject *__pyx_v_o_displs = 0; PyObject *__pyx_v_o_types = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("__pyx_fuse_0message_vector_w", 0); /* "mpi4py/MPI/msgbuffer.pxi":332 * MPI_Datatype **_types, * ): * cdef int i = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t nargs = len(msg) * cdef object o_buffer, o_counts, o_displs, o_types */ __pyx_v_i = 0; /* "mpi4py/MPI/msgbuffer.pxi":333 * ): * cdef int i = 0 * cdef Py_ssize_t nargs = len(msg) # <<<<<<<<<<<<<< * cdef object o_buffer, o_counts, o_displs, o_types * if nargs == 2: */ __pyx_t_1 = PyObject_Length(__pyx_v_msg); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(5, 333, __pyx_L1_error) __pyx_v_nargs = __pyx_t_1; /* "mpi4py/MPI/msgbuffer.pxi":335 * cdef Py_ssize_t nargs = len(msg) * cdef object o_buffer, o_counts, o_displs, o_types * if nargs == 2: # <<<<<<<<<<<<<< * o_buffer, o_types = msg * o_counts = o_displs = None */ __pyx_t_2 = ((__pyx_v_nargs == 2) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":336 * cdef object o_buffer, o_counts, o_displs, o_types * if nargs == 2: * o_buffer, o_types = msg # <<<<<<<<<<<<<< * o_counts = o_displs = None * elif nargs == 3: */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 336, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(5, 336, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 336, __pyx_L1_error) __pyx_L5_unpacking_done:; } __pyx_v_o_buffer = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_o_types = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/msgbuffer.pxi":337 * if nargs == 2: * o_buffer, o_types = msg * o_counts = o_displs = None # <<<<<<<<<<<<<< * elif nargs == 3: * o_buffer, (o_counts, o_displs), o_types = msg */ __Pyx_INCREF(Py_None); __pyx_v_o_counts = Py_None; __Pyx_INCREF(Py_None); __pyx_v_o_displs = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":335 * cdef Py_ssize_t nargs = len(msg) * cdef object o_buffer, o_counts, o_displs, o_types * if nargs == 2: # <<<<<<<<<<<<<< * o_buffer, o_types = msg * o_counts = o_displs = None */ goto __pyx_L3; } /* "mpi4py/MPI/msgbuffer.pxi":338 * o_buffer, o_types = msg * o_counts = o_displs = None * elif nargs == 3: # <<<<<<<<<<<<<< * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: */ __pyx_t_2 = ((__pyx_v_nargs == 3) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":339 * o_counts = o_displs = None * elif nargs == 3: * o_buffer, (o_counts, o_displs), o_types = msg # <<<<<<<<<<<<<< * elif nargs == 4: * o_buffer, o_counts, o_displs, o_types = msg */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 339, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_5 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_5 = __pyx_t_6(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_7), 3) < 0) __PYX_ERR(5, 339, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 339, __pyx_L1_error) __pyx_L7_unpacking_done:; } __pyx_v_o_buffer = __pyx_t_4; __pyx_t_4 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 339, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_7 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); #else __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_7 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_9), 2) < 0) __PYX_ERR(5, 339, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 339, __pyx_L1_error) __pyx_L9_unpacking_done:; } __pyx_v_o_counts = __pyx_t_7; __pyx_t_7 = 0; __pyx_v_o_displs = __pyx_t_8; __pyx_t_8 = 0; __pyx_v_o_types = __pyx_t_5; __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":338 * o_buffer, o_types = msg * o_counts = o_displs = None * elif nargs == 3: # <<<<<<<<<<<<<< * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: */ goto __pyx_L3; } /* "mpi4py/MPI/msgbuffer.pxi":340 * elif nargs == 3: * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: # <<<<<<<<<<<<<< * o_buffer, o_counts, o_displs, o_types = msg * else: */ __pyx_t_2 = ((__pyx_v_nargs == 4) != 0); if (likely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":341 * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: * o_buffer, o_counts, o_displs, o_types = msg # <<<<<<<<<<<<<< * else: * raise ValueError("message: expecting 2 to 4 items") */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 341, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); __pyx_t_8 = PyList_GET_ITEM(sequence, 3); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); #else { Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_8}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(5, 341, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_8}; __pyx_t_7 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = Py_TYPE(__pyx_t_7)->tp_iternext; for (index=0; index < 4; index++) { PyObject* item = __pyx_t_6(__pyx_t_7); if (unlikely(!item)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_7), 4) < 0) __PYX_ERR(5, 341, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L11_unpacking_done; __pyx_L10_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 341, __pyx_L1_error) __pyx_L11_unpacking_done:; } __pyx_v_o_buffer = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_o_counts = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_o_displs = __pyx_t_4; __pyx_t_4 = 0; __pyx_v_o_types = __pyx_t_8; __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":340 * elif nargs == 3: * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: # <<<<<<<<<<<<<< * o_buffer, o_counts, o_displs, o_types = msg * else: */ goto __pyx_L3; } /* "mpi4py/MPI/msgbuffer.pxi":343 * o_buffer, o_counts, o_displs, o_types = msg * else: * raise ValueError("message: expecting 2 to 4 items") # <<<<<<<<<<<<<< * if readonly: * o_buffer = getbuffer_r(o_buffer, _addr, NULL) */ /*else*/ { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 343, __pyx_L1_error) } __pyx_L3:; /* "mpi4py/MPI/msgbuffer.pxi":344 * else: * raise ValueError("message: expecting 2 to 4 items") * if readonly: # <<<<<<<<<<<<<< * o_buffer = getbuffer_r(o_buffer, _addr, NULL) * else: */ __pyx_t_2 = (__pyx_v_readonly != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":345 * raise ValueError("message: expecting 2 to 4 items") * if readonly: * o_buffer = getbuffer_r(o_buffer, _addr, NULL) # <<<<<<<<<<<<<< * else: * o_buffer = getbuffer_w(o_buffer, _addr, NULL) */ __pyx_t_8 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_o_buffer, __pyx_v__addr, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_buffer, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":344 * else: * raise ValueError("message: expecting 2 to 4 items") * if readonly: # <<<<<<<<<<<<<< * o_buffer = getbuffer_r(o_buffer, _addr, NULL) * else: */ goto __pyx_L12; } /* "mpi4py/MPI/msgbuffer.pxi":347 * o_buffer = getbuffer_r(o_buffer, _addr, NULL) * else: * o_buffer = getbuffer_w(o_buffer, _addr, NULL) # <<<<<<<<<<<<<< * if o_counts is None and o_displs is None: * o_counts = newarray(blocks, _counts) */ /*else*/ { __pyx_t_8 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_o_buffer, __pyx_v__addr, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_buffer, __pyx_t_8); __pyx_t_8 = 0; } __pyx_L12:; /* "mpi4py/MPI/msgbuffer.pxi":348 * else: * o_buffer = getbuffer_w(o_buffer, _addr, NULL) * if o_counts is None and o_displs is None: # <<<<<<<<<<<<<< * o_counts = newarray(blocks, _counts) * o_displs = newarray(blocks, _displs) */ __pyx_t_10 = (__pyx_v_o_counts == Py_None); __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { } else { __pyx_t_2 = __pyx_t_11; goto __pyx_L14_bool_binop_done; } __pyx_t_11 = (__pyx_v_o_displs == Py_None); __pyx_t_10 = (__pyx_t_11 != 0); __pyx_t_2 = __pyx_t_10; __pyx_L14_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":349 * o_buffer = getbuffer_w(o_buffer, _addr, NULL) * if o_counts is None and o_displs is None: * o_counts = newarray(blocks, _counts) # <<<<<<<<<<<<<< * o_displs = newarray(blocks, _displs) * for i from 0 <= i < blocks: */ __pyx_t_8 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_blocks, __pyx_v__counts); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":350 * if o_counts is None and o_displs is None: * o_counts = newarray(blocks, _counts) * o_displs = newarray(blocks, _displs) # <<<<<<<<<<<<<< * for i from 0 <= i < blocks: * _counts[0][i] = 1 */ __pyx_t_8 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_blocks, __pyx_v__displs); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":351 * o_counts = newarray(blocks, _counts) * o_displs = newarray(blocks, _displs) * for i from 0 <= i < blocks: # <<<<<<<<<<<<<< * _counts[0][i] = 1 * _displs[0][i] = 0 */ __pyx_t_12 = __pyx_v_blocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "mpi4py/MPI/msgbuffer.pxi":352 * o_displs = newarray(blocks, _displs) * for i from 0 <= i < blocks: * _counts[0][i] = 1 # <<<<<<<<<<<<<< * _displs[0][i] = 0 * else: */ ((__pyx_v__counts[0])[__pyx_v_i]) = 1; /* "mpi4py/MPI/msgbuffer.pxi":353 * for i from 0 <= i < blocks: * _counts[0][i] = 1 * _displs[0][i] = 0 # <<<<<<<<<<<<<< * else: * o_counts = chkarray(o_counts, blocks, _counts) */ ((__pyx_v__displs[0])[__pyx_v_i]) = 0; } /* "mpi4py/MPI/msgbuffer.pxi":348 * else: * o_buffer = getbuffer_w(o_buffer, _addr, NULL) * if o_counts is None and o_displs is None: # <<<<<<<<<<<<<< * o_counts = newarray(blocks, _counts) * o_displs = newarray(blocks, _displs) */ goto __pyx_L13; } /* "mpi4py/MPI/msgbuffer.pxi":355 * _displs[0][i] = 0 * else: * o_counts = chkarray(o_counts, blocks, _counts) # <<<<<<<<<<<<<< * o_displs = chkarray(o_displs, blocks, _displs) * o_types = asarray_Datatype(o_types, blocks, _types) */ /*else*/ { __pyx_t_8 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_o_counts, __pyx_v_blocks, __pyx_v__counts); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":356 * else: * o_counts = chkarray(o_counts, blocks, _counts) * o_displs = chkarray(o_displs, blocks, _displs) # <<<<<<<<<<<<<< * o_types = asarray_Datatype(o_types, blocks, _types) * return (o_buffer, o_counts, o_displs, o_types) */ __pyx_t_8 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_o_displs, __pyx_v_blocks, __pyx_v__displs); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_8); __pyx_t_8 = 0; } __pyx_L13:; /* "mpi4py/MPI/msgbuffer.pxi":357 * o_counts = chkarray(o_counts, blocks, _counts) * o_displs = chkarray(o_displs, blocks, _displs) * o_types = asarray_Datatype(o_types, blocks, _types) # <<<<<<<<<<<<<< * return (o_buffer, o_counts, o_displs, o_types) * */ __pyx_t_8 = __pyx_f_6mpi4py_3MPI_asarray_Datatype(__pyx_v_o_types, __pyx_v_blocks, __pyx_v__types); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_types, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":358 * o_displs = chkarray(o_displs, blocks, _displs) * o_types = asarray_Datatype(o_types, blocks, _types) * return (o_buffer, o_counts, o_displs, o_types) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_o_buffer); __Pyx_GIVEREF(__pyx_v_o_buffer); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_o_buffer); __Pyx_INCREF(__pyx_v_o_counts); __Pyx_GIVEREF(__pyx_v_o_counts); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_o_counts); __Pyx_INCREF(__pyx_v_o_displs); __Pyx_GIVEREF(__pyx_v_o_displs); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_o_displs); __Pyx_INCREF(__pyx_v_o_types); __Pyx_GIVEREF(__pyx_v_o_types); PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_o_types); __pyx_r = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":323 * return m * * cdef tuple message_vector_w(object msg, # <<<<<<<<<<<<<< * int readonly, * int blocks, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("mpi4py.MPI.message_vector_w", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_o_buffer); __Pyx_XDECREF(__pyx_v_o_counts); __Pyx_XDECREF(__pyx_v_o_displs); __Pyx_XDECREF(__pyx_v_o_types); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_fuse_1__pyx_f_6mpi4py_3MPI_message_vector_w(PyObject *__pyx_v_msg, int __pyx_v_readonly, int __pyx_v_blocks, void **__pyx_v__addr, int **__pyx_v__counts, MPI_Aint **__pyx_v__displs, MPI_Datatype **__pyx_v__types) { int __pyx_v_i; Py_ssize_t __pyx_v_nargs; PyObject *__pyx_v_o_buffer = 0; PyObject *__pyx_v_o_counts = 0; PyObject *__pyx_v_o_displs = 0; PyObject *__pyx_v_o_types = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("__pyx_fuse_1message_vector_w", 0); /* "mpi4py/MPI/msgbuffer.pxi":332 * MPI_Datatype **_types, * ): * cdef int i = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t nargs = len(msg) * cdef object o_buffer, o_counts, o_displs, o_types */ __pyx_v_i = 0; /* "mpi4py/MPI/msgbuffer.pxi":333 * ): * cdef int i = 0 * cdef Py_ssize_t nargs = len(msg) # <<<<<<<<<<<<<< * cdef object o_buffer, o_counts, o_displs, o_types * if nargs == 2: */ __pyx_t_1 = PyObject_Length(__pyx_v_msg); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(5, 333, __pyx_L1_error) __pyx_v_nargs = __pyx_t_1; /* "mpi4py/MPI/msgbuffer.pxi":335 * cdef Py_ssize_t nargs = len(msg) * cdef object o_buffer, o_counts, o_displs, o_types * if nargs == 2: # <<<<<<<<<<<<<< * o_buffer, o_types = msg * o_counts = o_displs = None */ __pyx_t_2 = ((__pyx_v_nargs == 2) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":336 * cdef object o_buffer, o_counts, o_displs, o_types * if nargs == 2: * o_buffer, o_types = msg # <<<<<<<<<<<<<< * o_counts = o_displs = None * elif nargs == 3: */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 336, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_3 = PyList_GET_ITEM(sequence, 0); __pyx_t_4 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(5, 336, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5_unpacking_done; __pyx_L4_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 336, __pyx_L1_error) __pyx_L5_unpacking_done:; } __pyx_v_o_buffer = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_o_types = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/msgbuffer.pxi":337 * if nargs == 2: * o_buffer, o_types = msg * o_counts = o_displs = None # <<<<<<<<<<<<<< * elif nargs == 3: * o_buffer, (o_counts, o_displs), o_types = msg */ __Pyx_INCREF(Py_None); __pyx_v_o_counts = Py_None; __Pyx_INCREF(Py_None); __pyx_v_o_displs = Py_None; /* "mpi4py/MPI/msgbuffer.pxi":335 * cdef Py_ssize_t nargs = len(msg) * cdef object o_buffer, o_counts, o_displs, o_types * if nargs == 2: # <<<<<<<<<<<<<< * o_buffer, o_types = msg * o_counts = o_displs = None */ goto __pyx_L3; } /* "mpi4py/MPI/msgbuffer.pxi":338 * o_buffer, o_types = msg * o_counts = o_displs = None * elif nargs == 3: # <<<<<<<<<<<<<< * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: */ __pyx_t_2 = ((__pyx_v_nargs == 3) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":339 * o_counts = o_displs = None * elif nargs == 3: * o_buffer, (o_counts, o_displs), o_types = msg # <<<<<<<<<<<<<< * elif nargs == 4: * o_buffer, o_counts, o_displs, o_types = msg */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 339, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_5 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_6(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_5 = __pyx_t_6(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_7), 3) < 0) __PYX_ERR(5, 339, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 339, __pyx_L1_error) __pyx_L7_unpacking_done:; } __pyx_v_o_buffer = __pyx_t_4; __pyx_t_4 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 339, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_7 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); #else __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = Py_TYPE(__pyx_t_9)->tp_iternext; index = 0; __pyx_t_7 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_9), 2) < 0) __PYX_ERR(5, 339, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; __pyx_L8_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 339, __pyx_L1_error) __pyx_L9_unpacking_done:; } __pyx_v_o_counts = __pyx_t_7; __pyx_t_7 = 0; __pyx_v_o_displs = __pyx_t_8; __pyx_t_8 = 0; __pyx_v_o_types = __pyx_t_5; __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":338 * o_buffer, o_types = msg * o_counts = o_displs = None * elif nargs == 3: # <<<<<<<<<<<<<< * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: */ goto __pyx_L3; } /* "mpi4py/MPI/msgbuffer.pxi":340 * elif nargs == 3: * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: # <<<<<<<<<<<<<< * o_buffer, o_counts, o_displs, o_types = msg * else: */ __pyx_t_2 = ((__pyx_v_nargs == 4) != 0); if (likely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":341 * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: * o_buffer, o_counts, o_displs, o_types = msg # <<<<<<<<<<<<<< * else: * raise ValueError("message: expecting 2 to 4 items") */ if ((likely(PyTuple_CheckExact(__pyx_v_msg))) || (PyList_CheckExact(__pyx_v_msg))) { PyObject* sequence = __pyx_v_msg; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(5, 341, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 3); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); __pyx_t_8 = PyList_GET_ITEM(sequence, 3); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); #else { Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_8}; for (i=0; i < 4; i++) { PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(5, 341, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_3,&__pyx_t_4,&__pyx_t_8}; __pyx_t_7 = PyObject_GetIter(__pyx_v_msg); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = Py_TYPE(__pyx_t_7)->tp_iternext; for (index=0; index < 4; index++) { PyObject* item = __pyx_t_6(__pyx_t_7); if (unlikely(!item)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_7), 4) < 0) __PYX_ERR(5, 341, __pyx_L1_error) __pyx_t_6 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L11_unpacking_done; __pyx_L10_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(5, 341, __pyx_L1_error) __pyx_L11_unpacking_done:; } __pyx_v_o_buffer = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_o_counts = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_o_displs = __pyx_t_4; __pyx_t_4 = 0; __pyx_v_o_types = __pyx_t_8; __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":340 * elif nargs == 3: * o_buffer, (o_counts, o_displs), o_types = msg * elif nargs == 4: # <<<<<<<<<<<<<< * o_buffer, o_counts, o_displs, o_types = msg * else: */ goto __pyx_L3; } /* "mpi4py/MPI/msgbuffer.pxi":343 * o_buffer, o_counts, o_displs, o_types = msg * else: * raise ValueError("message: expecting 2 to 4 items") # <<<<<<<<<<<<<< * if readonly: * o_buffer = getbuffer_r(o_buffer, _addr, NULL) */ /*else*/ { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 343, __pyx_L1_error) } __pyx_L3:; /* "mpi4py/MPI/msgbuffer.pxi":344 * else: * raise ValueError("message: expecting 2 to 4 items") * if readonly: # <<<<<<<<<<<<<< * o_buffer = getbuffer_r(o_buffer, _addr, NULL) * else: */ __pyx_t_2 = (__pyx_v_readonly != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":345 * raise ValueError("message: expecting 2 to 4 items") * if readonly: * o_buffer = getbuffer_r(o_buffer, _addr, NULL) # <<<<<<<<<<<<<< * else: * o_buffer = getbuffer_w(o_buffer, _addr, NULL) */ __pyx_t_8 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_o_buffer, __pyx_v__addr, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_buffer, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":344 * else: * raise ValueError("message: expecting 2 to 4 items") * if readonly: # <<<<<<<<<<<<<< * o_buffer = getbuffer_r(o_buffer, _addr, NULL) * else: */ goto __pyx_L12; } /* "mpi4py/MPI/msgbuffer.pxi":347 * o_buffer = getbuffer_r(o_buffer, _addr, NULL) * else: * o_buffer = getbuffer_w(o_buffer, _addr, NULL) # <<<<<<<<<<<<<< * if o_counts is None and o_displs is None: * o_counts = newarray(blocks, _counts) */ /*else*/ { __pyx_t_8 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_o_buffer, __pyx_v__addr, NULL)); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_buffer, __pyx_t_8); __pyx_t_8 = 0; } __pyx_L12:; /* "mpi4py/MPI/msgbuffer.pxi":348 * else: * o_buffer = getbuffer_w(o_buffer, _addr, NULL) * if o_counts is None and o_displs is None: # <<<<<<<<<<<<<< * o_counts = newarray(blocks, _counts) * o_displs = newarray(blocks, _displs) */ __pyx_t_10 = (__pyx_v_o_counts == Py_None); __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { } else { __pyx_t_2 = __pyx_t_11; goto __pyx_L14_bool_binop_done; } __pyx_t_11 = (__pyx_v_o_displs == Py_None); __pyx_t_10 = (__pyx_t_11 != 0); __pyx_t_2 = __pyx_t_10; __pyx_L14_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":349 * o_buffer = getbuffer_w(o_buffer, _addr, NULL) * if o_counts is None and o_displs is None: * o_counts = newarray(blocks, _counts) # <<<<<<<<<<<<<< * o_displs = newarray(blocks, _displs) * for i from 0 <= i < blocks: */ __pyx_t_8 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_blocks, __pyx_v__counts); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":350 * if o_counts is None and o_displs is None: * o_counts = newarray(blocks, _counts) * o_displs = newarray(blocks, _displs) # <<<<<<<<<<<<<< * for i from 0 <= i < blocks: * _counts[0][i] = 1 */ __pyx_t_8 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_blocks, __pyx_v__displs); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":351 * o_counts = newarray(blocks, _counts) * o_displs = newarray(blocks, _displs) * for i from 0 <= i < blocks: # <<<<<<<<<<<<<< * _counts[0][i] = 1 * _displs[0][i] = 0 */ __pyx_t_12 = __pyx_v_blocks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) { /* "mpi4py/MPI/msgbuffer.pxi":352 * o_displs = newarray(blocks, _displs) * for i from 0 <= i < blocks: * _counts[0][i] = 1 # <<<<<<<<<<<<<< * _displs[0][i] = 0 * else: */ ((__pyx_v__counts[0])[__pyx_v_i]) = 1; /* "mpi4py/MPI/msgbuffer.pxi":353 * for i from 0 <= i < blocks: * _counts[0][i] = 1 * _displs[0][i] = 0 # <<<<<<<<<<<<<< * else: * o_counts = chkarray(o_counts, blocks, _counts) */ ((__pyx_v__displs[0])[__pyx_v_i]) = 0; } /* "mpi4py/MPI/msgbuffer.pxi":348 * else: * o_buffer = getbuffer_w(o_buffer, _addr, NULL) * if o_counts is None and o_displs is None: # <<<<<<<<<<<<<< * o_counts = newarray(blocks, _counts) * o_displs = newarray(blocks, _displs) */ goto __pyx_L13; } /* "mpi4py/MPI/msgbuffer.pxi":355 * _displs[0][i] = 0 * else: * o_counts = chkarray(o_counts, blocks, _counts) # <<<<<<<<<<<<<< * o_displs = chkarray(o_displs, blocks, _displs) * o_types = asarray_Datatype(o_types, blocks, _types) */ /*else*/ { __pyx_t_8 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_o_counts, __pyx_v_blocks, __pyx_v__counts); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_counts, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":356 * else: * o_counts = chkarray(o_counts, blocks, _counts) * o_displs = chkarray(o_displs, blocks, _displs) # <<<<<<<<<<<<<< * o_types = asarray_Datatype(o_types, blocks, _types) * return (o_buffer, o_counts, o_displs, o_types) */ __pyx_t_8 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_o_displs, __pyx_v_blocks, __pyx_v__displs); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_displs, __pyx_t_8); __pyx_t_8 = 0; } __pyx_L13:; /* "mpi4py/MPI/msgbuffer.pxi":357 * o_counts = chkarray(o_counts, blocks, _counts) * o_displs = chkarray(o_displs, blocks, _displs) * o_types = asarray_Datatype(o_types, blocks, _types) # <<<<<<<<<<<<<< * return (o_buffer, o_counts, o_displs, o_types) * */ __pyx_t_8 = __pyx_f_6mpi4py_3MPI_asarray_Datatype(__pyx_v_o_types, __pyx_v_blocks, __pyx_v__types); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_o_types, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":358 * o_displs = chkarray(o_displs, blocks, _displs) * o_types = asarray_Datatype(o_types, blocks, _types) * return (o_buffer, o_counts, o_displs, o_types) # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_o_buffer); __Pyx_GIVEREF(__pyx_v_o_buffer); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_o_buffer); __Pyx_INCREF(__pyx_v_o_counts); __Pyx_GIVEREF(__pyx_v_o_counts); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_o_counts); __Pyx_INCREF(__pyx_v_o_displs); __Pyx_GIVEREF(__pyx_v_o_displs); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_o_displs); __Pyx_INCREF(__pyx_v_o_types); __Pyx_GIVEREF(__pyx_v_o_types); PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_v_o_types); __pyx_r = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":323 * return m * * cdef tuple message_vector_w(object msg, # <<<<<<<<<<<<<< * int readonly, * int blocks, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("mpi4py.MPI.message_vector_w", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_o_buffer); __Pyx_XDECREF(__pyx_v_o_counts); __Pyx_XDECREF(__pyx_v_o_displs); __Pyx_XDECREF(__pyx_v_o_types); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":373 * cdef object _msg * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * self.count = 0 */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_10_p_msg_p2p_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_10_p_msg_p2p_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6mpi4py_3MPI_10_p_msg_p2p___cinit__(((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_10_p_msg_p2p___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/msgbuffer.pxi":374 * * def __cinit__(self): * self.buf = NULL # <<<<<<<<<<<<<< * self.count = 0 * self.dtype = MPI_DATATYPE_NULL */ __pyx_v_self->buf = NULL; /* "mpi4py/MPI/msgbuffer.pxi":375 * def __cinit__(self): * self.buf = NULL * self.count = 0 # <<<<<<<<<<<<<< * self.dtype = MPI_DATATYPE_NULL * */ __pyx_v_self->count = 0; /* "mpi4py/MPI/msgbuffer.pxi":376 * self.buf = NULL * self.count = 0 * self.dtype = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * * cdef int for_send(self, object msg, int rank) except -1: */ __pyx_v_self->dtype = MPI_DATATYPE_NULL; /* "mpi4py/MPI/msgbuffer.pxi":373 * cdef object _msg * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * self.count = 0 */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":378 * self.dtype = MPI_DATATYPE_NULL * * cdef int for_send(self, object msg, int rank) except -1: # <<<<<<<<<<<<<< * self._msg = message_simple(msg, 1, # readonly * rank, 0, */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_send(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_self, PyObject *__pyx_v_msg, int __pyx_v_rank) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("for_send", 0); /* "mpi4py/MPI/msgbuffer.pxi":379 * * cdef int for_send(self, object msg, int rank) except -1: * self._msg = message_simple(msg, 1, # readonly # <<<<<<<<<<<<<< * rank, 0, * &self.buf, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_msg, 1, __pyx_v_rank, 0, (&__pyx_v_self->buf), (&__pyx_v_self->count), (&__pyx_v_self->dtype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_msg); __Pyx_DECREF(__pyx_v_self->_msg); __pyx_v_self->_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":384 * &self.count, * &self.dtype) * return 0 # <<<<<<<<<<<<<< * * cdef int for_recv(self, object msg, int rank) except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":378 * self.dtype = MPI_DATATYPE_NULL * * cdef int for_send(self, object msg, int rank) except -1: # <<<<<<<<<<<<<< * self._msg = message_simple(msg, 1, # readonly * rank, 0, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_p2p.for_send", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":386 * return 0 * * cdef int for_recv(self, object msg, int rank) except -1: # <<<<<<<<<<<<<< * self._msg = message_simple(msg, 0, # writable * rank, 0, */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_recv(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_self, PyObject *__pyx_v_msg, int __pyx_v_rank) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("for_recv", 0); /* "mpi4py/MPI/msgbuffer.pxi":387 * * cdef int for_recv(self, object msg, int rank) except -1: * self._msg = message_simple(msg, 0, # writable # <<<<<<<<<<<<<< * rank, 0, * &self.buf, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_msg, 0, __pyx_v_rank, 0, (&__pyx_v_self->buf), (&__pyx_v_self->count), (&__pyx_v_self->dtype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_msg); __Pyx_DECREF(__pyx_v_self->_msg); __pyx_v_self->_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":392 * &self.count, * &self.dtype) * return 0 # <<<<<<<<<<<<<< * * cdef inline _p_msg_p2p message_p2p_send(object sendbuf, int dest): */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":386 * return 0 * * cdef int for_recv(self, object msg, int rank) except -1: # <<<<<<<<<<<<<< * self._msg = message_simple(msg, 0, # writable * rank, 0, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_p2p.for_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":394 * return 0 * * cdef inline _p_msg_p2p message_p2p_send(object sendbuf, int dest): # <<<<<<<<<<<<<< * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) * msg.for_send(sendbuf, dest) */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_f_6mpi4py_3MPI_message_p2p_send(PyObject *__pyx_v_sendbuf, int __pyx_v_dest) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_msg = 0; struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("message_p2p_send", 0); /* "mpi4py/MPI/msgbuffer.pxi":395 * * cdef inline _p_msg_p2p message_p2p_send(object sendbuf, int dest): * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) # <<<<<<<<<<<<<< * msg.for_send(sendbuf, dest) * return msg */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI__p_msg_p2p(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI__p_msg_p2p), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 395, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":396 * cdef inline _p_msg_p2p message_p2p_send(object sendbuf, int dest): * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) * msg.for_send(sendbuf, dest) # <<<<<<<<<<<<<< * return msg * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_send(__pyx_v_msg, __pyx_v_sendbuf, __pyx_v_dest); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 396, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":397 * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) * msg.for_send(sendbuf, dest) * return msg # <<<<<<<<<<<<<< * * cdef inline _p_msg_p2p message_p2p_recv(object recvbuf, int source): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __pyx_r = __pyx_v_msg; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":394 * return 0 * * cdef inline _p_msg_p2p message_p2p_send(object sendbuf, int dest): # <<<<<<<<<<<<<< * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) * msg.for_send(sendbuf, dest) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.message_p2p_send", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":399 * return msg * * cdef inline _p_msg_p2p message_p2p_recv(object recvbuf, int source): # <<<<<<<<<<<<<< * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) * msg.for_recv(recvbuf, source) */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_f_6mpi4py_3MPI_message_p2p_recv(PyObject *__pyx_v_recvbuf, int __pyx_v_source) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_msg = 0; struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("message_p2p_recv", 0); /* "mpi4py/MPI/msgbuffer.pxi":400 * * cdef inline _p_msg_p2p message_p2p_recv(object recvbuf, int source): * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) # <<<<<<<<<<<<<< * msg.for_recv(recvbuf, source) * return msg */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI__p_msg_p2p(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI__p_msg_p2p), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 400, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":401 * cdef inline _p_msg_p2p message_p2p_recv(object recvbuf, int source): * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) * msg.for_recv(recvbuf, source) # <<<<<<<<<<<<<< * return msg * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_recv(__pyx_v_msg, __pyx_v_recvbuf, __pyx_v_source); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 401, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":402 * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) * msg.for_recv(recvbuf, source) * return msg # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __pyx_r = __pyx_v_msg; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":399 * return msg * * cdef inline _p_msg_p2p message_p2p_recv(object recvbuf, int source): # <<<<<<<<<<<<<< * cdef _p_msg_p2p msg = <_p_msg_p2p>_p_msg_p2p.__new__(_p_msg_p2p) * msg.for_recv(recvbuf, source) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.message_p2p_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":420 * cdef object _rcnt * * def __cinit__(self): # <<<<<<<<<<<<<< * self.sbuf = self.rbuf = NULL * self.scount = self.rcount = 0 */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_10_p_msg_cco_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_10_p_msg_cco_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6mpi4py_3MPI_10_p_msg_cco___cinit__(((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_10_p_msg_cco___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/msgbuffer.pxi":421 * * def __cinit__(self): * self.sbuf = self.rbuf = NULL # <<<<<<<<<<<<<< * self.scount = self.rcount = 0 * self.scounts = self.rcounts = NULL */ __pyx_v_self->sbuf = NULL; __pyx_v_self->rbuf = NULL; /* "mpi4py/MPI/msgbuffer.pxi":422 * def __cinit__(self): * self.sbuf = self.rbuf = NULL * self.scount = self.rcount = 0 # <<<<<<<<<<<<<< * self.scounts = self.rcounts = NULL * self.sdispls = self.rdispls = NULL */ __pyx_v_self->scount = 0; __pyx_v_self->rcount = 0; /* "mpi4py/MPI/msgbuffer.pxi":423 * self.sbuf = self.rbuf = NULL * self.scount = self.rcount = 0 * self.scounts = self.rcounts = NULL # <<<<<<<<<<<<<< * self.sdispls = self.rdispls = NULL * self.stype = self.rtype = MPI_DATATYPE_NULL */ __pyx_v_self->scounts = NULL; __pyx_v_self->rcounts = NULL; /* "mpi4py/MPI/msgbuffer.pxi":424 * self.scount = self.rcount = 0 * self.scounts = self.rcounts = NULL * self.sdispls = self.rdispls = NULL # <<<<<<<<<<<<<< * self.stype = self.rtype = MPI_DATATYPE_NULL * */ __pyx_v_self->sdispls = NULL; __pyx_v_self->rdispls = NULL; /* "mpi4py/MPI/msgbuffer.pxi":425 * self.scounts = self.rcounts = NULL * self.sdispls = self.rdispls = NULL * self.stype = self.rtype = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * * # Collective Communication Operations */ __pyx_v_self->stype = MPI_DATATYPE_NULL; __pyx_v_self->rtype = MPI_DATATYPE_NULL; /* "mpi4py/MPI/msgbuffer.pxi":420 * cdef object _rcnt * * def __cinit__(self): # <<<<<<<<<<<<<< * self.sbuf = self.rbuf = NULL * self.scount = self.rcount = 0 */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":431 * * # sendbuf arguments * cdef int for_cco_send(self, bint VECTOR, # <<<<<<<<<<<<<< * object amsg, * int rank, int blocks) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_VECTOR, PyObject *__pyx_v_amsg, int __pyx_v_rank, int __pyx_v_blocks) { int __pyx_v_readonly; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("for_cco_send", 0); /* "mpi4py/MPI/msgbuffer.pxi":434 * object amsg, * int rank, int blocks) except -1: * cdef bint readonly = 1 # <<<<<<<<<<<<<< * if not VECTOR: # block variant * self._smsg = message_simple( */ __pyx_v_readonly = 1; /* "mpi4py/MPI/msgbuffer.pxi":435 * int rank, int blocks) except -1: * cdef bint readonly = 1 * if not VECTOR: # block variant # <<<<<<<<<<<<<< * self._smsg = message_simple( * amsg, readonly, rank, blocks, */ __pyx_t_1 = ((!(__pyx_v_VECTOR != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":436 * cdef bint readonly = 1 * if not VECTOR: # block variant * self._smsg = message_simple( # <<<<<<<<<<<<<< * amsg, readonly, rank, blocks, * &self.sbuf, &self.scount, &self.stype) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_amsg, __pyx_v_readonly, __pyx_v_rank, __pyx_v_blocks, (&__pyx_v_self->sbuf), (&__pyx_v_self->scount), (&__pyx_v_self->stype))); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_smsg); __Pyx_DECREF(__pyx_v_self->_smsg); __pyx_v_self->_smsg = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":435 * int rank, int blocks) except -1: * cdef bint readonly = 1 * if not VECTOR: # block variant # <<<<<<<<<<<<<< * self._smsg = message_simple( * amsg, readonly, rank, blocks, */ goto __pyx_L3; } /* "mpi4py/MPI/msgbuffer.pxi":440 * &self.sbuf, &self.scount, &self.stype) * else: # vector variant * self._smsg = message_vector( # <<<<<<<<<<<<<< * amsg, readonly, rank, blocks, * &self.sbuf, &self.scounts, */ /*else*/ { /* "mpi4py/MPI/msgbuffer.pxi":443 * amsg, readonly, rank, blocks, * &self.sbuf, &self.scounts, * &self.sdispls, &self.stype) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_vector(__pyx_v_amsg, __pyx_v_readonly, __pyx_v_rank, __pyx_v_blocks, (&__pyx_v_self->sbuf), (&__pyx_v_self->scounts), (&__pyx_v_self->sdispls), (&__pyx_v_self->stype))); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "mpi4py/MPI/msgbuffer.pxi":440 * &self.sbuf, &self.scount, &self.stype) * else: # vector variant * self._smsg = message_vector( # <<<<<<<<<<<<<< * amsg, readonly, rank, blocks, * &self.sbuf, &self.scounts, */ __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_smsg); __Pyx_DECREF(__pyx_v_self->_smsg); __pyx_v_self->_smsg = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; /* "mpi4py/MPI/msgbuffer.pxi":444 * &self.sbuf, &self.scounts, * &self.sdispls, &self.stype) * return 0 # <<<<<<<<<<<<<< * * # recvbuf arguments */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":431 * * # sendbuf arguments * cdef int for_cco_send(self, bint VECTOR, # <<<<<<<<<<<<<< * object amsg, * int rank, int blocks) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_cco_send", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":447 * * # recvbuf arguments * cdef int for_cco_recv(self, bint VECTOR, # <<<<<<<<<<<<<< * object amsg, * int rank, int blocks) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_VECTOR, PyObject *__pyx_v_amsg, int __pyx_v_rank, int __pyx_v_blocks) { int __pyx_v_readonly; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("for_cco_recv", 0); /* "mpi4py/MPI/msgbuffer.pxi":450 * object amsg, * int rank, int blocks) except -1: * cdef bint readonly = 0 # <<<<<<<<<<<<<< * if not VECTOR: # block variant * self._rmsg = message_simple( */ __pyx_v_readonly = 0; /* "mpi4py/MPI/msgbuffer.pxi":451 * int rank, int blocks) except -1: * cdef bint readonly = 0 * if not VECTOR: # block variant # <<<<<<<<<<<<<< * self._rmsg = message_simple( * amsg, readonly, rank, blocks, */ __pyx_t_1 = ((!(__pyx_v_VECTOR != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":452 * cdef bint readonly = 0 * if not VECTOR: # block variant * self._rmsg = message_simple( # <<<<<<<<<<<<<< * amsg, readonly, rank, blocks, * &self.rbuf, &self.rcount, &self.rtype) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_amsg, __pyx_v_readonly, __pyx_v_rank, __pyx_v_blocks, (&__pyx_v_self->rbuf), (&__pyx_v_self->rcount), (&__pyx_v_self->rtype))); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_rmsg); __Pyx_DECREF(__pyx_v_self->_rmsg); __pyx_v_self->_rmsg = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":451 * int rank, int blocks) except -1: * cdef bint readonly = 0 * if not VECTOR: # block variant # <<<<<<<<<<<<<< * self._rmsg = message_simple( * amsg, readonly, rank, blocks, */ goto __pyx_L3; } /* "mpi4py/MPI/msgbuffer.pxi":456 * &self.rbuf, &self.rcount, &self.rtype) * else: # vector variant * self._rmsg = message_vector( # <<<<<<<<<<<<<< * amsg, readonly, rank, blocks, * &self.rbuf, &self.rcounts, */ /*else*/ { /* "mpi4py/MPI/msgbuffer.pxi":459 * amsg, readonly, rank, blocks, * &self.rbuf, &self.rcounts, * &self.rdispls, &self.rtype) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_vector(__pyx_v_amsg, __pyx_v_readonly, __pyx_v_rank, __pyx_v_blocks, (&__pyx_v_self->rbuf), (&__pyx_v_self->rcounts), (&__pyx_v_self->rdispls), (&__pyx_v_self->rtype))); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "mpi4py/MPI/msgbuffer.pxi":456 * &self.rbuf, &self.rcount, &self.rtype) * else: # vector variant * self._rmsg = message_vector( # <<<<<<<<<<<<<< * amsg, readonly, rank, blocks, * &self.rbuf, &self.rcounts, */ __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->_rmsg); __Pyx_DECREF(__pyx_v_self->_rmsg); __pyx_v_self->_rmsg = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; /* "mpi4py/MPI/msgbuffer.pxi":460 * &self.rbuf, &self.rcounts, * &self.rdispls, &self.rtype) * return 0 # <<<<<<<<<<<<<< * * # bcast */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":447 * * # recvbuf arguments * cdef int for_cco_recv(self, bint VECTOR, # <<<<<<<<<<<<<< * object amsg, * int rank, int blocks) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_cco_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":463 * * # bcast * cdef int for_bcast(self, # <<<<<<<<<<<<<< * object msg, int root, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_bcast(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_msg, int __pyx_v_root, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_v_rank; int __pyx_v_sending; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; void *__pyx_t_4; MPI_Datatype __pyx_t_5; __Pyx_RefNannySetupContext("for_bcast", 0); /* "mpi4py/MPI/msgbuffer.pxi":466 * object msg, int root, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0, rank=0, sending=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":467 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, rank=0, sending=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication */ __pyx_v_inter = 0; __pyx_v_rank = 0; __pyx_v_sending = 0; /* "mpi4py/MPI/msgbuffer.pxi":468 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, rank=0, sending=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if not inter: # intra-communication * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 468, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":469 * cdef int inter=0, rank=0, sending=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: */ __pyx_t_1 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":470 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * if root == rank: * self.for_cco_send(0, msg, root, 0) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 470, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":471 * if not inter: # intra-communication * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * self.for_cco_send(0, msg, root, 0) * sending = 1 */ __pyx_t_1 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":472 * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: * self.for_cco_send(0, msg, root, 0) # <<<<<<<<<<<<<< * sending = 1 * else: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, 0, __pyx_v_msg, __pyx_v_root, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 472, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":473 * if root == rank: * self.for_cco_send(0, msg, root, 0) * sending = 1 # <<<<<<<<<<<<<< * else: * self.for_cco_recv(0, msg, root, 0) */ __pyx_v_sending = 1; /* "mpi4py/MPI/msgbuffer.pxi":471 * if not inter: # intra-communication * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * self.for_cco_send(0, msg, root, 0) * sending = 1 */ goto __pyx_L5; } /* "mpi4py/MPI/msgbuffer.pxi":475 * sending = 1 * else: * self.for_cco_recv(0, msg, root, 0) # <<<<<<<<<<<<<< * sending = 0 * else: # inter-communication */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, 0, __pyx_v_msg, __pyx_v_root, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 475, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":476 * else: * self.for_cco_recv(0, msg, root, 0) * sending = 0 # <<<<<<<<<<<<<< * else: # inter-communication * if (root == MPI_ROOT or */ __pyx_v_sending = 0; } __pyx_L5:; /* "mpi4py/MPI/msgbuffer.pxi":469 * cdef int inter=0, rank=0, sending=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":478 * sending = 0 * else: # inter-communication * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cco_send(0, msg, root, 0) */ /*else*/ { __pyx_t_3 = ((__pyx_v_root == MPI_ROOT) != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L7_bool_binop_done; } /* "mpi4py/MPI/msgbuffer.pxi":479 * else: # inter-communication * if (root == MPI_ROOT or * root == MPI_PROC_NULL): # <<<<<<<<<<<<<< * self.for_cco_send(0, msg, root, 0) * sending = 1 */ __pyx_t_3 = ((__pyx_v_root == MPI_PROC_NULL) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L7_bool_binop_done:; /* "mpi4py/MPI/msgbuffer.pxi":478 * sending = 0 * else: # inter-communication * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cco_send(0, msg, root, 0) */ if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":480 * if (root == MPI_ROOT or * root == MPI_PROC_NULL): * self.for_cco_send(0, msg, root, 0) # <<<<<<<<<<<<<< * sending = 1 * else: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, 0, __pyx_v_msg, __pyx_v_root, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 480, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":481 * root == MPI_PROC_NULL): * self.for_cco_send(0, msg, root, 0) * sending = 1 # <<<<<<<<<<<<<< * else: * self.for_cco_recv(0, msg, root, 0) */ __pyx_v_sending = 1; /* "mpi4py/MPI/msgbuffer.pxi":478 * sending = 0 * else: # inter-communication * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cco_send(0, msg, root, 0) */ goto __pyx_L6; } /* "mpi4py/MPI/msgbuffer.pxi":483 * sending = 1 * else: * self.for_cco_recv(0, msg, root, 0) # <<<<<<<<<<<<<< * sending = 0 * if sending: */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, 0, __pyx_v_msg, __pyx_v_root, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 483, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":484 * else: * self.for_cco_recv(0, msg, root, 0) * sending = 0 # <<<<<<<<<<<<<< * if sending: * self.rbuf = self.sbuf */ __pyx_v_sending = 0; } __pyx_L6:; } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":485 * self.for_cco_recv(0, msg, root, 0) * sending = 0 * if sending: # <<<<<<<<<<<<<< * self.rbuf = self.sbuf * self.rcount = self.scount */ __pyx_t_1 = (__pyx_v_sending != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":486 * sending = 0 * if sending: * self.rbuf = self.sbuf # <<<<<<<<<<<<<< * self.rcount = self.scount * self.rtype = self.stype */ __pyx_t_4 = __pyx_v_self->sbuf; __pyx_v_self->rbuf = __pyx_t_4; /* "mpi4py/MPI/msgbuffer.pxi":487 * if sending: * self.rbuf = self.sbuf * self.rcount = self.scount # <<<<<<<<<<<<<< * self.rtype = self.stype * else: */ __pyx_t_2 = __pyx_v_self->scount; __pyx_v_self->rcount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":488 * self.rbuf = self.sbuf * self.rcount = self.scount * self.rtype = self.stype # <<<<<<<<<<<<<< * else: * self.sbuf = self.rbuf */ __pyx_t_5 = __pyx_v_self->stype; __pyx_v_self->rtype = __pyx_t_5; /* "mpi4py/MPI/msgbuffer.pxi":485 * self.for_cco_recv(0, msg, root, 0) * sending = 0 * if sending: # <<<<<<<<<<<<<< * self.rbuf = self.sbuf * self.rcount = self.scount */ goto __pyx_L9; } /* "mpi4py/MPI/msgbuffer.pxi":490 * self.rtype = self.stype * else: * self.sbuf = self.rbuf # <<<<<<<<<<<<<< * self.scount = self.rcount * self.stype = self.rtype */ /*else*/ { __pyx_t_4 = __pyx_v_self->rbuf; __pyx_v_self->sbuf = __pyx_t_4; /* "mpi4py/MPI/msgbuffer.pxi":491 * else: * self.sbuf = self.rbuf * self.scount = self.rcount # <<<<<<<<<<<<<< * self.stype = self.rtype * return 0 */ __pyx_t_2 = __pyx_v_self->rcount; __pyx_v_self->scount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":492 * self.sbuf = self.rbuf * self.scount = self.rcount * self.stype = self.rtype # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_5 = __pyx_v_self->rtype; __pyx_v_self->stype = __pyx_t_5; } __pyx_L9:; /* "mpi4py/MPI/msgbuffer.pxi":493 * self.scount = self.rcount * self.stype = self.rtype * return 0 # <<<<<<<<<<<<<< * * # gather/gatherv */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":463 * * # bcast * cdef int for_bcast(self, # <<<<<<<<<<<<<< * object msg, int root, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_bcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":496 * * # gather/gatherv * cdef int for_gather(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * int root, MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_gather(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, int __pyx_v_root, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_v_size; int __pyx_v_rank; int __pyx_v_null; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; MPI_Datatype __pyx_t_4; __Pyx_RefNannySetupContext("for_gather", 0); /* "mpi4py/MPI/msgbuffer.pxi":499 * object smsg, object rmsg, * int root, MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":500 * int root, MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication */ __pyx_v_inter = 0; __pyx_v_size = 0; __pyx_v_rank = 0; __pyx_v_null = MPI_PROC_NULL; /* "mpi4py/MPI/msgbuffer.pxi":501 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 501, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":502 * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_t_1 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":503 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 503, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":504 * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * if root == rank: * self.for_cco_recv(v, rmsg, root, size) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 504, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":505 * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * self.for_cco_recv(v, rmsg, root, size) * if smsg is __IN_PLACE__: */ __pyx_t_1 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":506 * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: * self.for_cco_recv(v, rmsg, root, size) # <<<<<<<<<<<<<< * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, __pyx_v_v, __pyx_v_rmsg, __pyx_v_root, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 506, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":507 * if root == rank: * self.for_cco_recv(v, rmsg, root, size) * if smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ __pyx_t_1 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":508 * self.for_cco_recv(v, rmsg, root, size) * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * self.scount = self.rcount * self.stype = self.rtype */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":509 * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount # <<<<<<<<<<<<<< * self.stype = self.rtype * else: */ __pyx_t_2 = __pyx_v_self->rcount; __pyx_v_self->scount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":510 * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount * self.stype = self.rtype # <<<<<<<<<<<<<< * else: * self.for_cco_send(0, smsg, 0, 0) */ __pyx_t_4 = __pyx_v_self->rtype; __pyx_v_self->stype = __pyx_t_4; /* "mpi4py/MPI/msgbuffer.pxi":507 * if root == rank: * self.for_cco_recv(v, rmsg, root, size) * if smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ goto __pyx_L6; } /* "mpi4py/MPI/msgbuffer.pxi":512 * self.stype = self.rtype * else: * self.for_cco_send(0, smsg, 0, 0) # <<<<<<<<<<<<<< * else: * self.for_cco_recv(v, rmsg, null, size) */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, 0, __pyx_v_smsg, 0, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 512, __pyx_L1_error) } __pyx_L6:; /* "mpi4py/MPI/msgbuffer.pxi":505 * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * self.for_cco_recv(v, rmsg, root, size) * if smsg is __IN_PLACE__: */ goto __pyx_L5; } /* "mpi4py/MPI/msgbuffer.pxi":514 * self.for_cco_send(0, smsg, 0, 0) * else: * self.for_cco_recv(v, rmsg, null, size) # <<<<<<<<<<<<<< * self.for_cco_send(0, smsg, root, 0) * else: # inter-communication */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, __pyx_v_v, __pyx_v_rmsg, __pyx_v_null, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 514, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":515 * else: * self.for_cco_recv(v, rmsg, null, size) * self.for_cco_send(0, smsg, root, 0) # <<<<<<<<<<<<<< * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, 0, __pyx_v_smsg, __pyx_v_root, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 515, __pyx_L1_error) } __pyx_L5:; /* "mpi4py/MPI/msgbuffer.pxi":502 * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":517 * self.for_cco_send(0, smsg, root, 0) * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * if (root == MPI_ROOT or * root == MPI_PROC_NULL): */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 517, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":518 * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cco_recv(v, rmsg, root, size) */ __pyx_t_1 = ((__pyx_v_root == MPI_ROOT) != 0); if (!__pyx_t_1) { } else { __pyx_t_3 = __pyx_t_1; goto __pyx_L8_bool_binop_done; } /* "mpi4py/MPI/msgbuffer.pxi":519 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if (root == MPI_ROOT or * root == MPI_PROC_NULL): # <<<<<<<<<<<<<< * self.for_cco_recv(v, rmsg, root, size) * self.for_cco_send(0, smsg, null, 0) */ __pyx_t_1 = ((__pyx_v_root == MPI_PROC_NULL) != 0); __pyx_t_3 = __pyx_t_1; __pyx_L8_bool_binop_done:; /* "mpi4py/MPI/msgbuffer.pxi":518 * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cco_recv(v, rmsg, root, size) */ if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":520 * if (root == MPI_ROOT or * root == MPI_PROC_NULL): * self.for_cco_recv(v, rmsg, root, size) # <<<<<<<<<<<<<< * self.for_cco_send(0, smsg, null, 0) * else: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, __pyx_v_v, __pyx_v_rmsg, __pyx_v_root, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 520, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":521 * root == MPI_PROC_NULL): * self.for_cco_recv(v, rmsg, root, size) * self.for_cco_send(0, smsg, null, 0) # <<<<<<<<<<<<<< * else: * self.for_cco_recv(v, rmsg, null, size) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, 0, __pyx_v_smsg, __pyx_v_null, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 521, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":518 * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cco_recv(v, rmsg, root, size) */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":523 * self.for_cco_send(0, smsg, null, 0) * else: * self.for_cco_recv(v, rmsg, null, size) # <<<<<<<<<<<<<< * self.for_cco_send(0, smsg, root, 0) * return 0 */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, __pyx_v_v, __pyx_v_rmsg, __pyx_v_null, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 523, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":524 * else: * self.for_cco_recv(v, rmsg, null, size) * self.for_cco_send(0, smsg, root, 0) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, 0, __pyx_v_smsg, __pyx_v_root, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 524, __pyx_L1_error) } __pyx_L7:; } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":525 * self.for_cco_recv(v, rmsg, null, size) * self.for_cco_send(0, smsg, root, 0) * return 0 # <<<<<<<<<<<<<< * * # scatter/scatterv */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":496 * * # gather/gatherv * cdef int for_gather(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * int root, MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_gather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":528 * * # scatter/scatterv * cdef int for_scatter(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * int root, MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scatter(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, int __pyx_v_root, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_v_size; int __pyx_v_rank; int __pyx_v_null; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; MPI_Datatype __pyx_t_4; __Pyx_RefNannySetupContext("for_scatter", 0); /* "mpi4py/MPI/msgbuffer.pxi":531 * object smsg, object rmsg, * int root, MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":532 * int root, MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication */ __pyx_v_inter = 0; __pyx_v_size = 0; __pyx_v_rank = 0; __pyx_v_null = MPI_PROC_NULL; /* "mpi4py/MPI/msgbuffer.pxi":533 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 533, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":534 * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_t_1 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":535 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 535, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":536 * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * if root == rank: * self.for_cco_send(v, smsg, root, size) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 536, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":537 * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * self.for_cco_send(v, smsg, root, size) * if rmsg is __IN_PLACE__: */ __pyx_t_1 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":538 * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: * self.for_cco_send(v, smsg, root, size) # <<<<<<<<<<<<<< * if rmsg is __IN_PLACE__: * self.rbuf = MPI_IN_PLACE */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, __pyx_v_v, __pyx_v_smsg, __pyx_v_root, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 538, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":539 * if root == rank: * self.for_cco_send(v, smsg, root, size) * if rmsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.rbuf = MPI_IN_PLACE * self.rcount = self.scount */ __pyx_t_1 = (__pyx_v_rmsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":540 * self.for_cco_send(v, smsg, root, size) * if rmsg is __IN_PLACE__: * self.rbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * self.rcount = self.scount * self.rtype = self.stype */ __pyx_v_self->rbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":541 * if rmsg is __IN_PLACE__: * self.rbuf = MPI_IN_PLACE * self.rcount = self.scount # <<<<<<<<<<<<<< * self.rtype = self.stype * else: */ __pyx_t_2 = __pyx_v_self->scount; __pyx_v_self->rcount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":542 * self.rbuf = MPI_IN_PLACE * self.rcount = self.scount * self.rtype = self.stype # <<<<<<<<<<<<<< * else: * self.for_cco_recv(0, rmsg, root, 0) */ __pyx_t_4 = __pyx_v_self->stype; __pyx_v_self->rtype = __pyx_t_4; /* "mpi4py/MPI/msgbuffer.pxi":539 * if root == rank: * self.for_cco_send(v, smsg, root, size) * if rmsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.rbuf = MPI_IN_PLACE * self.rcount = self.scount */ goto __pyx_L6; } /* "mpi4py/MPI/msgbuffer.pxi":544 * self.rtype = self.stype * else: * self.for_cco_recv(0, rmsg, root, 0) # <<<<<<<<<<<<<< * else: * self.for_cco_send(v, smsg, null, size) */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, 0, __pyx_v_rmsg, __pyx_v_root, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 544, __pyx_L1_error) } __pyx_L6:; /* "mpi4py/MPI/msgbuffer.pxi":537 * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * self.for_cco_send(v, smsg, root, size) * if rmsg is __IN_PLACE__: */ goto __pyx_L5; } /* "mpi4py/MPI/msgbuffer.pxi":546 * self.for_cco_recv(0, rmsg, root, 0) * else: * self.for_cco_send(v, smsg, null, size) # <<<<<<<<<<<<<< * self.for_cco_recv(0, rmsg, root, 0) * else: # inter-communication */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, __pyx_v_v, __pyx_v_smsg, __pyx_v_null, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 546, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":547 * else: * self.for_cco_send(v, smsg, null, size) * self.for_cco_recv(0, rmsg, root, 0) # <<<<<<<<<<<<<< * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, 0, __pyx_v_rmsg, __pyx_v_root, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 547, __pyx_L1_error) } __pyx_L5:; /* "mpi4py/MPI/msgbuffer.pxi":534 * cdef int inter=0, size=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":549 * self.for_cco_recv(0, rmsg, root, 0) * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * if (root == MPI_ROOT or * root == MPI_PROC_NULL): */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 549, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":550 * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cco_send(v, smsg, root, size) */ __pyx_t_1 = ((__pyx_v_root == MPI_ROOT) != 0); if (!__pyx_t_1) { } else { __pyx_t_3 = __pyx_t_1; goto __pyx_L8_bool_binop_done; } /* "mpi4py/MPI/msgbuffer.pxi":551 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if (root == MPI_ROOT or * root == MPI_PROC_NULL): # <<<<<<<<<<<<<< * self.for_cco_send(v, smsg, root, size) * self.for_cco_recv(0, rmsg, null, 0) */ __pyx_t_1 = ((__pyx_v_root == MPI_PROC_NULL) != 0); __pyx_t_3 = __pyx_t_1; __pyx_L8_bool_binop_done:; /* "mpi4py/MPI/msgbuffer.pxi":550 * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cco_send(v, smsg, root, size) */ if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":552 * if (root == MPI_ROOT or * root == MPI_PROC_NULL): * self.for_cco_send(v, smsg, root, size) # <<<<<<<<<<<<<< * self.for_cco_recv(0, rmsg, null, 0) * else: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, __pyx_v_v, __pyx_v_smsg, __pyx_v_root, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 552, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":553 * root == MPI_PROC_NULL): * self.for_cco_send(v, smsg, root, size) * self.for_cco_recv(0, rmsg, null, 0) # <<<<<<<<<<<<<< * else: * self.for_cco_send(v, smsg, null, size) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, 0, __pyx_v_rmsg, __pyx_v_null, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 553, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":550 * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cco_send(v, smsg, root, size) */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":555 * self.for_cco_recv(0, rmsg, null, 0) * else: * self.for_cco_send(v, smsg, null, size) # <<<<<<<<<<<<<< * self.for_cco_recv(0, rmsg, root, 0) * return 0 */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, __pyx_v_v, __pyx_v_smsg, __pyx_v_null, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 555, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":556 * else: * self.for_cco_send(v, smsg, null, size) * self.for_cco_recv(0, rmsg, root, 0) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, 0, __pyx_v_rmsg, __pyx_v_root, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 556, __pyx_L1_error) } __pyx_L7:; } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":557 * self.for_cco_send(v, smsg, null, size) * self.for_cco_recv(0, rmsg, root, 0) * return 0 # <<<<<<<<<<<<<< * * # allgather/allgatherv */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":528 * * # scatter/scatterv * cdef int for_scatter(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * int root, MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":560 * * # allgather/allgatherv * cdef int for_allgather(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allgather(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_v_size; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; MPI_Datatype __pyx_t_5; __Pyx_RefNannySetupContext("for_allgather", 0); /* "mpi4py/MPI/msgbuffer.pxi":563 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":564 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication */ __pyx_v_inter = 0; __pyx_v_size = 0; /* "mpi4py/MPI/msgbuffer.pxi":565 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 565, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":566 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * else: # inter-communication */ __pyx_t_1 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":567 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 567, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":566 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * else: # inter-communication */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":569 * CHKERR( MPI_Comm_size(comm, &size) ) * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * # * self.for_cco_recv(v, rmsg, 0, size) */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 569, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":571 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * # * self.for_cco_recv(v, rmsg, 0, size) # <<<<<<<<<<<<<< * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, __pyx_v_v, __pyx_v_rmsg, 0, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 571, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":572 * # * self.for_cco_recv(v, rmsg, 0, size) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ __pyx_t_3 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":573 * self.for_cco_recv(v, rmsg, 0, size) * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * self.scount = self.rcount * self.stype = self.rtype */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":574 * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount # <<<<<<<<<<<<<< * self.stype = self.rtype * else: */ __pyx_t_2 = __pyx_v_self->rcount; __pyx_v_self->scount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":575 * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount * self.stype = self.rtype # <<<<<<<<<<<<<< * else: * self.for_cco_send(0, smsg, 0, 0) */ __pyx_t_5 = __pyx_v_self->rtype; __pyx_v_self->stype = __pyx_t_5; /* "mpi4py/MPI/msgbuffer.pxi":572 * # * self.for_cco_recv(v, rmsg, 0, size) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ goto __pyx_L5; } /* "mpi4py/MPI/msgbuffer.pxi":577 * self.stype = self.rtype * else: * self.for_cco_send(0, smsg, 0, 0) # <<<<<<<<<<<<<< * return 0 * */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, 0, __pyx_v_smsg, 0, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 577, __pyx_L1_error) } __pyx_L5:; /* "mpi4py/MPI/msgbuffer.pxi":578 * else: * self.for_cco_send(0, smsg, 0, 0) * return 0 # <<<<<<<<<<<<<< * * # alltoall/alltoallv */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":560 * * # allgather/allgatherv * cdef int for_allgather(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":581 * * # alltoall/alltoallv * cdef int for_alltoall(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_alltoall(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_v_size; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int *__pyx_t_5; MPI_Datatype __pyx_t_6; __Pyx_RefNannySetupContext("for_alltoall", 0); /* "mpi4py/MPI/msgbuffer.pxi":584 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":585 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication */ __pyx_v_inter = 0; __pyx_v_size = 0; /* "mpi4py/MPI/msgbuffer.pxi":586 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 586, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":587 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * else: # inter-communication */ __pyx_t_1 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":588 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 588, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":587 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * else: # inter-communication */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":590 * CHKERR( MPI_Comm_size(comm, &size) ) * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * # * self.for_cco_recv(v, rmsg, 0, size) */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 590, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":592 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * # * self.for_cco_recv(v, rmsg, 0, size) # <<<<<<<<<<<<<< * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, __pyx_v_v, __pyx_v_rmsg, 0, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 592, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":593 * # * self.for_cco_recv(v, rmsg, 0, size) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ __pyx_t_3 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":594 * self.for_cco_recv(v, rmsg, 0, size) * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * self.scount = self.rcount * self.scounts = self.rcounts */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":595 * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount # <<<<<<<<<<<<<< * self.scounts = self.rcounts * self.sdispls = self.rdispls */ __pyx_t_2 = __pyx_v_self->rcount; __pyx_v_self->scount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":596 * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount * self.scounts = self.rcounts # <<<<<<<<<<<<<< * self.sdispls = self.rdispls * self.stype = self.rtype */ __pyx_t_5 = __pyx_v_self->rcounts; __pyx_v_self->scounts = __pyx_t_5; /* "mpi4py/MPI/msgbuffer.pxi":597 * self.scount = self.rcount * self.scounts = self.rcounts * self.sdispls = self.rdispls # <<<<<<<<<<<<<< * self.stype = self.rtype * else: */ __pyx_t_5 = __pyx_v_self->rdispls; __pyx_v_self->sdispls = __pyx_t_5; /* "mpi4py/MPI/msgbuffer.pxi":598 * self.scounts = self.rcounts * self.sdispls = self.rdispls * self.stype = self.rtype # <<<<<<<<<<<<<< * else: * self.for_cco_send(v, smsg, 0, size) */ __pyx_t_6 = __pyx_v_self->rtype; __pyx_v_self->stype = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":593 * # * self.for_cco_recv(v, rmsg, 0, size) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ goto __pyx_L5; } /* "mpi4py/MPI/msgbuffer.pxi":600 * self.stype = self.rtype * else: * self.for_cco_send(v, smsg, 0, size) # <<<<<<<<<<<<<< * return 0 * */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, __pyx_v_v, __pyx_v_smsg, 0, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 600, __pyx_L1_error) } __pyx_L5:; /* "mpi4py/MPI/msgbuffer.pxi":601 * else: * self.for_cco_send(v, smsg, 0, size) * return 0 # <<<<<<<<<<<<<< * * # Neighbor Collectives */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":581 * * # alltoall/alltoallv * cdef int for_alltoall(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":607 * * # neighbor allgather/allgatherv * cdef int for_neighbor_allgather(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_allgather(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_v_recvsize; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("for_neighbor_allgather", 0); /* "mpi4py/MPI/msgbuffer.pxi":610 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int recvsize=0 * comm_neighbors_count(comm, &recvsize, NULL) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":611 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int recvsize=0 # <<<<<<<<<<<<<< * comm_neighbors_count(comm, &recvsize, NULL) * self.for_cco_send(0, smsg, 0, 0) */ __pyx_v_recvsize = 0; /* "mpi4py/MPI/msgbuffer.pxi":612 * if comm == MPI_COMM_NULL: return 0 * cdef int recvsize=0 * comm_neighbors_count(comm, &recvsize, NULL) # <<<<<<<<<<<<<< * self.for_cco_send(0, smsg, 0, 0) * self.for_cco_recv(v, rmsg, 0, recvsize) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_comm_neighbors_count(__pyx_v_comm, (&__pyx_v_recvsize), NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 612, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":613 * cdef int recvsize=0 * comm_neighbors_count(comm, &recvsize, NULL) * self.for_cco_send(0, smsg, 0, 0) # <<<<<<<<<<<<<< * self.for_cco_recv(v, rmsg, 0, recvsize) * return 0 */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, 0, __pyx_v_smsg, 0, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 613, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":614 * comm_neighbors_count(comm, &recvsize, NULL) * self.for_cco_send(0, smsg, 0, 0) * self.for_cco_recv(v, rmsg, 0, recvsize) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, __pyx_v_v, __pyx_v_rmsg, 0, __pyx_v_recvsize); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 614, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":615 * self.for_cco_send(0, smsg, 0, 0) * self.for_cco_recv(v, rmsg, 0, recvsize) * return 0 # <<<<<<<<<<<<<< * * # neighbor alltoall/alltoallv */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":607 * * # neighbor allgather/allgatherv * cdef int for_neighbor_allgather(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_neighbor_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":618 * * # neighbor alltoall/alltoallv * cdef int for_neighbor_alltoall(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_alltoall(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, int __pyx_v_v, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_v_sendsize; int __pyx_v_recvsize; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("for_neighbor_alltoall", 0); /* "mpi4py/MPI/msgbuffer.pxi":621 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int sendsize=0, recvsize=0 * comm_neighbors_count(comm, &recvsize, &sendsize) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":622 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int sendsize=0, recvsize=0 # <<<<<<<<<<<<<< * comm_neighbors_count(comm, &recvsize, &sendsize) * self.for_cco_send(v, smsg, 0, sendsize) */ __pyx_v_sendsize = 0; __pyx_v_recvsize = 0; /* "mpi4py/MPI/msgbuffer.pxi":623 * if comm == MPI_COMM_NULL: return 0 * cdef int sendsize=0, recvsize=0 * comm_neighbors_count(comm, &recvsize, &sendsize) # <<<<<<<<<<<<<< * self.for_cco_send(v, smsg, 0, sendsize) * self.for_cco_recv(v, rmsg, 0, recvsize) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_comm_neighbors_count(__pyx_v_comm, (&__pyx_v_recvsize), (&__pyx_v_sendsize)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 623, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":624 * cdef int sendsize=0, recvsize=0 * comm_neighbors_count(comm, &recvsize, &sendsize) * self.for_cco_send(v, smsg, 0, sendsize) # <<<<<<<<<<<<<< * self.for_cco_recv(v, rmsg, 0, recvsize) * return 0 */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, __pyx_v_v, __pyx_v_smsg, 0, __pyx_v_sendsize); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 624, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":625 * comm_neighbors_count(comm, &recvsize, &sendsize) * self.for_cco_send(v, smsg, 0, sendsize) * self.for_cco_recv(v, rmsg, 0, recvsize) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, __pyx_v_v, __pyx_v_rmsg, 0, __pyx_v_recvsize); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 625, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":626 * self.for_cco_send(v, smsg, 0, sendsize) * self.for_cco_recv(v, rmsg, 0, recvsize) * return 0 # <<<<<<<<<<<<<< * * # Collective Reductions Operations */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":618 * * # neighbor alltoall/alltoallv * cdef int for_neighbor_alltoall(self, int v, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_neighbor_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":632 * * # sendbuf * cdef int for_cro_send(self, object amsg, int root) except -1: # <<<<<<<<<<<<<< * self._smsg = message_simple(amsg, 1, # readonly * root, 0, */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_amsg, int __pyx_v_root) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("for_cro_send", 0); /* "mpi4py/MPI/msgbuffer.pxi":633 * # sendbuf * cdef int for_cro_send(self, object amsg, int root) except -1: * self._smsg = message_simple(amsg, 1, # readonly # <<<<<<<<<<<<<< * root, 0, * &self.sbuf, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_amsg, 1, __pyx_v_root, 0, (&__pyx_v_self->sbuf), (&__pyx_v_self->scount), (&__pyx_v_self->stype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_smsg); __Pyx_DECREF(__pyx_v_self->_smsg); __pyx_v_self->_smsg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":638 * &self.scount, * &self.stype) * return 0 # <<<<<<<<<<<<<< * * # recvbuf */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":632 * * # sendbuf * cdef int for_cro_send(self, object amsg, int root) except -1: # <<<<<<<<<<<<<< * self._smsg = message_simple(amsg, 1, # readonly * root, 0, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_cro_send", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":641 * * # recvbuf * cdef int for_cro_recv(self, object amsg, int root) except -1: # <<<<<<<<<<<<<< * self._rmsg = message_simple(amsg, 0, # writable * root, 0, */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_amsg, int __pyx_v_root) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("for_cro_recv", 0); /* "mpi4py/MPI/msgbuffer.pxi":642 * # recvbuf * cdef int for_cro_recv(self, object amsg, int root) except -1: * self._rmsg = message_simple(amsg, 0, # writable # <<<<<<<<<<<<<< * root, 0, * &self.rbuf, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_amsg, 0, __pyx_v_root, 0, (&__pyx_v_self->rbuf), (&__pyx_v_self->rcount), (&__pyx_v_self->rtype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_rmsg); __Pyx_DECREF(__pyx_v_self->_rmsg); __pyx_v_self->_rmsg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":647 * &self.rcount, * &self.rtype) * return 0 # <<<<<<<<<<<<<< * * cdef int for_reduce(self, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":641 * * # recvbuf * cdef int for_cro_recv(self, object amsg, int root) except -1: # <<<<<<<<<<<<<< * self._rmsg = message_simple(amsg, 0, # writable * root, 0, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_cro_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":649 * return 0 * * cdef int for_reduce(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * int root, MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, int __pyx_v_root, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_v_rank; int __pyx_v_null; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; MPI_Datatype __pyx_t_4; __Pyx_RefNannySetupContext("for_reduce", 0); /* "mpi4py/MPI/msgbuffer.pxi":652 * object smsg, object rmsg, * int root, MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":653 * int root, MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, rank=0, null=MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication */ __pyx_v_inter = 0; __pyx_v_rank = 0; __pyx_v_null = MPI_PROC_NULL; /* "mpi4py/MPI/msgbuffer.pxi":654 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if not inter: # intra-communication * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 654, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":655 * cdef int inter=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: */ __pyx_t_1 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":656 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * if root == rank: * self.for_cro_recv(rmsg, root) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 656, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":657 * if not inter: # intra-communication * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * self.for_cro_recv(rmsg, root) * if smsg is __IN_PLACE__: */ __pyx_t_1 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":658 * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: * self.for_cro_recv(rmsg, root) # <<<<<<<<<<<<<< * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(__pyx_v_self, __pyx_v_rmsg, __pyx_v_root); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 658, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":659 * if root == rank: * self.for_cro_recv(rmsg, root) * if smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ __pyx_t_1 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":660 * self.for_cro_recv(rmsg, root) * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * self.scount = self.rcount * self.stype = self.rtype */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":661 * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount # <<<<<<<<<<<<<< * self.stype = self.rtype * else: */ __pyx_t_2 = __pyx_v_self->rcount; __pyx_v_self->scount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":662 * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount * self.stype = self.rtype # <<<<<<<<<<<<<< * else: * self.for_cro_send(smsg, root) */ __pyx_t_4 = __pyx_v_self->rtype; __pyx_v_self->stype = __pyx_t_4; /* "mpi4py/MPI/msgbuffer.pxi":659 * if root == rank: * self.for_cro_recv(rmsg, root) * if smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ goto __pyx_L6; } /* "mpi4py/MPI/msgbuffer.pxi":664 * self.stype = self.rtype * else: * self.for_cro_send(smsg, root) # <<<<<<<<<<<<<< * else: * self.for_cro_recv(rmsg, null) */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(__pyx_v_self, __pyx_v_smsg, __pyx_v_root); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 664, __pyx_L1_error) } __pyx_L6:; /* "mpi4py/MPI/msgbuffer.pxi":657 * if not inter: # intra-communication * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * self.for_cro_recv(rmsg, root) * if smsg is __IN_PLACE__: */ goto __pyx_L5; } /* "mpi4py/MPI/msgbuffer.pxi":666 * self.for_cro_send(smsg, root) * else: * self.for_cro_recv(rmsg, null) # <<<<<<<<<<<<<< * self.for_cro_send(smsg, root) * self.rcount = self.scount */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(__pyx_v_self, __pyx_v_rmsg, __pyx_v_null); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 666, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":667 * else: * self.for_cro_recv(rmsg, null) * self.for_cro_send(smsg, root) # <<<<<<<<<<<<<< * self.rcount = self.scount * self.rtype = self.stype */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(__pyx_v_self, __pyx_v_smsg, __pyx_v_root); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 667, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":668 * self.for_cro_recv(rmsg, null) * self.for_cro_send(smsg, root) * self.rcount = self.scount # <<<<<<<<<<<<<< * self.rtype = self.stype * else: # inter-communication */ __pyx_t_2 = __pyx_v_self->scount; __pyx_v_self->rcount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":669 * self.for_cro_send(smsg, root) * self.rcount = self.scount * self.rtype = self.stype # <<<<<<<<<<<<<< * else: # inter-communication * if (root == MPI_ROOT or */ __pyx_t_4 = __pyx_v_self->stype; __pyx_v_self->rtype = __pyx_t_4; } __pyx_L5:; /* "mpi4py/MPI/msgbuffer.pxi":655 * cdef int inter=0, rank=0, null=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":671 * self.rtype = self.stype * else: # inter-communication * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cro_recv(rmsg, root) */ /*else*/ { __pyx_t_1 = ((__pyx_v_root == MPI_ROOT) != 0); if (!__pyx_t_1) { } else { __pyx_t_3 = __pyx_t_1; goto __pyx_L8_bool_binop_done; } /* "mpi4py/MPI/msgbuffer.pxi":672 * else: # inter-communication * if (root == MPI_ROOT or * root == MPI_PROC_NULL): # <<<<<<<<<<<<<< * self.for_cro_recv(rmsg, root) * self.scount = self.rcount */ __pyx_t_1 = ((__pyx_v_root == MPI_PROC_NULL) != 0); __pyx_t_3 = __pyx_t_1; __pyx_L8_bool_binop_done:; /* "mpi4py/MPI/msgbuffer.pxi":671 * self.rtype = self.stype * else: # inter-communication * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cro_recv(rmsg, root) */ if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":673 * if (root == MPI_ROOT or * root == MPI_PROC_NULL): * self.for_cro_recv(rmsg, root) # <<<<<<<<<<<<<< * self.scount = self.rcount * self.stype = self.rtype */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(__pyx_v_self, __pyx_v_rmsg, __pyx_v_root); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 673, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":674 * root == MPI_PROC_NULL): * self.for_cro_recv(rmsg, root) * self.scount = self.rcount # <<<<<<<<<<<<<< * self.stype = self.rtype * else: */ __pyx_t_2 = __pyx_v_self->rcount; __pyx_v_self->scount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":675 * self.for_cro_recv(rmsg, root) * self.scount = self.rcount * self.stype = self.rtype # <<<<<<<<<<<<<< * else: * self.for_cro_send(smsg, root) */ __pyx_t_4 = __pyx_v_self->rtype; __pyx_v_self->stype = __pyx_t_4; /* "mpi4py/MPI/msgbuffer.pxi":671 * self.rtype = self.stype * else: # inter-communication * if (root == MPI_ROOT or # <<<<<<<<<<<<<< * root == MPI_PROC_NULL): * self.for_cro_recv(rmsg, root) */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":677 * self.stype = self.rtype * else: * self.for_cro_send(smsg, root) # <<<<<<<<<<<<<< * self.rcount = self.scount * self.rtype = self.stype */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(__pyx_v_self, __pyx_v_smsg, __pyx_v_root); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 677, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":678 * else: * self.for_cro_send(smsg, root) * self.rcount = self.scount # <<<<<<<<<<<<<< * self.rtype = self.stype * return 0 */ __pyx_t_2 = __pyx_v_self->scount; __pyx_v_self->rcount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":679 * self.for_cro_send(smsg, root) * self.rcount = self.scount * self.rtype = self.stype # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_4 = __pyx_v_self->stype; __pyx_v_self->rtype = __pyx_t_4; } __pyx_L7:; } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":680 * self.rcount = self.scount * self.rtype = self.stype * return 0 # <<<<<<<<<<<<<< * * cdef int for_allreduce(self, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":649 * return 0 * * cdef int for_reduce(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * int root, MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":682 * return 0 * * cdef int for_allreduce(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allreduce(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; MPI_Datatype __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("for_allreduce", 0); /* "mpi4py/MPI/msgbuffer.pxi":685 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":686 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * # get send and recv buffers */ __pyx_v_inter = 0; /* "mpi4py/MPI/msgbuffer.pxi":687 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * # get send and recv buffers * self.for_cro_recv(rmsg, 0) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 687, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":689 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * # get send and recv buffers * self.for_cro_recv(rmsg, 0) # <<<<<<<<<<<<<< * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(__pyx_v_self, __pyx_v_rmsg, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 689, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":690 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ __pyx_t_3 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":691 * self.for_cro_recv(rmsg, 0) * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * self.scount = self.rcount * self.stype = self.rtype */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":692 * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount # <<<<<<<<<<<<<< * self.stype = self.rtype * else: */ __pyx_t_2 = __pyx_v_self->rcount; __pyx_v_self->scount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":693 * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount * self.stype = self.rtype # <<<<<<<<<<<<<< * else: * self.for_cro_send(smsg, 0) */ __pyx_t_5 = __pyx_v_self->rtype; __pyx_v_self->stype = __pyx_t_5; /* "mpi4py/MPI/msgbuffer.pxi":690 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":695 * self.stype = self.rtype * else: * self.for_cro_send(smsg, 0) # <<<<<<<<<<<<<< * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(__pyx_v_self, __pyx_v_smsg, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 695, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":697 * self.for_cro_send(smsg, 0) * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ __pyx_t_1 = ((__pyx_v_self->sbuf != MPI_IN_PLACE) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":698 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ __pyx_t_1 = ((__pyx_v_self->stype != __pyx_v_self->rtype) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":699 * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: */ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(5, 699, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":698 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ } /* "mpi4py/MPI/msgbuffer.pxi":701 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d and receive count %d" % */ __pyx_t_1 = ((__pyx_v_self->scount != __pyx_v_self->rcount) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":704 * raise ValueError( * "mismatch in send count %d and receive count %d" % * (self.scount, self.rcount)) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->scount); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->rcount); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; /* "mpi4py/MPI/msgbuffer.pxi":703 * if self.scount != self.rcount: * raise ValueError( * "mismatch in send count %d and receive count %d" % # <<<<<<<<<<<<<< * (self.scount, self.rcount)) * return 0 */ __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_mismatch_in_send_count_d_and_rec, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":702 * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send count %d and receive count %d" % * (self.scount, self.rcount)) */ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 702, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":701 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d and receive count %d" % */ } /* "mpi4py/MPI/msgbuffer.pxi":697 * self.for_cro_send(smsg, 0) * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ } /* "mpi4py/MPI/msgbuffer.pxi":705 * "mismatch in send count %d and receive count %d" % * (self.scount, self.rcount)) * return 0 # <<<<<<<<<<<<<< * * cdef int for_reduce_scatter_block(self, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":682 * return 0 * * cdef int for_allreduce(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_allreduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":707 * return 0 * * cdef int for_reduce_scatter_block(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter_block(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_v_size; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("for_reduce_scatter_block", 0); /* "mpi4py/MPI/msgbuffer.pxi":710 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":711 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_v_inter = 0; __pyx_v_size = 0; /* "mpi4py/MPI/msgbuffer.pxi":712 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * # get send and recv buffers */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 712, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":713 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * # get send and recv buffers * if not inter and smsg is __IN_PLACE__: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 713, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":715 * CHKERR( MPI_Comm_size(comm, &size) ) * # get send and recv buffers * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.for_cco_recv(0, rmsg, 0, size) * self.sbuf = MPI_IN_PLACE */ __pyx_t_3 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":716 * # get send and recv buffers * if not inter and smsg is __IN_PLACE__: * self.for_cco_recv(0, rmsg, 0, size) # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * else: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, 0, __pyx_v_rmsg, 0, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 716, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":717 * if not inter and smsg is __IN_PLACE__: * self.for_cco_recv(0, rmsg, 0, size) * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * else: * self.for_cco_recv(0, rmsg, 0, 0) */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":715 * CHKERR( MPI_Comm_size(comm, &size) ) * # get send and recv buffers * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.for_cco_recv(0, rmsg, 0, size) * self.sbuf = MPI_IN_PLACE */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":719 * self.sbuf = MPI_IN_PLACE * else: * self.for_cco_recv(0, rmsg, 0, 0) # <<<<<<<<<<<<<< * self.for_cco_send(0, smsg, 0, size) * # check counts and datatypes */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv(__pyx_v_self, 0, __pyx_v_rmsg, 0, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 719, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":720 * else: * self.for_cco_recv(0, rmsg, 0, 0) * self.for_cco_send(0, smsg, 0, size) # <<<<<<<<<<<<<< * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send(__pyx_v_self, 0, __pyx_v_smsg, 0, __pyx_v_size); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 720, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":722 * self.for_cco_send(0, smsg, 0, size) * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ __pyx_t_1 = ((__pyx_v_self->sbuf != MPI_IN_PLACE) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":723 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ __pyx_t_1 = ((__pyx_v_self->stype != __pyx_v_self->rtype) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":724 * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 724, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":723 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ } /* "mpi4py/MPI/msgbuffer.pxi":726 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d receive count %d" % */ __pyx_t_1 = ((__pyx_v_self->scount != __pyx_v_self->rcount) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":729 * raise ValueError( * "mismatch in send count %d receive count %d" % * (self.scount, self.rcount*size)) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->scount); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_self->rcount * __pyx_v_size)); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":728 * if self.scount != self.rcount: * raise ValueError( * "mismatch in send count %d receive count %d" % # <<<<<<<<<<<<<< * (self.scount, self.rcount*size)) * return 0 */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_mismatch_in_send_count_d_receive, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "mpi4py/MPI/msgbuffer.pxi":727 * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send count %d receive count %d" % * (self.scount, self.rcount*size)) */ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(5, 727, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":726 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d receive count %d" % */ } /* "mpi4py/MPI/msgbuffer.pxi":722 * self.for_cco_send(0, smsg, 0, size) * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ } /* "mpi4py/MPI/msgbuffer.pxi":730 * "mismatch in send count %d receive count %d" % * (self.scount, self.rcount*size)) * return 0 # <<<<<<<<<<<<<< * * cdef int for_reduce_scatter(self, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":707 * return 0 * * cdef int for_reduce_scatter_block(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_reduce_scatter_block", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":732 * return 0 * * cdef int for_reduce_scatter(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, object rcnt, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, PyObject *__pyx_v_rcnt, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_v_size; int __pyx_v_rank; int __pyx_v_i; int __pyx_v_sumrcounts; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("for_reduce_scatter", 0); /* "mpi4py/MPI/msgbuffer.pxi":735 * object smsg, object rmsg, object rcnt, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0, size=0, rank=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":736 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0, rank=MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_v_inter = 0; __pyx_v_size = 0; __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/msgbuffer.pxi":737 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0, rank=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 737, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":738 * cdef int inter=0, size=0, rank=MPI_PROC_NULL * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * # get send and recv buffers */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 738, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":739 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * # get send and recv buffers * self.for_cro_recv(rmsg, 0) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 739, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":741 * CHKERR( MPI_Comm_rank(comm, &rank) ) * # get send and recv buffers * self.for_cro_recv(rmsg, 0) # <<<<<<<<<<<<<< * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(__pyx_v_self, __pyx_v_rmsg, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 741, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":742 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * else: */ __pyx_t_3 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":743 * self.for_cro_recv(rmsg, 0) * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * else: * self.for_cro_send(smsg, 0) */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":742 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * else: */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":745 * self.sbuf = MPI_IN_PLACE * else: * self.for_cro_send(smsg, 0) # <<<<<<<<<<<<<< * # get receive counts * if rcnt is None and not inter and self.sbuf != MPI_IN_PLACE: */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(__pyx_v_self, __pyx_v_smsg, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 745, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":747 * self.for_cro_send(smsg, 0) * # get receive counts * if rcnt is None and not inter and self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * self._rcnt = newarray(size, &self.rcounts) * CHKERR( MPI_Allgather(&self.rcount, 1, MPI_INT, */ __pyx_t_4 = (__pyx_v_rcnt == Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L8_bool_binop_done; } __pyx_t_3 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L8_bool_binop_done; } __pyx_t_3 = ((__pyx_v_self->sbuf != MPI_IN_PLACE) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L8_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":748 * # get receive counts * if rcnt is None and not inter and self.sbuf != MPI_IN_PLACE: * self._rcnt = newarray(size, &self.rcounts) # <<<<<<<<<<<<<< * CHKERR( MPI_Allgather(&self.rcount, 1, MPI_INT, * self.rcounts, 1, MPI_INT, comm) ) */ __pyx_t_5 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_size, (&__pyx_v_self->rcounts)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_rcnt); __Pyx_DECREF(__pyx_v_self->_rcnt); __pyx_v_self->_rcnt = __pyx_t_5; __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":749 * if rcnt is None and not inter and self.sbuf != MPI_IN_PLACE: * self._rcnt = newarray(size, &self.rcounts) * CHKERR( MPI_Allgather(&self.rcount, 1, MPI_INT, # <<<<<<<<<<<<<< * self.rcounts, 1, MPI_INT, comm) ) * else: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Allgather((&__pyx_v_self->rcount), 1, MPI_INT, __pyx_v_self->rcounts, 1, MPI_INT, __pyx_v_comm)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 749, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":747 * self.for_cro_send(smsg, 0) * # get receive counts * if rcnt is None and not inter and self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * self._rcnt = newarray(size, &self.rcounts) * CHKERR( MPI_Allgather(&self.rcount, 1, MPI_INT, */ goto __pyx_L7; } /* "mpi4py/MPI/msgbuffer.pxi":752 * self.rcounts, 1, MPI_INT, comm) ) * else: * self._rcnt = chkarray(rcnt, size, &self.rcounts) # <<<<<<<<<<<<<< * # total sum or receive counts * cdef int i=0, sumrcounts=0 */ /*else*/ { __pyx_t_5 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_rcnt, __pyx_v_size, (&__pyx_v_self->rcounts)); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 752, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_rcnt); __Pyx_DECREF(__pyx_v_self->_rcnt); __pyx_v_self->_rcnt = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L7:; /* "mpi4py/MPI/msgbuffer.pxi":754 * self._rcnt = chkarray(rcnt, size, &self.rcounts) * # total sum or receive counts * cdef int i=0, sumrcounts=0 # <<<<<<<<<<<<<< * for i from 0 <= i < size: * sumrcounts += self.rcounts[i] */ __pyx_v_i = 0; __pyx_v_sumrcounts = 0; /* "mpi4py/MPI/msgbuffer.pxi":755 * # total sum or receive counts * cdef int i=0, sumrcounts=0 * for i from 0 <= i < size: # <<<<<<<<<<<<<< * sumrcounts += self.rcounts[i] * # check counts and datatypes */ __pyx_t_2 = __pyx_v_size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { /* "mpi4py/MPI/msgbuffer.pxi":756 * cdef int i=0, sumrcounts=0 * for i from 0 <= i < size: * sumrcounts += self.rcounts[i] # <<<<<<<<<<<<<< * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: */ __pyx_v_sumrcounts = (__pyx_v_sumrcounts + (__pyx_v_self->rcounts[__pyx_v_i])); } /* "mpi4py/MPI/msgbuffer.pxi":758 * sumrcounts += self.rcounts[i] * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ __pyx_t_1 = ((__pyx_v_self->sbuf != MPI_IN_PLACE) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":759 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ __pyx_t_1 = ((__pyx_v_self->stype != __pyx_v_self->rtype) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":760 * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send and receive MPI datatypes") * if self.scount != sumrcounts: */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 760, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 760, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":759 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ } /* "mpi4py/MPI/msgbuffer.pxi":762 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != sumrcounts: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d and sum(counts) %d" % */ __pyx_t_1 = ((__pyx_v_self->scount != __pyx_v_sumrcounts) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":765 * raise ValueError( * "mismatch in send count %d and sum(counts) %d" % * (self.scount, sumrcounts)) # <<<<<<<<<<<<<< * if self.rcount != self.rcounts[rank]: * raise ValueError( */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->scount); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_sumrcounts); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":764 * if self.scount != sumrcounts: * raise ValueError( * "mismatch in send count %d and sum(counts) %d" % # <<<<<<<<<<<<<< * (self.scount, sumrcounts)) * if self.rcount != self.rcounts[rank]: */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_mismatch_in_send_count_d_and_sum, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "mpi4py/MPI/msgbuffer.pxi":763 * "mismatch in send and receive MPI datatypes") * if self.scount != sumrcounts: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send count %d and sum(counts) %d" % * (self.scount, sumrcounts)) */ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(5, 763, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":762 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != sumrcounts: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d and sum(counts) %d" % */ } /* "mpi4py/MPI/msgbuffer.pxi":766 * "mismatch in send count %d and sum(counts) %d" % * (self.scount, sumrcounts)) * if self.rcount != self.rcounts[rank]: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in receive count %d and counts[%d] %d" % */ __pyx_t_1 = ((__pyx_v_self->rcount != (__pyx_v_self->rcounts[__pyx_v_rank])) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":769 * raise ValueError( * "mismatch in receive count %d and counts[%d] %d" % * (self.rcount, rank, self.rcounts[rank])) # <<<<<<<<<<<<<< * else: * if self.rcount != sumrcounts: */ __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->rcount); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rank); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_self->rcounts[__pyx_v_rank])); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_5); __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":768 * if self.rcount != self.rcounts[rank]: * raise ValueError( * "mismatch in receive count %d and counts[%d] %d" % # <<<<<<<<<<<<<< * (self.rcount, rank, self.rcounts[rank])) * else: */ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_mismatch_in_receive_count_d_and, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/msgbuffer.pxi":767 * (self.scount, sumrcounts)) * if self.rcount != self.rcounts[rank]: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in receive count %d and counts[%d] %d" % * (self.rcount, rank, self.rcounts[rank])) */ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(5, 767, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":766 * "mismatch in send count %d and sum(counts) %d" % * (self.scount, sumrcounts)) * if self.rcount != self.rcounts[rank]: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in receive count %d and counts[%d] %d" % */ } /* "mpi4py/MPI/msgbuffer.pxi":758 * sumrcounts += self.rcounts[i] * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ goto __pyx_L13; } /* "mpi4py/MPI/msgbuffer.pxi":771 * (self.rcount, rank, self.rcounts[rank])) * else: * if self.rcount != sumrcounts: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in receive count %d and sum(counts) %d" % */ /*else*/ { __pyx_t_1 = ((__pyx_v_self->rcount != __pyx_v_sumrcounts) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/msgbuffer.pxi":774 * raise ValueError( * "mismatch in receive count %d and sum(counts) %d" % * (self.rcount, sumrcounts)) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_self->rcount); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_sumrcounts); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __pyx_t_8 = 0; __pyx_t_5 = 0; /* "mpi4py/MPI/msgbuffer.pxi":773 * if self.rcount != sumrcounts: * raise ValueError( * "mismatch in receive count %d and sum(counts) %d" % # <<<<<<<<<<<<<< * (self.rcount, sumrcounts)) * return 0 */ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_mismatch_in_receive_count_d_and_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":772 * else: * if self.rcount != sumrcounts: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in receive count %d and sum(counts) %d" % * (self.rcount, sumrcounts)) */ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(5, 772, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":771 * (self.rcount, rank, self.rcounts[rank])) * else: * if self.rcount != sumrcounts: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in receive count %d and sum(counts) %d" % */ } } __pyx_L13:; /* "mpi4py/MPI/msgbuffer.pxi":775 * "mismatch in receive count %d and sum(counts) %d" % * (self.rcount, sumrcounts)) * return 0 # <<<<<<<<<<<<<< * * cdef int for_scan(self, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":732 * return 0 * * cdef int for_reduce_scatter(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, object rcnt, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_reduce_scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":777 * return 0 * * cdef int for_scan(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scan(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; MPI_Datatype __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("for_scan", 0); /* "mpi4py/MPI/msgbuffer.pxi":780 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * # get send and recv buffers * self.for_cro_recv(rmsg, 0) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":782 * if comm == MPI_COMM_NULL: return 0 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) # <<<<<<<<<<<<<< * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(__pyx_v_self, __pyx_v_rmsg, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 782, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":783 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) * if smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ __pyx_t_1 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":784 * self.for_cro_recv(rmsg, 0) * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * self.scount = self.rcount * self.stype = self.rtype */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":785 * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount # <<<<<<<<<<<<<< * self.stype = self.rtype * else: */ __pyx_t_2 = __pyx_v_self->rcount; __pyx_v_self->scount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":786 * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount * self.stype = self.rtype # <<<<<<<<<<<<<< * else: * self.for_cro_send(smsg, 0) */ __pyx_t_4 = __pyx_v_self->rtype; __pyx_v_self->stype = __pyx_t_4; /* "mpi4py/MPI/msgbuffer.pxi":783 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) * if smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":788 * self.stype = self.rtype * else: * self.for_cro_send(smsg, 0) # <<<<<<<<<<<<<< * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(__pyx_v_self, __pyx_v_smsg, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 788, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":790 * self.for_cro_send(smsg, 0) * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ __pyx_t_3 = ((__pyx_v_self->sbuf != MPI_IN_PLACE) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":791 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ __pyx_t_3 = ((__pyx_v_self->stype != __pyx_v_self->rtype) != 0); if (unlikely(__pyx_t_3)) { /* "mpi4py/MPI/msgbuffer.pxi":792 * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 792, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":791 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ } /* "mpi4py/MPI/msgbuffer.pxi":794 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d and receive count %d" % */ __pyx_t_3 = ((__pyx_v_self->scount != __pyx_v_self->rcount) != 0); if (unlikely(__pyx_t_3)) { /* "mpi4py/MPI/msgbuffer.pxi":797 * raise ValueError( * "mismatch in send count %d and receive count %d" % * (self.scount, self.rcount)) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->scount); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->rcount); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":796 * if self.scount != self.rcount: * raise ValueError( * "mismatch in send count %d and receive count %d" % # <<<<<<<<<<<<<< * (self.scount, self.rcount)) * return 0 */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_mismatch_in_send_count_d_and_rec, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "mpi4py/MPI/msgbuffer.pxi":795 * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send count %d and receive count %d" % * (self.scount, self.rcount)) */ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(5, 795, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":794 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d and receive count %d" % */ } /* "mpi4py/MPI/msgbuffer.pxi":790 * self.for_cro_send(smsg, 0) * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ } /* "mpi4py/MPI/msgbuffer.pxi":798 * "mismatch in send count %d and receive count %d" % * (self.scount, self.rcount)) * return 0 # <<<<<<<<<<<<<< * * cdef int for_exscan(self, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":777 * return 0 * * cdef int for_scan(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_scan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":800 * return 0 * * cdef int for_exscan(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_exscan(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; MPI_Datatype __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("for_exscan", 0); /* "mpi4py/MPI/msgbuffer.pxi":803 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * # get send and recv buffers * self.for_cro_recv(rmsg, 0) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":805 * if comm == MPI_COMM_NULL: return 0 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) # <<<<<<<<<<<<<< * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(__pyx_v_self, __pyx_v_rmsg, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 805, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":806 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) * if smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ __pyx_t_1 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":807 * self.for_cro_recv(rmsg, 0) * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * self.scount = self.rcount * self.stype = self.rtype */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":808 * if smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount # <<<<<<<<<<<<<< * self.stype = self.rtype * else: */ __pyx_t_2 = __pyx_v_self->rcount; __pyx_v_self->scount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":809 * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount * self.stype = self.rtype # <<<<<<<<<<<<<< * else: * self.for_cro_send(smsg, 0) */ __pyx_t_4 = __pyx_v_self->rtype; __pyx_v_self->stype = __pyx_t_4; /* "mpi4py/MPI/msgbuffer.pxi":806 * # get send and recv buffers * self.for_cro_recv(rmsg, 0) * if smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scount = self.rcount */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":811 * self.stype = self.rtype * else: * self.for_cro_send(smsg, 0) # <<<<<<<<<<<<<< * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(__pyx_v_self, __pyx_v_smsg, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 811, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":813 * self.for_cro_send(smsg, 0) * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ __pyx_t_3 = ((__pyx_v_self->sbuf != MPI_IN_PLACE) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":814 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ __pyx_t_3 = ((__pyx_v_self->stype != __pyx_v_self->rtype) != 0); if (unlikely(__pyx_t_3)) { /* "mpi4py/MPI/msgbuffer.pxi":815 * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: */ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(5, 815, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":814 * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send and receive MPI datatypes") */ } /* "mpi4py/MPI/msgbuffer.pxi":817 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d and receive count %d" % */ __pyx_t_3 = ((__pyx_v_self->scount != __pyx_v_self->rcount) != 0); if (unlikely(__pyx_t_3)) { /* "mpi4py/MPI/msgbuffer.pxi":820 * raise ValueError( * "mismatch in send count %d and receive count %d" % * (self.scount, self.rcount)) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->scount); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->rcount); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; /* "mpi4py/MPI/msgbuffer.pxi":819 * if self.scount != self.rcount: * raise ValueError( * "mismatch in send count %d and receive count %d" % # <<<<<<<<<<<<<< * (self.scount, self.rcount)) * return 0 */ __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_mismatch_in_send_count_d_and_rec, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "mpi4py/MPI/msgbuffer.pxi":818 * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send count %d and receive count %d" % * (self.scount, self.rcount)) */ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(5, 818, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":817 * raise ValueError( * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: # <<<<<<<<<<<<<< * raise ValueError( * "mismatch in send count %d and receive count %d" % */ } /* "mpi4py/MPI/msgbuffer.pxi":813 * self.for_cro_send(smsg, 0) * # check counts and datatypes * if self.sbuf != MPI_IN_PLACE: # <<<<<<<<<<<<<< * if self.stype != self.rtype: * raise ValueError( */ } /* "mpi4py/MPI/msgbuffer.pxi":821 * "mismatch in send count %d and receive count %d" % * (self.scount, self.rcount)) * return 0 # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":800 * return 0 * * cdef int for_exscan(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI._p_msg_cco.for_exscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":824 * * * cdef inline _p_msg_cco message_cco(): # <<<<<<<<<<<<<< * cdef _p_msg_cco msg = <_p_msg_cco>_p_msg_cco.__new__(_p_msg_cco) * return msg */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_f_6mpi4py_3MPI_message_cco(void) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_msg = 0; struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("message_cco", 0); /* "mpi4py/MPI/msgbuffer.pxi":825 * * cdef inline _p_msg_cco message_cco(): * cdef _p_msg_cco msg = <_p_msg_cco>_p_msg_cco.__new__(_p_msg_cco) # <<<<<<<<<<<<<< * return msg * */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI__p_msg_cco(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI__p_msg_cco), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 825, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":826 * cdef inline _p_msg_cco message_cco(): * cdef _p_msg_cco msg = <_p_msg_cco>_p_msg_cco.__new__(_p_msg_cco) * return msg # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __pyx_r = __pyx_v_msg; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":824 * * * cdef inline _p_msg_cco message_cco(): # <<<<<<<<<<<<<< * cdef _p_msg_cco msg = <_p_msg_cco>_p_msg_cco.__new__(_p_msg_cco) * return msg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.message_cco", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":843 * cdef object _smsg, _rmsg * * def __cinit__(self): # <<<<<<<<<<<<<< * self.sbuf = self.rbuf = NULL * self.scounts = self.rcounts = NULL */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_11_p_msg_ccow_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_11_p_msg_ccow_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6mpi4py_3MPI_11_p_msg_ccow___cinit__(((struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_11_p_msg_ccow___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/msgbuffer.pxi":844 * * def __cinit__(self): * self.sbuf = self.rbuf = NULL # <<<<<<<<<<<<<< * self.scounts = self.rcounts = NULL * self.sdispls = self.rdispls = NULL */ __pyx_v_self->sbuf = NULL; __pyx_v_self->rbuf = NULL; /* "mpi4py/MPI/msgbuffer.pxi":845 * def __cinit__(self): * self.sbuf = self.rbuf = NULL * self.scounts = self.rcounts = NULL # <<<<<<<<<<<<<< * self.sdispls = self.rdispls = NULL * self.sdisplsA = self.rdisplsA = NULL */ __pyx_v_self->scounts = NULL; __pyx_v_self->rcounts = NULL; /* "mpi4py/MPI/msgbuffer.pxi":846 * self.sbuf = self.rbuf = NULL * self.scounts = self.rcounts = NULL * self.sdispls = self.rdispls = NULL # <<<<<<<<<<<<<< * self.sdisplsA = self.rdisplsA = NULL * self.stypes = self.rtypes = NULL */ __pyx_v_self->sdispls = NULL; __pyx_v_self->rdispls = NULL; /* "mpi4py/MPI/msgbuffer.pxi":847 * self.scounts = self.rcounts = NULL * self.sdispls = self.rdispls = NULL * self.sdisplsA = self.rdisplsA = NULL # <<<<<<<<<<<<<< * self.stypes = self.rtypes = NULL * */ __pyx_v_self->sdisplsA = NULL; __pyx_v_self->rdisplsA = NULL; /* "mpi4py/MPI/msgbuffer.pxi":848 * self.sdispls = self.rdispls = NULL * self.sdisplsA = self.rdisplsA = NULL * self.stypes = self.rtypes = NULL # <<<<<<<<<<<<<< * * # alltoallw */ __pyx_v_self->stypes = NULL; __pyx_v_self->rtypes = NULL; /* "mpi4py/MPI/msgbuffer.pxi":843 * cdef object _smsg, _rmsg * * def __cinit__(self): # <<<<<<<<<<<<<< * self.sbuf = self.rbuf = NULL * self.scounts = self.rcounts = NULL */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":851 * * # alltoallw * cdef int for_alltoallw(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_alltoallw(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_v_size; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int *__pyx_t_6; MPI_Datatype *__pyx_t_7; __Pyx_RefNannySetupContext("for_alltoallw", 0); /* "mpi4py/MPI/msgbuffer.pxi":854 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":855 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication */ __pyx_v_inter = 0; __pyx_v_size = 0; /* "mpi4py/MPI/msgbuffer.pxi":856 * if comm == MPI_COMM_NULL: return 0 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 856, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":857 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * else: # inter-communication */ __pyx_t_1 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":858 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 858, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":857 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if not inter: # intra-communication # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * else: # inter-communication */ goto __pyx_L4; } /* "mpi4py/MPI/msgbuffer.pxi":860 * CHKERR( MPI_Comm_size(comm, &size) ) * else: # inter-communication * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * # * self._rmsg = message_vector_w( */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 860, __pyx_L1_error) } __pyx_L4:; /* "mpi4py/MPI/msgbuffer.pxi":862 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * # * self._rmsg = message_vector_w( # <<<<<<<<<<<<<< * rmsg, 0, size, * &self.rbuf, &self.rcounts, */ __pyx_t_3 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_message_vector_w(__pyx_v_rmsg, 0, __pyx_v_size, (&__pyx_v_self->rbuf), (&__pyx_v_self->rcounts), (&__pyx_v_self->rdispls), (&__pyx_v_self->rtypes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_rmsg); __Pyx_DECREF(__pyx_v_self->_rmsg); __pyx_v_self->_rmsg = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":866 * &self.rbuf, &self.rcounts, * &self.rdispls, &self.rtypes) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scounts = self.rcounts */ __pyx_t_4 = ((!(__pyx_v_inter != 0)) != 0); if (__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L6_bool_binop_done; } __pyx_t_4 = (__pyx_v_smsg == __pyx_v_6mpi4py_3MPI___IN_PLACE__); __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_1 = __pyx_t_5; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { /* "mpi4py/MPI/msgbuffer.pxi":867 * &self.rdispls, &self.rtypes) * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE # <<<<<<<<<<<<<< * self.scounts = self.rcounts * self.sdispls = self.rdispls */ __pyx_v_self->sbuf = MPI_IN_PLACE; /* "mpi4py/MPI/msgbuffer.pxi":868 * if not inter and smsg is __IN_PLACE__: * self.sbuf = MPI_IN_PLACE * self.scounts = self.rcounts # <<<<<<<<<<<<<< * self.sdispls = self.rdispls * self.stypes = self.rtypes */ __pyx_t_6 = __pyx_v_self->rcounts; __pyx_v_self->scounts = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":869 * self.sbuf = MPI_IN_PLACE * self.scounts = self.rcounts * self.sdispls = self.rdispls # <<<<<<<<<<<<<< * self.stypes = self.rtypes * return 0 */ __pyx_t_6 = __pyx_v_self->rdispls; __pyx_v_self->sdispls = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":870 * self.scounts = self.rcounts * self.sdispls = self.rdispls * self.stypes = self.rtypes # <<<<<<<<<<<<<< * return 0 * self._smsg = message_vector_w( */ __pyx_t_7 = __pyx_v_self->rtypes; __pyx_v_self->stypes = __pyx_t_7; /* "mpi4py/MPI/msgbuffer.pxi":871 * self.sdispls = self.rdispls * self.stypes = self.rtypes * return 0 # <<<<<<<<<<<<<< * self._smsg = message_vector_w( * smsg, 1, size, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":866 * &self.rbuf, &self.rcounts, * &self.rdispls, &self.rtypes) * if not inter and smsg is __IN_PLACE__: # <<<<<<<<<<<<<< * self.sbuf = MPI_IN_PLACE * self.scounts = self.rcounts */ } /* "mpi4py/MPI/msgbuffer.pxi":872 * self.stypes = self.rtypes * return 0 * self._smsg = message_vector_w( # <<<<<<<<<<<<<< * smsg, 1, size, * &self.sbuf, &self.scounts, */ __pyx_t_3 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_message_vector_w(__pyx_v_smsg, 1, __pyx_v_size, (&__pyx_v_self->sbuf), (&__pyx_v_self->scounts), (&__pyx_v_self->sdispls), (&__pyx_v_self->stypes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_smsg); __Pyx_DECREF(__pyx_v_self->_smsg); __pyx_v_self->_smsg = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":876 * &self.sbuf, &self.scounts, * &self.sdispls, &self.stypes) * return 0 # <<<<<<<<<<<<<< * * # neighbor alltoallw */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":851 * * # alltoallw * cdef int for_alltoallw(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._p_msg_ccow.for_alltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":879 * * # neighbor alltoallw * cdef int for_neighbor_alltoallw(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ static int __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_neighbor_alltoallw(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_self, PyObject *__pyx_v_smsg, PyObject *__pyx_v_rmsg, MPI_Comm __pyx_v_comm) { int __pyx_v_sendsize; int __pyx_v_recvsize; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("for_neighbor_alltoallw", 0); /* "mpi4py/MPI/msgbuffer.pxi":882 * object smsg, object rmsg, * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 # <<<<<<<<<<<<<< * cdef int sendsize=0, recvsize=0 * comm_neighbors_count(comm, &recvsize, &sendsize) */ __pyx_t_1 = ((__pyx_v_comm == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":883 * MPI_Comm comm) except -1: * if comm == MPI_COMM_NULL: return 0 * cdef int sendsize=0, recvsize=0 # <<<<<<<<<<<<<< * comm_neighbors_count(comm, &recvsize, &sendsize) * self._rmsg = message_vector_w( */ __pyx_v_sendsize = 0; __pyx_v_recvsize = 0; /* "mpi4py/MPI/msgbuffer.pxi":884 * if comm == MPI_COMM_NULL: return 0 * cdef int sendsize=0, recvsize=0 * comm_neighbors_count(comm, &recvsize, &sendsize) # <<<<<<<<<<<<<< * self._rmsg = message_vector_w( * rmsg, 0, recvsize, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_comm_neighbors_count(__pyx_v_comm, (&__pyx_v_recvsize), (&__pyx_v_sendsize)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(5, 884, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":885 * cdef int sendsize=0, recvsize=0 * comm_neighbors_count(comm, &recvsize, &sendsize) * self._rmsg = message_vector_w( # <<<<<<<<<<<<<< * rmsg, 0, recvsize, * &self.rbuf, &self.rcounts, */ __pyx_t_3 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_message_vector_w(__pyx_v_rmsg, 0, __pyx_v_recvsize, (&__pyx_v_self->rbuf), (&__pyx_v_self->rcounts), (&__pyx_v_self->rdisplsA), (&__pyx_v_self->rtypes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_rmsg); __Pyx_DECREF(__pyx_v_self->_rmsg); __pyx_v_self->_rmsg = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":889 * &self.rbuf, &self.rcounts, * &self.rdisplsA, &self.rtypes) * self._smsg = message_vector_w( # <<<<<<<<<<<<<< * smsg, 1, sendsize, * &self.sbuf, &self.scounts, */ __pyx_t_3 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_message_vector_w(__pyx_v_smsg, 1, __pyx_v_sendsize, (&__pyx_v_self->sbuf), (&__pyx_v_self->scounts), (&__pyx_v_self->sdisplsA), (&__pyx_v_self->stypes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_smsg); __Pyx_DECREF(__pyx_v_self->_smsg); __pyx_v_self->_smsg = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":893 * &self.sbuf, &self.scounts, * &self.sdisplsA, &self.stypes) * return 0 # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":879 * * # neighbor alltoallw * cdef int for_neighbor_alltoallw(self, # <<<<<<<<<<<<<< * object smsg, object rmsg, * MPI_Comm comm) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._p_msg_ccow.for_neighbor_alltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":896 * * * cdef inline _p_msg_ccow message_ccow(): # <<<<<<<<<<<<<< * cdef _p_msg_ccow msg = <_p_msg_ccow>_p_msg_ccow.__new__(_p_msg_ccow) * return msg */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_f_6mpi4py_3MPI_message_ccow(void) { struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_msg = 0; struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("message_ccow", 0); /* "mpi4py/MPI/msgbuffer.pxi":897 * * cdef inline _p_msg_ccow message_ccow(): * cdef _p_msg_ccow msg = <_p_msg_ccow>_p_msg_ccow.__new__(_p_msg_ccow) # <<<<<<<<<<<<<< * return msg * */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI__p_msg_ccow(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI__p_msg_ccow), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 897, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":898 * cdef inline _p_msg_ccow message_ccow(): * cdef _p_msg_ccow msg = <_p_msg_ccow>_p_msg_ccow.__new__(_p_msg_ccow) * return msg # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __pyx_r = __pyx_v_msg; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":896 * * * cdef inline _p_msg_ccow message_ccow(): # <<<<<<<<<<<<<< * cdef _p_msg_ccow msg = <_p_msg_ccow>_p_msg_ccow.__new__(_p_msg_ccow) * return msg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.message_ccow", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":928 * cdef object _target * * def __cinit__(self): # <<<<<<<<<<<<<< * self.oaddr = NULL * self.ocount = 0 */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_10_p_msg_rma_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_10_p_msg_rma_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6mpi4py_3MPI_10_p_msg_rma___cinit__(((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_10_p_msg_rma___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/msgbuffer.pxi":929 * * def __cinit__(self): * self.oaddr = NULL # <<<<<<<<<<<<<< * self.ocount = 0 * self.otype = MPI_DATATYPE_NULL */ __pyx_v_self->oaddr = NULL; /* "mpi4py/MPI/msgbuffer.pxi":930 * def __cinit__(self): * self.oaddr = NULL * self.ocount = 0 # <<<<<<<<<<<<<< * self.otype = MPI_DATATYPE_NULL * self.raddr = NULL */ __pyx_v_self->ocount = 0; /* "mpi4py/MPI/msgbuffer.pxi":931 * self.oaddr = NULL * self.ocount = 0 * self.otype = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * self.raddr = NULL * self.rcount = 0 */ __pyx_v_self->otype = MPI_DATATYPE_NULL; /* "mpi4py/MPI/msgbuffer.pxi":932 * self.ocount = 0 * self.otype = MPI_DATATYPE_NULL * self.raddr = NULL # <<<<<<<<<<<<<< * self.rcount = 0 * self.rtype = MPI_DATATYPE_NULL */ __pyx_v_self->raddr = NULL; /* "mpi4py/MPI/msgbuffer.pxi":933 * self.otype = MPI_DATATYPE_NULL * self.raddr = NULL * self.rcount = 0 # <<<<<<<<<<<<<< * self.rtype = MPI_DATATYPE_NULL * self.tdisp = 0 */ __pyx_v_self->rcount = 0; /* "mpi4py/MPI/msgbuffer.pxi":934 * self.raddr = NULL * self.rcount = 0 * self.rtype = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * self.tdisp = 0 * self.tcount = 0 */ __pyx_v_self->rtype = MPI_DATATYPE_NULL; /* "mpi4py/MPI/msgbuffer.pxi":935 * self.rcount = 0 * self.rtype = MPI_DATATYPE_NULL * self.tdisp = 0 # <<<<<<<<<<<<<< * self.tcount = 0 * self.ttype = MPI_DATATYPE_NULL */ __pyx_v_self->tdisp = 0; /* "mpi4py/MPI/msgbuffer.pxi":936 * self.rtype = MPI_DATATYPE_NULL * self.tdisp = 0 * self.tcount = 0 # <<<<<<<<<<<<<< * self.ttype = MPI_DATATYPE_NULL * */ __pyx_v_self->tcount = 0; /* "mpi4py/MPI/msgbuffer.pxi":937 * self.tdisp = 0 * self.tcount = 0 * self.ttype = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * * cdef int for_rma(self, int readonly, */ __pyx_v_self->ttype = MPI_DATATYPE_NULL; /* "mpi4py/MPI/msgbuffer.pxi":928 * cdef object _target * * def __cinit__(self): # <<<<<<<<<<<<<< * self.oaddr = NULL * self.ocount = 0 */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":939 * self.ttype = MPI_DATATYPE_NULL * * cdef int for_rma(self, int readonly, # <<<<<<<<<<<<<< * object origin, int rank, object target) except -1: * # ORIGIN */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_rma(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, int __pyx_v_readonly, PyObject *__pyx_v_origin, int __pyx_v_rank, PyObject *__pyx_v_target) { Py_ssize_t __pyx_v_nargs; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; Py_ssize_t __pyx_t_5; MPI_Datatype __pyx_t_6; int __pyx_t_7; MPI_Aint __pyx_t_8; __Pyx_RefNannySetupContext("for_rma", 0); /* "mpi4py/MPI/msgbuffer.pxi":942 * object origin, int rank, object target) except -1: * # ORIGIN * self._origin = message_simple( # <<<<<<<<<<<<<< * origin, readonly, rank, 0, * &self.oaddr, &self.ocount, &self.otype) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_origin, __pyx_v_readonly, __pyx_v_rank, 0, (&__pyx_v_self->oaddr), (&__pyx_v_self->ocount), (&__pyx_v_self->otype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_origin); __Pyx_DECREF(__pyx_v_self->_origin); __pyx_v_self->_origin = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":945 * origin, readonly, rank, 0, * &self.oaddr, &self.ocount, &self.otype) * if ((rank == MPI_PROC_NULL) and # <<<<<<<<<<<<<< * (origin is not None) and * (is_list(origin) or is_tuple(origin)) and */ __pyx_t_3 = ((__pyx_v_rank == MPI_PROC_NULL) != 0); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } /* "mpi4py/MPI/msgbuffer.pxi":946 * &self.oaddr, &self.ocount, &self.otype) * if ((rank == MPI_PROC_NULL) and * (origin is not None) and # <<<<<<<<<<<<<< * (is_list(origin) or is_tuple(origin)) and * (len(origin) > 0 and isinstance(origin[-1], Datatype))): */ __pyx_t_3 = (__pyx_v_origin != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } /* "mpi4py/MPI/msgbuffer.pxi":947 * if ((rank == MPI_PROC_NULL) and * (origin is not None) and * (is_list(origin) or is_tuple(origin)) and # <<<<<<<<<<<<<< * (len(origin) > 0 and isinstance(origin[-1], Datatype))): * self.otype = (origin[-1]).ob_mpi */ __pyx_t_4 = (PyList_Check(__pyx_v_origin) != 0); if (!__pyx_t_4) { } else { goto __pyx_L7_next_and; } __pyx_t_4 = (PyTuple_Check(__pyx_v_origin) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_L7_next_and:; /* "mpi4py/MPI/msgbuffer.pxi":948 * (origin is not None) and * (is_list(origin) or is_tuple(origin)) and * (len(origin) > 0 and isinstance(origin[-1], Datatype))): # <<<<<<<<<<<<<< * self.otype = (origin[-1]).ob_mpi * self._origin = origin */ __pyx_t_5 = PyObject_Length(__pyx_v_origin); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(5, 948, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_5 > 0) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_origin, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Datatype); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; /* "mpi4py/MPI/msgbuffer.pxi":945 * origin, readonly, rank, 0, * &self.oaddr, &self.ocount, &self.otype) * if ((rank == MPI_PROC_NULL) and # <<<<<<<<<<<<<< * (origin is not None) and * (is_list(origin) or is_tuple(origin)) and */ if (__pyx_t_2) { /* "mpi4py/MPI/msgbuffer.pxi":949 * (is_list(origin) or is_tuple(origin)) and * (len(origin) > 0 and isinstance(origin[-1], Datatype))): * self.otype = (origin[-1]).ob_mpi # <<<<<<<<<<<<<< * self._origin = origin * # TARGET */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_origin, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Datatype)))) __PYX_ERR(5, 949, __pyx_L1_error) __pyx_t_6 = ((struct PyMPIDatatypeObject *)__pyx_t_1)->ob_mpi; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->otype = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":950 * (len(origin) > 0 and isinstance(origin[-1], Datatype))): * self.otype = (origin[-1]).ob_mpi * self._origin = origin # <<<<<<<<<<<<<< * # TARGET * cdef Py_ssize_t nargs = 0 */ __Pyx_INCREF(__pyx_v_origin); __Pyx_GIVEREF(__pyx_v_origin); __Pyx_GOTREF(__pyx_v_self->_origin); __Pyx_DECREF(__pyx_v_self->_origin); __pyx_v_self->_origin = __pyx_v_origin; /* "mpi4py/MPI/msgbuffer.pxi":945 * origin, readonly, rank, 0, * &self.oaddr, &self.ocount, &self.otype) * if ((rank == MPI_PROC_NULL) and # <<<<<<<<<<<<<< * (origin is not None) and * (is_list(origin) or is_tuple(origin)) and */ } /* "mpi4py/MPI/msgbuffer.pxi":952 * self._origin = origin * # TARGET * cdef Py_ssize_t nargs = 0 # <<<<<<<<<<<<<< * if target is None: * self.tdisp = 0 */ __pyx_v_nargs = 0; /* "mpi4py/MPI/msgbuffer.pxi":953 * # TARGET * cdef Py_ssize_t nargs = 0 * if target is None: # <<<<<<<<<<<<<< * self.tdisp = 0 * self.tcount = self.ocount */ __pyx_t_2 = (__pyx_v_target == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":954 * cdef Py_ssize_t nargs = 0 * if target is None: * self.tdisp = 0 # <<<<<<<<<<<<<< * self.tcount = self.ocount * self.ttype = self.otype */ __pyx_v_self->tdisp = 0; /* "mpi4py/MPI/msgbuffer.pxi":955 * if target is None: * self.tdisp = 0 * self.tcount = self.ocount # <<<<<<<<<<<<<< * self.ttype = self.otype * elif is_integral(target): */ __pyx_t_7 = __pyx_v_self->ocount; __pyx_v_self->tcount = __pyx_t_7; /* "mpi4py/MPI/msgbuffer.pxi":956 * self.tdisp = 0 * self.tcount = self.ocount * self.ttype = self.otype # <<<<<<<<<<<<<< * elif is_integral(target): * self.tdisp = target */ __pyx_t_6 = __pyx_v_self->otype; __pyx_v_self->ttype = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":953 * # TARGET * cdef Py_ssize_t nargs = 0 * if target is None: # <<<<<<<<<<<<<< * self.tdisp = 0 * self.tcount = self.ocount */ goto __pyx_L10; } /* "mpi4py/MPI/msgbuffer.pxi":957 * self.tcount = self.ocount * self.ttype = self.otype * elif is_integral(target): # <<<<<<<<<<<<<< * self.tdisp = target * self.tcount = self.ocount */ __pyx_t_3 = (__pyx_f_6mpi4py_3MPI_is_integral(__pyx_v_target) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":958 * self.ttype = self.otype * elif is_integral(target): * self.tdisp = target # <<<<<<<<<<<<<< * self.tcount = self.ocount * self.ttype = self.otype */ __pyx_t_8 = __Pyx_PyInt_As_MPI_Aint(__pyx_v_target); if (unlikely((__pyx_t_8 == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(5, 958, __pyx_L1_error) __pyx_v_self->tdisp = ((MPI_Aint)__pyx_t_8); /* "mpi4py/MPI/msgbuffer.pxi":959 * elif is_integral(target): * self.tdisp = target * self.tcount = self.ocount # <<<<<<<<<<<<<< * self.ttype = self.otype * elif is_list(target) or is_tuple(target): */ __pyx_t_7 = __pyx_v_self->ocount; __pyx_v_self->tcount = __pyx_t_7; /* "mpi4py/MPI/msgbuffer.pxi":960 * self.tdisp = target * self.tcount = self.ocount * self.ttype = self.otype # <<<<<<<<<<<<<< * elif is_list(target) or is_tuple(target): * self.tdisp = 0 */ __pyx_t_6 = __pyx_v_self->otype; __pyx_v_self->ttype = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":957 * self.tcount = self.ocount * self.ttype = self.otype * elif is_integral(target): # <<<<<<<<<<<<<< * self.tdisp = target * self.tcount = self.ocount */ goto __pyx_L10; } /* "mpi4py/MPI/msgbuffer.pxi":961 * self.tcount = self.ocount * self.ttype = self.otype * elif is_list(target) or is_tuple(target): # <<<<<<<<<<<<<< * self.tdisp = 0 * self.tcount = self.ocount */ __pyx_t_2 = (PyList_Check(__pyx_v_target) != 0); if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L11_bool_binop_done; } __pyx_t_2 = (PyTuple_Check(__pyx_v_target) != 0); __pyx_t_3 = __pyx_t_2; __pyx_L11_bool_binop_done:; if (likely(__pyx_t_3)) { /* "mpi4py/MPI/msgbuffer.pxi":962 * self.ttype = self.otype * elif is_list(target) or is_tuple(target): * self.tdisp = 0 # <<<<<<<<<<<<<< * self.tcount = self.ocount * self.ttype = self.otype */ __pyx_v_self->tdisp = 0; /* "mpi4py/MPI/msgbuffer.pxi":963 * elif is_list(target) or is_tuple(target): * self.tdisp = 0 * self.tcount = self.ocount # <<<<<<<<<<<<<< * self.ttype = self.otype * nargs = len(target) */ __pyx_t_7 = __pyx_v_self->ocount; __pyx_v_self->tcount = __pyx_t_7; /* "mpi4py/MPI/msgbuffer.pxi":964 * self.tdisp = 0 * self.tcount = self.ocount * self.ttype = self.otype # <<<<<<<<<<<<<< * nargs = len(target) * if nargs >= 1: */ __pyx_t_6 = __pyx_v_self->otype; __pyx_v_self->ttype = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":965 * self.tcount = self.ocount * self.ttype = self.otype * nargs = len(target) # <<<<<<<<<<<<<< * if nargs >= 1: * self.tdisp = target[0] */ __pyx_t_5 = PyObject_Length(__pyx_v_target); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(5, 965, __pyx_L1_error) __pyx_v_nargs = __pyx_t_5; /* "mpi4py/MPI/msgbuffer.pxi":966 * self.ttype = self.otype * nargs = len(target) * if nargs >= 1: # <<<<<<<<<<<<<< * self.tdisp = target[0] * if nargs >= 2: */ __pyx_t_3 = ((__pyx_v_nargs >= 1) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":967 * nargs = len(target) * if nargs >= 1: * self.tdisp = target[0] # <<<<<<<<<<<<<< * if nargs >= 2: * self.tcount = target[1] */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_target, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyInt_As_MPI_Aint(__pyx_t_1); if (unlikely((__pyx_t_8 == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(5, 967, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->tdisp = ((MPI_Aint)__pyx_t_8); /* "mpi4py/MPI/msgbuffer.pxi":966 * self.ttype = self.otype * nargs = len(target) * if nargs >= 1: # <<<<<<<<<<<<<< * self.tdisp = target[0] * if nargs >= 2: */ } /* "mpi4py/MPI/msgbuffer.pxi":968 * if nargs >= 1: * self.tdisp = target[0] * if nargs >= 2: # <<<<<<<<<<<<<< * self.tcount = target[1] * if nargs >= 3: */ __pyx_t_3 = ((__pyx_v_nargs >= 2) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":969 * self.tdisp = target[0] * if nargs >= 2: * self.tcount = target[1] # <<<<<<<<<<<<<< * if nargs >= 3: * self.ttype = (target[2]).ob_mpi */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_target, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(5, 969, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->tcount = ((int)__pyx_t_7); /* "mpi4py/MPI/msgbuffer.pxi":968 * if nargs >= 1: * self.tdisp = target[0] * if nargs >= 2: # <<<<<<<<<<<<<< * self.tcount = target[1] * if nargs >= 3: */ } /* "mpi4py/MPI/msgbuffer.pxi":970 * if nargs >= 2: * self.tcount = target[1] * if nargs >= 3: # <<<<<<<<<<<<<< * self.ttype = (target[2]).ob_mpi * if nargs >= 4: */ __pyx_t_3 = ((__pyx_v_nargs >= 3) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgbuffer.pxi":971 * self.tcount = target[1] * if nargs >= 3: * self.ttype = (target[2]).ob_mpi # <<<<<<<<<<<<<< * if nargs >= 4: * raise ValueError("target: expecting 3 items at most") */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_target, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Datatype)))) __PYX_ERR(5, 971, __pyx_L1_error) __pyx_t_6 = ((struct PyMPIDatatypeObject *)__pyx_t_1)->ob_mpi; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->ttype = __pyx_t_6; /* "mpi4py/MPI/msgbuffer.pxi":970 * if nargs >= 2: * self.tcount = target[1] * if nargs >= 3: # <<<<<<<<<<<<<< * self.ttype = (target[2]).ob_mpi * if nargs >= 4: */ } /* "mpi4py/MPI/msgbuffer.pxi":972 * if nargs >= 3: * self.ttype = (target[2]).ob_mpi * if nargs >= 4: # <<<<<<<<<<<<<< * raise ValueError("target: expecting 3 items at most") * else: */ __pyx_t_3 = ((__pyx_v_nargs >= 4) != 0); if (unlikely(__pyx_t_3)) { /* "mpi4py/MPI/msgbuffer.pxi":973 * self.ttype = (target[2]).ob_mpi * if nargs >= 4: * raise ValueError("target: expecting 3 items at most") # <<<<<<<<<<<<<< * else: * raise ValueError("target: expecting integral or list/tuple") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(5, 973, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":972 * if nargs >= 3: * self.ttype = (target[2]).ob_mpi * if nargs >= 4: # <<<<<<<<<<<<<< * raise ValueError("target: expecting 3 items at most") * else: */ } /* "mpi4py/MPI/msgbuffer.pxi":961 * self.tcount = self.ocount * self.ttype = self.otype * elif is_list(target) or is_tuple(target): # <<<<<<<<<<<<<< * self.tdisp = 0 * self.tcount = self.ocount */ goto __pyx_L10; } /* "mpi4py/MPI/msgbuffer.pxi":975 * raise ValueError("target: expecting 3 items at most") * else: * raise ValueError("target: expecting integral or list/tuple") # <<<<<<<<<<<<<< * self._target = target * return 0 */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(5, 975, __pyx_L1_error) } __pyx_L10:; /* "mpi4py/MPI/msgbuffer.pxi":976 * else: * raise ValueError("target: expecting integral or list/tuple") * self._target = target # <<<<<<<<<<<<<< * return 0 * */ __Pyx_INCREF(__pyx_v_target); __Pyx_GIVEREF(__pyx_v_target); __Pyx_GOTREF(__pyx_v_self->_target); __Pyx_DECREF(__pyx_v_self->_target); __pyx_v_self->_target = __pyx_v_target; /* "mpi4py/MPI/msgbuffer.pxi":977 * raise ValueError("target: expecting integral or list/tuple") * self._target = target * return 0 # <<<<<<<<<<<<<< * * cdef int for_put(self, object origin, int rank, object target) except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":939 * self.ttype = MPI_DATATYPE_NULL * * cdef int for_rma(self, int readonly, # <<<<<<<<<<<<<< * object origin, int rank, object target) except -1: * # ORIGIN */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.for_rma", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":979 * return 0 * * cdef int for_put(self, object origin, int rank, object target) except -1: # <<<<<<<<<<<<<< * self.for_rma(1, origin, rank, target) * return 0 */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_put(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_rank, PyObject *__pyx_v_target) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("for_put", 0); /* "mpi4py/MPI/msgbuffer.pxi":980 * * cdef int for_put(self, object origin, int rank, object target) except -1: * self.for_rma(1, origin, rank, target) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_rma(__pyx_v_self, 1, __pyx_v_origin, __pyx_v_rank, __pyx_v_target); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 980, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":981 * cdef int for_put(self, object origin, int rank, object target) except -1: * self.for_rma(1, origin, rank, target) * return 0 # <<<<<<<<<<<<<< * * cdef int for_get(self, object origin, int rank, object target) except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":979 * return 0 * * cdef int for_put(self, object origin, int rank, object target) except -1: # <<<<<<<<<<<<<< * self.for_rma(1, origin, rank, target) * return 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.for_put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":983 * return 0 * * cdef int for_get(self, object origin, int rank, object target) except -1: # <<<<<<<<<<<<<< * self.for_rma(0, origin, rank, target) * return 0 */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_rank, PyObject *__pyx_v_target) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("for_get", 0); /* "mpi4py/MPI/msgbuffer.pxi":984 * * cdef int for_get(self, object origin, int rank, object target) except -1: * self.for_rma(0, origin, rank, target) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_rma(__pyx_v_self, 0, __pyx_v_origin, __pyx_v_rank, __pyx_v_target); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 984, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":985 * cdef int for_get(self, object origin, int rank, object target) except -1: * self.for_rma(0, origin, rank, target) * return 0 # <<<<<<<<<<<<<< * * cdef int for_acc(self, object origin, int rank, object target) except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":983 * return 0 * * cdef int for_get(self, object origin, int rank, object target) except -1: # <<<<<<<<<<<<<< * self.for_rma(0, origin, rank, target) * return 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.for_get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":987 * return 0 * * cdef int for_acc(self, object origin, int rank, object target) except -1: # <<<<<<<<<<<<<< * self.for_rma(1, origin, rank, target) * return 0 */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_acc(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_rank, PyObject *__pyx_v_target) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("for_acc", 0); /* "mpi4py/MPI/msgbuffer.pxi":988 * * cdef int for_acc(self, object origin, int rank, object target) except -1: * self.for_rma(1, origin, rank, target) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_rma(__pyx_v_self, 1, __pyx_v_origin, __pyx_v_rank, __pyx_v_target); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 988, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":989 * cdef int for_acc(self, object origin, int rank, object target) except -1: * self.for_rma(1, origin, rank, target) * return 0 # <<<<<<<<<<<<<< * * cdef int set_origin(self, object origin, int rank) except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":987 * return 0 * * cdef int for_acc(self, object origin, int rank, object target) except -1: # <<<<<<<<<<<<<< * self.for_rma(1, origin, rank, target) * return 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.for_acc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":991 * return 0 * * cdef int set_origin(self, object origin, int rank) except -1: # <<<<<<<<<<<<<< * self._origin = message_simple( * origin, 1, rank, 0, */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_origin(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_rank) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; MPI_Datatype __pyx_t_3; __Pyx_RefNannySetupContext("set_origin", 0); /* "mpi4py/MPI/msgbuffer.pxi":992 * * cdef int set_origin(self, object origin, int rank) except -1: * self._origin = message_simple( # <<<<<<<<<<<<<< * origin, 1, rank, 0, * &self.oaddr, &self.ocount, &self.otype) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_origin, 1, __pyx_v_rank, 0, (&__pyx_v_self->oaddr), (&__pyx_v_self->ocount), (&__pyx_v_self->otype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_origin); __Pyx_DECREF(__pyx_v_self->_origin); __pyx_v_self->_origin = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":995 * origin, 1, rank, 0, * &self.oaddr, &self.ocount, &self.otype) * self.tdisp = 0 # <<<<<<<<<<<<<< * self.tcount = self.ocount * self.ttype = self.otype */ __pyx_v_self->tdisp = 0; /* "mpi4py/MPI/msgbuffer.pxi":996 * &self.oaddr, &self.ocount, &self.otype) * self.tdisp = 0 * self.tcount = self.ocount # <<<<<<<<<<<<<< * self.ttype = self.otype * */ __pyx_t_2 = __pyx_v_self->ocount; __pyx_v_self->tcount = __pyx_t_2; /* "mpi4py/MPI/msgbuffer.pxi":997 * self.tdisp = 0 * self.tcount = self.ocount * self.ttype = self.otype # <<<<<<<<<<<<<< * * cdef int set_compare(self, object compare, int rank) except -1: */ __pyx_t_3 = __pyx_v_self->otype; __pyx_v_self->ttype = __pyx_t_3; /* "mpi4py/MPI/msgbuffer.pxi":991 * return 0 * * cdef int set_origin(self, object origin, int rank) except -1: # <<<<<<<<<<<<<< * self._origin = message_simple( * origin, 1, rank, 0, */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.set_origin", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":999 * self.ttype = self.otype * * cdef int set_compare(self, object compare, int rank) except -1: # <<<<<<<<<<<<<< * self._compare = message_simple( * compare, 1, rank, 0, */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_compare(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_compare, int __pyx_v_rank) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_compare", 0); /* "mpi4py/MPI/msgbuffer.pxi":1000 * * cdef int set_compare(self, object compare, int rank) except -1: * self._compare = message_simple( # <<<<<<<<<<<<<< * compare, 1, rank, 0, * &self.caddr, &self.ccount, &self.ctype) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_compare, 1, __pyx_v_rank, 0, (&__pyx_v_self->caddr), (&__pyx_v_self->ccount), (&__pyx_v_self->ctype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_compare); __Pyx_DECREF(__pyx_v_self->_compare); __pyx_v_self->_compare = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":999 * self.ttype = self.otype * * cdef int set_compare(self, object compare, int rank) except -1: # <<<<<<<<<<<<<< * self._compare = message_simple( * compare, 1, rank, 0, */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.set_compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1004 * &self.caddr, &self.ccount, &self.ctype) * * cdef int set_result(self, object result, int rank) except -1: # <<<<<<<<<<<<<< * self._result = message_simple( * result, 0, rank, 0, */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_result(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_result, int __pyx_v_rank) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("set_result", 0); /* "mpi4py/MPI/msgbuffer.pxi":1005 * * cdef int set_result(self, object result, int rank) except -1: * self._result = message_simple( # <<<<<<<<<<<<<< * result, 0, rank, 0, * &self.raddr, &self.rcount, &self.rtype) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_result, 0, __pyx_v_rank, 0, (&__pyx_v_self->raddr), (&__pyx_v_self->rcount), (&__pyx_v_self->rtype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_result); __Pyx_DECREF(__pyx_v_self->_result); __pyx_v_self->_result = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1004 * &self.caddr, &self.ccount, &self.ctype) * * cdef int set_result(self, object result, int rank) except -1: # <<<<<<<<<<<<<< * self._result = message_simple( * result, 0, rank, 0, */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1009 * &self.raddr, &self.rcount, &self.rtype) * * cdef int for_get_acc(self, object origin, object result, # <<<<<<<<<<<<<< * int rank, object target) except -1: * self.for_rma(0, origin, rank, target) */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get_acc(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_rank, PyObject *__pyx_v_target) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("for_get_acc", 0); /* "mpi4py/MPI/msgbuffer.pxi":1011 * cdef int for_get_acc(self, object origin, object result, * int rank, object target) except -1: * self.for_rma(0, origin, rank, target) # <<<<<<<<<<<<<< * self.set_result(result, rank) * return 0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_rma(__pyx_v_self, 0, __pyx_v_origin, __pyx_v_rank, __pyx_v_target); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1011, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":1012 * int rank, object target) except -1: * self.for_rma(0, origin, rank, target) * self.set_result(result, rank) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_result(__pyx_v_self, __pyx_v_result, __pyx_v_rank); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1012, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":1013 * self.for_rma(0, origin, rank, target) * self.set_result(result, rank) * return 0 # <<<<<<<<<<<<<< * * cdef int for_fetch_op(self, object origin, object result, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":1009 * &self.raddr, &self.rcount, &self.rtype) * * cdef int for_get_acc(self, object origin, object result, # <<<<<<<<<<<<<< * int rank, object target) except -1: * self.for_rma(0, origin, rank, target) */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.for_get_acc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1015 * return 0 * * cdef int for_fetch_op(self, object origin, object result, # <<<<<<<<<<<<<< * int rank, MPI_Aint disp) except -1: * self.set_origin(origin, rank) */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_fetch_op(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_rank, MPI_Aint __pyx_v_disp) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("for_fetch_op", 0); /* "mpi4py/MPI/msgbuffer.pxi":1017 * cdef int for_fetch_op(self, object origin, object result, * int rank, MPI_Aint disp) except -1: * self.set_origin(origin, rank) # <<<<<<<<<<<<<< * self.set_result(result, rank) * self.tdisp = disp */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_origin(__pyx_v_self, __pyx_v_origin, __pyx_v_rank); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1017, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":1018 * int rank, MPI_Aint disp) except -1: * self.set_origin(origin, rank) * self.set_result(result, rank) # <<<<<<<<<<<<<< * self.tdisp = disp * if rank == MPI_PROC_NULL: return 0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_result(__pyx_v_self, __pyx_v_result, __pyx_v_rank); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1018, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":1019 * self.set_origin(origin, rank) * self.set_result(result, rank) * self.tdisp = disp # <<<<<<<<<<<<<< * if rank == MPI_PROC_NULL: return 0 * # Check */ __pyx_v_self->tdisp = __pyx_v_disp; /* "mpi4py/MPI/msgbuffer.pxi":1020 * self.set_result(result, rank) * self.tdisp = disp * if rank == MPI_PROC_NULL: return 0 # <<<<<<<<<<<<<< * # Check * if self.ocount != 1: raise ValueError( */ __pyx_t_2 = ((__pyx_v_rank == MPI_PROC_NULL) != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":1022 * if rank == MPI_PROC_NULL: return 0 * # Check * if self.ocount != 1: raise ValueError( # <<<<<<<<<<<<<< * "origin: expecting a single element, got %d" % self.ocount) * if self.rcount != 1: raise ValueError( */ __pyx_t_2 = ((__pyx_v_self->ocount != 1) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":1023 * # Check * if self.ocount != 1: raise ValueError( * "origin: expecting a single element, got %d" % self.ocount) # <<<<<<<<<<<<<< * if self.rcount != 1: raise ValueError( * "result: expecting a single element, got %d" % self.rcount) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->ocount); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_origin_expecting_a_single_elemen, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1022 * if rank == MPI_PROC_NULL: return 0 * # Check * if self.ocount != 1: raise ValueError( # <<<<<<<<<<<<<< * "origin: expecting a single element, got %d" % self.ocount) * if self.rcount != 1: raise ValueError( */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 1022, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":1024 * if self.ocount != 1: raise ValueError( * "origin: expecting a single element, got %d" % self.ocount) * if self.rcount != 1: raise ValueError( # <<<<<<<<<<<<<< * "result: expecting a single element, got %d" % self.rcount) * if self.otype != self.rtype: raise ValueError( */ __pyx_t_2 = ((__pyx_v_self->rcount != 1) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":1025 * "origin: expecting a single element, got %d" % self.ocount) * if self.rcount != 1: raise ValueError( * "result: expecting a single element, got %d" % self.rcount) # <<<<<<<<<<<<<< * if self.otype != self.rtype: raise ValueError( * "mismatch in origin and result MPI datatypes") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->rcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_result_expecting_a_single_elemen, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1024 * if self.ocount != 1: raise ValueError( * "origin: expecting a single element, got %d" % self.ocount) * if self.rcount != 1: raise ValueError( # <<<<<<<<<<<<<< * "result: expecting a single element, got %d" % self.rcount) * if self.otype != self.rtype: raise ValueError( */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 1024, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":1026 * if self.rcount != 1: raise ValueError( * "result: expecting a single element, got %d" % self.rcount) * if self.otype != self.rtype: raise ValueError( # <<<<<<<<<<<<<< * "mismatch in origin and result MPI datatypes") * return 0 */ __pyx_t_2 = ((__pyx_v_self->otype != __pyx_v_self->rtype) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 1026, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":1028 * if self.otype != self.rtype: raise ValueError( * "mismatch in origin and result MPI datatypes") * return 0 # <<<<<<<<<<<<<< * * cdef int for_cmp_swap(self, object origin, object compare, object result, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":1015 * return 0 * * cdef int for_fetch_op(self, object origin, object result, # <<<<<<<<<<<<<< * int rank, MPI_Aint disp) except -1: * self.set_origin(origin, rank) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.for_fetch_op", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1030 * return 0 * * cdef int for_cmp_swap(self, object origin, object compare, object result, # <<<<<<<<<<<<<< * int rank, MPI_Aint disp) except -1: * self.set_origin(origin, rank) */ static int __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_cmp_swap(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_compare, PyObject *__pyx_v_result, int __pyx_v_rank, MPI_Aint __pyx_v_disp) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("for_cmp_swap", 0); /* "mpi4py/MPI/msgbuffer.pxi":1032 * cdef int for_cmp_swap(self, object origin, object compare, object result, * int rank, MPI_Aint disp) except -1: * self.set_origin(origin, rank) # <<<<<<<<<<<<<< * self.set_compare(compare, rank) * self.set_result(result, rank) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_origin(__pyx_v_self, __pyx_v_origin, __pyx_v_rank); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1032, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":1033 * int rank, MPI_Aint disp) except -1: * self.set_origin(origin, rank) * self.set_compare(compare, rank) # <<<<<<<<<<<<<< * self.set_result(result, rank) * self.tdisp = disp */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_compare(__pyx_v_self, __pyx_v_compare, __pyx_v_rank); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1033, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":1034 * self.set_origin(origin, rank) * self.set_compare(compare, rank) * self.set_result(result, rank) # <<<<<<<<<<<<<< * self.tdisp = disp * if rank == MPI_PROC_NULL: return 0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_result(__pyx_v_self, __pyx_v_result, __pyx_v_rank); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1034, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":1035 * self.set_compare(compare, rank) * self.set_result(result, rank) * self.tdisp = disp # <<<<<<<<<<<<<< * if rank == MPI_PROC_NULL: return 0 * # Check */ __pyx_v_self->tdisp = __pyx_v_disp; /* "mpi4py/MPI/msgbuffer.pxi":1036 * self.set_result(result, rank) * self.tdisp = disp * if rank == MPI_PROC_NULL: return 0 # <<<<<<<<<<<<<< * # Check * if self.ocount != 1: raise ValueError( */ __pyx_t_2 = ((__pyx_v_rank == MPI_PROC_NULL) != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgbuffer.pxi":1038 * if rank == MPI_PROC_NULL: return 0 * # Check * if self.ocount != 1: raise ValueError( # <<<<<<<<<<<<<< * "origin: expecting a single element, got %d" % self.ocount) * if self.ccount != 1: raise ValueError( */ __pyx_t_2 = ((__pyx_v_self->ocount != 1) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":1039 * # Check * if self.ocount != 1: raise ValueError( * "origin: expecting a single element, got %d" % self.ocount) # <<<<<<<<<<<<<< * if self.ccount != 1: raise ValueError( * "compare: expecting a single element, got %d" % self.ccount) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->ocount); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_origin_expecting_a_single_elemen, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1038 * if rank == MPI_PROC_NULL: return 0 * # Check * if self.ocount != 1: raise ValueError( # <<<<<<<<<<<<<< * "origin: expecting a single element, got %d" % self.ocount) * if self.ccount != 1: raise ValueError( */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 1038, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":1040 * if self.ocount != 1: raise ValueError( * "origin: expecting a single element, got %d" % self.ocount) * if self.ccount != 1: raise ValueError( # <<<<<<<<<<<<<< * "compare: expecting a single element, got %d" % self.ccount) * if self.rcount != 1: raise ValueError( */ __pyx_t_2 = ((__pyx_v_self->ccount != 1) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":1041 * "origin: expecting a single element, got %d" % self.ocount) * if self.ccount != 1: raise ValueError( * "compare: expecting a single element, got %d" % self.ccount) # <<<<<<<<<<<<<< * if self.rcount != 1: raise ValueError( * "result: expecting a single element, got %d" % self.rcount) */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->ccount); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_compare_expecting_a_single_eleme, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1040 * if self.ocount != 1: raise ValueError( * "origin: expecting a single element, got %d" % self.ocount) * if self.ccount != 1: raise ValueError( # <<<<<<<<<<<<<< * "compare: expecting a single element, got %d" % self.ccount) * if self.rcount != 1: raise ValueError( */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 1040, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":1042 * if self.ccount != 1: raise ValueError( * "compare: expecting a single element, got %d" % self.ccount) * if self.rcount != 1: raise ValueError( # <<<<<<<<<<<<<< * "result: expecting a single element, got %d" % self.rcount) * if self.otype != self.ctype: raise ValueError( */ __pyx_t_2 = ((__pyx_v_self->rcount != 1) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgbuffer.pxi":1043 * "compare: expecting a single element, got %d" % self.ccount) * if self.rcount != 1: raise ValueError( * "result: expecting a single element, got %d" % self.rcount) # <<<<<<<<<<<<<< * if self.otype != self.ctype: raise ValueError( * "mismatch in origin and compare MPI datatypes") */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->rcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_result_expecting_a_single_elemen, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1042 * if self.ccount != 1: raise ValueError( * "compare: expecting a single element, got %d" % self.ccount) * if self.rcount != 1: raise ValueError( # <<<<<<<<<<<<<< * "result: expecting a single element, got %d" % self.rcount) * if self.otype != self.ctype: raise ValueError( */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 1042, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":1044 * if self.rcount != 1: raise ValueError( * "result: expecting a single element, got %d" % self.rcount) * if self.otype != self.ctype: raise ValueError( # <<<<<<<<<<<<<< * "mismatch in origin and compare MPI datatypes") * if self.otype != self.rtype: raise ValueError( */ __pyx_t_2 = ((__pyx_v_self->otype != __pyx_v_self->ctype) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 1044, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":1046 * if self.otype != self.ctype: raise ValueError( * "mismatch in origin and compare MPI datatypes") * if self.otype != self.rtype: raise ValueError( # <<<<<<<<<<<<<< * "mismatch in origin and result MPI datatypes") * return 0 */ __pyx_t_2 = ((__pyx_v_self->otype != __pyx_v_self->rtype) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(5, 1046, __pyx_L1_error) } /* "mpi4py/MPI/msgbuffer.pxi":1048 * if self.otype != self.rtype: raise ValueError( * "mismatch in origin and result MPI datatypes") * return 0 # <<<<<<<<<<<<<< * * cdef inline _p_msg_rma message_rma(): */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":1030 * return 0 * * cdef int for_cmp_swap(self, object origin, object compare, object result, # <<<<<<<<<<<<<< * int rank, MPI_Aint disp) except -1: * self.set_origin(origin, rank) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI._p_msg_rma.for_cmp_swap", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1050 * return 0 * * cdef inline _p_msg_rma message_rma(): # <<<<<<<<<<<<<< * cdef _p_msg_rma msg = <_p_msg_rma>_p_msg_rma.__new__(_p_msg_rma) * return msg */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_f_6mpi4py_3MPI_message_rma(void) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("message_rma", 0); /* "mpi4py/MPI/msgbuffer.pxi":1051 * * cdef inline _p_msg_rma message_rma(): * cdef _p_msg_rma msg = <_p_msg_rma>_p_msg_rma.__new__(_p_msg_rma) # <<<<<<<<<<<<<< * return msg * */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI__p_msg_rma(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI__p_msg_rma), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1051, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1052 * cdef inline _p_msg_rma message_rma(): * cdef _p_msg_rma msg = <_p_msg_rma>_p_msg_rma.__new__(_p_msg_rma) * return msg # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __pyx_r = __pyx_v_msg; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":1050 * return 0 * * cdef inline _p_msg_rma message_rma(): # <<<<<<<<<<<<<< * cdef _p_msg_rma msg = <_p_msg_rma>_p_msg_rma.__new__(_p_msg_rma) * return msg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.message_rma", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1067 * cdef object _msg * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * self.count = 0 */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9_p_msg_io_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9_p_msg_io_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_6mpi4py_3MPI_9_p_msg_io___cinit__(((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9_p_msg_io___cinit__(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/msgbuffer.pxi":1068 * * def __cinit__(self): * self.buf = NULL # <<<<<<<<<<<<<< * self.count = 0 * self.dtype = MPI_DATATYPE_NULL */ __pyx_v_self->buf = NULL; /* "mpi4py/MPI/msgbuffer.pxi":1069 * def __cinit__(self): * self.buf = NULL * self.count = 0 # <<<<<<<<<<<<<< * self.dtype = MPI_DATATYPE_NULL * */ __pyx_v_self->count = 0; /* "mpi4py/MPI/msgbuffer.pxi":1070 * self.buf = NULL * self.count = 0 * self.dtype = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * * cdef int for_read(self, object msg) except -1: */ __pyx_v_self->dtype = MPI_DATATYPE_NULL; /* "mpi4py/MPI/msgbuffer.pxi":1067 * cdef object _msg * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * self.count = 0 */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1072 * self.dtype = MPI_DATATYPE_NULL * * cdef int for_read(self, object msg) except -1: # <<<<<<<<<<<<<< * self._msg = message_simple(msg, 0, # writable * 0, 0, */ static int __pyx_f_6mpi4py_3MPI_9_p_msg_io_for_read(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_self, PyObject *__pyx_v_msg) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("for_read", 0); /* "mpi4py/MPI/msgbuffer.pxi":1073 * * cdef int for_read(self, object msg) except -1: * self._msg = message_simple(msg, 0, # writable # <<<<<<<<<<<<<< * 0, 0, * &self.buf, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_msg, 0, 0, 0, (&__pyx_v_self->buf), (&__pyx_v_self->count), (&__pyx_v_self->dtype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_msg); __Pyx_DECREF(__pyx_v_self->_msg); __pyx_v_self->_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1078 * &self.count, * &self.dtype) * return 0 # <<<<<<<<<<<<<< * * cdef int for_write(self, object msg) except -1: */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":1072 * self.dtype = MPI_DATATYPE_NULL * * cdef int for_read(self, object msg) except -1: # <<<<<<<<<<<<<< * self._msg = message_simple(msg, 0, # writable * 0, 0, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_io.for_read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1080 * return 0 * * cdef int for_write(self, object msg) except -1: # <<<<<<<<<<<<<< * self._msg = message_simple(msg, 1, # readonly * 0, 0, */ static int __pyx_f_6mpi4py_3MPI_9_p_msg_io_for_write(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_self, PyObject *__pyx_v_msg) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("for_write", 0); /* "mpi4py/MPI/msgbuffer.pxi":1081 * * cdef int for_write(self, object msg) except -1: * self._msg = message_simple(msg, 1, # readonly # <<<<<<<<<<<<<< * 0, 0, * &self.buf, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_simple(__pyx_v_msg, 1, 0, 0, (&__pyx_v_self->buf), (&__pyx_v_self->count), (&__pyx_v_self->dtype))); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_msg); __Pyx_DECREF(__pyx_v_self->_msg); __pyx_v_self->_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1086 * &self.count, * &self.dtype) * return 0 # <<<<<<<<<<<<<< * * cdef inline _p_msg_io message_io_read(object buf): */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":1080 * return 0 * * cdef int for_write(self, object msg) except -1: # <<<<<<<<<<<<<< * self._msg = message_simple(msg, 1, # readonly * 0, 0, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI._p_msg_io.for_write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1088 * return 0 * * cdef inline _p_msg_io message_io_read(object buf): # <<<<<<<<<<<<<< * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) * msg.for_read(buf) */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_f_6mpi4py_3MPI_message_io_read(PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_msg = 0; struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("message_io_read", 0); /* "mpi4py/MPI/msgbuffer.pxi":1089 * * cdef inline _p_msg_io message_io_read(object buf): * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) # <<<<<<<<<<<<<< * msg.for_read(buf) * return msg */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI__p_msg_io(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI__p_msg_io), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1089, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1090 * cdef inline _p_msg_io message_io_read(object buf): * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) * msg.for_read(buf) # <<<<<<<<<<<<<< * return msg * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_9_p_msg_io_for_read(__pyx_v_msg, __pyx_v_buf); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 1090, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":1091 * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) * msg.for_read(buf) * return msg # <<<<<<<<<<<<<< * * cdef inline _p_msg_io message_io_write(object buf): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __pyx_r = __pyx_v_msg; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":1088 * return 0 * * cdef inline _p_msg_io message_io_read(object buf): # <<<<<<<<<<<<<< * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) * msg.for_read(buf) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.message_io_read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgbuffer.pxi":1093 * return msg * * cdef inline _p_msg_io message_io_write(object buf): # <<<<<<<<<<<<<< * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) * msg.for_write(buf) */ static CYTHON_INLINE struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_f_6mpi4py_3MPI_message_io_write(PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_msg = 0; struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("message_io_write", 0); /* "mpi4py/MPI/msgbuffer.pxi":1094 * * cdef inline _p_msg_io message_io_write(object buf): * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) # <<<<<<<<<<<<<< * msg.for_write(buf) * return msg */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI__p_msg_io(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI__p_msg_io), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1094, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgbuffer.pxi":1095 * cdef inline _p_msg_io message_io_write(object buf): * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) * msg.for_write(buf) # <<<<<<<<<<<<<< * return msg * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_9_p_msg_io_for_write(__pyx_v_msg, __pyx_v_buf); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(5, 1095, __pyx_L1_error) /* "mpi4py/MPI/msgbuffer.pxi":1096 * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) * msg.for_write(buf) * return msg # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __pyx_r = __pyx_v_msg; goto __pyx_L0; /* "mpi4py/MPI/msgbuffer.pxi":1093 * return msg * * cdef inline _p_msg_io message_io_write(object buf): # <<<<<<<<<<<<<< * cdef _p_msg_io msg = <_p_msg_io>_p_msg_io.__new__(_p_msg_io) * msg.for_write(buf) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.message_io_write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":54 * cdef object ob_PROTO * * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<< * self.ob_dumps = PyPickle_dumps * self.ob_loads = PyPickle_loads */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6Pickle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6Pickle_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_args = 0; CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1; __Pyx_INCREF(__pyx_args); __pyx_v_args = __pyx_args; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Pickle___cinit__(((struct __pyx_obj_6mpi4py_3MPI_Pickle *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6Pickle___cinit__(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/msgpickle.pxi":55 * * def __cinit__(self, *args, **kwargs): * self.ob_dumps = PyPickle_dumps # <<<<<<<<<<<<<< * self.ob_loads = PyPickle_loads * self.ob_PROTO = PyPickle_PROTOCOL */ __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_PyPickle_dumps); __Pyx_GIVEREF(__pyx_v_6mpi4py_3MPI_PyPickle_dumps); __Pyx_GOTREF(__pyx_v_self->ob_dumps); __Pyx_DECREF(__pyx_v_self->ob_dumps); __pyx_v_self->ob_dumps = __pyx_v_6mpi4py_3MPI_PyPickle_dumps; /* "mpi4py/MPI/msgpickle.pxi":56 * def __cinit__(self, *args, **kwargs): * self.ob_dumps = PyPickle_dumps * self.ob_loads = PyPickle_loads # <<<<<<<<<<<<<< * self.ob_PROTO = PyPickle_PROTOCOL * */ __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_PyPickle_loads); __Pyx_GIVEREF(__pyx_v_6mpi4py_3MPI_PyPickle_loads); __Pyx_GOTREF(__pyx_v_self->ob_loads); __Pyx_DECREF(__pyx_v_self->ob_loads); __pyx_v_self->ob_loads = __pyx_v_6mpi4py_3MPI_PyPickle_loads; /* "mpi4py/MPI/msgpickle.pxi":57 * self.ob_dumps = PyPickle_dumps * self.ob_loads = PyPickle_loads * self.ob_PROTO = PyPickle_PROTOCOL # <<<<<<<<<<<<<< * * def __init__(self, dumps=None, loads=None, protocol=None): */ __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); __Pyx_GIVEREF(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); __Pyx_GOTREF(__pyx_v_self->ob_PROTO); __Pyx_DECREF(__pyx_v_self->ob_PROTO); __pyx_v_self->ob_PROTO = __pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL; /* "mpi4py/MPI/msgpickle.pxi":54 * cdef object ob_PROTO * * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<< * self.ob_dumps = PyPickle_dumps * self.ob_loads = PyPickle_loads */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":59 * self.ob_PROTO = PyPickle_PROTOCOL * * def __init__(self, dumps=None, loads=None, protocol=None): # <<<<<<<<<<<<<< * if dumps is None: * dumps = PyPickle_dumps */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6Pickle_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6Pickle_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dumps = 0; PyObject *__pyx_v_loads = 0; PyObject *__pyx_v_protocol = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dumps,&__pyx_n_s_loads,&__pyx_n_s_protocol,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dumps); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loads); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(6, 59, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dumps = values[0]; __pyx_v_loads = values[1]; __pyx_v_protocol = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 59, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Pickle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Pickle_2__init__(((struct __pyx_obj_6mpi4py_3MPI_Pickle *)__pyx_v_self), __pyx_v_dumps, __pyx_v_loads, __pyx_v_protocol); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6Pickle_2__init__(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_dumps, PyObject *__pyx_v_loads, PyObject *__pyx_v_protocol) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_dumps); __Pyx_INCREF(__pyx_v_loads); __Pyx_INCREF(__pyx_v_protocol); /* "mpi4py/MPI/msgpickle.pxi":60 * * def __init__(self, dumps=None, loads=None, protocol=None): * if dumps is None: # <<<<<<<<<<<<<< * dumps = PyPickle_dumps * if loads is None: */ __pyx_t_1 = (__pyx_v_dumps == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":61 * def __init__(self, dumps=None, loads=None, protocol=None): * if dumps is None: * dumps = PyPickle_dumps # <<<<<<<<<<<<<< * if loads is None: * loads = PyPickle_loads */ __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_PyPickle_dumps); __Pyx_DECREF_SET(__pyx_v_dumps, __pyx_v_6mpi4py_3MPI_PyPickle_dumps); /* "mpi4py/MPI/msgpickle.pxi":60 * * def __init__(self, dumps=None, loads=None, protocol=None): * if dumps is None: # <<<<<<<<<<<<<< * dumps = PyPickle_dumps * if loads is None: */ } /* "mpi4py/MPI/msgpickle.pxi":62 * if dumps is None: * dumps = PyPickle_dumps * if loads is None: # <<<<<<<<<<<<<< * loads = PyPickle_loads * if protocol is None: */ __pyx_t_2 = (__pyx_v_loads == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":63 * dumps = PyPickle_dumps * if loads is None: * loads = PyPickle_loads # <<<<<<<<<<<<<< * if protocol is None: * if dumps is PyPickle_dumps: */ __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_PyPickle_loads); __Pyx_DECREF_SET(__pyx_v_loads, __pyx_v_6mpi4py_3MPI_PyPickle_loads); /* "mpi4py/MPI/msgpickle.pxi":62 * if dumps is None: * dumps = PyPickle_dumps * if loads is None: # <<<<<<<<<<<<<< * loads = PyPickle_loads * if protocol is None: */ } /* "mpi4py/MPI/msgpickle.pxi":64 * if loads is None: * loads = PyPickle_loads * if protocol is None: # <<<<<<<<<<<<<< * if dumps is PyPickle_dumps: * protocol = PyPickle_PROTOCOL */ __pyx_t_1 = (__pyx_v_protocol == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":65 * loads = PyPickle_loads * if protocol is None: * if dumps is PyPickle_dumps: # <<<<<<<<<<<<<< * protocol = PyPickle_PROTOCOL * self.ob_dumps = dumps */ __pyx_t_2 = (__pyx_v_dumps == __pyx_v_6mpi4py_3MPI_PyPickle_dumps); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":66 * if protocol is None: * if dumps is PyPickle_dumps: * protocol = PyPickle_PROTOCOL # <<<<<<<<<<<<<< * self.ob_dumps = dumps * self.ob_loads = loads */ __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); __Pyx_DECREF_SET(__pyx_v_protocol, __pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); /* "mpi4py/MPI/msgpickle.pxi":65 * loads = PyPickle_loads * if protocol is None: * if dumps is PyPickle_dumps: # <<<<<<<<<<<<<< * protocol = PyPickle_PROTOCOL * self.ob_dumps = dumps */ } /* "mpi4py/MPI/msgpickle.pxi":64 * if loads is None: * loads = PyPickle_loads * if protocol is None: # <<<<<<<<<<<<<< * if dumps is PyPickle_dumps: * protocol = PyPickle_PROTOCOL */ } /* "mpi4py/MPI/msgpickle.pxi":67 * if dumps is PyPickle_dumps: * protocol = PyPickle_PROTOCOL * self.ob_dumps = dumps # <<<<<<<<<<<<<< * self.ob_loads = loads * self.ob_PROTO = protocol */ __Pyx_INCREF(__pyx_v_dumps); __Pyx_GIVEREF(__pyx_v_dumps); __Pyx_GOTREF(__pyx_v_self->ob_dumps); __Pyx_DECREF(__pyx_v_self->ob_dumps); __pyx_v_self->ob_dumps = __pyx_v_dumps; /* "mpi4py/MPI/msgpickle.pxi":68 * protocol = PyPickle_PROTOCOL * self.ob_dumps = dumps * self.ob_loads = loads # <<<<<<<<<<<<<< * self.ob_PROTO = protocol * */ __Pyx_INCREF(__pyx_v_loads); __Pyx_GIVEREF(__pyx_v_loads); __Pyx_GOTREF(__pyx_v_self->ob_loads); __Pyx_DECREF(__pyx_v_self->ob_loads); __pyx_v_self->ob_loads = __pyx_v_loads; /* "mpi4py/MPI/msgpickle.pxi":69 * self.ob_dumps = dumps * self.ob_loads = loads * self.ob_PROTO = protocol # <<<<<<<<<<<<<< * * def dumps(self, obj): */ __Pyx_INCREF(__pyx_v_protocol); __Pyx_GIVEREF(__pyx_v_protocol); __Pyx_GOTREF(__pyx_v_self->ob_PROTO); __Pyx_DECREF(__pyx_v_self->ob_PROTO); __pyx_v_self->ob_PROTO = __pyx_v_protocol; /* "mpi4py/MPI/msgpickle.pxi":59 * self.ob_PROTO = PyPickle_PROTOCOL * * def __init__(self, dumps=None, loads=None, protocol=None): # <<<<<<<<<<<<<< * if dumps is None: * dumps = PyPickle_dumps */ /* function exit code */ __pyx_r = 0; __Pyx_XDECREF(__pyx_v_dumps); __Pyx_XDECREF(__pyx_v_loads); __Pyx_XDECREF(__pyx_v_protocol); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":71 * self.ob_PROTO = protocol * * def dumps(self, obj): # <<<<<<<<<<<<<< * "dumps(obj) -> bytes" * return self.cdumps(obj) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Pickle_5dumps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Pickle_4dumps[] = "Pickle.dumps(self, obj)\ndumps(obj) -> bytes"; static PyObject *__pyx_pw_6mpi4py_3MPI_6Pickle_5dumps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dumps (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dumps") < 0)) __PYX_ERR(6, 71, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_obj = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("dumps", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 71, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Pickle.dumps", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Pickle_4dumps(((struct __pyx_obj_6mpi4py_3MPI_Pickle *)__pyx_v_self), __pyx_v_obj); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Pickle_4dumps(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("dumps", 0); /* "mpi4py/MPI/msgpickle.pxi":73 * def dumps(self, obj): * "dumps(obj) -> bytes" * return self.cdumps(obj) # <<<<<<<<<<<<<< * * def loads(self, buf): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_cdumps(__pyx_v_self, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":71 * self.ob_PROTO = protocol * * def dumps(self, obj): # <<<<<<<<<<<<<< * "dumps(obj) -> bytes" * return self.cdumps(obj) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Pickle.dumps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":75 * return self.cdumps(obj) * * def loads(self, buf): # <<<<<<<<<<<<<< * "loads(buf) -> object" * return self.cloads(buf) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Pickle_7loads(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Pickle_6loads[] = "Pickle.loads(self, buf)\nloads(buf) -> object"; static PyObject *__pyx_pw_6mpi4py_3MPI_6Pickle_7loads(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("loads (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "loads") < 0)) __PYX_ERR(6, 75, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("loads", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(6, 75, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Pickle.loads", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Pickle_6loads(((struct __pyx_obj_6mpi4py_3MPI_Pickle *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Pickle_6loads(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_buf) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("loads", 0); /* "mpi4py/MPI/msgpickle.pxi":77 * def loads(self, buf): * "loads(buf) -> object" * return self.cloads(buf) # <<<<<<<<<<<<<< * * property PROTOCOL: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_cloads(__pyx_v_self, __pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":75 * return self.cdumps(obj) * * def loads(self, buf): # <<<<<<<<<<<<<< * "loads(buf) -> object" * return self.cloads(buf) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Pickle.loads", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":81 * property PROTOCOL: * "protocol" * def __get__(self): # <<<<<<<<<<<<<< * return self.ob_PROTO * def __set__(self, protocol): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Pickle_8PROTOCOL_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6Pickle_8PROTOCOL_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Pickle_8PROTOCOL___get__(((struct __pyx_obj_6mpi4py_3MPI_Pickle *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Pickle_8PROTOCOL___get__(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/msgpickle.pxi":82 * "protocol" * def __get__(self): * return self.ob_PROTO # <<<<<<<<<<<<<< * def __set__(self, protocol): * if protocol is None: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->ob_PROTO); __pyx_r = __pyx_v_self->ob_PROTO; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":81 * property PROTOCOL: * "protocol" * def __get__(self): # <<<<<<<<<<<<<< * return self.ob_PROTO * def __set__(self, protocol): */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":83 * def __get__(self): * return self.ob_PROTO * def __set__(self, protocol): # <<<<<<<<<<<<<< * if protocol is None: * if self.ob_dumps is PyPickle_dumps: */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6Pickle_8PROTOCOL_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6Pickle_8PROTOCOL_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_protocol) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Pickle_8PROTOCOL_2__set__(((struct __pyx_obj_6mpi4py_3MPI_Pickle *)__pyx_v_self), ((PyObject *)__pyx_v_protocol)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6Pickle_8PROTOCOL_2__set__(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_protocol) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_protocol); /* "mpi4py/MPI/msgpickle.pxi":84 * return self.ob_PROTO * def __set__(self, protocol): * if protocol is None: # <<<<<<<<<<<<<< * if self.ob_dumps is PyPickle_dumps: * protocol = PyPickle_PROTOCOL */ __pyx_t_1 = (__pyx_v_protocol == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":85 * def __set__(self, protocol): * if protocol is None: * if self.ob_dumps is PyPickle_dumps: # <<<<<<<<<<<<<< * protocol = PyPickle_PROTOCOL * self.ob_PROTO = protocol */ __pyx_t_2 = (__pyx_v_self->ob_dumps == __pyx_v_6mpi4py_3MPI_PyPickle_dumps); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":86 * if protocol is None: * if self.ob_dumps is PyPickle_dumps: * protocol = PyPickle_PROTOCOL # <<<<<<<<<<<<<< * self.ob_PROTO = protocol * */ __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); __Pyx_DECREF_SET(__pyx_v_protocol, __pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); /* "mpi4py/MPI/msgpickle.pxi":85 * def __set__(self, protocol): * if protocol is None: * if self.ob_dumps is PyPickle_dumps: # <<<<<<<<<<<<<< * protocol = PyPickle_PROTOCOL * self.ob_PROTO = protocol */ } /* "mpi4py/MPI/msgpickle.pxi":84 * return self.ob_PROTO * def __set__(self, protocol): * if protocol is None: # <<<<<<<<<<<<<< * if self.ob_dumps is PyPickle_dumps: * protocol = PyPickle_PROTOCOL */ } /* "mpi4py/MPI/msgpickle.pxi":87 * if self.ob_dumps is PyPickle_dumps: * protocol = PyPickle_PROTOCOL * self.ob_PROTO = protocol # <<<<<<<<<<<<<< * * cdef object cdumps(self, object obj): */ __Pyx_INCREF(__pyx_v_protocol); __Pyx_GIVEREF(__pyx_v_protocol); __Pyx_GOTREF(__pyx_v_self->ob_PROTO); __Pyx_DECREF(__pyx_v_self->ob_PROTO); __pyx_v_self->ob_PROTO = __pyx_v_protocol; /* "mpi4py/MPI/msgpickle.pxi":83 * def __get__(self): * return self.ob_PROTO * def __set__(self, protocol): # <<<<<<<<<<<<<< * if protocol is None: * if self.ob_dumps is PyPickle_dumps: */ /* function exit code */ __pyx_r = 0; __Pyx_XDECREF(__pyx_v_protocol); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":89 * self.ob_PROTO = protocol * * cdef object cdumps(self, object obj): # <<<<<<<<<<<<<< * if self.ob_PROTO is not None: * return self.ob_dumps(obj, self.ob_PROTO) */ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_cdumps(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("cdumps", 0); /* "mpi4py/MPI/msgpickle.pxi":90 * * cdef object cdumps(self, object obj): * if self.ob_PROTO is not None: # <<<<<<<<<<<<<< * return self.ob_dumps(obj, self.ob_PROTO) * else: */ __pyx_t_1 = (__pyx_v_self->ob_PROTO != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":91 * cdef object cdumps(self, object obj): * if self.ob_PROTO is not None: * return self.ob_dumps(obj, self.ob_PROTO) # <<<<<<<<<<<<<< * else: * return self.ob_dumps(obj) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->ob_dumps); __pyx_t_4 = __pyx_v_self->ob_dumps; __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_self->ob_PROTO}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 91, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_obj, __pyx_v_self->ob_PROTO}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 91, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_obj); __Pyx_INCREF(__pyx_v_self->ob_PROTO); __Pyx_GIVEREF(__pyx_v_self->ob_PROTO); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_self->ob_PROTO); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":90 * * cdef object cdumps(self, object obj): * if self.ob_PROTO is not None: # <<<<<<<<<<<<<< * return self.ob_dumps(obj, self.ob_PROTO) * else: */ } /* "mpi4py/MPI/msgpickle.pxi":93 * return self.ob_dumps(obj, self.ob_PROTO) * else: * return self.ob_dumps(obj) # <<<<<<<<<<<<<< * * cdef object cloads(self, object buf): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->ob_dumps); __pyx_t_4 = __pyx_v_self->ob_dumps; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_obj); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":89 * self.ob_PROTO = protocol * * cdef object cdumps(self, object obj): # <<<<<<<<<<<<<< * if self.ob_PROTO is not None: * return self.ob_dumps(obj, self.ob_PROTO) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.Pickle.cdumps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":95 * return self.ob_dumps(obj) * * cdef object cloads(self, object buf): # <<<<<<<<<<<<<< * if PY2: * if not PyBytes_CheckExact(buf): */ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_cloads(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_buf) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("cloads", 0); __Pyx_INCREF(__pyx_v_buf); /* "mpi4py/MPI/msgpickle.pxi":96 * * cdef object cloads(self, object buf): * if PY2: # <<<<<<<<<<<<<< * if not PyBytes_CheckExact(buf): * if self.ob_loads is PyPickle_loads: */ if ((PY_MAJOR_VERSION==2)) { /* "mpi4py/MPI/msgpickle.pxi":97 * cdef object cloads(self, object buf): * if PY2: * if not PyBytes_CheckExact(buf): # <<<<<<<<<<<<<< * if self.ob_loads is PyPickle_loads: * buf = PyBytesIO_New(buf) */ __pyx_t_1 = ((!(PyBytes_CheckExact(__pyx_v_buf) != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":98 * if PY2: * if not PyBytes_CheckExact(buf): * if self.ob_loads is PyPickle_loads: # <<<<<<<<<<<<<< * buf = PyBytesIO_New(buf) * return PyPickle_loadf(buf) */ __pyx_t_1 = (__pyx_v_self->ob_loads == __pyx_v_6mpi4py_3MPI_PyPickle_loads); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":99 * if not PyBytes_CheckExact(buf): * if self.ob_loads is PyPickle_loads: * buf = PyBytesIO_New(buf) # <<<<<<<<<<<<<< * return PyPickle_loadf(buf) * return self.ob_loads(buf) */ __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_PyBytesIO_New); __pyx_t_4 = __pyx_v_6mpi4py_3MPI_PyBytesIO_New; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_buf) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_buf); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":100 * if self.ob_loads is PyPickle_loads: * buf = PyBytesIO_New(buf) * return PyPickle_loadf(buf) # <<<<<<<<<<<<<< * return self.ob_loads(buf) * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_PyPickle_loadf); __pyx_t_4 = __pyx_v_6mpi4py_3MPI_PyPickle_loadf; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_buf) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_buf); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":98 * if PY2: * if not PyBytes_CheckExact(buf): * if self.ob_loads is PyPickle_loads: # <<<<<<<<<<<<<< * buf = PyBytesIO_New(buf) * return PyPickle_loadf(buf) */ } /* "mpi4py/MPI/msgpickle.pxi":97 * cdef object cloads(self, object buf): * if PY2: * if not PyBytes_CheckExact(buf): # <<<<<<<<<<<<<< * if self.ob_loads is PyPickle_loads: * buf = PyBytesIO_New(buf) */ } /* "mpi4py/MPI/msgpickle.pxi":96 * * cdef object cloads(self, object buf): * if PY2: # <<<<<<<<<<<<<< * if not PyBytes_CheckExact(buf): * if self.ob_loads is PyPickle_loads: */ } /* "mpi4py/MPI/msgpickle.pxi":101 * buf = PyBytesIO_New(buf) * return PyPickle_loadf(buf) * return self.ob_loads(buf) # <<<<<<<<<<<<<< * * cdef object dump(self, object obj, void **p, int *n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->ob_loads); __pyx_t_4 = __pyx_v_self->ob_loads; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_buf) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_buf); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":95 * return self.ob_dumps(obj) * * cdef object cloads(self, object buf): # <<<<<<<<<<<<<< * if PY2: * if not PyBytes_CheckExact(buf): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Pickle.cloads", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":103 * return self.ob_loads(buf) * * cdef object dump(self, object obj, void **p, int *n): # <<<<<<<<<<<<<< * cdef object buf = self.cdumps(obj) * p[0] = PyBytes_AsString(buf) */ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_dump(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_obj, void **__pyx_v_p, int *__pyx_v_n) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; char *__pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("dump", 0); /* "mpi4py/MPI/msgpickle.pxi":104 * * cdef object dump(self, object obj, void **p, int *n): * cdef object buf = self.cdumps(obj) # <<<<<<<<<<<<<< * p[0] = PyBytes_AsString(buf) * n[0] = downcast(PyBytes_Size(buf)) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_cdumps(__pyx_v_self, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":105 * cdef object dump(self, object obj, void **p, int *n): * cdef object buf = self.cdumps(obj) * p[0] = PyBytes_AsString(buf) # <<<<<<<<<<<<<< * n[0] = downcast(PyBytes_Size(buf)) * return buf */ __pyx_t_2 = PyBytes_AsString(__pyx_v_buf); if (unlikely(__pyx_t_2 == ((char *)NULL))) __PYX_ERR(6, 105, __pyx_L1_error) (__pyx_v_p[0]) = ((void *)__pyx_t_2); /* "mpi4py/MPI/msgpickle.pxi":106 * cdef object buf = self.cdumps(obj) * p[0] = PyBytes_AsString(buf) * n[0] = downcast(PyBytes_Size(buf)) # <<<<<<<<<<<<<< * return buf * */ __pyx_t_3 = PyBytes_Size(__pyx_v_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(6, 106, __pyx_L1_error) __pyx_t_4 = __pyx_f_6mpi4py_3MPI_downcast(__pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(6, 106, __pyx_L1_error) (__pyx_v_n[0]) = __pyx_t_4; /* "mpi4py/MPI/msgpickle.pxi":107 * p[0] = PyBytes_AsString(buf) * n[0] = downcast(PyBytes_Size(buf)) * return buf # <<<<<<<<<<<<<< * * cdef object load(self, void *p, int n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":103 * return self.ob_loads(buf) * * cdef object dump(self, object obj, void **p, int *n): # <<<<<<<<<<<<<< * cdef object buf = self.cdumps(obj) * p[0] = PyBytes_AsString(buf) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Pickle.dump", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":109 * return buf * * cdef object load(self, void *p, int n): # <<<<<<<<<<<<<< * if p == NULL or n == 0: return None * return self.cloads(tomemory(p, n)) */ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_load(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, void *__pyx_v_p, int __pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("load", 0); /* "mpi4py/MPI/msgpickle.pxi":110 * * cdef object load(self, void *p, int n): * if p == NULL or n == 0: return None # <<<<<<<<<<<<<< * return self.cloads(tomemory(p, n)) * */ __pyx_t_2 = ((__pyx_v_p == NULL) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = ((__pyx_v_n == 0) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":111 * cdef object load(self, void *p, int n): * if p == NULL or n == 0: return None * return self.cloads(tomemory(p, n)) # <<<<<<<<<<<<<< * * cdef object dumpv(self, object obj, void **p, int n, int cnt[], int dsp[]): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_tomemory(__pyx_v_p, __pyx_v_n)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_f_6mpi4py_3MPI_6Pickle_cloads(__pyx_v_self, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":109 * return buf * * cdef object load(self, void *p, int n): # <<<<<<<<<<<<<< * if p == NULL or n == 0: return None * return self.cloads(tomemory(p, n)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Pickle.load", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":113 * return self.cloads(tomemory(p, n)) * * cdef object dumpv(self, object obj, void **p, int n, int cnt[], int dsp[]): # <<<<<<<<<<<<<< * cdef Py_ssize_t i=0, m=n * cdef object items */ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_dumpv(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, PyObject *__pyx_v_obj, void **__pyx_v_p, int __pyx_v_n, int *__pyx_v_cnt, int *__pyx_v_dsp) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_m; PyObject *__pyx_v_items = 0; int __pyx_v_c; int __pyx_v_d; PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; char *__pyx_t_8; __Pyx_RefNannySetupContext("dumpv", 0); /* "mpi4py/MPI/msgpickle.pxi":114 * * cdef object dumpv(self, object obj, void **p, int n, int cnt[], int dsp[]): * cdef Py_ssize_t i=0, m=n # <<<<<<<<<<<<<< * cdef object items * if obj is None: items = [None] * m */ __pyx_v_i = 0; __pyx_v_m = __pyx_v_n; /* "mpi4py/MPI/msgpickle.pxi":116 * cdef Py_ssize_t i=0, m=n * cdef object items * if obj is None: items = [None] * m # <<<<<<<<<<<<<< * else: items = list(obj) * m = len(items) */ __pyx_t_1 = (__pyx_v_obj == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = PyList_New(1 * ((__pyx_v_m<0) ? 0:__pyx_v_m)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_m; __pyx_temp++) { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_3, __pyx_temp, Py_None); } } __pyx_v_items = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":117 * cdef object items * if obj is None: items = [None] * m * else: items = list(obj) # <<<<<<<<<<<<<< * m = len(items) * if m != n: raise ValueError( */ /*else*/ { __pyx_t_3 = PySequence_List(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_items = __pyx_t_3; __pyx_t_3 = 0; } __pyx_L3:; /* "mpi4py/MPI/msgpickle.pxi":118 * if obj is None: items = [None] * m * else: items = list(obj) * m = len(items) # <<<<<<<<<<<<<< * if m != n: raise ValueError( * "expecting %d items, got %d" % (n, m)) */ __pyx_t_4 = PyObject_Length(__pyx_v_items); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(6, 118, __pyx_L1_error) __pyx_v_m = __pyx_t_4; /* "mpi4py/MPI/msgpickle.pxi":119 * else: items = list(obj) * m = len(items) * if m != n: raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (n, m)) * cdef int c=0, d=0 */ __pyx_t_2 = ((__pyx_v_m != __pyx_v_n) != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgpickle.pxi":120 * m = len(items) * if m != n: raise ValueError( * "expecting %d items, got %d" % (n, m)) # <<<<<<<<<<<<<< * cdef int c=0, d=0 * for i from 0 <= i < m: */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_m); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_expecting_d_items_got_d, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/msgpickle.pxi":119 * else: items = list(obj) * m = len(items) * if m != n: raise ValueError( # <<<<<<<<<<<<<< * "expecting %d items, got %d" % (n, m)) * cdef int c=0, d=0 */ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(6, 119, __pyx_L1_error) } /* "mpi4py/MPI/msgpickle.pxi":121 * if m != n: raise ValueError( * "expecting %d items, got %d" % (n, m)) * cdef int c=0, d=0 # <<<<<<<<<<<<<< * for i from 0 <= i < m: * items[i] = self.dump(items[i], p, &c) */ __pyx_v_c = 0; __pyx_v_d = 0; /* "mpi4py/MPI/msgpickle.pxi":122 * "expecting %d items, got %d" % (n, m)) * cdef int c=0, d=0 * for i from 0 <= i < m: # <<<<<<<<<<<<<< * items[i] = self.dump(items[i], p, &c) * cnt[i] = c; dsp[i] = d; */ __pyx_t_4 = __pyx_v_m; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { /* "mpi4py/MPI/msgpickle.pxi":123 * cdef int c=0, d=0 * for i from 0 <= i < m: * items[i] = self.dump(items[i], p, &c) # <<<<<<<<<<<<<< * cnt[i] = c; dsp[i] = d; * d = downcast(d + c) */ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_items, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_self, __pyx_t_6, __pyx_v_p, (&__pyx_v_c)); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_items, __pyx_v_i, __pyx_t_5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(6, 123, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgpickle.pxi":124 * for i from 0 <= i < m: * items[i] = self.dump(items[i], p, &c) * cnt[i] = c; dsp[i] = d; # <<<<<<<<<<<<<< * d = downcast(d + c) * cdef object buf = PyBytes_Join(b'', items) */ (__pyx_v_cnt[__pyx_v_i]) = __pyx_v_c; (__pyx_v_dsp[__pyx_v_i]) = __pyx_v_d; /* "mpi4py/MPI/msgpickle.pxi":125 * items[i] = self.dump(items[i], p, &c) * cnt[i] = c; dsp[i] = d; * d = downcast(d + c) # <<<<<<<<<<<<<< * cdef object buf = PyBytes_Join(b'', items) * p[0] = PyBytes_AsString(buf) */ __pyx_t_7 = __pyx_f_6mpi4py_3MPI_downcast((((MPI_Aint)__pyx_v_d) + ((MPI_Aint)__pyx_v_c))); if (unlikely(__pyx_t_7 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(6, 125, __pyx_L1_error) __pyx_v_d = __pyx_t_7; } /* "mpi4py/MPI/msgpickle.pxi":126 * cnt[i] = c; dsp[i] = d; * d = downcast(d + c) * cdef object buf = PyBytes_Join(b'', items) # <<<<<<<<<<<<<< * p[0] = PyBytes_AsString(buf) * return buf */ __pyx_t_5 = _PyBytes_Join(__pyx_kp_b__23, __pyx_v_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_buf = __pyx_t_5; __pyx_t_5 = 0; /* "mpi4py/MPI/msgpickle.pxi":127 * d = downcast(d + c) * cdef object buf = PyBytes_Join(b'', items) * p[0] = PyBytes_AsString(buf) # <<<<<<<<<<<<<< * return buf * */ __pyx_t_8 = PyBytes_AsString(__pyx_v_buf); if (unlikely(__pyx_t_8 == ((char *)NULL))) __PYX_ERR(6, 127, __pyx_L1_error) (__pyx_v_p[0]) = __pyx_t_8; /* "mpi4py/MPI/msgpickle.pxi":128 * cdef object buf = PyBytes_Join(b'', items) * p[0] = PyBytes_AsString(buf) * return buf # <<<<<<<<<<<<<< * * cdef object loadv(self, void *p, int n, int cnt[], int dsp[]): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":113 * return self.cloads(tomemory(p, n)) * * cdef object dumpv(self, object obj, void **p, int n, int cnt[], int dsp[]): # <<<<<<<<<<<<<< * cdef Py_ssize_t i=0, m=n * cdef object items */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.Pickle.dumpv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_items); __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":130 * return buf * * cdef object loadv(self, void *p, int n, int cnt[], int dsp[]): # <<<<<<<<<<<<<< * cdef Py_ssize_t i=0, m=n * cdef object items = [None] * m */ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_loadv(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, void *__pyx_v_p, int __pyx_v_n, int *__pyx_v_cnt, int *__pyx_v_dsp) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_m; PyObject *__pyx_v_items = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; __Pyx_RefNannySetupContext("loadv", 0); /* "mpi4py/MPI/msgpickle.pxi":131 * * cdef object loadv(self, void *p, int n, int cnt[], int dsp[]): * cdef Py_ssize_t i=0, m=n # <<<<<<<<<<<<<< * cdef object items = [None] * m * if p == NULL: return items */ __pyx_v_i = 0; __pyx_v_m = __pyx_v_n; /* "mpi4py/MPI/msgpickle.pxi":132 * cdef object loadv(self, void *p, int n, int cnt[], int dsp[]): * cdef Py_ssize_t i=0, m=n * cdef object items = [None] * m # <<<<<<<<<<<<<< * if p == NULL: return items * for i from 0 <= i < m: */ __pyx_t_1 = PyList_New(1 * ((__pyx_v_m<0) ? 0:__pyx_v_m)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_m; __pyx_temp++) { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None); } } __pyx_v_items = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":133 * cdef Py_ssize_t i=0, m=n * cdef object items = [None] * m * if p == NULL: return items # <<<<<<<<<<<<<< * for i from 0 <= i < m: * items[i] = self.load(p+dsp[i], cnt[i]) */ __pyx_t_2 = ((__pyx_v_p == NULL) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_items); __pyx_r = __pyx_v_items; goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":134 * cdef object items = [None] * m * if p == NULL: return items * for i from 0 <= i < m: # <<<<<<<<<<<<<< * items[i] = self.load(p+dsp[i], cnt[i]) * return items */ __pyx_t_3 = __pyx_v_m; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "mpi4py/MPI/msgpickle.pxi":135 * if p == NULL: return items * for i from 0 <= i < m: * items[i] = self.load(p+dsp[i], cnt[i]) # <<<<<<<<<<<<<< * return items * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_self, (((char *)__pyx_v_p) + (__pyx_v_dsp[__pyx_v_i])), (__pyx_v_cnt[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__Pyx_SetItemInt(__pyx_v_items, __pyx_v_i, __pyx_t_1, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(6, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* "mpi4py/MPI/msgpickle.pxi":136 * for i from 0 <= i < m: * items[i] = self.load(p+dsp[i], cnt[i]) * return items # <<<<<<<<<<<<<< * * cdef object alloc(self, void **p, int n): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_items); __pyx_r = __pyx_v_items; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":130 * return buf * * cdef object loadv(self, void *p, int n, int cnt[], int dsp[]): # <<<<<<<<<<<<<< * cdef Py_ssize_t i=0, m=n * cdef object items = [None] * m */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Pickle.loadv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_items); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":138 * return items * * cdef object alloc(self, void **p, int n): # <<<<<<<<<<<<<< * cdef object buf = PyBytes_FromStringAndSize(NULL, n) * p[0] = PyBytes_AsString(buf) */ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_alloc(CYTHON_UNUSED struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, void **__pyx_v_p, int __pyx_v_n) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; char *__pyx_t_2; __Pyx_RefNannySetupContext("alloc", 0); /* "mpi4py/MPI/msgpickle.pxi":139 * * cdef object alloc(self, void **p, int n): * cdef object buf = PyBytes_FromStringAndSize(NULL, n) # <<<<<<<<<<<<<< * p[0] = PyBytes_AsString(buf) * return buf */ __pyx_t_1 = PyBytes_FromStringAndSize(NULL, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_buf = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":140 * cdef object alloc(self, void **p, int n): * cdef object buf = PyBytes_FromStringAndSize(NULL, n) * p[0] = PyBytes_AsString(buf) # <<<<<<<<<<<<<< * return buf * */ __pyx_t_2 = PyBytes_AsString(__pyx_v_buf); if (unlikely(__pyx_t_2 == ((char *)NULL))) __PYX_ERR(6, 140, __pyx_L1_error) (__pyx_v_p[0]) = __pyx_t_2; /* "mpi4py/MPI/msgpickle.pxi":141 * cdef object buf = PyBytes_FromStringAndSize(NULL, n) * p[0] = PyBytes_AsString(buf) * return buf # <<<<<<<<<<<<<< * * cdef object allocv(self, void **p, int n, int cnt[], int dsp[]): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_buf); __pyx_r = __pyx_v_buf; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":138 * return items * * cdef object alloc(self, void **p, int n): # <<<<<<<<<<<<<< * cdef object buf = PyBytes_FromStringAndSize(NULL, n) * p[0] = PyBytes_AsString(buf) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Pickle.alloc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":143 * return buf * * cdef object allocv(self, void **p, int n, int cnt[], int dsp[]): # <<<<<<<<<<<<<< * cdef int i=0, d=0 * for i from 0 <= i < n: */ static PyObject *__pyx_f_6mpi4py_3MPI_6Pickle_allocv(struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_self, void **__pyx_v_p, int __pyx_v_n, int *__pyx_v_cnt, int *__pyx_v_dsp) { int __pyx_v_i; int __pyx_v_d; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("allocv", 0); /* "mpi4py/MPI/msgpickle.pxi":144 * * cdef object allocv(self, void **p, int n, int cnt[], int dsp[]): * cdef int i=0, d=0 # <<<<<<<<<<<<<< * for i from 0 <= i < n: * dsp[i] = d */ __pyx_v_i = 0; __pyx_v_d = 0; /* "mpi4py/MPI/msgpickle.pxi":145 * cdef object allocv(self, void **p, int n, int cnt[], int dsp[]): * cdef int i=0, d=0 * for i from 0 <= i < n: # <<<<<<<<<<<<<< * dsp[i] = d * d += cnt[i] */ __pyx_t_1 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "mpi4py/MPI/msgpickle.pxi":146 * cdef int i=0, d=0 * for i from 0 <= i < n: * dsp[i] = d # <<<<<<<<<<<<<< * d += cnt[i] * return self.alloc(p, d) */ (__pyx_v_dsp[__pyx_v_i]) = __pyx_v_d; /* "mpi4py/MPI/msgpickle.pxi":147 * for i from 0 <= i < n: * dsp[i] = d * d += cnt[i] # <<<<<<<<<<<<<< * return self.alloc(p, d) * */ __pyx_v_d = (__pyx_v_d + (__pyx_v_cnt[__pyx_v_i])); } /* "mpi4py/MPI/msgpickle.pxi":148 * dsp[i] = d * d += cnt[i] * return self.alloc(p, d) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_self, __pyx_v_p, __pyx_v_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":143 * return buf * * cdef object allocv(self, void **p, int n, int cnt[], int dsp[]): # <<<<<<<<<<<<<< * cdef int i=0, d=0 * for i from 0 <= i < n: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Pickle.allocv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":156 * # ----------------------------------------------------------------------------- * * cdef inline object allocate_count_displ(int n, int **p, int **q): # <<<<<<<<<<<<<< * cdef object mem = allocate(2*n, sizeof(int), p) * q[0] = p[0] + n */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_allocate_count_displ(int __pyx_v_n, int **__pyx_v_p, int **__pyx_v_q) { PyObject *__pyx_v_mem = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("allocate_count_displ", 0); /* "mpi4py/MPI/msgpickle.pxi":157 * * cdef inline object allocate_count_displ(int n, int **p, int **q): * cdef object mem = allocate(2*n, sizeof(int), p) # <<<<<<<<<<<<<< * q[0] = p[0] + n * return mem */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate((2 * __pyx_v_n), (sizeof(int)), __pyx_v_p)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mem = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":158 * cdef inline object allocate_count_displ(int n, int **p, int **q): * cdef object mem = allocate(2*n, sizeof(int), p) * q[0] = p[0] + n # <<<<<<<<<<<<<< * return mem * */ (__pyx_v_q[0]) = ((__pyx_v_p[0]) + __pyx_v_n); /* "mpi4py/MPI/msgpickle.pxi":159 * cdef object mem = allocate(2*n, sizeof(int), p) * q[0] = p[0] + n * return mem # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_mem); __pyx_r = __pyx_v_mem; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":156 * # ----------------------------------------------------------------------------- * * cdef inline object allocate_count_displ(int n, int **p, int **q): # <<<<<<<<<<<<<< * cdef object mem = allocate(2*n, sizeof(int), p) * q[0] = p[0] + n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.allocate_count_displ", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_mem); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":163 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_send(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_send(PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_send", 0); /* "mpi4py/MPI/msgpickle.pxi":165 * cdef object PyMPI_send(object obj, int dest, int tag, * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":167 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":168 * # * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * # */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":169 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef object tmps = None */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":171 * cdef MPI_Datatype stype = MPI_BYTE * # * cdef object tmps = None # <<<<<<<<<<<<<< * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) */ __Pyx_INCREF(Py_None); __pyx_v_tmps = Py_None; /* "mpi4py/MPI/msgpickle.pxi":172 * # * cdef object tmps = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, */ __pyx_t_1 = ((__pyx_v_dest != MPI_PROC_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":173 * cdef object tmps = None * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, * dest, tag, comm) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_tmps, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":172 * # * cdef object tmps = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, */ } /* "mpi4py/MPI/msgpickle.pxi":174 * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm) ) * return None */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":175 * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, * dest, tag, comm) ) # <<<<<<<<<<<<<< * return None * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Send(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 174, __pyx_L5_error) } /* "mpi4py/MPI/msgpickle.pxi":174 * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm) ) * return None */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":176 * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, * dest, tag, comm) ) * return None # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":163 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_send(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_send", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":179 * * * cdef object PyMPI_bsend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_bsend(PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_bsend", 0); /* "mpi4py/MPI/msgpickle.pxi":181 * cdef object PyMPI_bsend(object obj, int dest, int tag, * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":183 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":184 * # * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * # */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":185 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef object tmps = None */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":187 * cdef MPI_Datatype stype = MPI_BYTE * # * cdef object tmps = None # <<<<<<<<<<<<<< * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) */ __Pyx_INCREF(Py_None); __pyx_v_tmps = Py_None; /* "mpi4py/MPI/msgpickle.pxi":188 * # * cdef object tmps = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Bsend(sbuf, scount, stype, */ __pyx_t_1 = ((__pyx_v_dest != MPI_PROC_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":189 * cdef object tmps = None * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bsend(sbuf, scount, stype, * dest, tag, comm) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_tmps, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":188 * # * cdef object tmps = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Bsend(sbuf, scount, stype, */ } /* "mpi4py/MPI/msgpickle.pxi":190 * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Bsend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm) ) * return None */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":191 * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Bsend(sbuf, scount, stype, * dest, tag, comm) ) # <<<<<<<<<<<<<< * return None * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Bsend(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 190, __pyx_L5_error) } /* "mpi4py/MPI/msgpickle.pxi":190 * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Bsend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm) ) * return None */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":192 * with nogil: CHKERR( MPI_Bsend(sbuf, scount, stype, * dest, tag, comm) ) * return None # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":179 * * * cdef object PyMPI_bsend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_bsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":195 * * * cdef object PyMPI_ssend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_ssend(PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_ssend", 0); /* "mpi4py/MPI/msgpickle.pxi":197 * cdef object PyMPI_ssend(object obj, int dest, int tag, * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":199 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":200 * # * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * # */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":201 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef object tmps = None */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":203 * cdef MPI_Datatype stype = MPI_BYTE * # * cdef object tmps = None # <<<<<<<<<<<<<< * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) */ __Pyx_INCREF(Py_None); __pyx_v_tmps = Py_None; /* "mpi4py/MPI/msgpickle.pxi":204 * # * cdef object tmps = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ssend(sbuf, scount, stype, */ __pyx_t_1 = ((__pyx_v_dest != MPI_PROC_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":205 * cdef object tmps = None * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ssend(sbuf, scount, stype, * dest, tag, comm) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_tmps, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":204 * # * cdef object tmps = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ssend(sbuf, scount, stype, */ } /* "mpi4py/MPI/msgpickle.pxi":206 * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ssend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm) ) * return None */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":207 * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ssend(sbuf, scount, stype, * dest, tag, comm) ) # <<<<<<<<<<<<<< * return None * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ssend(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 206, __pyx_L5_error) } /* "mpi4py/MPI/msgpickle.pxi":206 * if dest != MPI_PROC_NULL: * tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ssend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm) ) * return None */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":208 * with nogil: CHKERR( MPI_Ssend(sbuf, scount, stype, * dest, tag, comm) ) * return None # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":195 * * * cdef object PyMPI_ssend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_ssend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":215 * int PyErr_WarnEx(object, char*, int) except -1 * * cdef object PyMPI_recv_obarg(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv_obarg(PyObject *__pyx_v_obj, int __pyx_v_source, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Status *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_rbuf; int __pyx_v_rcount; MPI_Datatype __pyx_v_rtype; MPI_Status __pyx_v_rsts; PyObject *__pyx_v_rmsg = 0; MPI_Aint __pyx_v_rlen; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("PyMPI_recv_obarg", 0); /* "mpi4py/MPI/msgpickle.pxi":217 * cdef object PyMPI_recv_obarg(object obj, int source, int tag, * MPI_Comm comm, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *rbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":219 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":220 * # * cdef void *rbuf = NULL * cdef int rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * cdef MPI_Status rsts */ __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":221 * cdef void *rbuf = NULL * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * cdef MPI_Status rsts * cdef object rmsg = None */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":223 * cdef MPI_Datatype rtype = MPI_BYTE * cdef MPI_Status rsts * cdef object rmsg = None # <<<<<<<<<<<<<< * cdef MPI_Aint rlen = 0 * # */ __Pyx_INCREF(Py_None); __pyx_v_rmsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":224 * cdef MPI_Status rsts * cdef object rmsg = None * cdef MPI_Aint rlen = 0 # <<<<<<<<<<<<<< * # * PyErr_WarnEx(UserWarning, b"the 'buf' argument is deprecated", 1) */ __pyx_v_rlen = 0; /* "mpi4py/MPI/msgpickle.pxi":226 * cdef MPI_Aint rlen = 0 * # * PyErr_WarnEx(UserWarning, b"the 'buf' argument is deprecated", 1) # <<<<<<<<<<<<<< * # * if source != MPI_PROC_NULL: */ __pyx_t_1 = PyErr_WarnEx(__pyx_builtin_UserWarning, ((char *)"the 'buf' argument is deprecated"), 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 226, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":228 * PyErr_WarnEx(UserWarning, b"the 'buf' argument is deprecated", 1) * # * if source != MPI_PROC_NULL: # <<<<<<<<<<<<<< * if is_integral(obj): * rcount = obj */ __pyx_t_2 = ((__pyx_v_source != MPI_PROC_NULL) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":229 * # * if source != MPI_PROC_NULL: * if is_integral(obj): # <<<<<<<<<<<<<< * rcount = obj * rmsg = pickle.alloc(&rbuf, rcount) */ __pyx_t_2 = (__pyx_f_6mpi4py_3MPI_is_integral(__pyx_v_obj) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":230 * if source != MPI_PROC_NULL: * if is_integral(obj): * rcount = obj # <<<<<<<<<<<<<< * rmsg = pickle.alloc(&rbuf, rcount) * else: */ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_obj); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 230, __pyx_L1_error) __pyx_v_rcount = ((int)__pyx_t_1); /* "mpi4py/MPI/msgpickle.pxi":231 * if is_integral(obj): * rcount = obj * rmsg = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * else: * rmsg = getbuffer_w(obj, &rbuf, &rlen) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":229 * # * if source != MPI_PROC_NULL: * if is_integral(obj): # <<<<<<<<<<<<<< * rcount = obj * rmsg = pickle.alloc(&rbuf, rcount) */ goto __pyx_L4; } /* "mpi4py/MPI/msgpickle.pxi":233 * rmsg = pickle.alloc(&rbuf, rcount) * else: * rmsg = getbuffer_w(obj, &rbuf, &rlen) # <<<<<<<<<<<<<< * rcount = clipcount(rlen) * if status == MPI_STATUS_IGNORE: */ /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_obj, (&__pyx_v_rbuf), (&__pyx_v_rlen))); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":234 * else: * rmsg = getbuffer_w(obj, &rbuf, &rlen) * rcount = clipcount(rlen) # <<<<<<<<<<<<<< * if status == MPI_STATUS_IGNORE: * status = &rsts */ __pyx_v_rcount = __pyx_f_6mpi4py_3MPI_clipcount(__pyx_v_rlen); } __pyx_L4:; /* "mpi4py/MPI/msgpickle.pxi":235 * rmsg = getbuffer_w(obj, &rbuf, &rlen) * rcount = clipcount(rlen) * if status == MPI_STATUS_IGNORE: # <<<<<<<<<<<<<< * status = &rsts * rmsg */ __pyx_t_2 = ((__pyx_v_status == MPI_STATUS_IGNORE) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":236 * rcount = clipcount(rlen) * if status == MPI_STATUS_IGNORE: * status = &rsts # <<<<<<<<<<<<<< * rmsg * with nogil: */ __pyx_v_status = (&__pyx_v_rsts); /* "mpi4py/MPI/msgpickle.pxi":235 * rmsg = getbuffer_w(obj, &rbuf, &rlen) * rcount = clipcount(rlen) * if status == MPI_STATUS_IGNORE: # <<<<<<<<<<<<<< * status = &rsts * rmsg */ } /* "mpi4py/MPI/msgpickle.pxi":237 * if status == MPI_STATUS_IGNORE: * status = &rsts * rmsg # <<<<<<<<<<<<<< * with nogil: * CHKERR( MPI_Recv(rbuf, rcount, rtype, */ ((void)__pyx_v_rmsg); /* "mpi4py/MPI/msgpickle.pxi":228 * PyErr_WarnEx(UserWarning, b"the 'buf' argument is deprecated", 1) * # * if source != MPI_PROC_NULL: # <<<<<<<<<<<<<< * if is_integral(obj): * rcount = obj */ } /* "mpi4py/MPI/msgpickle.pxi":238 * status = &rsts * rmsg * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Recv(rbuf, rcount, rtype, * source, tag, comm, status) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":239 * rmsg * with nogil: * CHKERR( MPI_Recv(rbuf, rcount, rtype, # <<<<<<<<<<<<<< * source, tag, comm, status) ) * if source != MPI_PROC_NULL: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Recv(__pyx_v_rbuf, __pyx_v_rcount, __pyx_v_rtype, __pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_status)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 239, __pyx_L7_error) /* "mpi4py/MPI/msgpickle.pxi":241 * CHKERR( MPI_Recv(rbuf, rcount, rtype, * source, tag, comm, status) ) * if source != MPI_PROC_NULL: # <<<<<<<<<<<<<< * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * # */ __pyx_t_2 = ((__pyx_v_source != MPI_PROC_NULL) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":242 * source, tag, comm, status) ) * if source != MPI_PROC_NULL: * CHKERR( MPI_Get_count(status, rtype, &rcount) ) # <<<<<<<<<<<<<< * # * if rcount <= 0: return None */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_count(__pyx_v_status, __pyx_v_rtype, (&__pyx_v_rcount))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 242, __pyx_L7_error) /* "mpi4py/MPI/msgpickle.pxi":241 * CHKERR( MPI_Recv(rbuf, rcount, rtype, * source, tag, comm, status) ) * if source != MPI_PROC_NULL: # <<<<<<<<<<<<<< * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * # */ } } /* "mpi4py/MPI/msgpickle.pxi":238 * status = &rsts * rmsg * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Recv(rbuf, rcount, rtype, * source, tag, comm, status) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L8:; } } /* "mpi4py/MPI/msgpickle.pxi":244 * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * # * if rcount <= 0: return None # <<<<<<<<<<<<<< * return pickle.load(rbuf, rcount) * */ __pyx_t_2 = ((__pyx_v_rcount <= 0) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":245 * # * if rcount <= 0: return None * return pickle.load(rbuf, rcount) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":215 * int PyErr_WarnEx(object, char*, int) except -1 * * cdef object PyMPI_recv_obarg(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_recv_obarg", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":248 * * * cdef object PyMPI_recv_match(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv_match(PyObject *__pyx_v_obj, int __pyx_v_source, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Status *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_rbuf; int __pyx_v_rcount; MPI_Datatype __pyx_v_rtype; MPI_Message __pyx_v_match; MPI_Status __pyx_v_rsts; CYTHON_UNUSED PyObject *__pyx_v_tmpr = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_recv_match", 0); /* "mpi4py/MPI/msgpickle.pxi":250 * cdef object PyMPI_recv_match(object obj, int source, int tag, * MPI_Comm comm, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *rbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":252 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":253 * # * cdef void *rbuf = NULL * cdef int rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * # */ __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":254 * cdef void *rbuf = NULL * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef MPI_Message match = MPI_MESSAGE_NULL */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":256 * cdef MPI_Datatype rtype = MPI_BYTE * # * cdef MPI_Message match = MPI_MESSAGE_NULL # <<<<<<<<<<<<<< * cdef MPI_Status rsts * obj # unused */ __pyx_v_match = MPI_MESSAGE_NULL; /* "mpi4py/MPI/msgpickle.pxi":258 * cdef MPI_Message match = MPI_MESSAGE_NULL * cdef MPI_Status rsts * obj # unused # <<<<<<<<<<<<<< * # * with nogil: */ ((void)__pyx_v_obj); /* "mpi4py/MPI/msgpickle.pxi":260 * obj # unused * # * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Mprobe(source, tag, comm, &match, &rsts) ) * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":261 * # * with nogil: * CHKERR( MPI_Mprobe(source, tag, comm, &match, &rsts) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Mprobe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, (&__pyx_v_match), (&__pyx_v_rsts))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 261, __pyx_L4_error) /* "mpi4py/MPI/msgpickle.pxi":262 * with nogil: * CHKERR( MPI_Mprobe(source, tag, comm, &match, &rsts) ) * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) # <<<<<<<<<<<<<< * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_count((&__pyx_v_rsts), __pyx_v_rtype, (&__pyx_v_rcount))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 262, __pyx_L4_error) } /* "mpi4py/MPI/msgpickle.pxi":260 * obj # unused * # * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Mprobe(source, tag, comm, &match, &rsts) ) * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":263 * CHKERR( MPI_Mprobe(source, tag, comm, &match, &rsts) ) * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * with nogil: * CHKERR( MPI_Mrecv(rbuf, rcount, rtype, &match, status) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmpr = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":264 * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Mrecv(rbuf, rcount, rtype, &match, status) ) * # */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":265 * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: * CHKERR( MPI_Mrecv(rbuf, rcount, rtype, &match, status) ) # <<<<<<<<<<<<<< * # * if rcount <= 0: return None */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Mrecv(__pyx_v_rbuf, __pyx_v_rcount, __pyx_v_rtype, (&__pyx_v_match), __pyx_v_status)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 265, __pyx_L7_error) } /* "mpi4py/MPI/msgpickle.pxi":264 * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Mrecv(rbuf, rcount, rtype, &match, status) ) * # */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L8:; } } /* "mpi4py/MPI/msgpickle.pxi":267 * CHKERR( MPI_Mrecv(rbuf, rcount, rtype, &match, status) ) * # * if rcount <= 0: return None # <<<<<<<<<<<<<< * return pickle.load(rbuf, rcount) * */ __pyx_t_3 = ((__pyx_v_rcount <= 0) != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":268 * # * if rcount <= 0: return None * return pickle.load(rbuf, rcount) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rcount); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":248 * * * cdef object PyMPI_recv_match(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_recv_match", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":271 * * * cdef object PyMPI_recv_probe(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv_probe(PyObject *__pyx_v_obj, int __pyx_v_source, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Status *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_rbuf; int __pyx_v_rcount; MPI_Datatype __pyx_v_rtype; MPI_Status __pyx_v_rsts; CYTHON_UNUSED PyObject *__pyx_v_tmpr = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_recv_probe", 0); /* "mpi4py/MPI/msgpickle.pxi":273 * cdef object PyMPI_recv_probe(object obj, int source, int tag, * MPI_Comm comm, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *rbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":275 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":276 * # * cdef void *rbuf = NULL * cdef int rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * # */ __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":277 * cdef void *rbuf = NULL * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef MPI_Status rsts */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":281 * cdef MPI_Status rsts * cdef object tmpr * obj # unused # <<<<<<<<<<<<<< * # * with PyMPI_Lock(comm, "recv"): */ ((void)__pyx_v_obj); /* "mpi4py/MPI/msgpickle.pxi":283 * obj # unused * # * with PyMPI_Lock(comm, "recv"): # <<<<<<<<<<<<<< * with nogil: * CHKERR( MPI_Probe(source, tag, comm, &rsts) ) */ /*with:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_n_s_recv); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 283, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 283, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":284 * # * with PyMPI_Lock(comm, "recv"): * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Probe(source, tag, comm, &rsts) ) * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":285 * with PyMPI_Lock(comm, "recv"): * with nogil: * CHKERR( MPI_Probe(source, tag, comm, &rsts) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) * source = rsts.MPI_SOURCE; tag = rsts.MPI_TAG */ __pyx_t_9 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Probe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, (&__pyx_v_rsts))); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(6, 285, __pyx_L14_error) /* "mpi4py/MPI/msgpickle.pxi":286 * with nogil: * CHKERR( MPI_Probe(source, tag, comm, &rsts) ) * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) # <<<<<<<<<<<<<< * source = rsts.MPI_SOURCE; tag = rsts.MPI_TAG * tmpr = pickle.alloc(&rbuf, rcount) */ __pyx_t_9 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_count((&__pyx_v_rsts), __pyx_v_rtype, (&__pyx_v_rcount))); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(6, 286, __pyx_L14_error) /* "mpi4py/MPI/msgpickle.pxi":287 * CHKERR( MPI_Probe(source, tag, comm, &rsts) ) * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) * source = rsts.MPI_SOURCE; tag = rsts.MPI_TAG # <<<<<<<<<<<<<< * tmpr = pickle.alloc(&rbuf, rcount) * with nogil: */ __pyx_t_9 = __pyx_v_rsts.MPI_SOURCE; __pyx_v_source = __pyx_t_9; __pyx_t_9 = __pyx_v_rsts.MPI_TAG; __pyx_v_tag = __pyx_t_9; } /* "mpi4py/MPI/msgpickle.pxi":284 * # * with PyMPI_Lock(comm, "recv"): * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Probe(source, tag, comm, &rsts) ) * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L15; } __pyx_L14_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7_error; } __pyx_L15:; } } /* "mpi4py/MPI/msgpickle.pxi":288 * CHKERR( MPI_Get_count(&rsts, rtype, &rcount) ) * source = rsts.MPI_SOURCE; tag = rsts.MPI_TAG * tmpr = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * with nogil: * CHKERR( MPI_Recv(rbuf, rcount, rtype, */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 288, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmpr = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":289 * source = rsts.MPI_SOURCE; tag = rsts.MPI_TAG * tmpr = pickle.alloc(&rbuf, rcount) * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Recv(rbuf, rcount, rtype, * source, tag, comm, status) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":290 * tmpr = pickle.alloc(&rbuf, rcount) * with nogil: * CHKERR( MPI_Recv(rbuf, rcount, rtype, # <<<<<<<<<<<<<< * source, tag, comm, status) ) * # */ __pyx_t_9 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Recv(__pyx_v_rbuf, __pyx_v_rcount, __pyx_v_rtype, __pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_status)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(6, 290, __pyx_L17_error) } /* "mpi4py/MPI/msgpickle.pxi":289 * source = rsts.MPI_SOURCE; tag = rsts.MPI_TAG * tmpr = pickle.alloc(&rbuf, rcount) * with nogil: # <<<<<<<<<<<<<< * CHKERR( MPI_Recv(rbuf, rcount, rtype, * source, tag, comm, status) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L18; } __pyx_L17_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7_error; } __pyx_L18:; } } /* "mpi4py/MPI/msgpickle.pxi":283 * obj # unused * # * with PyMPI_Lock(comm, "recv"): # <<<<<<<<<<<<<< * with nogil: * CHKERR( MPI_Probe(source, tag, comm, &rsts) ) */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_recv_probe", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(6, 283, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 283, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 283, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < 0) __PYX_ERR(6, 283, __pyx_L9_except_error) __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __PYX_ERR(6, 283, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L22; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L22:; } /* "mpi4py/MPI/msgpickle.pxi":293 * source, tag, comm, status) ) * # * if rcount <= 0: return None # <<<<<<<<<<<<<< * return pickle.load(rbuf, rcount) * */ __pyx_t_12 = ((__pyx_v_rcount <= 0) != 0); if (__pyx_t_12) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":294 * # * if rcount <= 0: return None * return pickle.load(rbuf, rcount) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rcount); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":271 * * * cdef object PyMPI_recv_probe(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_recv_probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":297 * * * cdef object PyMPI_recv(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * if obj is not None: */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv(PyObject *__pyx_v_obj, int __pyx_v_source, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Status *__pyx_v_status) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("PyMPI_recv", 0); /* "mpi4py/MPI/msgpickle.pxi":299 * cdef object PyMPI_recv(object obj, int source, int tag, * MPI_Comm comm, MPI_Status *status): * if obj is not None: # <<<<<<<<<<<<<< * return PyMPI_recv_obarg(obj, source, tag, comm, status) * elif options.recv_mprobe: */ __pyx_t_1 = (__pyx_v_obj != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":300 * MPI_Comm comm, MPI_Status *status): * if obj is not None: * return PyMPI_recv_obarg(obj, source, tag, comm, status) # <<<<<<<<<<<<<< * elif options.recv_mprobe: * return PyMPI_recv_match(obj, source, tag, comm, status) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_recv_obarg(__pyx_v_obj, __pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":299 * cdef object PyMPI_recv(object obj, int source, int tag, * MPI_Comm comm, MPI_Status *status): * if obj is not None: # <<<<<<<<<<<<<< * return PyMPI_recv_obarg(obj, source, tag, comm, status) * elif options.recv_mprobe: */ } /* "mpi4py/MPI/msgpickle.pxi":301 * if obj is not None: * return PyMPI_recv_obarg(obj, source, tag, comm, status) * elif options.recv_mprobe: # <<<<<<<<<<<<<< * return PyMPI_recv_match(obj, source, tag, comm, status) * else: */ __pyx_t_2 = (__pyx_v_6mpi4py_3MPI_options.recv_mprobe != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":302 * return PyMPI_recv_obarg(obj, source, tag, comm, status) * elif options.recv_mprobe: * return PyMPI_recv_match(obj, source, tag, comm, status) # <<<<<<<<<<<<<< * else: * return PyMPI_recv_probe(obj, source, tag, comm, status) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_recv_match(__pyx_v_obj, __pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":301 * if obj is not None: * return PyMPI_recv_obarg(obj, source, tag, comm, status) * elif options.recv_mprobe: # <<<<<<<<<<<<<< * return PyMPI_recv_match(obj, source, tag, comm, status) * else: */ } /* "mpi4py/MPI/msgpickle.pxi":304 * return PyMPI_recv_match(obj, source, tag, comm, status) * else: * return PyMPI_recv_probe(obj, source, tag, comm, status) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_recv_probe(__pyx_v_obj, __pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_status); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":297 * * * cdef object PyMPI_recv(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * if obj is not None: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":308 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_isend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_isend(PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Request *__pyx_v_request) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; PyObject *__pyx_v_smsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_isend", 0); /* "mpi4py/MPI/msgpickle.pxi":310 * cdef object PyMPI_isend(object obj, int dest, int tag, * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":312 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":313 * # * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * # */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":314 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef object smsg = None */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":316 * cdef MPI_Datatype stype = MPI_BYTE * # * cdef object smsg = None # <<<<<<<<<<<<<< * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) */ __Pyx_INCREF(Py_None); __pyx_v_smsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":317 * # * cdef object smsg = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Isend(sbuf, scount, stype, */ __pyx_t_1 = ((__pyx_v_dest != MPI_PROC_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":318 * cdef object smsg = None * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Isend(sbuf, scount, stype, * dest, tag, comm, request) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_smsg, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":317 * # * cdef object smsg = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Isend(sbuf, scount, stype, */ } /* "mpi4py/MPI/msgpickle.pxi":319 * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Isend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm, request) ) * return smsg */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":320 * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Isend(sbuf, scount, stype, * dest, tag, comm, request) ) # <<<<<<<<<<<<<< * return smsg * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Isend(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm, __pyx_v_request)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 319, __pyx_L5_error) } /* "mpi4py/MPI/msgpickle.pxi":319 * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Isend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm, request) ) * return smsg */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":321 * with nogil: CHKERR( MPI_Isend(sbuf, scount, stype, * dest, tag, comm, request) ) * return smsg # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_smsg); __pyx_r = __pyx_v_smsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":308 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_isend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_isend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_smsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":324 * * * cdef object PyMPI_ibsend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_ibsend(PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Request *__pyx_v_request) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; PyObject *__pyx_v_smsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_ibsend", 0); /* "mpi4py/MPI/msgpickle.pxi":326 * cdef object PyMPI_ibsend(object obj, int dest, int tag, * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":328 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":329 * # * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * # */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":330 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef object smsg = None */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":332 * cdef MPI_Datatype stype = MPI_BYTE * # * cdef object smsg = None # <<<<<<<<<<<<<< * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) */ __Pyx_INCREF(Py_None); __pyx_v_smsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":333 * # * cdef object smsg = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ibsend(sbuf, scount, stype, */ __pyx_t_1 = ((__pyx_v_dest != MPI_PROC_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":334 * cdef object smsg = None * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ibsend(sbuf, scount, stype, * dest, tag, comm, request) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_smsg, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":333 * # * cdef object smsg = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ibsend(sbuf, scount, stype, */ } /* "mpi4py/MPI/msgpickle.pxi":335 * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ibsend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm, request) ) * return smsg */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":336 * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ibsend(sbuf, scount, stype, * dest, tag, comm, request) ) # <<<<<<<<<<<<<< * return smsg * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ibsend(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm, __pyx_v_request)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 335, __pyx_L5_error) } /* "mpi4py/MPI/msgpickle.pxi":335 * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Ibsend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm, request) ) * return smsg */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":337 * with nogil: CHKERR( MPI_Ibsend(sbuf, scount, stype, * dest, tag, comm, request) ) * return smsg # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_smsg); __pyx_r = __pyx_v_smsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":324 * * * cdef object PyMPI_ibsend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_ibsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_smsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":340 * * * cdef object PyMPI_issend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_issend(PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Request *__pyx_v_request) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; PyObject *__pyx_v_smsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_issend", 0); /* "mpi4py/MPI/msgpickle.pxi":342 * cdef object PyMPI_issend(object obj, int dest, int tag, * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":344 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":345 * # * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * # */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":346 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef object smsg = None */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":348 * cdef MPI_Datatype stype = MPI_BYTE * # * cdef object smsg = None # <<<<<<<<<<<<<< * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) */ __Pyx_INCREF(Py_None); __pyx_v_smsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":349 * # * cdef object smsg = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Issend(sbuf, scount, stype, */ __pyx_t_1 = ((__pyx_v_dest != MPI_PROC_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":350 * cdef object smsg = None * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Issend(sbuf, scount, stype, * dest, tag, comm, request) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_smsg, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":349 * # * cdef object smsg = None * if dest != MPI_PROC_NULL: # <<<<<<<<<<<<<< * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Issend(sbuf, scount, stype, */ } /* "mpi4py/MPI/msgpickle.pxi":351 * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Issend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm, request) ) * return smsg */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":352 * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Issend(sbuf, scount, stype, * dest, tag, comm, request) ) # <<<<<<<<<<<<<< * return smsg * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Issend(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm, __pyx_v_request)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 351, __pyx_L5_error) } /* "mpi4py/MPI/msgpickle.pxi":351 * if dest != MPI_PROC_NULL: * smsg = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Issend(sbuf, scount, stype, # <<<<<<<<<<<<<< * dest, tag, comm, request) ) * return smsg */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":353 * with nogil: CHKERR( MPI_Issend(sbuf, scount, stype, * dest, tag, comm, request) ) * return smsg # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_smsg); __pyx_r = __pyx_v_smsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":340 * * * cdef object PyMPI_issend(object obj, int dest, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_issend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_smsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":356 * * * cdef object PyMPI_irecv(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_irecv(PyObject *__pyx_v_obj, int __pyx_v_source, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Request *__pyx_v_request) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_rbuf; MPI_Aint __pyx_v_rlen; int __pyx_v_rcount; MPI_Datatype __pyx_v_rtype; PyObject *__pyx_v_rmsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("PyMPI_irecv", 0); __Pyx_INCREF(__pyx_v_obj); /* "mpi4py/MPI/msgpickle.pxi":358 * cdef object PyMPI_irecv(object obj, int source, int tag, * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *rbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":360 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint rlen = 0 * cdef int rcount = 0 */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":361 * # * cdef void *rbuf = NULL * cdef MPI_Aint rlen = 0 # <<<<<<<<<<<<<< * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rlen = 0; /* "mpi4py/MPI/msgpickle.pxi":362 * cdef void *rbuf = NULL * cdef MPI_Aint rlen = 0 * cdef int rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * # */ __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":363 * cdef MPI_Aint rlen = 0 * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef object rmsg = None */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":365 * cdef MPI_Datatype rtype = MPI_BYTE * # * cdef object rmsg = None # <<<<<<<<<<<<<< * if source != MPI_PROC_NULL: * if obj is None: */ __Pyx_INCREF(Py_None); __pyx_v_rmsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":366 * # * cdef object rmsg = None * if source != MPI_PROC_NULL: # <<<<<<<<<<<<<< * if obj is None: * rcount = (1<<15) */ __pyx_t_1 = ((__pyx_v_source != MPI_PROC_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":367 * cdef object rmsg = None * if source != MPI_PROC_NULL: * if obj is None: # <<<<<<<<<<<<<< * rcount = (1<<15) * obj = pickle.alloc(&rbuf, rcount) */ __pyx_t_1 = (__pyx_v_obj == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":368 * if source != MPI_PROC_NULL: * if obj is None: * rcount = (1<<15) # <<<<<<<<<<<<<< * obj = pickle.alloc(&rbuf, rcount) * rmsg = getbuffer_r(obj, NULL, NULL) */ __pyx_v_rcount = ((int)0x8000); /* "mpi4py/MPI/msgpickle.pxi":369 * if obj is None: * rcount = (1<<15) * obj = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * rmsg = getbuffer_r(obj, NULL, NULL) * elif is_integral(obj): */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":370 * rcount = (1<<15) * obj = pickle.alloc(&rbuf, rcount) * rmsg = getbuffer_r(obj, NULL, NULL) # <<<<<<<<<<<<<< * elif is_integral(obj): * rcount = obj */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_obj, NULL, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":367 * cdef object rmsg = None * if source != MPI_PROC_NULL: * if obj is None: # <<<<<<<<<<<<<< * rcount = (1<<15) * obj = pickle.alloc(&rbuf, rcount) */ goto __pyx_L4; } /* "mpi4py/MPI/msgpickle.pxi":371 * obj = pickle.alloc(&rbuf, rcount) * rmsg = getbuffer_r(obj, NULL, NULL) * elif is_integral(obj): # <<<<<<<<<<<<<< * rcount = obj * obj = pickle.alloc(&rbuf, rcount) */ __pyx_t_2 = (__pyx_f_6mpi4py_3MPI_is_integral(__pyx_v_obj) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":372 * rmsg = getbuffer_r(obj, NULL, NULL) * elif is_integral(obj): * rcount = obj # <<<<<<<<<<<<<< * obj = pickle.alloc(&rbuf, rcount) * rmsg = getbuffer_r(obj, NULL, NULL) */ __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_obj); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(6, 372, __pyx_L1_error) __pyx_v_rcount = ((int)__pyx_t_4); /* "mpi4py/MPI/msgpickle.pxi":373 * elif is_integral(obj): * rcount = obj * obj = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * rmsg = getbuffer_r(obj, NULL, NULL) * else: */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":374 * rcount = obj * obj = pickle.alloc(&rbuf, rcount) * rmsg = getbuffer_r(obj, NULL, NULL) # <<<<<<<<<<<<<< * else: * rmsg = getbuffer_w(obj, &rbuf, &rlen) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_obj, NULL, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":371 * obj = pickle.alloc(&rbuf, rcount) * rmsg = getbuffer_r(obj, NULL, NULL) * elif is_integral(obj): # <<<<<<<<<<<<<< * rcount = obj * obj = pickle.alloc(&rbuf, rcount) */ goto __pyx_L4; } /* "mpi4py/MPI/msgpickle.pxi":376 * rmsg = getbuffer_r(obj, NULL, NULL) * else: * rmsg = getbuffer_w(obj, &rbuf, &rlen) # <<<<<<<<<<<<<< * rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Irecv(rbuf, rcount, rtype, */ /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_obj, (&__pyx_v_rbuf), (&__pyx_v_rlen))); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":377 * else: * rmsg = getbuffer_w(obj, &rbuf, &rlen) * rcount = clipcount(rlen) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Irecv(rbuf, rcount, rtype, * source, tag, comm, request) ) */ __pyx_v_rcount = __pyx_f_6mpi4py_3MPI_clipcount(__pyx_v_rlen); } __pyx_L4:; /* "mpi4py/MPI/msgpickle.pxi":366 * # * cdef object rmsg = None * if source != MPI_PROC_NULL: # <<<<<<<<<<<<<< * if obj is None: * rcount = (1<<15) */ } /* "mpi4py/MPI/msgpickle.pxi":378 * rmsg = getbuffer_w(obj, &rbuf, &rlen) * rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Irecv(rbuf, rcount, rtype, # <<<<<<<<<<<<<< * source, tag, comm, request) ) * return rmsg */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":379 * rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Irecv(rbuf, rcount, rtype, * source, tag, comm, request) ) # <<<<<<<<<<<<<< * return rmsg * */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Irecv(__pyx_v_rbuf, __pyx_v_rcount, __pyx_v_rtype, __pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_request)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 378, __pyx_L6_error) } /* "mpi4py/MPI/msgpickle.pxi":378 * rmsg = getbuffer_w(obj, &rbuf, &rlen) * rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Irecv(rbuf, rcount, rtype, # <<<<<<<<<<<<<< * source, tag, comm, request) ) * return rmsg */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7; } __pyx_L6_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L7:; } } /* "mpi4py/MPI/msgpickle.pxi":380 * with nogil: CHKERR( MPI_Irecv(rbuf, rcount, rtype, * source, tag, comm, request) ) * return rmsg # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":356 * * * cdef object PyMPI_irecv(object obj, int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Request *request): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_irecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":384 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_sendrecv(object sobj, int dest, int sendtag, # <<<<<<<<<<<<<< * object robj, int source, int recvtag, * MPI_Comm comm, MPI_Status *status): */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_sendrecv(PyObject *__pyx_v_sobj, int __pyx_v_dest, int __pyx_v_sendtag, PyObject *__pyx_v_robj, int __pyx_v_source, int __pyx_v_recvtag, MPI_Comm __pyx_v_comm, MPI_Status *__pyx_v_status) { MPI_Request __pyx_v_request; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PyMPI_sendrecv", 0); __Pyx_INCREF(__pyx_v_sobj); __Pyx_INCREF(__pyx_v_robj); /* "mpi4py/MPI/msgpickle.pxi":387 * object robj, int source, int recvtag, * MPI_Comm comm, MPI_Status *status): * cdef MPI_Request request = MPI_REQUEST_NULL # <<<<<<<<<<<<<< * sobj = PyMPI_isend(sobj, dest, sendtag, comm, &request) * robj = PyMPI_recv (robj, source, recvtag, comm, status) */ __pyx_v_request = MPI_REQUEST_NULL; /* "mpi4py/MPI/msgpickle.pxi":388 * MPI_Comm comm, MPI_Status *status): * cdef MPI_Request request = MPI_REQUEST_NULL * sobj = PyMPI_isend(sobj, dest, sendtag, comm, &request) # <<<<<<<<<<<<<< * robj = PyMPI_recv (robj, source, recvtag, comm, status) * with nogil: CHKERR( MPI_Wait(&request, MPI_STATUS_IGNORE) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_isend(__pyx_v_sobj, __pyx_v_dest, __pyx_v_sendtag, __pyx_v_comm, (&__pyx_v_request)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_sobj, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":389 * cdef MPI_Request request = MPI_REQUEST_NULL * sobj = PyMPI_isend(sobj, dest, sendtag, comm, &request) * robj = PyMPI_recv (robj, source, recvtag, comm, status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Wait(&request, MPI_STATUS_IGNORE) ) * return robj */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_recv(__pyx_v_robj, __pyx_v_source, __pyx_v_recvtag, __pyx_v_comm, __pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_robj, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":390 * sobj = PyMPI_isend(sobj, dest, sendtag, comm, &request) * robj = PyMPI_recv (robj, source, recvtag, comm, status) * with nogil: CHKERR( MPI_Wait(&request, MPI_STATUS_IGNORE) ) # <<<<<<<<<<<<<< * return robj * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Wait((&__pyx_v_request), MPI_STATUS_IGNORE)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 390, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":391 * robj = PyMPI_recv (robj, source, recvtag, comm, status) * with nogil: CHKERR( MPI_Wait(&request, MPI_STATUS_IGNORE) ) * return robj # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_robj); __pyx_r = __pyx_v_robj; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":384 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_sendrecv(object sobj, int dest, int sendtag, # <<<<<<<<<<<<<< * object robj, int source, int recvtag, * MPI_Comm comm, MPI_Status *status): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_sendrecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sobj); __Pyx_XDECREF(__pyx_v_robj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":395 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_load(MPI_Status *status, object ob): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *rbuf = NULL */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_load(MPI_Status *__pyx_v_status, PyObject *__pyx_v_ob) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_rbuf; int __pyx_v_rcount; MPI_Datatype __pyx_v_rtype; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("PyMPI_load", 0); __Pyx_INCREF(__pyx_v_ob); /* "mpi4py/MPI/msgpickle.pxi":396 * * cdef object PyMPI_load(MPI_Status *status, object ob): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * cdef void *rbuf = NULL * cdef int rcount = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":397 * cdef object PyMPI_load(MPI_Status *status, object ob): * cdef Pickle pickle = PyMPI_PICKLE * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":398 * cdef Pickle pickle = PyMPI_PICKLE * cdef void *rbuf = NULL * cdef int rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * if type(ob) is not memory: return None */ __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":399 * cdef void *rbuf = NULL * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * if type(ob) is not memory: return None * CHKERR( MPI_Get_count(status, rtype, &rcount) ) */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":400 * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE * if type(ob) is not memory: return None # <<<<<<<<<<<<<< * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * if rcount <= 0: return None */ __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_ob)) != ((PyObject *)__pyx_ptype_6mpi4py_3MPI_memory)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":401 * cdef MPI_Datatype rtype = MPI_BYTE * if type(ob) is not memory: return None * CHKERR( MPI_Get_count(status, rtype, &rcount) ) # <<<<<<<<<<<<<< * if rcount <= 0: return None * ob = asmemory(ob, &rbuf, NULL) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_count(__pyx_v_status, __pyx_v_rtype, (&__pyx_v_rcount))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(6, 401, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":402 * if type(ob) is not memory: return None * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * if rcount <= 0: return None # <<<<<<<<<<<<<< * ob = asmemory(ob, &rbuf, NULL) * return pickle.load(rbuf, rcount) */ __pyx_t_2 = ((__pyx_v_rcount <= 0) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":403 * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * if rcount <= 0: return None * ob = asmemory(ob, &rbuf, NULL) # <<<<<<<<<<<<<< * return pickle.load(rbuf, rcount) * */ __pyx_t_4 = ((PyObject *)__pyx_f_6mpi4py_3MPI_asmemory(__pyx_v_ob, (&__pyx_v_rbuf), NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_ob, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":404 * if rcount <= 0: return None * ob = asmemory(ob, &rbuf, NULL) * return pickle.load(rbuf, rcount) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rcount); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":395 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_load(MPI_Status *status, object ob): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *rbuf = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_load", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_ob); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":407 * * * cdef object PyMPI_wait(Request request, Status status): # <<<<<<<<<<<<<< * cdef object buf * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_wait(struct PyMPIRequestObject *__pyx_v_request, struct PyMPIStatusObject *__pyx_v_status) { PyObject *__pyx_v_buf = 0; MPI_Status __pyx_v_rsts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("PyMPI_wait", 0); /* "mpi4py/MPI/msgpickle.pxi":411 * # * cdef MPI_Status rsts * with nogil: CHKERR( MPI_Wait(&request.ob_mpi, &rsts) ) # <<<<<<<<<<<<<< * buf = request.ob_buf * if status is not None: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Wait((&__pyx_v_request->ob_mpi), (&__pyx_v_rsts))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 411, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":412 * cdef MPI_Status rsts * with nogil: CHKERR( MPI_Wait(&request.ob_mpi, &rsts) ) * buf = request.ob_buf # <<<<<<<<<<<<<< * if status is not None: * status.ob_mpi = rsts */ __pyx_t_2 = __pyx_v_request->ob_buf; __Pyx_INCREF(__pyx_t_2); __pyx_v_buf = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":413 * with nogil: CHKERR( MPI_Wait(&request.ob_mpi, &rsts) ) * buf = request.ob_buf * if status is not None: # <<<<<<<<<<<<<< * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: */ __pyx_t_3 = (((PyObject *)__pyx_v_status) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/msgpickle.pxi":414 * buf = request.ob_buf * if status is not None: * status.ob_mpi = rsts # <<<<<<<<<<<<<< * if request.ob_mpi == MPI_REQUEST_NULL: * request.ob_buf = None */ __pyx_v_status->ob_mpi = __pyx_v_rsts; /* "mpi4py/MPI/msgpickle.pxi":413 * with nogil: CHKERR( MPI_Wait(&request.ob_mpi, &rsts) ) * buf = request.ob_buf * if status is not None: # <<<<<<<<<<<<<< * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: */ } /* "mpi4py/MPI/msgpickle.pxi":415 * if status is not None: * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * request.ob_buf = None * # */ __pyx_t_4 = ((__pyx_v_request->ob_mpi == MPI_REQUEST_NULL) != 0); if (__pyx_t_4) { /* "mpi4py/MPI/msgpickle.pxi":416 * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: * request.ob_buf = None # <<<<<<<<<<<<<< * # * return PyMPI_load(&rsts, buf) */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = Py_None; /* "mpi4py/MPI/msgpickle.pxi":415 * if status is not None: * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * request.ob_buf = None * # */ } /* "mpi4py/MPI/msgpickle.pxi":418 * request.ob_buf = None * # * return PyMPI_load(&rsts, buf) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_load((&__pyx_v_rsts), __pyx_v_buf); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":407 * * * cdef object PyMPI_wait(Request request, Status status): # <<<<<<<<<<<<<< * cdef object buf * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_wait", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":421 * * * cdef object PyMPI_test(Request request, int *flag, Status status): # <<<<<<<<<<<<<< * cdef object buf = None * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_test(struct PyMPIRequestObject *__pyx_v_request, int *__pyx_v_flag, struct PyMPIStatusObject *__pyx_v_status) { PyObject *__pyx_v_buf = 0; MPI_Status __pyx_v_rsts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("PyMPI_test", 0); /* "mpi4py/MPI/msgpickle.pxi":422 * * cdef object PyMPI_test(Request request, int *flag, Status status): * cdef object buf = None # <<<<<<<<<<<<<< * # * cdef MPI_Status rsts */ __Pyx_INCREF(Py_None); __pyx_v_buf = Py_None; /* "mpi4py/MPI/msgpickle.pxi":425 * # * cdef MPI_Status rsts * with nogil: CHKERR( MPI_Test(&request.ob_mpi, flag, &rsts) ) # <<<<<<<<<<<<<< * if flag[0]: * buf = request.ob_buf */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Test((&__pyx_v_request->ob_mpi), __pyx_v_flag, (&__pyx_v_rsts))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 425, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":426 * cdef MPI_Status rsts * with nogil: CHKERR( MPI_Test(&request.ob_mpi, flag, &rsts) ) * if flag[0]: # <<<<<<<<<<<<<< * buf = request.ob_buf * if status is not None: */ __pyx_t_2 = ((__pyx_v_flag[0]) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":427 * with nogil: CHKERR( MPI_Test(&request.ob_mpi, flag, &rsts) ) * if flag[0]: * buf = request.ob_buf # <<<<<<<<<<<<<< * if status is not None: * status.ob_mpi = rsts */ __pyx_t_3 = __pyx_v_request->ob_buf; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":426 * cdef MPI_Status rsts * with nogil: CHKERR( MPI_Test(&request.ob_mpi, flag, &rsts) ) * if flag[0]: # <<<<<<<<<<<<<< * buf = request.ob_buf * if status is not None: */ } /* "mpi4py/MPI/msgpickle.pxi":428 * if flag[0]: * buf = request.ob_buf * if status is not None: # <<<<<<<<<<<<<< * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: */ __pyx_t_2 = (((PyObject *)__pyx_v_status) != Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/msgpickle.pxi":429 * buf = request.ob_buf * if status is not None: * status.ob_mpi = rsts # <<<<<<<<<<<<<< * if request.ob_mpi == MPI_REQUEST_NULL: * request.ob_buf = None */ __pyx_v_status->ob_mpi = __pyx_v_rsts; /* "mpi4py/MPI/msgpickle.pxi":428 * if flag[0]: * buf = request.ob_buf * if status is not None: # <<<<<<<<<<<<<< * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: */ } /* "mpi4py/MPI/msgpickle.pxi":430 * if status is not None: * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * request.ob_buf = None * # */ __pyx_t_4 = ((__pyx_v_request->ob_mpi == MPI_REQUEST_NULL) != 0); if (__pyx_t_4) { /* "mpi4py/MPI/msgpickle.pxi":431 * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: * request.ob_buf = None # <<<<<<<<<<<<<< * # * if not flag[0]: return None */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = Py_None; /* "mpi4py/MPI/msgpickle.pxi":430 * if status is not None: * status.ob_mpi = rsts * if request.ob_mpi == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * request.ob_buf = None * # */ } /* "mpi4py/MPI/msgpickle.pxi":433 * request.ob_buf = None * # * if not flag[0]: return None # <<<<<<<<<<<<<< * return PyMPI_load(&rsts, buf) * */ __pyx_t_4 = ((!((__pyx_v_flag[0]) != 0)) != 0); if (__pyx_t_4) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":434 * # * if not flag[0]: return None * return PyMPI_load(&rsts, buf) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_load((&__pyx_v_rsts), __pyx_v_buf); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":421 * * * cdef object PyMPI_test(Request request, int *flag, Status status): # <<<<<<<<<<<<<< * cdef object buf = None * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_test", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":437 * * * cdef object PyMPI_waitany(requests, int *index, Status status): # <<<<<<<<<<<<<< * cdef object buf = None * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_waitany(PyObject *__pyx_v_requests, int *__pyx_v_index, struct PyMPIStatusObject *__pyx_v_status) { PyObject *__pyx_v_buf = 0; int __pyx_v_count; MPI_Request *__pyx_v_irequests; MPI_Status __pyx_v_rsts; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; char const *__pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; __Pyx_RefNannySetupContext("PyMPI_waitany", 0); /* "mpi4py/MPI/msgpickle.pxi":438 * * cdef object PyMPI_waitany(requests, int *index, Status status): * cdef object buf = None # <<<<<<<<<<<<<< * # * cdef int count = 0 */ __Pyx_INCREF(Py_None); __pyx_v_buf = Py_None; /* "mpi4py/MPI/msgpickle.pxi":440 * cdef object buf = None * # * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef MPI_Status rsts */ __pyx_v_count = 0; /* "mpi4py/MPI/msgpickle.pxi":441 * # * cdef int count = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef MPI_Status rsts * # */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/msgpickle.pxi":444 * cdef MPI_Status rsts * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) # <<<<<<<<<<<<<< * try: * with nogil: CHKERR( MPI_Waitany(count, irequests, index, &rsts) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, Py_None, (&__pyx_v_count), (&__pyx_v_irequests), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":445 * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Waitany(count, irequests, index, &rsts) ) * if index[0] != MPI_UNDEFINED: */ /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":446 * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: * with nogil: CHKERR( MPI_Waitany(count, irequests, index, &rsts) ) # <<<<<<<<<<<<<< * if index[0] != MPI_UNDEFINED: * buf = (requests[index[0]]).ob_buf */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Waitany(__pyx_v_count, __pyx_v_irequests, __pyx_v_index, (&__pyx_v_rsts))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 446, __pyx_L7_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } /* "mpi4py/MPI/msgpickle.pxi":447 * try: * with nogil: CHKERR( MPI_Waitany(count, irequests, index, &rsts) ) * if index[0] != MPI_UNDEFINED: # <<<<<<<<<<<<<< * buf = (requests[index[0]]).ob_buf * if status is not None: */ __pyx_t_3 = (((__pyx_v_index[0]) != MPI_UNDEFINED) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":448 * with nogil: CHKERR( MPI_Waitany(count, irequests, index, &rsts) ) * if index[0] != MPI_UNDEFINED: * buf = (requests[index[0]]).ob_buf # <<<<<<<<<<<<<< * if status is not None: * status.ob_mpi = rsts */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_requests, (__pyx_v_index[0]), int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 448, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = ((struct PyMPIRequestObject *)__pyx_t_1)->ob_buf; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":447 * try: * with nogil: CHKERR( MPI_Waitany(count, irequests, index, &rsts) ) * if index[0] != MPI_UNDEFINED: # <<<<<<<<<<<<<< * buf = (requests[index[0]]).ob_buf * if status is not None: */ } /* "mpi4py/MPI/msgpickle.pxi":449 * if index[0] != MPI_UNDEFINED: * buf = (requests[index[0]]).ob_buf * if status is not None: # <<<<<<<<<<<<<< * status.ob_mpi = rsts * finally: */ __pyx_t_3 = (((PyObject *)__pyx_v_status) != Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { /* "mpi4py/MPI/msgpickle.pxi":450 * buf = (requests[index[0]]).ob_buf * if status is not None: * status.ob_mpi = rsts # <<<<<<<<<<<<<< * finally: * release_rs(requests, None, count, irequests, NULL) */ __pyx_v_status->ob_mpi = __pyx_v_rsts; /* "mpi4py/MPI/msgpickle.pxi":449 * if index[0] != MPI_UNDEFINED: * buf = (requests[index[0]]).ob_buf * if status is not None: # <<<<<<<<<<<<<< * status.ob_mpi = rsts * finally: */ } } /* "mpi4py/MPI/msgpickle.pxi":452 * status.ob_mpi = rsts * finally: * release_rs(requests, None, count, irequests, NULL) # <<<<<<<<<<<<<< * # * if index[0] == MPI_UNDEFINED: return None */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 452, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __pyx_t_2 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; { __pyx_t_14 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(6, 452, __pyx_L12_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; goto __pyx_L1_error; __pyx_L12_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/msgpickle.pxi":454 * release_rs(requests, None, count, irequests, NULL) * # * if index[0] == MPI_UNDEFINED: return None # <<<<<<<<<<<<<< * return PyMPI_load(&rsts, buf) * */ __pyx_t_5 = (((__pyx_v_index[0]) == MPI_UNDEFINED) != 0); if (__pyx_t_5) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":455 * # * if index[0] == MPI_UNDEFINED: return None * return PyMPI_load(&rsts, buf) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_load((&__pyx_v_rsts), __pyx_v_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":437 * * * cdef object PyMPI_waitany(requests, int *index, Status status): # <<<<<<<<<<<<<< * cdef object buf = None * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_waitany", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":458 * * * cdef object PyMPI_testany(requests, int *index, int *flag, Status status): # <<<<<<<<<<<<<< * cdef object buf = None * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_testany(PyObject *__pyx_v_requests, int *__pyx_v_index, int *__pyx_v_flag, struct PyMPIStatusObject *__pyx_v_status) { PyObject *__pyx_v_buf = 0; int __pyx_v_count; MPI_Request *__pyx_v_irequests; MPI_Status __pyx_v_rsts; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; char const *__pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; __Pyx_RefNannySetupContext("PyMPI_testany", 0); /* "mpi4py/MPI/msgpickle.pxi":459 * * cdef object PyMPI_testany(requests, int *index, int *flag, Status status): * cdef object buf = None # <<<<<<<<<<<<<< * # * cdef int count = 0 */ __Pyx_INCREF(Py_None); __pyx_v_buf = Py_None; /* "mpi4py/MPI/msgpickle.pxi":461 * cdef object buf = None * # * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef MPI_Status rsts */ __pyx_v_count = 0; /* "mpi4py/MPI/msgpickle.pxi":462 * # * cdef int count = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef MPI_Status rsts * # */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/msgpickle.pxi":465 * cdef MPI_Status rsts * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) # <<<<<<<<<<<<<< * try: * with nogil: CHKERR( MPI_Testany(count, irequests, index, flag, &rsts) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, Py_None, (&__pyx_v_count), (&__pyx_v_irequests), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":466 * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Testany(count, irequests, index, flag, &rsts) ) * if index[0] != MPI_UNDEFINED: */ /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":467 * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: * with nogil: CHKERR( MPI_Testany(count, irequests, index, flag, &rsts) ) # <<<<<<<<<<<<<< * if index[0] != MPI_UNDEFINED: * buf = (requests[index[0]]).ob_buf */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Testany(__pyx_v_count, __pyx_v_irequests, __pyx_v_index, __pyx_v_flag, (&__pyx_v_rsts))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 467, __pyx_L7_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } /* "mpi4py/MPI/msgpickle.pxi":468 * try: * with nogil: CHKERR( MPI_Testany(count, irequests, index, flag, &rsts) ) * if index[0] != MPI_UNDEFINED: # <<<<<<<<<<<<<< * buf = (requests[index[0]]).ob_buf * if status is not None: */ __pyx_t_3 = (((__pyx_v_index[0]) != MPI_UNDEFINED) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":469 * with nogil: CHKERR( MPI_Testany(count, irequests, index, flag, &rsts) ) * if index[0] != MPI_UNDEFINED: * buf = (requests[index[0]]).ob_buf # <<<<<<<<<<<<<< * if status is not None: * status.ob_mpi = rsts */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_requests, (__pyx_v_index[0]), int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 469, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = ((struct PyMPIRequestObject *)__pyx_t_1)->ob_buf; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_buf, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":468 * try: * with nogil: CHKERR( MPI_Testany(count, irequests, index, flag, &rsts) ) * if index[0] != MPI_UNDEFINED: # <<<<<<<<<<<<<< * buf = (requests[index[0]]).ob_buf * if status is not None: */ } /* "mpi4py/MPI/msgpickle.pxi":470 * if index[0] != MPI_UNDEFINED: * buf = (requests[index[0]]).ob_buf * if status is not None: # <<<<<<<<<<<<<< * status.ob_mpi = rsts * finally: */ __pyx_t_3 = (((PyObject *)__pyx_v_status) != Py_None); __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { /* "mpi4py/MPI/msgpickle.pxi":471 * buf = (requests[index[0]]).ob_buf * if status is not None: * status.ob_mpi = rsts # <<<<<<<<<<<<<< * finally: * release_rs(requests, None, count, irequests, NULL) */ __pyx_v_status->ob_mpi = __pyx_v_rsts; /* "mpi4py/MPI/msgpickle.pxi":470 * if index[0] != MPI_UNDEFINED: * buf = (requests[index[0]]).ob_buf * if status is not None: # <<<<<<<<<<<<<< * status.ob_mpi = rsts * finally: */ } } /* "mpi4py/MPI/msgpickle.pxi":473 * status.ob_mpi = rsts * finally: * release_rs(requests, None, count, irequests, NULL) # <<<<<<<<<<<<<< * # * if index[0] == MPI_UNDEFINED: return None */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 473, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __pyx_t_2 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; { __pyx_t_14 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(6, 473, __pyx_L12_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; goto __pyx_L1_error; __pyx_L12_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/msgpickle.pxi":475 * release_rs(requests, None, count, irequests, NULL) * # * if index[0] == MPI_UNDEFINED: return None # <<<<<<<<<<<<<< * if not flag[0]: return None * return PyMPI_load(&rsts, buf) */ __pyx_t_5 = (((__pyx_v_index[0]) == MPI_UNDEFINED) != 0); if (__pyx_t_5) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":476 * # * if index[0] == MPI_UNDEFINED: return None * if not flag[0]: return None # <<<<<<<<<<<<<< * return PyMPI_load(&rsts, buf) * */ __pyx_t_5 = ((!((__pyx_v_flag[0]) != 0)) != 0); if (__pyx_t_5) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":477 * if index[0] == MPI_UNDEFINED: return None * if not flag[0]: return None * return PyMPI_load(&rsts, buf) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_load((&__pyx_v_rsts), __pyx_v_buf); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":458 * * * cdef object PyMPI_testany(requests, int *index, int *flag, Status status): # <<<<<<<<<<<<<< * cdef object buf = None * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_testany", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_buf); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":480 * * * cdef object PyMPI_waitall(requests, statuses): # <<<<<<<<<<<<<< * cdef object bufs = None * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_waitall(PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses) { PyObject *__pyx_v_bufs = 0; Py_ssize_t __pyx_v_i; int __pyx_v_count; MPI_Request *__pyx_v_irequests; MPI_Status *__pyx_v_istatuses; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; char const *__pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("PyMPI_waitall", 0); /* "mpi4py/MPI/msgpickle.pxi":481 * * cdef object PyMPI_waitall(requests, statuses): * cdef object bufs = None # <<<<<<<<<<<<<< * # * cdef Py_ssize_t i = 0 */ __Pyx_INCREF(Py_None); __pyx_v_bufs = Py_None; /* "mpi4py/MPI/msgpickle.pxi":483 * cdef object bufs = None * # * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * cdef int count = 0 * cdef MPI_Request *irequests = NULL */ __pyx_v_i = 0; /* "mpi4py/MPI/msgpickle.pxi":484 * # * cdef Py_ssize_t i = 0 * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE */ __pyx_v_count = 0; /* "mpi4py/MPI/msgpickle.pxi":485 * cdef Py_ssize_t i = 0 * cdef int count = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/msgpickle.pxi":486 * cdef int count = 0 * cdef MPI_Request *irequests = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # <<<<<<<<<<<<<< * # * cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) */ __pyx_v_istatuses = MPI_STATUSES_IGNORE; /* "mpi4py/MPI/msgpickle.pxi":488 * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # * cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) # <<<<<<<<<<<<<< * try: * with nogil: CHKERR( MPI_Waitall(count, irequests, istatuses) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, Py_True, (&__pyx_v_count), (&__pyx_v_irequests), (&__pyx_v_istatuses)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":489 * # * cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Waitall(count, irequests, istatuses) ) * bufs = [(requests[i]).ob_buf for i from 0 <= i < count] */ /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":490 * cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) * try: * with nogil: CHKERR( MPI_Waitall(count, irequests, istatuses) ) # <<<<<<<<<<<<<< * bufs = [(requests[i]).ob_buf for i from 0 <= i < count] * finally: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Waitall(__pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 490, __pyx_L7_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } /* "mpi4py/MPI/msgpickle.pxi":491 * try: * with nogil: CHKERR( MPI_Waitall(count, irequests, istatuses) ) * bufs = [(requests[i]).ob_buf for i from 0 <= i < count] # <<<<<<<<<<<<<< * finally: * release_rs(requests, statuses, count, irequests, istatuses) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 491, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_v_count; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_requests, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 491, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)((struct PyMPIRequestObject *)__pyx_t_3)->ob_buf))) __PYX_ERR(6, 491, __pyx_L4_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF_SET(__pyx_v_bufs, __pyx_t_1); __pyx_t_1 = 0; } /* "mpi4py/MPI/msgpickle.pxi":493 * bufs = [(requests[i]).ob_buf for i from 0 <= i < count] * finally: * release_rs(requests, statuses, count, irequests, istatuses) # <<<<<<<<<<<<<< * # * return [PyMPI_load(&istatuses[i], bufs[i]) for i from 0 <= i < count] */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 493, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __pyx_t_2 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename; { __pyx_t_12 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(6, 493, __pyx_L12_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5; goto __pyx_L1_error; __pyx_L12_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/msgpickle.pxi":495 * release_rs(requests, statuses, count, irequests, istatuses) * # * return [PyMPI_load(&istatuses[i], bufs[i]) for i from 0 <= i < count] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_count; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_bufs, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __pyx_f_6mpi4py_3MPI_PyMPI_load((&(__pyx_v_istatuses[__pyx_v_i])), __pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_13))) __PYX_ERR(6, 495, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":480 * * * cdef object PyMPI_waitall(requests, statuses): # <<<<<<<<<<<<<< * cdef object bufs = None * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_waitall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_bufs); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":498 * * * cdef object PyMPI_testall(requests, int *flag, statuses): # <<<<<<<<<<<<<< * cdef object bufs = None * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_testall(PyObject *__pyx_v_requests, int *__pyx_v_flag, PyObject *__pyx_v_statuses) { PyObject *__pyx_v_bufs = 0; Py_ssize_t __pyx_v_i; int __pyx_v_count; MPI_Request *__pyx_v_irequests; MPI_Status *__pyx_v_istatuses; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; char const *__pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("PyMPI_testall", 0); /* "mpi4py/MPI/msgpickle.pxi":499 * * cdef object PyMPI_testall(requests, int *flag, statuses): * cdef object bufs = None # <<<<<<<<<<<<<< * # * cdef Py_ssize_t i = 0 */ __Pyx_INCREF(Py_None); __pyx_v_bufs = Py_None; /* "mpi4py/MPI/msgpickle.pxi":501 * cdef object bufs = None * # * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * cdef int count = 0 * cdef MPI_Request *irequests = NULL */ __pyx_v_i = 0; /* "mpi4py/MPI/msgpickle.pxi":502 * # * cdef Py_ssize_t i = 0 * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE */ __pyx_v_count = 0; /* "mpi4py/MPI/msgpickle.pxi":503 * cdef Py_ssize_t i = 0 * cdef int count = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/msgpickle.pxi":504 * cdef int count = 0 * cdef MPI_Request *irequests = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # <<<<<<<<<<<<<< * # * cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) */ __pyx_v_istatuses = MPI_STATUSES_IGNORE; /* "mpi4py/MPI/msgpickle.pxi":506 * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # * cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) # <<<<<<<<<<<<<< * try: * with nogil: CHKERR( MPI_Testall(count, irequests, flag, istatuses) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, Py_True, (&__pyx_v_count), (&__pyx_v_irequests), (&__pyx_v_istatuses)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":507 * # * cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Testall(count, irequests, flag, istatuses) ) * if flag[0]: */ /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":508 * cdef tmp = acquire_rs(requests, True, &count, &irequests, &istatuses) * try: * with nogil: CHKERR( MPI_Testall(count, irequests, flag, istatuses) ) # <<<<<<<<<<<<<< * if flag[0]: * bufs = [(requests[i]).ob_buf for i from 0 <= i < count] */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Testall(__pyx_v_count, __pyx_v_irequests, __pyx_v_flag, __pyx_v_istatuses)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 508, __pyx_L7_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } /* "mpi4py/MPI/msgpickle.pxi":509 * try: * with nogil: CHKERR( MPI_Testall(count, irequests, flag, istatuses) ) * if flag[0]: # <<<<<<<<<<<<<< * bufs = [(requests[i]).ob_buf for i from 0 <= i < count] * finally: */ __pyx_t_3 = ((__pyx_v_flag[0]) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":510 * with nogil: CHKERR( MPI_Testall(count, irequests, flag, istatuses) ) * if flag[0]: * bufs = [(requests[i]).ob_buf for i from 0 <= i < count] # <<<<<<<<<<<<<< * finally: * release_rs(requests, statuses, count, irequests, istatuses) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 510, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_v_count; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_requests, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 510, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)((struct PyMPIRequestObject *)__pyx_t_4)->ob_buf))) __PYX_ERR(6, 510, __pyx_L4_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF_SET(__pyx_v_bufs, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":509 * try: * with nogil: CHKERR( MPI_Testall(count, irequests, flag, istatuses) ) * if flag[0]: # <<<<<<<<<<<<<< * bufs = [(requests[i]).ob_buf for i from 0 <= i < count] * finally: */ } } /* "mpi4py/MPI/msgpickle.pxi":512 * bufs = [(requests[i]).ob_buf for i from 0 <= i < count] * finally: * release_rs(requests, statuses, count, irequests, istatuses) # <<<<<<<<<<<<<< * # * if not flag[0]: return None */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 512, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __pyx_t_2 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename; { __pyx_t_13 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(6, 512, __pyx_L13_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6; goto __pyx_L1_error; __pyx_L13_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/msgpickle.pxi":514 * release_rs(requests, statuses, count, irequests, istatuses) * # * if not flag[0]: return None # <<<<<<<<<<<<<< * return [PyMPI_load(&istatuses[i], bufs[i]) for i from 0 <= i < count] * */ __pyx_t_3 = ((!((__pyx_v_flag[0]) != 0)) != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":515 * # * if not flag[0]: return None * return [PyMPI_load(&istatuses[i], bufs[i]) for i from 0 <= i < count] # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_v_count; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_bufs, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = __pyx_f_6mpi4py_3MPI_PyMPI_load((&(__pyx_v_istatuses[__pyx_v_i])), __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(6, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_14))) __PYX_ERR(6, 515, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":498 * * * cdef object PyMPI_testall(requests, int *flag, statuses): # <<<<<<<<<<<<<< * cdef object bufs = None * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_testall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_bufs); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":519 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_probe(int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * with nogil: CHKERR( MPI_Probe(source, tag, comm, status) ) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_probe(int __pyx_v_source, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Status *__pyx_v_status) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("PyMPI_probe", 0); /* "mpi4py/MPI/msgpickle.pxi":521 * cdef object PyMPI_probe(int source, int tag, * MPI_Comm comm, MPI_Status *status): * with nogil: CHKERR( MPI_Probe(source, tag, comm, status) ) # <<<<<<<<<<<<<< * return True * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Probe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_status)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 521, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":522 * MPI_Comm comm, MPI_Status *status): * with nogil: CHKERR( MPI_Probe(source, tag, comm, status) ) * return True # <<<<<<<<<<<<<< * * cdef object PyMPI_iprobe(int source, int tag, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":519 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_probe(int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * with nogil: CHKERR( MPI_Probe(source, tag, comm, status) ) */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPI_probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":524 * return True * * cdef object PyMPI_iprobe(int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * cdef int flag = 0 */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_iprobe(int __pyx_v_source, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Status *__pyx_v_status) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPI_iprobe", 0); /* "mpi4py/MPI/msgpickle.pxi":526 * cdef object PyMPI_iprobe(int source, int tag, * MPI_Comm comm, MPI_Status *status): * cdef int flag = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Iprobe(source, tag, comm, &flag, status) ) * return flag */ __pyx_v_flag = 0; /* "mpi4py/MPI/msgpickle.pxi":527 * MPI_Comm comm, MPI_Status *status): * cdef int flag = 0 * with nogil: CHKERR( MPI_Iprobe(source, tag, comm, &flag, status) ) # <<<<<<<<<<<<<< * return flag * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Iprobe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, (&__pyx_v_flag), __pyx_v_status)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 527, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":528 * cdef int flag = 0 * with nogil: CHKERR( MPI_Iprobe(source, tag, comm, &flag, status) ) * return flag # <<<<<<<<<<<<<< * * cdef object PyMPI_mprobe(int source, int tag, MPI_Comm comm, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":524 * return True * * cdef object PyMPI_iprobe(int source, int tag, # <<<<<<<<<<<<<< * MPI_Comm comm, MPI_Status *status): * cdef int flag = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_iprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":530 * return flag * * cdef object PyMPI_mprobe(int source, int tag, MPI_Comm comm, # <<<<<<<<<<<<<< * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_mprobe(int __pyx_v_source, int __pyx_v_tag, MPI_Comm __pyx_v_comm, MPI_Message *__pyx_v_message, MPI_Status *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_rbuf; int __pyx_v_rcount; MPI_Datatype __pyx_v_rtype; MPI_Status __pyx_v_rsts; PyObject *__pyx_v_rmsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("PyMPI_mprobe", 0); /* "mpi4py/MPI/msgpickle.pxi":532 * cdef object PyMPI_mprobe(int source, int tag, MPI_Comm comm, * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * cdef void* rbuf = NULL * cdef int rcount = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":533 * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE * cdef void* rbuf = NULL # <<<<<<<<<<<<<< * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":534 * cdef Pickle pickle = PyMPI_PICKLE * cdef void* rbuf = NULL * cdef int rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * cdef MPI_Status rsts */ __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":535 * cdef void* rbuf = NULL * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * cdef MPI_Status rsts * if (status == MPI_STATUS_IGNORE): status = &rsts */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":537 * cdef MPI_Datatype rtype = MPI_BYTE * cdef MPI_Status rsts * if (status == MPI_STATUS_IGNORE): status = &rsts # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Mprobe(source, tag, comm, message, status) ) * if message[0] == MPI_MESSAGE_NO_PROC: return None */ __pyx_t_1 = ((__pyx_v_status == MPI_STATUS_IGNORE) != 0); if (__pyx_t_1) { __pyx_v_status = (&__pyx_v_rsts); } /* "mpi4py/MPI/msgpickle.pxi":538 * cdef MPI_Status rsts * if (status == MPI_STATUS_IGNORE): status = &rsts * with nogil: CHKERR( MPI_Mprobe(source, tag, comm, message, status) ) # <<<<<<<<<<<<<< * if message[0] == MPI_MESSAGE_NO_PROC: return None * CHKERR( MPI_Get_count(status, rtype, &rcount) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Mprobe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_message, __pyx_v_status)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 538, __pyx_L5_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":539 * if (status == MPI_STATUS_IGNORE): status = &rsts * with nogil: CHKERR( MPI_Mprobe(source, tag, comm, message, status) ) * if message[0] == MPI_MESSAGE_NO_PROC: return None # <<<<<<<<<<<<<< * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * cdef object rmsg = pickle.alloc(&rbuf, rcount) */ __pyx_t_1 = (((__pyx_v_message[0]) == MPI_MESSAGE_NO_PROC) != 0); if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":540 * with nogil: CHKERR( MPI_Mprobe(source, tag, comm, message, status) ) * if message[0] == MPI_MESSAGE_NO_PROC: return None * CHKERR( MPI_Get_count(status, rtype, &rcount) ) # <<<<<<<<<<<<<< * cdef object rmsg = pickle.alloc(&rbuf, rcount) * return rmsg */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_count(__pyx_v_status, __pyx_v_rtype, (&__pyx_v_rcount))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 540, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":541 * if message[0] == MPI_MESSAGE_NO_PROC: return None * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * cdef object rmsg = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * return rmsg * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rmsg = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":542 * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * cdef object rmsg = pickle.alloc(&rbuf, rcount) * return rmsg # <<<<<<<<<<<<<< * * cdef object PyMPI_improbe(int source, int tag, MPI_Comm comm, int *flag, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":530 * return flag * * cdef object PyMPI_mprobe(int source, int tag, MPI_Comm comm, # <<<<<<<<<<<<<< * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_mprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":544 * return rmsg * * cdef object PyMPI_improbe(int source, int tag, MPI_Comm comm, int *flag, # <<<<<<<<<<<<<< * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_improbe(int __pyx_v_source, int __pyx_v_tag, MPI_Comm __pyx_v_comm, int *__pyx_v_flag, MPI_Message *__pyx_v_message, MPI_Status *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_rbuf; int __pyx_v_rcount; MPI_Datatype __pyx_v_rtype; MPI_Status __pyx_v_rsts; PyObject *__pyx_v_rmsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("PyMPI_improbe", 0); /* "mpi4py/MPI/msgpickle.pxi":546 * cdef object PyMPI_improbe(int source, int tag, MPI_Comm comm, int *flag, * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * cdef void* rbuf = NULL * cdef int rcount = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":547 * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE * cdef void* rbuf = NULL # <<<<<<<<<<<<<< * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":548 * cdef Pickle pickle = PyMPI_PICKLE * cdef void* rbuf = NULL * cdef int rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * cdef MPI_Status rsts */ __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":549 * cdef void* rbuf = NULL * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * cdef MPI_Status rsts * if (status == MPI_STATUS_IGNORE): status = &rsts */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":551 * cdef MPI_Datatype rtype = MPI_BYTE * cdef MPI_Status rsts * if (status == MPI_STATUS_IGNORE): status = &rsts # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Improbe(source, tag, comm, flag, message, status) ) * if flag[0] == 0 or message[0] == MPI_MESSAGE_NO_PROC: return None */ __pyx_t_1 = ((__pyx_v_status == MPI_STATUS_IGNORE) != 0); if (__pyx_t_1) { __pyx_v_status = (&__pyx_v_rsts); } /* "mpi4py/MPI/msgpickle.pxi":552 * cdef MPI_Status rsts * if (status == MPI_STATUS_IGNORE): status = &rsts * with nogil: CHKERR( MPI_Improbe(source, tag, comm, flag, message, status) ) # <<<<<<<<<<<<<< * if flag[0] == 0 or message[0] == MPI_MESSAGE_NO_PROC: return None * CHKERR( MPI_Get_count(status, rtype, &rcount) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Improbe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_flag, __pyx_v_message, __pyx_v_status)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 552, __pyx_L5_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":553 * if (status == MPI_STATUS_IGNORE): status = &rsts * with nogil: CHKERR( MPI_Improbe(source, tag, comm, flag, message, status) ) * if flag[0] == 0 or message[0] == MPI_MESSAGE_NO_PROC: return None # <<<<<<<<<<<<<< * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * cdef object rmsg = pickle.alloc(&rbuf, rcount) */ __pyx_t_3 = (((__pyx_v_flag[0]) == 0) != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L8_bool_binop_done; } __pyx_t_3 = (((__pyx_v_message[0]) == MPI_MESSAGE_NO_PROC) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L8_bool_binop_done:; if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":554 * with nogil: CHKERR( MPI_Improbe(source, tag, comm, flag, message, status) ) * if flag[0] == 0 or message[0] == MPI_MESSAGE_NO_PROC: return None * CHKERR( MPI_Get_count(status, rtype, &rcount) ) # <<<<<<<<<<<<<< * cdef object rmsg = pickle.alloc(&rbuf, rcount) * return rmsg */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_count(__pyx_v_status, __pyx_v_rtype, (&__pyx_v_rcount))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 554, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":555 * if flag[0] == 0 or message[0] == MPI_MESSAGE_NO_PROC: return None * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * cdef object rmsg = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * return rmsg * */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_rmsg = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":556 * CHKERR( MPI_Get_count(status, rtype, &rcount) ) * cdef object rmsg = pickle.alloc(&rbuf, rcount) * return rmsg # <<<<<<<<<<<<<< * * cdef object PyMPI_mrecv(object rmsg, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":544 * return rmsg * * cdef object PyMPI_improbe(int source, int tag, MPI_Comm comm, int *flag, # <<<<<<<<<<<<<< * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_improbe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":558 * return rmsg * * cdef object PyMPI_mrecv(object rmsg, # <<<<<<<<<<<<<< * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_mrecv(PyObject *__pyx_v_rmsg, MPI_Message *__pyx_v_message, MPI_Status *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_rbuf; MPI_Aint __pyx_v_rlen; MPI_Datatype __pyx_v_rtype; int __pyx_v_rcount; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("PyMPI_mrecv", 0); __Pyx_INCREF(__pyx_v_rmsg); /* "mpi4py/MPI/msgpickle.pxi":560 * cdef object PyMPI_mrecv(object rmsg, * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * cdef void* rbuf = NULL * cdef MPI_Aint rlen = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":561 * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE * cdef void* rbuf = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint rlen = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":562 * cdef Pickle pickle = PyMPI_PICKLE * cdef void* rbuf = NULL * cdef MPI_Aint rlen = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * if message[0] == MPI_MESSAGE_NO_PROC: */ __pyx_v_rlen = 0; /* "mpi4py/MPI/msgpickle.pxi":563 * cdef void* rbuf = NULL * cdef MPI_Aint rlen = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * if message[0] == MPI_MESSAGE_NO_PROC: * rmsg = None */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":564 * cdef MPI_Aint rlen = 0 * cdef MPI_Datatype rtype = MPI_BYTE * if message[0] == MPI_MESSAGE_NO_PROC: # <<<<<<<<<<<<<< * rmsg = None * elif rmsg is None: */ __pyx_t_1 = (((__pyx_v_message[0]) == MPI_MESSAGE_NO_PROC) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":565 * cdef MPI_Datatype rtype = MPI_BYTE * if message[0] == MPI_MESSAGE_NO_PROC: * rmsg = None # <<<<<<<<<<<<<< * elif rmsg is None: * pass */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_rmsg, Py_None); /* "mpi4py/MPI/msgpickle.pxi":564 * cdef MPI_Aint rlen = 0 * cdef MPI_Datatype rtype = MPI_BYTE * if message[0] == MPI_MESSAGE_NO_PROC: # <<<<<<<<<<<<<< * rmsg = None * elif rmsg is None: */ goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":566 * if message[0] == MPI_MESSAGE_NO_PROC: * rmsg = None * elif rmsg is None: # <<<<<<<<<<<<<< * pass * elif PyBytes_CheckExact(rmsg): */ __pyx_t_1 = (__pyx_v_rmsg == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":568 * elif rmsg is None: * pass * elif PyBytes_CheckExact(rmsg): # <<<<<<<<<<<<<< * rmsg = getbuffer_r(rmsg, &rbuf, &rlen) * else: */ __pyx_t_2 = (PyBytes_CheckExact(__pyx_v_rmsg) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":569 * pass * elif PyBytes_CheckExact(rmsg): * rmsg = getbuffer_r(rmsg, &rbuf, &rlen) # <<<<<<<<<<<<<< * else: * rmsg = getbuffer_w(rmsg, &rbuf, &rlen) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_rmsg, (&__pyx_v_rbuf), (&__pyx_v_rlen))); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":568 * elif rmsg is None: * pass * elif PyBytes_CheckExact(rmsg): # <<<<<<<<<<<<<< * rmsg = getbuffer_r(rmsg, &rbuf, &rlen) * else: */ goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":571 * rmsg = getbuffer_r(rmsg, &rbuf, &rlen) * else: * rmsg = getbuffer_w(rmsg, &rbuf, &rlen) # <<<<<<<<<<<<<< * cdef int rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Mrecv(rbuf, rcount, rtype, message, status) ) */ /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_rmsg, (&__pyx_v_rbuf), (&__pyx_v_rlen))); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "mpi4py/MPI/msgpickle.pxi":572 * else: * rmsg = getbuffer_w(rmsg, &rbuf, &rlen) * cdef int rcount = clipcount(rlen) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Mrecv(rbuf, rcount, rtype, message, status) ) * rmsg = pickle.load(rbuf, rcount) */ __pyx_v_rcount = __pyx_f_6mpi4py_3MPI_clipcount(__pyx_v_rlen); /* "mpi4py/MPI/msgpickle.pxi":573 * rmsg = getbuffer_w(rmsg, &rbuf, &rlen) * cdef int rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Mrecv(rbuf, rcount, rtype, message, status) ) # <<<<<<<<<<<<<< * rmsg = pickle.load(rbuf, rcount) * return rmsg */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_4 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Mrecv(__pyx_v_rbuf, __pyx_v_rcount, __pyx_v_rtype, __pyx_v_message, __pyx_v_status)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 573, __pyx_L5_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":574 * cdef int rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Mrecv(rbuf, rcount, rtype, message, status) ) * rmsg = pickle.load(rbuf, rcount) # <<<<<<<<<<<<<< * return rmsg * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":575 * with nogil: CHKERR( MPI_Mrecv(rbuf, rcount, rtype, message, status) ) * rmsg = pickle.load(rbuf, rcount) * return rmsg # <<<<<<<<<<<<<< * * cdef object PyMPI_imrecv(object rmsg, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":558 * return rmsg * * cdef object PyMPI_mrecv(object rmsg, # <<<<<<<<<<<<<< * MPI_Message *message, MPI_Status *status): * cdef Pickle pickle = PyMPI_PICKLE */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_mrecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":577 * return rmsg * * cdef object PyMPI_imrecv(object rmsg, # <<<<<<<<<<<<<< * MPI_Message *message, MPI_Request *request): * cdef void* rbuf = NULL */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_imrecv(PyObject *__pyx_v_rmsg, MPI_Message *__pyx_v_message, MPI_Request *__pyx_v_request) { void *__pyx_v_rbuf; MPI_Aint __pyx_v_rlen; MPI_Datatype __pyx_v_rtype; int __pyx_v_rcount; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("PyMPI_imrecv", 0); __Pyx_INCREF(__pyx_v_rmsg); /* "mpi4py/MPI/msgpickle.pxi":579 * cdef object PyMPI_imrecv(object rmsg, * MPI_Message *message, MPI_Request *request): * cdef void* rbuf = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint rlen = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":580 * MPI_Message *message, MPI_Request *request): * cdef void* rbuf = NULL * cdef MPI_Aint rlen = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * if message[0] == MPI_MESSAGE_NO_PROC: */ __pyx_v_rlen = 0; /* "mpi4py/MPI/msgpickle.pxi":581 * cdef void* rbuf = NULL * cdef MPI_Aint rlen = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * if message[0] == MPI_MESSAGE_NO_PROC: * rmsg = None */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":582 * cdef MPI_Aint rlen = 0 * cdef MPI_Datatype rtype = MPI_BYTE * if message[0] == MPI_MESSAGE_NO_PROC: # <<<<<<<<<<<<<< * rmsg = None * elif rmsg is None: */ __pyx_t_1 = (((__pyx_v_message[0]) == MPI_MESSAGE_NO_PROC) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":583 * cdef MPI_Datatype rtype = MPI_BYTE * if message[0] == MPI_MESSAGE_NO_PROC: * rmsg = None # <<<<<<<<<<<<<< * elif rmsg is None: * pass */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_rmsg, Py_None); /* "mpi4py/MPI/msgpickle.pxi":582 * cdef MPI_Aint rlen = 0 * cdef MPI_Datatype rtype = MPI_BYTE * if message[0] == MPI_MESSAGE_NO_PROC: # <<<<<<<<<<<<<< * rmsg = None * elif rmsg is None: */ goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":584 * if message[0] == MPI_MESSAGE_NO_PROC: * rmsg = None * elif rmsg is None: # <<<<<<<<<<<<<< * pass * elif PyBytes_CheckExact(rmsg): */ __pyx_t_1 = (__pyx_v_rmsg == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":586 * elif rmsg is None: * pass * elif PyBytes_CheckExact(rmsg): # <<<<<<<<<<<<<< * rmsg = getbuffer_r(rmsg, &rbuf, &rlen) * else: */ __pyx_t_2 = (PyBytes_CheckExact(__pyx_v_rmsg) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":587 * pass * elif PyBytes_CheckExact(rmsg): * rmsg = getbuffer_r(rmsg, &rbuf, &rlen) # <<<<<<<<<<<<<< * else: * rmsg = getbuffer_w(rmsg, &rbuf, &rlen) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_rmsg, (&__pyx_v_rbuf), (&__pyx_v_rlen))); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":586 * elif rmsg is None: * pass * elif PyBytes_CheckExact(rmsg): # <<<<<<<<<<<<<< * rmsg = getbuffer_r(rmsg, &rbuf, &rlen) * else: */ goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":589 * rmsg = getbuffer_r(rmsg, &rbuf, &rlen) * else: * rmsg = getbuffer_w(rmsg, &rbuf, &rlen) # <<<<<<<<<<<<<< * cdef int rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Imrecv(rbuf, rcount, rtype, message, request) ) */ /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_rmsg, (&__pyx_v_rbuf), (&__pyx_v_rlen))); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "mpi4py/MPI/msgpickle.pxi":590 * else: * rmsg = getbuffer_w(rmsg, &rbuf, &rlen) * cdef int rcount = clipcount(rlen) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Imrecv(rbuf, rcount, rtype, message, request) ) * return rmsg */ __pyx_v_rcount = __pyx_f_6mpi4py_3MPI_clipcount(__pyx_v_rlen); /* "mpi4py/MPI/msgpickle.pxi":591 * rmsg = getbuffer_w(rmsg, &rbuf, &rlen) * cdef int rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Imrecv(rbuf, rcount, rtype, message, request) ) # <<<<<<<<<<<<<< * return rmsg * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_4 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Imrecv(__pyx_v_rbuf, __pyx_v_rcount, __pyx_v_rtype, __pyx_v_message, __pyx_v_request)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(6, 591, __pyx_L5_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/msgpickle.pxi":592 * cdef int rcount = clipcount(rlen) * with nogil: CHKERR( MPI_Imrecv(rbuf, rcount, rtype, message, request) ) * return rmsg # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":577 * return rmsg * * cdef object PyMPI_imrecv(object rmsg, # <<<<<<<<<<<<<< * MPI_Message *message, MPI_Request *request): * cdef void* rbuf = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_imrecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":596 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_barrier(MPI_Comm comm): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Barrier(comm) ) * return None */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_barrier(MPI_Comm __pyx_v_comm) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("PyMPI_barrier", 0); /* "mpi4py/MPI/msgpickle.pxi":597 * * cdef object PyMPI_barrier(MPI_Comm comm): * with nogil: CHKERR( MPI_Barrier(comm) ) # <<<<<<<<<<<<<< * return None * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Barrier(__pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 597, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":598 * cdef object PyMPI_barrier(MPI_Comm comm): * with nogil: CHKERR( MPI_Barrier(comm) ) * return None # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":596 * # ----------------------------------------------------------------------------- * * cdef object PyMPI_barrier(MPI_Comm comm): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Barrier(comm) ) * return None */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPI_barrier", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":601 * * * cdef object PyMPI_bcast(object obj, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_bcast(PyObject *__pyx_v_obj, int __pyx_v_root, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_buf; int __pyx_v_count; MPI_Datatype __pyx_v_dtype; int __pyx_v_dosend; int __pyx_v_dorecv; int __pyx_v_inter; int __pyx_v_rank; PyObject *__pyx_v_smsg = 0; PyObject *__pyx_v_rmsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("PyMPI_bcast", 0); /* "mpi4py/MPI/msgpickle.pxi":602 * * cdef object PyMPI_bcast(object obj, int root, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *buf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":604 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *buf = NULL # <<<<<<<<<<<<<< * cdef int count = 0 * cdef MPI_Datatype dtype = MPI_BYTE */ __pyx_v_buf = NULL; /* "mpi4py/MPI/msgpickle.pxi":605 * # * cdef void *buf = NULL * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype dtype = MPI_BYTE * # */ __pyx_v_count = 0; /* "mpi4py/MPI/msgpickle.pxi":606 * cdef void *buf = NULL * cdef int count = 0 * cdef MPI_Datatype dtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef int dosend=0, dorecv=0 */ __pyx_v_dtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":608 * cdef MPI_Datatype dtype = MPI_BYTE * # * cdef int dosend=0, dorecv=0 # <<<<<<<<<<<<<< * cdef int inter=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_v_dosend = 0; __pyx_v_dorecv = 0; /* "mpi4py/MPI/msgpickle.pxi":609 * # * cdef int dosend=0, dorecv=0 * cdef int inter=0, rank=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: */ __pyx_v_inter = 0; __pyx_v_rank = 0; /* "mpi4py/MPI/msgpickle.pxi":610 * cdef int dosend=0, dorecv=0 * cdef int inter=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if inter: * if root == MPI_PROC_NULL: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 610, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":611 * cdef int inter=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; */ __pyx_t_2 = (__pyx_v_inter != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":612 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: * if root == MPI_PROC_NULL: # <<<<<<<<<<<<<< * dosend=0; dorecv=0; * elif root == MPI_ROOT: */ __pyx_t_2 = ((__pyx_v_root == MPI_PROC_NULL) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":613 * if inter: * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; # <<<<<<<<<<<<<< * elif root == MPI_ROOT: * dosend=1; dorecv=0; */ __pyx_v_dosend = 0; __pyx_v_dorecv = 0; /* "mpi4py/MPI/msgpickle.pxi":612 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: * if root == MPI_PROC_NULL: # <<<<<<<<<<<<<< * dosend=0; dorecv=0; * elif root == MPI_ROOT: */ goto __pyx_L4; } /* "mpi4py/MPI/msgpickle.pxi":614 * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; * elif root == MPI_ROOT: # <<<<<<<<<<<<<< * dosend=1; dorecv=0; * else: */ __pyx_t_2 = ((__pyx_v_root == MPI_ROOT) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":615 * dosend=0; dorecv=0; * elif root == MPI_ROOT: * dosend=1; dorecv=0; # <<<<<<<<<<<<<< * else: * dosend=0; dorecv=1; */ __pyx_v_dosend = 1; __pyx_v_dorecv = 0; /* "mpi4py/MPI/msgpickle.pxi":614 * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; * elif root == MPI_ROOT: # <<<<<<<<<<<<<< * dosend=1; dorecv=0; * else: */ goto __pyx_L4; } /* "mpi4py/MPI/msgpickle.pxi":617 * dosend=1; dorecv=0; * else: * dosend=0; dorecv=1; # <<<<<<<<<<<<<< * else: * CHKERR( MPI_Comm_rank(comm, &rank) ) */ /*else*/ { __pyx_v_dosend = 0; __pyx_v_dorecv = 1; } __pyx_L4:; /* "mpi4py/MPI/msgpickle.pxi":611 * cdef int inter=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; */ goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":619 * dosend=0; dorecv=1; * else: * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * if root == rank: * dosend=1; dorecv=1; */ /*else*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 619, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":620 * else: * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * dosend=1; dorecv=1; * else: */ __pyx_t_2 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":621 * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: * dosend=1; dorecv=1; # <<<<<<<<<<<<<< * else: * dosend=0; dorecv=1; */ __pyx_v_dosend = 1; __pyx_v_dorecv = 1; /* "mpi4py/MPI/msgpickle.pxi":620 * else: * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * dosend=1; dorecv=1; * else: */ goto __pyx_L5; } /* "mpi4py/MPI/msgpickle.pxi":623 * dosend=1; dorecv=1; * else: * dosend=0; dorecv=1; # <<<<<<<<<<<<<< * # * cdef object smsg = None */ /*else*/ { __pyx_v_dosend = 0; __pyx_v_dorecv = 1; } __pyx_L5:; } __pyx_L3:; /* "mpi4py/MPI/msgpickle.pxi":625 * dosend=0; dorecv=1; * # * cdef object smsg = None # <<<<<<<<<<<<<< * cdef object rmsg = None * # */ __Pyx_INCREF(Py_None); __pyx_v_smsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":626 * # * cdef object smsg = None * cdef object rmsg = None # <<<<<<<<<<<<<< * # * if dosend: smsg = pickle.dump(obj, &buf, &count) */ __Pyx_INCREF(Py_None); __pyx_v_rmsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":628 * cdef object rmsg = None * # * if dosend: smsg = pickle.dump(obj, &buf, &count) # <<<<<<<<<<<<<< * if dosend and dorecv: rmsg = smsg * with PyMPI_Lock(comm, "bcast"): */ __pyx_t_2 = (__pyx_v_dosend != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_buf), (&__pyx_v_count)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_smsg, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/msgpickle.pxi":629 * # * if dosend: smsg = pickle.dump(obj, &buf, &count) * if dosend and dorecv: rmsg = smsg # <<<<<<<<<<<<<< * with PyMPI_Lock(comm, "bcast"): * with nogil: CHKERR( MPI_Bcast( */ __pyx_t_4 = (__pyx_v_dosend != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L8_bool_binop_done; } __pyx_t_4 = (__pyx_v_dorecv != 0); __pyx_t_2 = __pyx_t_4; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { __Pyx_INCREF(__pyx_v_smsg); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_v_smsg); } /* "mpi4py/MPI/msgpickle.pxi":630 * if dosend: smsg = pickle.dump(obj, &buf, &count) * if dosend and dorecv: rmsg = smsg * with PyMPI_Lock(comm, "bcast"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bcast( * &count, 1, MPI_INT, */ /*with:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 630, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 630, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":631 * if dosend and dorecv: rmsg = smsg * with PyMPI_Lock(comm, "bcast"): * with nogil: CHKERR( MPI_Bcast( # <<<<<<<<<<<<<< * &count, 1, MPI_INT, * root, comm) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":633 * with nogil: CHKERR( MPI_Bcast( * &count, 1, MPI_INT, * root, comm) ) # <<<<<<<<<<<<<< * if dorecv and not dosend: * rmsg = pickle.alloc(&buf, count) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Bcast((&__pyx_v_count), 1, MPI_INT, __pyx_v_root, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 631, __pyx_L21_error) } /* "mpi4py/MPI/msgpickle.pxi":631 * if dosend and dorecv: rmsg = smsg * with PyMPI_Lock(comm, "bcast"): * with nogil: CHKERR( MPI_Bcast( # <<<<<<<<<<<<<< * &count, 1, MPI_INT, * root, comm) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L22; } __pyx_L21_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L14_error; } __pyx_L22:; } } /* "mpi4py/MPI/msgpickle.pxi":634 * &count, 1, MPI_INT, * root, comm) ) * if dorecv and not dosend: # <<<<<<<<<<<<<< * rmsg = pickle.alloc(&buf, count) * with nogil: CHKERR( MPI_Bcast( */ __pyx_t_4 = (__pyx_v_dorecv != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L24_bool_binop_done; } __pyx_t_4 = ((!(__pyx_v_dosend != 0)) != 0); __pyx_t_2 = __pyx_t_4; __pyx_L24_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":635 * root, comm) ) * if dorecv and not dosend: * rmsg = pickle.alloc(&buf, count) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bcast( * buf, count, dtype, */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_buf), __pyx_v_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 635, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":634 * &count, 1, MPI_INT, * root, comm) ) * if dorecv and not dosend: # <<<<<<<<<<<<<< * rmsg = pickle.alloc(&buf, count) * with nogil: CHKERR( MPI_Bcast( */ } /* "mpi4py/MPI/msgpickle.pxi":636 * if dorecv and not dosend: * rmsg = pickle.alloc(&buf, count) * with nogil: CHKERR( MPI_Bcast( # <<<<<<<<<<<<<< * buf, count, dtype, * root, comm) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":638 * with nogil: CHKERR( MPI_Bcast( * buf, count, dtype, * root, comm) ) # <<<<<<<<<<<<<< * if dorecv: rmsg = pickle.load(buf, count) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Bcast(__pyx_v_buf, __pyx_v_count, __pyx_v_dtype, __pyx_v_root, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 636, __pyx_L27_error) } /* "mpi4py/MPI/msgpickle.pxi":636 * if dorecv and not dosend: * rmsg = pickle.alloc(&buf, count) * with nogil: CHKERR( MPI_Bcast( # <<<<<<<<<<<<<< * buf, count, dtype, * root, comm) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L28; } __pyx_L27_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L14_error; } __pyx_L28:; } } /* "mpi4py/MPI/msgpickle.pxi":630 * if dosend: smsg = pickle.dump(obj, &buf, &count) * if dosend and dorecv: rmsg = smsg * with PyMPI_Lock(comm, "bcast"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bcast( * &count, 1, MPI_INT, */ } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L19_try_end; __pyx_L14_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_bcast", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(6, 630, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 630, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(6, 630, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_2 < 0) __PYX_ERR(6, 630, __pyx_L16_except_error) __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_6, __pyx_t_7); __pyx_t_3 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __PYX_ERR(6, 630, __pyx_L16_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L15_exception_handled; } __pyx_L16_except_error:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); goto __pyx_L1_error; __pyx_L15_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); __pyx_L19_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_5) { __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } goto __pyx_L13; } __pyx_L13:; } goto __pyx_L32; __pyx_L10_error:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L1_error; __pyx_L32:; } /* "mpi4py/MPI/msgpickle.pxi":639 * buf, count, dtype, * root, comm) ) * if dorecv: rmsg = pickle.load(buf, count) # <<<<<<<<<<<<<< * # * return rmsg */ __pyx_t_4 = (__pyx_v_dorecv != 0); if (__pyx_t_4) { __pyx_t_7 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_buf, __pyx_v_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_7); __pyx_t_7 = 0; } /* "mpi4py/MPI/msgpickle.pxi":641 * if dorecv: rmsg = pickle.load(buf, count) * # * return rmsg # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":601 * * * cdef object PyMPI_bcast(object obj, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_bcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_smsg); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":644 * * * cdef object PyMPI_gather(object sendobj, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_gather(PyObject *__pyx_v_sendobj, int __pyx_v_root, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; void *__pyx_v_rbuf; int *__pyx_v_rcounts; int *__pyx_v_rdispls; MPI_Datatype __pyx_v_rtype; int __pyx_v_dosend; int __pyx_v_dorecv; int __pyx_v_inter; int __pyx_v_size; int __pyx_v_rank; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_v_rmsg = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_gather", 0); /* "mpi4py/MPI/msgpickle.pxi":645 * * cdef object PyMPI_gather(object sendobj, int root, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":647 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":648 * # * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":649 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * cdef void *rbuf = NULL * cdef int *rcounts = NULL */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":650 * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int *rcounts = NULL * cdef int *rdispls = NULL */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":651 * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL * cdef int *rcounts = NULL # <<<<<<<<<<<<<< * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rcounts = NULL; /* "mpi4py/MPI/msgpickle.pxi":652 * cdef void *rbuf = NULL * cdef int *rcounts = NULL * cdef int *rdispls = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * # */ __pyx_v_rdispls = NULL; /* "mpi4py/MPI/msgpickle.pxi":653 * cdef int *rcounts = NULL * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef int dosend=0, dorecv=0 */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":655 * cdef MPI_Datatype rtype = MPI_BYTE * # * cdef int dosend=0, dorecv=0 # <<<<<<<<<<<<<< * cdef int inter=0, size=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_v_dosend = 0; __pyx_v_dorecv = 0; /* "mpi4py/MPI/msgpickle.pxi":656 * # * cdef int dosend=0, dorecv=0 * cdef int inter=0, size=0, rank=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: */ __pyx_v_inter = 0; __pyx_v_size = 0; __pyx_v_rank = 0; /* "mpi4py/MPI/msgpickle.pxi":657 * cdef int dosend=0, dorecv=0 * cdef int inter=0, size=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 657, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":658 * cdef int inter=0, size=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: */ __pyx_t_2 = (__pyx_v_inter != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":659 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 659, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":660 * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: # <<<<<<<<<<<<<< * dosend=0; dorecv=0; * elif root == MPI_ROOT: */ __pyx_t_2 = ((__pyx_v_root == MPI_PROC_NULL) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":661 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; # <<<<<<<<<<<<<< * elif root == MPI_ROOT: * dosend=0; dorecv=1; */ __pyx_v_dosend = 0; __pyx_v_dorecv = 0; /* "mpi4py/MPI/msgpickle.pxi":660 * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: # <<<<<<<<<<<<<< * dosend=0; dorecv=0; * elif root == MPI_ROOT: */ goto __pyx_L4; } /* "mpi4py/MPI/msgpickle.pxi":662 * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; * elif root == MPI_ROOT: # <<<<<<<<<<<<<< * dosend=0; dorecv=1; * else: */ __pyx_t_2 = ((__pyx_v_root == MPI_ROOT) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":663 * dosend=0; dorecv=0; * elif root == MPI_ROOT: * dosend=0; dorecv=1; # <<<<<<<<<<<<<< * else: * dosend=1; dorecv=0; */ __pyx_v_dosend = 0; __pyx_v_dorecv = 1; /* "mpi4py/MPI/msgpickle.pxi":662 * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; * elif root == MPI_ROOT: # <<<<<<<<<<<<<< * dosend=0; dorecv=1; * else: */ goto __pyx_L4; } /* "mpi4py/MPI/msgpickle.pxi":665 * dosend=0; dorecv=1; * else: * dosend=1; dorecv=0; # <<<<<<<<<<<<<< * else: * CHKERR( MPI_Comm_size(comm, &size) ) */ /*else*/ { __pyx_v_dosend = 1; __pyx_v_dorecv = 0; } __pyx_L4:; /* "mpi4py/MPI/msgpickle.pxi":658 * cdef int inter=0, size=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: */ goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":667 * dosend=1; dorecv=0; * else: * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: */ /*else*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 667, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":668 * else: * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * if root == rank: * dosend=1; dorecv=1; */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 668, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":669 * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * dosend=1; dorecv=1; * else: */ __pyx_t_2 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":670 * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: * dosend=1; dorecv=1; # <<<<<<<<<<<<<< * else: * dosend=1; dorecv=0; */ __pyx_v_dosend = 1; __pyx_v_dorecv = 1; /* "mpi4py/MPI/msgpickle.pxi":669 * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * dosend=1; dorecv=1; * else: */ goto __pyx_L5; } /* "mpi4py/MPI/msgpickle.pxi":672 * dosend=1; dorecv=1; * else: * dosend=1; dorecv=0; # <<<<<<<<<<<<<< * # * cdef object tmps = None */ /*else*/ { __pyx_v_dosend = 1; __pyx_v_dorecv = 0; } __pyx_L5:; } __pyx_L3:; /* "mpi4py/MPI/msgpickle.pxi":674 * dosend=1; dorecv=0; * # * cdef object tmps = None # <<<<<<<<<<<<<< * cdef object rmsg = None * cdef object tmp1 */ __Pyx_INCREF(Py_None); __pyx_v_tmps = Py_None; /* "mpi4py/MPI/msgpickle.pxi":675 * # * cdef object tmps = None * cdef object rmsg = None # <<<<<<<<<<<<<< * cdef object tmp1 * # */ __Pyx_INCREF(Py_None); __pyx_v_rmsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":678 * cdef object tmp1 * # * if dorecv: tmp1 = allocate_count_displ(size, &rcounts, &rdispls) # <<<<<<<<<<<<<< * if dosend: tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "gather"): */ __pyx_t_2 = (__pyx_v_dorecv != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_allocate_count_displ(__pyx_v_size, (&__pyx_v_rcounts), (&__pyx_v_rdispls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; } /* "mpi4py/MPI/msgpickle.pxi":679 * # * if dorecv: tmp1 = allocate_count_displ(size, &rcounts, &rdispls) * if dosend: tmps = pickle.dump(sendobj, &sbuf, &scount) # <<<<<<<<<<<<<< * with PyMPI_Lock(comm, "gather"): * with nogil: CHKERR( MPI_Gather( */ __pyx_t_2 = (__pyx_v_dosend != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_sendobj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_tmps, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/msgpickle.pxi":680 * if dorecv: tmp1 = allocate_count_displ(size, &rcounts, &rdispls) * if dosend: tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "gather"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Gather( * &scount, 1, MPI_INT, */ /*with:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_n_s_gather); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 680, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 680, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":681 * if dosend: tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "gather"): * with nogil: CHKERR( MPI_Gather( # <<<<<<<<<<<<<< * &scount, 1, MPI_INT, * rcounts, 1, MPI_INT, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":684 * &scount, 1, MPI_INT, * rcounts, 1, MPI_INT, * root, comm) ) # <<<<<<<<<<<<<< * if dorecv: rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) * with nogil: CHKERR( MPI_Gatherv( */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Gather((&__pyx_v_scount), 1, MPI_INT, __pyx_v_rcounts, 1, MPI_INT, __pyx_v_root, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 681, __pyx_L19_error) } /* "mpi4py/MPI/msgpickle.pxi":681 * if dosend: tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "gather"): * with nogil: CHKERR( MPI_Gather( # <<<<<<<<<<<<<< * &scount, 1, MPI_INT, * rcounts, 1, MPI_INT, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L20; } __pyx_L19_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L12_error; } __pyx_L20:; } } /* "mpi4py/MPI/msgpickle.pxi":685 * rcounts, 1, MPI_INT, * root, comm) ) * if dorecv: rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Gatherv( * sbuf, scount, stype, */ __pyx_t_2 = (__pyx_v_dorecv != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_allocv(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_size, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 685, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/msgpickle.pxi":686 * root, comm) ) * if dorecv: rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) * with nogil: CHKERR( MPI_Gatherv( # <<<<<<<<<<<<<< * sbuf, scount, stype, * rbuf, rcounts, rdispls, rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":689 * sbuf, scount, stype, * rbuf, rcounts, rdispls, rtype, * root, comm) ) # <<<<<<<<<<<<<< * if dorecv: rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Gatherv(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_rbuf, __pyx_v_rcounts, __pyx_v_rdispls, __pyx_v_rtype, __pyx_v_root, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 686, __pyx_L23_error) } /* "mpi4py/MPI/msgpickle.pxi":686 * root, comm) ) * if dorecv: rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) * with nogil: CHKERR( MPI_Gatherv( # <<<<<<<<<<<<<< * sbuf, scount, stype, * rbuf, rcounts, rdispls, rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L24; } __pyx_L23_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L12_error; } __pyx_L24:; } } /* "mpi4py/MPI/msgpickle.pxi":680 * if dorecv: tmp1 = allocate_count_displ(size, &rcounts, &rdispls) * if dosend: tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "gather"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Gather( * &scount, 1, MPI_INT, */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L17_try_end; __pyx_L12_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_gather", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(6, 680, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 680, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 680, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_2 < 0) __PYX_ERR(6, 680, __pyx_L14_except_error) __pyx_t_12 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_5, __pyx_t_6); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __PYX_ERR(6, 680, __pyx_L14_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13_exception_handled; } __pyx_L14_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L13_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L17_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_4) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } goto __pyx_L11; } __pyx_L11:; } goto __pyx_L28; __pyx_L8_error:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L1_error; __pyx_L28:; } /* "mpi4py/MPI/msgpickle.pxi":690 * rbuf, rcounts, rdispls, rtype, * root, comm) ) * if dorecv: rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) # <<<<<<<<<<<<<< * # * return rmsg */ __pyx_t_12 = (__pyx_v_dorecv != 0); if (__pyx_t_12) { __pyx_t_6 = __pyx_f_6mpi4py_3MPI_6Pickle_loadv(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_size, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_6); __pyx_t_6 = 0; } /* "mpi4py/MPI/msgpickle.pxi":692 * if dorecv: rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) * # * return rmsg # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":644 * * * cdef object PyMPI_gather(object sendobj, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_gather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":695 * * * cdef object PyMPI_scatter(object sendobj, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scatter(PyObject *__pyx_v_sendobj, int __pyx_v_root, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int *__pyx_v_scounts; int *__pyx_v_sdispls; MPI_Datatype __pyx_v_stype; void *__pyx_v_rbuf; int __pyx_v_rcount; MPI_Datatype __pyx_v_rtype; int __pyx_v_dosend; int __pyx_v_dorecv; int __pyx_v_inter; int __pyx_v_size; int __pyx_v_rank; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_v_rmsg = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_scatter", 0); /* "mpi4py/MPI/msgpickle.pxi":696 * * cdef object PyMPI_scatter(object sendobj, int root, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":698 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int *scounts = NULL * cdef int *sdispls = NULL */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":699 * # * cdef void *sbuf = NULL * cdef int *scounts = NULL # <<<<<<<<<<<<<< * cdef int *sdispls = NULL * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_scounts = NULL; /* "mpi4py/MPI/msgpickle.pxi":700 * cdef void *sbuf = NULL * cdef int *scounts = NULL * cdef int *sdispls = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL */ __pyx_v_sdispls = NULL; /* "mpi4py/MPI/msgpickle.pxi":701 * cdef int *scounts = NULL * cdef int *sdispls = NULL * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * cdef void *rbuf = NULL * cdef int rcount = 0 */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":702 * cdef int *sdispls = NULL * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":703 * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL * cdef int rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * # */ __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":704 * cdef void *rbuf = NULL * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef int dosend=0, dorecv=0 */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":706 * cdef MPI_Datatype rtype = MPI_BYTE * # * cdef int dosend=0, dorecv=0 # <<<<<<<<<<<<<< * cdef int inter=0, size=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ __pyx_v_dosend = 0; __pyx_v_dorecv = 0; /* "mpi4py/MPI/msgpickle.pxi":707 * # * cdef int dosend=0, dorecv=0 * cdef int inter=0, size=0, rank=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: */ __pyx_v_inter = 0; __pyx_v_size = 0; __pyx_v_rank = 0; /* "mpi4py/MPI/msgpickle.pxi":708 * cdef int dosend=0, dorecv=0 * cdef int inter=0, size=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 708, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":709 * cdef int inter=0, size=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: */ __pyx_t_2 = (__pyx_v_inter != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":710 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 710, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":711 * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: # <<<<<<<<<<<<<< * dosend=0; dorecv=0; * elif root == MPI_ROOT: */ __pyx_t_2 = ((__pyx_v_root == MPI_PROC_NULL) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":712 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; # <<<<<<<<<<<<<< * elif root == MPI_ROOT: * dosend=1; dorecv=0; */ __pyx_v_dosend = 0; __pyx_v_dorecv = 0; /* "mpi4py/MPI/msgpickle.pxi":711 * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: # <<<<<<<<<<<<<< * dosend=0; dorecv=0; * elif root == MPI_ROOT: */ goto __pyx_L4; } /* "mpi4py/MPI/msgpickle.pxi":713 * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; * elif root == MPI_ROOT: # <<<<<<<<<<<<<< * dosend=1; dorecv=0; * else: */ __pyx_t_2 = ((__pyx_v_root == MPI_ROOT) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":714 * dosend=0; dorecv=0; * elif root == MPI_ROOT: * dosend=1; dorecv=0; # <<<<<<<<<<<<<< * else: * dosend=0; dorecv=1; */ __pyx_v_dosend = 1; __pyx_v_dorecv = 0; /* "mpi4py/MPI/msgpickle.pxi":713 * if root == MPI_PROC_NULL: * dosend=0; dorecv=0; * elif root == MPI_ROOT: # <<<<<<<<<<<<<< * dosend=1; dorecv=0; * else: */ goto __pyx_L4; } /* "mpi4py/MPI/msgpickle.pxi":716 * dosend=1; dorecv=0; * else: * dosend=0; dorecv=1; # <<<<<<<<<<<<<< * else: * CHKERR( MPI_Comm_size(comm, &size) ) */ /*else*/ { __pyx_v_dosend = 0; __pyx_v_dorecv = 1; } __pyx_L4:; /* "mpi4py/MPI/msgpickle.pxi":709 * cdef int inter=0, size=0, rank=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(comm, &size) ) * if root == MPI_PROC_NULL: */ goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":718 * dosend=0; dorecv=1; * else: * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: */ /*else*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 718, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":719 * else: * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * if root == rank: * dosend=1; dorecv=1; */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 719, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":720 * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * dosend=1; dorecv=1; * else: */ __pyx_t_2 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":721 * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: * dosend=1; dorecv=1; # <<<<<<<<<<<<<< * else: * dosend=0; dorecv=1; */ __pyx_v_dosend = 1; __pyx_v_dorecv = 1; /* "mpi4py/MPI/msgpickle.pxi":720 * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * dosend=1; dorecv=1; * else: */ goto __pyx_L5; } /* "mpi4py/MPI/msgpickle.pxi":723 * dosend=1; dorecv=1; * else: * dosend=0; dorecv=1; # <<<<<<<<<<<<<< * # * cdef object tmps = None */ /*else*/ { __pyx_v_dosend = 0; __pyx_v_dorecv = 1; } __pyx_L5:; } __pyx_L3:; /* "mpi4py/MPI/msgpickle.pxi":725 * dosend=0; dorecv=1; * # * cdef object tmps = None # <<<<<<<<<<<<<< * cdef object rmsg = None * cdef object tmp1 */ __Pyx_INCREF(Py_None); __pyx_v_tmps = Py_None; /* "mpi4py/MPI/msgpickle.pxi":726 * # * cdef object tmps = None * cdef object rmsg = None # <<<<<<<<<<<<<< * cdef object tmp1 * # */ __Pyx_INCREF(Py_None); __pyx_v_rmsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":729 * cdef object tmp1 * # * if dosend: tmp1 = allocate_count_displ(size, &scounts, &sdispls) # <<<<<<<<<<<<<< * if dosend: tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "scatter"): */ __pyx_t_2 = (__pyx_v_dosend != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_allocate_count_displ(__pyx_v_size, (&__pyx_v_scounts), (&__pyx_v_sdispls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; } /* "mpi4py/MPI/msgpickle.pxi":730 * # * if dosend: tmp1 = allocate_count_displ(size, &scounts, &sdispls) * if dosend: tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) # <<<<<<<<<<<<<< * with PyMPI_Lock(comm, "scatter"): * with nogil: CHKERR( MPI_Scatter( */ __pyx_t_2 = (__pyx_v_dosend != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_dumpv(__pyx_v_pickle, __pyx_v_sendobj, (&__pyx_v_sbuf), __pyx_v_size, __pyx_v_scounts, __pyx_v_sdispls); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_tmps, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/msgpickle.pxi":731 * if dosend: tmp1 = allocate_count_displ(size, &scounts, &sdispls) * if dosend: tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "scatter"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Scatter( * scounts, 1, MPI_INT, */ /*with:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_n_s_scatter); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 731, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 731, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":732 * if dosend: tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "scatter"): * with nogil: CHKERR( MPI_Scatter( # <<<<<<<<<<<<<< * scounts, 1, MPI_INT, * &rcount, 1, MPI_INT, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":735 * scounts, 1, MPI_INT, * &rcount, 1, MPI_INT, * root, comm) ) # <<<<<<<<<<<<<< * if dorecv: rmsg = pickle.alloc(&rbuf, rcount) * with nogil: CHKERR( MPI_Scatterv( */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Scatter(__pyx_v_scounts, 1, MPI_INT, (&__pyx_v_rcount), 1, MPI_INT, __pyx_v_root, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 732, __pyx_L19_error) } /* "mpi4py/MPI/msgpickle.pxi":732 * if dosend: tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "scatter"): * with nogil: CHKERR( MPI_Scatter( # <<<<<<<<<<<<<< * scounts, 1, MPI_INT, * &rcount, 1, MPI_INT, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L20; } __pyx_L19_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L12_error; } __pyx_L20:; } } /* "mpi4py/MPI/msgpickle.pxi":736 * &rcount, 1, MPI_INT, * root, comm) ) * if dorecv: rmsg = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Scatterv( * sbuf, scounts, sdispls, stype, */ __pyx_t_2 = (__pyx_v_dorecv != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 736, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/msgpickle.pxi":737 * root, comm) ) * if dorecv: rmsg = pickle.alloc(&rbuf, rcount) * with nogil: CHKERR( MPI_Scatterv( # <<<<<<<<<<<<<< * sbuf, scounts, sdispls, stype, * rbuf, rcount, rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":740 * sbuf, scounts, sdispls, stype, * rbuf, rcount, rtype, * root, comm) ) # <<<<<<<<<<<<<< * if dorecv: rmsg = pickle.load(rbuf, rcount) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Scatterv(__pyx_v_sbuf, __pyx_v_scounts, __pyx_v_sdispls, __pyx_v_stype, __pyx_v_rbuf, __pyx_v_rcount, __pyx_v_rtype, __pyx_v_root, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 737, __pyx_L23_error) } /* "mpi4py/MPI/msgpickle.pxi":737 * root, comm) ) * if dorecv: rmsg = pickle.alloc(&rbuf, rcount) * with nogil: CHKERR( MPI_Scatterv( # <<<<<<<<<<<<<< * sbuf, scounts, sdispls, stype, * rbuf, rcount, rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L24; } __pyx_L23_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L12_error; } __pyx_L24:; } } /* "mpi4py/MPI/msgpickle.pxi":731 * if dosend: tmp1 = allocate_count_displ(size, &scounts, &sdispls) * if dosend: tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "scatter"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Scatter( * scounts, 1, MPI_INT, */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L17_try_end; __pyx_L12_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(6, 731, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 731, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 731, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_2 < 0) __PYX_ERR(6, 731, __pyx_L14_except_error) __pyx_t_12 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_5, __pyx_t_6); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __PYX_ERR(6, 731, __pyx_L14_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13_exception_handled; } __pyx_L14_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L13_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L17_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_4) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 731, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } goto __pyx_L11; } __pyx_L11:; } goto __pyx_L28; __pyx_L8_error:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L1_error; __pyx_L28:; } /* "mpi4py/MPI/msgpickle.pxi":741 * rbuf, rcount, rtype, * root, comm) ) * if dorecv: rmsg = pickle.load(rbuf, rcount) # <<<<<<<<<<<<<< * # * return rmsg */ __pyx_t_12 = (__pyx_v_dorecv != 0); if (__pyx_t_12) { __pyx_t_6 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rcount); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_6); __pyx_t_6 = 0; } /* "mpi4py/MPI/msgpickle.pxi":743 * if dorecv: rmsg = pickle.load(rbuf, rcount) * # * return rmsg # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":695 * * * cdef object PyMPI_scatter(object sendobj, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":746 * * * cdef object PyMPI_allgather(object sendobj, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allgather(PyObject *__pyx_v_sendobj, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; void *__pyx_v_rbuf; int *__pyx_v_rcounts; int *__pyx_v_rdispls; MPI_Datatype __pyx_v_rtype; int __pyx_v_inter; int __pyx_v_size; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_v_rmsg = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_allgather", 0); /* "mpi4py/MPI/msgpickle.pxi":747 * * cdef object PyMPI_allgather(object sendobj, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":749 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":750 * # * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":751 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * cdef void *rbuf = NULL * cdef int *rcounts = NULL */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":752 * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int *rcounts = NULL * cdef int *rdispls = NULL */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":753 * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL * cdef int *rcounts = NULL # <<<<<<<<<<<<<< * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rcounts = NULL; /* "mpi4py/MPI/msgpickle.pxi":754 * cdef void *rbuf = NULL * cdef int *rcounts = NULL * cdef int *rdispls = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * # */ __pyx_v_rdispls = NULL; /* "mpi4py/MPI/msgpickle.pxi":755 * cdef int *rcounts = NULL * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef int inter=0, size=0 */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":757 * cdef MPI_Datatype rtype = MPI_BYTE * # * cdef int inter=0, size=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: */ __pyx_v_inter = 0; __pyx_v_size = 0; /* "mpi4py/MPI/msgpickle.pxi":758 * # * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 758, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":759 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(comm, &size) ) * else: */ __pyx_t_2 = (__pyx_v_inter != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":760 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * else: * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 760, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":759 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(comm, &size) ) * else: */ goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":762 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * else: * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * # * cdef object tmps = None */ /*else*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 762, __pyx_L1_error) } __pyx_L3:; /* "mpi4py/MPI/msgpickle.pxi":764 * CHKERR( MPI_Comm_size(comm, &size) ) * # * cdef object tmps = None # <<<<<<<<<<<<<< * cdef object rmsg = None * cdef object tmp1 */ __Pyx_INCREF(Py_None); __pyx_v_tmps = Py_None; /* "mpi4py/MPI/msgpickle.pxi":765 * # * cdef object tmps = None * cdef object rmsg = None # <<<<<<<<<<<<<< * cdef object tmp1 * # */ __Pyx_INCREF(Py_None); __pyx_v_rmsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":768 * cdef object tmp1 * # * tmp1 = allocate_count_displ(size, &rcounts, &rdispls) # <<<<<<<<<<<<<< * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "allgather"): */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_allocate_count_displ(__pyx_v_size, (&__pyx_v_rcounts), (&__pyx_v_rdispls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":769 * # * tmp1 = allocate_count_displ(size, &rcounts, &rdispls) * tmps = pickle.dump(sendobj, &sbuf, &scount) # <<<<<<<<<<<<<< * with PyMPI_Lock(comm, "allgather"): * with nogil: CHKERR( MPI_Allgather( */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_sendobj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_tmps, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":770 * tmp1 = allocate_count_displ(size, &rcounts, &rdispls) * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "allgather"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Allgather( * &scount, 1, MPI_INT, */ /*with:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_n_s_allgather); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 770, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 770, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":771 * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "allgather"): * with nogil: CHKERR( MPI_Allgather( # <<<<<<<<<<<<<< * &scount, 1, MPI_INT, * rcounts, 1, MPI_INT, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":774 * &scount, 1, MPI_INT, * rcounts, 1, MPI_INT, * comm) ) # <<<<<<<<<<<<<< * rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) * with nogil: CHKERR( MPI_Allgatherv( */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Allgather((&__pyx_v_scount), 1, MPI_INT, __pyx_v_rcounts, 1, MPI_INT, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 771, __pyx_L15_error) } /* "mpi4py/MPI/msgpickle.pxi":771 * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "allgather"): * with nogil: CHKERR( MPI_Allgather( # <<<<<<<<<<<<<< * &scount, 1, MPI_INT, * rcounts, 1, MPI_INT, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L16; } __pyx_L15_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8_error; } __pyx_L16:; } } /* "mpi4py/MPI/msgpickle.pxi":775 * rcounts, 1, MPI_INT, * comm) ) * rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Allgatherv( * sbuf, scount, stype, */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_allocv(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_size, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 775, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":776 * comm) ) * rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) * with nogil: CHKERR( MPI_Allgatherv( # <<<<<<<<<<<<<< * sbuf, scount, stype, * rbuf, rcounts, rdispls, rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":779 * sbuf, scount, stype, * rbuf, rcounts, rdispls, rtype, * comm) ) # <<<<<<<<<<<<<< * rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Allgatherv(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_rbuf, __pyx_v_rcounts, __pyx_v_rdispls, __pyx_v_rtype, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 776, __pyx_L18_error) } /* "mpi4py/MPI/msgpickle.pxi":776 * comm) ) * rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) * with nogil: CHKERR( MPI_Allgatherv( # <<<<<<<<<<<<<< * sbuf, scount, stype, * rbuf, rcounts, rdispls, rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L19; } __pyx_L18_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8_error; } __pyx_L19:; } } /* "mpi4py/MPI/msgpickle.pxi":770 * tmp1 = allocate_count_displ(size, &rcounts, &rdispls) * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "allgather"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Allgather( * &scount, 1, MPI_INT, */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L13_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(6, 770, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 770, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 770, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_2 < 0) __PYX_ERR(6, 770, __pyx_L10_except_error) __pyx_t_12 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_5, __pyx_t_6); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __PYX_ERR(6, 770, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L13_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_4) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } goto __pyx_L7; } __pyx_L7:; } goto __pyx_L23; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L1_error; __pyx_L23:; } /* "mpi4py/MPI/msgpickle.pxi":780 * rbuf, rcounts, rdispls, rtype, * comm) ) * rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) # <<<<<<<<<<<<<< * # * return rmsg */ __pyx_t_6 = __pyx_f_6mpi4py_3MPI_6Pickle_loadv(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_size, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/msgpickle.pxi":782 * rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) * # * return rmsg # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":746 * * * cdef object PyMPI_allgather(object sendobj, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":785 * * * cdef object PyMPI_alltoall(object sendobj, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_alltoall(PyObject *__pyx_v_sendobj, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int *__pyx_v_scounts; int *__pyx_v_sdispls; MPI_Datatype __pyx_v_stype; void *__pyx_v_rbuf; int *__pyx_v_rcounts; int *__pyx_v_rdispls; MPI_Datatype __pyx_v_rtype; int __pyx_v_inter; int __pyx_v_size; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_v_rmsg = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_alltoall", 0); /* "mpi4py/MPI/msgpickle.pxi":786 * * cdef object PyMPI_alltoall(object sendobj, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":788 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int *scounts = NULL * cdef int *sdispls = NULL */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":789 * # * cdef void *sbuf = NULL * cdef int *scounts = NULL # <<<<<<<<<<<<<< * cdef int *sdispls = NULL * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_scounts = NULL; /* "mpi4py/MPI/msgpickle.pxi":790 * cdef void *sbuf = NULL * cdef int *scounts = NULL * cdef int *sdispls = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL */ __pyx_v_sdispls = NULL; /* "mpi4py/MPI/msgpickle.pxi":791 * cdef int *scounts = NULL * cdef int *sdispls = NULL * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * cdef void *rbuf = NULL * cdef int *rcounts = NULL */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":792 * cdef int *sdispls = NULL * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int *rcounts = NULL * cdef int *rdispls = NULL */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":793 * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL * cdef int *rcounts = NULL # <<<<<<<<<<<<<< * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rcounts = NULL; /* "mpi4py/MPI/msgpickle.pxi":794 * cdef void *rbuf = NULL * cdef int *rcounts = NULL * cdef int *rdispls = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * # */ __pyx_v_rdispls = NULL; /* "mpi4py/MPI/msgpickle.pxi":795 * cdef int *rcounts = NULL * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef int inter=0, size=0 */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":797 * cdef MPI_Datatype rtype = MPI_BYTE * # * cdef int inter=0, size=0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: */ __pyx_v_inter = 0; __pyx_v_size = 0; /* "mpi4py/MPI/msgpickle.pxi":798 * # * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 798, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":799 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(comm, &size) ) * else: */ __pyx_t_2 = (__pyx_v_inter != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":800 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * else: * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 800, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":799 * cdef int inter=0, size=0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(comm, &size) ) * else: */ goto __pyx_L3; } /* "mpi4py/MPI/msgpickle.pxi":802 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * else: * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * # * cdef object tmps = None */ /*else*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 802, __pyx_L1_error) } __pyx_L3:; /* "mpi4py/MPI/msgpickle.pxi":804 * CHKERR( MPI_Comm_size(comm, &size) ) * # * cdef object tmps = None # <<<<<<<<<<<<<< * cdef object rmsg = None * cdef object tmp1, tmp2 */ __Pyx_INCREF(Py_None); __pyx_v_tmps = Py_None; /* "mpi4py/MPI/msgpickle.pxi":805 * # * cdef object tmps = None * cdef object rmsg = None # <<<<<<<<<<<<<< * cdef object tmp1, tmp2 * # */ __Pyx_INCREF(Py_None); __pyx_v_rmsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":808 * cdef object tmp1, tmp2 * # * tmp1 = allocate_count_displ(size, &scounts, &sdispls) # <<<<<<<<<<<<<< * tmp2 = allocate_count_displ(size, &rcounts, &rdispls) * tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_allocate_count_displ(__pyx_v_size, (&__pyx_v_scounts), (&__pyx_v_sdispls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":809 * # * tmp1 = allocate_count_displ(size, &scounts, &sdispls) * tmp2 = allocate_count_displ(size, &rcounts, &rdispls) # <<<<<<<<<<<<<< * tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "alltoall"): */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_allocate_count_displ(__pyx_v_size, (&__pyx_v_rcounts), (&__pyx_v_rdispls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp2 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":810 * tmp1 = allocate_count_displ(size, &scounts, &sdispls) * tmp2 = allocate_count_displ(size, &rcounts, &rdispls) * tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) # <<<<<<<<<<<<<< * with PyMPI_Lock(comm, "alltoall"): * with nogil: CHKERR( MPI_Alltoall( */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_dumpv(__pyx_v_pickle, __pyx_v_sendobj, (&__pyx_v_sbuf), __pyx_v_size, __pyx_v_scounts, __pyx_v_sdispls); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_tmps, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":811 * tmp2 = allocate_count_displ(size, &rcounts, &rdispls) * tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "alltoall"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Alltoall( * scounts, 1, MPI_INT, */ /*with:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_n_s_alltoall); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 811, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 811, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":812 * tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "alltoall"): * with nogil: CHKERR( MPI_Alltoall( # <<<<<<<<<<<<<< * scounts, 1, MPI_INT, * rcounts, 1, MPI_INT, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":815 * scounts, 1, MPI_INT, * rcounts, 1, MPI_INT, * comm) ) # <<<<<<<<<<<<<< * rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) * with nogil: CHKERR( MPI_Alltoallv( */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Alltoall(__pyx_v_scounts, 1, MPI_INT, __pyx_v_rcounts, 1, MPI_INT, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 812, __pyx_L15_error) } /* "mpi4py/MPI/msgpickle.pxi":812 * tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "alltoall"): * with nogil: CHKERR( MPI_Alltoall( # <<<<<<<<<<<<<< * scounts, 1, MPI_INT, * rcounts, 1, MPI_INT, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L16; } __pyx_L15_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8_error; } __pyx_L16:; } } /* "mpi4py/MPI/msgpickle.pxi":816 * rcounts, 1, MPI_INT, * comm) ) * rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Alltoallv( * sbuf, scounts, sdispls, stype, */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_allocv(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_size, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 816, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":817 * comm) ) * rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) * with nogil: CHKERR( MPI_Alltoallv( # <<<<<<<<<<<<<< * sbuf, scounts, sdispls, stype, * rbuf, rcounts, rdispls, rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":820 * sbuf, scounts, sdispls, stype, * rbuf, rcounts, rdispls, rtype, * comm) ) # <<<<<<<<<<<<<< * rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Alltoallv(__pyx_v_sbuf, __pyx_v_scounts, __pyx_v_sdispls, __pyx_v_stype, __pyx_v_rbuf, __pyx_v_rcounts, __pyx_v_rdispls, __pyx_v_rtype, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 817, __pyx_L18_error) } /* "mpi4py/MPI/msgpickle.pxi":817 * comm) ) * rmsg = pickle.allocv(&rbuf, size, rcounts, rdispls) * with nogil: CHKERR( MPI_Alltoallv( # <<<<<<<<<<<<<< * sbuf, scounts, sdispls, stype, * rbuf, rcounts, rdispls, rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L19; } __pyx_L18_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8_error; } __pyx_L19:; } } /* "mpi4py/MPI/msgpickle.pxi":811 * tmp2 = allocate_count_displ(size, &rcounts, &rdispls) * tmps = pickle.dumpv(sendobj, &sbuf, size, scounts, sdispls) * with PyMPI_Lock(comm, "alltoall"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Alltoall( * scounts, 1, MPI_INT, */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L13_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(6, 811, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 811, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 811, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_2 < 0) __PYX_ERR(6, 811, __pyx_L10_except_error) __pyx_t_12 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_5, __pyx_t_6); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __PYX_ERR(6, 811, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L13_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_4) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } goto __pyx_L7; } __pyx_L7:; } goto __pyx_L23; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L1_error; __pyx_L23:; } /* "mpi4py/MPI/msgpickle.pxi":821 * rbuf, rcounts, rdispls, rtype, * comm) ) * rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) # <<<<<<<<<<<<<< * # * return rmsg */ __pyx_t_6 = __pyx_f_6mpi4py_3MPI_6Pickle_loadv(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_size, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/msgpickle.pxi":823 * rmsg = pickle.loadv(rbuf, size, rcounts, rdispls) * # * return rmsg # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":785 * * * cdef object PyMPI_alltoall(object sendobj, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":826 * * * cdef object PyMPI_neighbor_allgather(object sendobj, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_neighbor_allgather(PyObject *__pyx_v_sendobj, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; void *__pyx_v_rbuf; int *__pyx_v_rcounts; int *__pyx_v_rdispls; MPI_Datatype __pyx_v_rtype; int __pyx_v_i; int __pyx_v_rsize; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_v_rmsg = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_neighbor_allgather", 0); /* "mpi4py/MPI/msgpickle.pxi":827 * * cdef object PyMPI_neighbor_allgather(object sendobj, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":829 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":830 * # * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":831 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * cdef void *rbuf = NULL * cdef int *rcounts = NULL */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":832 * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int *rcounts = NULL * cdef int *rdispls = NULL */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":833 * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL * cdef int *rcounts = NULL # <<<<<<<<<<<<<< * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rcounts = NULL; /* "mpi4py/MPI/msgpickle.pxi":834 * cdef void *rbuf = NULL * cdef int *rcounts = NULL * cdef int *rdispls = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * # */ __pyx_v_rdispls = NULL; /* "mpi4py/MPI/msgpickle.pxi":835 * cdef int *rcounts = NULL * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef int i=0, rsize=0 */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":837 * cdef MPI_Datatype rtype = MPI_BYTE * # * cdef int i=0, rsize=0 # <<<<<<<<<<<<<< * comm_neighbors_count(comm, &rsize, NULL) * # */ __pyx_v_i = 0; __pyx_v_rsize = 0; /* "mpi4py/MPI/msgpickle.pxi":838 * # * cdef int i=0, rsize=0 * comm_neighbors_count(comm, &rsize, NULL) # <<<<<<<<<<<<<< * # * cdef object tmps = None */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_neighbors_count(__pyx_v_comm, (&__pyx_v_rsize), NULL); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 838, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":840 * comm_neighbors_count(comm, &rsize, NULL) * # * cdef object tmps = None # <<<<<<<<<<<<<< * cdef object rmsg = None * cdef object tmp1 */ __Pyx_INCREF(Py_None); __pyx_v_tmps = Py_None; /* "mpi4py/MPI/msgpickle.pxi":841 * # * cdef object tmps = None * cdef object rmsg = None # <<<<<<<<<<<<<< * cdef object tmp1 * # */ __Pyx_INCREF(Py_None); __pyx_v_rmsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":844 * cdef object tmp1 * # * tmp1 = allocate_count_displ(rsize, &rcounts, &rdispls) # <<<<<<<<<<<<<< * for i from 0 <= i < rsize: rcounts[i] = 0 * tmps = pickle.dump(sendobj, &sbuf, &scount) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_allocate_count_displ(__pyx_v_rsize, (&__pyx_v_rcounts), (&__pyx_v_rdispls)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 844, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":845 * # * tmp1 = allocate_count_displ(rsize, &rcounts, &rdispls) * for i from 0 <= i < rsize: rcounts[i] = 0 # <<<<<<<<<<<<<< * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "neighbor_allgather"): */ __pyx_t_1 = __pyx_v_rsize; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { (__pyx_v_rcounts[__pyx_v_i]) = 0; } /* "mpi4py/MPI/msgpickle.pxi":846 * tmp1 = allocate_count_displ(rsize, &rcounts, &rdispls) * for i from 0 <= i < rsize: rcounts[i] = 0 * tmps = pickle.dump(sendobj, &sbuf, &scount) # <<<<<<<<<<<<<< * with PyMPI_Lock(comm, "neighbor_allgather"): * with nogil: CHKERR( MPI_Neighbor_allgather( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_sendobj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_tmps, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":847 * for i from 0 <= i < rsize: rcounts[i] = 0 * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "neighbor_allgather"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_allgather( * &scount, 1, MPI_INT, */ /*with:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_n_s_neighbor_allgather); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 847, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 847, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":848 * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "neighbor_allgather"): * with nogil: CHKERR( MPI_Neighbor_allgather( # <<<<<<<<<<<<<< * &scount, 1, MPI_INT, * rcounts, 1, MPI_INT, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":851 * &scount, 1, MPI_INT, * rcounts, 1, MPI_INT, * comm) ) # <<<<<<<<<<<<<< * rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) * with nogil: CHKERR( MPI_Neighbor_allgatherv( */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Neighbor_allgather((&__pyx_v_scount), 1, MPI_INT, __pyx_v_rcounts, 1, MPI_INT, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 848, __pyx_L16_error) } /* "mpi4py/MPI/msgpickle.pxi":848 * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "neighbor_allgather"): * with nogil: CHKERR( MPI_Neighbor_allgather( # <<<<<<<<<<<<<< * &scount, 1, MPI_INT, * rcounts, 1, MPI_INT, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L17; } __pyx_L16_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L9_error; } __pyx_L17:; } } /* "mpi4py/MPI/msgpickle.pxi":852 * rcounts, 1, MPI_INT, * comm) ) * rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_allgatherv( * sbuf, scount, stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_allocv(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rsize, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 852, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":853 * comm) ) * rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) * with nogil: CHKERR( MPI_Neighbor_allgatherv( # <<<<<<<<<<<<<< * sbuf, scount, stype, * rbuf, rcounts, rdispls, rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":856 * sbuf, scount, stype, * rbuf, rcounts, rdispls, rtype, * comm) ) # <<<<<<<<<<<<<< * rmsg = pickle.loadv(rbuf, rsize, rcounts, rdispls) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Neighbor_allgatherv(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_rbuf, __pyx_v_rcounts, __pyx_v_rdispls, __pyx_v_rtype, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 853, __pyx_L19_error) } /* "mpi4py/MPI/msgpickle.pxi":853 * comm) ) * rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) * with nogil: CHKERR( MPI_Neighbor_allgatherv( # <<<<<<<<<<<<<< * sbuf, scount, stype, * rbuf, rcounts, rdispls, rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L20; } __pyx_L19_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L9_error; } __pyx_L20:; } } /* "mpi4py/MPI/msgpickle.pxi":847 * for i from 0 <= i < rsize: rcounts[i] = 0 * tmps = pickle.dump(sendobj, &sbuf, &scount) * with PyMPI_Lock(comm, "neighbor_allgather"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_allgather( * &scount, 1, MPI_INT, */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L14_try_end; __pyx_L9_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_neighbor_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(6, 847, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 847, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 847, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < 0) __PYX_ERR(6, 847, __pyx_L11_except_error) __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __PYX_ERR(6, 847, __pyx_L11_except_error) } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L10_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L14_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L8; } __pyx_L8:; } goto __pyx_L24; __pyx_L5_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; __pyx_L24:; } /* "mpi4py/MPI/msgpickle.pxi":857 * rbuf, rcounts, rdispls, rtype, * comm) ) * rmsg = pickle.loadv(rbuf, rsize, rcounts, rdispls) # <<<<<<<<<<<<<< * # * return rmsg */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_6Pickle_loadv(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rsize, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgpickle.pxi":859 * rmsg = pickle.loadv(rbuf, rsize, rcounts, rdispls) * # * return rmsg # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":826 * * * cdef object PyMPI_neighbor_allgather(object sendobj, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_neighbor_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":862 * * * cdef object PyMPI_neighbor_alltoall(object sendobj, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_neighbor_alltoall(PyObject *__pyx_v_sendobj, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int *__pyx_v_scounts; int *__pyx_v_sdispls; MPI_Datatype __pyx_v_stype; void *__pyx_v_rbuf; int *__pyx_v_rcounts; int *__pyx_v_rdispls; MPI_Datatype __pyx_v_rtype; int __pyx_v_i; int __pyx_v_ssize; int __pyx_v_rsize; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_v_rmsg = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_neighbor_alltoall", 0); /* "mpi4py/MPI/msgpickle.pxi":863 * * cdef object PyMPI_neighbor_alltoall(object sendobj, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * # * cdef void *sbuf = NULL */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":865 * cdef Pickle pickle = PyMPI_PICKLE * # * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int *scounts = NULL * cdef int *sdispls = NULL */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":866 * # * cdef void *sbuf = NULL * cdef int *scounts = NULL # <<<<<<<<<<<<<< * cdef int *sdispls = NULL * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_scounts = NULL; /* "mpi4py/MPI/msgpickle.pxi":867 * cdef void *sbuf = NULL * cdef int *scounts = NULL * cdef int *sdispls = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL */ __pyx_v_sdispls = NULL; /* "mpi4py/MPI/msgpickle.pxi":868 * cdef int *scounts = NULL * cdef int *sdispls = NULL * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * cdef void *rbuf = NULL * cdef int *rcounts = NULL */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":869 * cdef int *sdispls = NULL * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int *rcounts = NULL * cdef int *rdispls = NULL */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":870 * cdef MPI_Datatype stype = MPI_BYTE * cdef void *rbuf = NULL * cdef int *rcounts = NULL # <<<<<<<<<<<<<< * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rcounts = NULL; /* "mpi4py/MPI/msgpickle.pxi":871 * cdef void *rbuf = NULL * cdef int *rcounts = NULL * cdef int *rdispls = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * # */ __pyx_v_rdispls = NULL; /* "mpi4py/MPI/msgpickle.pxi":872 * cdef int *rcounts = NULL * cdef int *rdispls = NULL * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * # * cdef int i=0, ssize=0, rsize=0 */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":874 * cdef MPI_Datatype rtype = MPI_BYTE * # * cdef int i=0, ssize=0, rsize=0 # <<<<<<<<<<<<<< * comm_neighbors_count(comm, &rsize, &ssize) * # */ __pyx_v_i = 0; __pyx_v_ssize = 0; __pyx_v_rsize = 0; /* "mpi4py/MPI/msgpickle.pxi":875 * # * cdef int i=0, ssize=0, rsize=0 * comm_neighbors_count(comm, &rsize, &ssize) # <<<<<<<<<<<<<< * # * cdef object tmps = None */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_neighbors_count(__pyx_v_comm, (&__pyx_v_rsize), (&__pyx_v_ssize)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 875, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":877 * comm_neighbors_count(comm, &rsize, &ssize) * # * cdef object tmps = None # <<<<<<<<<<<<<< * cdef object rmsg = None * cdef object tmp1, tmp2 */ __Pyx_INCREF(Py_None); __pyx_v_tmps = Py_None; /* "mpi4py/MPI/msgpickle.pxi":878 * # * cdef object tmps = None * cdef object rmsg = None # <<<<<<<<<<<<<< * cdef object tmp1, tmp2 * # */ __Pyx_INCREF(Py_None); __pyx_v_rmsg = Py_None; /* "mpi4py/MPI/msgpickle.pxi":881 * cdef object tmp1, tmp2 * # * tmp1 = allocate_count_displ(ssize, &scounts, &sdispls) # <<<<<<<<<<<<<< * tmp2 = allocate_count_displ(rsize, &rcounts, &rdispls) * for i from 0 <= i < rsize: rcounts[i] = 0 */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_allocate_count_displ(__pyx_v_ssize, (&__pyx_v_scounts), (&__pyx_v_sdispls)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":882 * # * tmp1 = allocate_count_displ(ssize, &scounts, &sdispls) * tmp2 = allocate_count_displ(rsize, &rcounts, &rdispls) # <<<<<<<<<<<<<< * for i from 0 <= i < rsize: rcounts[i] = 0 * tmps = pickle.dumpv(sendobj, &sbuf, ssize, scounts, sdispls) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_allocate_count_displ(__pyx_v_rsize, (&__pyx_v_rcounts), (&__pyx_v_rdispls)); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp2 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":883 * tmp1 = allocate_count_displ(ssize, &scounts, &sdispls) * tmp2 = allocate_count_displ(rsize, &rcounts, &rdispls) * for i from 0 <= i < rsize: rcounts[i] = 0 # <<<<<<<<<<<<<< * tmps = pickle.dumpv(sendobj, &sbuf, ssize, scounts, sdispls) * with PyMPI_Lock(comm, "neighbor_alltoall"): */ __pyx_t_1 = __pyx_v_rsize; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { (__pyx_v_rcounts[__pyx_v_i]) = 0; } /* "mpi4py/MPI/msgpickle.pxi":884 * tmp2 = allocate_count_displ(rsize, &rcounts, &rdispls) * for i from 0 <= i < rsize: rcounts[i] = 0 * tmps = pickle.dumpv(sendobj, &sbuf, ssize, scounts, sdispls) # <<<<<<<<<<<<<< * with PyMPI_Lock(comm, "neighbor_alltoall"): * with nogil: CHKERR( MPI_Neighbor_alltoall( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_dumpv(__pyx_v_pickle, __pyx_v_sendobj, (&__pyx_v_sbuf), __pyx_v_ssize, __pyx_v_scounts, __pyx_v_sdispls); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_tmps, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":885 * for i from 0 <= i < rsize: rcounts[i] = 0 * tmps = pickle.dumpv(sendobj, &sbuf, ssize, scounts, sdispls) * with PyMPI_Lock(comm, "neighbor_alltoall"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_alltoall( * scounts, 1, MPI_INT, */ /*with:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_n_s_neighbor_alltoall); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 885, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 885, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":886 * tmps = pickle.dumpv(sendobj, &sbuf, ssize, scounts, sdispls) * with PyMPI_Lock(comm, "neighbor_alltoall"): * with nogil: CHKERR( MPI_Neighbor_alltoall( # <<<<<<<<<<<<<< * scounts, 1, MPI_INT, * rcounts, 1, MPI_INT, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":889 * scounts, 1, MPI_INT, * rcounts, 1, MPI_INT, * comm) ) # <<<<<<<<<<<<<< * rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) * with nogil: CHKERR( MPI_Neighbor_alltoallv( */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Neighbor_alltoall(__pyx_v_scounts, 1, MPI_INT, __pyx_v_rcounts, 1, MPI_INT, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 886, __pyx_L16_error) } /* "mpi4py/MPI/msgpickle.pxi":886 * tmps = pickle.dumpv(sendobj, &sbuf, ssize, scounts, sdispls) * with PyMPI_Lock(comm, "neighbor_alltoall"): * with nogil: CHKERR( MPI_Neighbor_alltoall( # <<<<<<<<<<<<<< * scounts, 1, MPI_INT, * rcounts, 1, MPI_INT, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L17; } __pyx_L16_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L9_error; } __pyx_L17:; } } /* "mpi4py/MPI/msgpickle.pxi":890 * rcounts, 1, MPI_INT, * comm) ) * rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_alltoallv( * sbuf, scounts, sdispls, stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_allocv(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rsize, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 890, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":891 * comm) ) * rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) * with nogil: CHKERR( MPI_Neighbor_alltoallv( # <<<<<<<<<<<<<< * sbuf, scounts, sdispls, stype, * rbuf, rcounts, rdispls, rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":894 * sbuf, scounts, sdispls, stype, * rbuf, rcounts, rdispls, rtype, * comm) ) # <<<<<<<<<<<<<< * rmsg = pickle.loadv(rbuf, rsize, rcounts, rdispls) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Neighbor_alltoallv(__pyx_v_sbuf, __pyx_v_scounts, __pyx_v_sdispls, __pyx_v_stype, __pyx_v_rbuf, __pyx_v_rcounts, __pyx_v_rdispls, __pyx_v_rtype, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 891, __pyx_L19_error) } /* "mpi4py/MPI/msgpickle.pxi":891 * comm) ) * rmsg = pickle.allocv(&rbuf, rsize, rcounts, rdispls) * with nogil: CHKERR( MPI_Neighbor_alltoallv( # <<<<<<<<<<<<<< * sbuf, scounts, sdispls, stype, * rbuf, rcounts, rdispls, rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L20; } __pyx_L19_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L9_error; } __pyx_L20:; } } /* "mpi4py/MPI/msgpickle.pxi":885 * for i from 0 <= i < rsize: rcounts[i] = 0 * tmps = pickle.dumpv(sendobj, &sbuf, ssize, scounts, sdispls) * with PyMPI_Lock(comm, "neighbor_alltoall"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_alltoall( * scounts, 1, MPI_INT, */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L14_try_end; __pyx_L9_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_neighbor_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(6, 885, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 885, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 885, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < 0) __PYX_ERR(6, 885, __pyx_L11_except_error) __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __PYX_ERR(6, 885, __pyx_L11_except_error) } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L10_exception_handled; } __pyx_L11_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L10_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); __pyx_L14_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L8; } __pyx_L8:; } goto __pyx_L24; __pyx_L5_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; __pyx_L24:; } /* "mpi4py/MPI/msgpickle.pxi":895 * rbuf, rcounts, rdispls, rtype, * comm) ) * rmsg = pickle.loadv(rbuf, rsize, rcounts, rdispls) # <<<<<<<<<<<<<< * # * return rmsg */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_6Pickle_loadv(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rsize, __pyx_v_rcounts, __pyx_v_rdispls); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/msgpickle.pxi":897 * rmsg = pickle.loadv(rbuf, rsize, rcounts, rdispls) * # * return rmsg # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":862 * * * cdef object PyMPI_neighbor_alltoall(object sendobj, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * # */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_neighbor_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":901 * # ----------------------------------------------------------------------------- * * cdef inline object _py_reduce(object seq, object op): # <<<<<<<<<<<<<< * if seq is None: return None * cdef Py_ssize_t i = 0 */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI__py_reduce(PyObject *__pyx_v_seq, PyObject *__pyx_v_op) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_res = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_py_reduce", 0); /* "mpi4py/MPI/msgpickle.pxi":902 * * cdef inline object _py_reduce(object seq, object op): * if seq is None: return None # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = len(seq) */ __pyx_t_1 = (__pyx_v_seq == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":903 * cdef inline object _py_reduce(object seq, object op): * if seq is None: return None * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t n = len(seq) * cdef object res = seq[0] */ __pyx_v_i = 0; /* "mpi4py/MPI/msgpickle.pxi":904 * if seq is None: return None * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = len(seq) # <<<<<<<<<<<<<< * cdef object res = seq[0] * for i from 1 <= i < n: */ __pyx_t_3 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(6, 904, __pyx_L1_error) __pyx_v_n = __pyx_t_3; /* "mpi4py/MPI/msgpickle.pxi":905 * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = len(seq) * cdef object res = seq[0] # <<<<<<<<<<<<<< * for i from 1 <= i < n: * res = op(res, seq[i]) */ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_seq, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_res = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":906 * cdef Py_ssize_t n = len(seq) * cdef object res = seq[0] * for i from 1 <= i < n: # <<<<<<<<<<<<<< * res = op(res, seq[i]) * return res */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "mpi4py/MPI/msgpickle.pxi":907 * cdef object res = seq[0] * for i from 1 <= i < n: * res = op(res, seq[i]) # <<<<<<<<<<<<<< * return res * */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_seq, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_op); __pyx_t_6 = __pyx_v_op; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_res, __pyx_t_5}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 907, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_res, __pyx_t_5}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 907, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_v_res); __Pyx_GIVEREF(__pyx_v_res); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_res); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_4); __pyx_t_4 = 0; } /* "mpi4py/MPI/msgpickle.pxi":908 * for i from 1 <= i < n: * res = op(res, seq[i]) * return res # <<<<<<<<<<<<<< * * cdef inline object _py_scan(object seq, object op): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_res); __pyx_r = __pyx_v_res; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":901 * # ----------------------------------------------------------------------------- * * cdef inline object _py_reduce(object seq, object op): # <<<<<<<<<<<<<< * if seq is None: return None * cdef Py_ssize_t i = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("mpi4py.MPI._py_reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_res); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":910 * return res * * cdef inline object _py_scan(object seq, object op): # <<<<<<<<<<<<<< * if seq is None: return None * cdef Py_ssize_t i = 0 */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI__py_scan(PyObject *__pyx_v_seq, PyObject *__pyx_v_op) { Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("_py_scan", 0); /* "mpi4py/MPI/msgpickle.pxi":911 * * cdef inline object _py_scan(object seq, object op): * if seq is None: return None # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = len(seq) */ __pyx_t_1 = (__pyx_v_seq == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":912 * cdef inline object _py_scan(object seq, object op): * if seq is None: return None * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t n = len(seq) * for i from 1 <= i < n: */ __pyx_v_i = 0; /* "mpi4py/MPI/msgpickle.pxi":913 * if seq is None: return None * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = len(seq) # <<<<<<<<<<<<<< * for i from 1 <= i < n: * seq[i] = op(seq[i-1], seq[i]) */ __pyx_t_3 = PyObject_Length(__pyx_v_seq); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(6, 913, __pyx_L1_error) __pyx_v_n = __pyx_t_3; /* "mpi4py/MPI/msgpickle.pxi":914 * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = len(seq) * for i from 1 <= i < n: # <<<<<<<<<<<<<< * seq[i] = op(seq[i-1], seq[i]) * return seq */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "mpi4py/MPI/msgpickle.pxi":915 * cdef Py_ssize_t n = len(seq) * for i from 1 <= i < n: * seq[i] = op(seq[i-1], seq[i]) # <<<<<<<<<<<<<< * return seq * */ __pyx_t_5 = (__pyx_v_i - 1); __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_seq, __pyx_t_5, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_seq, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_op); __pyx_t_8 = __pyx_v_op; __pyx_t_9 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_t_7}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 915, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_6, __pyx_t_7}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 915, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_v_seq, __pyx_v_i, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) __PYX_ERR(6, 915, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "mpi4py/MPI/msgpickle.pxi":916 * for i from 1 <= i < n: * seq[i] = op(seq[i-1], seq[i]) * return seq # <<<<<<<<<<<<<< * * cdef inline object _py_exscan(object seq, object op): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_seq); __pyx_r = __pyx_v_seq; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":910 * return res * * cdef inline object _py_scan(object seq, object op): # <<<<<<<<<<<<<< * if seq is None: return None * cdef Py_ssize_t i = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("mpi4py.MPI._py_scan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":918 * return seq * * cdef inline object _py_exscan(object seq, object op): # <<<<<<<<<<<<<< * if seq is None: return None * seq = _py_scan(seq, op) */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI__py_exscan(PyObject *__pyx_v_seq, PyObject *__pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_py_exscan", 0); __Pyx_INCREF(__pyx_v_seq); /* "mpi4py/MPI/msgpickle.pxi":919 * * cdef inline object _py_exscan(object seq, object op): * if seq is None: return None # <<<<<<<<<<<<<< * seq = _py_scan(seq, op) * seq.pop(-1) */ __pyx_t_1 = (__pyx_v_seq == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":920 * cdef inline object _py_exscan(object seq, object op): * if seq is None: return None * seq = _py_scan(seq, op) # <<<<<<<<<<<<<< * seq.pop(-1) * seq.insert(0, None) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI__py_scan(__pyx_v_seq, __pyx_v_op); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_seq, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":921 * if seq is None: return None * seq = _py_scan(seq, op) * seq.pop(-1) # <<<<<<<<<<<<<< * seq.insert(0, None) * return seq */ __pyx_t_3 = __Pyx_PyObject_PopIndex(__pyx_v_seq, __pyx_int_neg_1, -1L, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":922 * seq = _py_scan(seq, op) * seq.pop(-1) * seq.insert(0, None) # <<<<<<<<<<<<<< * return seq * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_seq, __pyx_n_s_insert); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":923 * seq.pop(-1) * seq.insert(0, None) * return seq # <<<<<<<<<<<<<< * * cdef object PyMPI_reduce_naive(object sendobj, object op, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_seq); __pyx_r = __pyx_v_seq; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":918 * return seq * * cdef inline object _py_exscan(object seq, object op): # <<<<<<<<<<<<<< * if seq is None: return None * seq = _py_scan(seq, op) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI._py_exscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_seq); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":925 * return seq * * cdef object PyMPI_reduce_naive(object sendobj, object op, # <<<<<<<<<<<<<< * int root, MPI_Comm comm): * cdef object items = PyMPI_gather(sendobj, root, comm) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce_naive(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, int __pyx_v_root, MPI_Comm __pyx_v_comm) { PyObject *__pyx_v_items = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyMPI_reduce_naive", 0); /* "mpi4py/MPI/msgpickle.pxi":927 * cdef object PyMPI_reduce_naive(object sendobj, object op, * int root, MPI_Comm comm): * cdef object items = PyMPI_gather(sendobj, root, comm) # <<<<<<<<<<<<<< * return _py_reduce(items, op) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_gather(__pyx_v_sendobj, __pyx_v_root, __pyx_v_comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_items = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":928 * int root, MPI_Comm comm): * cdef object items = PyMPI_gather(sendobj, root, comm) * return _py_reduce(items, op) # <<<<<<<<<<<<<< * * cdef object PyMPI_allreduce_naive(object sendobj, object op, MPI_Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI__py_reduce(__pyx_v_items, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":925 * return seq * * cdef object PyMPI_reduce_naive(object sendobj, object op, # <<<<<<<<<<<<<< * int root, MPI_Comm comm): * cdef object items = PyMPI_gather(sendobj, root, comm) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_reduce_naive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_items); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":930 * return _py_reduce(items, op) * * cdef object PyMPI_allreduce_naive(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef object items = PyMPI_allgather(sendobj, comm) * return _py_reduce(items, op) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allreduce_naive(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { PyObject *__pyx_v_items = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyMPI_allreduce_naive", 0); /* "mpi4py/MPI/msgpickle.pxi":931 * * cdef object PyMPI_allreduce_naive(object sendobj, object op, MPI_Comm comm): * cdef object items = PyMPI_allgather(sendobj, comm) # <<<<<<<<<<<<<< * return _py_reduce(items, op) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_allgather(__pyx_v_sendobj, __pyx_v_comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_items = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":932 * cdef object PyMPI_allreduce_naive(object sendobj, object op, MPI_Comm comm): * cdef object items = PyMPI_allgather(sendobj, comm) * return _py_reduce(items, op) # <<<<<<<<<<<<<< * * cdef object PyMPI_scan_naive(object sendobj, object op, MPI_Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI__py_reduce(__pyx_v_items, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":930 * return _py_reduce(items, op) * * cdef object PyMPI_allreduce_naive(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef object items = PyMPI_allgather(sendobj, comm) * return _py_reduce(items, op) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_allreduce_naive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_items); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":934 * return _py_reduce(items, op) * * cdef object PyMPI_scan_naive(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef object items = PyMPI_gather(sendobj, 0, comm) * items = _py_scan(items, op) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scan_naive(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { PyObject *__pyx_v_items = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyMPI_scan_naive", 0); /* "mpi4py/MPI/msgpickle.pxi":935 * * cdef object PyMPI_scan_naive(object sendobj, object op, MPI_Comm comm): * cdef object items = PyMPI_gather(sendobj, 0, comm) # <<<<<<<<<<<<<< * items = _py_scan(items, op) * return PyMPI_scatter(items, 0, comm) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_gather(__pyx_v_sendobj, 0, __pyx_v_comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_items = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":936 * cdef object PyMPI_scan_naive(object sendobj, object op, MPI_Comm comm): * cdef object items = PyMPI_gather(sendobj, 0, comm) * items = _py_scan(items, op) # <<<<<<<<<<<<<< * return PyMPI_scatter(items, 0, comm) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__py_scan(__pyx_v_items, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_items, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":937 * cdef object items = PyMPI_gather(sendobj, 0, comm) * items = _py_scan(items, op) * return PyMPI_scatter(items, 0, comm) # <<<<<<<<<<<<<< * * cdef object PyMPI_exscan_naive(object sendobj, object op, MPI_Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_scatter(__pyx_v_items, 0, __pyx_v_comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":934 * return _py_reduce(items, op) * * cdef object PyMPI_scan_naive(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef object items = PyMPI_gather(sendobj, 0, comm) * items = _py_scan(items, op) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_scan_naive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_items); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":939 * return PyMPI_scatter(items, 0, comm) * * cdef object PyMPI_exscan_naive(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef object items = PyMPI_gather(sendobj, 0, comm) * items = _py_exscan(items, op) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_exscan_naive(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { PyObject *__pyx_v_items = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyMPI_exscan_naive", 0); /* "mpi4py/MPI/msgpickle.pxi":940 * * cdef object PyMPI_exscan_naive(object sendobj, object op, MPI_Comm comm): * cdef object items = PyMPI_gather(sendobj, 0, comm) # <<<<<<<<<<<<<< * items = _py_exscan(items, op) * return PyMPI_scatter(items, 0, comm) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_gather(__pyx_v_sendobj, 0, __pyx_v_comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_items = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":941 * cdef object PyMPI_exscan_naive(object sendobj, object op, MPI_Comm comm): * cdef object items = PyMPI_gather(sendobj, 0, comm) * items = _py_exscan(items, op) # <<<<<<<<<<<<<< * return PyMPI_scatter(items, 0, comm) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__py_exscan(__pyx_v_items, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_items, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":942 * cdef object items = PyMPI_gather(sendobj, 0, comm) * items = _py_exscan(items, op) * return PyMPI_scatter(items, 0, comm) # <<<<<<<<<<<<<< * * # ----- */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_scatter(__pyx_v_items, 0, __pyx_v_comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":939 * return PyMPI_scatter(items, 0, comm) * * cdef object PyMPI_exscan_naive(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef object items = PyMPI_gather(sendobj, 0, comm) * items = _py_exscan(items, op) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_exscan_naive", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_items); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":946 * # ----- * * cdef inline object PyMPI_copy(object obj): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *buf = NULL */ static CYTHON_INLINE PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_copy(PyObject *__pyx_v_obj) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_buf; int __pyx_v_count; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyMPI_copy", 0); __Pyx_INCREF(__pyx_v_obj); /* "mpi4py/MPI/msgpickle.pxi":947 * * cdef inline object PyMPI_copy(object obj): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * cdef void *buf = NULL * cdef int count = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":948 * cdef inline object PyMPI_copy(object obj): * cdef Pickle pickle = PyMPI_PICKLE * cdef void *buf = NULL # <<<<<<<<<<<<<< * cdef int count = 0 * obj = pickle.dump(obj, &buf, &count) */ __pyx_v_buf = NULL; /* "mpi4py/MPI/msgpickle.pxi":949 * cdef Pickle pickle = PyMPI_PICKLE * cdef void *buf = NULL * cdef int count = 0 # <<<<<<<<<<<<<< * obj = pickle.dump(obj, &buf, &count) * return pickle.load(buf, count) */ __pyx_v_count = 0; /* "mpi4py/MPI/msgpickle.pxi":950 * cdef void *buf = NULL * cdef int count = 0 * obj = pickle.dump(obj, &buf, &count) # <<<<<<<<<<<<<< * return pickle.load(buf, count) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_buf), (&__pyx_v_count)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":951 * cdef int count = 0 * obj = pickle.dump(obj, &buf, &count) * return pickle.load(buf, count) # <<<<<<<<<<<<<< * * cdef object PyMPI_send_p2p(object obj, int dst, int tag, MPI_Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_buf, __pyx_v_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":946 * # ----- * * cdef inline object PyMPI_copy(object obj): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *buf = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":953 * return pickle.load(buf, count) * * cdef object PyMPI_send_p2p(object obj, int dst, int tag, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *sbuf = NULL */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_send_p2p(PyObject *__pyx_v_obj, int __pyx_v_dst, int __pyx_v_tag, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; int __pyx_v_scount; MPI_Datatype __pyx_v_stype; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PyMPI_send_p2p", 0); /* "mpi4py/MPI/msgpickle.pxi":954 * * cdef object PyMPI_send_p2p(object obj, int dst, int tag, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * cdef void *sbuf = NULL * cdef int scount = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":955 * cdef object PyMPI_send_p2p(object obj, int dst, int tag, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE * cdef void *sbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE */ __pyx_v_sbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":956 * cdef Pickle pickle = PyMPI_PICKLE * cdef void *sbuf = NULL * cdef int scount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype stype = MPI_BYTE * cdef object tmps = pickle.dump(obj, &sbuf, &scount) */ __pyx_v_scount = 0; /* "mpi4py/MPI/msgpickle.pxi":957 * cdef void *sbuf = NULL * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE # <<<<<<<<<<<<<< * cdef object tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Send(&scount, 1, MPI_INT, dst, tag, comm) ) */ __pyx_v_stype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":958 * cdef int scount = 0 * cdef MPI_Datatype stype = MPI_BYTE * cdef object tmps = pickle.dump(obj, &sbuf, &scount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Send(&scount, 1, MPI_INT, dst, tag, comm) ) * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, dst, tag, comm) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmps = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":959 * cdef MPI_Datatype stype = MPI_BYTE * cdef object tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Send(&scount, 1, MPI_INT, dst, tag, comm) ) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, dst, tag, comm) ) * return None */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Send((&__pyx_v_scount), 1, MPI_INT, __pyx_v_dst, __pyx_v_tag, __pyx_v_comm)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 959, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":960 * cdef object tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Send(&scount, 1, MPI_INT, dst, tag, comm) ) * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, dst, tag, comm) ) # <<<<<<<<<<<<<< * return None * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Send(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_stype, __pyx_v_dst, __pyx_v_tag, __pyx_v_comm)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 960, __pyx_L7_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L8:; } } /* "mpi4py/MPI/msgpickle.pxi":961 * with nogil: CHKERR( MPI_Send(&scount, 1, MPI_INT, dst, tag, comm) ) * with nogil: CHKERR( MPI_Send(sbuf, scount, stype, dst, tag, comm) ) * return None # <<<<<<<<<<<<<< * * cdef object PyMPI_recv_p2p(int src, int tag, MPI_Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":953 * return pickle.load(buf, count) * * cdef object PyMPI_send_p2p(object obj, int dst, int tag, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *sbuf = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_send_p2p", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":963 * return None * * cdef object PyMPI_recv_p2p(int src, int tag, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *rbuf = NULL */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_recv_p2p(int __pyx_v_src, int __pyx_v_tag, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_rbuf; int __pyx_v_rcount; MPI_Datatype __pyx_v_rtype; MPI_Status *__pyx_v_status; CYTHON_UNUSED PyObject *__pyx_v_tmpr = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPI_recv_p2p", 0); /* "mpi4py/MPI/msgpickle.pxi":964 * * cdef object PyMPI_recv_p2p(int src, int tag, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * cdef void *rbuf = NULL * cdef int rcount = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":965 * cdef object PyMPI_recv_p2p(int src, int tag, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE * cdef void *rbuf = NULL # <<<<<<<<<<<<<< * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE */ __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":966 * cdef Pickle pickle = PyMPI_PICKLE * cdef void *rbuf = NULL * cdef int rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype rtype = MPI_BYTE * cdef MPI_Status *status = MPI_STATUS_IGNORE */ __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":967 * cdef void *rbuf = NULL * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE # <<<<<<<<<<<<<< * cdef MPI_Status *status = MPI_STATUS_IGNORE * with nogil: CHKERR( MPI_Recv(&rcount, 1, MPI_INT, src, tag, comm, status) ) */ __pyx_v_rtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":968 * cdef int rcount = 0 * cdef MPI_Datatype rtype = MPI_BYTE * cdef MPI_Status *status = MPI_STATUS_IGNORE # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Recv(&rcount, 1, MPI_INT, src, tag, comm, status) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) */ __pyx_v_status = MPI_STATUS_IGNORE; /* "mpi4py/MPI/msgpickle.pxi":969 * cdef MPI_Datatype rtype = MPI_BYTE * cdef MPI_Status *status = MPI_STATUS_IGNORE * with nogil: CHKERR( MPI_Recv(&rcount, 1, MPI_INT, src, tag, comm, status) ) # <<<<<<<<<<<<<< * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: CHKERR( MPI_Recv(rbuf, rcount, rtype, src, tag, comm, status) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Recv((&__pyx_v_rcount), 1, MPI_INT, __pyx_v_src, __pyx_v_tag, __pyx_v_comm, __pyx_v_status)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 969, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":970 * cdef MPI_Status *status = MPI_STATUS_IGNORE * with nogil: CHKERR( MPI_Recv(&rcount, 1, MPI_INT, src, tag, comm, status) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Recv(rbuf, rcount, rtype, src, tag, comm, status) ) * return pickle.load(rbuf, rcount) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmpr = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":971 * with nogil: CHKERR( MPI_Recv(&rcount, 1, MPI_INT, src, tag, comm, status) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: CHKERR( MPI_Recv(rbuf, rcount, rtype, src, tag, comm, status) ) # <<<<<<<<<<<<<< * return pickle.load(rbuf, rcount) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Recv(__pyx_v_rbuf, __pyx_v_rcount, __pyx_v_rtype, __pyx_v_src, __pyx_v_tag, __pyx_v_comm, __pyx_v_status)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 971, __pyx_L7_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L8:; } } /* "mpi4py/MPI/msgpickle.pxi":972 * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: CHKERR( MPI_Recv(rbuf, rcount, rtype, src, tag, comm, status) ) * return pickle.load(rbuf, rcount) # <<<<<<<<<<<<<< * * cdef object PyMPI_sendrecv_p2p(object obj, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rcount); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":963 * return None * * cdef object PyMPI_recv_p2p(int src, int tag, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *rbuf = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_recv_p2p", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":974 * return pickle.load(rbuf, rcount) * * cdef object PyMPI_sendrecv_p2p(object obj, # <<<<<<<<<<<<<< * int dst, int stag, * int src, int rtag, */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_sendrecv_p2p(PyObject *__pyx_v_obj, int __pyx_v_dst, int __pyx_v_stag, int __pyx_v_src, int __pyx_v_rtag, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_sbuf; void *__pyx_v_rbuf; int __pyx_v_scount; int __pyx_v_rcount; MPI_Datatype __pyx_v_dtype; CYTHON_UNUSED PyObject *__pyx_v_tmps = 0; CYTHON_UNUSED PyObject *__pyx_v_tmpr = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("PyMPI_sendrecv_p2p", 0); /* "mpi4py/MPI/msgpickle.pxi":978 * int src, int rtag, * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * cdef void *sbuf = NULL, *rbuf = NULL * cdef int scount = 0, rcount = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":979 * MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE * cdef void *sbuf = NULL, *rbuf = NULL # <<<<<<<<<<<<<< * cdef int scount = 0, rcount = 0 * cdef MPI_Datatype dtype = MPI_BYTE */ __pyx_v_sbuf = NULL; __pyx_v_rbuf = NULL; /* "mpi4py/MPI/msgpickle.pxi":980 * cdef Pickle pickle = PyMPI_PICKLE * cdef void *sbuf = NULL, *rbuf = NULL * cdef int scount = 0, rcount = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype dtype = MPI_BYTE * cdef object tmps = pickle.dump(obj, &sbuf, &scount) */ __pyx_v_scount = 0; __pyx_v_rcount = 0; /* "mpi4py/MPI/msgpickle.pxi":981 * cdef void *sbuf = NULL, *rbuf = NULL * cdef int scount = 0, rcount = 0 * cdef MPI_Datatype dtype = MPI_BYTE # <<<<<<<<<<<<<< * cdef object tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Sendrecv(&scount, 1, MPI_INT, dst, stag, */ __pyx_v_dtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":982 * cdef int scount = 0, rcount = 0 * cdef MPI_Datatype dtype = MPI_BYTE * cdef object tmps = pickle.dump(obj, &sbuf, &scount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Sendrecv(&scount, 1, MPI_INT, dst, stag, * &rcount, 1, MPI_INT, src, rtag, */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_sbuf), (&__pyx_v_scount)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmps = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":983 * cdef MPI_Datatype dtype = MPI_BYTE * cdef object tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Sendrecv(&scount, 1, MPI_INT, dst, stag, # <<<<<<<<<<<<<< * &rcount, 1, MPI_INT, src, rtag, * comm, MPI_STATUS_IGNORE) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":985 * with nogil: CHKERR( MPI_Sendrecv(&scount, 1, MPI_INT, dst, stag, * &rcount, 1, MPI_INT, src, rtag, * comm, MPI_STATUS_IGNORE) ) # <<<<<<<<<<<<<< * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: CHKERR( MPI_Sendrecv(sbuf, scount, dtype, dst, stag, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Sendrecv((&__pyx_v_scount), 1, MPI_INT, __pyx_v_dst, __pyx_v_stag, (&__pyx_v_rcount), 1, MPI_INT, __pyx_v_src, __pyx_v_rtag, __pyx_v_comm, MPI_STATUS_IGNORE)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 983, __pyx_L4_error) } /* "mpi4py/MPI/msgpickle.pxi":983 * cdef MPI_Datatype dtype = MPI_BYTE * cdef object tmps = pickle.dump(obj, &sbuf, &scount) * with nogil: CHKERR( MPI_Sendrecv(&scount, 1, MPI_INT, dst, stag, # <<<<<<<<<<<<<< * &rcount, 1, MPI_INT, src, rtag, * comm, MPI_STATUS_IGNORE) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/msgpickle.pxi":986 * &rcount, 1, MPI_INT, src, rtag, * comm, MPI_STATUS_IGNORE) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Sendrecv(sbuf, scount, dtype, dst, stag, * rbuf, rcount, dtype, src, rtag, */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_rbuf), __pyx_v_rcount); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmpr = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":987 * comm, MPI_STATUS_IGNORE) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: CHKERR( MPI_Sendrecv(sbuf, scount, dtype, dst, stag, # <<<<<<<<<<<<<< * rbuf, rcount, dtype, src, rtag, * comm, MPI_STATUS_IGNORE) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":989 * with nogil: CHKERR( MPI_Sendrecv(sbuf, scount, dtype, dst, stag, * rbuf, rcount, dtype, src, rtag, * comm, MPI_STATUS_IGNORE) ) # <<<<<<<<<<<<<< * return pickle.load(rbuf, rcount) * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Sendrecv(__pyx_v_sbuf, __pyx_v_scount, __pyx_v_dtype, __pyx_v_dst, __pyx_v_stag, __pyx_v_rbuf, __pyx_v_rcount, __pyx_v_dtype, __pyx_v_src, __pyx_v_rtag, __pyx_v_comm, MPI_STATUS_IGNORE)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(6, 987, __pyx_L7_error) } /* "mpi4py/MPI/msgpickle.pxi":987 * comm, MPI_STATUS_IGNORE) ) * cdef object tmpr = pickle.alloc(&rbuf, rcount) * with nogil: CHKERR( MPI_Sendrecv(sbuf, scount, dtype, dst, stag, # <<<<<<<<<<<<<< * rbuf, rcount, dtype, src, rtag, * comm, MPI_STATUS_IGNORE) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L8:; } } /* "mpi4py/MPI/msgpickle.pxi":990 * rbuf, rcount, dtype, src, rtag, * comm, MPI_STATUS_IGNORE) ) * return pickle.load(rbuf, rcount) # <<<<<<<<<<<<<< * * cdef object PyMPI_bcast_p2p(object obj, int root, MPI_Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_rbuf, __pyx_v_rcount); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":974 * return pickle.load(rbuf, rcount) * * cdef object PyMPI_sendrecv_p2p(object obj, # <<<<<<<<<<<<<< * int dst, int stag, * int src, int rtag, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_sendrecv_p2p", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_tmps); __Pyx_XDECREF(__pyx_v_tmpr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":992 * return pickle.load(rbuf, rcount) * * cdef object PyMPI_bcast_p2p(object obj, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *buf = NULL */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_bcast_p2p(PyObject *__pyx_v_obj, int __pyx_v_root, MPI_Comm __pyx_v_comm) { struct __pyx_obj_6mpi4py_3MPI_Pickle *__pyx_v_pickle = 0; void *__pyx_v_buf; int __pyx_v_count; MPI_Datatype __pyx_v_dtype; int __pyx_v_rank; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_bcast_p2p", 0); __Pyx_INCREF(__pyx_v_obj); /* "mpi4py/MPI/msgpickle.pxi":993 * * cdef object PyMPI_bcast_p2p(object obj, int root, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * cdef void *buf = NULL * cdef int count = 0 */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __pyx_v_pickle = __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE; /* "mpi4py/MPI/msgpickle.pxi":994 * cdef object PyMPI_bcast_p2p(object obj, int root, MPI_Comm comm): * cdef Pickle pickle = PyMPI_PICKLE * cdef void *buf = NULL # <<<<<<<<<<<<<< * cdef int count = 0 * cdef MPI_Datatype dtype = MPI_BYTE */ __pyx_v_buf = NULL; /* "mpi4py/MPI/msgpickle.pxi":995 * cdef Pickle pickle = PyMPI_PICKLE * cdef void *buf = NULL * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Datatype dtype = MPI_BYTE * cdef int rank = MPI_PROC_NULL */ __pyx_v_count = 0; /* "mpi4py/MPI/msgpickle.pxi":996 * cdef void *buf = NULL * cdef int count = 0 * cdef MPI_Datatype dtype = MPI_BYTE # <<<<<<<<<<<<<< * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_v_dtype = MPI_BYTE; /* "mpi4py/MPI/msgpickle.pxi":997 * cdef int count = 0 * cdef MPI_Datatype dtype = MPI_BYTE * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: obj = pickle.dump(obj, &buf, &count) */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/msgpickle.pxi":998 * cdef MPI_Datatype dtype = MPI_BYTE * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * if root == rank: obj = pickle.dump(obj, &buf, &count) * with PyMPI_Lock(comm, "@bcast_p2p@"): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 998, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":999 * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: obj = pickle.dump(obj, &buf, &count) # <<<<<<<<<<<<<< * with PyMPI_Lock(comm, "@bcast_p2p@"): * with nogil: CHKERR( MPI_Bcast(&count, 1, MPI_INT, root, comm) ) */ __pyx_t_2 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_dump(__pyx_v_pickle, __pyx_v_obj, (&__pyx_v_buf), (&__pyx_v_count)); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/msgpickle.pxi":1000 * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: obj = pickle.dump(obj, &buf, &count) * with PyMPI_Lock(comm, "@bcast_p2p@"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bcast(&count, 1, MPI_INT, root, comm) ) * if root != rank: obj = pickle.alloc(&buf, count) */ /*with:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_kp_s_bcast_p2p); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1000, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1000, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":1001 * if root == rank: obj = pickle.dump(obj, &buf, &count) * with PyMPI_Lock(comm, "@bcast_p2p@"): * with nogil: CHKERR( MPI_Bcast(&count, 1, MPI_INT, root, comm) ) # <<<<<<<<<<<<<< * if root != rank: obj = pickle.alloc(&buf, count) * with nogil: CHKERR( MPI_Bcast(buf, count, dtype, root, comm) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Bcast((&__pyx_v_count), 1, MPI_INT, __pyx_v_root, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1001, __pyx_L15_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L16; } __pyx_L15_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8_error; } __pyx_L16:; } } /* "mpi4py/MPI/msgpickle.pxi":1002 * with PyMPI_Lock(comm, "@bcast_p2p@"): * with nogil: CHKERR( MPI_Bcast(&count, 1, MPI_INT, root, comm) ) * if root != rank: obj = pickle.alloc(&buf, count) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bcast(buf, count, dtype, root, comm) ) * return pickle.load(buf, count) */ __pyx_t_2 = ((__pyx_v_root != __pyx_v_rank) != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_6Pickle_alloc(__pyx_v_pickle, (&__pyx_v_buf), __pyx_v_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1002, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/msgpickle.pxi":1003 * with nogil: CHKERR( MPI_Bcast(&count, 1, MPI_INT, root, comm) ) * if root != rank: obj = pickle.alloc(&buf, count) * with nogil: CHKERR( MPI_Bcast(buf, count, dtype, root, comm) ) # <<<<<<<<<<<<<< * return pickle.load(buf, count) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Bcast(__pyx_v_buf, __pyx_v_count, __pyx_v_dtype, __pyx_v_root, __pyx_v_comm)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1003, __pyx_L19_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L20; } __pyx_L19_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8_error; } __pyx_L20:; } } /* "mpi4py/MPI/msgpickle.pxi":1000 * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root == rank: obj = pickle.dump(obj, &buf, &count) * with PyMPI_Lock(comm, "@bcast_p2p@"): # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bcast(&count, 1, MPI_INT, root, comm) ) * if root != rank: obj = pickle.alloc(&buf, count) */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L13_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_bcast_p2p", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(6, 1000, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 1000, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(6, 1000, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_2 < 0) __PYX_ERR(6, 1000, __pyx_L10_except_error) __pyx_t_12 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_5, __pyx_t_6); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __PYX_ERR(6, 1000, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_L13_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_4) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 1000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } goto __pyx_L7; } __pyx_L7:; } goto __pyx_L24; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L1_error; __pyx_L24:; } /* "mpi4py/MPI/msgpickle.pxi":1004 * if root != rank: obj = pickle.alloc(&buf, count) * with nogil: CHKERR( MPI_Bcast(buf, count, dtype, root, comm) ) * return pickle.load(buf, count) # <<<<<<<<<<<<<< * * cdef object PyMPI_reduce_p2p(object sendobj, object op, int root, */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __pyx_f_6mpi4py_3MPI_6Pickle_load(__pyx_v_pickle, __pyx_v_buf, __pyx_v_count); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":992 * return pickle.load(rbuf, rcount) * * cdef object PyMPI_bcast_p2p(object obj, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef Pickle pickle = PyMPI_PICKLE * cdef void *buf = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_bcast_p2p", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pickle); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1006 * return pickle.load(buf, count) * * cdef object PyMPI_reduce_p2p(object sendobj, object op, int root, # <<<<<<<<<<<<<< * MPI_Comm comm, int tag): * # Get communicator size and rank */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce_p2p(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, int __pyx_v_root, MPI_Comm __pyx_v_comm, int __pyx_v_tag) { int __pyx_v_size; int __pyx_v_rank; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_tmp = 0; unsigned int __pyx_v_umask; unsigned int __pyx_v_usize; unsigned int __pyx_v_urank; int __pyx_v_target; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("PyMPI_reduce_p2p", 0); /* "mpi4py/MPI/msgpickle.pxi":1009 * MPI_Comm comm, int tag): * # Get communicator size and rank * cdef int size = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_v_size = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1010 * # Get communicator size and rank * cdef int size = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/msgpickle.pxi":1011 * cdef int size = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * # Check root argument */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1011, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1012 * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * # Check root argument * if root < 0 or root >= size: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1012, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1014 * CHKERR( MPI_Comm_rank(comm, &rank) ) * # Check root argument * if root < 0 or root >= size: # <<<<<<<<<<<<<< * MPI_Comm_call_errhandler(comm, MPI_ERR_ROOT) * raise MPIException(MPI_ERR_ROOT) */ __pyx_t_3 = ((__pyx_v_root < 0) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = ((__pyx_v_root >= __pyx_v_size) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/msgpickle.pxi":1015 * # Check root argument * if root < 0 or root >= size: * MPI_Comm_call_errhandler(comm, MPI_ERR_ROOT) # <<<<<<<<<<<<<< * raise MPIException(MPI_ERR_ROOT) * # */ ((void)MPI_Comm_call_errhandler(__pyx_v_comm, MPI_ERR_ROOT)); /* "mpi4py/MPI/msgpickle.pxi":1016 * if root < 0 or root >= size: * MPI_Comm_call_errhandler(comm, MPI_ERR_ROOT) * raise MPIException(MPI_ERR_ROOT) # <<<<<<<<<<<<<< * # * cdef object result = PyMPI_copy(sendobj) */ __pyx_t_5 = __Pyx_PyInt_From_int(MPI_ERR_ROOT); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_MPIException); __pyx_t_6 = __pyx_v_6mpi4py_3MPI_MPIException; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(6, 1016, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1014 * CHKERR( MPI_Comm_rank(comm, &rank) ) * # Check root argument * if root < 0 or root >= size: # <<<<<<<<<<<<<< * MPI_Comm_call_errhandler(comm, MPI_ERR_ROOT) * raise MPIException(MPI_ERR_ROOT) */ } /* "mpi4py/MPI/msgpickle.pxi":1018 * raise MPIException(MPI_ERR_ROOT) * # * cdef object result = PyMPI_copy(sendobj) # <<<<<<<<<<<<<< * cdef object tmp * # Compute reduction at process 0 */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_copy(__pyx_v_sendobj); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_result = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":1021 * cdef object tmp * # Compute reduction at process 0 * cdef unsigned int umask = 1 # <<<<<<<<<<<<<< * cdef unsigned int usize = size * cdef unsigned int urank = rank */ __pyx_v_umask = ((unsigned int)1); /* "mpi4py/MPI/msgpickle.pxi":1022 * # Compute reduction at process 0 * cdef unsigned int umask = 1 * cdef unsigned int usize = size # <<<<<<<<<<<<<< * cdef unsigned int urank = rank * cdef int target = 0 */ __pyx_v_usize = ((unsigned int)__pyx_v_size); /* "mpi4py/MPI/msgpickle.pxi":1023 * cdef unsigned int umask = 1 * cdef unsigned int usize = size * cdef unsigned int urank = rank # <<<<<<<<<<<<<< * cdef int target = 0 * while umask < usize: */ __pyx_v_urank = ((unsigned int)__pyx_v_rank); /* "mpi4py/MPI/msgpickle.pxi":1024 * cdef unsigned int usize = size * cdef unsigned int urank = rank * cdef int target = 0 # <<<<<<<<<<<<<< * while umask < usize: * if (umask & urank) != 0: */ __pyx_v_target = 0; /* "mpi4py/MPI/msgpickle.pxi":1025 * cdef unsigned int urank = rank * cdef int target = 0 * while umask < usize: # <<<<<<<<<<<<<< * if (umask & urank) != 0: * target = ((urank & ~umask) % usize) */ while (1) { __pyx_t_2 = ((__pyx_v_umask < __pyx_v_usize) != 0); if (!__pyx_t_2) break; /* "mpi4py/MPI/msgpickle.pxi":1026 * cdef int target = 0 * while umask < usize: * if (umask & urank) != 0: # <<<<<<<<<<<<<< * target = ((urank & ~umask) % usize) * PyMPI_send_p2p(result, target, tag, comm) */ __pyx_t_2 = (((__pyx_v_umask & __pyx_v_urank) != 0) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":1027 * while umask < usize: * if (umask & urank) != 0: * target = ((urank & ~umask) % usize) # <<<<<<<<<<<<<< * PyMPI_send_p2p(result, target, tag, comm) * else: */ __pyx_v_target = ((int)((__pyx_v_urank & (~__pyx_v_umask)) % __pyx_v_usize)); /* "mpi4py/MPI/msgpickle.pxi":1028 * if (umask & urank) != 0: * target = ((urank & ~umask) % usize) * PyMPI_send_p2p(result, target, tag, comm) # <<<<<<<<<<<<<< * else: * target = (urank | umask) */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_send_p2p(__pyx_v_result, __pyx_v_target, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":1026 * cdef int target = 0 * while umask < usize: * if (umask & urank) != 0: # <<<<<<<<<<<<<< * target = ((urank & ~umask) % usize) * PyMPI_send_p2p(result, target, tag, comm) */ goto __pyx_L8; } /* "mpi4py/MPI/msgpickle.pxi":1030 * PyMPI_send_p2p(result, target, tag, comm) * else: * target = (urank | umask) # <<<<<<<<<<<<<< * if target < size: * tmp = PyMPI_recv_p2p(target, tag, comm) */ /*else*/ { __pyx_v_target = ((int)(__pyx_v_urank | __pyx_v_umask)); /* "mpi4py/MPI/msgpickle.pxi":1031 * else: * target = (urank | umask) * if target < size: # <<<<<<<<<<<<<< * tmp = PyMPI_recv_p2p(target, tag, comm) * result = op(result, tmp) */ __pyx_t_2 = ((__pyx_v_target < __pyx_v_size) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":1032 * target = (urank | umask) * if target < size: * tmp = PyMPI_recv_p2p(target, tag, comm) # <<<<<<<<<<<<<< * result = op(result, tmp) * umask <<= 1 */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_recv_p2p(__pyx_v_target, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":1033 * if target < size: * tmp = PyMPI_recv_p2p(target, tag, comm) * result = op(result, tmp) # <<<<<<<<<<<<<< * umask <<= 1 * # Send reduction to root */ __Pyx_INCREF(__pyx_v_op); __pyx_t_6 = __pyx_v_op; __pyx_t_5 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_result, __pyx_v_tmp}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1033, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_result, __pyx_v_tmp}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1033, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(6, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_1, __pyx_v_result); __Pyx_INCREF(__pyx_v_tmp); __Pyx_GIVEREF(__pyx_v_tmp); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_1, __pyx_v_tmp); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":1031 * else: * target = (urank | umask) * if target < size: # <<<<<<<<<<<<<< * tmp = PyMPI_recv_p2p(target, tag, comm) * result = op(result, tmp) */ } } __pyx_L8:; /* "mpi4py/MPI/msgpickle.pxi":1034 * tmp = PyMPI_recv_p2p(target, tag, comm) * result = op(result, tmp) * umask <<= 1 # <<<<<<<<<<<<<< * # Send reduction to root * if root != 0: */ __pyx_v_umask = (__pyx_v_umask << 1); } /* "mpi4py/MPI/msgpickle.pxi":1036 * umask <<= 1 * # Send reduction to root * if root != 0: # <<<<<<<<<<<<<< * if rank == 0: * PyMPI_send_p2p(result, root, tag, comm) */ __pyx_t_2 = ((__pyx_v_root != 0) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":1037 * # Send reduction to root * if root != 0: * if rank == 0: # <<<<<<<<<<<<<< * PyMPI_send_p2p(result, root, tag, comm) * elif rank == root: */ __pyx_t_2 = ((__pyx_v_rank == 0) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":1038 * if root != 0: * if rank == 0: * PyMPI_send_p2p(result, root, tag, comm) # <<<<<<<<<<<<<< * elif rank == root: * result = PyMPI_recv_p2p(0, tag, comm) */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_send_p2p(__pyx_v_result, __pyx_v_root, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":1037 * # Send reduction to root * if root != 0: * if rank == 0: # <<<<<<<<<<<<<< * PyMPI_send_p2p(result, root, tag, comm) * elif rank == root: */ goto __pyx_L11; } /* "mpi4py/MPI/msgpickle.pxi":1039 * if rank == 0: * PyMPI_send_p2p(result, root, tag, comm) * elif rank == root: # <<<<<<<<<<<<<< * result = PyMPI_recv_p2p(0, tag, comm) * if rank != root: */ __pyx_t_2 = ((__pyx_v_rank == __pyx_v_root) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":1040 * PyMPI_send_p2p(result, root, tag, comm) * elif rank == root: * result = PyMPI_recv_p2p(0, tag, comm) # <<<<<<<<<<<<<< * if rank != root: * result = None */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_recv_p2p(0, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":1039 * if rank == 0: * PyMPI_send_p2p(result, root, tag, comm) * elif rank == root: # <<<<<<<<<<<<<< * result = PyMPI_recv_p2p(0, tag, comm) * if rank != root: */ } __pyx_L11:; /* "mpi4py/MPI/msgpickle.pxi":1036 * umask <<= 1 * # Send reduction to root * if root != 0: # <<<<<<<<<<<<<< * if rank == 0: * PyMPI_send_p2p(result, root, tag, comm) */ } /* "mpi4py/MPI/msgpickle.pxi":1041 * elif rank == root: * result = PyMPI_recv_p2p(0, tag, comm) * if rank != root: # <<<<<<<<<<<<<< * result = None * # */ __pyx_t_2 = ((__pyx_v_rank != __pyx_v_root) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":1042 * result = PyMPI_recv_p2p(0, tag, comm) * if rank != root: * result = None # <<<<<<<<<<<<<< * # * return result */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_result, Py_None); /* "mpi4py/MPI/msgpickle.pxi":1041 * elif rank == root: * result = PyMPI_recv_p2p(0, tag, comm) * if rank != root: # <<<<<<<<<<<<<< * result = None * # */ } /* "mpi4py/MPI/msgpickle.pxi":1044 * result = None * # * return result # <<<<<<<<<<<<<< * * cdef object PyMPI_scan_p2p(object sendobj, object op, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1006 * return pickle.load(buf, count) * * cdef object PyMPI_reduce_p2p(object sendobj, object op, int root, # <<<<<<<<<<<<<< * MPI_Comm comm, int tag): * # Get communicator size and rank */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_reduce_p2p", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1046 * return result * * cdef object PyMPI_scan_p2p(object sendobj, object op, # <<<<<<<<<<<<<< * MPI_Comm comm, int tag): * # Get communicator size and rank */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scan_p2p(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm, int __pyx_v_tag) { int __pyx_v_size; int __pyx_v_rank; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_partial = 0; PyObject *__pyx_v_tmp = 0; unsigned int __pyx_v_umask; unsigned int __pyx_v_usize; unsigned int __pyx_v_urank; int __pyx_v_target; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("PyMPI_scan_p2p", 0); /* "mpi4py/MPI/msgpickle.pxi":1049 * MPI_Comm comm, int tag): * # Get communicator size and rank * cdef int size = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_v_size = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1050 * # Get communicator size and rank * cdef int size = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/msgpickle.pxi":1051 * cdef int size = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1051, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1052 * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * # * cdef object result = PyMPI_copy(sendobj) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1052, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1054 * CHKERR( MPI_Comm_rank(comm, &rank) ) * # * cdef object result = PyMPI_copy(sendobj) # <<<<<<<<<<<<<< * cdef object partial = result * cdef object tmp */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_copy(__pyx_v_sendobj); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1055 * # * cdef object result = PyMPI_copy(sendobj) * cdef object partial = result # <<<<<<<<<<<<<< * cdef object tmp * # Compute prefix reduction */ __Pyx_INCREF(__pyx_v_result); __pyx_v_partial = __pyx_v_result; /* "mpi4py/MPI/msgpickle.pxi":1058 * cdef object tmp * # Compute prefix reduction * cdef unsigned int umask = 1 # <<<<<<<<<<<<<< * cdef unsigned int usize = size * cdef unsigned int urank = rank */ __pyx_v_umask = ((unsigned int)1); /* "mpi4py/MPI/msgpickle.pxi":1059 * # Compute prefix reduction * cdef unsigned int umask = 1 * cdef unsigned int usize = size # <<<<<<<<<<<<<< * cdef unsigned int urank = rank * cdef int target = 0 */ __pyx_v_usize = ((unsigned int)__pyx_v_size); /* "mpi4py/MPI/msgpickle.pxi":1060 * cdef unsigned int umask = 1 * cdef unsigned int usize = size * cdef unsigned int urank = rank # <<<<<<<<<<<<<< * cdef int target = 0 * while umask < usize: */ __pyx_v_urank = ((unsigned int)__pyx_v_rank); /* "mpi4py/MPI/msgpickle.pxi":1061 * cdef unsigned int usize = size * cdef unsigned int urank = rank * cdef int target = 0 # <<<<<<<<<<<<<< * while umask < usize: * target = (urank ^ umask) */ __pyx_v_target = 0; /* "mpi4py/MPI/msgpickle.pxi":1062 * cdef unsigned int urank = rank * cdef int target = 0 * while umask < usize: # <<<<<<<<<<<<<< * target = (urank ^ umask) * if target < size: */ while (1) { __pyx_t_3 = ((__pyx_v_umask < __pyx_v_usize) != 0); if (!__pyx_t_3) break; /* "mpi4py/MPI/msgpickle.pxi":1063 * cdef int target = 0 * while umask < usize: * target = (urank ^ umask) # <<<<<<<<<<<<<< * if target < size: * tmp = PyMPI_sendrecv_p2p(partial, target, tag, */ __pyx_v_target = ((int)(__pyx_v_urank ^ __pyx_v_umask)); /* "mpi4py/MPI/msgpickle.pxi":1064 * while umask < usize: * target = (urank ^ umask) * if target < size: # <<<<<<<<<<<<<< * tmp = PyMPI_sendrecv_p2p(partial, target, tag, * target, tag, comm) */ __pyx_t_3 = ((__pyx_v_target < __pyx_v_size) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":1065 * target = (urank ^ umask) * if target < size: * tmp = PyMPI_sendrecv_p2p(partial, target, tag, # <<<<<<<<<<<<<< * target, tag, comm) * if rank > target: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_sendrecv_p2p(__pyx_v_partial, __pyx_v_target, __pyx_v_tag, __pyx_v_target, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1067 * tmp = PyMPI_sendrecv_p2p(partial, target, tag, * target, tag, comm) * if rank > target: # <<<<<<<<<<<<<< * partial = op(tmp, partial) * result = op(tmp, result) */ __pyx_t_3 = ((__pyx_v_rank > __pyx_v_target) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":1068 * target, tag, comm) * if rank > target: * partial = op(tmp, partial) # <<<<<<<<<<<<<< * result = op(tmp, result) * else: */ __Pyx_INCREF(__pyx_v_op); __pyx_t_4 = __pyx_v_op; __pyx_t_5 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_tmp, __pyx_v_partial}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1068, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_tmp, __pyx_v_partial}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1068, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_tmp); __Pyx_GIVEREF(__pyx_v_tmp); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_1, __pyx_v_tmp); __Pyx_INCREF(__pyx_v_partial); __Pyx_GIVEREF(__pyx_v_partial); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_v_partial); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_partial, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1069 * if rank > target: * partial = op(tmp, partial) * result = op(tmp, result) # <<<<<<<<<<<<<< * else: * tmp = op(partial, tmp) */ __Pyx_INCREF(__pyx_v_op); __pyx_t_4 = __pyx_v_op; __pyx_t_6 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_tmp, __pyx_v_result}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1069, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_tmp, __pyx_v_result}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1069, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_tmp); __Pyx_GIVEREF(__pyx_v_tmp); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_1, __pyx_v_tmp); __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_1, __pyx_v_result); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1067 * tmp = PyMPI_sendrecv_p2p(partial, target, tag, * target, tag, comm) * if rank > target: # <<<<<<<<<<<<<< * partial = op(tmp, partial) * result = op(tmp, result) */ goto __pyx_L6; } /* "mpi4py/MPI/msgpickle.pxi":1071 * result = op(tmp, result) * else: * tmp = op(partial, tmp) # <<<<<<<<<<<<<< * partial = tmp * umask <<= 1 */ /*else*/ { __Pyx_INCREF(__pyx_v_op); __pyx_t_4 = __pyx_v_op; __pyx_t_5 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_partial, __pyx_v_tmp}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1071, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_partial, __pyx_v_tmp}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1071, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_partial); __Pyx_GIVEREF(__pyx_v_partial); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_1, __pyx_v_partial); __Pyx_INCREF(__pyx_v_tmp); __Pyx_GIVEREF(__pyx_v_tmp); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_v_tmp); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_tmp, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1072 * else: * tmp = op(partial, tmp) * partial = tmp # <<<<<<<<<<<<<< * umask <<= 1 * # */ __Pyx_INCREF(__pyx_v_tmp); __Pyx_DECREF_SET(__pyx_v_partial, __pyx_v_tmp); } __pyx_L6:; /* "mpi4py/MPI/msgpickle.pxi":1064 * while umask < usize: * target = (urank ^ umask) * if target < size: # <<<<<<<<<<<<<< * tmp = PyMPI_sendrecv_p2p(partial, target, tag, * target, tag, comm) */ } /* "mpi4py/MPI/msgpickle.pxi":1073 * tmp = op(partial, tmp) * partial = tmp * umask <<= 1 # <<<<<<<<<<<<<< * # * return result */ __pyx_v_umask = (__pyx_v_umask << 1); } /* "mpi4py/MPI/msgpickle.pxi":1075 * umask <<= 1 * # * return result # <<<<<<<<<<<<<< * * cdef object PyMPI_exscan_p2p(object sendobj, object op, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1046 * return result * * cdef object PyMPI_scan_p2p(object sendobj, object op, # <<<<<<<<<<<<<< * MPI_Comm comm, int tag): * # Get communicator size and rank */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_scan_p2p", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_partial); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1077 * return result * * cdef object PyMPI_exscan_p2p(object sendobj, object op, # <<<<<<<<<<<<<< * MPI_Comm comm, int tag): * # Get communicator size and rank */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_exscan_p2p(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm, int __pyx_v_tag) { int __pyx_v_size; int __pyx_v_rank; PyObject *__pyx_v_result = 0; PyObject *__pyx_v_partial = 0; PyObject *__pyx_v_tmp = 0; unsigned int __pyx_v_umask; unsigned int __pyx_v_usize; unsigned int __pyx_v_urank; unsigned int __pyx_v_uflag; int __pyx_v_target; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("PyMPI_exscan_p2p", 0); /* "mpi4py/MPI/msgpickle.pxi":1080 * MPI_Comm comm, int tag): * # Get communicator size and rank * cdef int size = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_size(comm, &size) ) */ __pyx_v_size = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1081 * # Get communicator size and rank * cdef int size = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/msgpickle.pxi":1082 * cdef int size = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_size(comm, &size) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1082, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1083 * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * # * cdef object result = PyMPI_copy(sendobj) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1083, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1085 * CHKERR( MPI_Comm_rank(comm, &rank) ) * # * cdef object result = PyMPI_copy(sendobj) # <<<<<<<<<<<<<< * cdef object partial = result * cdef object tmp */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_copy(__pyx_v_sendobj); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1086 * # * cdef object result = PyMPI_copy(sendobj) * cdef object partial = result # <<<<<<<<<<<<<< * cdef object tmp * # Compute prefix reduction */ __Pyx_INCREF(__pyx_v_result); __pyx_v_partial = __pyx_v_result; /* "mpi4py/MPI/msgpickle.pxi":1089 * cdef object tmp * # Compute prefix reduction * cdef unsigned int umask = 1 # <<<<<<<<<<<<<< * cdef unsigned int usize = size * cdef unsigned int urank = rank */ __pyx_v_umask = ((unsigned int)1); /* "mpi4py/MPI/msgpickle.pxi":1090 * # Compute prefix reduction * cdef unsigned int umask = 1 * cdef unsigned int usize = size # <<<<<<<<<<<<<< * cdef unsigned int urank = rank * cdef unsigned int uflag = 0 */ __pyx_v_usize = ((unsigned int)__pyx_v_size); /* "mpi4py/MPI/msgpickle.pxi":1091 * cdef unsigned int umask = 1 * cdef unsigned int usize = size * cdef unsigned int urank = rank # <<<<<<<<<<<<<< * cdef unsigned int uflag = 0 * cdef int target = 0 */ __pyx_v_urank = ((unsigned int)__pyx_v_rank); /* "mpi4py/MPI/msgpickle.pxi":1092 * cdef unsigned int usize = size * cdef unsigned int urank = rank * cdef unsigned int uflag = 0 # <<<<<<<<<<<<<< * cdef int target = 0 * while umask < usize: */ __pyx_v_uflag = ((unsigned int)0); /* "mpi4py/MPI/msgpickle.pxi":1093 * cdef unsigned int urank = rank * cdef unsigned int uflag = 0 * cdef int target = 0 # <<<<<<<<<<<<<< * while umask < usize: * target = (urank ^ umask) */ __pyx_v_target = 0; /* "mpi4py/MPI/msgpickle.pxi":1094 * cdef unsigned int uflag = 0 * cdef int target = 0 * while umask < usize: # <<<<<<<<<<<<<< * target = (urank ^ umask) * if target < size: */ while (1) { __pyx_t_3 = ((__pyx_v_umask < __pyx_v_usize) != 0); if (!__pyx_t_3) break; /* "mpi4py/MPI/msgpickle.pxi":1095 * cdef int target = 0 * while umask < usize: * target = (urank ^ umask) # <<<<<<<<<<<<<< * if target < size: * tmp = PyMPI_sendrecv_p2p(partial, target, tag, */ __pyx_v_target = ((int)(__pyx_v_urank ^ __pyx_v_umask)); /* "mpi4py/MPI/msgpickle.pxi":1096 * while umask < usize: * target = (urank ^ umask) * if target < size: # <<<<<<<<<<<<<< * tmp = PyMPI_sendrecv_p2p(partial, target, tag, * target, tag, comm) */ __pyx_t_3 = ((__pyx_v_target < __pyx_v_size) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":1097 * target = (urank ^ umask) * if target < size: * tmp = PyMPI_sendrecv_p2p(partial, target, tag, # <<<<<<<<<<<<<< * target, tag, comm) * if rank > target: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_sendrecv_p2p(__pyx_v_partial, __pyx_v_target, __pyx_v_tag, __pyx_v_target, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1099 * tmp = PyMPI_sendrecv_p2p(partial, target, tag, * target, tag, comm) * if rank > target: # <<<<<<<<<<<<<< * partial = op(tmp, partial) * if uflag == 0: */ __pyx_t_3 = ((__pyx_v_rank > __pyx_v_target) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":1100 * target, tag, comm) * if rank > target: * partial = op(tmp, partial) # <<<<<<<<<<<<<< * if uflag == 0: * result = tmp; uflag = 1 */ __Pyx_INCREF(__pyx_v_op); __pyx_t_4 = __pyx_v_op; __pyx_t_5 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_tmp, __pyx_v_partial}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1100, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_tmp, __pyx_v_partial}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1100, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_tmp); __Pyx_GIVEREF(__pyx_v_tmp); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_1, __pyx_v_tmp); __Pyx_INCREF(__pyx_v_partial); __Pyx_GIVEREF(__pyx_v_partial); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_v_partial); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_partial, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1101 * if rank > target: * partial = op(tmp, partial) * if uflag == 0: # <<<<<<<<<<<<<< * result = tmp; uflag = 1 * else: */ __pyx_t_3 = ((__pyx_v_uflag == 0) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":1102 * partial = op(tmp, partial) * if uflag == 0: * result = tmp; uflag = 1 # <<<<<<<<<<<<<< * else: * result = op(tmp, result) */ __Pyx_INCREF(__pyx_v_tmp); __Pyx_DECREF_SET(__pyx_v_result, __pyx_v_tmp); __pyx_v_uflag = 1; /* "mpi4py/MPI/msgpickle.pxi":1101 * if rank > target: * partial = op(tmp, partial) * if uflag == 0: # <<<<<<<<<<<<<< * result = tmp; uflag = 1 * else: */ goto __pyx_L7; } /* "mpi4py/MPI/msgpickle.pxi":1104 * result = tmp; uflag = 1 * else: * result = op(tmp, result) # <<<<<<<<<<<<<< * else: * tmp = op(partial, tmp) */ /*else*/ { __Pyx_INCREF(__pyx_v_op); __pyx_t_4 = __pyx_v_op; __pyx_t_6 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_tmp, __pyx_v_result}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1104, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_tmp, __pyx_v_result}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1104, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_tmp); __Pyx_GIVEREF(__pyx_v_tmp); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_1, __pyx_v_tmp); __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_1, __pyx_v_result); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; } __pyx_L7:; /* "mpi4py/MPI/msgpickle.pxi":1099 * tmp = PyMPI_sendrecv_p2p(partial, target, tag, * target, tag, comm) * if rank > target: # <<<<<<<<<<<<<< * partial = op(tmp, partial) * if uflag == 0: */ goto __pyx_L6; } /* "mpi4py/MPI/msgpickle.pxi":1106 * result = op(tmp, result) * else: * tmp = op(partial, tmp) # <<<<<<<<<<<<<< * partial = tmp * umask <<= 1 */ /*else*/ { __Pyx_INCREF(__pyx_v_op); __pyx_t_4 = __pyx_v_op; __pyx_t_5 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_partial, __pyx_v_tmp}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1106, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_partial, __pyx_v_tmp}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1106, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(6, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_partial); __Pyx_GIVEREF(__pyx_v_partial); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_1, __pyx_v_partial); __Pyx_INCREF(__pyx_v_tmp); __Pyx_GIVEREF(__pyx_v_tmp); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_v_tmp); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_tmp, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1107 * else: * tmp = op(partial, tmp) * partial = tmp # <<<<<<<<<<<<<< * umask <<= 1 * # */ __Pyx_INCREF(__pyx_v_tmp); __Pyx_DECREF_SET(__pyx_v_partial, __pyx_v_tmp); } __pyx_L6:; /* "mpi4py/MPI/msgpickle.pxi":1096 * while umask < usize: * target = (urank ^ umask) * if target < size: # <<<<<<<<<<<<<< * tmp = PyMPI_sendrecv_p2p(partial, target, tag, * target, tag, comm) */ } /* "mpi4py/MPI/msgpickle.pxi":1108 * tmp = op(partial, tmp) * partial = tmp * umask <<= 1 # <<<<<<<<<<<<<< * # * if rank == 0: */ __pyx_v_umask = (__pyx_v_umask << 1); } /* "mpi4py/MPI/msgpickle.pxi":1110 * umask <<= 1 * # * if rank == 0: # <<<<<<<<<<<<<< * result = None * return result */ __pyx_t_3 = ((__pyx_v_rank == 0) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":1111 * # * if rank == 0: * result = None # <<<<<<<<<<<<<< * return result * */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_result, Py_None); /* "mpi4py/MPI/msgpickle.pxi":1110 * umask <<= 1 * # * if rank == 0: # <<<<<<<<<<<<<< * result = None * return result */ } /* "mpi4py/MPI/msgpickle.pxi":1112 * if rank == 0: * result = None * return result # <<<<<<<<<<<<<< * * # ----- */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1077 * return result * * cdef object PyMPI_exscan_p2p(object sendobj, object op, # <<<<<<<<<<<<<< * MPI_Comm comm, int tag): * # Get communicator size and rank */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_exscan_p2p", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XDECREF(__pyx_v_partial); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1120 * int PyMPI_Commctx_inter(MPI_Comm,MPI_Comm*,int*,MPI_Comm*,int*) nogil * * cdef int PyMPI_Commctx_INTRA(MPI_Comm comm, # <<<<<<<<<<<<<< * MPI_Comm *dupcomm, int *tag) except -1: * with PyMPI_Lock(comm, "@commctx_intra"): */ static int __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTRA(MPI_Comm __pyx_v_comm, MPI_Comm *__pyx_v_dupcomm, int *__pyx_v_tag) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_Commctx_INTRA", 0); /* "mpi4py/MPI/msgpickle.pxi":1122 * cdef int PyMPI_Commctx_INTRA(MPI_Comm comm, * MPI_Comm *dupcomm, int *tag) except -1: * with PyMPI_Lock(comm, "@commctx_intra"): # <<<<<<<<<<<<<< * CHKERR( PyMPI_Commctx_intra(comm, dupcomm, tag) ) * return 0 */ /*with:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_kp_s_commctx_intra); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1122, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1122, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":1123 * MPI_Comm *dupcomm, int *tag) except -1: * with PyMPI_Lock(comm, "@commctx_intra"): * CHKERR( PyMPI_Commctx_intra(comm, dupcomm, tag) ) # <<<<<<<<<<<<<< * return 0 * */ __pyx_t_9 = __pyx_f_6mpi4py_3MPI_CHKERR(PyMPI_Commctx_intra(__pyx_v_comm, __pyx_v_dupcomm, __pyx_v_tag)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(6, 1123, __pyx_L7_error) /* "mpi4py/MPI/msgpickle.pxi":1122 * cdef int PyMPI_Commctx_INTRA(MPI_Comm comm, * MPI_Comm *dupcomm, int *tag) except -1: * with PyMPI_Lock(comm, "@commctx_intra"): # <<<<<<<<<<<<<< * CHKERR( PyMPI_Commctx_intra(comm, dupcomm, tag) ) * return 0 */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_Commctx_INTRA", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(6, 1122, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1122, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 1122, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < 0) __PYX_ERR(6, 1122, __pyx_L9_except_error) __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __PYX_ERR(6, 1122, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L16:; } /* "mpi4py/MPI/msgpickle.pxi":1124 * with PyMPI_Lock(comm, "@commctx_intra"): * CHKERR( PyMPI_Commctx_intra(comm, dupcomm, tag) ) * return 0 # <<<<<<<<<<<<<< * * cdef int PyMPI_Commctx_INTER(MPI_Comm comm, */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1120 * int PyMPI_Commctx_inter(MPI_Comm,MPI_Comm*,int*,MPI_Comm*,int*) nogil * * cdef int PyMPI_Commctx_INTRA(MPI_Comm comm, # <<<<<<<<<<<<<< * MPI_Comm *dupcomm, int *tag) except -1: * with PyMPI_Lock(comm, "@commctx_intra"): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_Commctx_INTRA", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1126 * return 0 * * cdef int PyMPI_Commctx_INTER(MPI_Comm comm, # <<<<<<<<<<<<<< * MPI_Comm *dupcomm, int *tag, * MPI_Comm *localcomm, int *low_group) except -1: */ static int __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTER(MPI_Comm __pyx_v_comm, MPI_Comm *__pyx_v_dupcomm, int *__pyx_v_tag, MPI_Comm *__pyx_v_localcomm, int *__pyx_v_low_group) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("PyMPI_Commctx_INTER", 0); /* "mpi4py/MPI/msgpickle.pxi":1129 * MPI_Comm *dupcomm, int *tag, * MPI_Comm *localcomm, int *low_group) except -1: * with PyMPI_Lock(comm, "@commctx_inter"): # <<<<<<<<<<<<<< * CHKERR( PyMPI_Commctx_inter(comm, dupcomm, tag, * localcomm, low_group) ) */ /*with:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Lock(__pyx_v_comm, __pyx_kp_s_commctx_inter); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1129, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 1129, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":1130 * MPI_Comm *localcomm, int *low_group) except -1: * with PyMPI_Lock(comm, "@commctx_inter"): * CHKERR( PyMPI_Commctx_inter(comm, dupcomm, tag, # <<<<<<<<<<<<<< * localcomm, low_group) ) * return 0 */ __pyx_t_9 = __pyx_f_6mpi4py_3MPI_CHKERR(PyMPI_Commctx_inter(__pyx_v_comm, __pyx_v_dupcomm, __pyx_v_tag, __pyx_v_localcomm, __pyx_v_low_group)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(6, 1130, __pyx_L7_error) /* "mpi4py/MPI/msgpickle.pxi":1129 * MPI_Comm *dupcomm, int *tag, * MPI_Comm *localcomm, int *low_group) except -1: * with PyMPI_Lock(comm, "@commctx_inter"): # <<<<<<<<<<<<<< * CHKERR( PyMPI_Commctx_inter(comm, dupcomm, tag, * localcomm, low_group) ) */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.PyMPI_Commctx_INTER", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(6, 1129, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1129, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(6, 1129, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < 0) __PYX_ERR(6, 1129, __pyx_L9_except_error) __pyx_t_12 = ((!(__pyx_t_11 != 0)) != 0); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __PYX_ERR(6, 1129, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); goto __pyx_L1_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8); __pyx_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__24, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L16:; } /* "mpi4py/MPI/msgpickle.pxi":1132 * CHKERR( PyMPI_Commctx_inter(comm, dupcomm, tag, * localcomm, low_group) ) * return 0 # <<<<<<<<<<<<<< * * */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1126 * return 0 * * cdef int PyMPI_Commctx_INTER(MPI_Comm comm, # <<<<<<<<<<<<<< * MPI_Comm *dupcomm, int *tag, * MPI_Comm *localcomm, int *low_group) except -1: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_Commctx_INTER", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1135 * * * cdef object PyMPI_reduce_intra(object sendobj, object op, # <<<<<<<<<<<<<< * int root, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce_intra(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, int __pyx_v_root, MPI_Comm __pyx_v_comm) { int __pyx_v_tag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPI_reduce_intra", 0); /* "mpi4py/MPI/msgpickle.pxi":1137 * cdef object PyMPI_reduce_intra(object sendobj, object op, * int root, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED # <<<<<<<<<<<<<< * PyMPI_Commctx_INTRA(comm, &comm, &tag) * return PyMPI_reduce_p2p(sendobj, op, root, comm, tag) */ __pyx_v_tag = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1138 * int root, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) # <<<<<<<<<<<<<< * return PyMPI_reduce_p2p(sendobj, op, root, comm, tag) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTRA(__pyx_v_comm, (&__pyx_v_comm), (&__pyx_v_tag)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1138, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1139 * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) * return PyMPI_reduce_p2p(sendobj, op, root, comm, tag) # <<<<<<<<<<<<<< * * cdef object PyMPI_reduce_inter(object sendobj, object op, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_reduce_p2p(__pyx_v_sendobj, __pyx_v_op, __pyx_v_root, __pyx_v_comm, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1135 * * * cdef object PyMPI_reduce_intra(object sendobj, object op, # <<<<<<<<<<<<<< * int root, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_reduce_intra", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1141 * return PyMPI_reduce_p2p(sendobj, op, root, comm, tag) * * cdef object PyMPI_reduce_inter(object sendobj, object op, # <<<<<<<<<<<<<< * int root, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce_inter(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, int __pyx_v_root, MPI_Comm __pyx_v_comm) { int __pyx_v_tag; MPI_Comm __pyx_v_localcomm; int __pyx_v_size; int __pyx_v_rank; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("PyMPI_reduce_inter", 0); __Pyx_INCREF(__pyx_v_sendobj); /* "mpi4py/MPI/msgpickle.pxi":1143 * cdef object PyMPI_reduce_inter(object sendobj, object op, * int root, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef MPI_Comm localcomm = MPI_COMM_NULL * PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) */ __pyx_v_tag = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1144 * int root, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED * cdef MPI_Comm localcomm = MPI_COMM_NULL # <<<<<<<<<<<<<< * PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) * # Get communicator remote size and rank */ __pyx_v_localcomm = MPI_COMM_NULL; /* "mpi4py/MPI/msgpickle.pxi":1145 * cdef int tag = MPI_UNDEFINED * cdef MPI_Comm localcomm = MPI_COMM_NULL * PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) # <<<<<<<<<<<<<< * # Get communicator remote size and rank * cdef int size = MPI_UNDEFINED */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTER(__pyx_v_comm, (&__pyx_v_comm), (&__pyx_v_tag), (&__pyx_v_localcomm), NULL); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1145, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1147 * PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) * # Get communicator remote size and rank * cdef int size = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_remote_size(comm, &size) ) */ __pyx_v_size = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1148 * # Get communicator remote size and rank * cdef int size = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/msgpickle.pxi":1149 * cdef int size = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_remote_size(comm, &size) ) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root >= 0 and root < size: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_comm, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1149, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1150 * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_remote_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * if root >= 0 and root < size: * # Reduce in local group and send to remote root */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1150, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1151 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root >= 0 and root < size: # <<<<<<<<<<<<<< * # Reduce in local group and send to remote root * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) */ __pyx_t_3 = ((__pyx_v_root >= 0) != 0); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = ((__pyx_v_root < __pyx_v_size) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":1153 * if root >= 0 and root < size: * # Reduce in local group and send to remote root * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) # <<<<<<<<<<<<<< * if rank == 0: PyMPI_send_p2p(sendobj, root, tag, comm) * return None */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_reduce_p2p(__pyx_v_sendobj, __pyx_v_op, 0, __pyx_v_localcomm, __pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_sendobj, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/msgpickle.pxi":1154 * # Reduce in local group and send to remote root * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) * if rank == 0: PyMPI_send_p2p(sendobj, root, tag, comm) # <<<<<<<<<<<<<< * return None * elif root == MPI_ROOT: # Receive from remote group */ __pyx_t_2 = ((__pyx_v_rank == 0) != 0); if (__pyx_t_2) { __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_send_p2p(__pyx_v_sendobj, __pyx_v_root, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } /* "mpi4py/MPI/msgpickle.pxi":1155 * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) * if rank == 0: PyMPI_send_p2p(sendobj, root, tag, comm) * return None # <<<<<<<<<<<<<< * elif root == MPI_ROOT: # Receive from remote group * return PyMPI_recv_p2p(0, tag, comm) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1151 * CHKERR( MPI_Comm_remote_size(comm, &size) ) * CHKERR( MPI_Comm_rank(comm, &rank) ) * if root >= 0 and root < size: # <<<<<<<<<<<<<< * # Reduce in local group and send to remote root * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) */ } /* "mpi4py/MPI/msgpickle.pxi":1156 * if rank == 0: PyMPI_send_p2p(sendobj, root, tag, comm) * return None * elif root == MPI_ROOT: # Receive from remote group # <<<<<<<<<<<<<< * return PyMPI_recv_p2p(0, tag, comm) * elif root == MPI_PROC_NULL: # This process does nothing */ __pyx_t_2 = ((__pyx_v_root == MPI_ROOT) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/msgpickle.pxi":1157 * return None * elif root == MPI_ROOT: # Receive from remote group * return PyMPI_recv_p2p(0, tag, comm) # <<<<<<<<<<<<<< * elif root == MPI_PROC_NULL: # This process does nothing * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_f_6mpi4py_3MPI_PyMPI_recv_p2p(0, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1156 * if rank == 0: PyMPI_send_p2p(sendobj, root, tag, comm) * return None * elif root == MPI_ROOT: # Receive from remote group # <<<<<<<<<<<<<< * return PyMPI_recv_p2p(0, tag, comm) * elif root == MPI_PROC_NULL: # This process does nothing */ } /* "mpi4py/MPI/msgpickle.pxi":1158 * elif root == MPI_ROOT: # Receive from remote group * return PyMPI_recv_p2p(0, tag, comm) * elif root == MPI_PROC_NULL: # This process does nothing # <<<<<<<<<<<<<< * return None * else: # Wrong root argument */ __pyx_t_2 = ((__pyx_v_root == MPI_PROC_NULL) != 0); if (likely(__pyx_t_2)) { /* "mpi4py/MPI/msgpickle.pxi":1159 * return PyMPI_recv_p2p(0, tag, comm) * elif root == MPI_PROC_NULL: # This process does nothing * return None # <<<<<<<<<<<<<< * else: # Wrong root argument * MPI_Comm_call_errhandler(comm, MPI_ERR_ROOT) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1158 * elif root == MPI_ROOT: # Receive from remote group * return PyMPI_recv_p2p(0, tag, comm) * elif root == MPI_PROC_NULL: # This process does nothing # <<<<<<<<<<<<<< * return None * else: # Wrong root argument */ } /* "mpi4py/MPI/msgpickle.pxi":1161 * return None * else: # Wrong root argument * MPI_Comm_call_errhandler(comm, MPI_ERR_ROOT) # <<<<<<<<<<<<<< * raise MPIException(MPI_ERR_ROOT) * */ /*else*/ { ((void)MPI_Comm_call_errhandler(__pyx_v_comm, MPI_ERR_ROOT)); /* "mpi4py/MPI/msgpickle.pxi":1162 * else: # Wrong root argument * MPI_Comm_call_errhandler(comm, MPI_ERR_ROOT) * raise MPIException(MPI_ERR_ROOT) # <<<<<<<<<<<<<< * * */ __pyx_t_5 = __Pyx_PyInt_From_int(MPI_ERR_ROOT); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_MPIException); __pyx_t_6 = __pyx_v_6mpi4py_3MPI_MPIException; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(6, 1162, __pyx_L1_error) } /* "mpi4py/MPI/msgpickle.pxi":1141 * return PyMPI_reduce_p2p(sendobj, op, root, comm, tag) * * cdef object PyMPI_reduce_inter(object sendobj, object op, # <<<<<<<<<<<<<< * int root, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_reduce_inter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sendobj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1165 * * * cdef object PyMPI_allreduce_intra(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allreduce_intra(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { int __pyx_v_tag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPI_allreduce_intra", 0); __Pyx_INCREF(__pyx_v_sendobj); /* "mpi4py/MPI/msgpickle.pxi":1166 * * cdef object PyMPI_allreduce_intra(object sendobj, object op, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED # <<<<<<<<<<<<<< * PyMPI_Commctx_INTRA(comm, &comm, &tag) * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, comm, tag) */ __pyx_v_tag = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1167 * cdef object PyMPI_allreduce_intra(object sendobj, object op, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) # <<<<<<<<<<<<<< * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, comm, tag) * return PyMPI_bcast_p2p(sendobj, 0, comm) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTRA(__pyx_v_comm, (&__pyx_v_comm), (&__pyx_v_tag)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1167, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1168 * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, comm, tag) # <<<<<<<<<<<<<< * return PyMPI_bcast_p2p(sendobj, 0, comm) * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_reduce_p2p(__pyx_v_sendobj, __pyx_v_op, 0, __pyx_v_comm, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_sendobj, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1169 * PyMPI_Commctx_INTRA(comm, &comm, &tag) * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, comm, tag) * return PyMPI_bcast_p2p(sendobj, 0, comm) # <<<<<<<<<<<<<< * * cdef object PyMPI_allreduce_inter(object sendobj, object op, MPI_Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_bcast_p2p(__pyx_v_sendobj, 0, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1165 * * * cdef object PyMPI_allreduce_intra(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_allreduce_intra", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sendobj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1171 * return PyMPI_bcast_p2p(sendobj, 0, comm) * * cdef object PyMPI_allreduce_inter(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef int tag = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allreduce_inter(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { int __pyx_v_tag; int __pyx_v_rank; MPI_Comm __pyx_v_localcomm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_allreduce_inter", 0); __Pyx_INCREF(__pyx_v_sendobj); /* "mpi4py/MPI/msgpickle.pxi":1172 * * cdef object PyMPI_allreduce_inter(object sendobj, object op, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef int rank = MPI_PROC_NULL * cdef MPI_Comm localcomm = MPI_COMM_NULL */ __pyx_v_tag = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1173 * cdef object PyMPI_allreduce_inter(object sendobj, object op, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * cdef MPI_Comm localcomm = MPI_COMM_NULL * PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/msgpickle.pxi":1174 * cdef int tag = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL * cdef MPI_Comm localcomm = MPI_COMM_NULL # <<<<<<<<<<<<<< * PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) * CHKERR( MPI_Comm_rank(comm, &rank) ) */ __pyx_v_localcomm = MPI_COMM_NULL; /* "mpi4py/MPI/msgpickle.pxi":1175 * cdef int rank = MPI_PROC_NULL * cdef MPI_Comm localcomm = MPI_COMM_NULL * PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(comm, &rank) ) * # Reduce in local group, exchange, and broadcast in local group */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTER(__pyx_v_comm, (&__pyx_v_comm), (&__pyx_v_tag), (&__pyx_v_localcomm), NULL); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1175, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1176 * cdef MPI_Comm localcomm = MPI_COMM_NULL * PyMPI_Commctx_INTER(comm, &comm, &tag, &localcomm, NULL) * CHKERR( MPI_Comm_rank(comm, &rank) ) # <<<<<<<<<<<<<< * # Reduce in local group, exchange, and broadcast in local group * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_comm, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1176, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1178 * CHKERR( MPI_Comm_rank(comm, &rank) ) * # Reduce in local group, exchange, and broadcast in local group * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) # <<<<<<<<<<<<<< * if rank == 0: * sendobj = PyMPI_sendrecv_p2p(sendobj, 0, tag, 0, tag, comm) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_reduce_p2p(__pyx_v_sendobj, __pyx_v_op, 0, __pyx_v_localcomm, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_sendobj, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1179 * # Reduce in local group, exchange, and broadcast in local group * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) * if rank == 0: # <<<<<<<<<<<<<< * sendobj = PyMPI_sendrecv_p2p(sendobj, 0, tag, 0, tag, comm) * return PyMPI_bcast_p2p(sendobj, 0, localcomm) */ __pyx_t_3 = ((__pyx_v_rank == 0) != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":1180 * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) * if rank == 0: * sendobj = PyMPI_sendrecv_p2p(sendobj, 0, tag, 0, tag, comm) # <<<<<<<<<<<<<< * return PyMPI_bcast_p2p(sendobj, 0, localcomm) * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_sendrecv_p2p(__pyx_v_sendobj, 0, __pyx_v_tag, 0, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_sendobj, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/msgpickle.pxi":1179 * # Reduce in local group, exchange, and broadcast in local group * sendobj = PyMPI_reduce_p2p(sendobj, op, 0, localcomm, tag) * if rank == 0: # <<<<<<<<<<<<<< * sendobj = PyMPI_sendrecv_p2p(sendobj, 0, tag, 0, tag, comm) * return PyMPI_bcast_p2p(sendobj, 0, localcomm) */ } /* "mpi4py/MPI/msgpickle.pxi":1181 * if rank == 0: * sendobj = PyMPI_sendrecv_p2p(sendobj, 0, tag, 0, tag, comm) * return PyMPI_bcast_p2p(sendobj, 0, localcomm) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_bcast_p2p(__pyx_v_sendobj, 0, __pyx_v_localcomm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1171 * return PyMPI_bcast_p2p(sendobj, 0, comm) * * cdef object PyMPI_allreduce_inter(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef int tag = MPI_UNDEFINED * cdef int rank = MPI_PROC_NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_allreduce_inter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_sendobj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1184 * * * cdef object PyMPI_scan_intra(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scan_intra(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { int __pyx_v_tag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPI_scan_intra", 0); /* "mpi4py/MPI/msgpickle.pxi":1185 * * cdef object PyMPI_scan_intra(object sendobj, object op, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED # <<<<<<<<<<<<<< * PyMPI_Commctx_INTRA(comm, &comm, &tag) * return PyMPI_scan_p2p(sendobj, op, comm, tag) */ __pyx_v_tag = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1186 * cdef object PyMPI_scan_intra(object sendobj, object op, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) # <<<<<<<<<<<<<< * return PyMPI_scan_p2p(sendobj, op, comm, tag) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTRA(__pyx_v_comm, (&__pyx_v_comm), (&__pyx_v_tag)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1186, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1187 * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) * return PyMPI_scan_p2p(sendobj, op, comm, tag) # <<<<<<<<<<<<<< * * cdef object PyMPI_exscan_intra(object sendobj, object op, MPI_Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_scan_p2p(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1184 * * * cdef object PyMPI_scan_intra(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_scan_intra", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1189 * return PyMPI_scan_p2p(sendobj, op, comm, tag) * * cdef object PyMPI_exscan_intra(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_exscan_intra(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { int __pyx_v_tag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPI_exscan_intra", 0); /* "mpi4py/MPI/msgpickle.pxi":1190 * * cdef object PyMPI_exscan_intra(object sendobj, object op, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED # <<<<<<<<<<<<<< * PyMPI_Commctx_INTRA(comm, &comm, &tag) * return PyMPI_exscan_p2p(sendobj, op, comm, tag) */ __pyx_v_tag = MPI_UNDEFINED; /* "mpi4py/MPI/msgpickle.pxi":1191 * cdef object PyMPI_exscan_intra(object sendobj, object op, MPI_Comm comm): * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) # <<<<<<<<<<<<<< * return PyMPI_exscan_p2p(sendobj, op, comm, tag) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_Commctx_INTRA(__pyx_v_comm, (&__pyx_v_comm), (&__pyx_v_tag)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1191, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1192 * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) * return PyMPI_exscan_p2p(sendobj, op, comm, tag) # <<<<<<<<<<<<<< * * # ----- */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_exscan_p2p(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1189 * return PyMPI_scan_p2p(sendobj, op, comm, tag) * * cdef object PyMPI_exscan_intra(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * cdef int tag = MPI_UNDEFINED * PyMPI_Commctx_INTRA(comm, &comm, &tag) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_exscan_intra", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1196 * # ----- * * cdef inline bint comm_is_intra(MPI_Comm comm) nogil except -1: # <<<<<<<<<<<<<< * cdef int inter = 0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_comm_is_intra(MPI_Comm __pyx_v_comm) { int __pyx_v_inter; int __pyx_r; int __pyx_t_1; int __pyx_t_2; /* "mpi4py/MPI/msgpickle.pxi":1197 * * cdef inline bint comm_is_intra(MPI_Comm comm) nogil except -1: * cdef int inter = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: return 0 */ __pyx_v_inter = 0; /* "mpi4py/MPI/msgpickle.pxi":1198 * cdef inline bint comm_is_intra(MPI_Comm comm) nogil except -1: * cdef int inter = 0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) # <<<<<<<<<<<<<< * if inter: return 0 * else: return 1 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_comm, (&__pyx_v_inter))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1198, __pyx_L1_error) /* "mpi4py/MPI/msgpickle.pxi":1199 * cdef int inter = 0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: return 0 # <<<<<<<<<<<<<< * else: return 1 * */ __pyx_t_2 = (__pyx_v_inter != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":1200 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) * if inter: return 0 * else: return 1 # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_r = 1; goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":1196 * # ----- * * cdef inline bint comm_is_intra(MPI_Comm comm) nogil except -1: # <<<<<<<<<<<<<< * cdef int inter = 0 * CHKERR( MPI_Comm_test_inter(comm, &inter) ) */ /* function exit code */ __pyx_L1_error:; { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); #endif __Pyx_AddTraceback("mpi4py.MPI.comm_is_intra", __pyx_clineno, __pyx_lineno, __pyx_filename); #ifdef WITH_THREAD __Pyx_PyGILState_Release(__pyx_gilstate_save); #endif } __pyx_r = -1; __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1203 * * * cdef object PyMPI_reduce(object sendobj, object op, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * if not options.fast_reduce: * return PyMPI_reduce_naive(sendobj, op, root, comm) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_reduce(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, int __pyx_v_root, MPI_Comm __pyx_v_comm) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_reduce", 0); /* "mpi4py/MPI/msgpickle.pxi":1204 * * cdef object PyMPI_reduce(object sendobj, object op, int root, MPI_Comm comm): * if not options.fast_reduce: # <<<<<<<<<<<<<< * return PyMPI_reduce_naive(sendobj, op, root, comm) * elif comm_is_intra(comm): */ __pyx_t_1 = ((!(__pyx_v_6mpi4py_3MPI_options.fast_reduce != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":1205 * cdef object PyMPI_reduce(object sendobj, object op, int root, MPI_Comm comm): * if not options.fast_reduce: * return PyMPI_reduce_naive(sendobj, op, root, comm) # <<<<<<<<<<<<<< * elif comm_is_intra(comm): * return PyMPI_reduce_intra(sendobj, op, root, comm) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_reduce_naive(__pyx_v_sendobj, __pyx_v_op, __pyx_v_root, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1204 * * cdef object PyMPI_reduce(object sendobj, object op, int root, MPI_Comm comm): * if not options.fast_reduce: # <<<<<<<<<<<<<< * return PyMPI_reduce_naive(sendobj, op, root, comm) * elif comm_is_intra(comm): */ } /* "mpi4py/MPI/msgpickle.pxi":1206 * if not options.fast_reduce: * return PyMPI_reduce_naive(sendobj, op, root, comm) * elif comm_is_intra(comm): # <<<<<<<<<<<<<< * return PyMPI_reduce_intra(sendobj, op, root, comm) * else: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_is_intra(__pyx_v_comm); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1206, __pyx_L1_error) __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":1207 * return PyMPI_reduce_naive(sendobj, op, root, comm) * elif comm_is_intra(comm): * return PyMPI_reduce_intra(sendobj, op, root, comm) # <<<<<<<<<<<<<< * else: * return PyMPI_reduce_inter(sendobj, op, root, comm) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_reduce_intra(__pyx_v_sendobj, __pyx_v_op, __pyx_v_root, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1206 * if not options.fast_reduce: * return PyMPI_reduce_naive(sendobj, op, root, comm) * elif comm_is_intra(comm): # <<<<<<<<<<<<<< * return PyMPI_reduce_intra(sendobj, op, root, comm) * else: */ } /* "mpi4py/MPI/msgpickle.pxi":1209 * return PyMPI_reduce_intra(sendobj, op, root, comm) * else: * return PyMPI_reduce_inter(sendobj, op, root, comm) # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_reduce_inter(__pyx_v_sendobj, __pyx_v_op, __pyx_v_root, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":1203 * * * cdef object PyMPI_reduce(object sendobj, object op, int root, MPI_Comm comm): # <<<<<<<<<<<<<< * if not options.fast_reduce: * return PyMPI_reduce_naive(sendobj, op, root, comm) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1212 * * * cdef object PyMPI_allreduce(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * if not options.fast_reduce: * return PyMPI_allreduce_naive(sendobj, op, comm) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_allreduce(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("PyMPI_allreduce", 0); /* "mpi4py/MPI/msgpickle.pxi":1213 * * cdef object PyMPI_allreduce(object sendobj, object op, MPI_Comm comm): * if not options.fast_reduce: # <<<<<<<<<<<<<< * return PyMPI_allreduce_naive(sendobj, op, comm) * elif comm_is_intra(comm): */ __pyx_t_1 = ((!(__pyx_v_6mpi4py_3MPI_options.fast_reduce != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":1214 * cdef object PyMPI_allreduce(object sendobj, object op, MPI_Comm comm): * if not options.fast_reduce: * return PyMPI_allreduce_naive(sendobj, op, comm) # <<<<<<<<<<<<<< * elif comm_is_intra(comm): * return PyMPI_allreduce_intra(sendobj, op, comm) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_allreduce_naive(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1213 * * cdef object PyMPI_allreduce(object sendobj, object op, MPI_Comm comm): * if not options.fast_reduce: # <<<<<<<<<<<<<< * return PyMPI_allreduce_naive(sendobj, op, comm) * elif comm_is_intra(comm): */ } /* "mpi4py/MPI/msgpickle.pxi":1215 * if not options.fast_reduce: * return PyMPI_allreduce_naive(sendobj, op, comm) * elif comm_is_intra(comm): # <<<<<<<<<<<<<< * return PyMPI_allreduce_intra(sendobj, op, comm) * else: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_is_intra(__pyx_v_comm); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 1215, __pyx_L1_error) __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/msgpickle.pxi":1216 * return PyMPI_allreduce_naive(sendobj, op, comm) * elif comm_is_intra(comm): * return PyMPI_allreduce_intra(sendobj, op, comm) # <<<<<<<<<<<<<< * else: * return PyMPI_allreduce_inter(sendobj, op, comm) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_allreduce_intra(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1215 * if not options.fast_reduce: * return PyMPI_allreduce_naive(sendobj, op, comm) * elif comm_is_intra(comm): # <<<<<<<<<<<<<< * return PyMPI_allreduce_intra(sendobj, op, comm) * else: */ } /* "mpi4py/MPI/msgpickle.pxi":1218 * return PyMPI_allreduce_intra(sendobj, op, comm) * else: * return PyMPI_allreduce_inter(sendobj, op, comm) # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_allreduce_inter(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":1212 * * * cdef object PyMPI_allreduce(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * if not options.fast_reduce: * return PyMPI_allreduce_naive(sendobj, op, comm) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_allreduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1221 * * * cdef object PyMPI_scan(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * if not options.fast_reduce: * return PyMPI_scan_naive(sendobj, op, comm) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_scan(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPI_scan", 0); /* "mpi4py/MPI/msgpickle.pxi":1222 * * cdef object PyMPI_scan(object sendobj, object op, MPI_Comm comm): * if not options.fast_reduce: # <<<<<<<<<<<<<< * return PyMPI_scan_naive(sendobj, op, comm) * else: */ __pyx_t_1 = ((!(__pyx_v_6mpi4py_3MPI_options.fast_reduce != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":1223 * cdef object PyMPI_scan(object sendobj, object op, MPI_Comm comm): * if not options.fast_reduce: * return PyMPI_scan_naive(sendobj, op, comm) # <<<<<<<<<<<<<< * else: * return PyMPI_scan_intra(sendobj, op, comm) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_scan_naive(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1222 * * cdef object PyMPI_scan(object sendobj, object op, MPI_Comm comm): * if not options.fast_reduce: # <<<<<<<<<<<<<< * return PyMPI_scan_naive(sendobj, op, comm) * else: */ } /* "mpi4py/MPI/msgpickle.pxi":1225 * return PyMPI_scan_naive(sendobj, op, comm) * else: * return PyMPI_scan_intra(sendobj, op, comm) # <<<<<<<<<<<<<< * * */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_scan_intra(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":1221 * * * cdef object PyMPI_scan(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * if not options.fast_reduce: * return PyMPI_scan_naive(sendobj, op, comm) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_scan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/msgpickle.pxi":1228 * * * cdef object PyMPI_exscan(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * if not options.fast_reduce: * return PyMPI_exscan_naive(sendobj, op, comm) */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPI_exscan(PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, MPI_Comm __pyx_v_comm) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPI_exscan", 0); /* "mpi4py/MPI/msgpickle.pxi":1229 * * cdef object PyMPI_exscan(object sendobj, object op, MPI_Comm comm): * if not options.fast_reduce: # <<<<<<<<<<<<<< * return PyMPI_exscan_naive(sendobj, op, comm) * else: */ __pyx_t_1 = ((!(__pyx_v_6mpi4py_3MPI_options.fast_reduce != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/msgpickle.pxi":1230 * cdef object PyMPI_exscan(object sendobj, object op, MPI_Comm comm): * if not options.fast_reduce: * return PyMPI_exscan_naive(sendobj, op, comm) # <<<<<<<<<<<<<< * else: * return PyMPI_exscan_intra(sendobj, op, comm) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_exscan_naive(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/msgpickle.pxi":1229 * * cdef object PyMPI_exscan(object sendobj, object op, MPI_Comm comm): * if not options.fast_reduce: # <<<<<<<<<<<<<< * return PyMPI_exscan_naive(sendobj, op, comm) * else: */ } /* "mpi4py/MPI/msgpickle.pxi":1232 * return PyMPI_exscan_naive(sendobj, op, comm) * else: * return PyMPI_exscan_intra(sendobj, op, comm) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_exscan_intra(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "mpi4py/MPI/msgpickle.pxi":1228 * * * cdef object PyMPI_exscan(object sendobj, object op, MPI_Comm comm): # <<<<<<<<<<<<<< * if not options.fast_reduce: * return PyMPI_exscan_naive(sendobj, op, comm) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPI_exscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":5 * # Datatype * * cdef api object PyMPIDatatype_New(MPI_Datatype arg): # <<<<<<<<<<<<<< * cdef Datatype obj = Datatype.__new__(Datatype) * obj.ob_mpi = arg */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIDatatype_New(MPI_Datatype __pyx_v_arg) { struct PyMPIDatatypeObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPIDatatype_New", 0); /* "mpi4py/MPI/CAPI.pxi":6 * * cdef api object PyMPIDatatype_New(MPI_Datatype arg): * cdef Datatype obj = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 6, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":7 * cdef api object PyMPIDatatype_New(MPI_Datatype arg): * cdef Datatype obj = Datatype.__new__(Datatype) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":8 * cdef Datatype obj = Datatype.__new__(Datatype) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Datatype* PyMPIDatatype_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":5 * # Datatype * * cdef api object PyMPIDatatype_New(MPI_Datatype arg): # <<<<<<<<<<<<<< * cdef Datatype obj = Datatype.__new__(Datatype) * obj.ob_mpi = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIDatatype_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":10 * return obj * * cdef api MPI_Datatype* PyMPIDatatype_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_Datatype *__pyx_f_6mpi4py_3MPI_PyMPIDatatype_Get(PyObject *__pyx_v_arg) { MPI_Datatype *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIDatatype_Get", 0); /* "mpi4py/MPI/CAPI.pxi":11 * * cdef api MPI_Datatype* PyMPIDatatype_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Datatype)))) __PYX_ERR(18, 11, __pyx_L1_error) __pyx_r = (&((struct PyMPIDatatypeObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":10 * return obj * * cdef api MPI_Datatype* PyMPIDatatype_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIDatatype_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":17 * # Status * * cdef api object PyMPIStatus_New(MPI_Status *arg): # <<<<<<<<<<<<<< * cdef Status obj = Status.__new__(Status) * if (arg != NULL and */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIStatus_New(MPI_Status *__pyx_v_arg) { struct PyMPIStatusObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("PyMPIStatus_New", 0); /* "mpi4py/MPI/CAPI.pxi":18 * * cdef api object PyMPIStatus_New(MPI_Status *arg): * cdef Status obj = Status.__new__(Status) # <<<<<<<<<<<<<< * if (arg != NULL and * arg != MPI_STATUS_IGNORE and */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Status(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Status), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 18, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIStatusObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":19 * cdef api object PyMPIStatus_New(MPI_Status *arg): * cdef Status obj = Status.__new__(Status) * if (arg != NULL and # <<<<<<<<<<<<<< * arg != MPI_STATUS_IGNORE and * arg != MPI_STATUSES_IGNORE): */ __pyx_t_4 = ((__pyx_v_arg != NULL) != 0); if (__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } /* "mpi4py/MPI/CAPI.pxi":20 * cdef Status obj = Status.__new__(Status) * if (arg != NULL and * arg != MPI_STATUS_IGNORE and # <<<<<<<<<<<<<< * arg != MPI_STATUSES_IGNORE): * obj.ob_mpi = arg[0] */ __pyx_t_4 = ((__pyx_v_arg != MPI_STATUS_IGNORE) != 0); if (__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } /* "mpi4py/MPI/CAPI.pxi":21 * if (arg != NULL and * arg != MPI_STATUS_IGNORE and * arg != MPI_STATUSES_IGNORE): # <<<<<<<<<<<<<< * obj.ob_mpi = arg[0] * else: pass # XXX should fail ? */ __pyx_t_4 = ((__pyx_v_arg != MPI_STATUSES_IGNORE) != 0); __pyx_t_3 = __pyx_t_4; __pyx_L4_bool_binop_done:; /* "mpi4py/MPI/CAPI.pxi":19 * cdef api object PyMPIStatus_New(MPI_Status *arg): * cdef Status obj = Status.__new__(Status) * if (arg != NULL and # <<<<<<<<<<<<<< * arg != MPI_STATUS_IGNORE and * arg != MPI_STATUSES_IGNORE): */ if (__pyx_t_3) { /* "mpi4py/MPI/CAPI.pxi":22 * arg != MPI_STATUS_IGNORE and * arg != MPI_STATUSES_IGNORE): * obj.ob_mpi = arg[0] # <<<<<<<<<<<<<< * else: pass # XXX should fail ? * return obj */ __pyx_v_obj->ob_mpi = (__pyx_v_arg[0]); /* "mpi4py/MPI/CAPI.pxi":19 * cdef api object PyMPIStatus_New(MPI_Status *arg): * cdef Status obj = Status.__new__(Status) * if (arg != NULL and # <<<<<<<<<<<<<< * arg != MPI_STATUS_IGNORE and * arg != MPI_STATUSES_IGNORE): */ goto __pyx_L3; } /* "mpi4py/MPI/CAPI.pxi":23 * arg != MPI_STATUSES_IGNORE): * obj.ob_mpi = arg[0] * else: pass # XXX should fail ? # <<<<<<<<<<<<<< * return obj * */ /*else*/ { } __pyx_L3:; /* "mpi4py/MPI/CAPI.pxi":24 * obj.ob_mpi = arg[0] * else: pass # XXX should fail ? * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Status* PyMPIStatus_Get(object arg) except? NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":17 * # Status * * cdef api object PyMPIStatus_New(MPI_Status *arg): # <<<<<<<<<<<<<< * cdef Status obj = Status.__new__(Status) * if (arg != NULL and */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIStatus_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":26 * return obj * * cdef api MPI_Status* PyMPIStatus_Get(object arg) except? NULL: # <<<<<<<<<<<<<< * if arg is None: return MPI_STATUS_IGNORE * return &(arg).ob_mpi */ static MPI_Status *__pyx_f_6mpi4py_3MPI_PyMPIStatus_Get(PyObject *__pyx_v_arg) { MPI_Status *__pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("PyMPIStatus_Get", 0); /* "mpi4py/MPI/CAPI.pxi":27 * * cdef api MPI_Status* PyMPIStatus_Get(object arg) except? NULL: * if arg is None: return MPI_STATUS_IGNORE # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ __pyx_t_1 = (__pyx_v_arg == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = MPI_STATUS_IGNORE; goto __pyx_L0; } /* "mpi4py/MPI/CAPI.pxi":28 * cdef api MPI_Status* PyMPIStatus_Get(object arg) except? NULL: * if arg is None: return MPI_STATUS_IGNORE * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Status)))) __PYX_ERR(18, 28, __pyx_L1_error) __pyx_r = (&((struct PyMPIStatusObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":26 * return obj * * cdef api MPI_Status* PyMPIStatus_Get(object arg) except? NULL: # <<<<<<<<<<<<<< * if arg is None: return MPI_STATUS_IGNORE * return &(arg).ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIStatus_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":34 * # Request * * cdef api object PyMPIRequest_New(MPI_Request arg): # <<<<<<<<<<<<<< * cdef Request obj = Request.__new__(Request) * obj.ob_mpi = arg */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIRequest_New(MPI_Request __pyx_v_arg) { struct PyMPIRequestObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPIRequest_New", 0); /* "mpi4py/MPI/CAPI.pxi":35 * * cdef api object PyMPIRequest_New(MPI_Request arg): * cdef Request obj = Request.__new__(Request) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 35, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":36 * cdef api object PyMPIRequest_New(MPI_Request arg): * cdef Request obj = Request.__new__(Request) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":37 * cdef Request obj = Request.__new__(Request) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Request* PyMPIRequest_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":34 * # Request * * cdef api object PyMPIRequest_New(MPI_Request arg): # <<<<<<<<<<<<<< * cdef Request obj = Request.__new__(Request) * obj.ob_mpi = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIRequest_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":39 * return obj * * cdef api MPI_Request* PyMPIRequest_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_Request *__pyx_f_6mpi4py_3MPI_PyMPIRequest_Get(PyObject *__pyx_v_arg) { MPI_Request *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIRequest_Get", 0); /* "mpi4py/MPI/CAPI.pxi":40 * * cdef api MPI_Request* PyMPIRequest_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Request)))) __PYX_ERR(18, 40, __pyx_L1_error) __pyx_r = (&((struct PyMPIRequestObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":39 * return obj * * cdef api MPI_Request* PyMPIRequest_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIRequest_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":46 * # Message * * cdef api object PyMPIMessage_New(MPI_Message arg): # <<<<<<<<<<<<<< * cdef Message obj = Message.__new__(Message) * obj.ob_mpi = arg */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIMessage_New(MPI_Message __pyx_v_arg) { struct PyMPIMessageObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPIMessage_New", 0); /* "mpi4py/MPI/CAPI.pxi":47 * * cdef api object PyMPIMessage_New(MPI_Message arg): * cdef Message obj = Message.__new__(Message) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Message(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 47, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIMessageObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":48 * cdef api object PyMPIMessage_New(MPI_Message arg): * cdef Message obj = Message.__new__(Message) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":49 * cdef Message obj = Message.__new__(Message) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Message* PyMPIMessage_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":46 * # Message * * cdef api object PyMPIMessage_New(MPI_Message arg): # <<<<<<<<<<<<<< * cdef Message obj = Message.__new__(Message) * obj.ob_mpi = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIMessage_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":51 * return obj * * cdef api MPI_Message* PyMPIMessage_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_Message *__pyx_f_6mpi4py_3MPI_PyMPIMessage_Get(PyObject *__pyx_v_arg) { MPI_Message *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIMessage_Get", 0); /* "mpi4py/MPI/CAPI.pxi":52 * * cdef api MPI_Message* PyMPIMessage_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Message)))) __PYX_ERR(18, 52, __pyx_L1_error) __pyx_r = (&((struct PyMPIMessageObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":51 * return obj * * cdef api MPI_Message* PyMPIMessage_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIMessage_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":58 * # Op * * cdef api object PyMPIOp_New(MPI_Op arg): # <<<<<<<<<<<<<< * cdef Op obj = Op.__new__(Op) * obj.ob_mpi = arg */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIOp_New(MPI_Op __pyx_v_arg) { struct PyMPIOpObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPIOp_New", 0); /* "mpi4py/MPI/CAPI.pxi":59 * * cdef api object PyMPIOp_New(MPI_Op arg): * cdef Op obj = Op.__new__(Op) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Op(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Op), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 59, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIOpObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":60 * cdef api object PyMPIOp_New(MPI_Op arg): * cdef Op obj = Op.__new__(Op) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":61 * cdef Op obj = Op.__new__(Op) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Op* PyMPIOp_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":58 * # Op * * cdef api object PyMPIOp_New(MPI_Op arg): # <<<<<<<<<<<<<< * cdef Op obj = Op.__new__(Op) * obj.ob_mpi = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIOp_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":63 * return obj * * cdef api MPI_Op* PyMPIOp_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_Op *__pyx_f_6mpi4py_3MPI_PyMPIOp_Get(PyObject *__pyx_v_arg) { MPI_Op *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIOp_Get", 0); /* "mpi4py/MPI/CAPI.pxi":64 * * cdef api MPI_Op* PyMPIOp_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Op)))) __PYX_ERR(18, 64, __pyx_L1_error) __pyx_r = (&((struct PyMPIOpObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":63 * return obj * * cdef api MPI_Op* PyMPIOp_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIOp_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":70 * # Info * * cdef api object PyMPIInfo_New(MPI_Info arg): # <<<<<<<<<<<<<< * cdef Info obj = Info.__new__(Info) * obj.ob_mpi = arg */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIInfo_New(MPI_Info __pyx_v_arg) { struct PyMPIInfoObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPIInfo_New", 0); /* "mpi4py/MPI/CAPI.pxi":71 * * cdef api object PyMPIInfo_New(MPI_Info arg): * cdef Info obj = Info.__new__(Info) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Info(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 71, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIInfoObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":72 * cdef api object PyMPIInfo_New(MPI_Info arg): * cdef Info obj = Info.__new__(Info) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":73 * cdef Info obj = Info.__new__(Info) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Info* PyMPIInfo_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":70 * # Info * * cdef api object PyMPIInfo_New(MPI_Info arg): # <<<<<<<<<<<<<< * cdef Info obj = Info.__new__(Info) * obj.ob_mpi = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIInfo_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":75 * return obj * * cdef api MPI_Info* PyMPIInfo_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_Info *__pyx_f_6mpi4py_3MPI_PyMPIInfo_Get(PyObject *__pyx_v_arg) { MPI_Info *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIInfo_Get", 0); /* "mpi4py/MPI/CAPI.pxi":76 * * cdef api MPI_Info* PyMPIInfo_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Info)))) __PYX_ERR(18, 76, __pyx_L1_error) __pyx_r = (&((struct PyMPIInfoObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":75 * return obj * * cdef api MPI_Info* PyMPIInfo_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIInfo_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":82 * # Group * * cdef api object PyMPIGroup_New(MPI_Group arg): # <<<<<<<<<<<<<< * cdef Group obj = Group.__new__(Group) * obj.ob_mpi = arg */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIGroup_New(MPI_Group __pyx_v_arg) { struct PyMPIGroupObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPIGroup_New", 0); /* "mpi4py/MPI/CAPI.pxi":83 * * cdef api object PyMPIGroup_New(MPI_Group arg): * cdef Group obj = Group.__new__(Group) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 83, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":84 * cdef api object PyMPIGroup_New(MPI_Group arg): * cdef Group obj = Group.__new__(Group) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":85 * cdef Group obj = Group.__new__(Group) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Group* PyMPIGroup_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":82 * # Group * * cdef api object PyMPIGroup_New(MPI_Group arg): # <<<<<<<<<<<<<< * cdef Group obj = Group.__new__(Group) * obj.ob_mpi = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIGroup_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":87 * return obj * * cdef api MPI_Group* PyMPIGroup_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_Group *__pyx_f_6mpi4py_3MPI_PyMPIGroup_Get(PyObject *__pyx_v_arg) { MPI_Group *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIGroup_Get", 0); /* "mpi4py/MPI/CAPI.pxi":88 * * cdef api MPI_Group* PyMPIGroup_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Group)))) __PYX_ERR(18, 88, __pyx_L1_error) __pyx_r = (&((struct PyMPIGroupObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":87 * return obj * * cdef api MPI_Group* PyMPIGroup_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIGroup_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":94 * # Comm * * cdef api object PyMPIComm_New(MPI_Comm arg): # <<<<<<<<<<<<<< * cdef type cls = Comm * cdef int inter = 0 */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIComm_New(MPI_Comm __pyx_v_arg) { PyTypeObject *__pyx_v_cls = 0; int __pyx_v_inter; int __pyx_v_topo; struct PyMPICommObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("PyMPIComm_New", 0); /* "mpi4py/MPI/CAPI.pxi":95 * * cdef api object PyMPIComm_New(MPI_Comm arg): * cdef type cls = Comm # <<<<<<<<<<<<<< * cdef int inter = 0 * cdef int topo = MPI_UNDEFINED */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm)); __pyx_v_cls = __pyx_ptype_6mpi4py_3MPI_Comm; /* "mpi4py/MPI/CAPI.pxi":96 * cdef api object PyMPIComm_New(MPI_Comm arg): * cdef type cls = Comm * cdef int inter = 0 # <<<<<<<<<<<<<< * cdef int topo = MPI_UNDEFINED * if arg != MPI_COMM_NULL: */ __pyx_v_inter = 0; /* "mpi4py/MPI/CAPI.pxi":97 * cdef type cls = Comm * cdef int inter = 0 * cdef int topo = MPI_UNDEFINED # <<<<<<<<<<<<<< * if arg != MPI_COMM_NULL: * CHKERR( MPI_Comm_test_inter(arg, &inter) ) */ __pyx_v_topo = MPI_UNDEFINED; /* "mpi4py/MPI/CAPI.pxi":98 * cdef int inter = 0 * cdef int topo = MPI_UNDEFINED * if arg != MPI_COMM_NULL: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(arg, &inter) ) * if inter: */ __pyx_t_1 = ((__pyx_v_arg != MPI_COMM_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/CAPI.pxi":99 * cdef int topo = MPI_UNDEFINED * if arg != MPI_COMM_NULL: * CHKERR( MPI_Comm_test_inter(arg, &inter) ) # <<<<<<<<<<<<<< * if inter: * cls = Intercomm */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_arg, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(18, 99, __pyx_L1_error) /* "mpi4py/MPI/CAPI.pxi":100 * if arg != MPI_COMM_NULL: * CHKERR( MPI_Comm_test_inter(arg, &inter) ) * if inter: # <<<<<<<<<<<<<< * cls = Intercomm * else: */ __pyx_t_1 = (__pyx_v_inter != 0); if (__pyx_t_1) { /* "mpi4py/MPI/CAPI.pxi":101 * CHKERR( MPI_Comm_test_inter(arg, &inter) ) * if inter: * cls = Intercomm # <<<<<<<<<<<<<< * else: * CHKERR( MPI_Topo_test(arg, &topo) ) */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm)); __Pyx_DECREF_SET(__pyx_v_cls, __pyx_ptype_6mpi4py_3MPI_Intercomm); /* "mpi4py/MPI/CAPI.pxi":100 * if arg != MPI_COMM_NULL: * CHKERR( MPI_Comm_test_inter(arg, &inter) ) * if inter: # <<<<<<<<<<<<<< * cls = Intercomm * else: */ goto __pyx_L4; } /* "mpi4py/MPI/CAPI.pxi":103 * cls = Intercomm * else: * CHKERR( MPI_Topo_test(arg, &topo) ) # <<<<<<<<<<<<<< * if topo == MPI_UNDEFINED: * cls = Intracomm */ /*else*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Topo_test(__pyx_v_arg, (&__pyx_v_topo))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(18, 103, __pyx_L1_error) /* "mpi4py/MPI/CAPI.pxi":104 * else: * CHKERR( MPI_Topo_test(arg, &topo) ) * if topo == MPI_UNDEFINED: # <<<<<<<<<<<<<< * cls = Intracomm * elif topo == MPI_CART: */ __pyx_t_1 = ((__pyx_v_topo == MPI_UNDEFINED) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/CAPI.pxi":105 * CHKERR( MPI_Topo_test(arg, &topo) ) * if topo == MPI_UNDEFINED: * cls = Intracomm # <<<<<<<<<<<<<< * elif topo == MPI_CART: * cls = Cartcomm */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intracomm)); __Pyx_DECREF_SET(__pyx_v_cls, __pyx_ptype_6mpi4py_3MPI_Intracomm); /* "mpi4py/MPI/CAPI.pxi":104 * else: * CHKERR( MPI_Topo_test(arg, &topo) ) * if topo == MPI_UNDEFINED: # <<<<<<<<<<<<<< * cls = Intracomm * elif topo == MPI_CART: */ goto __pyx_L5; } /* "mpi4py/MPI/CAPI.pxi":106 * if topo == MPI_UNDEFINED: * cls = Intracomm * elif topo == MPI_CART: # <<<<<<<<<<<<<< * cls = Cartcomm * elif topo == MPI_GRAPH: */ __pyx_t_1 = ((__pyx_v_topo == MPI_CART) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/CAPI.pxi":107 * cls = Intracomm * elif topo == MPI_CART: * cls = Cartcomm # <<<<<<<<<<<<<< * elif topo == MPI_GRAPH: * cls = Graphcomm */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Cartcomm)); __Pyx_DECREF_SET(__pyx_v_cls, __pyx_ptype_6mpi4py_3MPI_Cartcomm); /* "mpi4py/MPI/CAPI.pxi":106 * if topo == MPI_UNDEFINED: * cls = Intracomm * elif topo == MPI_CART: # <<<<<<<<<<<<<< * cls = Cartcomm * elif topo == MPI_GRAPH: */ goto __pyx_L5; } /* "mpi4py/MPI/CAPI.pxi":108 * elif topo == MPI_CART: * cls = Cartcomm * elif topo == MPI_GRAPH: # <<<<<<<<<<<<<< * cls = Graphcomm * elif topo == MPI_DIST_GRAPH: */ __pyx_t_1 = ((__pyx_v_topo == MPI_GRAPH) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/CAPI.pxi":109 * cls = Cartcomm * elif topo == MPI_GRAPH: * cls = Graphcomm # <<<<<<<<<<<<<< * elif topo == MPI_DIST_GRAPH: * cls = Distgraphcomm */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Graphcomm)); __Pyx_DECREF_SET(__pyx_v_cls, __pyx_ptype_6mpi4py_3MPI_Graphcomm); /* "mpi4py/MPI/CAPI.pxi":108 * elif topo == MPI_CART: * cls = Cartcomm * elif topo == MPI_GRAPH: # <<<<<<<<<<<<<< * cls = Graphcomm * elif topo == MPI_DIST_GRAPH: */ goto __pyx_L5; } /* "mpi4py/MPI/CAPI.pxi":110 * elif topo == MPI_GRAPH: * cls = Graphcomm * elif topo == MPI_DIST_GRAPH: # <<<<<<<<<<<<<< * cls = Distgraphcomm * else: */ __pyx_t_1 = ((__pyx_v_topo == MPI_DIST_GRAPH) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/CAPI.pxi":111 * cls = Graphcomm * elif topo == MPI_DIST_GRAPH: * cls = Distgraphcomm # <<<<<<<<<<<<<< * else: * cls = Intracomm */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Distgraphcomm)); __Pyx_DECREF_SET(__pyx_v_cls, __pyx_ptype_6mpi4py_3MPI_Distgraphcomm); /* "mpi4py/MPI/CAPI.pxi":110 * elif topo == MPI_GRAPH: * cls = Graphcomm * elif topo == MPI_DIST_GRAPH: # <<<<<<<<<<<<<< * cls = Distgraphcomm * else: */ goto __pyx_L5; } /* "mpi4py/MPI/CAPI.pxi":113 * cls = Distgraphcomm * else: * cls = Intracomm # <<<<<<<<<<<<<< * cdef Comm obj = cls.__new__(cls) * obj.ob_mpi = arg */ /*else*/ { __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intracomm)); __Pyx_DECREF_SET(__pyx_v_cls, __pyx_ptype_6mpi4py_3MPI_Intracomm); } __pyx_L5:; } __pyx_L4:; /* "mpi4py/MPI/CAPI.pxi":98 * cdef int inter = 0 * cdef int topo = MPI_UNDEFINED * if arg != MPI_COMM_NULL: # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(arg, &inter) ) * if inter: */ } /* "mpi4py/MPI/CAPI.pxi":114 * else: * cls = Intracomm * cdef Comm obj = cls.__new__(cls) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ if (unlikely(((PyObject *)__pyx_v_cls) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object.__new__(X): X is not a type object (NoneType)"); __PYX_ERR(18, 114, __pyx_L1_error) } __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_v_cls), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(18, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_obj = ((struct PyMPICommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/CAPI.pxi":115 * cls = Intracomm * cdef Comm obj = cls.__new__(cls) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":116 * cdef Comm obj = cls.__new__(cls) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Comm* PyMPIComm_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":94 * # Comm * * cdef api object PyMPIComm_New(MPI_Comm arg): # <<<<<<<<<<<<<< * cdef type cls = Comm * cdef int inter = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.PyMPIComm_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cls); __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":118 * return obj * * cdef api MPI_Comm* PyMPIComm_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_Comm *__pyx_f_6mpi4py_3MPI_PyMPIComm_Get(PyObject *__pyx_v_arg) { MPI_Comm *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIComm_Get", 0); /* "mpi4py/MPI/CAPI.pxi":119 * * cdef api MPI_Comm* PyMPIComm_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Comm)))) __PYX_ERR(18, 119, __pyx_L1_error) __pyx_r = (&((struct PyMPICommObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":118 * return obj * * cdef api MPI_Comm* PyMPIComm_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIComm_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":125 * # Win * * cdef api object PyMPIWin_New(MPI_Win arg): # <<<<<<<<<<<<<< * cdef Win obj = Win.__new__(Win) * obj.ob_mpi = arg */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIWin_New(MPI_Win __pyx_v_arg) { struct PyMPIWinObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPIWin_New", 0); /* "mpi4py/MPI/CAPI.pxi":126 * * cdef api object PyMPIWin_New(MPI_Win arg): * cdef Win obj = Win.__new__(Win) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Win(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Win), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 126, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIWinObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":127 * cdef api object PyMPIWin_New(MPI_Win arg): * cdef Win obj = Win.__new__(Win) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":128 * cdef Win obj = Win.__new__(Win) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Win* PyMPIWin_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":125 * # Win * * cdef api object PyMPIWin_New(MPI_Win arg): # <<<<<<<<<<<<<< * cdef Win obj = Win.__new__(Win) * obj.ob_mpi = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIWin_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":130 * return obj * * cdef api MPI_Win* PyMPIWin_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_Win *__pyx_f_6mpi4py_3MPI_PyMPIWin_Get(PyObject *__pyx_v_arg) { MPI_Win *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIWin_Get", 0); /* "mpi4py/MPI/CAPI.pxi":131 * * cdef api MPI_Win* PyMPIWin_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Win)))) __PYX_ERR(18, 131, __pyx_L1_error) __pyx_r = (&((struct PyMPIWinObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":130 * return obj * * cdef api MPI_Win* PyMPIWin_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIWin_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":137 * # File * * cdef api object PyMPIFile_New(MPI_File arg): # <<<<<<<<<<<<<< * cdef File obj = File.__new__(File) * obj.ob_mpi = arg */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIFile_New(MPI_File __pyx_v_arg) { struct PyMPIFileObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPIFile_New", 0); /* "mpi4py/MPI/CAPI.pxi":138 * * cdef api object PyMPIFile_New(MPI_File arg): * cdef File obj = File.__new__(File) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_File(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_File), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 138, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIFileObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":139 * cdef api object PyMPIFile_New(MPI_File arg): * cdef File obj = File.__new__(File) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":140 * cdef File obj = File.__new__(File) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_File* PyMPIFile_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":137 * # File * * cdef api object PyMPIFile_New(MPI_File arg): # <<<<<<<<<<<<<< * cdef File obj = File.__new__(File) * obj.ob_mpi = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIFile_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":142 * return obj * * cdef api MPI_File* PyMPIFile_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_File *__pyx_f_6mpi4py_3MPI_PyMPIFile_Get(PyObject *__pyx_v_arg) { MPI_File *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIFile_Get", 0); /* "mpi4py/MPI/CAPI.pxi":143 * * cdef api MPI_File* PyMPIFile_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_File)))) __PYX_ERR(18, 143, __pyx_L1_error) __pyx_r = (&((struct PyMPIFileObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":142 * return obj * * cdef api MPI_File* PyMPIFile_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIFile_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":149 * # Errhandler * * cdef api object PyMPIErrhandler_New(MPI_Errhandler arg): # <<<<<<<<<<<<<< * cdef Errhandler obj = Errhandler.__new__(Errhandler) * obj.ob_mpi = arg */ static PyObject *__pyx_f_6mpi4py_3MPI_PyMPIErrhandler_New(MPI_Errhandler __pyx_v_arg) { struct PyMPIErrhandlerObject *__pyx_v_obj = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("PyMPIErrhandler_New", 0); /* "mpi4py/MPI/CAPI.pxi":150 * * cdef api object PyMPIErrhandler_New(MPI_Errhandler arg): * cdef Errhandler obj = Errhandler.__new__(Errhandler) # <<<<<<<<<<<<<< * obj.ob_mpi = arg * return obj */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Errhandler(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Errhandler), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 150, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_obj = ((struct PyMPIErrhandlerObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/CAPI.pxi":151 * cdef api object PyMPIErrhandler_New(MPI_Errhandler arg): * cdef Errhandler obj = Errhandler.__new__(Errhandler) * obj.ob_mpi = arg # <<<<<<<<<<<<<< * return obj * */ __pyx_v_obj->ob_mpi = __pyx_v_arg; /* "mpi4py/MPI/CAPI.pxi":152 * cdef Errhandler obj = Errhandler.__new__(Errhandler) * obj.ob_mpi = arg * return obj # <<<<<<<<<<<<<< * * cdef api MPI_Errhandler* PyMPIErrhandler_Get(object arg) except NULL: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_obj)); __pyx_r = ((PyObject *)__pyx_v_obj); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":149 * # Errhandler * * cdef api object PyMPIErrhandler_New(MPI_Errhandler arg): # <<<<<<<<<<<<<< * cdef Errhandler obj = Errhandler.__new__(Errhandler) * obj.ob_mpi = arg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.PyMPIErrhandler_New", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/CAPI.pxi":154 * return obj * * cdef api MPI_Errhandler* PyMPIErrhandler_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ static MPI_Errhandler *__pyx_f_6mpi4py_3MPI_PyMPIErrhandler_Get(PyObject *__pyx_v_arg) { MPI_Errhandler *__pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("PyMPIErrhandler_Get", 0); /* "mpi4py/MPI/CAPI.pxi":155 * * cdef api MPI_Errhandler* PyMPIErrhandler_Get(object arg) except NULL: * return &(arg).ob_mpi # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (!(likely(__Pyx_TypeTest(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Errhandler)))) __PYX_ERR(18, 155, __pyx_L1_error) __pyx_r = (&((struct PyMPIErrhandlerObject *)__pyx_v_arg)->ob_mpi); goto __pyx_L0; /* "mpi4py/MPI/CAPI.pxi":154 * return obj * * cdef api MPI_Errhandler* PyMPIErrhandler_Get(object arg) except NULL: # <<<<<<<<<<<<<< * return &(arg).ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.PyMPIErrhandler_Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":7 * """ * * def __init__(self, int ierr=0): # <<<<<<<<<<<<<< * if ierr < MPI_SUCCESS: ierr = MPI_ERR_UNKNOWN * self.ob_mpi = ierr */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception___init__[] = "Exception.__init__(self, int ierr=0)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception___init__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; int __pyx_v_ierr; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ierr,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ierr); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 7, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; if (values[1]) { __pyx_v_ierr = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ierr == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 7, __pyx_L3_error) } else { __pyx_v_ierr = ((int)((int)0)); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 7, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception___init__(__pyx_self, __pyx_v_self, __pyx_v_ierr); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_ierr) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__init__", 0); /* "mpi4py/MPI/ExceptionP.pyx":8 * * def __init__(self, int ierr=0): * if ierr < MPI_SUCCESS: ierr = MPI_ERR_UNKNOWN # <<<<<<<<<<<<<< * self.ob_mpi = ierr * RuntimeError.__init__(self, self.ob_mpi) */ __pyx_t_1 = ((__pyx_v_ierr < MPI_SUCCESS) != 0); if (__pyx_t_1) { __pyx_v_ierr = MPI_ERR_UNKNOWN; } /* "mpi4py/MPI/ExceptionP.pyx":9 * def __init__(self, int ierr=0): * if ierr < MPI_SUCCESS: ierr = MPI_ERR_UNKNOWN * self.ob_mpi = ierr # <<<<<<<<<<<<<< * RuntimeError.__init__(self, self.ob_mpi) * */ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi, __pyx_t_2) < 0) __PYX_ERR(1, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/ExceptionP.pyx":10 * if ierr < MPI_SUCCESS: ierr = MPI_ERR_UNKNOWN * self.ob_mpi = ierr * RuntimeError.__init__(self, self.ob_mpi) # <<<<<<<<<<<<<< * * def __eq__(self, object error): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_RuntimeError, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self, __pyx_t_4}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_self, __pyx_t_4}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_self); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/ExceptionP.pyx":7 * """ * * def __init__(self, int ierr=0): # <<<<<<<<<<<<<< * if ierr < MPI_SUCCESS: ierr = MPI_ERR_UNKNOWN * self.ob_mpi = ierr */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.Exception.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":12 * RuntimeError.__init__(self, self.ob_mpi) * * def __eq__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr == error) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_3__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_2__eq__[] = "Exception.__eq__(self, error)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_3__eq__ = {"__eq__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_3__eq__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_2__eq__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_3__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_error = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_error,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, 1); __PYX_ERR(1, 12, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__eq__") < 0)) __PYX_ERR(1, 12, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_error = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 12, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_2__eq__(__pyx_self, __pyx_v_self, __pyx_v_error); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_2__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error) { int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__eq__", 0); /* "mpi4py/MPI/ExceptionP.pyx":13 * * def __eq__(self, object error): * cdef int ierr = self.ob_mpi # <<<<<<<<<<<<<< * return (ierr == error) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ierr = __pyx_t_2; /* "mpi4py/MPI/ExceptionP.pyx":14 * def __eq__(self, object error): * cdef int ierr = self.ob_mpi * return (ierr == error) # <<<<<<<<<<<<<< * * def __ne__(self, object error): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_error, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":12 * RuntimeError.__init__(self, self.ob_mpi) * * def __eq__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr == error) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Exception.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":16 * return (ierr == error) * * def __ne__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr != error) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_5__ne__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_4__ne__[] = "Exception.__ne__(self, error)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_5__ne__ = {"__ne__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_5__ne__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_4__ne__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_5__ne__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_error = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_error,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__ne__", 1, 2, 2, 1); __PYX_ERR(1, 16, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__ne__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_error = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__ne__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 16, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_4__ne__(__pyx_self, __pyx_v_self, __pyx_v_error); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_4__ne__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error) { int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__ne__", 0); /* "mpi4py/MPI/ExceptionP.pyx":17 * * def __ne__(self, object error): * cdef int ierr = self.ob_mpi # <<<<<<<<<<<<<< * return (ierr != error) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ierr = __pyx_t_2; /* "mpi4py/MPI/ExceptionP.pyx":18 * def __ne__(self, object error): * cdef int ierr = self.ob_mpi * return (ierr != error) # <<<<<<<<<<<<<< * * def __lt__(self, object error): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_error, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":16 * return (ierr == error) * * def __ne__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr != error) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Exception.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":20 * return (ierr != error) * * def __lt__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr < error) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_7__lt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_6__lt__[] = "Exception.__lt__(self, error)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_7__lt__ = {"__lt__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_7__lt__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_6__lt__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_7__lt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_error = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__lt__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_error,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__lt__", 1, 2, 2, 1); __PYX_ERR(1, 20, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__lt__") < 0)) __PYX_ERR(1, 20, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_error = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__lt__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 20, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__lt__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_6__lt__(__pyx_self, __pyx_v_self, __pyx_v_error); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_6__lt__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error) { int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__lt__", 0); /* "mpi4py/MPI/ExceptionP.pyx":21 * * def __lt__(self, object error): * cdef int ierr = self.ob_mpi # <<<<<<<<<<<<<< * return (ierr < error) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ierr = __pyx_t_2; /* "mpi4py/MPI/ExceptionP.pyx":22 * def __lt__(self, object error): * cdef int ierr = self.ob_mpi * return (ierr < error) # <<<<<<<<<<<<<< * * def __le__(self, object error): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_error, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":20 * return (ierr != error) * * def __lt__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr < error) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Exception.__lt__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":24 * return (ierr < error) * * def __le__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr <= error) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_9__le__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_8__le__[] = "Exception.__le__(self, error)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_9__le__ = {"__le__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_9__le__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_8__le__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_9__le__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_error = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__le__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_error,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__le__", 1, 2, 2, 1); __PYX_ERR(1, 24, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__le__") < 0)) __PYX_ERR(1, 24, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_error = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__le__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 24, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__le__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_8__le__(__pyx_self, __pyx_v_self, __pyx_v_error); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_8__le__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error) { int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__le__", 0); /* "mpi4py/MPI/ExceptionP.pyx":25 * * def __le__(self, object error): * cdef int ierr = self.ob_mpi # <<<<<<<<<<<<<< * return (ierr <= error) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ierr = __pyx_t_2; /* "mpi4py/MPI/ExceptionP.pyx":26 * def __le__(self, object error): * cdef int ierr = self.ob_mpi * return (ierr <= error) # <<<<<<<<<<<<<< * * def __gt__(self, object error): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_error, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":24 * return (ierr < error) * * def __le__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr <= error) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Exception.__le__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":28 * return (ierr <= error) * * def __gt__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr > error) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_11__gt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_10__gt__[] = "Exception.__gt__(self, error)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_11__gt__ = {"__gt__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_11__gt__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_10__gt__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_11__gt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_error = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__gt__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_error,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__gt__", 1, 2, 2, 1); __PYX_ERR(1, 28, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__gt__") < 0)) __PYX_ERR(1, 28, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_error = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__gt__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 28, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__gt__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_10__gt__(__pyx_self, __pyx_v_self, __pyx_v_error); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_10__gt__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error) { int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__gt__", 0); /* "mpi4py/MPI/ExceptionP.pyx":29 * * def __gt__(self, object error): * cdef int ierr = self.ob_mpi # <<<<<<<<<<<<<< * return (ierr > error) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ierr = __pyx_t_2; /* "mpi4py/MPI/ExceptionP.pyx":30 * def __gt__(self, object error): * cdef int ierr = self.ob_mpi * return (ierr > error) # <<<<<<<<<<<<<< * * def __ge__(self, object error): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_error, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":28 * return (ierr <= error) * * def __gt__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr > error) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Exception.__gt__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":32 * return (ierr > error) * * def __ge__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr >= error) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_13__ge__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_12__ge__[] = "Exception.__ge__(self, error)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_13__ge__ = {"__ge__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_13__ge__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_12__ge__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_13__ge__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_error = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__ge__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_error,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__ge__", 1, 2, 2, 1); __PYX_ERR(1, 32, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__ge__") < 0)) __PYX_ERR(1, 32, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_self = values[0]; __pyx_v_error = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__ge__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 32, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__ge__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_12__ge__(__pyx_self, __pyx_v_self, __pyx_v_error); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_12__ge__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error) { int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__ge__", 0); /* "mpi4py/MPI/ExceptionP.pyx":33 * * def __ge__(self, object error): * cdef int ierr = self.ob_mpi # <<<<<<<<<<<<<< * return (ierr >= error) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ierr = __pyx_t_2; /* "mpi4py/MPI/ExceptionP.pyx":34 * def __ge__(self, object error): * cdef int ierr = self.ob_mpi * return (ierr >= error) # <<<<<<<<<<<<<< * * def __hash__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ierr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_error, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":32 * return (ierr > error) * * def __ge__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr >= error) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Exception.__ge__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":36 * return (ierr >= error) * * def __hash__(self): # <<<<<<<<<<<<<< * return hash(self.ob_mpi) * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_15__hash__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_14__hash__[] = "Exception.__hash__(self)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_15__hash__ = {"__hash__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_15__hash__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_14__hash__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_15__hash__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__hash__") < 0)) __PYX_ERR(1, 36, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__hash__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 36, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_14__hash__(__pyx_self, __pyx_v_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_14__hash__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); /* "mpi4py/MPI/ExceptionP.pyx":37 * * def __hash__(self): * return hash(self.ob_mpi) # <<<<<<<<<<<<<< * * def __bool__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(1, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromHash_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":36 * return (ierr >= error) * * def __hash__(self): # <<<<<<<<<<<<<< * return hash(self.ob_mpi) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Exception.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":39 * return hash(self.ob_mpi) * * def __bool__(self): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return ierr != MPI_SUCCESS */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_17__bool__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_16__bool__[] = "Exception.__bool__(self)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_17__bool__ = {"__bool__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_17__bool__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_16__bool__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_17__bool__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__bool__") < 0)) __PYX_ERR(1, 39, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__bool__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 39, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_16__bool__(__pyx_self, __pyx_v_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_16__bool__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { int __pyx_v_ierr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/ExceptionP.pyx":40 * * def __bool__(self): * cdef int ierr = self.ob_mpi # <<<<<<<<<<<<<< * return ierr != MPI_SUCCESS * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ierr = __pyx_t_2; /* "mpi4py/MPI/ExceptionP.pyx":41 * def __bool__(self): * cdef int ierr = self.ob_mpi * return ierr != MPI_SUCCESS # <<<<<<<<<<<<<< * * __nonzero__ = __bool__ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_ierr != MPI_SUCCESS)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":39 * return hash(self.ob_mpi) * * def __bool__(self): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return ierr != MPI_SUCCESS */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Exception.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":45 * __nonzero__ = __bool__ * * def __int__(self): # <<<<<<<<<<<<<< * return self.ob_mpi * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_19__int__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_18__int__[] = "Exception.__int__(self)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_19__int__ = {"__int__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_19__int__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_18__int__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_19__int__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__int__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__int__") < 0)) __PYX_ERR(1, 45, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__int__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 45, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_18__int__(__pyx_self, __pyx_v_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_18__int__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__int__", 0); /* "mpi4py/MPI/ExceptionP.pyx":46 * * def __int__(self): * return self.ob_mpi # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":45 * __nonzero__ = __bool__ * * def __int__(self): # <<<<<<<<<<<<<< * return self.ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Exception.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":48 * return self.ob_mpi * * def __repr__(self): # <<<<<<<<<<<<<< * return "MPI.Exception(%d)" % self.ob_mpi * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_21__repr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_20__repr__[] = "Exception.__repr__(self)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_21__repr__ = {"__repr__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_21__repr__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_20__repr__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_21__repr__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__repr__") < 0)) __PYX_ERR(1, 48, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 48, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_20__repr__(__pyx_self, __pyx_v_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_20__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); /* "mpi4py/MPI/ExceptionP.pyx":49 * * def __repr__(self): * return "MPI.Exception(%d)" % self.ob_mpi # <<<<<<<<<<<<<< * * def __str__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_MPI_Exception_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":48 * return self.ob_mpi * * def __repr__(self): # <<<<<<<<<<<<<< * return "MPI.Exception(%d)" % self.ob_mpi * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Exception.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":51 * return "MPI.Exception(%d)" % self.ob_mpi * * def __str__(self): # <<<<<<<<<<<<<< * if not mpi_active(): * return "error code: %d" % self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_23__str__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_22__str__[] = "Exception.__str__(self)"; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_23__str__ = {"__str__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_23__str__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_22__str__}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_23__str__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__str__") < 0)) __PYX_ERR(1, 51, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 51, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_22__str__(__pyx_self, __pyx_v_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_22__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__str__", 0); /* "mpi4py/MPI/ExceptionP.pyx":52 * * def __str__(self): * if not mpi_active(): # <<<<<<<<<<<<<< * return "error code: %d" % self.ob_mpi * return self.Get_error_string() */ __pyx_t_1 = ((!(__pyx_f_6mpi4py_3MPI_mpi_active() != 0)) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/ExceptionP.pyx":53 * def __str__(self): * if not mpi_active(): * return "error code: %d" % self.ob_mpi # <<<<<<<<<<<<<< * return self.Get_error_string() * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_error_code_d, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":52 * * def __str__(self): * if not mpi_active(): # <<<<<<<<<<<<<< * return "error code: %d" % self.ob_mpi * return self.Get_error_string() */ } /* "mpi4py/MPI/ExceptionP.pyx":54 * if not mpi_active(): * return "error code: %d" % self.ob_mpi * return self.Get_error_string() # <<<<<<<<<<<<<< * * def Get_error_code(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Get_error_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":51 * return "MPI.Exception(%d)" % self.ob_mpi * * def __str__(self): # <<<<<<<<<<<<<< * if not mpi_active(): * return "error code: %d" % self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Exception.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":56 * return self.Get_error_string() * * def Get_error_code(self): # <<<<<<<<<<<<<< * """ * Error code */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_25Get_error_code(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_24Get_error_code[] = "Exception.Get_error_code(self)\n\n Error code\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_25Get_error_code = {"Get_error_code", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_25Get_error_code, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_24Get_error_code}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_25Get_error_code(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_error_code (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_error_code") < 0)) __PYX_ERR(1, 56, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_error_code", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 56, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.Get_error_code", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_24Get_error_code(__pyx_self, __pyx_v_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_24Get_error_code(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { int __pyx_v_errorcode; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Get_error_code", 0); /* "mpi4py/MPI/ExceptionP.pyx":60 * Error code * """ * cdef int errorcode = MPI_SUCCESS # <<<<<<<<<<<<<< * errorcode = self.ob_mpi * return errorcode */ __pyx_v_errorcode = MPI_SUCCESS; /* "mpi4py/MPI/ExceptionP.pyx":61 * """ * cdef int errorcode = MPI_SUCCESS * errorcode = self.ob_mpi # <<<<<<<<<<<<<< * return errorcode * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_errorcode = __pyx_t_2; /* "mpi4py/MPI/ExceptionP.pyx":62 * cdef int errorcode = MPI_SUCCESS * errorcode = self.ob_mpi * return errorcode # <<<<<<<<<<<<<< * * error_code = property(Get_error_code, doc="error code") */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_errorcode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":56 * return self.Get_error_string() * * def Get_error_code(self): # <<<<<<<<<<<<<< * """ * Error code */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Exception.Get_error_code", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":66 * error_code = property(Get_error_code, doc="error code") * * def Get_error_class(self): # <<<<<<<<<<<<<< * """ * Error class */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_27Get_error_class(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_26Get_error_class[] = "Exception.Get_error_class(self)\n\n Error class\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_27Get_error_class = {"Get_error_class", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_27Get_error_class, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_26Get_error_class}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_27Get_error_class(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_error_class (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_error_class") < 0)) __PYX_ERR(1, 66, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_error_class", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 66, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.Get_error_class", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_26Get_error_class(__pyx_self, __pyx_v_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_26Get_error_class(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { int __pyx_v_errorclass; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_error_class", 0); /* "mpi4py/MPI/ExceptionP.pyx":70 * Error class * """ * cdef int errorclass = MPI_SUCCESS # <<<<<<<<<<<<<< * CHKERR( MPI_Error_class(self.ob_mpi, &errorclass) ) * return errorclass */ __pyx_v_errorclass = MPI_SUCCESS; /* "mpi4py/MPI/ExceptionP.pyx":71 * """ * cdef int errorclass = MPI_SUCCESS * CHKERR( MPI_Error_class(self.ob_mpi, &errorclass) ) # <<<<<<<<<<<<<< * return errorclass * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Error_class(__pyx_t_2, (&__pyx_v_errorclass))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 71, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":72 * cdef int errorclass = MPI_SUCCESS * CHKERR( MPI_Error_class(self.ob_mpi, &errorclass) ) * return errorclass # <<<<<<<<<<<<<< * * error_class = property(Get_error_class, doc="error class") */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_errorclass); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":66 * error_code = property(Get_error_code, doc="error code") * * def Get_error_class(self): # <<<<<<<<<<<<<< * """ * Error class */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Exception.Get_error_class", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/ExceptionP.pyx":76 * error_class = property(Get_error_class, doc="error class") * * def Get_error_string(self): # <<<<<<<<<<<<<< * """ * Error string */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_29Get_error_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Exception_28Get_error_string[] = "Exception.Get_error_string(self)\n\n Error string\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Exception_29Get_error_string = {"Get_error_string", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Exception_29Get_error_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Exception_28Get_error_string}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Exception_29Get_error_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_error_string (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_error_string") < 0)) __PYX_ERR(1, 76, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_error_string", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 76, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Exception.Get_error_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Exception_28Get_error_string(__pyx_self, __pyx_v_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Exception_28Get_error_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { char __pyx_v_string[(MPI_MAX_ERROR_STRING + 1)]; int __pyx_v_resultlen; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_error_string", 0); /* "mpi4py/MPI/ExceptionP.pyx":81 * """ * cdef char string[MPI_MAX_ERROR_STRING+1] * cdef int resultlen = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Error_string(self.ob_mpi, string, &resultlen) ) * return tompistr(string, resultlen) */ __pyx_v_resultlen = 0; /* "mpi4py/MPI/ExceptionP.pyx":82 * cdef char string[MPI_MAX_ERROR_STRING+1] * cdef int resultlen = 0 * CHKERR( MPI_Error_string(self.ob_mpi, string, &resultlen) ) # <<<<<<<<<<<<<< * return tompistr(string, resultlen) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_ob_mpi); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Error_string(__pyx_t_2, __pyx_v_string, (&__pyx_v_resultlen))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 82, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":83 * cdef int resultlen = 0 * CHKERR( MPI_Error_string(self.ob_mpi, string, &resultlen) ) * return tompistr(string, resultlen) # <<<<<<<<<<<<<< * * error_string = property(Get_error_string, doc="error string") */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_tompistr(__pyx_v_string, __pyx_v_resultlen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/ExceptionP.pyx":76 * error_class = property(Get_error_class, doc="error class") * * def Get_error_string(self): # <<<<<<<<<<<<<< * """ * Error string */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Exception.Get_error_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Exception.pyx":87 * * * def Get_error_class(int errorcode): # <<<<<<<<<<<<<< * """ * Convert an *error code* into an *error class* */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Get_error_class(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Get_error_class[] = "Get_error_class(int errorcode)\n\n Convert an *error code* into an *error class*\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_5Get_error_class = {"Get_error_class", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Get_error_class, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Get_error_class}; static PyObject *__pyx_pw_6mpi4py_3MPI_5Get_error_class(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_errorcode; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_error_class (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errorcode,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errorcode)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_error_class") < 0)) __PYX_ERR(19, 87, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_errorcode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_errorcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 87, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_error_class", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(19, 87, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Get_error_class", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Get_error_class(__pyx_self, __pyx_v_errorcode); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Get_error_class(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_errorcode) { int __pyx_v_errorclass; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_error_class", 0); /* "mpi4py/MPI/Exception.pyx":91 * Convert an *error code* into an *error class* * """ * cdef int errorclass = MPI_SUCCESS # <<<<<<<<<<<<<< * CHKERR( MPI_Error_class(errorcode, &errorclass) ) * return errorclass */ __pyx_v_errorclass = MPI_SUCCESS; /* "mpi4py/MPI/Exception.pyx":92 * """ * cdef int errorclass = MPI_SUCCESS * CHKERR( MPI_Error_class(errorcode, &errorclass) ) # <<<<<<<<<<<<<< * return errorclass * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Error_class(__pyx_v_errorcode, (&__pyx_v_errorclass))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 92, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":93 * cdef int errorclass = MPI_SUCCESS * CHKERR( MPI_Error_class(errorcode, &errorclass) ) * return errorclass # <<<<<<<<<<<<<< * * def Get_error_string(int errorcode): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_errorclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Exception.pyx":87 * * * def Get_error_class(int errorcode): # <<<<<<<<<<<<<< * """ * Convert an *error code* into an *error class* */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Get_error_class", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Exception.pyx":95 * return errorclass * * def Get_error_string(int errorcode): # <<<<<<<<<<<<<< * """ * Return the *error string* for a given */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Get_error_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Get_error_string[] = "Get_error_string(int errorcode)\n\n Return the *error string* for a given\n *error class* or *error code*\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_7Get_error_string = {"Get_error_string", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Get_error_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Get_error_string}; static PyObject *__pyx_pw_6mpi4py_3MPI_7Get_error_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_errorcode; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_error_string (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errorcode,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errorcode)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_error_string") < 0)) __PYX_ERR(19, 95, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_errorcode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_errorcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 95, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_error_string", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(19, 95, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Get_error_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Get_error_string(__pyx_self, __pyx_v_errorcode); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Get_error_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_errorcode) { char __pyx_v_string[(MPI_MAX_ERROR_STRING + 1)]; int __pyx_v_resultlen; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_error_string", 0); /* "mpi4py/MPI/Exception.pyx":101 * """ * cdef char string[MPI_MAX_ERROR_STRING+1] * cdef int resultlen = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Error_string(errorcode, string, &resultlen) ) * return tompistr(string, resultlen) */ __pyx_v_resultlen = 0; /* "mpi4py/MPI/Exception.pyx":102 * cdef char string[MPI_MAX_ERROR_STRING+1] * cdef int resultlen = 0 * CHKERR( MPI_Error_string(errorcode, string, &resultlen) ) # <<<<<<<<<<<<<< * return tompistr(string, resultlen) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Error_string(__pyx_v_errorcode, __pyx_v_string, (&__pyx_v_resultlen))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 102, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":103 * cdef int resultlen = 0 * CHKERR( MPI_Error_string(errorcode, string, &resultlen) ) * return tompistr(string, resultlen) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_tompistr(__pyx_v_string, __pyx_v_resultlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Exception.pyx":95 * return errorclass * * def Get_error_string(int errorcode): # <<<<<<<<<<<<<< * """ * Return the *error string* for a given */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Get_error_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Exception.pyx":106 * * * def Add_error_class(): # <<<<<<<<<<<<<< * """ * Add an *error class* to the known error classes */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Add_error_class(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Add_error_class[] = "Add_error_class()\n\n Add an *error class* to the known error classes\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_9Add_error_class = {"Add_error_class", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Add_error_class, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Add_error_class}; static PyObject *__pyx_pw_6mpi4py_3MPI_9Add_error_class(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Add_error_class (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Add_error_class", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Add_error_class", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Add_error_class(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Add_error_class(CYTHON_UNUSED PyObject *__pyx_self) { int __pyx_v_errorclass; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Add_error_class", 0); /* "mpi4py/MPI/Exception.pyx":110 * Add an *error class* to the known error classes * """ * cdef int errorclass = MPI_SUCCESS # <<<<<<<<<<<<<< * CHKERR( MPI_Add_error_class(&errorclass) ) * return errorclass */ __pyx_v_errorclass = MPI_SUCCESS; /* "mpi4py/MPI/Exception.pyx":111 * """ * cdef int errorclass = MPI_SUCCESS * CHKERR( MPI_Add_error_class(&errorclass) ) # <<<<<<<<<<<<<< * return errorclass * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Add_error_class((&__pyx_v_errorclass))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 111, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":112 * cdef int errorclass = MPI_SUCCESS * CHKERR( MPI_Add_error_class(&errorclass) ) * return errorclass # <<<<<<<<<<<<<< * * def Add_error_code(int errorclass): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_errorclass); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Exception.pyx":106 * * * def Add_error_class(): # <<<<<<<<<<<<<< * """ * Add an *error class* to the known error classes */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Add_error_class", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Exception.pyx":114 * return errorclass * * def Add_error_code(int errorclass): # <<<<<<<<<<<<<< * """ * Add an *error code* to an *error class* */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_11Add_error_code(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_10Add_error_code[] = "Add_error_code(int errorclass)\n\n Add an *error code* to an *error class*\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_11Add_error_code = {"Add_error_code", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_11Add_error_code, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_10Add_error_code}; static PyObject *__pyx_pw_6mpi4py_3MPI_11Add_error_code(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_errorclass; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Add_error_code (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errorclass,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errorclass)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add_error_code") < 0)) __PYX_ERR(19, 114, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_errorclass = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_errorclass == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 114, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Add_error_code", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(19, 114, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Add_error_code", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_10Add_error_code(__pyx_self, __pyx_v_errorclass); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_10Add_error_code(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_errorclass) { int __pyx_v_errorcode; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Add_error_code", 0); /* "mpi4py/MPI/Exception.pyx":118 * Add an *error code* to an *error class* * """ * cdef int errorcode = MPI_SUCCESS # <<<<<<<<<<<<<< * CHKERR( MPI_Add_error_code(errorclass, &errorcode) ) * return errorcode */ __pyx_v_errorcode = MPI_SUCCESS; /* "mpi4py/MPI/Exception.pyx":119 * """ * cdef int errorcode = MPI_SUCCESS * CHKERR( MPI_Add_error_code(errorclass, &errorcode) ) # <<<<<<<<<<<<<< * return errorcode * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Add_error_code(__pyx_v_errorclass, (&__pyx_v_errorcode))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(19, 119, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":120 * cdef int errorcode = MPI_SUCCESS * CHKERR( MPI_Add_error_code(errorclass, &errorcode) ) * return errorcode # <<<<<<<<<<<<<< * * def Add_error_string(int errorcode, string): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_errorcode); if (unlikely(!__pyx_t_2)) __PYX_ERR(19, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Exception.pyx":114 * return errorclass * * def Add_error_code(int errorclass): # <<<<<<<<<<<<<< * """ * Add an *error code* to an *error class* */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Add_error_code", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Exception.pyx":122 * return errorcode * * def Add_error_string(int errorcode, string): # <<<<<<<<<<<<<< * """ * Associate an *error string* with an */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_13Add_error_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_12Add_error_string[] = "Add_error_string(int errorcode, string)\n\n Associate an *error string* with an\n *error class* or *errorcode*\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_13Add_error_string = {"Add_error_string", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_13Add_error_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_12Add_error_string}; static PyObject *__pyx_pw_6mpi4py_3MPI_13Add_error_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_errorcode; PyObject *__pyx_v_string = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Add_error_string (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errorcode,&__pyx_n_s_string,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errorcode)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_string)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Add_error_string", 1, 2, 2, 1); __PYX_ERR(19, 122, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Add_error_string") < 0)) __PYX_ERR(19, 122, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_errorcode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_errorcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(19, 122, __pyx_L3_error) __pyx_v_string = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Add_error_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(19, 122, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Add_error_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_12Add_error_string(__pyx_self, __pyx_v_errorcode, __pyx_v_string); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_12Add_error_string(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_errorcode, PyObject *__pyx_v_string) { char *__pyx_v_cstring; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Add_error_string", 0); __Pyx_INCREF(__pyx_v_string); /* "mpi4py/MPI/Exception.pyx":127 * *error class* or *errorcode* * """ * cdef char *cstring = NULL # <<<<<<<<<<<<<< * string = asmpistr(string, &cstring) * CHKERR( MPI_Add_error_string(errorcode, cstring) ) */ __pyx_v_cstring = NULL; /* "mpi4py/MPI/Exception.pyx":128 * """ * cdef char *cstring = NULL * string = asmpistr(string, &cstring) # <<<<<<<<<<<<<< * CHKERR( MPI_Add_error_string(errorcode, cstring) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_string, (&__pyx_v_cstring)); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_string, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":129 * cdef char *cstring = NULL * string = asmpistr(string, &cstring) * CHKERR( MPI_Add_error_string(errorcode, cstring) ) # <<<<<<<<<<<<<< */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Add_error_string(__pyx_v_errorcode, __pyx_v_cstring)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(19, 129, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":122 * return errorcode * * def Add_error_string(int errorcode, string): # <<<<<<<<<<<<<< * """ * Associate an *error string* with an */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Add_error_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_string); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Errhandler.pyx":7 * """ * * def __cinit__(self, Errhandler errhandler=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_ERRHANDLER_NULL * if errhandler is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_10Errhandler_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_10Errhandler_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIErrhandlerObject *__pyx_v_errhandler = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errhandler,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIErrhandlerObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errhandler); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(20, 7, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_errhandler = ((struct PyMPIErrhandlerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(20, 7, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Errhandler.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_errhandler), __pyx_ptype_6mpi4py_3MPI_Errhandler, 1, "errhandler", 0))) __PYX_ERR(20, 7, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_10Errhandler___cinit__(((struct PyMPIErrhandlerObject *)__pyx_v_self), __pyx_v_errhandler); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_10Errhandler___cinit__(struct PyMPIErrhandlerObject *__pyx_v_self, struct PyMPIErrhandlerObject *__pyx_v_errhandler) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Errhandler __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Errhandler.pyx":8 * * def __cinit__(self, Errhandler errhandler=None): * self.ob_mpi = MPI_ERRHANDLER_NULL # <<<<<<<<<<<<<< * if errhandler is None: return * self.ob_mpi = errhandler.ob_mpi */ __pyx_v_self->ob_mpi = MPI_ERRHANDLER_NULL; /* "mpi4py/MPI/Errhandler.pyx":9 * def __cinit__(self, Errhandler errhandler=None): * self.ob_mpi = MPI_ERRHANDLER_NULL * if errhandler is None: return # <<<<<<<<<<<<<< * self.ob_mpi = errhandler.ob_mpi * */ __pyx_t_1 = (((PyObject *)__pyx_v_errhandler) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Errhandler.pyx":10 * self.ob_mpi = MPI_ERRHANDLER_NULL * if errhandler is None: return * self.ob_mpi = errhandler.ob_mpi # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __pyx_v_errhandler->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Errhandler.pyx":7 * """ * * def __cinit__(self, Errhandler errhandler=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_ERRHANDLER_NULL * if errhandler is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Errhandler.pyx":12 * self.ob_mpi = errhandler.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Errhandler(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_10Errhandler_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_10Errhandler_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_10Errhandler_2__dealloc__(((struct PyMPIErrhandlerObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_10Errhandler_2__dealloc__(struct PyMPIErrhandlerObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/Errhandler.pyx":13 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_Errhandler(&self.ob_mpi) ) * */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/Errhandler.pyx":14 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Errhandler(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_Errhandler((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(20, 14, __pyx_L1_error) /* "mpi4py/MPI/Errhandler.pyx":12 * self.ob_mpi = errhandler.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Errhandler(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.Errhandler.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/Errhandler.pyx":16 * CHKERR( del_Errhandler(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Errhandler): return NotImplemented * cdef Errhandler s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_10Errhandler_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_10Errhandler_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_10Errhandler_4__richcmp__(((struct PyMPIErrhandlerObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_10Errhandler_4__richcmp__(struct PyMPIErrhandlerObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIErrhandlerObject *__pyx_v_s = 0; struct PyMPIErrhandlerObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Errhandler.pyx":17 * * def __richcmp__(self, other, int op): * if not isinstance(other, Errhandler): return NotImplemented # <<<<<<<<<<<<<< * cdef Errhandler s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Errhandler); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Errhandler.pyx":18 * def __richcmp__(self, other, int op): * if not isinstance(other, Errhandler): return NotImplemented * cdef Errhandler s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIErrhandlerObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIErrhandlerObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Errhandler.pyx":19 * if not isinstance(other, Errhandler): return NotImplemented * cdef Errhandler s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Errhandler.pyx":20 * cdef Errhandler s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Errhandler.pyx":21 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Errhandler.pyx":22 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Errhandler.pyx":23 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(20, 23, __pyx_L1_error) /* "mpi4py/MPI/Errhandler.pyx":16 * CHKERR( del_Errhandler(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Errhandler): return NotImplemented * cdef Errhandler s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Errhandler.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Errhandler.pyx":25 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_ERRHANDLER_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_10Errhandler_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_10Errhandler_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_10Errhandler_6__bool__(((struct PyMPIErrhandlerObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_10Errhandler_6__bool__(struct PyMPIErrhandlerObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/Errhandler.pyx":26 * * def __bool__(self): * return self.ob_mpi != MPI_ERRHANDLER_NULL # <<<<<<<<<<<<<< * * def Free(self): */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_ERRHANDLER_NULL); goto __pyx_L0; /* "mpi4py/MPI/Errhandler.pyx":25 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_ERRHANDLER_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Errhandler.pyx":28 * return self.ob_mpi != MPI_ERRHANDLER_NULL * * def Free(self): # <<<<<<<<<<<<<< * """ * Free an error handler */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_10Errhandler_9Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_10Errhandler_8Free[] = "Errhandler.Free(self)\n\n Free an error handler\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_10Errhandler_9Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Free", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Free", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_10Errhandler_8Free(((struct PyMPIErrhandlerObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_10Errhandler_8Free(struct PyMPIErrhandlerObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Free", 0); /* "mpi4py/MPI/Errhandler.pyx":32 * Free an error handler * """ * CHKERR( MPI_Errhandler_free(&self.ob_mpi) ) # <<<<<<<<<<<<<< * if self is __ERRORS_RETURN__: self.ob_mpi = MPI_ERRORS_RETURN * if self is __ERRORS_ARE_FATAL__: self.ob_mpi = MPI_ERRORS_ARE_FATAL */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Errhandler_free((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 32, __pyx_L1_error) /* "mpi4py/MPI/Errhandler.pyx":33 * """ * CHKERR( MPI_Errhandler_free(&self.ob_mpi) ) * if self is __ERRORS_RETURN__: self.ob_mpi = MPI_ERRORS_RETURN # <<<<<<<<<<<<<< * if self is __ERRORS_ARE_FATAL__: self.ob_mpi = MPI_ERRORS_ARE_FATAL * */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___ERRORS_RETURN__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_ERRORS_RETURN; } /* "mpi4py/MPI/Errhandler.pyx":34 * CHKERR( MPI_Errhandler_free(&self.ob_mpi) ) * if self is __ERRORS_RETURN__: self.ob_mpi = MPI_ERRORS_RETURN * if self is __ERRORS_ARE_FATAL__: self.ob_mpi = MPI_ERRORS_ARE_FATAL # <<<<<<<<<<<<<< * * # Fortran Handle */ __pyx_t_3 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___ERRORS_ARE_FATAL__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_self->ob_mpi = MPI_ERRORS_ARE_FATAL; } /* "mpi4py/MPI/Errhandler.pyx":28 * return self.ob_mpi != MPI_ERRHANDLER_NULL * * def Free(self): # <<<<<<<<<<<<<< * """ * Free an error handler */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Errhandler.Free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Errhandler.pyx":39 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_10Errhandler_11py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_10Errhandler_10py2f[] = "Errhandler.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_10Errhandler_11py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_10Errhandler_10py2f(((struct PyMPIErrhandlerObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_10Errhandler_10py2f(struct PyMPIErrhandlerObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Errhandler.pyx":42 * """ * """ * return MPI_Errhandler_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_Errhandler_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Errhandler.pyx":39 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Errhandler.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Errhandler.pyx":45 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_10Errhandler_13f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_10Errhandler_12f2py[] = "Errhandler.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_10Errhandler_13f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(20, 45, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(20, 45, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Errhandler.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_10Errhandler_12f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_10Errhandler_12f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIErrhandlerObject *__pyx_v_errhandler = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; MPI_Fint __pyx_t_3; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Errhandler.pyx":48 * """ * """ * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) # <<<<<<<<<<<<<< * errhandler.ob_mpi = MPI_Errhandler_f2c(arg) * return errhandler */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Errhandler(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Errhandler), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 48, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_errhandler = ((struct PyMPIErrhandlerObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Errhandler.pyx":49 * """ * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * errhandler.ob_mpi = MPI_Errhandler_f2c(arg) # <<<<<<<<<<<<<< * return errhandler * */ __pyx_t_3 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_3 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(20, 49, __pyx_L1_error) __pyx_v_errhandler->ob_mpi = MPI_Errhandler_f2c(__pyx_t_3); /* "mpi4py/MPI/Errhandler.pyx":50 * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * errhandler.ob_mpi = MPI_Errhandler_f2c(arg) * return errhandler # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_errhandler)); __pyx_r = ((PyObject *)__pyx_v_errhandler); goto __pyx_L0; /* "mpi4py/MPI/Errhandler.pyx":45 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Errhandler.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_errhandler); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":49 * """ * * def __cinit__(self, Datatype datatype=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_DATATYPE_NULL * if datatype is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_8Datatype_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_8Datatype_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datatype,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIDatatypeObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datatype); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(21, 49, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_datatype = ((struct PyMPIDatatypeObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 49, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_datatype), __pyx_ptype_6mpi4py_3MPI_Datatype, 1, "datatype", 0))) __PYX_ERR(21, 49, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype___cinit__(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_datatype); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_8Datatype___cinit__(struct PyMPIDatatypeObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Datatype __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Datatype.pyx":50 * * def __cinit__(self, Datatype datatype=None): * self.ob_mpi = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * if datatype is None: return * self.ob_mpi = datatype.ob_mpi */ __pyx_v_self->ob_mpi = MPI_DATATYPE_NULL; /* "mpi4py/MPI/Datatype.pyx":51 * def __cinit__(self, Datatype datatype=None): * self.ob_mpi = MPI_DATATYPE_NULL * if datatype is None: return # <<<<<<<<<<<<<< * self.ob_mpi = datatype.ob_mpi * */ __pyx_t_1 = (((PyObject *)__pyx_v_datatype) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":52 * self.ob_mpi = MPI_DATATYPE_NULL * if datatype is None: return * self.ob_mpi = datatype.ob_mpi # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __pyx_v_datatype->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Datatype.pyx":49 * """ * * def __cinit__(self, Datatype datatype=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_DATATYPE_NULL * if datatype is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":54 * self.ob_mpi = datatype.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Datatype(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_8Datatype_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_8Datatype_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_8Datatype_2__dealloc__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_8Datatype_2__dealloc__(struct PyMPIDatatypeObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/Datatype.pyx":55 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_Datatype(&self.ob_mpi) ) * */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":56 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Datatype(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_Datatype((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(21, 56, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":54 * self.ob_mpi = datatype.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Datatype(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.Datatype.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/Datatype.pyx":58 * CHKERR( del_Datatype(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Datatype): return NotImplemented * cdef Datatype s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_4__richcmp__(((struct PyMPIDatatypeObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_4__richcmp__(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIDatatypeObject *__pyx_v_s = 0; struct PyMPIDatatypeObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Datatype.pyx":59 * * def __richcmp__(self, other, int op): * if not isinstance(other, Datatype): return NotImplemented # <<<<<<<<<<<<<< * cdef Datatype s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Datatype); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":60 * def __richcmp__(self, other, int op): * if not isinstance(other, Datatype): return NotImplemented * cdef Datatype s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIDatatypeObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIDatatypeObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":61 * if not isinstance(other, Datatype): return NotImplemented * cdef Datatype s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":62 * cdef Datatype s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":63 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":64 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":65 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(21, 65, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":58 * CHKERR( del_Datatype(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Datatype): return NotImplemented * cdef Datatype s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Datatype.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":67 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_DATATYPE_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_8Datatype_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_8Datatype_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_6__bool__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_8Datatype_6__bool__(struct PyMPIDatatypeObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/Datatype.pyx":68 * * def __bool__(self): * return self.ob_mpi != MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * * # Datatype Accessors */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_DATATYPE_NULL); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":67 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_DATATYPE_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":73 * # ------------------ * * def Get_size(self): # <<<<<<<<<<<<<< * """ * Return the number of bytes occupied */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_9Get_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_8Get_size[] = "Datatype.Get_size(self)\n\n Return the number of bytes occupied\n by entries in the datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_9Get_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_size (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_size", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_size", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_8Get_size(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8Get_size(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_size", 0); /* "mpi4py/MPI/Datatype.pyx":78 * by entries in the datatype * """ * cdef MPI_Count size = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) * return size */ __pyx_v_size = 0; /* "mpi4py/MPI/Datatype.pyx":79 * """ * cdef MPI_Count size = 0 * CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) # <<<<<<<<<<<<<< * return size * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_size_x(__pyx_v_self->ob_mpi, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 79, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":80 * cdef MPI_Count size = 0 * CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) * return size # <<<<<<<<<<<<<< * * property size: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":73 * # ------------------ * * def Get_size(self): # <<<<<<<<<<<<<< * """ * Return the number of bytes occupied */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Get_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":84 * property size: * """size (in bytes)""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count size = 0 * CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_4size_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_4size___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_4size___get__(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":85 * """size (in bytes)""" * def __get__(self): * cdef MPI_Count size = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) * return size */ __pyx_v_size = 0; /* "mpi4py/MPI/Datatype.pyx":86 * def __get__(self): * cdef MPI_Count size = 0 * CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) # <<<<<<<<<<<<<< * return size * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_size_x(__pyx_v_self->ob_mpi, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 86, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":87 * cdef MPI_Count size = 0 * CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) * return size # <<<<<<<<<<<<<< * * def Get_extent(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":84 * property size: * """size (in bytes)""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count size = 0 * CHKERR( MPI_Type_size_x(self.ob_mpi, &size) ) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":89 * return size * * def Get_extent(self): # <<<<<<<<<<<<<< * """ * Return lower bound and extent of datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_11Get_extent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_10Get_extent[] = "Datatype.Get_extent(self)\n\n Return lower bound and extent of datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_11Get_extent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_extent (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_extent", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_extent", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_10Get_extent(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_10Get_extent(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_lb; MPI_Count __pyx_v_extent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Get_extent", 0); /* "mpi4py/MPI/Datatype.pyx":93 * Return lower bound and extent of datatype * """ * cdef MPI_Count lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) * return (lb, extent) */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":94 * """ * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) # <<<<<<<<<<<<<< * return (lb, extent) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent_x(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 94, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":95 * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) * return (lb, extent) # <<<<<<<<<<<<<< * * property extent: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count(__pyx_v_lb); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_MPI_Count(__pyx_v_extent); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":89 * return size * * def Get_extent(self): # <<<<<<<<<<<<<< * """ * Return lower bound and extent of datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Get_extent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":99 * property extent: * """extent""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_6extent_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_6extent_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_6extent___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_6extent___get__(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_lb; MPI_Count __pyx_v_extent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":100 * """extent""" * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) * return extent */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":101 * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) # <<<<<<<<<<<<<< * return extent * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent_x(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 101, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":102 * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) * return extent # <<<<<<<<<<<<<< * * property lb: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count(__pyx_v_extent); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":99 * property extent: * """extent""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.extent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":106 * property lb: * """lower bound""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_2lb_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_2lb_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_2lb___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_2lb___get__(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_lb; MPI_Count __pyx_v_extent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":107 * """lower bound""" * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) * return lb */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":108 * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) # <<<<<<<<<<<<<< * return lb * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent_x(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 108, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":109 * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) * return lb # <<<<<<<<<<<<<< * * property ub: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count(__pyx_v_lb); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":106 * property lb: * """lower bound""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.lb.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":113 * property ub: * """upper bound""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_2ub_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_2ub_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_2ub___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_2ub___get__(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_lb; MPI_Count __pyx_v_extent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":114 * """upper bound""" * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) * return lb + extent */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":115 * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) # <<<<<<<<<<<<<< * return lb + extent * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent_x(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 115, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":116 * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) * return lb + extent # <<<<<<<<<<<<<< * * # Datatype Constructors */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count((__pyx_v_lb + __pyx_v_extent)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":113 * property ub: * """upper bound""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent_x(self.ob_mpi, &lb, &extent) ) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.ub.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":121 * # --------------------- * * def Dup(self): # <<<<<<<<<<<<<< * """ * Duplicate a datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_13Dup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_12Dup[] = "Datatype.Dup(self)\n\n Duplicate a datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_13Dup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Dup (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Dup", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Dup", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_12Dup(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_12Dup(struct PyMPIDatatypeObject *__pyx_v_self) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Dup", 0); /* "mpi4py/MPI/Datatype.pyx":125 * Duplicate a datatype * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_dup(self.ob_mpi, &datatype.ob_mpi) ) * return datatype */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 125, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":126 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_dup(self.ob_mpi, &datatype.ob_mpi) ) # <<<<<<<<<<<<<< * return datatype * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_dup(__pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 126, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":127 * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_dup(self.ob_mpi, &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * Create_dup = Dup #: convenience alias */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":121 * # --------------------- * * def Dup(self): # <<<<<<<<<<<<<< * """ * Duplicate a datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Dup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":131 * Create_dup = Dup #: convenience alias * * def Create_contiguous(self, int count): # <<<<<<<<<<<<<< * """ * Create a contiguous datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_15Create_contiguous(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_14Create_contiguous[] = "Datatype.Create_contiguous(self, int count)\n\n Create a contiguous datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_15Create_contiguous(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_count; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_contiguous (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_count,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_contiguous") < 0)) __PYX_ERR(21, 131, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_count = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 131, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_contiguous", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 131, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_contiguous", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_14Create_contiguous(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_count); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_14Create_contiguous(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_count) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_contiguous", 0); /* "mpi4py/MPI/Datatype.pyx":135 * Create a contiguous datatype * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_contiguous(count, self.ob_mpi, * &datatype.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 135, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":136 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_contiguous(count, self.ob_mpi, # <<<<<<<<<<<<<< * &datatype.ob_mpi) ) * return datatype */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_contiguous(__pyx_v_count, __pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 136, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":138 * CHKERR( MPI_Type_contiguous(count, self.ob_mpi, * &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * def Create_vector(self, int count, int blocklength, int stride): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":131 * Create_dup = Dup #: convenience alias * * def Create_contiguous(self, int count): # <<<<<<<<<<<<<< * """ * Create a contiguous datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_contiguous", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":140 * return datatype * * def Create_vector(self, int count, int blocklength, int stride): # <<<<<<<<<<<<<< * """ * Create a vector (strided) datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_17Create_vector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_16Create_vector[] = "Datatype.Create_vector(self, int count, int blocklength, int stride)\n\n Create a vector (strided) datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_17Create_vector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_count; int __pyx_v_blocklength; int __pyx_v_stride; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_vector (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_count,&__pyx_n_s_blocklength,&__pyx_n_s_stride,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blocklength)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_vector", 1, 3, 3, 1); __PYX_ERR(21, 140, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_vector", 1, 3, 3, 2); __PYX_ERR(21, 140, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_vector") < 0)) __PYX_ERR(21, 140, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_count = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 140, __pyx_L3_error) __pyx_v_blocklength = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_blocklength == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 140, __pyx_L3_error) __pyx_v_stride = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_stride == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 140, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_vector", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 140, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_vector", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_16Create_vector(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_count, __pyx_v_blocklength, __pyx_v_stride); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_16Create_vector(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_count, int __pyx_v_blocklength, int __pyx_v_stride) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_vector", 0); /* "mpi4py/MPI/Datatype.pyx":144 * Create a vector (strided) datatype * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_vector(count, blocklength, stride, * self.ob_mpi, &datatype.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 144, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":145 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_vector(count, blocklength, stride, # <<<<<<<<<<<<<< * self.ob_mpi, &datatype.ob_mpi) ) * return datatype */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_vector(__pyx_v_count, __pyx_v_blocklength, __pyx_v_stride, __pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 145, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":147 * CHKERR( MPI_Type_vector(count, blocklength, stride, * self.ob_mpi, &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * def Create_hvector(self, int count, int blocklength, Aint stride): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":140 * return datatype * * def Create_vector(self, int count, int blocklength, int stride): # <<<<<<<<<<<<<< * """ * Create a vector (strided) datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_vector", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":149 * return datatype * * def Create_hvector(self, int count, int blocklength, Aint stride): # <<<<<<<<<<<<<< * """ * Create a vector (strided) datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_19Create_hvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_18Create_hvector[] = "Datatype.Create_hvector(self, int count, int blocklength, Aint stride)\n\n Create a vector (strided) datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_19Create_hvector(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_count; int __pyx_v_blocklength; MPI_Aint __pyx_v_stride; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_hvector (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_count,&__pyx_n_s_blocklength,&__pyx_n_s_stride,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blocklength)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_hvector", 1, 3, 3, 1); __PYX_ERR(21, 149, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stride)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_hvector", 1, 3, 3, 2); __PYX_ERR(21, 149, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_hvector") < 0)) __PYX_ERR(21, 149, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_count = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 149, __pyx_L3_error) __pyx_v_blocklength = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_blocklength == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 149, __pyx_L3_error) __pyx_v_stride = __Pyx_PyInt_As_MPI_Aint(values[2]); if (unlikely((__pyx_v_stride == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 149, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_hvector", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 149, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_hvector", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_18Create_hvector(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_count, __pyx_v_blocklength, __pyx_v_stride); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_18Create_hvector(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_count, int __pyx_v_blocklength, MPI_Aint __pyx_v_stride) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_hvector", 0); /* "mpi4py/MPI/Datatype.pyx":153 * Create a vector (strided) datatype * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_hvector(count, blocklength, stride, * self.ob_mpi, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 153, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":154 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_hvector(count, blocklength, stride, # <<<<<<<<<<<<<< * self.ob_mpi, * &datatype.ob_mpi) ) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_hvector(__pyx_v_count, __pyx_v_blocklength, __pyx_v_stride, __pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 154, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":157 * self.ob_mpi, * &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * def Create_indexed(self, blocklengths, displacements): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":149 * return datatype * * def Create_hvector(self, int count, int blocklength, Aint stride): # <<<<<<<<<<<<<< * """ * Create a vector (strided) datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_hvector", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":159 * return datatype * * def Create_indexed(self, blocklengths, displacements): # <<<<<<<<<<<<<< * """ * Create an indexed datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_21Create_indexed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_20Create_indexed[] = "Datatype.Create_indexed(self, blocklengths, displacements)\n\n Create an indexed datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_21Create_indexed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_blocklengths = 0; PyObject *__pyx_v_displacements = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_indexed (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_blocklengths,&__pyx_n_s_displacements,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blocklengths)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_displacements)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_indexed", 1, 2, 2, 1); __PYX_ERR(21, 159, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_indexed") < 0)) __PYX_ERR(21, 159, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_blocklengths = values[0]; __pyx_v_displacements = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_indexed", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 159, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_20Create_indexed(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_blocklengths, __pyx_v_displacements); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_20Create_indexed(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_blocklengths, PyObject *__pyx_v_displacements) { int __pyx_v_count; int *__pyx_v_iblen; int *__pyx_v_idisp; struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_indexed", 0); __Pyx_INCREF(__pyx_v_blocklengths); __Pyx_INCREF(__pyx_v_displacements); /* "mpi4py/MPI/Datatype.pyx":163 * Create an indexed datatype * """ * cdef int count = 0, *iblen = NULL, *idisp = NULL # <<<<<<<<<<<<<< * blocklengths = getarray(blocklengths, &count, &iblen) * displacements = chkarray(displacements, count, &idisp) */ __pyx_v_count = 0; __pyx_v_iblen = NULL; __pyx_v_idisp = NULL; /* "mpi4py/MPI/Datatype.pyx":164 * """ * cdef int count = 0, *iblen = NULL, *idisp = NULL * blocklengths = getarray(blocklengths, &count, &iblen) # <<<<<<<<<<<<<< * displacements = chkarray(displacements, count, &idisp) * # */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_blocklengths, (&__pyx_v_count), (&__pyx_v_iblen)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_blocklengths, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":165 * cdef int count = 0, *iblen = NULL, *idisp = NULL * blocklengths = getarray(blocklengths, &count, &iblen) * displacements = chkarray(displacements, count, &idisp) # <<<<<<<<<<<<<< * # * cdef Datatype datatype = Datatype.__new__(Datatype) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_displacements, __pyx_v_count, (&__pyx_v_idisp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_displacements, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":167 * displacements = chkarray(displacements, count, &idisp) * # * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_indexed(count, iblen, idisp, * self.ob_mpi, &datatype.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 167, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":168 * # * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_indexed(count, iblen, idisp, # <<<<<<<<<<<<<< * self.ob_mpi, &datatype.ob_mpi) ) * return datatype */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_indexed(__pyx_v_count, __pyx_v_iblen, __pyx_v_idisp, __pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 168, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":170 * CHKERR( MPI_Type_indexed(count, iblen, idisp, * self.ob_mpi, &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * def Create_hindexed(self, blocklengths, displacements): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":159 * return datatype * * def Create_indexed(self, blocklengths, displacements): # <<<<<<<<<<<<<< * """ * Create an indexed datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XDECREF(__pyx_v_blocklengths); __Pyx_XDECREF(__pyx_v_displacements); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":172 * return datatype * * def Create_hindexed(self, blocklengths, displacements): # <<<<<<<<<<<<<< * """ * Create an indexed datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_23Create_hindexed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_22Create_hindexed[] = "Datatype.Create_hindexed(self, blocklengths, displacements)\n\n Create an indexed datatype\n with displacements in bytes\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_23Create_hindexed(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_blocklengths = 0; PyObject *__pyx_v_displacements = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_hindexed (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_blocklengths,&__pyx_n_s_displacements,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blocklengths)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_displacements)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_hindexed", 1, 2, 2, 1); __PYX_ERR(21, 172, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_hindexed") < 0)) __PYX_ERR(21, 172, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_blocklengths = values[0]; __pyx_v_displacements = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_hindexed", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 172, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_hindexed", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_22Create_hindexed(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_blocklengths, __pyx_v_displacements); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_22Create_hindexed(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_blocklengths, PyObject *__pyx_v_displacements) { int __pyx_v_count; int *__pyx_v_iblen; MPI_Aint *__pyx_v_idisp; struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_hindexed", 0); __Pyx_INCREF(__pyx_v_blocklengths); __Pyx_INCREF(__pyx_v_displacements); /* "mpi4py/MPI/Datatype.pyx":177 * with displacements in bytes * """ * cdef int count = 0, *iblen = NULL # <<<<<<<<<<<<<< * blocklengths = getarray(blocklengths, &count, &iblen) * cdef MPI_Aint *idisp = NULL */ __pyx_v_count = 0; __pyx_v_iblen = NULL; /* "mpi4py/MPI/Datatype.pyx":178 * """ * cdef int count = 0, *iblen = NULL * blocklengths = getarray(blocklengths, &count, &iblen) # <<<<<<<<<<<<<< * cdef MPI_Aint *idisp = NULL * displacements = chkarray(displacements, count, &idisp) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_blocklengths, (&__pyx_v_count), (&__pyx_v_iblen)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_blocklengths, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":179 * cdef int count = 0, *iblen = NULL * blocklengths = getarray(blocklengths, &count, &iblen) * cdef MPI_Aint *idisp = NULL # <<<<<<<<<<<<<< * displacements = chkarray(displacements, count, &idisp) * # */ __pyx_v_idisp = NULL; /* "mpi4py/MPI/Datatype.pyx":180 * blocklengths = getarray(blocklengths, &count, &iblen) * cdef MPI_Aint *idisp = NULL * displacements = chkarray(displacements, count, &idisp) # <<<<<<<<<<<<<< * # * cdef Datatype datatype = Datatype.__new__(Datatype) */ __pyx_t_1 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_displacements, __pyx_v_count, (&__pyx_v_idisp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_displacements, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":182 * displacements = chkarray(displacements, count, &idisp) * # * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_hindexed(count, iblen, idisp, * self.ob_mpi, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 182, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":183 * # * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_hindexed(count, iblen, idisp, # <<<<<<<<<<<<<< * self.ob_mpi, * &datatype.ob_mpi) ) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_hindexed(__pyx_v_count, __pyx_v_iblen, __pyx_v_idisp, __pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 183, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":186 * self.ob_mpi, * &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * def Create_indexed_block(self, int blocklength, displacements): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":172 * return datatype * * def Create_hindexed(self, blocklengths, displacements): # <<<<<<<<<<<<<< * """ * Create an indexed datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_hindexed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XDECREF(__pyx_v_blocklengths); __Pyx_XDECREF(__pyx_v_displacements); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":188 * return datatype * * def Create_indexed_block(self, int blocklength, displacements): # <<<<<<<<<<<<<< * """ * Create an indexed datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_25Create_indexed_block(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_24Create_indexed_block[] = "Datatype.Create_indexed_block(self, int blocklength, displacements)\n\n Create an indexed datatype\n with constant-sized blocks\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_25Create_indexed_block(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_blocklength; PyObject *__pyx_v_displacements = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_indexed_block (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_blocklength,&__pyx_n_s_displacements,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blocklength)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_displacements)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_indexed_block", 1, 2, 2, 1); __PYX_ERR(21, 188, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_indexed_block") < 0)) __PYX_ERR(21, 188, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_blocklength = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_blocklength == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 188, __pyx_L3_error) __pyx_v_displacements = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_indexed_block", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 188, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_indexed_block", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_24Create_indexed_block(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_blocklength, __pyx_v_displacements); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_24Create_indexed_block(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_blocklength, PyObject *__pyx_v_displacements) { int __pyx_v_count; int *__pyx_v_idisp; struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_indexed_block", 0); __Pyx_INCREF(__pyx_v_displacements); /* "mpi4py/MPI/Datatype.pyx":193 * with constant-sized blocks * """ * cdef int count = 0, *idisp = NULL # <<<<<<<<<<<<<< * displacements = getarray(displacements, &count, &idisp) * # */ __pyx_v_count = 0; __pyx_v_idisp = NULL; /* "mpi4py/MPI/Datatype.pyx":194 * """ * cdef int count = 0, *idisp = NULL * displacements = getarray(displacements, &count, &idisp) # <<<<<<<<<<<<<< * # * cdef Datatype datatype = Datatype.__new__(Datatype) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_displacements, (&__pyx_v_count), (&__pyx_v_idisp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_displacements, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":196 * displacements = getarray(displacements, &count, &idisp) * # * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_indexed_block(count, blocklength, * idisp, self.ob_mpi, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 196, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":197 * # * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_indexed_block(count, blocklength, # <<<<<<<<<<<<<< * idisp, self.ob_mpi, * &datatype.ob_mpi) ) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_indexed_block(__pyx_v_count, __pyx_v_blocklength, __pyx_v_idisp, __pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 197, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":200 * idisp, self.ob_mpi, * &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * def Create_hindexed_block(self, int blocklength, displacements): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":188 * return datatype * * def Create_indexed_block(self, int blocklength, displacements): # <<<<<<<<<<<<<< * """ * Create an indexed datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_indexed_block", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XDECREF(__pyx_v_displacements); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":202 * return datatype * * def Create_hindexed_block(self, int blocklength, displacements): # <<<<<<<<<<<<<< * """ * Create an indexed datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_27Create_hindexed_block(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_26Create_hindexed_block[] = "Datatype.Create_hindexed_block(self, int blocklength, displacements)\n\n Create an indexed datatype\n with constant-sized blocks\n and displacements in bytes\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_27Create_hindexed_block(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_blocklength; PyObject *__pyx_v_displacements = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_hindexed_block (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_blocklength,&__pyx_n_s_displacements,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blocklength)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_displacements)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_hindexed_block", 1, 2, 2, 1); __PYX_ERR(21, 202, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_hindexed_block") < 0)) __PYX_ERR(21, 202, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_blocklength = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_blocklength == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 202, __pyx_L3_error) __pyx_v_displacements = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_hindexed_block", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 202, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_hindexed_block", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_26Create_hindexed_block(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_blocklength, __pyx_v_displacements); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_26Create_hindexed_block(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_blocklength, PyObject *__pyx_v_displacements) { int __pyx_v_count; MPI_Aint *__pyx_v_idisp; struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_hindexed_block", 0); __Pyx_INCREF(__pyx_v_displacements); /* "mpi4py/MPI/Datatype.pyx":208 * and displacements in bytes * """ * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Aint *idisp = NULL * displacements = getarray(displacements, &count, &idisp) */ __pyx_v_count = 0; /* "mpi4py/MPI/Datatype.pyx":209 * """ * cdef int count = 0 * cdef MPI_Aint *idisp = NULL # <<<<<<<<<<<<<< * displacements = getarray(displacements, &count, &idisp) * # */ __pyx_v_idisp = NULL; /* "mpi4py/MPI/Datatype.pyx":210 * cdef int count = 0 * cdef MPI_Aint *idisp = NULL * displacements = getarray(displacements, &count, &idisp) # <<<<<<<<<<<<<< * # * cdef Datatype datatype = Datatype.__new__(Datatype) */ __pyx_t_1 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_displacements, (&__pyx_v_count), (&__pyx_v_idisp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_displacements, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":212 * displacements = getarray(displacements, &count, &idisp) * # * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_hindexed_block(count, blocklength, * idisp, self.ob_mpi, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 212, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":213 * # * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_hindexed_block(count, blocklength, # <<<<<<<<<<<<<< * idisp, self.ob_mpi, * &datatype.ob_mpi) ) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_hindexed_block(__pyx_v_count, __pyx_v_blocklength, __pyx_v_idisp, __pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 213, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":216 * idisp, self.ob_mpi, * &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":202 * return datatype * * def Create_hindexed_block(self, int blocklength, displacements): # <<<<<<<<<<<<<< * """ * Create an indexed datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_hindexed_block", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XDECREF(__pyx_v_displacements); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":219 * * @classmethod * def Create_struct(cls, blocklengths, displacements, datatypes): # <<<<<<<<<<<<<< * """ * Create an datatype from a general set of */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_29Create_struct(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_28Create_struct[] = "Datatype.Create_struct(type cls, blocklengths, displacements, datatypes)\n\n Create an datatype from a general set of\n block sizes, displacements and datatypes\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_29Create_struct(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_blocklengths = 0; PyObject *__pyx_v_displacements = 0; PyObject *__pyx_v_datatypes = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_struct (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_blocklengths,&__pyx_n_s_displacements,&__pyx_n_s_datatypes,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_blocklengths)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_displacements)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_struct", 1, 3, 3, 1); __PYX_ERR(21, 219, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datatypes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_struct", 1, 3, 3, 2); __PYX_ERR(21, 219, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_struct") < 0)) __PYX_ERR(21, 219, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_blocklengths = values[0]; __pyx_v_displacements = values[1]; __pyx_v_datatypes = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_struct", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 219, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_struct", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_28Create_struct(((PyTypeObject*)__pyx_v_cls), __pyx_v_blocklengths, __pyx_v_displacements, __pyx_v_datatypes); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_28Create_struct(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_blocklengths, PyObject *__pyx_v_displacements, PyObject *__pyx_v_datatypes) { int __pyx_v_count; int *__pyx_v_iblen; MPI_Aint *__pyx_v_idisp; MPI_Datatype *__pyx_v_ptype; struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_struct", 0); __Pyx_INCREF(__pyx_v_blocklengths); __Pyx_INCREF(__pyx_v_displacements); __Pyx_INCREF(__pyx_v_datatypes); /* "mpi4py/MPI/Datatype.pyx":224 * block sizes, displacements and datatypes * """ * cdef int count = 0, *iblen = NULL # <<<<<<<<<<<<<< * blocklengths = getarray(blocklengths, &count, &iblen) * cdef MPI_Aint *idisp = NULL */ __pyx_v_count = 0; __pyx_v_iblen = NULL; /* "mpi4py/MPI/Datatype.pyx":225 * """ * cdef int count = 0, *iblen = NULL * blocklengths = getarray(blocklengths, &count, &iblen) # <<<<<<<<<<<<<< * cdef MPI_Aint *idisp = NULL * displacements = chkarray(displacements, count, &idisp) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_blocklengths, (&__pyx_v_count), (&__pyx_v_iblen)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_blocklengths, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":226 * cdef int count = 0, *iblen = NULL * blocklengths = getarray(blocklengths, &count, &iblen) * cdef MPI_Aint *idisp = NULL # <<<<<<<<<<<<<< * displacements = chkarray(displacements, count, &idisp) * cdef MPI_Datatype *ptype = NULL */ __pyx_v_idisp = NULL; /* "mpi4py/MPI/Datatype.pyx":227 * blocklengths = getarray(blocklengths, &count, &iblen) * cdef MPI_Aint *idisp = NULL * displacements = chkarray(displacements, count, &idisp) # <<<<<<<<<<<<<< * cdef MPI_Datatype *ptype = NULL * datatypes = asarray_Datatype(datatypes, count, &ptype) */ __pyx_t_1 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_displacements, __pyx_v_count, (&__pyx_v_idisp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_displacements, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":228 * cdef MPI_Aint *idisp = NULL * displacements = chkarray(displacements, count, &idisp) * cdef MPI_Datatype *ptype = NULL # <<<<<<<<<<<<<< * datatypes = asarray_Datatype(datatypes, count, &ptype) * # */ __pyx_v_ptype = NULL; /* "mpi4py/MPI/Datatype.pyx":229 * displacements = chkarray(displacements, count, &idisp) * cdef MPI_Datatype *ptype = NULL * datatypes = asarray_Datatype(datatypes, count, &ptype) # <<<<<<<<<<<<<< * # * cdef Datatype datatype = Datatype.__new__(Datatype) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asarray_Datatype(__pyx_v_datatypes, __pyx_v_count, (&__pyx_v_ptype)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_datatypes, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":231 * datatypes = asarray_Datatype(datatypes, count, &ptype) * # * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_struct(count, iblen, idisp, ptype, * &datatype.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 231, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":232 * # * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_struct(count, iblen, idisp, ptype, # <<<<<<<<<<<<<< * &datatype.ob_mpi) ) * return datatype */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_struct(__pyx_v_count, __pyx_v_iblen, __pyx_v_idisp, __pyx_v_ptype, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 232, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":234 * CHKERR( MPI_Type_create_struct(count, iblen, idisp, ptype, * &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * # Subarray Datatype Constructor */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":219 * * @classmethod * def Create_struct(cls, blocklengths, displacements, datatypes): # <<<<<<<<<<<<<< * """ * Create an datatype from a general set of */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_struct", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XDECREF(__pyx_v_blocklengths); __Pyx_XDECREF(__pyx_v_displacements); __Pyx_XDECREF(__pyx_v_datatypes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":239 * # ----------------------------- * * def Create_subarray(self, sizes, subsizes, starts, # <<<<<<<<<<<<<< * int order=ORDER_C): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_31Create_subarray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_30Create_subarray[] = "Datatype.Create_subarray(self, sizes, subsizes, starts, int order=ORDER_C)\n\n Create a datatype for a subarray of\n a regular, multidimensional array\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_31Create_subarray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sizes = 0; PyObject *__pyx_v_subsizes = 0; PyObject *__pyx_v_starts = 0; int __pyx_v_order; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_subarray (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sizes,&__pyx_n_s_subsizes,&__pyx_n_s_starts,&__pyx_n_s_order,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sizes)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_subsizes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_subarray", 0, 3, 4, 1); __PYX_ERR(21, 239, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_starts)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_subarray", 0, 3, 4, 2); __PYX_ERR(21, 239, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_order); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_subarray") < 0)) __PYX_ERR(21, 239, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sizes = values[0]; __pyx_v_subsizes = values[1]; __pyx_v_starts = values[2]; if (values[3]) { __pyx_v_order = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_order == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 240, __pyx_L3_error) } else { __pyx_v_order = __pyx_k__26; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_subarray", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 239, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_subarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_30Create_subarray(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_sizes, __pyx_v_subsizes, __pyx_v_starts, __pyx_v_order); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_30Create_subarray(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_sizes, PyObject *__pyx_v_subsizes, PyObject *__pyx_v_starts, int __pyx_v_order) { int __pyx_v_ndims; int *__pyx_v_isizes; int *__pyx_v_isubsizes; int *__pyx_v_istarts; struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_subarray", 0); __Pyx_INCREF(__pyx_v_sizes); __Pyx_INCREF(__pyx_v_subsizes); __Pyx_INCREF(__pyx_v_starts); /* "mpi4py/MPI/Datatype.pyx":245 * a regular, multidimensional array * """ * cdef int ndims = 0, *isizes = NULL # <<<<<<<<<<<<<< * cdef int *isubsizes = NULL, *istarts = NULL * sizes = getarray(sizes, &ndims, &isizes ) */ __pyx_v_ndims = 0; __pyx_v_isizes = NULL; /* "mpi4py/MPI/Datatype.pyx":246 * """ * cdef int ndims = 0, *isizes = NULL * cdef int *isubsizes = NULL, *istarts = NULL # <<<<<<<<<<<<<< * sizes = getarray(sizes, &ndims, &isizes ) * subsizes = chkarray(subsizes, ndims, &isubsizes) */ __pyx_v_isubsizes = NULL; __pyx_v_istarts = NULL; /* "mpi4py/MPI/Datatype.pyx":247 * cdef int ndims = 0, *isizes = NULL * cdef int *isubsizes = NULL, *istarts = NULL * sizes = getarray(sizes, &ndims, &isizes ) # <<<<<<<<<<<<<< * subsizes = chkarray(subsizes, ndims, &isubsizes) * starts = chkarray(starts, ndims, &istarts ) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_sizes, (&__pyx_v_ndims), (&__pyx_v_isizes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_sizes, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":248 * cdef int *isubsizes = NULL, *istarts = NULL * sizes = getarray(sizes, &ndims, &isizes ) * subsizes = chkarray(subsizes, ndims, &isubsizes) # <<<<<<<<<<<<<< * starts = chkarray(starts, ndims, &istarts ) * # */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_subsizes, __pyx_v_ndims, (&__pyx_v_isubsizes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_subsizes, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":249 * sizes = getarray(sizes, &ndims, &isizes ) * subsizes = chkarray(subsizes, ndims, &isubsizes) * starts = chkarray(starts, ndims, &istarts ) # <<<<<<<<<<<<<< * # * cdef Datatype datatype = Datatype.__new__(Datatype) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_starts, __pyx_v_ndims, (&__pyx_v_istarts)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_starts, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":251 * starts = chkarray(starts, ndims, &istarts ) * # * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_subarray(ndims, isizes, * isubsizes, istarts, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 251, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":252 * # * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_subarray(ndims, isizes, # <<<<<<<<<<<<<< * isubsizes, istarts, * order, self.ob_mpi, */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_subarray(__pyx_v_ndims, __pyx_v_isizes, __pyx_v_isubsizes, __pyx_v_istarts, __pyx_v_order, __pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 252, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":256 * order, self.ob_mpi, * &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * # Distributed Array Datatype Constructor */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":239 * # ----------------------------- * * def Create_subarray(self, sizes, subsizes, starts, # <<<<<<<<<<<<<< * int order=ORDER_C): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_subarray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XDECREF(__pyx_v_sizes); __Pyx_XDECREF(__pyx_v_subsizes); __Pyx_XDECREF(__pyx_v_starts); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":261 * # -------------------------------------- * * def Create_darray(self, int size, int rank, # <<<<<<<<<<<<<< * gsizes, distribs, dargs, psizes, * int order=ORDER_C): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_33Create_darray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_32Create_darray[] = "Datatype.Create_darray(self, int size, int rank, gsizes, distribs, dargs, psizes, int order=ORDER_C)\n\n Create a datatype representing an HPF-like\n distributed array on Cartesian process grids\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_33Create_darray(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_size; int __pyx_v_rank; PyObject *__pyx_v_gsizes = 0; PyObject *__pyx_v_distribs = 0; PyObject *__pyx_v_dargs = 0; PyObject *__pyx_v_psizes = 0; int __pyx_v_order; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_darray (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_rank,&__pyx_n_s_gsizes,&__pyx_n_s_distribs,&__pyx_n_s_dargs,&__pyx_n_s_psizes,&__pyx_n_s_order,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_darray", 0, 6, 7, 1); __PYX_ERR(21, 261, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gsizes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_darray", 0, 6, 7, 2); __PYX_ERR(21, 261, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_distribs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_darray", 0, 6, 7, 3); __PYX_ERR(21, 261, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dargs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_darray", 0, 6, 7, 4); __PYX_ERR(21, 261, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_psizes)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_darray", 0, 6, 7, 5); __PYX_ERR(21, 261, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_order); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_darray") < 0)) __PYX_ERR(21, 261, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 261, __pyx_L3_error) __pyx_v_rank = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 261, __pyx_L3_error) __pyx_v_gsizes = values[2]; __pyx_v_distribs = values[3]; __pyx_v_dargs = values[4]; __pyx_v_psizes = values[5]; if (values[6]) { __pyx_v_order = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_order == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 263, __pyx_L3_error) } else { __pyx_v_order = __pyx_k__27; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_darray", 0, 6, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 261, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_darray", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_32Create_darray(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_size, __pyx_v_rank, __pyx_v_gsizes, __pyx_v_distribs, __pyx_v_dargs, __pyx_v_psizes, __pyx_v_order); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_32Create_darray(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_size, int __pyx_v_rank, PyObject *__pyx_v_gsizes, PyObject *__pyx_v_distribs, PyObject *__pyx_v_dargs, PyObject *__pyx_v_psizes, int __pyx_v_order) { int __pyx_v_ndims; int *__pyx_v_igsizes; int *__pyx_v_idistribs; int *__pyx_v_idargs; int *__pyx_v_ipsizes; struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_darray", 0); __Pyx_INCREF(__pyx_v_gsizes); __Pyx_INCREF(__pyx_v_distribs); __Pyx_INCREF(__pyx_v_dargs); __Pyx_INCREF(__pyx_v_psizes); /* "mpi4py/MPI/Datatype.pyx":268 * distributed array on Cartesian process grids * """ * cdef int ndims = 0, *igsizes = NULL # <<<<<<<<<<<<<< * cdef int *idistribs = NULL, *idargs = NULL, *ipsizes = NULL * gsizes = getarray(gsizes, &ndims, &igsizes ) */ __pyx_v_ndims = 0; __pyx_v_igsizes = NULL; /* "mpi4py/MPI/Datatype.pyx":269 * """ * cdef int ndims = 0, *igsizes = NULL * cdef int *idistribs = NULL, *idargs = NULL, *ipsizes = NULL # <<<<<<<<<<<<<< * gsizes = getarray(gsizes, &ndims, &igsizes ) * distribs = chkarray(distribs, ndims, &idistribs ) */ __pyx_v_idistribs = NULL; __pyx_v_idargs = NULL; __pyx_v_ipsizes = NULL; /* "mpi4py/MPI/Datatype.pyx":270 * cdef int ndims = 0, *igsizes = NULL * cdef int *idistribs = NULL, *idargs = NULL, *ipsizes = NULL * gsizes = getarray(gsizes, &ndims, &igsizes ) # <<<<<<<<<<<<<< * distribs = chkarray(distribs, ndims, &idistribs ) * dargs = chkarray(dargs, ndims, &idargs ) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_gsizes, (&__pyx_v_ndims), (&__pyx_v_igsizes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_gsizes, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":271 * cdef int *idistribs = NULL, *idargs = NULL, *ipsizes = NULL * gsizes = getarray(gsizes, &ndims, &igsizes ) * distribs = chkarray(distribs, ndims, &idistribs ) # <<<<<<<<<<<<<< * dargs = chkarray(dargs, ndims, &idargs ) * psizes = chkarray(psizes, ndims, &ipsizes ) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_distribs, __pyx_v_ndims, (&__pyx_v_idistribs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_distribs, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":272 * gsizes = getarray(gsizes, &ndims, &igsizes ) * distribs = chkarray(distribs, ndims, &idistribs ) * dargs = chkarray(dargs, ndims, &idargs ) # <<<<<<<<<<<<<< * psizes = chkarray(psizes, ndims, &ipsizes ) * # */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_dargs, __pyx_v_ndims, (&__pyx_v_idargs)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_dargs, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":273 * distribs = chkarray(distribs, ndims, &idistribs ) * dargs = chkarray(dargs, ndims, &idargs ) * psizes = chkarray(psizes, ndims, &ipsizes ) # <<<<<<<<<<<<<< * # * cdef Datatype datatype = Datatype.__new__(Datatype) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_psizes, __pyx_v_ndims, (&__pyx_v_ipsizes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_psizes, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":275 * psizes = chkarray(psizes, ndims, &ipsizes ) * # * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_darray(size, rank, ndims, igsizes, * idistribs, idargs, ipsizes, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 275, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":276 * # * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_darray(size, rank, ndims, igsizes, # <<<<<<<<<<<<<< * idistribs, idargs, ipsizes, * order, self.ob_mpi, */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_darray(__pyx_v_size, __pyx_v_rank, __pyx_v_ndims, __pyx_v_igsizes, __pyx_v_idistribs, __pyx_v_idargs, __pyx_v_ipsizes, __pyx_v_order, __pyx_v_self->ob_mpi, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 276, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":280 * order, self.ob_mpi, * &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * # Parametrized and size-specific Fortran Datatypes */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":261 * # -------------------------------------- * * def Create_darray(self, int size, int rank, # <<<<<<<<<<<<<< * gsizes, distribs, dargs, psizes, * int order=ORDER_C): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_darray", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XDECREF(__pyx_v_gsizes); __Pyx_XDECREF(__pyx_v_distribs); __Pyx_XDECREF(__pyx_v_dargs); __Pyx_XDECREF(__pyx_v_psizes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":286 * * @classmethod * def Create_f90_integer(cls, int r): # <<<<<<<<<<<<<< * """ * Return a bounded integer datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_35Create_f90_integer(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_34Create_f90_integer[] = "Datatype.Create_f90_integer(type cls, int r)\n\n Return a bounded integer datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_35Create_f90_integer(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_r; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_f90_integer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_f90_integer") < 0)) __PYX_ERR(21, 286, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_r = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 286, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_f90_integer", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 286, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_f90_integer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_34Create_f90_integer(((PyTypeObject*)__pyx_v_cls), __pyx_v_r); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_34Create_f90_integer(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_r) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_f90_integer", 0); /* "mpi4py/MPI/Datatype.pyx":290 * Return a bounded integer datatype * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_f90_integer(r, &datatype.ob_mpi) ) * return datatype */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 290, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":291 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_f90_integer(r, &datatype.ob_mpi) ) # <<<<<<<<<<<<<< * return datatype * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_f90_integer(__pyx_v_r, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 291, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":292 * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_f90_integer(r, &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":286 * * @classmethod * def Create_f90_integer(cls, int r): # <<<<<<<<<<<<<< * """ * Return a bounded integer datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_f90_integer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":295 * * @classmethod * def Create_f90_real(cls, int p, int r): # <<<<<<<<<<<<<< * """ * Return a bounded real datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_37Create_f90_real(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_36Create_f90_real[] = "Datatype.Create_f90_real(type cls, int p, int r)\n\n Return a bounded real datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_37Create_f90_real(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_p; int __pyx_v_r; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_f90_real (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_r,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_f90_real", 1, 2, 2, 1); __PYX_ERR(21, 295, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_f90_real") < 0)) __PYX_ERR(21, 295, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_p = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_p == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 295, __pyx_L3_error) __pyx_v_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 295, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_f90_real", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 295, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_f90_real", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_36Create_f90_real(((PyTypeObject*)__pyx_v_cls), __pyx_v_p, __pyx_v_r); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_36Create_f90_real(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_p, int __pyx_v_r) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_f90_real", 0); /* "mpi4py/MPI/Datatype.pyx":299 * Return a bounded real datatype * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_f90_real(p, r, &datatype.ob_mpi) ) * return datatype */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 299, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":300 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_f90_real(p, r, &datatype.ob_mpi) ) # <<<<<<<<<<<<<< * return datatype * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_f90_real(__pyx_v_p, __pyx_v_r, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 300, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":301 * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_f90_real(p, r, &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":295 * * @classmethod * def Create_f90_real(cls, int p, int r): # <<<<<<<<<<<<<< * """ * Return a bounded real datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_f90_real", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":304 * * @classmethod * def Create_f90_complex(cls, int p, int r): # <<<<<<<<<<<<<< * """ * Return a bounded complex datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_39Create_f90_complex(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_38Create_f90_complex[] = "Datatype.Create_f90_complex(type cls, int p, int r)\n\n Return a bounded complex datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_39Create_f90_complex(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_p; int __pyx_v_r; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_f90_complex (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_p,&__pyx_n_s_r,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_p)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_f90_complex", 1, 2, 2, 1); __PYX_ERR(21, 304, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_f90_complex") < 0)) __PYX_ERR(21, 304, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_p = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_p == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 304, __pyx_L3_error) __pyx_v_r = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_r == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 304, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_f90_complex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 304, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_f90_complex", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_38Create_f90_complex(((PyTypeObject*)__pyx_v_cls), __pyx_v_p, __pyx_v_r); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_38Create_f90_complex(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_p, int __pyx_v_r) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_f90_complex", 0); /* "mpi4py/MPI/Datatype.pyx":308 * Return a bounded complex datatype * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_f90_complex(p, r, &datatype.ob_mpi) ) * return datatype */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 308, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":309 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_f90_complex(p, r, &datatype.ob_mpi) ) # <<<<<<<<<<<<<< * return datatype * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_f90_complex(__pyx_v_p, __pyx_v_r, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 309, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":310 * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_f90_complex(p, r, &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":304 * * @classmethod * def Create_f90_complex(cls, int p, int r): # <<<<<<<<<<<<<< * """ * Return a bounded complex datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_f90_complex", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":313 * * @classmethod * def Match_size(cls, int typeclass, int size): # <<<<<<<<<<<<<< * """ * Find a datatype matching a specified size in bytes */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_41Match_size(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_40Match_size[] = "Datatype.Match_size(type cls, int typeclass, int size)\n\n Find a datatype matching a specified size in bytes\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_41Match_size(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_typeclass; int __pyx_v_size; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Match_size (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_typeclass,&__pyx_n_s_size,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typeclass)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Match_size", 1, 2, 2, 1); __PYX_ERR(21, 313, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Match_size") < 0)) __PYX_ERR(21, 313, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_typeclass = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_typeclass == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 313, __pyx_L3_error) __pyx_v_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 313, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Match_size", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 313, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Match_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_40Match_size(((PyTypeObject*)__pyx_v_cls), __pyx_v_typeclass, __pyx_v_size); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_40Match_size(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_typeclass, int __pyx_v_size) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Match_size", 0); /* "mpi4py/MPI/Datatype.pyx":317 * Find a datatype matching a specified size in bytes * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_match_size(typeclass, size, &datatype.ob_mpi) ) * return datatype */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 317, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":318 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_match_size(typeclass, size, &datatype.ob_mpi) ) # <<<<<<<<<<<<<< * return datatype * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_match_size(__pyx_v_typeclass, __pyx_v_size, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 318, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":319 * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_match_size(typeclass, size, &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * # Use of Derived Datatypes */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":313 * * @classmethod * def Match_size(cls, int typeclass, int size): # <<<<<<<<<<<<<< * """ * Find a datatype matching a specified size in bytes */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Match_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":324 * # ------------------------ * * def Commit(self): # <<<<<<<<<<<<<< * """ * Commit the datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_43Commit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_42Commit[] = "Datatype.Commit(self)\n\n Commit the datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_43Commit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Commit (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Commit", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Commit", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_42Commit(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_42Commit(struct PyMPIDatatypeObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Commit", 0); /* "mpi4py/MPI/Datatype.pyx":328 * Commit the datatype * """ * CHKERR( MPI_Type_commit(&self.ob_mpi) ) # <<<<<<<<<<<<<< * return self * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_commit((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 328, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":329 * """ * CHKERR( MPI_Type_commit(&self.ob_mpi) ) * return self # <<<<<<<<<<<<<< * * def Free(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":324 * # ------------------------ * * def Commit(self): # <<<<<<<<<<<<<< * """ * Commit the datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Commit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":331 * return self * * def Free(self): # <<<<<<<<<<<<<< * """ * Free the datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_45Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_44Free[] = "Datatype.Free(self)\n\n Free the datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_45Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Free", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Free", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_44Free(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_44Free(struct PyMPIDatatypeObject *__pyx_v_self) { struct PyMPIDatatypeObject *__pyx_v_t = 0; MPI_Datatype __pyx_v_p; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Free", 0); /* "mpi4py/MPI/Datatype.pyx":335 * Free the datatype * """ * CHKERR( MPI_Type_free(&self.ob_mpi) ) # <<<<<<<<<<<<<< * cdef Datatype t = self * cdef MPI_Datatype p = MPI_DATATYPE_NULL */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_free((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 335, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":336 * """ * CHKERR( MPI_Type_free(&self.ob_mpi) ) * cdef Datatype t = self # <<<<<<<<<<<<<< * cdef MPI_Datatype p = MPI_DATATYPE_NULL * if t is __UB__ : p = MPI_UB */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_v_t = __pyx_v_self; /* "mpi4py/MPI/Datatype.pyx":337 * CHKERR( MPI_Type_free(&self.ob_mpi) ) * cdef Datatype t = self * cdef MPI_Datatype p = MPI_DATATYPE_NULL # <<<<<<<<<<<<<< * if t is __UB__ : p = MPI_UB * elif t is __LB__ : p = MPI_LB */ __pyx_v_p = MPI_DATATYPE_NULL; /* "mpi4py/MPI/Datatype.pyx":338 * cdef Datatype t = self * cdef MPI_Datatype p = MPI_DATATYPE_NULL * if t is __UB__ : p = MPI_UB # <<<<<<<<<<<<<< * elif t is __LB__ : p = MPI_LB * elif t is __PACKED__ : p = MPI_PACKED */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UB__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_UB; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":339 * cdef MPI_Datatype p = MPI_DATATYPE_NULL * if t is __UB__ : p = MPI_UB * elif t is __LB__ : p = MPI_LB # <<<<<<<<<<<<<< * elif t is __PACKED__ : p = MPI_PACKED * elif t is __BYTE__ : p = MPI_BYTE */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LB__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_LB; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":340 * if t is __UB__ : p = MPI_UB * elif t is __LB__ : p = MPI_LB * elif t is __PACKED__ : p = MPI_PACKED # <<<<<<<<<<<<<< * elif t is __BYTE__ : p = MPI_BYTE * elif t is __AINT__ : p = MPI_AINT */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___PACKED__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_PACKED; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":341 * elif t is __LB__ : p = MPI_LB * elif t is __PACKED__ : p = MPI_PACKED * elif t is __BYTE__ : p = MPI_BYTE # <<<<<<<<<<<<<< * elif t is __AINT__ : p = MPI_AINT * elif t is __OFFSET__ : p = MPI_OFFSET */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___BYTE__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_BYTE; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":342 * elif t is __PACKED__ : p = MPI_PACKED * elif t is __BYTE__ : p = MPI_BYTE * elif t is __AINT__ : p = MPI_AINT # <<<<<<<<<<<<<< * elif t is __OFFSET__ : p = MPI_OFFSET * elif t is __COUNT__ : p = MPI_COUNT */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___AINT__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_AINT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":343 * elif t is __BYTE__ : p = MPI_BYTE * elif t is __AINT__ : p = MPI_AINT * elif t is __OFFSET__ : p = MPI_OFFSET # <<<<<<<<<<<<<< * elif t is __COUNT__ : p = MPI_COUNT * elif t is __CHAR__ : p = MPI_CHAR */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___OFFSET__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_OFFSET; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":344 * elif t is __AINT__ : p = MPI_AINT * elif t is __OFFSET__ : p = MPI_OFFSET * elif t is __COUNT__ : p = MPI_COUNT # <<<<<<<<<<<<<< * elif t is __CHAR__ : p = MPI_CHAR * elif t is __WCHAR__ : p = MPI_WCHAR */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___COUNT__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_COUNT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":345 * elif t is __OFFSET__ : p = MPI_OFFSET * elif t is __COUNT__ : p = MPI_COUNT * elif t is __CHAR__ : p = MPI_CHAR # <<<<<<<<<<<<<< * elif t is __WCHAR__ : p = MPI_WCHAR * elif t is __SIGNED_CHAR__ : p = MPI_SIGNED_CHAR */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___CHAR__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_CHAR; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":346 * elif t is __COUNT__ : p = MPI_COUNT * elif t is __CHAR__ : p = MPI_CHAR * elif t is __WCHAR__ : p = MPI_WCHAR # <<<<<<<<<<<<<< * elif t is __SIGNED_CHAR__ : p = MPI_SIGNED_CHAR * elif t is __SHORT__ : p = MPI_SHORT */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___WCHAR__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_WCHAR; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":347 * elif t is __CHAR__ : p = MPI_CHAR * elif t is __WCHAR__ : p = MPI_WCHAR * elif t is __SIGNED_CHAR__ : p = MPI_SIGNED_CHAR # <<<<<<<<<<<<<< * elif t is __SHORT__ : p = MPI_SHORT * elif t is __INT__ : p = MPI_INT */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___SIGNED_CHAR__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_SIGNED_CHAR; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":348 * elif t is __WCHAR__ : p = MPI_WCHAR * elif t is __SIGNED_CHAR__ : p = MPI_SIGNED_CHAR * elif t is __SHORT__ : p = MPI_SHORT # <<<<<<<<<<<<<< * elif t is __INT__ : p = MPI_INT * elif t is __LONG__ : p = MPI_LONG */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___SHORT__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_SHORT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":349 * elif t is __SIGNED_CHAR__ : p = MPI_SIGNED_CHAR * elif t is __SHORT__ : p = MPI_SHORT * elif t is __INT__ : p = MPI_INT # <<<<<<<<<<<<<< * elif t is __LONG__ : p = MPI_LONG * elif t is __LONG_LONG__ : p = MPI_LONG_LONG */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INT__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_INT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":350 * elif t is __SHORT__ : p = MPI_SHORT * elif t is __INT__ : p = MPI_INT * elif t is __LONG__ : p = MPI_LONG # <<<<<<<<<<<<<< * elif t is __LONG_LONG__ : p = MPI_LONG_LONG * elif t is __UNSIGNED_CHAR__ : p = MPI_UNSIGNED_CHAR */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LONG__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_LONG; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":351 * elif t is __INT__ : p = MPI_INT * elif t is __LONG__ : p = MPI_LONG * elif t is __LONG_LONG__ : p = MPI_LONG_LONG # <<<<<<<<<<<<<< * elif t is __UNSIGNED_CHAR__ : p = MPI_UNSIGNED_CHAR * elif t is __UNSIGNED_SHORT__ : p = MPI_UNSIGNED_SHORT */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LONG_LONG__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_LONG_LONG; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":352 * elif t is __LONG__ : p = MPI_LONG * elif t is __LONG_LONG__ : p = MPI_LONG_LONG * elif t is __UNSIGNED_CHAR__ : p = MPI_UNSIGNED_CHAR # <<<<<<<<<<<<<< * elif t is __UNSIGNED_SHORT__ : p = MPI_UNSIGNED_SHORT * elif t is __UNSIGNED__ : p = MPI_UNSIGNED */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UNSIGNED_CHAR__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_UNSIGNED_CHAR; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":353 * elif t is __LONG_LONG__ : p = MPI_LONG_LONG * elif t is __UNSIGNED_CHAR__ : p = MPI_UNSIGNED_CHAR * elif t is __UNSIGNED_SHORT__ : p = MPI_UNSIGNED_SHORT # <<<<<<<<<<<<<< * elif t is __UNSIGNED__ : p = MPI_UNSIGNED * elif t is __UNSIGNED_LONG__ : p = MPI_UNSIGNED_LONG */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_UNSIGNED_SHORT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":354 * elif t is __UNSIGNED_CHAR__ : p = MPI_UNSIGNED_CHAR * elif t is __UNSIGNED_SHORT__ : p = MPI_UNSIGNED_SHORT * elif t is __UNSIGNED__ : p = MPI_UNSIGNED # <<<<<<<<<<<<<< * elif t is __UNSIGNED_LONG__ : p = MPI_UNSIGNED_LONG * elif t is __UNSIGNED_LONG_LONG__ : p = MPI_UNSIGNED_LONG_LONG */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UNSIGNED__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_UNSIGNED; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":355 * elif t is __UNSIGNED_SHORT__ : p = MPI_UNSIGNED_SHORT * elif t is __UNSIGNED__ : p = MPI_UNSIGNED * elif t is __UNSIGNED_LONG__ : p = MPI_UNSIGNED_LONG # <<<<<<<<<<<<<< * elif t is __UNSIGNED_LONG_LONG__ : p = MPI_UNSIGNED_LONG_LONG * elif t is __FLOAT__ : p = MPI_FLOAT */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_UNSIGNED_LONG; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":356 * elif t is __UNSIGNED__ : p = MPI_UNSIGNED * elif t is __UNSIGNED_LONG__ : p = MPI_UNSIGNED_LONG * elif t is __UNSIGNED_LONG_LONG__ : p = MPI_UNSIGNED_LONG_LONG # <<<<<<<<<<<<<< * elif t is __FLOAT__ : p = MPI_FLOAT * elif t is __DOUBLE__ : p = MPI_DOUBLE */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UNSIGNED_LONG_LONG__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_UNSIGNED_LONG_LONG; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":357 * elif t is __UNSIGNED_LONG__ : p = MPI_UNSIGNED_LONG * elif t is __UNSIGNED_LONG_LONG__ : p = MPI_UNSIGNED_LONG_LONG * elif t is __FLOAT__ : p = MPI_FLOAT # <<<<<<<<<<<<<< * elif t is __DOUBLE__ : p = MPI_DOUBLE * elif t is __LONG_DOUBLE__ : p = MPI_LONG_DOUBLE */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___FLOAT__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_FLOAT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":358 * elif t is __UNSIGNED_LONG_LONG__ : p = MPI_UNSIGNED_LONG_LONG * elif t is __FLOAT__ : p = MPI_FLOAT * elif t is __DOUBLE__ : p = MPI_DOUBLE # <<<<<<<<<<<<<< * elif t is __LONG_DOUBLE__ : p = MPI_LONG_DOUBLE * elif t is __C_BOOL__ : p = MPI_C_BOOL */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___DOUBLE__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_DOUBLE; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":359 * elif t is __FLOAT__ : p = MPI_FLOAT * elif t is __DOUBLE__ : p = MPI_DOUBLE * elif t is __LONG_DOUBLE__ : p = MPI_LONG_DOUBLE # <<<<<<<<<<<<<< * elif t is __C_BOOL__ : p = MPI_C_BOOL * elif t is __INT8_T__ : p = MPI_INT8_T */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LONG_DOUBLE__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_LONG_DOUBLE; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":360 * elif t is __DOUBLE__ : p = MPI_DOUBLE * elif t is __LONG_DOUBLE__ : p = MPI_LONG_DOUBLE * elif t is __C_BOOL__ : p = MPI_C_BOOL # <<<<<<<<<<<<<< * elif t is __INT8_T__ : p = MPI_INT8_T * elif t is __INT16_T__ : p = MPI_INT16_T */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___C_BOOL__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_C_BOOL; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":361 * elif t is __LONG_DOUBLE__ : p = MPI_LONG_DOUBLE * elif t is __C_BOOL__ : p = MPI_C_BOOL * elif t is __INT8_T__ : p = MPI_INT8_T # <<<<<<<<<<<<<< * elif t is __INT16_T__ : p = MPI_INT16_T * elif t is __INT32_T__ : p = MPI_INT32_T */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INT8_T__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_INT8_T; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":362 * elif t is __C_BOOL__ : p = MPI_C_BOOL * elif t is __INT8_T__ : p = MPI_INT8_T * elif t is __INT16_T__ : p = MPI_INT16_T # <<<<<<<<<<<<<< * elif t is __INT32_T__ : p = MPI_INT32_T * elif t is __INT64_T__ : p = MPI_INT64_T */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INT16_T__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_INT16_T; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":363 * elif t is __INT8_T__ : p = MPI_INT8_T * elif t is __INT16_T__ : p = MPI_INT16_T * elif t is __INT32_T__ : p = MPI_INT32_T # <<<<<<<<<<<<<< * elif t is __INT64_T__ : p = MPI_INT64_T * elif t is __UINT8_T__ : p = MPI_UINT8_T */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INT32_T__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_INT32_T; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":364 * elif t is __INT16_T__ : p = MPI_INT16_T * elif t is __INT32_T__ : p = MPI_INT32_T * elif t is __INT64_T__ : p = MPI_INT64_T # <<<<<<<<<<<<<< * elif t is __UINT8_T__ : p = MPI_UINT8_T * elif t is __UINT16_T__ : p = MPI_UINT16_T */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INT64_T__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_INT64_T; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":365 * elif t is __INT32_T__ : p = MPI_INT32_T * elif t is __INT64_T__ : p = MPI_INT64_T * elif t is __UINT8_T__ : p = MPI_UINT8_T # <<<<<<<<<<<<<< * elif t is __UINT16_T__ : p = MPI_UINT16_T * elif t is __UINT32_T__ : p = MPI_UINT32_T */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UINT8_T__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_UINT8_T; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":366 * elif t is __INT64_T__ : p = MPI_INT64_T * elif t is __UINT8_T__ : p = MPI_UINT8_T * elif t is __UINT16_T__ : p = MPI_UINT16_T # <<<<<<<<<<<<<< * elif t is __UINT32_T__ : p = MPI_UINT32_T * elif t is __UINT64_T__ : p = MPI_UINT64_T */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UINT16_T__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_UINT16_T; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":367 * elif t is __UINT8_T__ : p = MPI_UINT8_T * elif t is __UINT16_T__ : p = MPI_UINT16_T * elif t is __UINT32_T__ : p = MPI_UINT32_T # <<<<<<<<<<<<<< * elif t is __UINT64_T__ : p = MPI_UINT64_T * elif t is __C_COMPLEX__ : p = MPI_C_COMPLEX */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UINT32_T__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_UINT32_T; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":368 * elif t is __UINT16_T__ : p = MPI_UINT16_T * elif t is __UINT32_T__ : p = MPI_UINT32_T * elif t is __UINT64_T__ : p = MPI_UINT64_T # <<<<<<<<<<<<<< * elif t is __C_COMPLEX__ : p = MPI_C_COMPLEX * elif t is __C_FLOAT_COMPLEX__ : p = MPI_C_FLOAT_COMPLEX */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___UINT64_T__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_UINT64_T; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":369 * elif t is __UINT32_T__ : p = MPI_UINT32_T * elif t is __UINT64_T__ : p = MPI_UINT64_T * elif t is __C_COMPLEX__ : p = MPI_C_COMPLEX # <<<<<<<<<<<<<< * elif t is __C_FLOAT_COMPLEX__ : p = MPI_C_FLOAT_COMPLEX * elif t is __C_DOUBLE_COMPLEX__ : p = MPI_C_DOUBLE_COMPLEX */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___C_COMPLEX__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_C_COMPLEX; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":370 * elif t is __UINT64_T__ : p = MPI_UINT64_T * elif t is __C_COMPLEX__ : p = MPI_C_COMPLEX * elif t is __C_FLOAT_COMPLEX__ : p = MPI_C_FLOAT_COMPLEX # <<<<<<<<<<<<<< * elif t is __C_DOUBLE_COMPLEX__ : p = MPI_C_DOUBLE_COMPLEX * elif t is __C_LONG_DOUBLE_COMPLEX__ : p = MPI_C_LONG_DOUBLE_COMPLEX */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_C_FLOAT_COMPLEX; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":371 * elif t is __C_COMPLEX__ : p = MPI_C_COMPLEX * elif t is __C_FLOAT_COMPLEX__ : p = MPI_C_FLOAT_COMPLEX * elif t is __C_DOUBLE_COMPLEX__ : p = MPI_C_DOUBLE_COMPLEX # <<<<<<<<<<<<<< * elif t is __C_LONG_DOUBLE_COMPLEX__ : p = MPI_C_LONG_DOUBLE_COMPLEX * elif t is __CXX_BOOL__ : p = MPI_CXX_BOOL */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_C_DOUBLE_COMPLEX; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":372 * elif t is __C_FLOAT_COMPLEX__ : p = MPI_C_FLOAT_COMPLEX * elif t is __C_DOUBLE_COMPLEX__ : p = MPI_C_DOUBLE_COMPLEX * elif t is __C_LONG_DOUBLE_COMPLEX__ : p = MPI_C_LONG_DOUBLE_COMPLEX # <<<<<<<<<<<<<< * elif t is __CXX_BOOL__ : p = MPI_CXX_BOOL * elif t is __CXX_FLOAT_COMPLEX__ : p = MPI_CXX_FLOAT_COMPLEX */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_C_LONG_DOUBLE_COMPLEX; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":373 * elif t is __C_DOUBLE_COMPLEX__ : p = MPI_C_DOUBLE_COMPLEX * elif t is __C_LONG_DOUBLE_COMPLEX__ : p = MPI_C_LONG_DOUBLE_COMPLEX * elif t is __CXX_BOOL__ : p = MPI_CXX_BOOL # <<<<<<<<<<<<<< * elif t is __CXX_FLOAT_COMPLEX__ : p = MPI_CXX_FLOAT_COMPLEX * elif t is __CXX_DOUBLE_COMPLEX__ : p = MPI_CXX_DOUBLE_COMPLEX */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___CXX_BOOL__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_CXX_BOOL; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":374 * elif t is __C_LONG_DOUBLE_COMPLEX__ : p = MPI_C_LONG_DOUBLE_COMPLEX * elif t is __CXX_BOOL__ : p = MPI_CXX_BOOL * elif t is __CXX_FLOAT_COMPLEX__ : p = MPI_CXX_FLOAT_COMPLEX # <<<<<<<<<<<<<< * elif t is __CXX_DOUBLE_COMPLEX__ : p = MPI_CXX_DOUBLE_COMPLEX * elif t is __CXX_LONG_DOUBLE_COMPLEX__: p = MPI_CXX_LONG_DOUBLE_COMPLEX */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___CXX_FLOAT_COMPLEX__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_CXX_FLOAT_COMPLEX; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":375 * elif t is __CXX_BOOL__ : p = MPI_CXX_BOOL * elif t is __CXX_FLOAT_COMPLEX__ : p = MPI_CXX_FLOAT_COMPLEX * elif t is __CXX_DOUBLE_COMPLEX__ : p = MPI_CXX_DOUBLE_COMPLEX # <<<<<<<<<<<<<< * elif t is __CXX_LONG_DOUBLE_COMPLEX__: p = MPI_CXX_LONG_DOUBLE_COMPLEX * elif t is __SHORT_INT__ : p = MPI_SHORT_INT */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___CXX_DOUBLE_COMPLEX__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_CXX_DOUBLE_COMPLEX; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":376 * elif t is __CXX_FLOAT_COMPLEX__ : p = MPI_CXX_FLOAT_COMPLEX * elif t is __CXX_DOUBLE_COMPLEX__ : p = MPI_CXX_DOUBLE_COMPLEX * elif t is __CXX_LONG_DOUBLE_COMPLEX__: p = MPI_CXX_LONG_DOUBLE_COMPLEX # <<<<<<<<<<<<<< * elif t is __SHORT_INT__ : p = MPI_SHORT_INT * elif t is __TWOINT__ : p = MPI_2INT */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___CXX_LONG_DOUBLE_COMPLEX__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_CXX_LONG_DOUBLE_COMPLEX; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":377 * elif t is __CXX_DOUBLE_COMPLEX__ : p = MPI_CXX_DOUBLE_COMPLEX * elif t is __CXX_LONG_DOUBLE_COMPLEX__: p = MPI_CXX_LONG_DOUBLE_COMPLEX * elif t is __SHORT_INT__ : p = MPI_SHORT_INT # <<<<<<<<<<<<<< * elif t is __TWOINT__ : p = MPI_2INT * elif t is __LONG_INT__ : p = MPI_LONG_INT */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___SHORT_INT__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_SHORT_INT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":378 * elif t is __CXX_LONG_DOUBLE_COMPLEX__: p = MPI_CXX_LONG_DOUBLE_COMPLEX * elif t is __SHORT_INT__ : p = MPI_SHORT_INT * elif t is __TWOINT__ : p = MPI_2INT # <<<<<<<<<<<<<< * elif t is __LONG_INT__ : p = MPI_LONG_INT * elif t is __FLOAT_INT__ : p = MPI_FLOAT_INT */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___TWOINT__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_2INT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":379 * elif t is __SHORT_INT__ : p = MPI_SHORT_INT * elif t is __TWOINT__ : p = MPI_2INT * elif t is __LONG_INT__ : p = MPI_LONG_INT # <<<<<<<<<<<<<< * elif t is __FLOAT_INT__ : p = MPI_FLOAT_INT * elif t is __DOUBLE_INT__ : p = MPI_DOUBLE_INT */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LONG_INT__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_LONG_INT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":380 * elif t is __TWOINT__ : p = MPI_2INT * elif t is __LONG_INT__ : p = MPI_LONG_INT * elif t is __FLOAT_INT__ : p = MPI_FLOAT_INT # <<<<<<<<<<<<<< * elif t is __DOUBLE_INT__ : p = MPI_DOUBLE_INT * elif t is __LONG_DOUBLE_INT__ : p = MPI_LONG_DOUBLE_INT */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___FLOAT_INT__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_FLOAT_INT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":381 * elif t is __LONG_INT__ : p = MPI_LONG_INT * elif t is __FLOAT_INT__ : p = MPI_FLOAT_INT * elif t is __DOUBLE_INT__ : p = MPI_DOUBLE_INT # <<<<<<<<<<<<<< * elif t is __LONG_DOUBLE_INT__ : p = MPI_LONG_DOUBLE_INT * elif t is __CHARACTER__ : p = MPI_CHARACTER */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___DOUBLE_INT__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_DOUBLE_INT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":382 * elif t is __FLOAT_INT__ : p = MPI_FLOAT_INT * elif t is __DOUBLE_INT__ : p = MPI_DOUBLE_INT * elif t is __LONG_DOUBLE_INT__ : p = MPI_LONG_DOUBLE_INT # <<<<<<<<<<<<<< * elif t is __CHARACTER__ : p = MPI_CHARACTER * elif t is __LOGICAL__ : p = MPI_LOGICAL */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LONG_DOUBLE_INT__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_LONG_DOUBLE_INT; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":383 * elif t is __DOUBLE_INT__ : p = MPI_DOUBLE_INT * elif t is __LONG_DOUBLE_INT__ : p = MPI_LONG_DOUBLE_INT * elif t is __CHARACTER__ : p = MPI_CHARACTER # <<<<<<<<<<<<<< * elif t is __LOGICAL__ : p = MPI_LOGICAL * elif t is __INTEGER__ : p = MPI_INTEGER */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___CHARACTER__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_CHARACTER; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":384 * elif t is __LONG_DOUBLE_INT__ : p = MPI_LONG_DOUBLE_INT * elif t is __CHARACTER__ : p = MPI_CHARACTER * elif t is __LOGICAL__ : p = MPI_LOGICAL # <<<<<<<<<<<<<< * elif t is __INTEGER__ : p = MPI_INTEGER * elif t is __REAL__ : p = MPI_REAL */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LOGICAL__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_LOGICAL; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":385 * elif t is __CHARACTER__ : p = MPI_CHARACTER * elif t is __LOGICAL__ : p = MPI_LOGICAL * elif t is __INTEGER__ : p = MPI_INTEGER # <<<<<<<<<<<<<< * elif t is __REAL__ : p = MPI_REAL * elif t is __DOUBLE_PRECISION__ : p = MPI_DOUBLE_PRECISION */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INTEGER__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_INTEGER; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":386 * elif t is __LOGICAL__ : p = MPI_LOGICAL * elif t is __INTEGER__ : p = MPI_INTEGER * elif t is __REAL__ : p = MPI_REAL # <<<<<<<<<<<<<< * elif t is __DOUBLE_PRECISION__ : p = MPI_DOUBLE_PRECISION * elif t is __COMPLEX__ : p = MPI_COMPLEX */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___REAL__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_REAL; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":387 * elif t is __INTEGER__ : p = MPI_INTEGER * elif t is __REAL__ : p = MPI_REAL * elif t is __DOUBLE_PRECISION__ : p = MPI_DOUBLE_PRECISION # <<<<<<<<<<<<<< * elif t is __COMPLEX__ : p = MPI_COMPLEX * elif t is __DOUBLE_COMPLEX__ : p = MPI_DOUBLE_COMPLEX */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___DOUBLE_PRECISION__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_DOUBLE_PRECISION; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":388 * elif t is __REAL__ : p = MPI_REAL * elif t is __DOUBLE_PRECISION__ : p = MPI_DOUBLE_PRECISION * elif t is __COMPLEX__ : p = MPI_COMPLEX # <<<<<<<<<<<<<< * elif t is __DOUBLE_COMPLEX__ : p = MPI_DOUBLE_COMPLEX * elif t is __LOGICAL1__ : p = MPI_LOGICAL1 */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___COMPLEX__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_COMPLEX; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":389 * elif t is __DOUBLE_PRECISION__ : p = MPI_DOUBLE_PRECISION * elif t is __COMPLEX__ : p = MPI_COMPLEX * elif t is __DOUBLE_COMPLEX__ : p = MPI_DOUBLE_COMPLEX # <<<<<<<<<<<<<< * elif t is __LOGICAL1__ : p = MPI_LOGICAL1 * elif t is __LOGICAL2__ : p = MPI_LOGICAL2 */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_DOUBLE_COMPLEX; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":390 * elif t is __COMPLEX__ : p = MPI_COMPLEX * elif t is __DOUBLE_COMPLEX__ : p = MPI_DOUBLE_COMPLEX * elif t is __LOGICAL1__ : p = MPI_LOGICAL1 # <<<<<<<<<<<<<< * elif t is __LOGICAL2__ : p = MPI_LOGICAL2 * elif t is __LOGICAL4__ : p = MPI_LOGICAL4 */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LOGICAL1__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_LOGICAL1; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":391 * elif t is __DOUBLE_COMPLEX__ : p = MPI_DOUBLE_COMPLEX * elif t is __LOGICAL1__ : p = MPI_LOGICAL1 * elif t is __LOGICAL2__ : p = MPI_LOGICAL2 # <<<<<<<<<<<<<< * elif t is __LOGICAL4__ : p = MPI_LOGICAL4 * elif t is __LOGICAL8__ : p = MPI_LOGICAL8 */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LOGICAL2__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_LOGICAL2; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":392 * elif t is __LOGICAL1__ : p = MPI_LOGICAL1 * elif t is __LOGICAL2__ : p = MPI_LOGICAL2 * elif t is __LOGICAL4__ : p = MPI_LOGICAL4 # <<<<<<<<<<<<<< * elif t is __LOGICAL8__ : p = MPI_LOGICAL8 * elif t is __INTEGER1__ : p = MPI_INTEGER1 */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LOGICAL4__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_LOGICAL4; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":393 * elif t is __LOGICAL2__ : p = MPI_LOGICAL2 * elif t is __LOGICAL4__ : p = MPI_LOGICAL4 * elif t is __LOGICAL8__ : p = MPI_LOGICAL8 # <<<<<<<<<<<<<< * elif t is __INTEGER1__ : p = MPI_INTEGER1 * elif t is __INTEGER2__ : p = MPI_INTEGER2 */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___LOGICAL8__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_LOGICAL8; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":394 * elif t is __LOGICAL4__ : p = MPI_LOGICAL4 * elif t is __LOGICAL8__ : p = MPI_LOGICAL8 * elif t is __INTEGER1__ : p = MPI_INTEGER1 # <<<<<<<<<<<<<< * elif t is __INTEGER2__ : p = MPI_INTEGER2 * elif t is __INTEGER4__ : p = MPI_INTEGER4 */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INTEGER1__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_INTEGER1; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":395 * elif t is __LOGICAL8__ : p = MPI_LOGICAL8 * elif t is __INTEGER1__ : p = MPI_INTEGER1 * elif t is __INTEGER2__ : p = MPI_INTEGER2 # <<<<<<<<<<<<<< * elif t is __INTEGER4__ : p = MPI_INTEGER4 * elif t is __INTEGER8__ : p = MPI_INTEGER8 */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INTEGER2__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_INTEGER2; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":396 * elif t is __INTEGER1__ : p = MPI_INTEGER1 * elif t is __INTEGER2__ : p = MPI_INTEGER2 * elif t is __INTEGER4__ : p = MPI_INTEGER4 # <<<<<<<<<<<<<< * elif t is __INTEGER8__ : p = MPI_INTEGER8 * elif t is __INTEGER16__ : p = MPI_INTEGER16 */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INTEGER4__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_INTEGER4; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":397 * elif t is __INTEGER2__ : p = MPI_INTEGER2 * elif t is __INTEGER4__ : p = MPI_INTEGER4 * elif t is __INTEGER8__ : p = MPI_INTEGER8 # <<<<<<<<<<<<<< * elif t is __INTEGER16__ : p = MPI_INTEGER16 * elif t is __REAL2__ : p = MPI_REAL2 */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INTEGER8__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_INTEGER8; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":398 * elif t is __INTEGER4__ : p = MPI_INTEGER4 * elif t is __INTEGER8__ : p = MPI_INTEGER8 * elif t is __INTEGER16__ : p = MPI_INTEGER16 # <<<<<<<<<<<<<< * elif t is __REAL2__ : p = MPI_REAL2 * elif t is __REAL4__ : p = MPI_REAL4 */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___INTEGER16__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_INTEGER16; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":399 * elif t is __INTEGER8__ : p = MPI_INTEGER8 * elif t is __INTEGER16__ : p = MPI_INTEGER16 * elif t is __REAL2__ : p = MPI_REAL2 # <<<<<<<<<<<<<< * elif t is __REAL4__ : p = MPI_REAL4 * elif t is __REAL8__ : p = MPI_REAL8 */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___REAL2__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_REAL2; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":400 * elif t is __INTEGER16__ : p = MPI_INTEGER16 * elif t is __REAL2__ : p = MPI_REAL2 * elif t is __REAL4__ : p = MPI_REAL4 # <<<<<<<<<<<<<< * elif t is __REAL8__ : p = MPI_REAL8 * elif t is __REAL16__ : p = MPI_REAL16 */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___REAL4__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_REAL4; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":401 * elif t is __REAL2__ : p = MPI_REAL2 * elif t is __REAL4__ : p = MPI_REAL4 * elif t is __REAL8__ : p = MPI_REAL8 # <<<<<<<<<<<<<< * elif t is __REAL16__ : p = MPI_REAL16 * elif t is __COMPLEX4__ : p = MPI_COMPLEX4 */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___REAL8__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_REAL8; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":402 * elif t is __REAL4__ : p = MPI_REAL4 * elif t is __REAL8__ : p = MPI_REAL8 * elif t is __REAL16__ : p = MPI_REAL16 # <<<<<<<<<<<<<< * elif t is __COMPLEX4__ : p = MPI_COMPLEX4 * elif t is __COMPLEX8__ : p = MPI_COMPLEX8 */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___REAL16__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_REAL16; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":403 * elif t is __REAL8__ : p = MPI_REAL8 * elif t is __REAL16__ : p = MPI_REAL16 * elif t is __COMPLEX4__ : p = MPI_COMPLEX4 # <<<<<<<<<<<<<< * elif t is __COMPLEX8__ : p = MPI_COMPLEX8 * elif t is __COMPLEX16__ : p = MPI_COMPLEX16 */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___COMPLEX4__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_COMPLEX4; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":404 * elif t is __REAL16__ : p = MPI_REAL16 * elif t is __COMPLEX4__ : p = MPI_COMPLEX4 * elif t is __COMPLEX8__ : p = MPI_COMPLEX8 # <<<<<<<<<<<<<< * elif t is __COMPLEX16__ : p = MPI_COMPLEX16 * elif t is __COMPLEX32__ : p = MPI_COMPLEX32 */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___COMPLEX8__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_COMPLEX8; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":405 * elif t is __COMPLEX4__ : p = MPI_COMPLEX4 * elif t is __COMPLEX8__ : p = MPI_COMPLEX8 * elif t is __COMPLEX16__ : p = MPI_COMPLEX16 # <<<<<<<<<<<<<< * elif t is __COMPLEX32__ : p = MPI_COMPLEX32 * self.ob_mpi = p */ __pyx_t_3 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___COMPLEX16__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_p = MPI_COMPLEX16; goto __pyx_L3; } /* "mpi4py/MPI/Datatype.pyx":406 * elif t is __COMPLEX8__ : p = MPI_COMPLEX8 * elif t is __COMPLEX16__ : p = MPI_COMPLEX16 * elif t is __COMPLEX32__ : p = MPI_COMPLEX32 # <<<<<<<<<<<<<< * self.ob_mpi = p * */ __pyx_t_2 = (__pyx_v_t == __pyx_v_6mpi4py_3MPI___COMPLEX32__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_p = MPI_COMPLEX32; } __pyx_L3:; /* "mpi4py/MPI/Datatype.pyx":407 * elif t is __COMPLEX16__ : p = MPI_COMPLEX16 * elif t is __COMPLEX32__ : p = MPI_COMPLEX32 * self.ob_mpi = p # <<<<<<<<<<<<<< * * # Datatype Resizing */ __pyx_v_self->ob_mpi = __pyx_v_p; /* "mpi4py/MPI/Datatype.pyx":331 * return self * * def Free(self): # <<<<<<<<<<<<<< * """ * Free the datatype */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_t); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":412 * # ----------------- * * def Create_resized(self, Aint lb, Aint extent): # <<<<<<<<<<<<<< * """ * Create a datatype with a new lower bound and extent */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_47Create_resized(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_46Create_resized[] = "Datatype.Create_resized(self, Aint lb, Aint extent)\n\n Create a datatype with a new lower bound and extent\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_47Create_resized(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_extent; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_resized (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lb,&__pyx_n_s_extent,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lb)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extent)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_resized", 1, 2, 2, 1); __PYX_ERR(21, 412, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_resized") < 0)) __PYX_ERR(21, 412, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_lb = __Pyx_PyInt_As_MPI_Aint(values[0]); if (unlikely((__pyx_v_lb == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 412, __pyx_L3_error) __pyx_v_extent = __Pyx_PyInt_As_MPI_Aint(values[1]); if (unlikely((__pyx_v_extent == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 412, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_resized", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 412, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_resized", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_46Create_resized(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_lb, __pyx_v_extent); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_46Create_resized(struct PyMPIDatatypeObject *__pyx_v_self, MPI_Aint __pyx_v_lb, MPI_Aint __pyx_v_extent) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_resized", 0); /* "mpi4py/MPI/Datatype.pyx":416 * Create a datatype with a new lower bound and extent * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_resized(self.ob_mpi, * lb, extent, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 416, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":417 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * CHKERR( MPI_Type_create_resized(self.ob_mpi, # <<<<<<<<<<<<<< * lb, extent, * &datatype.ob_mpi) ) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_resized(__pyx_v_self->ob_mpi, __pyx_v_lb, __pyx_v_extent, (&__pyx_v_datatype->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 417, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":420 * lb, extent, * &datatype.ob_mpi) ) * return datatype # <<<<<<<<<<<<<< * * Resized = Create_resized #: compatibility alias */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":412 * # ----------------- * * def Create_resized(self, Aint lb, Aint extent): # <<<<<<<<<<<<<< * """ * Create a datatype with a new lower bound and extent */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_resized", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":424 * Resized = Create_resized #: compatibility alias * * def Get_true_extent(self): # <<<<<<<<<<<<<< * """ * Return the true lower bound and extent of a datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_49Get_true_extent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_48Get_true_extent[] = "Datatype.Get_true_extent(self)\n\n Return the true lower bound and extent of a datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_49Get_true_extent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_true_extent (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_true_extent", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_true_extent", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_48Get_true_extent(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_48Get_true_extent(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_lb; MPI_Count __pyx_v_extent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Get_true_extent", 0); /* "mpi4py/MPI/Datatype.pyx":428 * Return the true lower bound and extent of a datatype * """ * cdef MPI_Count lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, * &lb, &extent) ) */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":429 * """ * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, # <<<<<<<<<<<<<< * &lb, &extent) ) * return (lb, extent) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_true_extent_x(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 429, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":431 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, * &lb, &extent) ) * return (lb, extent) # <<<<<<<<<<<<<< * * property true_extent: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count(__pyx_v_lb); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_MPI_Count(__pyx_v_extent); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":424 * Resized = Create_resized #: compatibility alias * * def Get_true_extent(self): # <<<<<<<<<<<<<< * """ * Return the true lower bound and extent of a datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Get_true_extent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":435 * property true_extent: * """true extent""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_11true_extent_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_11true_extent_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_11true_extent___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_11true_extent___get__(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_lb; MPI_Count __pyx_v_extent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":436 * """true extent""" * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, * &lb, &extent) ) */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":437 * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, # <<<<<<<<<<<<<< * &lb, &extent) ) * return extent */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_true_extent_x(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 437, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":439 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, * &lb, &extent) ) * return extent # <<<<<<<<<<<<<< * * property true_lb: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count(__pyx_v_extent); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":435 * property true_extent: * """true extent""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.true_extent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":443 * property true_lb: * """true lower bound""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_7true_lb_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_7true_lb_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_7true_lb___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_7true_lb___get__(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_lb; MPI_Count __pyx_v_extent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":444 * """true lower bound""" * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, * &lb, &extent) ) */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":445 * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, # <<<<<<<<<<<<<< * &lb, &extent) ) * return lb */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_true_extent_x(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 445, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":447 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, * &lb, &extent) ) * return lb # <<<<<<<<<<<<<< * * property true_ub: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count(__pyx_v_lb); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":443 * property true_lb: * """true lower bound""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.true_lb.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":451 * property true_ub: * """true upper bound""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_7true_ub_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_7true_ub_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_7true_ub___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_7true_ub___get__(struct PyMPIDatatypeObject *__pyx_v_self) { MPI_Count __pyx_v_lb; MPI_Count __pyx_v_extent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":452 * """true upper bound""" * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, * &lb, &extent) ) */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":453 * def __get__(self): * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, # <<<<<<<<<<<<<< * &lb, &extent) ) * return lb + extent */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_true_extent_x(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 453, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":455 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, * &lb, &extent) ) * return lb + extent # <<<<<<<<<<<<<< * * # Decoding a Datatype */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Count((__pyx_v_lb + __pyx_v_extent)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":451 * property true_ub: * """true upper bound""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Count lb = 0, extent = 0 * CHKERR( MPI_Type_get_true_extent_x(self.ob_mpi, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.true_ub.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":460 * # ------------------- * * def Get_envelope(self): # <<<<<<<<<<<<<< * """ * Return information on the number and type of input arguments */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_51Get_envelope(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_50Get_envelope[] = "Datatype.Get_envelope(self)\n\n Return information on the number and type of input arguments\n used in the call that created a datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_51Get_envelope(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_envelope (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_envelope", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_envelope", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_50Get_envelope(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_50Get_envelope(struct PyMPIDatatypeObject *__pyx_v_self) { int __pyx_v_ni; int __pyx_v_na; int __pyx_v_nd; int __pyx_v_combiner; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("Get_envelope", 0); /* "mpi4py/MPI/Datatype.pyx":465 * used in the call that created a datatype * """ * cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) * return (ni, na, nd, combiner) */ __pyx_v_ni = 0; __pyx_v_na = 0; __pyx_v_nd = 0; __pyx_v_combiner = MPI_UNDEFINED; /* "mpi4py/MPI/Datatype.pyx":466 * """ * cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) # <<<<<<<<<<<<<< * return (ni, na, nd, combiner) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_envelope(__pyx_v_self->ob_mpi, (&__pyx_v_ni), (&__pyx_v_na), (&__pyx_v_nd), (&__pyx_v_combiner))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 466, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":467 * cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) * return (ni, na, nd, combiner) # <<<<<<<<<<<<<< * * property envelope: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ni); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_na); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nd); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_combiner); if (unlikely(!__pyx_t_5)) __PYX_ERR(21, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":460 * # ------------------- * * def Get_envelope(self): # <<<<<<<<<<<<<< * """ * Return information on the number and type of input arguments */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Get_envelope", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":471 * property envelope: * """datatype envelope""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_envelope() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_8envelope_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_8envelope_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_8envelope___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8envelope___get__(struct PyMPIDatatypeObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":472 * """datatype envelope""" * def __get__(self): * return self.Get_envelope() # <<<<<<<<<<<<<< * * def Get_contents(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_envelope); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":471 * property envelope: * """datatype envelope""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_envelope() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Datatype.envelope.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":474 * return self.Get_envelope() * * def Get_contents(self): # <<<<<<<<<<<<<< * """ * Retrieve the actual arguments used in the call that created a */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_53Get_contents(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_52Get_contents[] = "Datatype.Get_contents(self)\n\n Retrieve the actual arguments used in the call that created a\n datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_53Get_contents(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_contents (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_contents", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_contents", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_52Get_contents(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_52Get_contents(struct PyMPIDatatypeObject *__pyx_v_self) { int __pyx_v_ni; int __pyx_v_na; int __pyx_v_nd; int __pyx_v_combiner; int *__pyx_v_i; MPI_Aint *__pyx_v_a; MPI_Datatype *__pyx_v_d; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp3 = 0; int __pyx_v_k; PyObject *__pyx_v_integers = 0; PyObject *__pyx_v_addresses = 0; PyObject *__pyx_v_datatypes = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Get_contents", 0); /* "mpi4py/MPI/Datatype.pyx":479 * datatype * """ * cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) * cdef int *i = NULL */ __pyx_v_ni = 0; __pyx_v_na = 0; __pyx_v_nd = 0; __pyx_v_combiner = MPI_UNDEFINED; /* "mpi4py/MPI/Datatype.pyx":480 * """ * cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) # <<<<<<<<<<<<<< * cdef int *i = NULL * cdef MPI_Aint *a = NULL */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_envelope(__pyx_v_self->ob_mpi, (&__pyx_v_ni), (&__pyx_v_na), (&__pyx_v_nd), (&__pyx_v_combiner))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 480, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":481 * cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) * cdef int *i = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint *a = NULL * cdef MPI_Datatype *d = NULL */ __pyx_v_i = NULL; /* "mpi4py/MPI/Datatype.pyx":482 * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) * cdef int *i = NULL * cdef MPI_Aint *a = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype *d = NULL * cdef tmp1 = allocate(ni, sizeof(int), &i) */ __pyx_v_a = NULL; /* "mpi4py/MPI/Datatype.pyx":483 * cdef int *i = NULL * cdef MPI_Aint *a = NULL * cdef MPI_Datatype *d = NULL # <<<<<<<<<<<<<< * cdef tmp1 = allocate(ni, sizeof(int), &i) * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) */ __pyx_v_d = NULL; /* "mpi4py/MPI/Datatype.pyx":484 * cdef MPI_Aint *a = NULL * cdef MPI_Datatype *d = NULL * cdef tmp1 = allocate(ni, sizeof(int), &i) # <<<<<<<<<<<<<< * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) * cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_ni, (sizeof(int)), (&__pyx_v_i))); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":485 * cdef MPI_Datatype *d = NULL * cdef tmp1 = allocate(ni, sizeof(int), &i) * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) # <<<<<<<<<<<<<< * cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) * CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_na, (sizeof(MPI_Aint)), (&__pyx_v_a))); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp2 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":486 * cdef tmp1 = allocate(ni, sizeof(int), &i) * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) * cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) * cdef int k = 0 */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_nd, (sizeof(MPI_Datatype)), (&__pyx_v_d))); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp3 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":487 * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) * cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) * CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) # <<<<<<<<<<<<<< * cdef int k = 0 * cdef object integers = [i[k] for k from 0 <= k < ni] */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_contents(__pyx_v_self->ob_mpi, __pyx_v_ni, __pyx_v_na, __pyx_v_nd, __pyx_v_i, __pyx_v_a, __pyx_v_d)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 487, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":488 * cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) * CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) * cdef int k = 0 # <<<<<<<<<<<<<< * cdef object integers = [i[k] for k from 0 <= k < ni] * cdef object addresses = [a[k] for k from 0 <= k < na] */ __pyx_v_k = 0; /* "mpi4py/MPI/Datatype.pyx":489 * CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) * cdef int k = 0 * cdef object integers = [i[k] for k from 0 <= k < ni] # <<<<<<<<<<<<<< * cdef object addresses = [a[k] for k from 0 <= k < na] * cdef object datatypes = [ref_Datatype(d[k]) for k from 0 <= k < nd] */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_ni; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_1; __pyx_v_k++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(21, 489, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_integers = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":490 * cdef int k = 0 * cdef object integers = [i[k] for k from 0 <= k < ni] * cdef object addresses = [a[k] for k from 0 <= k < na] # <<<<<<<<<<<<<< * cdef object datatypes = [ref_Datatype(d[k]) for k from 0 <= k < nd] * return (integers, addresses, datatypes) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_na; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_1; __pyx_v_k++) { __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_a[__pyx_v_k])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(21, 490, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_addresses = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":491 * cdef object integers = [i[k] for k from 0 <= k < ni] * cdef object addresses = [a[k] for k from 0 <= k < na] * cdef object datatypes = [ref_Datatype(d[k]) for k from 0 <= k < nd] # <<<<<<<<<<<<<< * return (integers, addresses, datatypes) * */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_nd; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_1; __pyx_v_k++) { __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_ref_Datatype((__pyx_v_d[__pyx_v_k]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(21, 491, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_datatypes = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":492 * cdef object addresses = [a[k] for k from 0 <= k < na] * cdef object datatypes = [ref_Datatype(d[k]) for k from 0 <= k < nd] * return (integers, addresses, datatypes) # <<<<<<<<<<<<<< * * property contents: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_integers); __Pyx_GIVEREF(__pyx_v_integers); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_integers); __Pyx_INCREF(__pyx_v_addresses); __Pyx_GIVEREF(__pyx_v_addresses); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_addresses); __Pyx_INCREF(__pyx_v_datatypes); __Pyx_GIVEREF(__pyx_v_datatypes); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_datatypes); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":474 * return self.Get_envelope() * * def Get_contents(self): # <<<<<<<<<<<<<< * """ * Retrieve the actual arguments used in the call that created a */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Get_contents", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_tmp3); __Pyx_XDECREF(__pyx_v_integers); __Pyx_XDECREF(__pyx_v_addresses); __Pyx_XDECREF(__pyx_v_datatypes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":496 * property contents: * """datatype contents""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_contents() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_8contents_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_8contents_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_8contents___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8contents___get__(struct PyMPIDatatypeObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":497 * """datatype contents""" * def __get__(self): * return self.Get_contents() # <<<<<<<<<<<<<< * * def decode(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_contents); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":496 * property contents: * """datatype contents""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_contents() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Datatype.contents.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":499 * return self.Get_contents() * * def decode(self): # <<<<<<<<<<<<<< * """ * Convenience method for decoding a datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_55decode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_54decode[] = "Datatype.decode(self)\n\n Convenience method for decoding a datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_55decode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("decode (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("decode", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "decode", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_54decode(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_54decode(struct PyMPIDatatypeObject *__pyx_v_self) { int __pyx_v_ni; int __pyx_v_na; int __pyx_v_nd; int __pyx_v_combiner; int *__pyx_v_i; MPI_Aint *__pyx_v_a; MPI_Datatype *__pyx_v_d; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp3 = 0; int __pyx_v_k; int __pyx_v_s1; int __pyx_v_e1; int __pyx_v_s2; int __pyx_v_e2; int __pyx_v_s3; int __pyx_v_e3; int __pyx_v_s4; int __pyx_v_e4; PyObject *__pyx_v_oldtype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("decode", 0); /* "mpi4py/MPI/Datatype.pyx":504 * """ * # get the datatype envelope * cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) * # return self immediately for named datatypes */ __pyx_v_ni = 0; __pyx_v_na = 0; __pyx_v_nd = 0; __pyx_v_combiner = MPI_UNDEFINED; /* "mpi4py/MPI/Datatype.pyx":505 * # get the datatype envelope * cdef int ni = 0, na = 0, nd = 0, combiner = MPI_UNDEFINED * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) # <<<<<<<<<<<<<< * # return self immediately for named datatypes * if combiner == MPI_COMBINER_NAMED: return self */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_envelope(__pyx_v_self->ob_mpi, (&__pyx_v_ni), (&__pyx_v_na), (&__pyx_v_nd), (&__pyx_v_combiner))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 505, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":507 * CHKERR( MPI_Type_get_envelope(self.ob_mpi, &ni, &na, &nd, &combiner) ) * # return self immediately for named datatypes * if combiner == MPI_COMBINER_NAMED: return self # <<<<<<<<<<<<<< * # get the datatype contents * cdef int *i = NULL */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_NAMED) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":509 * if combiner == MPI_COMBINER_NAMED: return self * # get the datatype contents * cdef int *i = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint *a = NULL * cdef MPI_Datatype *d = NULL */ __pyx_v_i = NULL; /* "mpi4py/MPI/Datatype.pyx":510 * # get the datatype contents * cdef int *i = NULL * cdef MPI_Aint *a = NULL # <<<<<<<<<<<<<< * cdef MPI_Datatype *d = NULL * cdef tmp1 = allocate(ni, sizeof(int), &i) */ __pyx_v_a = NULL; /* "mpi4py/MPI/Datatype.pyx":511 * cdef int *i = NULL * cdef MPI_Aint *a = NULL * cdef MPI_Datatype *d = NULL # <<<<<<<<<<<<<< * cdef tmp1 = allocate(ni, sizeof(int), &i) * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) */ __pyx_v_d = NULL; /* "mpi4py/MPI/Datatype.pyx":512 * cdef MPI_Aint *a = NULL * cdef MPI_Datatype *d = NULL * cdef tmp1 = allocate(ni, sizeof(int), &i) # <<<<<<<<<<<<<< * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) * cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_ni, (sizeof(int)), (&__pyx_v_i))); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":513 * cdef MPI_Datatype *d = NULL * cdef tmp1 = allocate(ni, sizeof(int), &i) * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) # <<<<<<<<<<<<<< * cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) * CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_na, (sizeof(MPI_Aint)), (&__pyx_v_a))); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp2 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":514 * cdef tmp1 = allocate(ni, sizeof(int), &i) * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) * cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) * # manage in advance the contained datatypes */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_nd, (sizeof(MPI_Datatype)), (&__pyx_v_d))); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp3 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":515 * cdef tmp2 = allocate(na, sizeof(MPI_Aint), &a) * cdef tmp3 = allocate(nd, sizeof(MPI_Datatype), &d) * CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) # <<<<<<<<<<<<<< * # manage in advance the contained datatypes * cdef int k = 0, s1, e1, s2, e2, s3, e3, s4, e4 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_contents(__pyx_v_self->ob_mpi, __pyx_v_ni, __pyx_v_na, __pyx_v_nd, __pyx_v_i, __pyx_v_a, __pyx_v_d)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 515, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":517 * CHKERR( MPI_Type_get_contents(self.ob_mpi, ni, na, nd, i, a, d) ) * # manage in advance the contained datatypes * cdef int k = 0, s1, e1, s2, e2, s3, e3, s4, e4 # <<<<<<<<<<<<<< * cdef object oldtype = None * if combiner == MPI_COMBINER_STRUCT: */ __pyx_v_k = 0; /* "mpi4py/MPI/Datatype.pyx":518 * # manage in advance the contained datatypes * cdef int k = 0, s1, e1, s2, e2, s3, e3, s4, e4 * cdef object oldtype = None # <<<<<<<<<<<<<< * if combiner == MPI_COMBINER_STRUCT: * oldtype = [ref_Datatype(d[k]) for k from 0 <= k < nd] */ __Pyx_INCREF(Py_None); __pyx_v_oldtype = Py_None; /* "mpi4py/MPI/Datatype.pyx":519 * cdef int k = 0, s1, e1, s2, e2, s3, e3, s4, e4 * cdef object oldtype = None * if combiner == MPI_COMBINER_STRUCT: # <<<<<<<<<<<<<< * oldtype = [ref_Datatype(d[k]) for k from 0 <= k < nd] * elif (combiner != MPI_COMBINER_F90_INTEGER and */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_STRUCT) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":520 * cdef object oldtype = None * if combiner == MPI_COMBINER_STRUCT: * oldtype = [ref_Datatype(d[k]) for k from 0 <= k < nd] # <<<<<<<<<<<<<< * elif (combiner != MPI_COMBINER_F90_INTEGER and * combiner != MPI_COMBINER_F90_REAL and */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_v_nd; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_1; __pyx_v_k++) { __pyx_t_4 = ((PyObject *)__pyx_f_6mpi4py_3MPI_ref_Datatype((__pyx_v_d[__pyx_v_k]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(21, 520, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF_SET(__pyx_v_oldtype, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":519 * cdef int k = 0, s1, e1, s2, e2, s3, e3, s4, e4 * cdef object oldtype = None * if combiner == MPI_COMBINER_STRUCT: # <<<<<<<<<<<<<< * oldtype = [ref_Datatype(d[k]) for k from 0 <= k < nd] * elif (combiner != MPI_COMBINER_F90_INTEGER and */ goto __pyx_L4; } /* "mpi4py/MPI/Datatype.pyx":521 * if combiner == MPI_COMBINER_STRUCT: * oldtype = [ref_Datatype(d[k]) for k from 0 <= k < nd] * elif (combiner != MPI_COMBINER_F90_INTEGER and # <<<<<<<<<<<<<< * combiner != MPI_COMBINER_F90_REAL and * combiner != MPI_COMBINER_F90_COMPLEX): */ __pyx_t_5 = ((__pyx_v_combiner != MPI_COMBINER_F90_INTEGER) != 0); if (__pyx_t_5) { } else { __pyx_t_2 = __pyx_t_5; goto __pyx_L7_bool_binop_done; } /* "mpi4py/MPI/Datatype.pyx":522 * oldtype = [ref_Datatype(d[k]) for k from 0 <= k < nd] * elif (combiner != MPI_COMBINER_F90_INTEGER and * combiner != MPI_COMBINER_F90_REAL and # <<<<<<<<<<<<<< * combiner != MPI_COMBINER_F90_COMPLEX): * oldtype = ref_Datatype(d[0]) */ __pyx_t_5 = ((__pyx_v_combiner != MPI_COMBINER_F90_REAL) != 0); if (__pyx_t_5) { } else { __pyx_t_2 = __pyx_t_5; goto __pyx_L7_bool_binop_done; } /* "mpi4py/MPI/Datatype.pyx":523 * elif (combiner != MPI_COMBINER_F90_INTEGER and * combiner != MPI_COMBINER_F90_REAL and * combiner != MPI_COMBINER_F90_COMPLEX): # <<<<<<<<<<<<<< * oldtype = ref_Datatype(d[0]) * # dispatch depending on the combiner value */ __pyx_t_5 = ((__pyx_v_combiner != MPI_COMBINER_F90_COMPLEX) != 0); __pyx_t_2 = __pyx_t_5; __pyx_L7_bool_binop_done:; /* "mpi4py/MPI/Datatype.pyx":521 * if combiner == MPI_COMBINER_STRUCT: * oldtype = [ref_Datatype(d[k]) for k from 0 <= k < nd] * elif (combiner != MPI_COMBINER_F90_INTEGER and # <<<<<<<<<<<<<< * combiner != MPI_COMBINER_F90_REAL and * combiner != MPI_COMBINER_F90_COMPLEX): */ if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":524 * combiner != MPI_COMBINER_F90_REAL and * combiner != MPI_COMBINER_F90_COMPLEX): * oldtype = ref_Datatype(d[0]) # <<<<<<<<<<<<<< * # dispatch depending on the combiner value * if combiner == MPI_COMBINER_DUP: */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_ref_Datatype((__pyx_v_d[0]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_oldtype, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":521 * if combiner == MPI_COMBINER_STRUCT: * oldtype = [ref_Datatype(d[k]) for k from 0 <= k < nd] * elif (combiner != MPI_COMBINER_F90_INTEGER and # <<<<<<<<<<<<<< * combiner != MPI_COMBINER_F90_REAL and * combiner != MPI_COMBINER_F90_COMPLEX): */ } __pyx_L4:; /* "mpi4py/MPI/Datatype.pyx":526 * oldtype = ref_Datatype(d[0]) * # dispatch depending on the combiner value * if combiner == MPI_COMBINER_DUP: # <<<<<<<<<<<<<< * return (oldtype, ('DUP'), {}) * elif combiner == MPI_COMBINER_CONTIGUOUS: */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_DUP) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":527 * # dispatch depending on the combiner value * if combiner == MPI_COMBINER_DUP: * return (oldtype, ('DUP'), {}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_CONTIGUOUS: * return (oldtype, ('CONTIGUOUS'), */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_DUP); __Pyx_GIVEREF(__pyx_n_s_DUP); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_DUP); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":526 * oldtype = ref_Datatype(d[0]) * # dispatch depending on the combiner value * if combiner == MPI_COMBINER_DUP: # <<<<<<<<<<<<<< * return (oldtype, ('DUP'), {}) * elif combiner == MPI_COMBINER_CONTIGUOUS: */ } /* "mpi4py/MPI/Datatype.pyx":528 * if combiner == MPI_COMBINER_DUP: * return (oldtype, ('DUP'), {}) * elif combiner == MPI_COMBINER_CONTIGUOUS: # <<<<<<<<<<<<<< * return (oldtype, ('CONTIGUOUS'), * {('count') : i[0]}) */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_CONTIGUOUS) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":529 * return (oldtype, ('DUP'), {}) * elif combiner == MPI_COMBINER_CONTIGUOUS: * return (oldtype, ('CONTIGUOUS'), # <<<<<<<<<<<<<< * {('count') : i[0]}) * elif combiner == MPI_COMBINER_VECTOR: */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":530 * elif combiner == MPI_COMBINER_CONTIGUOUS: * return (oldtype, ('CONTIGUOUS'), * {('count') : i[0]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_VECTOR: * return (oldtype, ('VECTOR'), */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_i[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_count, __pyx_t_3) < 0) __PYX_ERR(21, 530, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":529 * return (oldtype, ('DUP'), {}) * elif combiner == MPI_COMBINER_CONTIGUOUS: * return (oldtype, ('CONTIGUOUS'), # <<<<<<<<<<<<<< * {('count') : i[0]}) * elif combiner == MPI_COMBINER_VECTOR: */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_CONTIGUOUS); __Pyx_GIVEREF(__pyx_n_s_CONTIGUOUS); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_CONTIGUOUS); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":528 * if combiner == MPI_COMBINER_DUP: * return (oldtype, ('DUP'), {}) * elif combiner == MPI_COMBINER_CONTIGUOUS: # <<<<<<<<<<<<<< * return (oldtype, ('CONTIGUOUS'), * {('count') : i[0]}) */ } /* "mpi4py/MPI/Datatype.pyx":531 * return (oldtype, ('CONTIGUOUS'), * {('count') : i[0]}) * elif combiner == MPI_COMBINER_VECTOR: # <<<<<<<<<<<<<< * return (oldtype, ('VECTOR'), * {('count') : i[0], */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_VECTOR) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":532 * {('count') : i[0]}) * elif combiner == MPI_COMBINER_VECTOR: * return (oldtype, ('VECTOR'), # <<<<<<<<<<<<<< * {('count') : i[0], * ('blocklength') : i[1], */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":533 * elif combiner == MPI_COMBINER_VECTOR: * return (oldtype, ('VECTOR'), * {('count') : i[0], # <<<<<<<<<<<<<< * ('blocklength') : i[1], * ('stride') : i[2]}) */ __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_count, __pyx_t_4) < 0) __PYX_ERR(21, 533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":534 * return (oldtype, ('VECTOR'), * {('count') : i[0], * ('blocklength') : i[1], # <<<<<<<<<<<<<< * ('stride') : i[2]}) * elif combiner == MPI_COMBINER_HVECTOR: */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_blocklength, __pyx_t_4) < 0) __PYX_ERR(21, 533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":535 * {('count') : i[0], * ('blocklength') : i[1], * ('stride') : i[2]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_HVECTOR: * return (oldtype, ('HVECTOR'), */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[2])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_stride, __pyx_t_4) < 0) __PYX_ERR(21, 533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":532 * {('count') : i[0]}) * elif combiner == MPI_COMBINER_VECTOR: * return (oldtype, ('VECTOR'), # <<<<<<<<<<<<<< * {('count') : i[0], * ('blocklength') : i[1], */ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_VECTOR); __Pyx_GIVEREF(__pyx_n_s_VECTOR); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_VECTOR); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":531 * return (oldtype, ('CONTIGUOUS'), * {('count') : i[0]}) * elif combiner == MPI_COMBINER_VECTOR: # <<<<<<<<<<<<<< * return (oldtype, ('VECTOR'), * {('count') : i[0], */ } /* "mpi4py/MPI/Datatype.pyx":536 * ('blocklength') : i[1], * ('stride') : i[2]}) * elif combiner == MPI_COMBINER_HVECTOR: # <<<<<<<<<<<<<< * return (oldtype, ('HVECTOR'), * {('count') : i[0], */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_HVECTOR) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":537 * ('stride') : i[2]}) * elif combiner == MPI_COMBINER_HVECTOR: * return (oldtype, ('HVECTOR'), # <<<<<<<<<<<<<< * {('count') : i[0], * ('blocklength') : i[1], */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":538 * elif combiner == MPI_COMBINER_HVECTOR: * return (oldtype, ('HVECTOR'), * {('count') : i[0], # <<<<<<<<<<<<<< * ('blocklength') : i[1], * ('stride') : a[0]}) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_i[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_count, __pyx_t_3) < 0) __PYX_ERR(21, 538, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":539 * return (oldtype, ('HVECTOR'), * {('count') : i[0], * ('blocklength') : i[1], # <<<<<<<<<<<<<< * ('stride') : a[0]}) * elif combiner == MPI_COMBINER_INDEXED: */ __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_i[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_blocklength, __pyx_t_3) < 0) __PYX_ERR(21, 538, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":540 * {('count') : i[0], * ('blocklength') : i[1], * ('stride') : a[0]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_INDEXED: * s1 = 1; e1 = i[0] */ __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_a[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_stride, __pyx_t_3) < 0) __PYX_ERR(21, 538, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":537 * ('stride') : i[2]}) * elif combiner == MPI_COMBINER_HVECTOR: * return (oldtype, ('HVECTOR'), # <<<<<<<<<<<<<< * {('count') : i[0], * ('blocklength') : i[1], */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_HVECTOR); __Pyx_GIVEREF(__pyx_n_s_HVECTOR); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_HVECTOR); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":536 * ('blocklength') : i[1], * ('stride') : i[2]}) * elif combiner == MPI_COMBINER_HVECTOR: # <<<<<<<<<<<<<< * return (oldtype, ('HVECTOR'), * {('count') : i[0], */ } /* "mpi4py/MPI/Datatype.pyx":541 * ('blocklength') : i[1], * ('stride') : a[0]}) * elif combiner == MPI_COMBINER_INDEXED: # <<<<<<<<<<<<<< * s1 = 1; e1 = i[0] * s2 = i[0]+1; e2 = 2*i[0] */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_INDEXED) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":542 * ('stride') : a[0]}) * elif combiner == MPI_COMBINER_INDEXED: * s1 = 1; e1 = i[0] # <<<<<<<<<<<<<< * s2 = i[0]+1; e2 = 2*i[0] * return (oldtype, ('INDEXED'), */ __pyx_v_s1 = 1; __pyx_v_e1 = (__pyx_v_i[0]); /* "mpi4py/MPI/Datatype.pyx":543 * elif combiner == MPI_COMBINER_INDEXED: * s1 = 1; e1 = i[0] * s2 = i[0]+1; e2 = 2*i[0] # <<<<<<<<<<<<<< * return (oldtype, ('INDEXED'), * {('blocklengths') : [i[k] for k from s1 <= k <= e1], */ __pyx_v_s2 = ((__pyx_v_i[0]) + 1); __pyx_v_e2 = (2 * (__pyx_v_i[0])); /* "mpi4py/MPI/Datatype.pyx":544 * s1 = 1; e1 = i[0] * s2 = i[0]+1; e2 = 2*i[0] * return (oldtype, ('INDEXED'), # <<<<<<<<<<<<<< * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":545 * s2 = i[0]+1; e2 = 2*i[0] * return (oldtype, ('INDEXED'), * {('blocklengths') : [i[k] for k from s1 <= k <= e1], # <<<<<<<<<<<<<< * ('displacements') : [i[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_HINDEXED: */ __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_v_e1; for (__pyx_v_k = __pyx_v_s1; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_blocklengths, __pyx_t_4) < 0) __PYX_ERR(21, 545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":546 * return (oldtype, ('INDEXED'), * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_HINDEXED: * s1 = 1; e1 = i[0] */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_v_e2; for (__pyx_v_k = __pyx_v_s2; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 546, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_displacements, __pyx_t_4) < 0) __PYX_ERR(21, 545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":544 * s1 = 1; e1 = i[0] * s2 = i[0]+1; e2 = 2*i[0] * return (oldtype, ('INDEXED'), # <<<<<<<<<<<<<< * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) */ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_INDEXED); __Pyx_GIVEREF(__pyx_n_s_INDEXED); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_INDEXED); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":541 * ('blocklength') : i[1], * ('stride') : a[0]}) * elif combiner == MPI_COMBINER_INDEXED: # <<<<<<<<<<<<<< * s1 = 1; e1 = i[0] * s2 = i[0]+1; e2 = 2*i[0] */ } /* "mpi4py/MPI/Datatype.pyx":547 * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_HINDEXED: # <<<<<<<<<<<<<< * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_HINDEXED) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":548 * ('displacements') : [i[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_HINDEXED: * s1 = 1; e1 = i[0] # <<<<<<<<<<<<<< * s2 = 0; e2 = i[0]-1 * return (oldtype, ('HINDEXED'), */ __pyx_v_s1 = 1; __pyx_v_e1 = (__pyx_v_i[0]); /* "mpi4py/MPI/Datatype.pyx":549 * elif combiner == MPI_COMBINER_HINDEXED: * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 # <<<<<<<<<<<<<< * return (oldtype, ('HINDEXED'), * {('blocklengths') : [i[k] for k from s1 <= k <= e1], */ __pyx_v_s2 = 0; __pyx_v_e2 = ((__pyx_v_i[0]) - 1); /* "mpi4py/MPI/Datatype.pyx":550 * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 * return (oldtype, ('HINDEXED'), # <<<<<<<<<<<<<< * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":551 * s2 = 0; e2 = i[0]-1 * return (oldtype, ('HINDEXED'), * {('blocklengths') : [i[k] for k from s1 <= k <= e1], # <<<<<<<<<<<<<< * ('displacements') : [a[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_INDEXED_BLOCK: */ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_v_e1; for (__pyx_v_k = __pyx_v_s1; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_blocklengths, __pyx_t_3) < 0) __PYX_ERR(21, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":552 * return (oldtype, ('HINDEXED'), * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_INDEXED_BLOCK: * s2 = 2; e2 = i[0]+1 */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_v_e2; for (__pyx_v_k = __pyx_v_s2; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_a[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_displacements, __pyx_t_3) < 0) __PYX_ERR(21, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":550 * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 * return (oldtype, ('HINDEXED'), # <<<<<<<<<<<<<< * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_HINDEXED); __Pyx_GIVEREF(__pyx_n_s_HINDEXED); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_HINDEXED); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":547 * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_HINDEXED: # <<<<<<<<<<<<<< * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 */ } /* "mpi4py/MPI/Datatype.pyx":553 * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_INDEXED_BLOCK: # <<<<<<<<<<<<<< * s2 = 2; e2 = i[0]+1 * return (oldtype, ('INDEXED_BLOCK'), */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_INDEXED_BLOCK) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":554 * ('displacements') : [a[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_INDEXED_BLOCK: * s2 = 2; e2 = i[0]+1 # <<<<<<<<<<<<<< * return (oldtype, ('INDEXED_BLOCK'), * {('blocklength') : i[1], */ __pyx_v_s2 = 2; __pyx_v_e2 = ((__pyx_v_i[0]) + 1); /* "mpi4py/MPI/Datatype.pyx":555 * elif combiner == MPI_COMBINER_INDEXED_BLOCK: * s2 = 2; e2 = i[0]+1 * return (oldtype, ('INDEXED_BLOCK'), # <<<<<<<<<<<<<< * {('blocklength') : i[1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":556 * s2 = 2; e2 = i[0]+1 * return (oldtype, ('INDEXED_BLOCK'), * {('blocklength') : i[1], # <<<<<<<<<<<<<< * ('displacements') : [i[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_HINDEXED_BLOCK: */ __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_blocklength, __pyx_t_4) < 0) __PYX_ERR(21, 556, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":557 * return (oldtype, ('INDEXED_BLOCK'), * {('blocklength') : i[1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_HINDEXED_BLOCK: * s2 = 0; e2 = i[0]-1 */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_v_e2; for (__pyx_v_k = __pyx_v_s2; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_displacements, __pyx_t_4) < 0) __PYX_ERR(21, 556, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":555 * elif combiner == MPI_COMBINER_INDEXED_BLOCK: * s2 = 2; e2 = i[0]+1 * return (oldtype, ('INDEXED_BLOCK'), # <<<<<<<<<<<<<< * {('blocklength') : i[1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) */ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_INDEXED_BLOCK); __Pyx_GIVEREF(__pyx_n_s_INDEXED_BLOCK); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_INDEXED_BLOCK); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":553 * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_INDEXED_BLOCK: # <<<<<<<<<<<<<< * s2 = 2; e2 = i[0]+1 * return (oldtype, ('INDEXED_BLOCK'), */ } /* "mpi4py/MPI/Datatype.pyx":558 * {('blocklength') : i[1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_HINDEXED_BLOCK: # <<<<<<<<<<<<<< * s2 = 0; e2 = i[0]-1 * return (oldtype, ('HINDEXED_BLOCK'), */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_HINDEXED_BLOCK) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":559 * ('displacements') : [i[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_HINDEXED_BLOCK: * s2 = 0; e2 = i[0]-1 # <<<<<<<<<<<<<< * return (oldtype, ('HINDEXED_BLOCK'), * {('blocklength') : i[1], */ __pyx_v_s2 = 0; __pyx_v_e2 = ((__pyx_v_i[0]) - 1); /* "mpi4py/MPI/Datatype.pyx":560 * elif combiner == MPI_COMBINER_HINDEXED_BLOCK: * s2 = 0; e2 = i[0]-1 * return (oldtype, ('HINDEXED_BLOCK'), # <<<<<<<<<<<<<< * {('blocklength') : i[1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":561 * s2 = 0; e2 = i[0]-1 * return (oldtype, ('HINDEXED_BLOCK'), * {('blocklength') : i[1], # <<<<<<<<<<<<<< * ('displacements') : [a[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_STRUCT: */ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_i[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_blocklength, __pyx_t_3) < 0) __PYX_ERR(21, 561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":562 * return (oldtype, ('HINDEXED_BLOCK'), * {('blocklength') : i[1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_STRUCT: * s1 = 1; e1 = i[0] */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_v_e2; for (__pyx_v_k = __pyx_v_s2; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_a[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_displacements, __pyx_t_3) < 0) __PYX_ERR(21, 561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":560 * elif combiner == MPI_COMBINER_HINDEXED_BLOCK: * s2 = 0; e2 = i[0]-1 * return (oldtype, ('HINDEXED_BLOCK'), # <<<<<<<<<<<<<< * {('blocklength') : i[1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_HINDEXED_BLOCK); __Pyx_GIVEREF(__pyx_n_s_HINDEXED_BLOCK); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_HINDEXED_BLOCK); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":558 * {('blocklength') : i[1], * ('displacements') : [i[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_HINDEXED_BLOCK: # <<<<<<<<<<<<<< * s2 = 0; e2 = i[0]-1 * return (oldtype, ('HINDEXED_BLOCK'), */ } /* "mpi4py/MPI/Datatype.pyx":563 * {('blocklength') : i[1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_STRUCT: # <<<<<<<<<<<<<< * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_STRUCT) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":564 * ('displacements') : [a[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_STRUCT: * s1 = 1; e1 = i[0] # <<<<<<<<<<<<<< * s2 = 0; e2 = i[0]-1 * return (Datatype, ('STRUCT'), */ __pyx_v_s1 = 1; __pyx_v_e1 = (__pyx_v_i[0]); /* "mpi4py/MPI/Datatype.pyx":565 * elif combiner == MPI_COMBINER_STRUCT: * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 # <<<<<<<<<<<<<< * return (Datatype, ('STRUCT'), * {('blocklengths') : [i[k] for k from s1 <= k <= e1], */ __pyx_v_s2 = 0; __pyx_v_e2 = ((__pyx_v_i[0]) - 1); /* "mpi4py/MPI/Datatype.pyx":566 * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 * return (Datatype, ('STRUCT'), # <<<<<<<<<<<<<< * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [a[k] for k from s2 <= k <= e2], */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":567 * s2 = 0; e2 = i[0]-1 * return (Datatype, ('STRUCT'), * {('blocklengths') : [i[k] for k from s1 <= k <= e1], # <<<<<<<<<<<<<< * ('displacements') : [a[k] for k from s2 <= k <= e2], * ('datatypes') : oldtype}) */ __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_v_e1; for (__pyx_v_k = __pyx_v_s1; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_blocklengths, __pyx_t_4) < 0) __PYX_ERR(21, 567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":568 * return (Datatype, ('STRUCT'), * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [a[k] for k from s2 <= k <= e2], # <<<<<<<<<<<<<< * ('datatypes') : oldtype}) * elif combiner == MPI_COMBINER_SUBARRAY: */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_v_e2; for (__pyx_v_k = __pyx_v_s2; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_a[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_displacements, __pyx_t_4) < 0) __PYX_ERR(21, 567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":569 * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [a[k] for k from s2 <= k <= e2], * ('datatypes') : oldtype}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_SUBARRAY: * s1 = 1; e1 = i[0] */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_datatypes, __pyx_v_oldtype) < 0) __PYX_ERR(21, 567, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":566 * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 * return (Datatype, ('STRUCT'), # <<<<<<<<<<<<<< * {('blocklengths') : [i[k] for k from s1 <= k <= e1], * ('displacements') : [a[k] for k from s2 <= k <= e2], */ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); __Pyx_INCREF(__pyx_n_s_STRUCT); __Pyx_GIVEREF(__pyx_n_s_STRUCT); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_STRUCT); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":563 * {('blocklength') : i[1], * ('displacements') : [a[k] for k from s2 <= k <= e2]}) * elif combiner == MPI_COMBINER_STRUCT: # <<<<<<<<<<<<<< * s1 = 1; e1 = i[0] * s2 = 0; e2 = i[0]-1 */ } /* "mpi4py/MPI/Datatype.pyx":570 * ('displacements') : [a[k] for k from s2 <= k <= e2], * ('datatypes') : oldtype}) * elif combiner == MPI_COMBINER_SUBARRAY: # <<<<<<<<<<<<<< * s1 = 1; e1 = i[0] * s2 = i[0]+1; e2 = 2*i[0] */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_SUBARRAY) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":571 * ('datatypes') : oldtype}) * elif combiner == MPI_COMBINER_SUBARRAY: * s1 = 1; e1 = i[0] # <<<<<<<<<<<<<< * s2 = i[0]+1; e2 = 2*i[0] * s3 = 2*i[0]+1; e3 = 3*i[0] */ __pyx_v_s1 = 1; __pyx_v_e1 = (__pyx_v_i[0]); /* "mpi4py/MPI/Datatype.pyx":572 * elif combiner == MPI_COMBINER_SUBARRAY: * s1 = 1; e1 = i[0] * s2 = i[0]+1; e2 = 2*i[0] # <<<<<<<<<<<<<< * s3 = 2*i[0]+1; e3 = 3*i[0] * return (oldtype, ('SUBARRAY'), */ __pyx_v_s2 = ((__pyx_v_i[0]) + 1); __pyx_v_e2 = (2 * (__pyx_v_i[0])); /* "mpi4py/MPI/Datatype.pyx":573 * s1 = 1; e1 = i[0] * s2 = i[0]+1; e2 = 2*i[0] * s3 = 2*i[0]+1; e3 = 3*i[0] # <<<<<<<<<<<<<< * return (oldtype, ('SUBARRAY'), * {('sizes') : [i[k] for k from s1 <= k <= e1], */ __pyx_v_s3 = ((2 * (__pyx_v_i[0])) + 1); __pyx_v_e3 = (3 * (__pyx_v_i[0])); /* "mpi4py/MPI/Datatype.pyx":574 * s2 = i[0]+1; e2 = 2*i[0] * s3 = 2*i[0]+1; e3 = 3*i[0] * return (oldtype, ('SUBARRAY'), # <<<<<<<<<<<<<< * {('sizes') : [i[k] for k from s1 <= k <= e1], * ('subsizes') : [i[k] for k from s2 <= k <= e2], */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":575 * s3 = 2*i[0]+1; e3 = 3*i[0] * return (oldtype, ('SUBARRAY'), * {('sizes') : [i[k] for k from s1 <= k <= e1], # <<<<<<<<<<<<<< * ('subsizes') : [i[k] for k from s2 <= k <= e2], * ('starts') : [i[k] for k from s3 <= k <= e3], */ __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_v_e1; for (__pyx_v_k = __pyx_v_s1; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_sizes, __pyx_t_3) < 0) __PYX_ERR(21, 575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":576 * return (oldtype, ('SUBARRAY'), * {('sizes') : [i[k] for k from s1 <= k <= e1], * ('subsizes') : [i[k] for k from s2 <= k <= e2], # <<<<<<<<<<<<<< * ('starts') : [i[k] for k from s3 <= k <= e3], * ('order') : i[3*i[0]+1]}) */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_v_e2; for (__pyx_v_k = __pyx_v_s2; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_subsizes, __pyx_t_3) < 0) __PYX_ERR(21, 575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":577 * {('sizes') : [i[k] for k from s1 <= k <= e1], * ('subsizes') : [i[k] for k from s2 <= k <= e2], * ('starts') : [i[k] for k from s3 <= k <= e3], # <<<<<<<<<<<<<< * ('order') : i[3*i[0]+1]}) * elif combiner == MPI_COMBINER_DARRAY: */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_v_e3; for (__pyx_v_k = __pyx_v_s3; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_starts, __pyx_t_3) < 0) __PYX_ERR(21, 575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":578 * ('subsizes') : [i[k] for k from s2 <= k <= e2], * ('starts') : [i[k] for k from s3 <= k <= e3], * ('order') : i[3*i[0]+1]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_DARRAY: * s1 = 3; e1 = i[2]+2 */ __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_i[((3 * (__pyx_v_i[0])) + 1)])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_t_3) < 0) __PYX_ERR(21, 575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":574 * s2 = i[0]+1; e2 = 2*i[0] * s3 = 2*i[0]+1; e3 = 3*i[0] * return (oldtype, ('SUBARRAY'), # <<<<<<<<<<<<<< * {('sizes') : [i[k] for k from s1 <= k <= e1], * ('subsizes') : [i[k] for k from s2 <= k <= e2], */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_SUBARRAY); __Pyx_GIVEREF(__pyx_n_s_SUBARRAY); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_SUBARRAY); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":570 * ('displacements') : [a[k] for k from s2 <= k <= e2], * ('datatypes') : oldtype}) * elif combiner == MPI_COMBINER_SUBARRAY: # <<<<<<<<<<<<<< * s1 = 1; e1 = i[0] * s2 = i[0]+1; e2 = 2*i[0] */ } /* "mpi4py/MPI/Datatype.pyx":579 * ('starts') : [i[k] for k from s3 <= k <= e3], * ('order') : i[3*i[0]+1]}) * elif combiner == MPI_COMBINER_DARRAY: # <<<<<<<<<<<<<< * s1 = 3; e1 = i[2]+2 * s2 = i[2]+3; e2 = 2*i[2]+2 */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_DARRAY) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":580 * ('order') : i[3*i[0]+1]}) * elif combiner == MPI_COMBINER_DARRAY: * s1 = 3; e1 = i[2]+2 # <<<<<<<<<<<<<< * s2 = i[2]+3; e2 = 2*i[2]+2 * s3 = 2*i[2]+3; e3 = 3*i[2]+2 */ __pyx_v_s1 = 3; __pyx_v_e1 = ((__pyx_v_i[2]) + 2); /* "mpi4py/MPI/Datatype.pyx":581 * elif combiner == MPI_COMBINER_DARRAY: * s1 = 3; e1 = i[2]+2 * s2 = i[2]+3; e2 = 2*i[2]+2 # <<<<<<<<<<<<<< * s3 = 2*i[2]+3; e3 = 3*i[2]+2 * s4 = 3*i[2]+3; e4 = 4*i[2]+2 */ __pyx_v_s2 = ((__pyx_v_i[2]) + 3); __pyx_v_e2 = ((2 * (__pyx_v_i[2])) + 2); /* "mpi4py/MPI/Datatype.pyx":582 * s1 = 3; e1 = i[2]+2 * s2 = i[2]+3; e2 = 2*i[2]+2 * s3 = 2*i[2]+3; e3 = 3*i[2]+2 # <<<<<<<<<<<<<< * s4 = 3*i[2]+3; e4 = 4*i[2]+2 * return (oldtype, ('DARRAY'), */ __pyx_v_s3 = ((2 * (__pyx_v_i[2])) + 3); __pyx_v_e3 = ((3 * (__pyx_v_i[2])) + 2); /* "mpi4py/MPI/Datatype.pyx":583 * s2 = i[2]+3; e2 = 2*i[2]+2 * s3 = 2*i[2]+3; e3 = 3*i[2]+2 * s4 = 3*i[2]+3; e4 = 4*i[2]+2 # <<<<<<<<<<<<<< * return (oldtype, ('DARRAY'), * {('size') : i[0], */ __pyx_v_s4 = ((3 * (__pyx_v_i[2])) + 3); __pyx_v_e4 = ((4 * (__pyx_v_i[2])) + 2); /* "mpi4py/MPI/Datatype.pyx":584 * s3 = 2*i[2]+3; e3 = 3*i[2]+2 * s4 = 3*i[2]+3; e4 = 4*i[2]+2 * return (oldtype, ('DARRAY'), # <<<<<<<<<<<<<< * {('size') : i[0], * ('rank') : i[1], */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":585 * s4 = 3*i[2]+3; e4 = 4*i[2]+2 * return (oldtype, ('DARRAY'), * {('size') : i[0], # <<<<<<<<<<<<<< * ('rank') : i[1], * ('gsizes') : [i[k] for k from s1 <= k <= e1], */ __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_size, __pyx_t_4) < 0) __PYX_ERR(21, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":586 * return (oldtype, ('DARRAY'), * {('size') : i[0], * ('rank') : i[1], # <<<<<<<<<<<<<< * ('gsizes') : [i[k] for k from s1 <= k <= e1], * ('distribs') : [i[k] for k from s2 <= k <= e2], */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_rank, __pyx_t_4) < 0) __PYX_ERR(21, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":587 * {('size') : i[0], * ('rank') : i[1], * ('gsizes') : [i[k] for k from s1 <= k <= e1], # <<<<<<<<<<<<<< * ('distribs') : [i[k] for k from s2 <= k <= e2], * ('dargs') : [i[k] for k from s3 <= k <= e3], */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_v_e1; for (__pyx_v_k = __pyx_v_s1; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_gsizes, __pyx_t_4) < 0) __PYX_ERR(21, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":588 * ('rank') : i[1], * ('gsizes') : [i[k] for k from s1 <= k <= e1], * ('distribs') : [i[k] for k from s2 <= k <= e2], # <<<<<<<<<<<<<< * ('dargs') : [i[k] for k from s3 <= k <= e3], * ('psizes') : [i[k] for k from s4 <= k <= e4], */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_v_e2; for (__pyx_v_k = __pyx_v_s2; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_distribs, __pyx_t_4) < 0) __PYX_ERR(21, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":589 * ('gsizes') : [i[k] for k from s1 <= k <= e1], * ('distribs') : [i[k] for k from s2 <= k <= e2], * ('dargs') : [i[k] for k from s3 <= k <= e3], # <<<<<<<<<<<<<< * ('psizes') : [i[k] for k from s4 <= k <= e4], * ('order') : i[4*i[2]+3]}) */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_v_e3; for (__pyx_v_k = __pyx_v_s3; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 589, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dargs, __pyx_t_4) < 0) __PYX_ERR(21, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":590 * ('distribs') : [i[k] for k from s2 <= k <= e2], * ('dargs') : [i[k] for k from s3 <= k <= e3], * ('psizes') : [i[k] for k from s4 <= k <= e4], # <<<<<<<<<<<<<< * ('order') : i[4*i[2]+3]}) * elif combiner == MPI_COMBINER_RESIZED: */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_v_e4; for (__pyx_v_k = __pyx_v_s4; __pyx_v_k <= __pyx_t_1; __pyx_v_k++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_i[__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(21, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(21, 590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_psizes, __pyx_t_4) < 0) __PYX_ERR(21, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":591 * ('dargs') : [i[k] for k from s3 <= k <= e3], * ('psizes') : [i[k] for k from s4 <= k <= e4], * ('order') : i[4*i[2]+3]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_RESIZED: * return (oldtype, ('RESIZED'), */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[((4 * (__pyx_v_i[2])) + 3)])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_t_4) < 0) __PYX_ERR(21, 585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":584 * s3 = 2*i[2]+3; e3 = 3*i[2]+2 * s4 = 3*i[2]+3; e4 = 4*i[2]+2 * return (oldtype, ('DARRAY'), # <<<<<<<<<<<<<< * {('size') : i[0], * ('rank') : i[1], */ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_DARRAY); __Pyx_GIVEREF(__pyx_n_s_DARRAY); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_DARRAY); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":579 * ('starts') : [i[k] for k from s3 <= k <= e3], * ('order') : i[3*i[0]+1]}) * elif combiner == MPI_COMBINER_DARRAY: # <<<<<<<<<<<<<< * s1 = 3; e1 = i[2]+2 * s2 = i[2]+3; e2 = 2*i[2]+2 */ } /* "mpi4py/MPI/Datatype.pyx":592 * ('psizes') : [i[k] for k from s4 <= k <= e4], * ('order') : i[4*i[2]+3]}) * elif combiner == MPI_COMBINER_RESIZED: # <<<<<<<<<<<<<< * return (oldtype, ('RESIZED'), * {('lb') : a[0], */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_RESIZED) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":593 * ('order') : i[4*i[2]+3]}) * elif combiner == MPI_COMBINER_RESIZED: * return (oldtype, ('RESIZED'), # <<<<<<<<<<<<<< * {('lb') : a[0], * ('extent') : a[1]}) */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":594 * elif combiner == MPI_COMBINER_RESIZED: * return (oldtype, ('RESIZED'), * {('lb') : a[0], # <<<<<<<<<<<<<< * ('extent') : a[1]}) * elif combiner == MPI_COMBINER_F90_INTEGER: */ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_a[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_lb, __pyx_t_3) < 0) __PYX_ERR(21, 594, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":595 * return (oldtype, ('RESIZED'), * {('lb') : a[0], * ('extent') : a[1]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_F90_INTEGER: * return (Datatype, ('F90_INTEGER'), */ __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint((__pyx_v_a[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_extent, __pyx_t_3) < 0) __PYX_ERR(21, 594, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":593 * ('order') : i[4*i[2]+3]}) * elif combiner == MPI_COMBINER_RESIZED: * return (oldtype, ('RESIZED'), # <<<<<<<<<<<<<< * {('lb') : a[0], * ('extent') : a[1]}) */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_oldtype); __Pyx_GIVEREF(__pyx_v_oldtype); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_oldtype); __Pyx_INCREF(__pyx_n_s_RESIZED); __Pyx_GIVEREF(__pyx_n_s_RESIZED); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_RESIZED); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":592 * ('psizes') : [i[k] for k from s4 <= k <= e4], * ('order') : i[4*i[2]+3]}) * elif combiner == MPI_COMBINER_RESIZED: # <<<<<<<<<<<<<< * return (oldtype, ('RESIZED'), * {('lb') : a[0], */ } /* "mpi4py/MPI/Datatype.pyx":596 * {('lb') : a[0], * ('extent') : a[1]}) * elif combiner == MPI_COMBINER_F90_INTEGER: # <<<<<<<<<<<<<< * return (Datatype, ('F90_INTEGER'), * {('r') : i[0]}) */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_F90_INTEGER) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":597 * ('extent') : a[1]}) * elif combiner == MPI_COMBINER_F90_INTEGER: * return (Datatype, ('F90_INTEGER'), # <<<<<<<<<<<<<< * {('r') : i[0]}) * elif combiner == MPI_COMBINER_F90_REAL: */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":598 * elif combiner == MPI_COMBINER_F90_INTEGER: * return (Datatype, ('F90_INTEGER'), * {('r') : i[0]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_F90_REAL: * return (Datatype, ('F90_REAL'), */ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_r, __pyx_t_4) < 0) __PYX_ERR(21, 598, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":597 * ('extent') : a[1]}) * elif combiner == MPI_COMBINER_F90_INTEGER: * return (Datatype, ('F90_INTEGER'), # <<<<<<<<<<<<<< * {('r') : i[0]}) * elif combiner == MPI_COMBINER_F90_REAL: */ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); __Pyx_INCREF(__pyx_n_s_F90_INTEGER); __Pyx_GIVEREF(__pyx_n_s_F90_INTEGER); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_F90_INTEGER); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":596 * {('lb') : a[0], * ('extent') : a[1]}) * elif combiner == MPI_COMBINER_F90_INTEGER: # <<<<<<<<<<<<<< * return (Datatype, ('F90_INTEGER'), * {('r') : i[0]}) */ } /* "mpi4py/MPI/Datatype.pyx":599 * return (Datatype, ('F90_INTEGER'), * {('r') : i[0]}) * elif combiner == MPI_COMBINER_F90_REAL: # <<<<<<<<<<<<<< * return (Datatype, ('F90_REAL'), * {('p') : i[0], */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_F90_REAL) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":600 * {('r') : i[0]}) * elif combiner == MPI_COMBINER_F90_REAL: * return (Datatype, ('F90_REAL'), # <<<<<<<<<<<<<< * {('p') : i[0], * ('r') : i[1]}) */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":601 * elif combiner == MPI_COMBINER_F90_REAL: * return (Datatype, ('F90_REAL'), * {('p') : i[0], # <<<<<<<<<<<<<< * ('r') : i[1]}) * elif combiner == MPI_COMBINER_F90_COMPLEX: */ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_i[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_p, __pyx_t_3) < 0) __PYX_ERR(21, 601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":602 * return (Datatype, ('F90_REAL'), * {('p') : i[0], * ('r') : i[1]}) # <<<<<<<<<<<<<< * elif combiner == MPI_COMBINER_F90_COMPLEX: * return (Datatype, ('F90_COMPLEX'), */ __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_i[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_r, __pyx_t_3) < 0) __PYX_ERR(21, 601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":600 * {('r') : i[0]}) * elif combiner == MPI_COMBINER_F90_REAL: * return (Datatype, ('F90_REAL'), # <<<<<<<<<<<<<< * {('p') : i[0], * ('r') : i[1]}) */ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); __Pyx_INCREF(__pyx_n_s_F90_REAL); __Pyx_GIVEREF(__pyx_n_s_F90_REAL); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_F90_REAL); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":599 * return (Datatype, ('F90_INTEGER'), * {('r') : i[0]}) * elif combiner == MPI_COMBINER_F90_REAL: # <<<<<<<<<<<<<< * return (Datatype, ('F90_REAL'), * {('p') : i[0], */ } /* "mpi4py/MPI/Datatype.pyx":603 * {('p') : i[0], * ('r') : i[1]}) * elif combiner == MPI_COMBINER_F90_COMPLEX: # <<<<<<<<<<<<<< * return (Datatype, ('F90_COMPLEX'), * {('p') : i[0], */ __pyx_t_2 = ((__pyx_v_combiner == MPI_COMBINER_F90_COMPLEX) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":604 * ('r') : i[1]}) * elif combiner == MPI_COMBINER_F90_COMPLEX: * return (Datatype, ('F90_COMPLEX'), # <<<<<<<<<<<<<< * {('p') : i[0], * ('r') : i[1]}) */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Datatype.pyx":605 * elif combiner == MPI_COMBINER_F90_COMPLEX: * return (Datatype, ('F90_COMPLEX'), * {('p') : i[0], # <<<<<<<<<<<<<< * ('r') : i[1]}) * else: */ __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_p, __pyx_t_4) < 0) __PYX_ERR(21, 605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":606 * return (Datatype, ('F90_COMPLEX'), * {('p') : i[0], * ('r') : i[1]}) # <<<<<<<<<<<<<< * else: * return None */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_i[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_r, __pyx_t_4) < 0) __PYX_ERR(21, 605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Datatype.pyx":604 * ('r') : i[1]}) * elif combiner == MPI_COMBINER_F90_COMPLEX: * return (Datatype, ('F90_COMPLEX'), # <<<<<<<<<<<<<< * {('p') : i[0], * ('r') : i[1]}) */ __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(21, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype)); __Pyx_INCREF(__pyx_n_s_F90_COMPLEX); __Pyx_GIVEREF(__pyx_n_s_F90_COMPLEX); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_F90_COMPLEX); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":603 * {('p') : i[0], * ('r') : i[1]}) * elif combiner == MPI_COMBINER_F90_COMPLEX: # <<<<<<<<<<<<<< * return (Datatype, ('F90_COMPLEX'), * {('p') : i[0], */ } /* "mpi4py/MPI/Datatype.pyx":608 * ('r') : i[1]}) * else: * return None # <<<<<<<<<<<<<< * * property combiner: */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":499 * return self.Get_contents() * * def decode(self): # <<<<<<<<<<<<<< * """ * Convenience method for decoding a datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.Datatype.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_tmp3); __Pyx_XDECREF(__pyx_v_oldtype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":612 * property combiner: * """datatype combiner""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_envelope()[3] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_8combiner_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_8combiner_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_8combiner___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8combiner___get__(struct PyMPIDatatypeObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":613 * """datatype combiner""" * def __get__(self): * return self.Get_envelope()[3] # <<<<<<<<<<<<<< * * property is_named: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_envelope); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":612 * property combiner: * """datatype combiner""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_envelope()[3] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Datatype.combiner.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":617 * property is_named: * """is a named datatype""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int combiner = self.Get_envelope()[3] * return combiner == MPI_COMBINER_NAMED */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_8is_named_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_8is_named_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_8is_named___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_8is_named___get__(struct PyMPIDatatypeObject *__pyx_v_self) { int __pyx_v_combiner; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":618 * """is a named datatype""" * def __get__(self): * cdef int combiner = self.Get_envelope()[3] # <<<<<<<<<<<<<< * return combiner == MPI_COMBINER_NAMED * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_envelope); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 618, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_combiner = __pyx_t_4; /* "mpi4py/MPI/Datatype.pyx":619 * def __get__(self): * cdef int combiner = self.Get_envelope()[3] * return combiner == MPI_COMBINER_NAMED # <<<<<<<<<<<<<< * * property is_predefined: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_combiner == MPI_COMBINER_NAMED)); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":617 * property is_named: * """is a named datatype""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int combiner = self.Get_envelope()[3] * return combiner == MPI_COMBINER_NAMED */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Datatype.is_named.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":623 * property is_predefined: * """is a predefined datatype""" * def __get__(self): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_DATATYPE_NULL: return True * cdef int combiner = self.Get_envelope()[3] */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_13is_predefined_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_13is_predefined_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_13is_predefined___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_13is_predefined___get__(struct PyMPIDatatypeObject *__pyx_v_self) { int __pyx_v_combiner; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":624 * """is a predefined datatype""" * def __get__(self): * if self.ob_mpi == MPI_DATATYPE_NULL: return True # <<<<<<<<<<<<<< * cdef int combiner = self.Get_envelope()[3] * return (combiner == MPI_COMBINER_NAMED or */ __pyx_t_1 = ((__pyx_v_self->ob_mpi == MPI_DATATYPE_NULL) != 0); if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":625 * def __get__(self): * if self.ob_mpi == MPI_DATATYPE_NULL: return True * cdef int combiner = self.Get_envelope()[3] # <<<<<<<<<<<<<< * return (combiner == MPI_COMBINER_NAMED or * combiner == MPI_COMBINER_F90_INTEGER or */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_envelope); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 625, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_combiner = __pyx_t_5; /* "mpi4py/MPI/Datatype.pyx":626 * if self.ob_mpi == MPI_DATATYPE_NULL: return True * cdef int combiner = self.Get_envelope()[3] * return (combiner == MPI_COMBINER_NAMED or # <<<<<<<<<<<<<< * combiner == MPI_COMBINER_F90_INTEGER or * combiner == MPI_COMBINER_F90_REAL or */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = (__pyx_v_combiner == MPI_COMBINER_NAMED); if (!__pyx_t_1) { } else { __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L4_bool_binop_done; } /* "mpi4py/MPI/Datatype.pyx":627 * cdef int combiner = self.Get_envelope()[3] * return (combiner == MPI_COMBINER_NAMED or * combiner == MPI_COMBINER_F90_INTEGER or # <<<<<<<<<<<<<< * combiner == MPI_COMBINER_F90_REAL or * combiner == MPI_COMBINER_F90_COMPLEX) */ __pyx_t_1 = (__pyx_v_combiner == MPI_COMBINER_F90_INTEGER); if (!__pyx_t_1) { } else { __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L4_bool_binop_done; } /* "mpi4py/MPI/Datatype.pyx":628 * return (combiner == MPI_COMBINER_NAMED or * combiner == MPI_COMBINER_F90_INTEGER or * combiner == MPI_COMBINER_F90_REAL or # <<<<<<<<<<<<<< * combiner == MPI_COMBINER_F90_COMPLEX) * */ __pyx_t_1 = (__pyx_v_combiner == MPI_COMBINER_F90_REAL); if (!__pyx_t_1) { } else { __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L4_bool_binop_done; } /* "mpi4py/MPI/Datatype.pyx":629 * combiner == MPI_COMBINER_F90_INTEGER or * combiner == MPI_COMBINER_F90_REAL or * combiner == MPI_COMBINER_F90_COMPLEX) # <<<<<<<<<<<<<< * * # Pack and Unpack */ __pyx_t_1 = (__pyx_v_combiner == MPI_COMBINER_F90_COMPLEX); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; __pyx_L4_bool_binop_done:; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":623 * property is_predefined: * """is a predefined datatype""" * def __get__(self): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_DATATYPE_NULL: return True * cdef int combiner = self.Get_envelope()[3] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Datatype.is_predefined.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":634 * # --------------- * * def Pack(self, inbuf, outbuf, int position, Comm comm): # <<<<<<<<<<<<<< * """ * Pack into contiguous memory according to datatype. */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_57Pack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_56Pack[] = "Datatype.Pack(self, inbuf, outbuf, int position, Comm comm)\n\n Pack into contiguous memory according to datatype.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_57Pack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_inbuf = 0; PyObject *__pyx_v_outbuf = 0; int __pyx_v_position; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Pack (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inbuf,&__pyx_n_s_outbuf,&__pyx_n_s_position,&__pyx_n_s_comm,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Pack", 1, 4, 4, 1); __PYX_ERR(21, 634, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Pack", 1, 4, 4, 2); __PYX_ERR(21, 634, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Pack", 1, 4, 4, 3); __PYX_ERR(21, 634, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Pack") < 0)) __PYX_ERR(21, 634, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_inbuf = values[0]; __pyx_v_outbuf = values[1]; __pyx_v_position = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_position == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 634, __pyx_L3_error) __pyx_v_comm = ((struct PyMPICommObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Pack", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 634, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm", 0))) __PYX_ERR(21, 634, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_56Pack(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_inbuf, __pyx_v_outbuf, __pyx_v_position, __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_56Pack(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_inbuf, PyObject *__pyx_v_outbuf, int __pyx_v_position, struct PyMPICommObject *__pyx_v_comm) { MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_extent; void *__pyx_v_ibptr; void *__pyx_v_obptr; MPI_Aint __pyx_v_iblen; MPI_Aint __pyx_v_oblen; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; int __pyx_v_icount; int __pyx_v_osize; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Pack", 0); /* "mpi4py/MPI/Datatype.pyx":638 * Pack into contiguous memory according to datatype. * """ * cdef MPI_Aint lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) * # */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":639 * """ * cdef MPI_Aint lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) # <<<<<<<<<<<<<< * # * cdef void *ibptr = NULL, *obptr = NULL */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 639, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":641 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) * # * cdef void *ibptr = NULL, *obptr = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) */ __pyx_v_ibptr = NULL; __pyx_v_obptr = NULL; /* "mpi4py/MPI/Datatype.pyx":642 * # * cdef void *ibptr = NULL, *obptr = NULL * cdef MPI_Aint iblen = 0, oblen = 0 # <<<<<<<<<<<<<< * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) */ __pyx_v_iblen = 0; __pyx_v_oblen = 0; /* "mpi4py/MPI/Datatype.pyx":643 * cdef void *ibptr = NULL, *obptr = NULL * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) # <<<<<<<<<<<<<< * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int icount = downcast(iblen//extent) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_inbuf, (&__pyx_v_ibptr), (&__pyx_v_iblen))); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":644 * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) # <<<<<<<<<<<<<< * cdef int icount = downcast(iblen//extent) * cdef int osize = clipcount(oblen) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_outbuf, (&__pyx_v_obptr), (&__pyx_v_oblen))); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp2 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":645 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int icount = downcast(iblen//extent) # <<<<<<<<<<<<<< * cdef int osize = clipcount(oblen) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_downcast((__pyx_v_iblen / __pyx_v_extent)); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 645, __pyx_L1_error) __pyx_v_icount = __pyx_t_1; /* "mpi4py/MPI/Datatype.pyx":646 * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int icount = downcast(iblen//extent) * cdef int osize = clipcount(oblen) # <<<<<<<<<<<<<< * # * CHKERR( MPI_Pack(ibptr, icount, self.ob_mpi, obptr, osize, */ __pyx_v_osize = __pyx_f_6mpi4py_3MPI_clipcount(__pyx_v_oblen); /* "mpi4py/MPI/Datatype.pyx":648 * cdef int osize = clipcount(oblen) * # * CHKERR( MPI_Pack(ibptr, icount, self.ob_mpi, obptr, osize, # <<<<<<<<<<<<<< * &position, comm.ob_mpi) ) * return position */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Pack(__pyx_v_ibptr, __pyx_v_icount, __pyx_v_self->ob_mpi, __pyx_v_obptr, __pyx_v_osize, (&__pyx_v_position), __pyx_v_comm->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 648, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":650 * CHKERR( MPI_Pack(ibptr, icount, self.ob_mpi, obptr, osize, * &position, comm.ob_mpi) ) * return position # <<<<<<<<<<<<<< * * def Unpack(self, inbuf, int position, outbuf, Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":634 * # --------------- * * def Pack(self, inbuf, outbuf, int position, Comm comm): # <<<<<<<<<<<<<< * """ * Pack into contiguous memory according to datatype. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Pack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":652 * return position * * def Unpack(self, inbuf, int position, outbuf, Comm comm): # <<<<<<<<<<<<<< * """ * Unpack from contiguous memory according to datatype. */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_59Unpack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_58Unpack[] = "Datatype.Unpack(self, inbuf, int position, outbuf, Comm comm)\n\n Unpack from contiguous memory according to datatype.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_59Unpack(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_inbuf = 0; int __pyx_v_position; PyObject *__pyx_v_outbuf = 0; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Unpack (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inbuf,&__pyx_n_s_position,&__pyx_n_s_outbuf,&__pyx_n_s_comm,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Unpack", 1, 4, 4, 1); __PYX_ERR(21, 652, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Unpack", 1, 4, 4, 2); __PYX_ERR(21, 652, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Unpack", 1, 4, 4, 3); __PYX_ERR(21, 652, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Unpack") < 0)) __PYX_ERR(21, 652, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_inbuf = values[0]; __pyx_v_position = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_position == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 652, __pyx_L3_error) __pyx_v_outbuf = values[2]; __pyx_v_comm = ((struct PyMPICommObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Unpack", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 652, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm", 0))) __PYX_ERR(21, 652, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_58Unpack(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_inbuf, __pyx_v_position, __pyx_v_outbuf, __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_58Unpack(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_inbuf, int __pyx_v_position, PyObject *__pyx_v_outbuf, struct PyMPICommObject *__pyx_v_comm) { MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_extent; void *__pyx_v_ibptr; void *__pyx_v_obptr; MPI_Aint __pyx_v_iblen; MPI_Aint __pyx_v_oblen; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; int __pyx_v_isize; int __pyx_v_ocount; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Unpack", 0); /* "mpi4py/MPI/Datatype.pyx":656 * Unpack from contiguous memory according to datatype. * """ * cdef MPI_Aint lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) * # */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":657 * """ * cdef MPI_Aint lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) # <<<<<<<<<<<<<< * # * cdef void *ibptr = NULL, *obptr = NULL */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 657, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":659 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) * # * cdef void *ibptr = NULL, *obptr = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) */ __pyx_v_ibptr = NULL; __pyx_v_obptr = NULL; /* "mpi4py/MPI/Datatype.pyx":660 * # * cdef void *ibptr = NULL, *obptr = NULL * cdef MPI_Aint iblen = 0, oblen = 0 # <<<<<<<<<<<<<< * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) */ __pyx_v_iblen = 0; __pyx_v_oblen = 0; /* "mpi4py/MPI/Datatype.pyx":661 * cdef void *ibptr = NULL, *obptr = NULL * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) # <<<<<<<<<<<<<< * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int isize = clipcount(iblen) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_inbuf, (&__pyx_v_ibptr), (&__pyx_v_iblen))); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":662 * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) # <<<<<<<<<<<<<< * cdef int isize = clipcount(iblen) * cdef int ocount = downcast(oblen//extent) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_outbuf, (&__pyx_v_obptr), (&__pyx_v_oblen))); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp2 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":663 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int isize = clipcount(iblen) # <<<<<<<<<<<<<< * cdef int ocount = downcast(oblen//extent) * # */ __pyx_v_isize = __pyx_f_6mpi4py_3MPI_clipcount(__pyx_v_iblen); /* "mpi4py/MPI/Datatype.pyx":664 * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int isize = clipcount(iblen) * cdef int ocount = downcast(oblen//extent) # <<<<<<<<<<<<<< * # * CHKERR( MPI_Unpack(ibptr, isize, &position, obptr, ocount, */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_downcast((__pyx_v_oblen / __pyx_v_extent)); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 664, __pyx_L1_error) __pyx_v_ocount = __pyx_t_1; /* "mpi4py/MPI/Datatype.pyx":666 * cdef int ocount = downcast(oblen//extent) * # * CHKERR( MPI_Unpack(ibptr, isize, &position, obptr, ocount, # <<<<<<<<<<<<<< * self.ob_mpi, comm.ob_mpi) ) * return position */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Unpack(__pyx_v_ibptr, __pyx_v_isize, (&__pyx_v_position), __pyx_v_obptr, __pyx_v_ocount, __pyx_v_self->ob_mpi, __pyx_v_comm->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 666, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":668 * CHKERR( MPI_Unpack(ibptr, isize, &position, obptr, ocount, * self.ob_mpi, comm.ob_mpi) ) * return position # <<<<<<<<<<<<<< * * def Pack_size(self, int count, Comm comm): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":652 * return position * * def Unpack(self, inbuf, int position, outbuf, Comm comm): # <<<<<<<<<<<<<< * """ * Unpack from contiguous memory according to datatype. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Unpack", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":670 * return position * * def Pack_size(self, int count, Comm comm): # <<<<<<<<<<<<<< * """ * Returns the upper bound on the amount of space (in bytes) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_61Pack_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_60Pack_size[] = "Datatype.Pack_size(self, int count, Comm comm)\n\n Returns the upper bound on the amount of space (in bytes)\n needed to pack a message according to datatype.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_61Pack_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_count; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Pack_size (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_count,&__pyx_n_s_comm,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Pack_size", 1, 2, 2, 1); __PYX_ERR(21, 670, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Pack_size") < 0)) __PYX_ERR(21, 670, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_count = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 670, __pyx_L3_error) __pyx_v_comm = ((struct PyMPICommObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Pack_size", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 670, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Pack_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm", 0))) __PYX_ERR(21, 670, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_60Pack_size(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_count, __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_60Pack_size(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_count, struct PyMPICommObject *__pyx_v_comm) { int __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Pack_size", 0); /* "mpi4py/MPI/Datatype.pyx":675 * needed to pack a message according to datatype. * """ * cdef int size = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Pack_size(count, self.ob_mpi, * comm.ob_mpi, &size) ) */ __pyx_v_size = 0; /* "mpi4py/MPI/Datatype.pyx":676 * """ * cdef int size = 0 * CHKERR( MPI_Pack_size(count, self.ob_mpi, # <<<<<<<<<<<<<< * comm.ob_mpi, &size) ) * return size */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Pack_size(__pyx_v_count, __pyx_v_self->ob_mpi, __pyx_v_comm->ob_mpi, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 676, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":678 * CHKERR( MPI_Pack_size(count, self.ob_mpi, * comm.ob_mpi, &size) ) * return size # <<<<<<<<<<<<<< * * # Canonical Pack and Unpack */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":670 * return position * * def Pack_size(self, int count, Comm comm): # <<<<<<<<<<<<<< * """ * Returns the upper bound on the amount of space (in bytes) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Pack_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":683 * # ------------------------- * * def Pack_external(self, datarep, inbuf, outbuf, Aint position): # <<<<<<<<<<<<<< * """ * Pack into contiguous memory according to datatype, */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_63Pack_external(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_62Pack_external[] = "Datatype.Pack_external(self, datarep, inbuf, outbuf, Aint position)\n\n Pack into contiguous memory according to datatype,\n using a portable data representation (**external32**).\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_63Pack_external(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_datarep = 0; PyObject *__pyx_v_inbuf = 0; PyObject *__pyx_v_outbuf = 0; MPI_Aint __pyx_v_position; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Pack_external (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datarep,&__pyx_n_s_inbuf,&__pyx_n_s_outbuf,&__pyx_n_s_position,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datarep)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Pack_external", 1, 4, 4, 1); __PYX_ERR(21, 683, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Pack_external", 1, 4, 4, 2); __PYX_ERR(21, 683, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Pack_external", 1, 4, 4, 3); __PYX_ERR(21, 683, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Pack_external") < 0)) __PYX_ERR(21, 683, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_datarep = values[0]; __pyx_v_inbuf = values[1]; __pyx_v_outbuf = values[2]; __pyx_v_position = __Pyx_PyInt_As_MPI_Aint(values[3]); if (unlikely((__pyx_v_position == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 683, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Pack_external", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 683, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Pack_external", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_62Pack_external(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_datarep, __pyx_v_inbuf, __pyx_v_outbuf, __pyx_v_position); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_62Pack_external(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_datarep, PyObject *__pyx_v_inbuf, PyObject *__pyx_v_outbuf, MPI_Aint __pyx_v_position) { char *__pyx_v_cdatarep; MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_extent; void *__pyx_v_ibptr; void *__pyx_v_obptr; MPI_Aint __pyx_v_iblen; MPI_Aint __pyx_v_oblen; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; int __pyx_v_icount; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Pack_external", 0); __Pyx_INCREF(__pyx_v_datarep); /* "mpi4py/MPI/Datatype.pyx":688 * using a portable data representation (**external32**). * """ * cdef char *cdatarep = NULL # <<<<<<<<<<<<<< * datarep = asmpistr(datarep, &cdatarep) * cdef MPI_Aint lb = 0, extent = 0 */ __pyx_v_cdatarep = NULL; /* "mpi4py/MPI/Datatype.pyx":689 * """ * cdef char *cdatarep = NULL * datarep = asmpistr(datarep, &cdatarep) # <<<<<<<<<<<<<< * cdef MPI_Aint lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_datarep, (&__pyx_v_cdatarep)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_datarep, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":690 * cdef char *cdatarep = NULL * datarep = asmpistr(datarep, &cdatarep) * cdef MPI_Aint lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) * # */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":691 * datarep = asmpistr(datarep, &cdatarep) * cdef MPI_Aint lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) # <<<<<<<<<<<<<< * # * cdef void *ibptr = NULL, *obptr = NULL */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(21, 691, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":693 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) * # * cdef void *ibptr = NULL, *obptr = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) */ __pyx_v_ibptr = NULL; __pyx_v_obptr = NULL; /* "mpi4py/MPI/Datatype.pyx":694 * # * cdef void *ibptr = NULL, *obptr = NULL * cdef MPI_Aint iblen = 0, oblen = 0 # <<<<<<<<<<<<<< * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) */ __pyx_v_iblen = 0; __pyx_v_oblen = 0; /* "mpi4py/MPI/Datatype.pyx":695 * cdef void *ibptr = NULL, *obptr = NULL * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) # <<<<<<<<<<<<<< * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int icount = downcast(iblen//extent) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_inbuf, (&__pyx_v_ibptr), (&__pyx_v_iblen))); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp1 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":696 * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) # <<<<<<<<<<<<<< * cdef int icount = downcast(iblen//extent) * # */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_outbuf, (&__pyx_v_obptr), (&__pyx_v_oblen))); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp2 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":697 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int icount = downcast(iblen//extent) # <<<<<<<<<<<<<< * # * CHKERR( MPI_Pack_external(cdatarep, ibptr, icount, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_downcast((__pyx_v_iblen / __pyx_v_extent)); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 697, __pyx_L1_error) __pyx_v_icount = __pyx_t_2; /* "mpi4py/MPI/Datatype.pyx":699 * cdef int icount = downcast(iblen//extent) * # * CHKERR( MPI_Pack_external(cdatarep, ibptr, icount, # <<<<<<<<<<<<<< * self.ob_mpi, * obptr, oblen, &position) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Pack_external(__pyx_v_cdatarep, __pyx_v_ibptr, __pyx_v_icount, __pyx_v_self->ob_mpi, __pyx_v_obptr, __pyx_v_oblen, (&__pyx_v_position))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(21, 699, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":702 * self.ob_mpi, * obptr, oblen, &position) ) * return position # <<<<<<<<<<<<<< * * def Unpack_external(self, datarep, inbuf, Aint position, outbuf): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":683 * # ------------------------- * * def Pack_external(self, datarep, inbuf, outbuf, Aint position): # <<<<<<<<<<<<<< * """ * Pack into contiguous memory according to datatype, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Pack_external", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_datarep); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":704 * return position * * def Unpack_external(self, datarep, inbuf, Aint position, outbuf): # <<<<<<<<<<<<<< * """ * Unpack from contiguous memory according to datatype, */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_65Unpack_external(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_64Unpack_external[] = "Datatype.Unpack_external(self, datarep, inbuf, Aint position, outbuf)\n\n Unpack from contiguous memory according to datatype,\n using a portable data representation (**external32**).\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_65Unpack_external(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_datarep = 0; PyObject *__pyx_v_inbuf = 0; MPI_Aint __pyx_v_position; PyObject *__pyx_v_outbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Unpack_external (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datarep,&__pyx_n_s_inbuf,&__pyx_n_s_position,&__pyx_n_s_outbuf,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datarep)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Unpack_external", 1, 4, 4, 1); __PYX_ERR(21, 704, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Unpack_external", 1, 4, 4, 2); __PYX_ERR(21, 704, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Unpack_external", 1, 4, 4, 3); __PYX_ERR(21, 704, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Unpack_external") < 0)) __PYX_ERR(21, 704, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_datarep = values[0]; __pyx_v_inbuf = values[1]; __pyx_v_position = __Pyx_PyInt_As_MPI_Aint(values[2]); if (unlikely((__pyx_v_position == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 704, __pyx_L3_error) __pyx_v_outbuf = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Unpack_external", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 704, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Unpack_external", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_64Unpack_external(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_datarep, __pyx_v_inbuf, __pyx_v_position, __pyx_v_outbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_64Unpack_external(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_datarep, PyObject *__pyx_v_inbuf, MPI_Aint __pyx_v_position, PyObject *__pyx_v_outbuf) { char *__pyx_v_cdatarep; MPI_Aint __pyx_v_lb; MPI_Aint __pyx_v_extent; void *__pyx_v_ibptr; void *__pyx_v_obptr; MPI_Aint __pyx_v_iblen; MPI_Aint __pyx_v_oblen; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; int __pyx_v_ocount; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Unpack_external", 0); __Pyx_INCREF(__pyx_v_datarep); /* "mpi4py/MPI/Datatype.pyx":709 * using a portable data representation (**external32**). * """ * cdef char *cdatarep = NULL # <<<<<<<<<<<<<< * datarep = asmpistr(datarep, &cdatarep) * cdef MPI_Aint lb = 0, extent = 0 */ __pyx_v_cdatarep = NULL; /* "mpi4py/MPI/Datatype.pyx":710 * """ * cdef char *cdatarep = NULL * datarep = asmpistr(datarep, &cdatarep) # <<<<<<<<<<<<<< * cdef MPI_Aint lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_datarep, (&__pyx_v_cdatarep)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_datarep, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":711 * cdef char *cdatarep = NULL * datarep = asmpistr(datarep, &cdatarep) * cdef MPI_Aint lb = 0, extent = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) * # */ __pyx_v_lb = 0; __pyx_v_extent = 0; /* "mpi4py/MPI/Datatype.pyx":712 * datarep = asmpistr(datarep, &cdatarep) * cdef MPI_Aint lb = 0, extent = 0 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) # <<<<<<<<<<<<<< * # * cdef void *ibptr = NULL, *obptr = NULL */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_extent(__pyx_v_self->ob_mpi, (&__pyx_v_lb), (&__pyx_v_extent))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(21, 712, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":714 * CHKERR( MPI_Type_get_extent(self.ob_mpi, &lb, &extent) ) * # * cdef void *ibptr = NULL, *obptr = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) */ __pyx_v_ibptr = NULL; __pyx_v_obptr = NULL; /* "mpi4py/MPI/Datatype.pyx":715 * # * cdef void *ibptr = NULL, *obptr = NULL * cdef MPI_Aint iblen = 0, oblen = 0 # <<<<<<<<<<<<<< * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) */ __pyx_v_iblen = 0; __pyx_v_oblen = 0; /* "mpi4py/MPI/Datatype.pyx":716 * cdef void *ibptr = NULL, *obptr = NULL * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) # <<<<<<<<<<<<<< * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int ocount = downcast(oblen//extent) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_inbuf, (&__pyx_v_ibptr), (&__pyx_v_iblen))); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp1 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":717 * cdef MPI_Aint iblen = 0, oblen = 0 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) # <<<<<<<<<<<<<< * cdef int ocount = downcast(oblen//extent) * # */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_outbuf, (&__pyx_v_obptr), (&__pyx_v_oblen))); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp2 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":718 * cdef tmp1 = getbuffer_r(inbuf, &ibptr, &iblen) * cdef tmp2 = getbuffer_w(outbuf, &obptr, &oblen) * cdef int ocount = downcast(oblen//extent) # <<<<<<<<<<<<<< * # * CHKERR( MPI_Unpack_external(cdatarep, ibptr, iblen, &position, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_downcast((__pyx_v_oblen / __pyx_v_extent)); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(21, 718, __pyx_L1_error) __pyx_v_ocount = __pyx_t_2; /* "mpi4py/MPI/Datatype.pyx":720 * cdef int ocount = downcast(oblen//extent) * # * CHKERR( MPI_Unpack_external(cdatarep, ibptr, iblen, &position, # <<<<<<<<<<<<<< * obptr, ocount, self.ob_mpi) ) * return position */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Unpack_external(__pyx_v_cdatarep, __pyx_v_ibptr, __pyx_v_iblen, (&__pyx_v_position), __pyx_v_obptr, __pyx_v_ocount, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(21, 720, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":722 * CHKERR( MPI_Unpack_external(cdatarep, ibptr, iblen, &position, * obptr, ocount, self.ob_mpi) ) * return position # <<<<<<<<<<<<<< * * def Pack_external_size(self, datarep, int count): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":704 * return position * * def Unpack_external(self, datarep, inbuf, Aint position, outbuf): # <<<<<<<<<<<<<< * """ * Unpack from contiguous memory according to datatype, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Unpack_external", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_datarep); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":724 * return position * * def Pack_external_size(self, datarep, int count): # <<<<<<<<<<<<<< * """ * Returns the upper bound on the amount of space (in bytes) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_67Pack_external_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_66Pack_external_size[] = "Datatype.Pack_external_size(self, datarep, int count)\n\n Returns the upper bound on the amount of space (in bytes)\n needed to pack a message according to datatype,\n using a portable data representation (**external32**).\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_67Pack_external_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_datarep = 0; int __pyx_v_count; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Pack_external_size (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datarep,&__pyx_n_s_count,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datarep)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Pack_external_size", 1, 2, 2, 1); __PYX_ERR(21, 724, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Pack_external_size") < 0)) __PYX_ERR(21, 724, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_datarep = values[0]; __pyx_v_count = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 724, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Pack_external_size", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 724, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Pack_external_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_66Pack_external_size(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_datarep, __pyx_v_count); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_66Pack_external_size(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_datarep, int __pyx_v_count) { char *__pyx_v_cdatarep; MPI_Aint __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Pack_external_size", 0); __Pyx_INCREF(__pyx_v_datarep); /* "mpi4py/MPI/Datatype.pyx":730 * using a portable data representation (**external32**). * """ * cdef char *cdatarep = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint size = 0 * datarep = asmpistr(datarep, &cdatarep) */ __pyx_v_cdatarep = NULL; /* "mpi4py/MPI/Datatype.pyx":731 * """ * cdef char *cdatarep = NULL * cdef MPI_Aint size = 0 # <<<<<<<<<<<<<< * datarep = asmpistr(datarep, &cdatarep) * CHKERR( MPI_Pack_external_size(cdatarep, count, */ __pyx_v_size = 0; /* "mpi4py/MPI/Datatype.pyx":732 * cdef char *cdatarep = NULL * cdef MPI_Aint size = 0 * datarep = asmpistr(datarep, &cdatarep) # <<<<<<<<<<<<<< * CHKERR( MPI_Pack_external_size(cdatarep, count, * self.ob_mpi, &size) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_datarep, (&__pyx_v_cdatarep)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_datarep, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":733 * cdef MPI_Aint size = 0 * datarep = asmpistr(datarep, &cdatarep) * CHKERR( MPI_Pack_external_size(cdatarep, count, # <<<<<<<<<<<<<< * self.ob_mpi, &size) ) * return size */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Pack_external_size(__pyx_v_cdatarep, __pyx_v_count, __pyx_v_self->ob_mpi, (&__pyx_v_size))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(21, 733, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":735 * CHKERR( MPI_Pack_external_size(cdatarep, count, * self.ob_mpi, &size) ) * return size # <<<<<<<<<<<<<< * * # Attributes */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":724 * return position * * def Pack_external_size(self, datarep, int count): # <<<<<<<<<<<<<< * """ * Returns the upper bound on the amount of space (in bytes) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Pack_external_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_datarep); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":740 * # ---------- * * def Get_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Retrieve attribute value by key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_69Get_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_68Get_attr[] = "Datatype.Get_attr(self, int keyval)\n\n Retrieve attribute value by key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_69Get_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_attr") < 0)) __PYX_ERR(21, 740, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 740, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_attr", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 740, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Get_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_68Get_attr(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_keyval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_68Get_attr(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_keyval) { void *__pyx_v_attrval; int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Get_attr", 0); /* "mpi4py/MPI/Datatype.pyx":744 * Retrieve attribute value by key * """ * cdef void *attrval = NULL # <<<<<<<<<<<<<< * cdef int flag = 0 * CHKERR( MPI_Type_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) */ __pyx_v_attrval = NULL; /* "mpi4py/MPI/Datatype.pyx":745 * """ * cdef void *attrval = NULL * cdef int flag = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) * if not flag: return None */ __pyx_v_flag = 0; /* "mpi4py/MPI/Datatype.pyx":746 * cdef void *attrval = NULL * cdef int flag = 0 * CHKERR( MPI_Type_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) # <<<<<<<<<<<<<< * if not flag: return None * if attrval == NULL: return 0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_attr(__pyx_v_self->ob_mpi, __pyx_v_keyval, (&__pyx_v_attrval), (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 746, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":747 * cdef int flag = 0 * CHKERR( MPI_Type_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) * if not flag: return None # <<<<<<<<<<<<<< * if attrval == NULL: return 0 * # user-defined attribute keyval */ __pyx_t_2 = ((!(__pyx_v_flag != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":748 * CHKERR( MPI_Type_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) * if not flag: return None * if attrval == NULL: return 0 # <<<<<<<<<<<<<< * # user-defined attribute keyval * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) */ __pyx_t_2 = ((__pyx_v_attrval == NULL) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; } /* "mpi4py/MPI/Datatype.pyx":750 * if attrval == NULL: return 0 * # user-defined attribute keyval * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) # <<<<<<<<<<<<<< * * def Set_attr(self, int keyval, object attrval): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_get(__pyx_v_self->ob_mpi, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":740 * # ---------- * * def Get_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Retrieve attribute value by key */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Get_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":752 * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) * * def Set_attr(self, int keyval, object attrval): # <<<<<<<<<<<<<< * """ * Store attribute value associated with a key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_71Set_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_70Set_attr[] = "Datatype.Set_attr(self, int keyval, attrval)\n\n Store attribute value associated with a key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_71Set_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_v_attrval = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,&__pyx_n_s_attrval,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrval)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Set_attr", 1, 2, 2, 1); __PYX_ERR(21, 752, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_attr") < 0)) __PYX_ERR(21, 752, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 752, __pyx_L3_error) __pyx_v_attrval = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_attr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 752, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Set_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_70Set_attr(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_keyval, __pyx_v_attrval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_70Set_attr(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_keyval, PyObject *__pyx_v_attrval) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_attr", 0); /* "mpi4py/MPI/Datatype.pyx":756 * Store attribute value associated with a key * """ * PyMPI_attr_set(self.ob_mpi, keyval, attrval) # <<<<<<<<<<<<<< * * def Delete_attr(self, int keyval): */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_set(__pyx_v_self->ob_mpi, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 756, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":752 * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) * * def Set_attr(self, int keyval, object attrval): # <<<<<<<<<<<<<< * """ * Store attribute value associated with a key */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Set_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":758 * PyMPI_attr_set(self.ob_mpi, keyval, attrval) * * def Delete_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Delete attribute value associated with a key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_73Delete_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_72Delete_attr[] = "Datatype.Delete_attr(self, int keyval)\n\n Delete attribute value associated with a key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_73Delete_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Delete_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Delete_attr") < 0)) __PYX_ERR(21, 758, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 758, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Delete_attr", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 758, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Delete_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_72Delete_attr(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_keyval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_72Delete_attr(struct PyMPIDatatypeObject *__pyx_v_self, int __pyx_v_keyval) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Delete_attr", 0); /* "mpi4py/MPI/Datatype.pyx":762 * Delete attribute value associated with a key * """ * CHKERR( MPI_Type_delete_attr(self.ob_mpi, keyval) ) # <<<<<<<<<<<<<< * * @classmethod */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_delete_attr(__pyx_v_self->ob_mpi, __pyx_v_keyval)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 762, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":758 * PyMPI_attr_set(self.ob_mpi, keyval, attrval) * * def Delete_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Delete attribute value associated with a key */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Delete_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":765 * * @classmethod * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): # <<<<<<<<<<<<<< * """ * Create a new attribute key for datatypes */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_75Create_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_74Create_keyval[] = "Datatype.Create_keyval(type cls, copy_fn=None, delete_fn=None, nopython=False)\n\n Create a new attribute key for datatypes\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_75Create_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_copy_fn = 0; PyObject *__pyx_v_delete_fn = 0; PyObject *__pyx_v_nopython = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_keyval (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_copy_fn,&__pyx_n_s_delete_fn,&__pyx_n_s_nopython,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_copy_fn); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delete_fn); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nopython); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_keyval") < 0)) __PYX_ERR(21, 765, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_copy_fn = values[0]; __pyx_v_delete_fn = values[1]; __pyx_v_nopython = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_keyval", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 765, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_74Create_keyval(((PyTypeObject*)__pyx_v_cls), __pyx_v_copy_fn, __pyx_v_delete_fn, __pyx_v_nopython); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_74Create_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_copy_fn, PyObject *__pyx_v_delete_fn, PyObject *__pyx_v_nopython) { PyObject *__pyx_v_state = 0; int __pyx_v_keyval; MPI_Type_copy_attr_function *__pyx_v__copy; MPI_Type_delete_attr_function *__pyx_v__del; void *__pyx_v_extra_state; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_keyval", 0); /* "mpi4py/MPI/Datatype.pyx":769 * Create a new attribute key for datatypes * """ * cdef object state = _p_keyval(copy_fn, delete_fn, nopython) # <<<<<<<<<<<<<< * cdef int keyval = MPI_KEYVAL_INVALID * cdef MPI_Type_copy_attr_function *_copy = PyMPI_attr_copy_fn */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_copy_fn); __Pyx_GIVEREF(__pyx_v_copy_fn); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_copy_fn); __Pyx_INCREF(__pyx_v_delete_fn); __Pyx_GIVEREF(__pyx_v_delete_fn); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_delete_fn); __Pyx_INCREF(__pyx_v_nopython); __Pyx_GIVEREF(__pyx_v_nopython); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nopython); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6mpi4py_3MPI__p_keyval), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_state = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":770 * """ * cdef object state = _p_keyval(copy_fn, delete_fn, nopython) * cdef int keyval = MPI_KEYVAL_INVALID # <<<<<<<<<<<<<< * cdef MPI_Type_copy_attr_function *_copy = PyMPI_attr_copy_fn * cdef MPI_Type_delete_attr_function *_del = PyMPI_attr_delete_fn */ __pyx_v_keyval = MPI_KEYVAL_INVALID; /* "mpi4py/MPI/Datatype.pyx":771 * cdef object state = _p_keyval(copy_fn, delete_fn, nopython) * cdef int keyval = MPI_KEYVAL_INVALID * cdef MPI_Type_copy_attr_function *_copy = PyMPI_attr_copy_fn # <<<<<<<<<<<<<< * cdef MPI_Type_delete_attr_function *_del = PyMPI_attr_delete_fn * cdef void *extra_state = state */ __pyx_v__copy = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_fn; /* "mpi4py/MPI/Datatype.pyx":772 * cdef int keyval = MPI_KEYVAL_INVALID * cdef MPI_Type_copy_attr_function *_copy = PyMPI_attr_copy_fn * cdef MPI_Type_delete_attr_function *_del = PyMPI_attr_delete_fn # <<<<<<<<<<<<<< * cdef void *extra_state = state * CHKERR( MPI_Type_create_keyval(_copy, _del, &keyval, extra_state) ) */ __pyx_v__del = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_fn; /* "mpi4py/MPI/Datatype.pyx":773 * cdef MPI_Type_copy_attr_function *_copy = PyMPI_attr_copy_fn * cdef MPI_Type_delete_attr_function *_del = PyMPI_attr_delete_fn * cdef void *extra_state = state # <<<<<<<<<<<<<< * CHKERR( MPI_Type_create_keyval(_copy, _del, &keyval, extra_state) ) * type_keyval[keyval] = state */ __pyx_v_extra_state = ((void *)__pyx_v_state); /* "mpi4py/MPI/Datatype.pyx":774 * cdef MPI_Type_delete_attr_function *_del = PyMPI_attr_delete_fn * cdef void *extra_state = state * CHKERR( MPI_Type_create_keyval(_copy, _del, &keyval, extra_state) ) # <<<<<<<<<<<<<< * type_keyval[keyval] = state * return keyval */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_create_keyval(__pyx_v__copy, __pyx_v__del, (&__pyx_v_keyval), __pyx_v_extra_state)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(21, 774, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":775 * cdef void *extra_state = state * CHKERR( MPI_Type_create_keyval(_copy, _del, &keyval, extra_state) ) * type_keyval[keyval] = state # <<<<<<<<<<<<<< * return keyval * */ if (unlikely(__pyx_v_6mpi4py_3MPI_type_keyval == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(21, 775, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyDict_SetItem(__pyx_v_6mpi4py_3MPI_type_keyval, __pyx_t_2, __pyx_v_state) < 0)) __PYX_ERR(21, 775, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":776 * CHKERR( MPI_Type_create_keyval(_copy, _del, &keyval, extra_state) ) * type_keyval[keyval] = state * return keyval # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":765 * * @classmethod * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): # <<<<<<<<<<<<<< * """ * Create a new attribute key for datatypes */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Create_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":779 * * @classmethod * def Free_keyval(cls, int keyval): # <<<<<<<<<<<<<< * """ * Free and attribute key for datatypes */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_77Free_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_76Free_keyval[] = "Datatype.Free_keyval(type cls, int keyval)\n\n Free and attribute key for datatypes\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_77Free_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free_keyval (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Free_keyval") < 0)) __PYX_ERR(21, 779, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 779, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Free_keyval", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 779, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Free_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_76Free_keyval(((PyTypeObject*)__pyx_v_cls), __pyx_v_keyval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_76Free_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_keyval) { int __pyx_v_keyval_save; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("Free_keyval", 0); /* "mpi4py/MPI/Datatype.pyx":783 * Free and attribute key for datatypes * """ * cdef int keyval_save = keyval # <<<<<<<<<<<<<< * CHKERR( MPI_Type_free_keyval(&keyval) ) * try: del type_keyval[keyval_save] */ __pyx_v_keyval_save = __pyx_v_keyval; /* "mpi4py/MPI/Datatype.pyx":784 * """ * cdef int keyval_save = keyval * CHKERR( MPI_Type_free_keyval(&keyval) ) # <<<<<<<<<<<<<< * try: del type_keyval[keyval_save] * except KeyError: pass */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_free_keyval((&__pyx_v_keyval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 784, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":785 * cdef int keyval_save = keyval * CHKERR( MPI_Type_free_keyval(&keyval) ) * try: del type_keyval[keyval_save] # <<<<<<<<<<<<<< * except KeyError: pass * return keyval */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { if (unlikely(__pyx_v_6mpi4py_3MPI_type_keyval == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(21, 785, __pyx_L3_error) } __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_keyval_save); if (unlikely(!__pyx_t_5)) __PYX_ERR(21, 785, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_DelItem(__pyx_v_6mpi4py_3MPI_type_keyval, __pyx_t_5) < 0)) __PYX_ERR(21, 785, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Datatype.pyx":786 * CHKERR( MPI_Type_free_keyval(&keyval) ) * try: del type_keyval[keyval_save] * except KeyError: pass # <<<<<<<<<<<<<< * return keyval * */ __pyx_t_1 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_1) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "mpi4py/MPI/Datatype.pyx":785 * cdef int keyval_save = keyval * CHKERR( MPI_Type_free_keyval(&keyval) ) * try: del type_keyval[keyval_save] # <<<<<<<<<<<<<< * except KeyError: pass * return keyval */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/Datatype.pyx":787 * try: del type_keyval[keyval_save] * except KeyError: pass * return keyval # <<<<<<<<<<<<<< * * # Naming Objects */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_5)) __PYX_ERR(21, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":779 * * @classmethod * def Free_keyval(cls, int keyval): # <<<<<<<<<<<<<< * """ * Free and attribute key for datatypes */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Free_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":792 * # -------------- * * def Get_name(self): # <<<<<<<<<<<<<< * """ * Get the print name for this datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_79Get_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_78Get_name[] = "Datatype.Get_name(self)\n\n Get the print name for this datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_79Get_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_name (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_name", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_name", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_78Get_name(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_78Get_name(struct PyMPIDatatypeObject *__pyx_v_self) { char __pyx_v_name[(MPI_MAX_OBJECT_NAME + 1)]; int __pyx_v_nlen; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_name", 0); /* "mpi4py/MPI/Datatype.pyx":797 * """ * cdef char name[MPI_MAX_OBJECT_NAME+1] * cdef int nlen = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Type_get_name(self.ob_mpi, name, &nlen) ) * return tompistr(name, nlen) */ __pyx_v_nlen = 0; /* "mpi4py/MPI/Datatype.pyx":798 * cdef char name[MPI_MAX_OBJECT_NAME+1] * cdef int nlen = 0 * CHKERR( MPI_Type_get_name(self.ob_mpi, name, &nlen) ) # <<<<<<<<<<<<<< * return tompistr(name, nlen) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_get_name(__pyx_v_self->ob_mpi, __pyx_v_name, (&__pyx_v_nlen))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(21, 798, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":799 * cdef int nlen = 0 * CHKERR( MPI_Type_get_name(self.ob_mpi, name, &nlen) ) * return tompistr(name, nlen) # <<<<<<<<<<<<<< * * def Set_name(self, name): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_tompistr(__pyx_v_name, __pyx_v_nlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":792 * # -------------- * * def Get_name(self): # <<<<<<<<<<<<<< * """ * Get the print name for this datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Get_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":801 * return tompistr(name, nlen) * * def Set_name(self, name): # <<<<<<<<<<<<<< * """ * Set the print name for this datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_81Set_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_80Set_name[] = "Datatype.Set_name(self, name)\n\n Set the print name for this datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_81Set_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_name (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_name") < 0)) __PYX_ERR(21, 801, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_name = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_name", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 801, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.Set_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_80Set_name(((struct PyMPIDatatypeObject *)__pyx_v_self), __pyx_v_name); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_80Set_name(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_name) { char *__pyx_v_cname; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Set_name", 0); __Pyx_INCREF(__pyx_v_name); /* "mpi4py/MPI/Datatype.pyx":805 * Set the print name for this datatype * """ * cdef char *cname = NULL # <<<<<<<<<<<<<< * name = asmpistr(name, &cname) * CHKERR( MPI_Type_set_name(self.ob_mpi, cname) ) */ __pyx_v_cname = NULL; /* "mpi4py/MPI/Datatype.pyx":806 * """ * cdef char *cname = NULL * name = asmpistr(name, &cname) # <<<<<<<<<<<<<< * CHKERR( MPI_Type_set_name(self.ob_mpi, cname) ) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_name, (&__pyx_v_cname)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":807 * cdef char *cname = NULL * name = asmpistr(name, &cname) * CHKERR( MPI_Type_set_name(self.ob_mpi, cname) ) # <<<<<<<<<<<<<< * * property name: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Type_set_name(__pyx_v_self->ob_mpi, __pyx_v_cname)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(21, 807, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":801 * return tompistr(name, nlen) * * def Set_name(self, name): # <<<<<<<<<<<<<< * """ * Set the print name for this datatype */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Datatype.Set_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":811 * property name: * """datatype name""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_name() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_4name___get__(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_4name___get__(struct PyMPIDatatypeObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Datatype.pyx":812 * """datatype name""" * def __get__(self): * return self.Get_name() # <<<<<<<<<<<<<< * def __set__(self, value): * self.Set_name(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":811 * property name: * """datatype name""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_name() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Datatype.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":813 * def __get__(self): * return self.Get_name() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_name(value) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_8Datatype_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_8Datatype_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_4name_2__set__(((struct PyMPIDatatypeObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_8Datatype_4name_2__set__(struct PyMPIDatatypeObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/Datatype.pyx":814 * return self.Get_name() * def __set__(self, value): * self.Set_name(value) # <<<<<<<<<<<<<< * * # Fortran Handle */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(21, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Datatype.pyx":813 * def __get__(self): * return self.Get_name() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_name(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Datatype.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":819 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_83py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_82py2f[] = "Datatype.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_83py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_82py2f(((struct PyMPIDatatypeObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_82py2f(struct PyMPIDatatypeObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Datatype.pyx":822 * """ * """ * return MPI_Type_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_Type_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":819 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Datatype.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":825 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_85f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Datatype_84f2py[] = "Datatype.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Datatype_85f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(21, 825, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 825, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Datatype.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Datatype_84f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Datatype_84f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; MPI_Fint __pyx_t_3; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Datatype.pyx":828 * """ * """ * cdef Datatype datatype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * datatype.ob_mpi = MPI_Type_f2c(arg) * return datatype */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 828, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_datatype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Datatype.pyx":829 * """ * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = MPI_Type_f2c(arg) # <<<<<<<<<<<<<< * return datatype * */ __pyx_t_3 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_3 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 829, __pyx_L1_error) __pyx_v_datatype->ob_mpi = MPI_Type_f2c(__pyx_t_3); /* "mpi4py/MPI/Datatype.pyx":830 * cdef Datatype datatype = Datatype.__new__(Datatype) * datatype.ob_mpi = MPI_Type_f2c(arg) * return datatype # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_datatype)); __pyx_r = ((PyObject *)__pyx_v_datatype); goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":825 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Datatype.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_datatype); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":836 * # ----------------- * * def Get_address(location): # <<<<<<<<<<<<<< * """ * Get the address of a location in memory */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_15Get_address(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_14Get_address[] = "Get_address(location)\n\n Get the address of a location in memory\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_15Get_address = {"Get_address", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_15Get_address, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_14Get_address}; static PyObject *__pyx_pw_6mpi4py_3MPI_15Get_address(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_location = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_address (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_location,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_location)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_address") < 0)) __PYX_ERR(21, 836, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_location = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_address", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 836, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Get_address", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_14Get_address(__pyx_self, __pyx_v_location); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_14Get_address(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_location) { void *__pyx_v_baseptr; MPI_Aint __pyx_v_address; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("Get_address", 0); /* "mpi4py/MPI/Datatype.pyx":840 * Get the address of a location in memory * """ * cdef void *baseptr = MPI_BOTTOM # <<<<<<<<<<<<<< * if location is not __BOTTOM__: * getbuffer_r(location, &baseptr, NULL) */ __pyx_v_baseptr = MPI_BOTTOM; /* "mpi4py/MPI/Datatype.pyx":841 * """ * cdef void *baseptr = MPI_BOTTOM * if location is not __BOTTOM__: # <<<<<<<<<<<<<< * getbuffer_r(location, &baseptr, NULL) * cdef MPI_Aint address = 0 */ __pyx_t_1 = (__pyx_v_location != __pyx_v_6mpi4py_3MPI___BOTTOM__); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Datatype.pyx":842 * cdef void *baseptr = MPI_BOTTOM * if location is not __BOTTOM__: * getbuffer_r(location, &baseptr, NULL) # <<<<<<<<<<<<<< * cdef MPI_Aint address = 0 * CHKERR( MPI_Get_address(baseptr, &address) ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_r(__pyx_v_location, (&__pyx_v_baseptr), NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":841 * """ * cdef void *baseptr = MPI_BOTTOM * if location is not __BOTTOM__: # <<<<<<<<<<<<<< * getbuffer_r(location, &baseptr, NULL) * cdef MPI_Aint address = 0 */ } /* "mpi4py/MPI/Datatype.pyx":843 * if location is not __BOTTOM__: * getbuffer_r(location, &baseptr, NULL) * cdef MPI_Aint address = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Get_address(baseptr, &address) ) * return address */ __pyx_v_address = 0; /* "mpi4py/MPI/Datatype.pyx":844 * getbuffer_r(location, &baseptr, NULL) * cdef MPI_Aint address = 0 * CHKERR( MPI_Get_address(baseptr, &address) ) # <<<<<<<<<<<<<< * return address * */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_address(__pyx_v_baseptr, (&__pyx_v_address))); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(21, 844, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":845 * cdef MPI_Aint address = 0 * CHKERR( MPI_Get_address(baseptr, &address) ) * return address # <<<<<<<<<<<<<< * * def Aint_add(Aint base, Aint disp): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":836 * # ----------------- * * def Get_address(location): # <<<<<<<<<<<<<< * """ * Get the address of a location in memory */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Get_address", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":847 * return address * * def Aint_add(Aint base, Aint disp): # <<<<<<<<<<<<<< * """ * Return the sum of base address and displacement */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_17Aint_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_16Aint_add[] = "Aint_add(Aint base, Aint disp)\n\n Return the sum of base address and displacement\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_17Aint_add = {"Aint_add", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_17Aint_add, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_16Aint_add}; static PyObject *__pyx_pw_6mpi4py_3MPI_17Aint_add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Aint __pyx_v_base; MPI_Aint __pyx_v_disp; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Aint_add (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_base,&__pyx_n_s_disp,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_disp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Aint_add", 1, 2, 2, 1); __PYX_ERR(21, 847, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Aint_add") < 0)) __PYX_ERR(21, 847, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_base = __Pyx_PyInt_As_MPI_Aint(values[0]); if (unlikely((__pyx_v_base == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 847, __pyx_L3_error) __pyx_v_disp = __Pyx_PyInt_As_MPI_Aint(values[1]); if (unlikely((__pyx_v_disp == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 847, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Aint_add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 847, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Aint_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_16Aint_add(__pyx_self, __pyx_v_base, __pyx_v_disp); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_16Aint_add(CYTHON_UNUSED PyObject *__pyx_self, MPI_Aint __pyx_v_base, MPI_Aint __pyx_v_disp) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("Aint_add", 0); /* "mpi4py/MPI/Datatype.pyx":851 * Return the sum of base address and displacement * """ * return MPI_Aint_add(base, disp) # <<<<<<<<<<<<<< * * def Aint_diff(Aint addr1, Aint addr2): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Aint(MPI_Aint_add(__pyx_v_base, __pyx_v_disp)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":847 * return address * * def Aint_add(Aint base, Aint disp): # <<<<<<<<<<<<<< * """ * Return the sum of base address and displacement */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Aint_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Datatype.pyx":853 * return MPI_Aint_add(base, disp) * * def Aint_diff(Aint addr1, Aint addr2): # <<<<<<<<<<<<<< * """ * Return the difference between absolute addresses */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_19Aint_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_18Aint_diff[] = "Aint_diff(Aint addr1, Aint addr2)\n\n Return the difference between absolute addresses\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_19Aint_diff = {"Aint_diff", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_19Aint_diff, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_18Aint_diff}; static PyObject *__pyx_pw_6mpi4py_3MPI_19Aint_diff(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Aint __pyx_v_addr1; MPI_Aint __pyx_v_addr2; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Aint_diff (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_addr1,&__pyx_n_s_addr2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_addr2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Aint_diff", 1, 2, 2, 1); __PYX_ERR(21, 853, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Aint_diff") < 0)) __PYX_ERR(21, 853, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_addr1 = __Pyx_PyInt_As_MPI_Aint(values[0]); if (unlikely((__pyx_v_addr1 == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 853, __pyx_L3_error) __pyx_v_addr2 = __Pyx_PyInt_As_MPI_Aint(values[1]); if (unlikely((__pyx_v_addr2 == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(21, 853, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Aint_diff", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(21, 853, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Aint_diff", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_18Aint_diff(__pyx_self, __pyx_v_addr1, __pyx_v_addr2); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_18Aint_diff(CYTHON_UNUSED PyObject *__pyx_self, MPI_Aint __pyx_v_addr1, MPI_Aint __pyx_v_addr2) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("Aint_diff", 0); /* "mpi4py/MPI/Datatype.pyx":857 * Return the difference between absolute addresses * """ * return MPI_Aint_diff(addr1, addr2) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Aint(MPI_Aint_diff(__pyx_v_addr1, __pyx_v_addr2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Datatype.pyx":853 * return MPI_Aint_add(base, disp) * * def Aint_diff(Aint addr1, Aint addr2): # <<<<<<<<<<<<<< * """ * Return the difference between absolute addresses */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Aint_diff", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/typemap.pxi":3 * # ----------------------------------------------------------------------------- * * cdef inline int AddTypeMap(dict TD, const char tc[], Datatype dt) except -1: # <<<<<<<<<<<<<< * if dt.ob_mpi != MPI_DATATYPE_NULL: * TD[pystr(tc)] = dt */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI_AddTypeMap(PyObject *__pyx_v_TD, char const *__pyx_v_tc, struct PyMPIDatatypeObject *__pyx_v_dt) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("AddTypeMap", 0); /* "mpi4py/MPI/typemap.pxi":4 * * cdef inline int AddTypeMap(dict TD, const char tc[], Datatype dt) except -1: * if dt.ob_mpi != MPI_DATATYPE_NULL: # <<<<<<<<<<<<<< * TD[pystr(tc)] = dt * return 1 */ __pyx_t_1 = ((__pyx_v_dt->ob_mpi != MPI_DATATYPE_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/typemap.pxi":5 * cdef inline int AddTypeMap(dict TD, const char tc[], Datatype dt) except -1: * if dt.ob_mpi != MPI_DATATYPE_NULL: * TD[pystr(tc)] = dt # <<<<<<<<<<<<<< * return 1 * return 0 */ if (unlikely(__pyx_v_TD == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(22, 5, __pyx_L1_error) } __pyx_t_2 = __pyx_f_6mpi4py_3MPI_pystr(__pyx_v_tc); if (unlikely(!__pyx_t_2)) __PYX_ERR(22, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyDict_SetItem(__pyx_v_TD, __pyx_t_2, ((PyObject *)__pyx_v_dt)) < 0)) __PYX_ERR(22, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/typemap.pxi":6 * if dt.ob_mpi != MPI_DATATYPE_NULL: * TD[pystr(tc)] = dt * return 1 # <<<<<<<<<<<<<< * return 0 * */ __pyx_r = 1; goto __pyx_L0; /* "mpi4py/MPI/typemap.pxi":4 * * cdef inline int AddTypeMap(dict TD, const char tc[], Datatype dt) except -1: * if dt.ob_mpi != MPI_DATATYPE_NULL: # <<<<<<<<<<<<<< * TD[pystr(tc)] = dt * return 1 */ } /* "mpi4py/MPI/typemap.pxi":7 * TD[pystr(tc)] = dt * return 1 * return 0 # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/typemap.pxi":3 * # ----------------------------------------------------------------------------- * * cdef inline int AddTypeMap(dict TD, const char tc[], Datatype dt) except -1: # <<<<<<<<<<<<<< * if dt.ob_mpi != MPI_DATATYPE_NULL: * TD[pystr(tc)] = dt */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.AddTypeMap", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/typestr.pxi":3 * # ----------------------------------------------------------------------------- * * def _typecode(Datatype datatype): # <<<<<<<<<<<<<< * """ * Map MPI datatype to typecode string */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_21_typecode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_20_typecode[] = "_typecode(Datatype datatype)\n\n Map MPI datatype to typecode string\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_21_typecode = {"_typecode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_21_typecode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_20_typecode}; static PyObject *__pyx_pw_6mpi4py_3MPI_21_typecode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_typecode (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datatype,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_typecode") < 0)) __PYX_ERR(23, 3, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_datatype = ((struct PyMPIDatatypeObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_typecode", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(23, 3, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI._typecode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_datatype), __pyx_ptype_6mpi4py_3MPI_Datatype, 0, "datatype", 0))) __PYX_ERR(23, 3, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_20_typecode(__pyx_self, __pyx_v_datatype); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_20_typecode(CYTHON_UNUSED PyObject *__pyx_self, struct PyMPIDatatypeObject *__pyx_v_datatype) { char const *__pyx_v_tc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_typecode", 0); /* "mpi4py/MPI/typestr.pxi":7 * Map MPI datatype to typecode string * """ * cdef const char *tc = Datatype2String(datatype.ob_mpi) # <<<<<<<<<<<<<< * return pystr(tc) if tc != NULL else None * */ __pyx_v_tc = __pyx_f_6mpi4py_3MPI_Datatype2String(__pyx_v_datatype->ob_mpi); /* "mpi4py/MPI/typestr.pxi":8 * """ * cdef const char *tc = Datatype2String(datatype.ob_mpi) * return pystr(tc) if tc != NULL else None # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_tc != NULL) != 0)) { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_pystr(__pyx_v_tc); if (unlikely(!__pyx_t_2)) __PYX_ERR(23, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/typestr.pxi":3 * # ----------------------------------------------------------------------------- * * def _typecode(Datatype datatype): # <<<<<<<<<<<<<< * """ * Map MPI datatype to typecode string */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI._typecode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/typestr.pxi":12 * # ----------------------------------------------------------------------------- * * cdef inline const char* Datatype2String(MPI_Datatype datatype) nogil: # <<<<<<<<<<<<<< * if datatype == MPI_DATATYPE_NULL: return NULL * # MPI */ static CYTHON_INLINE char const *__pyx_f_6mpi4py_3MPI_Datatype2String(MPI_Datatype __pyx_v_datatype) { char const *__pyx_r; int __pyx_t_1; /* "mpi4py/MPI/typestr.pxi":13 * * cdef inline const char* Datatype2String(MPI_Datatype datatype) nogil: * if datatype == MPI_DATATYPE_NULL: return NULL # <<<<<<<<<<<<<< * # MPI * elif datatype == MPI_LB : return NULL */ __pyx_t_1 = ((__pyx_v_datatype == MPI_DATATYPE_NULL) != 0); if (__pyx_t_1) { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":15 * if datatype == MPI_DATATYPE_NULL: return NULL * # MPI * elif datatype == MPI_LB : return NULL # <<<<<<<<<<<<<< * elif datatype == MPI_UB : return NULL * elif datatype == MPI_PACKED : return "B" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_LB) != 0); if (__pyx_t_1) { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":16 * # MPI * elif datatype == MPI_LB : return NULL * elif datatype == MPI_UB : return NULL # <<<<<<<<<<<<<< * elif datatype == MPI_PACKED : return "B" * elif datatype == MPI_BYTE : return "B" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UB) != 0); if (__pyx_t_1) { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":17 * elif datatype == MPI_LB : return NULL * elif datatype == MPI_UB : return NULL * elif datatype == MPI_PACKED : return "B" # <<<<<<<<<<<<<< * elif datatype == MPI_BYTE : return "B" * elif datatype == MPI_AINT : return "p" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_PACKED) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"B"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":18 * elif datatype == MPI_UB : return NULL * elif datatype == MPI_PACKED : return "B" * elif datatype == MPI_BYTE : return "B" # <<<<<<<<<<<<<< * elif datatype == MPI_AINT : return "p" * elif datatype == MPI_OFFSET : */ __pyx_t_1 = ((__pyx_v_datatype == MPI_BYTE) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"B"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":19 * elif datatype == MPI_PACKED : return "B" * elif datatype == MPI_BYTE : return "B" * elif datatype == MPI_AINT : return "p" # <<<<<<<<<<<<<< * elif datatype == MPI_OFFSET : * if sizeof(MPI_Offset) == sizeof(MPI_Aint) : return "p" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_AINT) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"p"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":20 * elif datatype == MPI_BYTE : return "B" * elif datatype == MPI_AINT : return "p" * elif datatype == MPI_OFFSET : # <<<<<<<<<<<<<< * if sizeof(MPI_Offset) == sizeof(MPI_Aint) : return "p" * elif sizeof(MPI_Offset) == sizeof(long long) : return "q" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_OFFSET) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/typestr.pxi":21 * elif datatype == MPI_AINT : return "p" * elif datatype == MPI_OFFSET : * if sizeof(MPI_Offset) == sizeof(MPI_Aint) : return "p" # <<<<<<<<<<<<<< * elif sizeof(MPI_Offset) == sizeof(long long) : return "q" * elif sizeof(MPI_Offset) == sizeof(long) : return "l" */ __pyx_t_1 = (((sizeof(MPI_Offset)) == (sizeof(MPI_Aint))) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"p"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":22 * elif datatype == MPI_OFFSET : * if sizeof(MPI_Offset) == sizeof(MPI_Aint) : return "p" * elif sizeof(MPI_Offset) == sizeof(long long) : return "q" # <<<<<<<<<<<<<< * elif sizeof(MPI_Offset) == sizeof(long) : return "l" * elif sizeof(MPI_Offset) == sizeof(int) : return "i" */ __pyx_t_1 = (((sizeof(MPI_Offset)) == (sizeof(PY_LONG_LONG))) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"q"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":23 * if sizeof(MPI_Offset) == sizeof(MPI_Aint) : return "p" * elif sizeof(MPI_Offset) == sizeof(long long) : return "q" * elif sizeof(MPI_Offset) == sizeof(long) : return "l" # <<<<<<<<<<<<<< * elif sizeof(MPI_Offset) == sizeof(int) : return "i" * else : return NULL */ __pyx_t_1 = (((sizeof(MPI_Offset)) == (sizeof(long))) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"l"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":24 * elif sizeof(MPI_Offset) == sizeof(long long) : return "q" * elif sizeof(MPI_Offset) == sizeof(long) : return "l" * elif sizeof(MPI_Offset) == sizeof(int) : return "i" # <<<<<<<<<<<<<< * else : return NULL * # C - character */ __pyx_t_1 = (((sizeof(MPI_Offset)) == (sizeof(int))) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":25 * elif sizeof(MPI_Offset) == sizeof(long) : return "l" * elif sizeof(MPI_Offset) == sizeof(int) : return "i" * else : return NULL # <<<<<<<<<<<<<< * # C - character * elif datatype == MPI_CHAR : return "c" */ /*else*/ { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":20 * elif datatype == MPI_BYTE : return "B" * elif datatype == MPI_AINT : return "p" * elif datatype == MPI_OFFSET : # <<<<<<<<<<<<<< * if sizeof(MPI_Offset) == sizeof(MPI_Aint) : return "p" * elif sizeof(MPI_Offset) == sizeof(long long) : return "q" */ } /* "mpi4py/MPI/typestr.pxi":27 * else : return NULL * # C - character * elif datatype == MPI_CHAR : return "c" # <<<<<<<<<<<<<< * elif datatype == MPI_WCHAR : return NULL * # C - (signed) integral */ __pyx_t_1 = ((__pyx_v_datatype == MPI_CHAR) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"c"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":28 * # C - character * elif datatype == MPI_CHAR : return "c" * elif datatype == MPI_WCHAR : return NULL # <<<<<<<<<<<<<< * # C - (signed) integral * elif datatype == MPI_SIGNED_CHAR : return "b" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_WCHAR) != 0); if (__pyx_t_1) { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":30 * elif datatype == MPI_WCHAR : return NULL * # C - (signed) integral * elif datatype == MPI_SIGNED_CHAR : return "b" # <<<<<<<<<<<<<< * elif datatype == MPI_SHORT : return "h" * elif datatype == MPI_INT : return "i" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_SIGNED_CHAR) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"b"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":31 * # C - (signed) integral * elif datatype == MPI_SIGNED_CHAR : return "b" * elif datatype == MPI_SHORT : return "h" # <<<<<<<<<<<<<< * elif datatype == MPI_INT : return "i" * elif datatype == MPI_LONG : return "l" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_SHORT) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"h"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":32 * elif datatype == MPI_SIGNED_CHAR : return "b" * elif datatype == MPI_SHORT : return "h" * elif datatype == MPI_INT : return "i" # <<<<<<<<<<<<<< * elif datatype == MPI_LONG : return "l" * elif datatype == MPI_LONG_LONG : return "q" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INT) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":33 * elif datatype == MPI_SHORT : return "h" * elif datatype == MPI_INT : return "i" * elif datatype == MPI_LONG : return "l" # <<<<<<<<<<<<<< * elif datatype == MPI_LONG_LONG : return "q" * # C - unsigned integral */ __pyx_t_1 = ((__pyx_v_datatype == MPI_LONG) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"l"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":34 * elif datatype == MPI_INT : return "i" * elif datatype == MPI_LONG : return "l" * elif datatype == MPI_LONG_LONG : return "q" # <<<<<<<<<<<<<< * # C - unsigned integral * elif datatype == MPI_UNSIGNED_CHAR : return "B" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_LONG_LONG) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"q"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":36 * elif datatype == MPI_LONG_LONG : return "q" * # C - unsigned integral * elif datatype == MPI_UNSIGNED_CHAR : return "B" # <<<<<<<<<<<<<< * elif datatype == MPI_UNSIGNED_SHORT : return "H" * elif datatype == MPI_UNSIGNED : return "I" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UNSIGNED_CHAR) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"B"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":37 * # C - unsigned integral * elif datatype == MPI_UNSIGNED_CHAR : return "B" * elif datatype == MPI_UNSIGNED_SHORT : return "H" # <<<<<<<<<<<<<< * elif datatype == MPI_UNSIGNED : return "I" * elif datatype == MPI_UNSIGNED_LONG : return "L" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UNSIGNED_SHORT) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"H"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":38 * elif datatype == MPI_UNSIGNED_CHAR : return "B" * elif datatype == MPI_UNSIGNED_SHORT : return "H" * elif datatype == MPI_UNSIGNED : return "I" # <<<<<<<<<<<<<< * elif datatype == MPI_UNSIGNED_LONG : return "L" * elif datatype == MPI_UNSIGNED_LONG_LONG : return "Q" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UNSIGNED) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"I"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":39 * elif datatype == MPI_UNSIGNED_SHORT : return "H" * elif datatype == MPI_UNSIGNED : return "I" * elif datatype == MPI_UNSIGNED_LONG : return "L" # <<<<<<<<<<<<<< * elif datatype == MPI_UNSIGNED_LONG_LONG : return "Q" * # C - (real) floating */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UNSIGNED_LONG) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"L"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":40 * elif datatype == MPI_UNSIGNED : return "I" * elif datatype == MPI_UNSIGNED_LONG : return "L" * elif datatype == MPI_UNSIGNED_LONG_LONG : return "Q" # <<<<<<<<<<<<<< * # C - (real) floating * elif datatype == MPI_FLOAT : return "f" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UNSIGNED_LONG_LONG) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"Q"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":42 * elif datatype == MPI_UNSIGNED_LONG_LONG : return "Q" * # C - (real) floating * elif datatype == MPI_FLOAT : return "f" # <<<<<<<<<<<<<< * elif datatype == MPI_DOUBLE : return "d" * elif datatype == MPI_LONG_DOUBLE : return "g" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_FLOAT) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"f"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":43 * # C - (real) floating * elif datatype == MPI_FLOAT : return "f" * elif datatype == MPI_DOUBLE : return "d" # <<<<<<<<<<<<<< * elif datatype == MPI_LONG_DOUBLE : return "g" * # C99 - boolean */ __pyx_t_1 = ((__pyx_v_datatype == MPI_DOUBLE) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"d"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":44 * elif datatype == MPI_FLOAT : return "f" * elif datatype == MPI_DOUBLE : return "d" * elif datatype == MPI_LONG_DOUBLE : return "g" # <<<<<<<<<<<<<< * # C99 - boolean * elif datatype == MPI_C_BOOL : return "?" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_LONG_DOUBLE) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"g"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":46 * elif datatype == MPI_LONG_DOUBLE : return "g" * # C99 - boolean * elif datatype == MPI_C_BOOL : return "?" # <<<<<<<<<<<<<< * # C99 - integral * elif datatype == MPI_INT8_T : return "i1" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_C_BOOL) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"?"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":48 * elif datatype == MPI_C_BOOL : return "?" * # C99 - integral * elif datatype == MPI_INT8_T : return "i1" # <<<<<<<<<<<<<< * elif datatype == MPI_INT16_T : return "i2" * elif datatype == MPI_INT32_T : return "i4" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INT8_T) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i1"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":49 * # C99 - integral * elif datatype == MPI_INT8_T : return "i1" * elif datatype == MPI_INT16_T : return "i2" # <<<<<<<<<<<<<< * elif datatype == MPI_INT32_T : return "i4" * elif datatype == MPI_INT64_T : return "i8" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INT16_T) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i2"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":50 * elif datatype == MPI_INT8_T : return "i1" * elif datatype == MPI_INT16_T : return "i2" * elif datatype == MPI_INT32_T : return "i4" # <<<<<<<<<<<<<< * elif datatype == MPI_INT64_T : return "i8" * elif datatype == MPI_UINT8_T : return "u1" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INT32_T) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i4"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":51 * elif datatype == MPI_INT16_T : return "i2" * elif datatype == MPI_INT32_T : return "i4" * elif datatype == MPI_INT64_T : return "i8" # <<<<<<<<<<<<<< * elif datatype == MPI_UINT8_T : return "u1" * elif datatype == MPI_UINT16_T : return "u2" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INT64_T) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i8"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":52 * elif datatype == MPI_INT32_T : return "i4" * elif datatype == MPI_INT64_T : return "i8" * elif datatype == MPI_UINT8_T : return "u1" # <<<<<<<<<<<<<< * elif datatype == MPI_UINT16_T : return "u2" * elif datatype == MPI_UINT32_T : return "u4" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UINT8_T) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"u1"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":53 * elif datatype == MPI_INT64_T : return "i8" * elif datatype == MPI_UINT8_T : return "u1" * elif datatype == MPI_UINT16_T : return "u2" # <<<<<<<<<<<<<< * elif datatype == MPI_UINT32_T : return "u4" * elif datatype == MPI_UINT64_T : return "u8" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UINT16_T) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"u2"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":54 * elif datatype == MPI_UINT8_T : return "u1" * elif datatype == MPI_UINT16_T : return "u2" * elif datatype == MPI_UINT32_T : return "u4" # <<<<<<<<<<<<<< * elif datatype == MPI_UINT64_T : return "u8" * # C99 - complex floating */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UINT32_T) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"u4"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":55 * elif datatype == MPI_UINT16_T : return "u2" * elif datatype == MPI_UINT32_T : return "u4" * elif datatype == MPI_UINT64_T : return "u8" # <<<<<<<<<<<<<< * # C99 - complex floating * elif datatype == MPI_C_COMPLEX : return "F" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_UINT64_T) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"u8"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":57 * elif datatype == MPI_UINT64_T : return "u8" * # C99 - complex floating * elif datatype == MPI_C_COMPLEX : return "F" # <<<<<<<<<<<<<< * elif datatype == MPI_C_FLOAT_COMPLEX : return "F" * elif datatype == MPI_C_DOUBLE_COMPLEX : return "D" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_C_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"F"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":58 * # C99 - complex floating * elif datatype == MPI_C_COMPLEX : return "F" * elif datatype == MPI_C_FLOAT_COMPLEX : return "F" # <<<<<<<<<<<<<< * elif datatype == MPI_C_DOUBLE_COMPLEX : return "D" * elif datatype == MPI_C_LONG_DOUBLE_COMPLEX : return "G" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_C_FLOAT_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"F"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":59 * elif datatype == MPI_C_COMPLEX : return "F" * elif datatype == MPI_C_FLOAT_COMPLEX : return "F" * elif datatype == MPI_C_DOUBLE_COMPLEX : return "D" # <<<<<<<<<<<<<< * elif datatype == MPI_C_LONG_DOUBLE_COMPLEX : return "G" * # C++ - boolean */ __pyx_t_1 = ((__pyx_v_datatype == MPI_C_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"D"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":60 * elif datatype == MPI_C_FLOAT_COMPLEX : return "F" * elif datatype == MPI_C_DOUBLE_COMPLEX : return "D" * elif datatype == MPI_C_LONG_DOUBLE_COMPLEX : return "G" # <<<<<<<<<<<<<< * # C++ - boolean * elif datatype == MPI_CXX_BOOL : return "?" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_C_LONG_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"G"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":62 * elif datatype == MPI_C_LONG_DOUBLE_COMPLEX : return "G" * # C++ - boolean * elif datatype == MPI_CXX_BOOL : return "?" # <<<<<<<<<<<<<< * # C++ - complex floating * elif datatype == MPI_CXX_FLOAT_COMPLEX : return "F" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_CXX_BOOL) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"?"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":64 * elif datatype == MPI_CXX_BOOL : return "?" * # C++ - complex floating * elif datatype == MPI_CXX_FLOAT_COMPLEX : return "F" # <<<<<<<<<<<<<< * elif datatype == MPI_CXX_DOUBLE_COMPLEX : return "D" * elif datatype == MPI_CXX_LONG_DOUBLE_COMPLEX : return "G" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_CXX_FLOAT_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"F"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":65 * # C++ - complex floating * elif datatype == MPI_CXX_FLOAT_COMPLEX : return "F" * elif datatype == MPI_CXX_DOUBLE_COMPLEX : return "D" # <<<<<<<<<<<<<< * elif datatype == MPI_CXX_LONG_DOUBLE_COMPLEX : return "G" * # Fortran */ __pyx_t_1 = ((__pyx_v_datatype == MPI_CXX_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"D"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":66 * elif datatype == MPI_CXX_FLOAT_COMPLEX : return "F" * elif datatype == MPI_CXX_DOUBLE_COMPLEX : return "D" * elif datatype == MPI_CXX_LONG_DOUBLE_COMPLEX : return "G" # <<<<<<<<<<<<<< * # Fortran * elif datatype == MPI_CHARACTER : return "c" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_CXX_LONG_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"G"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":68 * elif datatype == MPI_CXX_LONG_DOUBLE_COMPLEX : return "G" * # Fortran * elif datatype == MPI_CHARACTER : return "c" # <<<<<<<<<<<<<< * elif datatype == MPI_LOGICAL : return NULL * elif datatype == MPI_INTEGER : return "i" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_CHARACTER) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"c"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":69 * # Fortran * elif datatype == MPI_CHARACTER : return "c" * elif datatype == MPI_LOGICAL : return NULL # <<<<<<<<<<<<<< * elif datatype == MPI_INTEGER : return "i" * elif datatype == MPI_REAL : return "f" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_LOGICAL) != 0); if (__pyx_t_1) { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":70 * elif datatype == MPI_CHARACTER : return "c" * elif datatype == MPI_LOGICAL : return NULL * elif datatype == MPI_INTEGER : return "i" # <<<<<<<<<<<<<< * elif datatype == MPI_REAL : return "f" * elif datatype == MPI_DOUBLE_PRECISION : return "d" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INTEGER) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":71 * elif datatype == MPI_LOGICAL : return NULL * elif datatype == MPI_INTEGER : return "i" * elif datatype == MPI_REAL : return "f" # <<<<<<<<<<<<<< * elif datatype == MPI_DOUBLE_PRECISION : return "d" * elif datatype == MPI_COMPLEX : return "F" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_REAL) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"f"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":72 * elif datatype == MPI_INTEGER : return "i" * elif datatype == MPI_REAL : return "f" * elif datatype == MPI_DOUBLE_PRECISION : return "d" # <<<<<<<<<<<<<< * elif datatype == MPI_COMPLEX : return "F" * elif datatype == MPI_DOUBLE_COMPLEX : return "D" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_DOUBLE_PRECISION) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"d"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":73 * elif datatype == MPI_REAL : return "f" * elif datatype == MPI_DOUBLE_PRECISION : return "d" * elif datatype == MPI_COMPLEX : return "F" # <<<<<<<<<<<<<< * elif datatype == MPI_DOUBLE_COMPLEX : return "D" * # Fortran 90 */ __pyx_t_1 = ((__pyx_v_datatype == MPI_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"F"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":74 * elif datatype == MPI_DOUBLE_PRECISION : return "d" * elif datatype == MPI_COMPLEX : return "F" * elif datatype == MPI_DOUBLE_COMPLEX : return "D" # <<<<<<<<<<<<<< * # Fortran 90 * elif datatype == MPI_LOGICAL1 : return NULL */ __pyx_t_1 = ((__pyx_v_datatype == MPI_DOUBLE_COMPLEX) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"D"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":76 * elif datatype == MPI_DOUBLE_COMPLEX : return "D" * # Fortran 90 * elif datatype == MPI_LOGICAL1 : return NULL # <<<<<<<<<<<<<< * elif datatype == MPI_LOGICAL2 : return NULL * elif datatype == MPI_LOGICAL4 : return NULL */ __pyx_t_1 = ((__pyx_v_datatype == MPI_LOGICAL1) != 0); if (__pyx_t_1) { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":77 * # Fortran 90 * elif datatype == MPI_LOGICAL1 : return NULL * elif datatype == MPI_LOGICAL2 : return NULL # <<<<<<<<<<<<<< * elif datatype == MPI_LOGICAL4 : return NULL * elif datatype == MPI_LOGICAL8 : return NULL */ __pyx_t_1 = ((__pyx_v_datatype == MPI_LOGICAL2) != 0); if (__pyx_t_1) { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":78 * elif datatype == MPI_LOGICAL1 : return NULL * elif datatype == MPI_LOGICAL2 : return NULL * elif datatype == MPI_LOGICAL4 : return NULL # <<<<<<<<<<<<<< * elif datatype == MPI_LOGICAL8 : return NULL * elif datatype == MPI_INTEGER1 : return "i1" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_LOGICAL4) != 0); if (__pyx_t_1) { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":79 * elif datatype == MPI_LOGICAL2 : return NULL * elif datatype == MPI_LOGICAL4 : return NULL * elif datatype == MPI_LOGICAL8 : return NULL # <<<<<<<<<<<<<< * elif datatype == MPI_INTEGER1 : return "i1" * elif datatype == MPI_INTEGER2 : return "i2" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_LOGICAL8) != 0); if (__pyx_t_1) { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":80 * elif datatype == MPI_LOGICAL4 : return NULL * elif datatype == MPI_LOGICAL8 : return NULL * elif datatype == MPI_INTEGER1 : return "i1" # <<<<<<<<<<<<<< * elif datatype == MPI_INTEGER2 : return "i2" * elif datatype == MPI_INTEGER4 : return "i4" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INTEGER1) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i1"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":81 * elif datatype == MPI_LOGICAL8 : return NULL * elif datatype == MPI_INTEGER1 : return "i1" * elif datatype == MPI_INTEGER2 : return "i2" # <<<<<<<<<<<<<< * elif datatype == MPI_INTEGER4 : return "i4" * elif datatype == MPI_INTEGER8 : return "i8" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INTEGER2) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i2"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":82 * elif datatype == MPI_INTEGER1 : return "i1" * elif datatype == MPI_INTEGER2 : return "i2" * elif datatype == MPI_INTEGER4 : return "i4" # <<<<<<<<<<<<<< * elif datatype == MPI_INTEGER8 : return "i8" * elif datatype == MPI_INTEGER16 : return "i16" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INTEGER4) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i4"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":83 * elif datatype == MPI_INTEGER2 : return "i2" * elif datatype == MPI_INTEGER4 : return "i4" * elif datatype == MPI_INTEGER8 : return "i8" # <<<<<<<<<<<<<< * elif datatype == MPI_INTEGER16 : return "i16" * elif datatype == MPI_REAL2 : return "f2" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INTEGER8) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i8"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":84 * elif datatype == MPI_INTEGER4 : return "i4" * elif datatype == MPI_INTEGER8 : return "i8" * elif datatype == MPI_INTEGER16 : return "i16" # <<<<<<<<<<<<<< * elif datatype == MPI_REAL2 : return "f2" * elif datatype == MPI_REAL4 : return "f4" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_INTEGER16) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"i16"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":85 * elif datatype == MPI_INTEGER8 : return "i8" * elif datatype == MPI_INTEGER16 : return "i16" * elif datatype == MPI_REAL2 : return "f2" # <<<<<<<<<<<<<< * elif datatype == MPI_REAL4 : return "f4" * elif datatype == MPI_REAL8 : return "f8" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_REAL2) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"f2"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":86 * elif datatype == MPI_INTEGER16 : return "i16" * elif datatype == MPI_REAL2 : return "f2" * elif datatype == MPI_REAL4 : return "f4" # <<<<<<<<<<<<<< * elif datatype == MPI_REAL8 : return "f8" * elif datatype == MPI_REAL16 : return "f16" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_REAL4) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"f4"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":87 * elif datatype == MPI_REAL2 : return "f2" * elif datatype == MPI_REAL4 : return "f4" * elif datatype == MPI_REAL8 : return "f8" # <<<<<<<<<<<<<< * elif datatype == MPI_REAL16 : return "f16" * elif datatype == MPI_COMPLEX4 : return "c4" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_REAL8) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"f8"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":88 * elif datatype == MPI_REAL4 : return "f4" * elif datatype == MPI_REAL8 : return "f8" * elif datatype == MPI_REAL16 : return "f16" # <<<<<<<<<<<<<< * elif datatype == MPI_COMPLEX4 : return "c4" * elif datatype == MPI_COMPLEX8 : return "c8" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_REAL16) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"f16"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":89 * elif datatype == MPI_REAL8 : return "f8" * elif datatype == MPI_REAL16 : return "f16" * elif datatype == MPI_COMPLEX4 : return "c4" # <<<<<<<<<<<<<< * elif datatype == MPI_COMPLEX8 : return "c8" * elif datatype == MPI_COMPLEX16 : return "c16" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_COMPLEX4) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"c4"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":90 * elif datatype == MPI_REAL16 : return "f16" * elif datatype == MPI_COMPLEX4 : return "c4" * elif datatype == MPI_COMPLEX8 : return "c8" # <<<<<<<<<<<<<< * elif datatype == MPI_COMPLEX16 : return "c16" * elif datatype == MPI_COMPLEX32 : return "c32" */ __pyx_t_1 = ((__pyx_v_datatype == MPI_COMPLEX8) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"c8"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":91 * elif datatype == MPI_COMPLEX4 : return "c4" * elif datatype == MPI_COMPLEX8 : return "c8" * elif datatype == MPI_COMPLEX16 : return "c16" # <<<<<<<<<<<<<< * elif datatype == MPI_COMPLEX32 : return "c32" * */ __pyx_t_1 = ((__pyx_v_datatype == MPI_COMPLEX16) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"c16"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":92 * elif datatype == MPI_COMPLEX8 : return "c8" * elif datatype == MPI_COMPLEX16 : return "c16" * elif datatype == MPI_COMPLEX32 : return "c32" # <<<<<<<<<<<<<< * * else : return NULL */ __pyx_t_1 = ((__pyx_v_datatype == MPI_COMPLEX32) != 0); if (__pyx_t_1) { __pyx_r = ((char const *)"c32"); goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":94 * elif datatype == MPI_COMPLEX32 : return "c32" * * else : return NULL # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ /*else*/ { __pyx_r = NULL; goto __pyx_L0; } /* "mpi4py/MPI/typestr.pxi":12 * # ----------------------------------------------------------------------------- * * cdef inline const char* Datatype2String(MPI_Datatype datatype) nogil: # <<<<<<<<<<<<<< * if datatype == MPI_DATATYPE_NULL: return NULL * # MPI */ /* function exit code */ __pyx_L0:; return __pyx_r; } /* "mpi4py/MPI/Status.pyx":7 * """ * * def __cinit__(self, Status status=None): # <<<<<<<<<<<<<< * self.ob_mpi.MPI_SOURCE = MPI_ANY_SOURCE * self.ob_mpi.MPI_TAG = MPI_ANY_TAG */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6Status_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6Status_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIStatusObject *__pyx_v_status = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(24, 7, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_status = ((struct PyMPIStatusObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 7, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(24, 7, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status___cinit__(((struct PyMPIStatusObject *)__pyx_v_self), __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6Status___cinit__(struct PyMPIStatusObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Status __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Status.pyx":8 * * def __cinit__(self, Status status=None): * self.ob_mpi.MPI_SOURCE = MPI_ANY_SOURCE # <<<<<<<<<<<<<< * self.ob_mpi.MPI_TAG = MPI_ANY_TAG * self.ob_mpi.MPI_ERROR = MPI_SUCCESS */ __pyx_v_self->ob_mpi.MPI_SOURCE = MPI_ANY_SOURCE; /* "mpi4py/MPI/Status.pyx":9 * def __cinit__(self, Status status=None): * self.ob_mpi.MPI_SOURCE = MPI_ANY_SOURCE * self.ob_mpi.MPI_TAG = MPI_ANY_TAG # <<<<<<<<<<<<<< * self.ob_mpi.MPI_ERROR = MPI_SUCCESS * if status is None: return */ __pyx_v_self->ob_mpi.MPI_TAG = MPI_ANY_TAG; /* "mpi4py/MPI/Status.pyx":10 * self.ob_mpi.MPI_SOURCE = MPI_ANY_SOURCE * self.ob_mpi.MPI_TAG = MPI_ANY_TAG * self.ob_mpi.MPI_ERROR = MPI_SUCCESS # <<<<<<<<<<<<<< * if status is None: return * self.ob_mpi = status.ob_mpi */ __pyx_v_self->ob_mpi.MPI_ERROR = MPI_SUCCESS; /* "mpi4py/MPI/Status.pyx":11 * self.ob_mpi.MPI_TAG = MPI_ANY_TAG * self.ob_mpi.MPI_ERROR = MPI_SUCCESS * if status is None: return # <<<<<<<<<<<<<< * self.ob_mpi = status.ob_mpi * */ __pyx_t_1 = (((PyObject *)__pyx_v_status) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Status.pyx":12 * self.ob_mpi.MPI_ERROR = MPI_SUCCESS * if status is None: return * self.ob_mpi = status.ob_mpi # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_3 = __pyx_v_status->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Status.pyx":7 * """ * * def __cinit__(self, Status status=None): # <<<<<<<<<<<<<< * self.ob_mpi.MPI_SOURCE = MPI_ANY_SOURCE * self.ob_mpi.MPI_TAG = MPI_ANY_TAG */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":14 * self.ob_mpi = status.ob_mpi * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Status): return NotImplemented * cdef Status s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_3__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_2__richcmp__(((struct PyMPIStatusObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_2__richcmp__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIStatusObject *__pyx_v_s = 0; struct PyMPIStatusObject *__pyx_v_o = 0; int __pyx_v_ne; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Status.pyx":15 * * def __richcmp__(self, other, int op): * if not isinstance(other, Status): return NotImplemented # <<<<<<<<<<<<<< * cdef Status s = self, o = other * cdef int ne = memcmp(&s.ob_mpi, &o.ob_mpi, sizeof(MPI_Status)) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Status); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Status.pyx":16 * def __richcmp__(self, other, int op): * if not isinstance(other, Status): return NotImplemented * cdef Status s = self, o = other # <<<<<<<<<<<<<< * cdef int ne = memcmp(&s.ob_mpi, &o.ob_mpi, sizeof(MPI_Status)) * if op == Py_EQ: return (ne == 0) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIStatusObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIStatusObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Status.pyx":17 * if not isinstance(other, Status): return NotImplemented * cdef Status s = self, o = other * cdef int ne = memcmp(&s.ob_mpi, &o.ob_mpi, sizeof(MPI_Status)) # <<<<<<<<<<<<<< * if op == Py_EQ: return (ne == 0) * elif op == Py_NE: return (ne != 0) */ __pyx_v_ne = memcmp((&__pyx_v_s->ob_mpi), (&__pyx_v_o->ob_mpi), (sizeof(MPI_Status))); /* "mpi4py/MPI/Status.pyx":18 * cdef Status s = self, o = other * cdef int ne = memcmp(&s.ob_mpi, &o.ob_mpi, sizeof(MPI_Status)) * if op == Py_EQ: return (ne == 0) # <<<<<<<<<<<<<< * elif op == Py_NE: return (ne != 0) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_ne == 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Status.pyx":19 * cdef int ne = memcmp(&s.ob_mpi, &o.ob_mpi, sizeof(MPI_Status)) * if op == Py_EQ: return (ne == 0) * elif op == Py_NE: return (ne != 0) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_ne != 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Status.pyx":20 * if op == Py_EQ: return (ne == 0) * elif op == Py_NE: return (ne != 0) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Status.pyx":21 * elif op == Py_NE: return (ne != 0) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Status.pyx":22 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def Get_source(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(24, 22, __pyx_L1_error) /* "mpi4py/MPI/Status.pyx":14 * self.ob_mpi = status.ob_mpi * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Status): return NotImplemented * cdef Status s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Status.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":24 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def Get_source(self): # <<<<<<<<<<<<<< * """ * Get message source */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_5Get_source(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_4Get_source[] = "Status.Get_source(self)\n\n Get message source\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_5Get_source(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_source (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_source", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_source", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_4Get_source(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_4Get_source(struct PyMPIStatusObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("Get_source", 0); /* "mpi4py/MPI/Status.pyx":28 * Get message source * """ * return self.ob_mpi.MPI_SOURCE # <<<<<<<<<<<<<< * * def Set_source(self, int source): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ob_mpi.MPI_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":24 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def Get_source(self): # <<<<<<<<<<<<<< * """ * Get message source */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Status.Get_source", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":30 * return self.ob_mpi.MPI_SOURCE * * def Set_source(self, int source): # <<<<<<<<<<<<<< * """ * Set message source */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_7Set_source(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_6Set_source[] = "Status.Set_source(self, int source)\n\n Set message source\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_7Set_source(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_source; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_source (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_source") < 0)) __PYX_ERR(24, 30, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_source = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(24, 30, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_source", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 30, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.Set_source", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_6Set_source(((struct PyMPIStatusObject *)__pyx_v_self), __pyx_v_source); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_6Set_source(struct PyMPIStatusObject *__pyx_v_self, int __pyx_v_source) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_source", 0); /* "mpi4py/MPI/Status.pyx":34 * Set message source * """ * self.ob_mpi.MPI_SOURCE = source # <<<<<<<<<<<<<< * * property source: */ __pyx_v_self->ob_mpi.MPI_SOURCE = __pyx_v_source; /* "mpi4py/MPI/Status.pyx":30 * return self.ob_mpi.MPI_SOURCE * * def Set_source(self, int source): # <<<<<<<<<<<<<< * """ * Set message source */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":38 * property source: * """source""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_source() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_6source_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_6source_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_6source___get__(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_6source___get__(struct PyMPIStatusObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Status.pyx":39 * """source""" * def __get__(self): * return self.Get_source() # <<<<<<<<<<<<<< * def __set__(self, value): * self.Set_source(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":38 * property source: * """source""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_source() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.source.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":40 * def __get__(self): * return self.Get_source() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_source(value) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6Status_6source_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6Status_6source_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_6source_2__set__(((struct PyMPIStatusObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6Status_6source_2__set__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/Status.pyx":41 * return self.Get_source() * def __set__(self, value): * self.Set_source(value) # <<<<<<<<<<<<<< * * def Get_tag(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Status.pyx":40 * def __get__(self): * return self.Get_source() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_source(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.source.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":43 * self.Set_source(value) * * def Get_tag(self): # <<<<<<<<<<<<<< * """ * Get message tag */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_9Get_tag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_8Get_tag[] = "Status.Get_tag(self)\n\n Get message tag\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_9Get_tag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_tag (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_tag", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_tag", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_8Get_tag(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_8Get_tag(struct PyMPIStatusObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("Get_tag", 0); /* "mpi4py/MPI/Status.pyx":47 * Get message tag * """ * return self.ob_mpi.MPI_TAG # <<<<<<<<<<<<<< * * def Set_tag(self, int tag): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ob_mpi.MPI_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":43 * self.Set_source(value) * * def Get_tag(self): # <<<<<<<<<<<<<< * """ * Get message tag */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Status.Get_tag", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":49 * return self.ob_mpi.MPI_TAG * * def Set_tag(self, int tag): # <<<<<<<<<<<<<< * """ * Set message tag */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_11Set_tag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_10Set_tag[] = "Status.Set_tag(self, int tag)\n\n Set message tag\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_11Set_tag(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_tag (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tag,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_tag") < 0)) __PYX_ERR(24, 49, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_tag = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(24, 49, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_tag", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 49, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.Set_tag", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_10Set_tag(((struct PyMPIStatusObject *)__pyx_v_self), __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_10Set_tag(struct PyMPIStatusObject *__pyx_v_self, int __pyx_v_tag) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_tag", 0); /* "mpi4py/MPI/Status.pyx":53 * Set message tag * """ * self.ob_mpi.MPI_TAG = tag # <<<<<<<<<<<<<< * * property tag: */ __pyx_v_self->ob_mpi.MPI_TAG = __pyx_v_tag; /* "mpi4py/MPI/Status.pyx":49 * return self.ob_mpi.MPI_TAG * * def Set_tag(self, int tag): # <<<<<<<<<<<<<< * """ * Set message tag */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":57 * property tag: * """tag""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_tag() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_3tag_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_3tag_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_3tag___get__(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_3tag___get__(struct PyMPIStatusObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Status.pyx":58 * """tag""" * def __get__(self): * return self.Get_tag() # <<<<<<<<<<<<<< * def __set__(self, value): * self.Set_tag(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":57 * property tag: * """tag""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_tag() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.tag.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":59 * def __get__(self): * return self.Get_tag() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_tag(value) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6Status_3tag_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6Status_3tag_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_3tag_2__set__(((struct PyMPIStatusObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6Status_3tag_2__set__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/Status.pyx":60 * return self.Get_tag() * def __set__(self, value): * self.Set_tag(value) # <<<<<<<<<<<<<< * * def Get_error(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Status.pyx":59 * def __get__(self): * return self.Get_tag() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_tag(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.tag.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":62 * self.Set_tag(value) * * def Get_error(self): # <<<<<<<<<<<<<< * """ * Get message error */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_13Get_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_12Get_error[] = "Status.Get_error(self)\n\n Get message error\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_13Get_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_error (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_error", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_error", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_12Get_error(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_12Get_error(struct PyMPIStatusObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("Get_error", 0); /* "mpi4py/MPI/Status.pyx":66 * Get message error * """ * return self.ob_mpi.MPI_ERROR # <<<<<<<<<<<<<< * * def Set_error(self, int error): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ob_mpi.MPI_ERROR); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":62 * self.Set_tag(value) * * def Get_error(self): # <<<<<<<<<<<<<< * """ * Get message error */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Status.Get_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":68 * return self.ob_mpi.MPI_ERROR * * def Set_error(self, int error): # <<<<<<<<<<<<<< * """ * Set message error */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_15Set_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_14Set_error[] = "Status.Set_error(self, int error)\n\n Set message error\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_15Set_error(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_error; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_error (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_error,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_error)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_error") < 0)) __PYX_ERR(24, 68, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_error = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_error == (int)-1) && PyErr_Occurred())) __PYX_ERR(24, 68, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_error", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 68, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.Set_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_14Set_error(((struct PyMPIStatusObject *)__pyx_v_self), __pyx_v_error); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_14Set_error(struct PyMPIStatusObject *__pyx_v_self, int __pyx_v_error) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_error", 0); /* "mpi4py/MPI/Status.pyx":72 * Set message error * """ * self.ob_mpi.MPI_ERROR = error # <<<<<<<<<<<<<< * * property error: */ __pyx_v_self->ob_mpi.MPI_ERROR = __pyx_v_error; /* "mpi4py/MPI/Status.pyx":68 * return self.ob_mpi.MPI_ERROR * * def Set_error(self, int error): # <<<<<<<<<<<<<< * """ * Set message error */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":76 * property error: * """error""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_error() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_5error_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_5error_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_5error___get__(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_5error___get__(struct PyMPIStatusObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Status.pyx":77 * """error""" * def __get__(self): * return self.Get_error() # <<<<<<<<<<<<<< * def __set__(self, value): * self.Set_error(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":76 * property error: * """error""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_error() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.error.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":78 * def __get__(self): * return self.Get_error() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_error(value) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6Status_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6Status_5error_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_5error_2__set__(((struct PyMPIStatusObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6Status_5error_2__set__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/Status.pyx":79 * return self.Get_error() * def __set__(self, value): * self.Set_error(value) # <<<<<<<<<<<<<< * * def Get_count(self, Datatype datatype=BYTE): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Status.pyx":78 * def __get__(self): * return self.Get_error() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_error(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.error.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":81 * self.Set_error(value) * * def Get_count(self, Datatype datatype=BYTE): # <<<<<<<<<<<<<< * """ * Get the number of *top level* elements */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_17Get_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_16Get_count[] = "Status.Get_count(self, Datatype datatype=BYTE)\n\n Get the number of *top level* elements\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_17Get_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_count (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datatype,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)__pyx_k__28; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datatype); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_count") < 0)) __PYX_ERR(24, 81, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_datatype = ((struct PyMPIDatatypeObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_count", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 81, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.Get_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_datatype), __pyx_ptype_6mpi4py_3MPI_Datatype, 0, "datatype", 0))) __PYX_ERR(24, 81, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_16Get_count(((struct PyMPIStatusObject *)__pyx_v_self), __pyx_v_datatype); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_16Get_count(struct PyMPIStatusObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype) { MPI_Datatype __pyx_v_dtype; int __pyx_v_count; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Datatype __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Get_count", 0); /* "mpi4py/MPI/Status.pyx":85 * Get the number of *top level* elements * """ * cdef MPI_Datatype dtype = datatype.ob_mpi # <<<<<<<<<<<<<< * cdef int count = MPI_UNDEFINED * CHKERR( MPI_Get_count(&self.ob_mpi, dtype, &count) ) */ __pyx_t_1 = __pyx_v_datatype->ob_mpi; __pyx_v_dtype = __pyx_t_1; /* "mpi4py/MPI/Status.pyx":86 * """ * cdef MPI_Datatype dtype = datatype.ob_mpi * cdef int count = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Get_count(&self.ob_mpi, dtype, &count) ) * return count */ __pyx_v_count = MPI_UNDEFINED; /* "mpi4py/MPI/Status.pyx":87 * cdef MPI_Datatype dtype = datatype.ob_mpi * cdef int count = MPI_UNDEFINED * CHKERR( MPI_Get_count(&self.ob_mpi, dtype, &count) ) # <<<<<<<<<<<<<< * return count * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_count((&__pyx_v_self->ob_mpi), __pyx_v_dtype, (&__pyx_v_count))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(24, 87, __pyx_L1_error) /* "mpi4py/MPI/Status.pyx":88 * cdef int count = MPI_UNDEFINED * CHKERR( MPI_Get_count(&self.ob_mpi, dtype, &count) ) * return count # <<<<<<<<<<<<<< * * property count: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":81 * self.Set_error(value) * * def Get_count(self, Datatype datatype=BYTE): # <<<<<<<<<<<<<< * """ * Get the number of *top level* elements */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.Get_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":92 * property count: * """byte count""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_count(__BYTE__) * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_5count_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_5count_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_5count___get__(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_5count___get__(struct PyMPIStatusObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Status.pyx":93 * """byte count""" * def __get__(self): * return self.Get_count(__BYTE__) # <<<<<<<<<<<<<< * * def Get_elements(self, Datatype datatype): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_6mpi4py_3MPI___BYTE__)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_6mpi4py_3MPI___BYTE__)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":92 * property count: * """byte count""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_count(__BYTE__) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":95 * return self.Get_count(__BYTE__) * * def Get_elements(self, Datatype datatype): # <<<<<<<<<<<<<< * """ * Get the number of basic elements in a datatype */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_19Get_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_18Get_elements[] = "Status.Get_elements(self, Datatype datatype)\n\n Get the number of basic elements in a datatype\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_19Get_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_elements (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datatype,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_elements") < 0)) __PYX_ERR(24, 95, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_datatype = ((struct PyMPIDatatypeObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_elements", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 95, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.Get_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_datatype), __pyx_ptype_6mpi4py_3MPI_Datatype, 0, "datatype", 0))) __PYX_ERR(24, 95, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_18Get_elements(((struct PyMPIStatusObject *)__pyx_v_self), __pyx_v_datatype); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_18Get_elements(struct PyMPIStatusObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype) { MPI_Datatype __pyx_v_dtype; MPI_Count __pyx_v_elements; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Datatype __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Get_elements", 0); /* "mpi4py/MPI/Status.pyx":99 * Get the number of basic elements in a datatype * """ * cdef MPI_Datatype dtype = datatype.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Count elements = MPI_UNDEFINED * CHKERR( MPI_Get_elements_x(&self.ob_mpi, dtype, &elements) ) */ __pyx_t_1 = __pyx_v_datatype->ob_mpi; __pyx_v_dtype = __pyx_t_1; /* "mpi4py/MPI/Status.pyx":100 * """ * cdef MPI_Datatype dtype = datatype.ob_mpi * cdef MPI_Count elements = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Get_elements_x(&self.ob_mpi, dtype, &elements) ) * return elements */ __pyx_v_elements = MPI_UNDEFINED; /* "mpi4py/MPI/Status.pyx":101 * cdef MPI_Datatype dtype = datatype.ob_mpi * cdef MPI_Count elements = MPI_UNDEFINED * CHKERR( MPI_Get_elements_x(&self.ob_mpi, dtype, &elements) ) # <<<<<<<<<<<<<< * return elements * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_elements_x((&__pyx_v_self->ob_mpi), __pyx_v_dtype, (&__pyx_v_elements))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(24, 101, __pyx_L1_error) /* "mpi4py/MPI/Status.pyx":102 * cdef MPI_Count elements = MPI_UNDEFINED * CHKERR( MPI_Get_elements_x(&self.ob_mpi, dtype, &elements) ) * return elements # <<<<<<<<<<<<<< * * def Set_elements(self, Datatype datatype, Count count): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_MPI_Count(__pyx_v_elements); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":95 * return self.Get_count(__BYTE__) * * def Get_elements(self, Datatype datatype): # <<<<<<<<<<<<<< * """ * Get the number of basic elements in a datatype */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.Get_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":104 * return elements * * def Set_elements(self, Datatype datatype, Count count): # <<<<<<<<<<<<<< * """ * Set the number of elements in a status */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_21Set_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_20Set_elements[] = "Status.Set_elements(self, Datatype datatype, Count count)\n\n Set the number of elements in a status\n\n .. note:: This should be only used when implementing\n query callback functions for generalized requests\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_21Set_elements(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; MPI_Count __pyx_v_count; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_elements (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datatype,&__pyx_n_s_count,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_count)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Set_elements", 1, 2, 2, 1); __PYX_ERR(24, 104, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_elements") < 0)) __PYX_ERR(24, 104, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_datatype = ((struct PyMPIDatatypeObject *)values[0]); __pyx_v_count = __Pyx_PyInt_As_MPI_Count(values[1]); if (unlikely((__pyx_v_count == ((MPI_Count)-1)) && PyErr_Occurred())) __PYX_ERR(24, 104, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_elements", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 104, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.Set_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_datatype), __pyx_ptype_6mpi4py_3MPI_Datatype, 0, "datatype", 0))) __PYX_ERR(24, 104, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_20Set_elements(((struct PyMPIStatusObject *)__pyx_v_self), __pyx_v_datatype, __pyx_v_count); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_20Set_elements(struct PyMPIStatusObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype, MPI_Count __pyx_v_count) { MPI_Datatype __pyx_v_dtype; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Datatype __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("Set_elements", 0); /* "mpi4py/MPI/Status.pyx":111 * query callback functions for generalized requests * """ * cdef MPI_Datatype dtype = datatype.ob_mpi # <<<<<<<<<<<<<< * CHKERR( MPI_Status_set_elements_x(&self.ob_mpi, dtype, count) ) * */ __pyx_t_1 = __pyx_v_datatype->ob_mpi; __pyx_v_dtype = __pyx_t_1; /* "mpi4py/MPI/Status.pyx":112 * """ * cdef MPI_Datatype dtype = datatype.ob_mpi * CHKERR( MPI_Status_set_elements_x(&self.ob_mpi, dtype, count) ) # <<<<<<<<<<<<<< * * def Is_cancelled(self): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Status_set_elements_x((&__pyx_v_self->ob_mpi), __pyx_v_dtype, __pyx_v_count)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(24, 112, __pyx_L1_error) /* "mpi4py/MPI/Status.pyx":104 * return elements * * def Set_elements(self, Datatype datatype, Count count): # <<<<<<<<<<<<<< * """ * Set the number of elements in a status */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.Set_elements", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":114 * CHKERR( MPI_Status_set_elements_x(&self.ob_mpi, dtype, count) ) * * def Is_cancelled(self): # <<<<<<<<<<<<<< * """ * Test to see if a request was cancelled */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_23Is_cancelled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_22Is_cancelled[] = "Status.Is_cancelled(self)\n\n Test to see if a request was cancelled\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_23Is_cancelled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Is_cancelled (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Is_cancelled", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Is_cancelled", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_22Is_cancelled(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_22Is_cancelled(struct PyMPIStatusObject *__pyx_v_self) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Is_cancelled", 0); /* "mpi4py/MPI/Status.pyx":118 * Test to see if a request was cancelled * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Test_cancelled(&self.ob_mpi, &flag) ) * return flag */ __pyx_v_flag = 0; /* "mpi4py/MPI/Status.pyx":119 * """ * cdef int flag = 0 * CHKERR( MPI_Test_cancelled(&self.ob_mpi, &flag) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Test_cancelled((&__pyx_v_self->ob_mpi), (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 119, __pyx_L1_error) /* "mpi4py/MPI/Status.pyx":120 * cdef int flag = 0 * CHKERR( MPI_Test_cancelled(&self.ob_mpi, &flag) ) * return flag # <<<<<<<<<<<<<< * * def Set_cancelled(self, bint flag): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":114 * CHKERR( MPI_Status_set_elements_x(&self.ob_mpi, dtype, count) ) * * def Is_cancelled(self): # <<<<<<<<<<<<<< * """ * Test to see if a request was cancelled */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Status.Is_cancelled", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":122 * return flag * * def Set_cancelled(self, bint flag): # <<<<<<<<<<<<<< * """ * Set the cancelled state associated with a status */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_25Set_cancelled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_24Set_cancelled[] = "Status.Set_cancelled(self, bool flag)\n\n Set the cancelled state associated with a status\n\n .. note:: This should be only used when implementing\n query callback functions for generalized requests\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_25Set_cancelled(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_flag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_cancelled (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_cancelled") < 0)) __PYX_ERR(24, 122, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_flag = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(24, 122, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_cancelled", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 122, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.Set_cancelled", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_24Set_cancelled(((struct PyMPIStatusObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_24Set_cancelled(struct PyMPIStatusObject *__pyx_v_self, int __pyx_v_flag) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_cancelled", 0); /* "mpi4py/MPI/Status.pyx":129 * query callback functions for generalized requests * """ * CHKERR( MPI_Status_set_cancelled(&self.ob_mpi, flag) ) # <<<<<<<<<<<<<< * * property cancelled: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Status_set_cancelled((&__pyx_v_self->ob_mpi), __pyx_v_flag)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(24, 129, __pyx_L1_error) /* "mpi4py/MPI/Status.pyx":122 * return flag * * def Set_cancelled(self, bint flag): # <<<<<<<<<<<<<< * """ * Set the cancelled state associated with a status */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.Set_cancelled", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":135 * cancelled state * """ * def __get__(self): # <<<<<<<<<<<<<< * return self.Is_cancelled() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_9cancelled_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_9cancelled_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_9cancelled___get__(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_9cancelled___get__(struct PyMPIStatusObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Status.pyx":136 * """ * def __get__(self): * return self.Is_cancelled() # <<<<<<<<<<<<<< * def __set__(self, value): * self.Set_cancelled(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Is_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":135 * cancelled state * """ * def __get__(self): # <<<<<<<<<<<<<< * return self.Is_cancelled() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.cancelled.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":137 * def __get__(self): * return self.Is_cancelled() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_cancelled(value) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_6Status_9cancelled_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_6Status_9cancelled_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_9cancelled_2__set__(((struct PyMPIStatusObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_6Status_9cancelled_2__set__(struct PyMPIStatusObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/Status.pyx":138 * return self.Is_cancelled() * def __set__(self, value): * self.Set_cancelled(value) # <<<<<<<<<<<<<< * * # Fortran Handle */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_cancelled); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Status.pyx":137 * def __get__(self): * return self.Is_cancelled() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_cancelled(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Status.cancelled.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":143 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_27py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_26py2f[] = "Status.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_27py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_26py2f(((struct PyMPIStatusObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_26py2f(struct PyMPIStatusObject *__pyx_v_self) { struct PyMPIStatusObject *__pyx_v_status = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; MPI_Status *__pyx_v_c_status; MPI_Fint *__pyx_v_f_status; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Status.pyx":146 * """ * """ * cdef Status status = self # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) */ __pyx_t_1 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_1); __pyx_v_status = ((struct PyMPIStatusObject *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Status.pyx":147 * """ * cdef Status status = self * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) * cdef MPI_Status *c_status = &status.ob_mpi */ __pyx_v_i = 0; /* "mpi4py/MPI/Status.pyx":148 * cdef Status status = self * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) # <<<<<<<<<<<<<< * cdef MPI_Status *c_status = &status.ob_mpi * cdef MPI_Fint *f_status = NULL */ __pyx_v_n = ((int)((sizeof(MPI_Status)) / (sizeof(int)))); /* "mpi4py/MPI/Status.pyx":149 * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) * cdef MPI_Status *c_status = &status.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Fint *f_status = NULL * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) */ __pyx_v_c_status = (&__pyx_v_status->ob_mpi); /* "mpi4py/MPI/Status.pyx":150 * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) * cdef MPI_Status *c_status = &status.ob_mpi * cdef MPI_Fint *f_status = NULL # <<<<<<<<<<<<<< * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) * CHKERR( MPI_Status_c2f(c_status, f_status) ) */ __pyx_v_f_status = NULL; /* "mpi4py/MPI/Status.pyx":151 * cdef MPI_Status *c_status = &status.ob_mpi * cdef MPI_Fint *f_status = NULL * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) # <<<<<<<<<<<<<< * CHKERR( MPI_Status_c2f(c_status, f_status) ) * return [f_status[i] for i from 0 <= i < n] */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate((__pyx_v_n + 1), (sizeof(MPI_Fint)), (&__pyx_v_f_status))); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Status.pyx":152 * cdef MPI_Fint *f_status = NULL * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) * CHKERR( MPI_Status_c2f(c_status, f_status) ) # <<<<<<<<<<<<<< * return [f_status[i] for i from 0 <= i < n] * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Status_c2f(__pyx_v_c_status, __pyx_v_f_status)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(24, 152, __pyx_L1_error) /* "mpi4py/MPI/Status.pyx":153 * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) * CHKERR( MPI_Status_c2f(c_status, f_status) ) * return [f_status[i] for i from 0 <= i < n] # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { __pyx_t_4 = __Pyx_PyInt_From_MPI_Fint((__pyx_v_f_status[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(24, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(24, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":143 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Status.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_status); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Status.pyx":156 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_29f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_6Status_28f2py[] = "Status.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_6Status_29f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(24, 156, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(24, 156, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Status.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_6Status_28f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_6Status_28f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIStatusObject *__pyx_v_status = 0; Py_ssize_t __pyx_v_i; Py_ssize_t __pyx_v_n; MPI_Status *__pyx_v_c_status; MPI_Fint *__pyx_v_f_status; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; MPI_Fint __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Status.pyx":159 * """ * """ * cdef Status status = Status.__new__(Status) # <<<<<<<<<<<<<< * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Status(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Status), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 159, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_status = ((struct PyMPIStatusObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Status.pyx":160 * """ * cdef Status status = Status.__new__(Status) * cdef Py_ssize_t i = 0 # <<<<<<<<<<<<<< * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) * cdef MPI_Status *c_status = &status.ob_mpi */ __pyx_v_i = 0; /* "mpi4py/MPI/Status.pyx":161 * cdef Status status = Status.__new__(Status) * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) # <<<<<<<<<<<<<< * cdef MPI_Status *c_status = &status.ob_mpi * cdef MPI_Fint *f_status = NULL */ __pyx_v_n = ((int)((sizeof(MPI_Status)) / (sizeof(int)))); /* "mpi4py/MPI/Status.pyx":162 * cdef Py_ssize_t i = 0 * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) * cdef MPI_Status *c_status = &status.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Fint *f_status = NULL * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) */ __pyx_v_c_status = (&__pyx_v_status->ob_mpi); /* "mpi4py/MPI/Status.pyx":163 * cdef Py_ssize_t n = (sizeof(MPI_Status)/sizeof(int)) * cdef MPI_Status *c_status = &status.ob_mpi * cdef MPI_Fint *f_status = NULL # <<<<<<<<<<<<<< * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) * for i from 0 <= i < n: f_status[i] = arg[i] */ __pyx_v_f_status = NULL; /* "mpi4py/MPI/Status.pyx":164 * cdef MPI_Status *c_status = &status.ob_mpi * cdef MPI_Fint *f_status = NULL * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) # <<<<<<<<<<<<<< * for i from 0 <= i < n: f_status[i] = arg[i] * CHKERR( MPI_Status_f2c(f_status, c_status) ) */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate((__pyx_v_n + 1), (sizeof(MPI_Fint)), (&__pyx_v_f_status))); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Status.pyx":165 * cdef MPI_Fint *f_status = NULL * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) * for i from 0 <= i < n: f_status[i] = arg[i] # <<<<<<<<<<<<<< * CHKERR( MPI_Status_f2c(f_status, c_status) ) * return status */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_arg, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(24, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyInt_As_MPI_Fint(__pyx_t_2); if (unlikely((__pyx_t_4 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(24, 165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; (__pyx_v_f_status[__pyx_v_i]) = __pyx_t_4; } /* "mpi4py/MPI/Status.pyx":166 * cdef tmp = allocate(n+1, sizeof(MPI_Fint), &f_status) * for i from 0 <= i < n: f_status[i] = arg[i] * CHKERR( MPI_Status_f2c(f_status, c_status) ) # <<<<<<<<<<<<<< * return status */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Status_f2c(__pyx_v_f_status, __pyx_v_c_status)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(24, 166, __pyx_L1_error) /* "mpi4py/MPI/Status.pyx":167 * for i from 0 <= i < n: f_status[i] = arg[i] * CHKERR( MPI_Status_f2c(f_status, c_status) ) * return status # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_status)); __pyx_r = ((PyObject *)__pyx_v_status); goto __pyx_L0; /* "mpi4py/MPI/Status.pyx":156 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Status.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_status); __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":7 * """ * * def __cinit__(self, Request request=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_REQUEST_NULL * if request is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_7Request_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_7Request_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIRequestObject *__pyx_v_request = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_request,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIRequestObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_request); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(25, 7, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_request = ((struct PyMPIRequestObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 7, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_request), __pyx_ptype_6mpi4py_3MPI_Request, 1, "request", 0))) __PYX_ERR(25, 7, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request___cinit__(((struct PyMPIRequestObject *)__pyx_v_self), __pyx_v_request); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_7Request___cinit__(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIRequestObject *__pyx_v_request) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Request __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Request.pyx":8 * * def __cinit__(self, Request request=None): * self.ob_mpi = MPI_REQUEST_NULL # <<<<<<<<<<<<<< * if request is None: return * self.ob_mpi = request.ob_mpi */ __pyx_v_self->ob_mpi = MPI_REQUEST_NULL; /* "mpi4py/MPI/Request.pyx":9 * def __cinit__(self, Request request=None): * self.ob_mpi = MPI_REQUEST_NULL * if request is None: return # <<<<<<<<<<<<<< * self.ob_mpi = request.ob_mpi * self.ob_buf = request.ob_buf */ __pyx_t_1 = (((PyObject *)__pyx_v_request) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Request.pyx":10 * self.ob_mpi = MPI_REQUEST_NULL * if request is None: return * self.ob_mpi = request.ob_mpi # <<<<<<<<<<<<<< * self.ob_buf = request.ob_buf * */ __pyx_t_3 = __pyx_v_request->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Request.pyx":11 * if request is None: return * self.ob_mpi = request.ob_mpi * self.ob_buf = request.ob_buf # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_4 = __pyx_v_request->ob_buf; __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->ob_buf); __Pyx_DECREF(__pyx_v_self->ob_buf); __pyx_v_self->ob_buf = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/Request.pyx":7 * """ * * def __cinit__(self, Request request=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_REQUEST_NULL * if request is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":13 * self.ob_buf = request.ob_buf * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Request(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_7Request_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_7Request_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_7Request_2__dealloc__(((struct PyMPIRequestObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_7Request_2__dealloc__(struct PyMPIRequestObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/Request.pyx":14 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_Request(&self.ob_mpi) ) * */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/Request.pyx":15 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Request(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_Request((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 15, __pyx_L1_error) /* "mpi4py/MPI/Request.pyx":13 * self.ob_buf = request.ob_buf * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Request(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.Request.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/Request.pyx":17 * CHKERR( del_Request(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Request): return NotImplemented * cdef Request s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_4__richcmp__(((struct PyMPIRequestObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_4__richcmp__(struct PyMPIRequestObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIRequestObject *__pyx_v_s = 0; struct PyMPIRequestObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Request.pyx":18 * * def __richcmp__(self, other, int op): * if not isinstance(other, Request): return NotImplemented # <<<<<<<<<<<<<< * cdef Request s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Request); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Request.pyx":19 * def __richcmp__(self, other, int op): * if not isinstance(other, Request): return NotImplemented * cdef Request s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Request.pyx":20 * if not isinstance(other, Request): return NotImplemented * cdef Request s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Request.pyx":21 * cdef Request s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Request.pyx":22 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Request.pyx":23 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Request.pyx":24 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(25, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(25, 24, __pyx_L1_error) /* "mpi4py/MPI/Request.pyx":17 * CHKERR( del_Request(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Request): return NotImplemented * cdef Request s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Request.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":26 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_REQUEST_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_7Request_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_7Request_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_6__bool__(((struct PyMPIRequestObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_7Request_6__bool__(struct PyMPIRequestObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/Request.pyx":27 * * def __bool__(self): * return self.ob_mpi != MPI_REQUEST_NULL # <<<<<<<<<<<<<< * * # Completion Operations */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_REQUEST_NULL); goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":26 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_REQUEST_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":32 * # --------------------- * * def Wait(self, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for a send or receive to complete */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_9Wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_8Wait[] = "Request.Wait(self, Status status=None)\n\n Wait for a send or receive to complete\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_9Wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Wait (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Wait") < 0)) __PYX_ERR(25, 32, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_status = ((struct PyMPIStatusObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Wait", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 32, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Wait", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(25, 32, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_8Wait(((struct PyMPIRequestObject *)__pyx_v_self), __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_8Wait(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status) { MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("Wait", 0); /* "mpi4py/MPI/Request.pyx":36 * Wait for a send or receive to complete * """ * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Wait( * &self.ob_mpi, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Request.pyx":37 * """ * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Wait( # <<<<<<<<<<<<<< * &self.ob_mpi, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":38 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Wait( * &self.ob_mpi, statusp) ) # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_REQUEST_NULL: * self.ob_buf = None */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Wait((&__pyx_v_self->ob_mpi), __pyx_v_statusp)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(25, 37, __pyx_L4_error) } /* "mpi4py/MPI/Request.pyx":37 * """ * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Wait( # <<<<<<<<<<<<<< * &self.ob_mpi, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Request.pyx":39 * with nogil: CHKERR( MPI_Wait( * &self.ob_mpi, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * self.ob_buf = None * return True */ __pyx_t_2 = ((__pyx_v_self->ob_mpi == MPI_REQUEST_NULL) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Request.pyx":40 * &self.ob_mpi, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: * self.ob_buf = None # <<<<<<<<<<<<<< * return True * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->ob_buf); __Pyx_DECREF(__pyx_v_self->ob_buf); __pyx_v_self->ob_buf = Py_None; /* "mpi4py/MPI/Request.pyx":39 * with nogil: CHKERR( MPI_Wait( * &self.ob_mpi, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * self.ob_buf = None * return True */ } /* "mpi4py/MPI/Request.pyx":41 * if self.ob_mpi == MPI_REQUEST_NULL: * self.ob_buf = None * return True # <<<<<<<<<<<<<< * * def Test(self, Status status=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":32 * # --------------------- * * def Wait(self, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for a send or receive to complete */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Wait", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":43 * return True * * def Test(self, Status status=None): # <<<<<<<<<<<<<< * """ * Test for the completion of a send or receive */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_11Test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_10Test[] = "Request.Test(self, Status status=None)\n\n Test for the completion of a send or receive\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_11Test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Test") < 0)) __PYX_ERR(25, 43, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_status = ((struct PyMPIStatusObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Test", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 43, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(25, 43, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_10Test(((struct PyMPIRequestObject *)__pyx_v_self), __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_10Test(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_flag; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Test", 0); /* "mpi4py/MPI/Request.pyx":47 * Test for the completion of a send or receive * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Test( */ __pyx_v_flag = 0; /* "mpi4py/MPI/Request.pyx":48 * """ * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Test( * &self.ob_mpi, &flag, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Request.pyx":49 * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Test( # <<<<<<<<<<<<<< * &self.ob_mpi, &flag, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":50 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Test( * &self.ob_mpi, &flag, statusp) ) # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_REQUEST_NULL: * self.ob_buf = None */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Test((&__pyx_v_self->ob_mpi), (&__pyx_v_flag), __pyx_v_statusp)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(25, 49, __pyx_L4_error) } /* "mpi4py/MPI/Request.pyx":49 * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Test( # <<<<<<<<<<<<<< * &self.ob_mpi, &flag, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Request.pyx":51 * with nogil: CHKERR( MPI_Test( * &self.ob_mpi, &flag, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * self.ob_buf = None * return flag */ __pyx_t_2 = ((__pyx_v_self->ob_mpi == MPI_REQUEST_NULL) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Request.pyx":52 * &self.ob_mpi, &flag, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: * self.ob_buf = None # <<<<<<<<<<<<<< * return flag * */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->ob_buf); __Pyx_DECREF(__pyx_v_self->ob_buf); __pyx_v_self->ob_buf = Py_None; /* "mpi4py/MPI/Request.pyx":51 * with nogil: CHKERR( MPI_Test( * &self.ob_mpi, &flag, statusp) ) * if self.ob_mpi == MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * self.ob_buf = None * return flag */ } /* "mpi4py/MPI/Request.pyx":53 * if self.ob_mpi == MPI_REQUEST_NULL: * self.ob_buf = None * return flag # <<<<<<<<<<<<<< * * def Free(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":43 * return True * * def Test(self, Status status=None): # <<<<<<<<<<<<<< * """ * Test for the completion of a send or receive */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Request.Test", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":55 * return flag * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a communication request */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_13Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_12Free[] = "Request.Free(self)\n\n Free a communication request\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_13Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Free", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Free", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_12Free(((struct PyMPIRequestObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_12Free(struct PyMPIRequestObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Free", 0); /* "mpi4py/MPI/Request.pyx":59 * Free a communication request * """ * with nogil: CHKERR( MPI_Request_free(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Get_status(self, Status status=None): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Request_free((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(25, 59, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Request.pyx":55 * return flag * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a communication request */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":61 * with nogil: CHKERR( MPI_Request_free(&self.ob_mpi) ) * * def Get_status(self, Status status=None): # <<<<<<<<<<<<<< * """ * Non-destructive test for the completion of a request */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_15Get_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_14Get_status[] = "Request.Get_status(self, Status status=None)\n\n Non-destructive test for the completion of a request\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_15Get_status(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_status (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_status") < 0)) __PYX_ERR(25, 61, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_status = ((struct PyMPIStatusObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_status", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 61, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Get_status", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(25, 61, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_14Get_status(((struct PyMPIRequestObject *)__pyx_v_self), __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_14Get_status(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_flag; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_status", 0); /* "mpi4py/MPI/Request.pyx":65 * Non-destructive test for the completion of a request * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Request_get_status( */ __pyx_v_flag = 0; /* "mpi4py/MPI/Request.pyx":66 * """ * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Request_get_status( * self.ob_mpi, &flag, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Request.pyx":67 * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Request_get_status( # <<<<<<<<<<<<<< * self.ob_mpi, &flag, statusp) ) * return flag */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":68 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Request_get_status( * self.ob_mpi, &flag, statusp) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Request_get_status(__pyx_v_self->ob_mpi, (&__pyx_v_flag), __pyx_v_statusp)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(25, 67, __pyx_L4_error) } /* "mpi4py/MPI/Request.pyx":67 * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Request_get_status( # <<<<<<<<<<<<<< * self.ob_mpi, &flag, statusp) ) * return flag */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Request.pyx":69 * with nogil: CHKERR( MPI_Request_get_status( * self.ob_mpi, &flag, statusp) ) * return flag # <<<<<<<<<<<<<< * * # Multiple Completions */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":61 * with nogil: CHKERR( MPI_Request_free(&self.ob_mpi) ) * * def Get_status(self, Status status=None): # <<<<<<<<<<<<<< * """ * Non-destructive test for the completion of a request */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Request.Get_status", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":75 * * @classmethod * def Waitany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for any previously initiated request to complete */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_17Waitany(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_16Waitany[] = "Request.Waitany(type cls, requests, Status status=None)\n\n Wait for any previously initiated request to complete\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_17Waitany(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Waitany (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Waitany") < 0)) __PYX_ERR(25, 75, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Waitany", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 75, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Waitany", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(25, 75, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_16Waitany(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_16Waitany(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_count; MPI_Request *__pyx_v_irequests; int __pyx_v_index; MPI_Status *__pyx_v_statusp; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; __Pyx_RefNannySetupContext("Waitany", 0); /* "mpi4py/MPI/Request.pyx":79 * Wait for any previously initiated request to complete * """ * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef int index = MPI_UNDEFINED */ __pyx_v_count = 0; /* "mpi4py/MPI/Request.pyx":80 * """ * cdef int count = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef int index = MPI_UNDEFINED * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/Request.pyx":81 * cdef int count = 0 * cdef MPI_Request *irequests = NULL * cdef int index = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * # */ __pyx_v_index = MPI_UNDEFINED; /* "mpi4py/MPI/Request.pyx":82 * cdef MPI_Request *irequests = NULL * cdef int index = MPI_UNDEFINED * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Request.pyx":84 * cdef MPI_Status *statusp = arg_Status(status) * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) # <<<<<<<<<<<<<< * try: * with nogil: CHKERR( MPI_Waitany( */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, Py_None, (&__pyx_v_count), (&__pyx_v_irequests), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":85 * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Waitany( * count, irequests, &index, statusp) ) */ /*try:*/ { /* "mpi4py/MPI/Request.pyx":86 * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: * with nogil: CHKERR( MPI_Waitany( # <<<<<<<<<<<<<< * count, irequests, &index, statusp) ) * finally: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":87 * try: * with nogil: CHKERR( MPI_Waitany( * count, irequests, &index, statusp) ) # <<<<<<<<<<<<<< * finally: * release_rs(requests, None, count, irequests, NULL) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Waitany(__pyx_v_count, __pyx_v_irequests, (&__pyx_v_index), __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 86, __pyx_L7_error) } /* "mpi4py/MPI/Request.pyx":86 * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: * with nogil: CHKERR( MPI_Waitany( # <<<<<<<<<<<<<< * count, irequests, &index, statusp) ) * finally: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } } /* "mpi4py/MPI/Request.pyx":89 * count, irequests, &index, statusp) ) * finally: * release_rs(requests, None, count, irequests, NULL) # <<<<<<<<<<<<<< * return index * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 89, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename; { __pyx_t_11 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(25, 89, __pyx_L10_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4; goto __pyx_L1_error; __pyx_L10_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/Request.pyx":90 * finally: * release_rs(requests, None, count, irequests, NULL) * return index # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":75 * * @classmethod * def Waitany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for any previously initiated request to complete */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Request.Waitany", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":93 * * @classmethod * def Testany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Test for completion of any previously initiated request */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_19Testany(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_18Testany[] = "Request.Testany(type cls, requests, Status status=None)\n\n Test for completion of any previously initiated request\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_19Testany(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Testany (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Testany") < 0)) __PYX_ERR(25, 93, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Testany", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 93, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Testany", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(25, 93, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_18Testany(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_18Testany(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_count; MPI_Request *__pyx_v_irequests; int __pyx_v_index; int __pyx_v_flag; MPI_Status *__pyx_v_statusp; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("Testany", 0); /* "mpi4py/MPI/Request.pyx":97 * Test for completion of any previously initiated request * """ * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef int index = MPI_UNDEFINED */ __pyx_v_count = 0; /* "mpi4py/MPI/Request.pyx":98 * """ * cdef int count = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef int index = MPI_UNDEFINED * cdef int flag = 0 */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/Request.pyx":99 * cdef int count = 0 * cdef MPI_Request *irequests = NULL * cdef int index = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_v_index = MPI_UNDEFINED; /* "mpi4py/MPI/Request.pyx":100 * cdef MPI_Request *irequests = NULL * cdef int index = MPI_UNDEFINED * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * # */ __pyx_v_flag = 0; /* "mpi4py/MPI/Request.pyx":101 * cdef int index = MPI_UNDEFINED * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Request.pyx":103 * cdef MPI_Status *statusp = arg_Status(status) * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) # <<<<<<<<<<<<<< * try: * with nogil: CHKERR( MPI_Testany( */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, Py_None, (&__pyx_v_count), (&__pyx_v_irequests), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":104 * # * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Testany( * count, irequests, &index, &flag, statusp) ) */ /*try:*/ { /* "mpi4py/MPI/Request.pyx":105 * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: * with nogil: CHKERR( MPI_Testany( # <<<<<<<<<<<<<< * count, irequests, &index, &flag, statusp) ) * finally: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":106 * try: * with nogil: CHKERR( MPI_Testany( * count, irequests, &index, &flag, statusp) ) # <<<<<<<<<<<<<< * finally: * release_rs(requests, None, count, irequests, NULL) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Testany(__pyx_v_count, __pyx_v_irequests, (&__pyx_v_index), (&__pyx_v_flag), __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 105, __pyx_L7_error) } /* "mpi4py/MPI/Request.pyx":105 * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * try: * with nogil: CHKERR( MPI_Testany( # <<<<<<<<<<<<<< * count, irequests, &index, &flag, statusp) ) * finally: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } } /* "mpi4py/MPI/Request.pyx":108 * count, irequests, &index, &flag, statusp) ) * finally: * release_rs(requests, None, count, irequests, NULL) # <<<<<<<<<<<<<< * # * return (index, flag) */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 108, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename; { __pyx_t_11 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(25, 108, __pyx_L10_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4; goto __pyx_L1_error; __pyx_L10_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/Request.pyx":110 * release_rs(requests, None, count, irequests, NULL) * # * return (index, flag) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_12)) __PYX_ERR(25, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(25, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_12); __pyx_t_1 = 0; __pyx_t_12 = 0; __pyx_r = __pyx_t_13; __pyx_t_13 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":93 * * @classmethod * def Testany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Test for completion of any previously initiated request */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("mpi4py.MPI.Request.Testany", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":113 * * @classmethod * def Waitall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Wait for all previously initiated requests to complete */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_21Waitall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_20Waitall[] = "Request.Waitall(type cls, requests, statuses=None)\n\n Wait for all previously initiated requests to complete\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_21Waitall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; PyObject *__pyx_v_statuses = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Waitall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_statuses,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statuses); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Waitall") < 0)) __PYX_ERR(25, 113, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_statuses = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Waitall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 113, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Waitall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_20Waitall(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_statuses); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_20Waitall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses) { int __pyx_v_count; MPI_Request *__pyx_v_irequests; MPI_Status *__pyx_v_istatuses; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; __Pyx_RefNannySetupContext("Waitall", 0); /* "mpi4py/MPI/Request.pyx":117 * Wait for all previously initiated requests to complete * """ * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE */ __pyx_v_count = 0; /* "mpi4py/MPI/Request.pyx":118 * """ * cdef int count = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/Request.pyx":119 * cdef int count = 0 * cdef MPI_Request *irequests = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # <<<<<<<<<<<<<< * # * cdef tmp = acquire_rs(requests, statuses, */ __pyx_v_istatuses = MPI_STATUSES_IGNORE; /* "mpi4py/MPI/Request.pyx":121 * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # * cdef tmp = acquire_rs(requests, statuses, # <<<<<<<<<<<<<< * &count, &irequests, &istatuses) * try: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, __pyx_v_statuses, (&__pyx_v_count), (&__pyx_v_irequests), (&__pyx_v_istatuses)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":123 * cdef tmp = acquire_rs(requests, statuses, * &count, &irequests, &istatuses) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Waitall( * count, irequests, istatuses) ) */ /*try:*/ { /* "mpi4py/MPI/Request.pyx":124 * &count, &irequests, &istatuses) * try: * with nogil: CHKERR( MPI_Waitall( # <<<<<<<<<<<<<< * count, irequests, istatuses) ) * finally: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":125 * try: * with nogil: CHKERR( MPI_Waitall( * count, irequests, istatuses) ) # <<<<<<<<<<<<<< * finally: * release_rs(requests, statuses, count, irequests, istatuses) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Waitall(__pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 124, __pyx_L7_error) } /* "mpi4py/MPI/Request.pyx":124 * &count, &irequests, &istatuses) * try: * with nogil: CHKERR( MPI_Waitall( # <<<<<<<<<<<<<< * count, irequests, istatuses) ) * finally: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } } /* "mpi4py/MPI/Request.pyx":127 * count, irequests, istatuses) ) * finally: * release_rs(requests, statuses, count, irequests, istatuses) # <<<<<<<<<<<<<< * return True * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 127, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename; { __pyx_t_11 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(25, 127, __pyx_L10_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4; goto __pyx_L1_error; __pyx_L10_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/Request.pyx":128 * finally: * release_rs(requests, statuses, count, irequests, istatuses) * return True # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":113 * * @classmethod * def Waitall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Wait for all previously initiated requests to complete */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Request.Waitall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":131 * * @classmethod * def Testall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Test for completion of all previously initiated requests */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_23Testall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_22Testall[] = "Request.Testall(type cls, requests, statuses=None)\n\n Test for completion of all previously initiated requests\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_23Testall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; PyObject *__pyx_v_statuses = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Testall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_statuses,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statuses); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Testall") < 0)) __PYX_ERR(25, 131, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_statuses = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Testall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 131, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Testall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_22Testall(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_statuses); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_22Testall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses) { int __pyx_v_count; MPI_Request *__pyx_v_irequests; int __pyx_v_flag; MPI_Status *__pyx_v_istatuses; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; __Pyx_RefNannySetupContext("Testall", 0); /* "mpi4py/MPI/Request.pyx":135 * Test for completion of all previously initiated requests * """ * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef int flag = 0 */ __pyx_v_count = 0; /* "mpi4py/MPI/Request.pyx":136 * """ * cdef int count = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/Request.pyx":137 * cdef int count = 0 * cdef MPI_Request *irequests = NULL * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # */ __pyx_v_flag = 0; /* "mpi4py/MPI/Request.pyx":138 * cdef MPI_Request *irequests = NULL * cdef int flag = 0 * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # <<<<<<<<<<<<<< * # * cdef tmp = acquire_rs(requests, statuses, */ __pyx_v_istatuses = MPI_STATUSES_IGNORE; /* "mpi4py/MPI/Request.pyx":140 * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # * cdef tmp = acquire_rs(requests, statuses, # <<<<<<<<<<<<<< * &count, &irequests, &istatuses) * try: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, __pyx_v_statuses, (&__pyx_v_count), (&__pyx_v_irequests), (&__pyx_v_istatuses)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":142 * cdef tmp = acquire_rs(requests, statuses, * &count, &irequests, &istatuses) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Testall( * count, irequests, &flag, istatuses) ) */ /*try:*/ { /* "mpi4py/MPI/Request.pyx":143 * &count, &irequests, &istatuses) * try: * with nogil: CHKERR( MPI_Testall( # <<<<<<<<<<<<<< * count, irequests, &flag, istatuses) ) * finally: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":144 * try: * with nogil: CHKERR( MPI_Testall( * count, irequests, &flag, istatuses) ) # <<<<<<<<<<<<<< * finally: * release_rs(requests, statuses, count, irequests, istatuses) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Testall(__pyx_v_count, __pyx_v_irequests, (&__pyx_v_flag), __pyx_v_istatuses)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 143, __pyx_L7_error) } /* "mpi4py/MPI/Request.pyx":143 * &count, &irequests, &istatuses) * try: * with nogil: CHKERR( MPI_Testall( # <<<<<<<<<<<<<< * count, irequests, &flag, istatuses) ) * finally: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } } /* "mpi4py/MPI/Request.pyx":146 * count, irequests, &flag, istatuses) ) * finally: * release_rs(requests, statuses, count, irequests, istatuses) # <<<<<<<<<<<<<< * return flag * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 146, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename; { __pyx_t_11 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_count, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(25, 146, __pyx_L10_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4; goto __pyx_L1_error; __pyx_L10_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/Request.pyx":147 * finally: * release_rs(requests, statuses, count, irequests, istatuses) * return flag # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":131 * * @classmethod * def Testall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Test for completion of all previously initiated requests */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Request.Testall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":150 * * @classmethod * def Waitsome(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Wait for some previously initiated requests to complete */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_25Waitsome(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_24Waitsome[] = "Request.Waitsome(type cls, requests, statuses=None)\n\n Wait for some previously initiated requests to complete\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_25Waitsome(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; PyObject *__pyx_v_statuses = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Waitsome (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_statuses,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statuses); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Waitsome") < 0)) __PYX_ERR(25, 150, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_statuses = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Waitsome", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 150, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Waitsome", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_24Waitsome(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_statuses); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_24Waitsome(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses) { int __pyx_v_incount; MPI_Request *__pyx_v_irequests; int __pyx_v_outcount; int *__pyx_v_iindices; MPI_Status *__pyx_v_istatuses; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; int __pyx_v_i; PyObject *__pyx_v_indices = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("Waitsome", 0); /* "mpi4py/MPI/Request.pyx":154 * Wait for some previously initiated requests to complete * """ * cdef int incount = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef int outcount = MPI_UNDEFINED, *iindices = NULL */ __pyx_v_incount = 0; /* "mpi4py/MPI/Request.pyx":155 * """ * cdef int incount = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef int outcount = MPI_UNDEFINED, *iindices = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/Request.pyx":156 * cdef int incount = 0 * cdef MPI_Request *irequests = NULL * cdef int outcount = MPI_UNDEFINED, *iindices = NULL # <<<<<<<<<<<<<< * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # */ __pyx_v_outcount = MPI_UNDEFINED; __pyx_v_iindices = NULL; /* "mpi4py/MPI/Request.pyx":157 * cdef MPI_Request *irequests = NULL * cdef int outcount = MPI_UNDEFINED, *iindices = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # <<<<<<<<<<<<<< * # * cdef tmp1 = acquire_rs(requests, statuses, */ __pyx_v_istatuses = MPI_STATUSES_IGNORE; /* "mpi4py/MPI/Request.pyx":159 * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # * cdef tmp1 = acquire_rs(requests, statuses, # <<<<<<<<<<<<<< * &incount, &irequests, &istatuses) * cdef tmp2 = newarray(incount, &iindices) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, __pyx_v_statuses, (&__pyx_v_incount), (&__pyx_v_irequests), (&__pyx_v_istatuses)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp1 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":161 * cdef tmp1 = acquire_rs(requests, statuses, * &incount, &irequests, &istatuses) * cdef tmp2 = newarray(incount, &iindices) # <<<<<<<<<<<<<< * try: * with nogil: CHKERR( MPI_Waitsome( */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_incount, (&__pyx_v_iindices)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp2 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":162 * &incount, &irequests, &istatuses) * cdef tmp2 = newarray(incount, &iindices) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Waitsome( * incount, irequests, &outcount, iindices, istatuses) ) */ /*try:*/ { /* "mpi4py/MPI/Request.pyx":163 * cdef tmp2 = newarray(incount, &iindices) * try: * with nogil: CHKERR( MPI_Waitsome( # <<<<<<<<<<<<<< * incount, irequests, &outcount, iindices, istatuses) ) * finally: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":164 * try: * with nogil: CHKERR( MPI_Waitsome( * incount, irequests, &outcount, iindices, istatuses) ) # <<<<<<<<<<<<<< * finally: * release_rs(requests, statuses, incount, irequests, istatuses) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Waitsome(__pyx_v_incount, __pyx_v_irequests, (&__pyx_v_outcount), __pyx_v_iindices, __pyx_v_istatuses)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 163, __pyx_L7_error) } /* "mpi4py/MPI/Request.pyx":163 * cdef tmp2 = newarray(incount, &iindices) * try: * with nogil: CHKERR( MPI_Waitsome( # <<<<<<<<<<<<<< * incount, irequests, &outcount, iindices, istatuses) ) * finally: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } } /* "mpi4py/MPI/Request.pyx":166 * incount, irequests, &outcount, iindices, istatuses) ) * finally: * release_rs(requests, statuses, incount, irequests, istatuses) # <<<<<<<<<<<<<< * # * cdef int i = 0 */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_incount, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 166, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename; { __pyx_t_11 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_incount, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(25, 166, __pyx_L10_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4; goto __pyx_L1_error; __pyx_L10_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/Request.pyx":168 * release_rs(requests, statuses, incount, irequests, istatuses) * # * cdef int i = 0 # <<<<<<<<<<<<<< * cdef object indices = None * if outcount != MPI_UNDEFINED: */ __pyx_v_i = 0; /* "mpi4py/MPI/Request.pyx":169 * # * cdef int i = 0 * cdef object indices = None # <<<<<<<<<<<<<< * if outcount != MPI_UNDEFINED: * indices = [iindices[i] for i from 0 <= i < outcount] */ __Pyx_INCREF(Py_None); __pyx_v_indices = Py_None; /* "mpi4py/MPI/Request.pyx":170 * cdef int i = 0 * cdef object indices = None * if outcount != MPI_UNDEFINED: # <<<<<<<<<<<<<< * indices = [iindices[i] for i from 0 <= i < outcount] * return indices */ __pyx_t_12 = ((__pyx_v_outcount != MPI_UNDEFINED) != 0); if (__pyx_t_12) { /* "mpi4py/MPI/Request.pyx":171 * cdef object indices = None * if outcount != MPI_UNDEFINED: * indices = [iindices[i] for i from 0 <= i < outcount] # <<<<<<<<<<<<<< * return indices * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_outcount; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { __pyx_t_13 = __Pyx_PyInt_From_int((__pyx_v_iindices[__pyx_v_i])); if (unlikely(!__pyx_t_13)) __PYX_ERR(25, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_13))) __PYX_ERR(25, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF_SET(__pyx_v_indices, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":170 * cdef int i = 0 * cdef object indices = None * if outcount != MPI_UNDEFINED: # <<<<<<<<<<<<<< * indices = [iindices[i] for i from 0 <= i < outcount] * return indices */ } /* "mpi4py/MPI/Request.pyx":172 * if outcount != MPI_UNDEFINED: * indices = [iindices[i] for i from 0 <= i < outcount] * return indices # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_indices); __pyx_r = __pyx_v_indices; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":150 * * @classmethod * def Waitsome(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Wait for some previously initiated requests to complete */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("mpi4py.MPI.Request.Waitsome", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_indices); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":175 * * @classmethod * def Testsome(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Test for completion of some previously initiated requests */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_27Testsome(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_26Testsome[] = "Request.Testsome(type cls, requests, statuses=None)\n\n Test for completion of some previously initiated requests\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_27Testsome(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; PyObject *__pyx_v_statuses = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Testsome (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_statuses,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statuses); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Testsome") < 0)) __PYX_ERR(25, 175, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_statuses = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Testsome", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 175, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Testsome", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_26Testsome(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_statuses); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_26Testsome(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses) { int __pyx_v_incount; MPI_Request *__pyx_v_irequests; int __pyx_v_outcount; int *__pyx_v_iindices; MPI_Status *__pyx_v_istatuses; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; int __pyx_v_i; PyObject *__pyx_v_indices = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("Testsome", 0); /* "mpi4py/MPI/Request.pyx":179 * Test for completion of some previously initiated requests * """ * cdef int incount = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef int outcount = MPI_UNDEFINED, *iindices = NULL */ __pyx_v_incount = 0; /* "mpi4py/MPI/Request.pyx":180 * """ * cdef int incount = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef int outcount = MPI_UNDEFINED, *iindices = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/Request.pyx":181 * cdef int incount = 0 * cdef MPI_Request *irequests = NULL * cdef int outcount = MPI_UNDEFINED, *iindices = NULL # <<<<<<<<<<<<<< * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # */ __pyx_v_outcount = MPI_UNDEFINED; __pyx_v_iindices = NULL; /* "mpi4py/MPI/Request.pyx":182 * cdef MPI_Request *irequests = NULL * cdef int outcount = MPI_UNDEFINED, *iindices = NULL * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE # <<<<<<<<<<<<<< * # * cdef tmp1 = acquire_rs(requests, statuses, */ __pyx_v_istatuses = MPI_STATUSES_IGNORE; /* "mpi4py/MPI/Request.pyx":184 * cdef MPI_Status *istatuses = MPI_STATUSES_IGNORE * # * cdef tmp1 = acquire_rs(requests, statuses, # <<<<<<<<<<<<<< * &incount, &irequests, &istatuses) * cdef tmp2 = newarray(incount, &iindices) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, __pyx_v_statuses, (&__pyx_v_incount), (&__pyx_v_irequests), (&__pyx_v_istatuses)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp1 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":186 * cdef tmp1 = acquire_rs(requests, statuses, * &incount, &irequests, &istatuses) * cdef tmp2 = newarray(incount, &iindices) # <<<<<<<<<<<<<< * try: * with nogil: CHKERR( MPI_Testsome( */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_incount, (&__pyx_v_iindices)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp2 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":187 * &incount, &irequests, &istatuses) * cdef tmp2 = newarray(incount, &iindices) * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Testsome( * incount, irequests, &outcount, iindices, istatuses) ) */ /*try:*/ { /* "mpi4py/MPI/Request.pyx":188 * cdef tmp2 = newarray(incount, &iindices) * try: * with nogil: CHKERR( MPI_Testsome( # <<<<<<<<<<<<<< * incount, irequests, &outcount, iindices, istatuses) ) * finally: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":189 * try: * with nogil: CHKERR( MPI_Testsome( * incount, irequests, &outcount, iindices, istatuses) ) # <<<<<<<<<<<<<< * finally: * release_rs(requests, statuses, incount, irequests, istatuses) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Testsome(__pyx_v_incount, __pyx_v_irequests, (&__pyx_v_outcount), __pyx_v_iindices, __pyx_v_istatuses)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 188, __pyx_L7_error) } /* "mpi4py/MPI/Request.pyx":188 * cdef tmp2 = newarray(incount, &iindices) * try: * with nogil: CHKERR( MPI_Testsome( # <<<<<<<<<<<<<< * incount, irequests, &outcount, iindices, istatuses) ) * finally: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } } /* "mpi4py/MPI/Request.pyx":191 * incount, irequests, &outcount, iindices, istatuses) ) * finally: * release_rs(requests, statuses, incount, irequests, istatuses) # <<<<<<<<<<<<<< * # * cdef int i = 0 */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_incount, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 191, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename; { __pyx_t_11 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, __pyx_v_statuses, __pyx_v_incount, __pyx_v_irequests, __pyx_v_istatuses); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(25, 191, __pyx_L10_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4; goto __pyx_L1_error; __pyx_L10_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/Request.pyx":193 * release_rs(requests, statuses, incount, irequests, istatuses) * # * cdef int i = 0 # <<<<<<<<<<<<<< * cdef object indices = None * if outcount != MPI_UNDEFINED: */ __pyx_v_i = 0; /* "mpi4py/MPI/Request.pyx":194 * # * cdef int i = 0 * cdef object indices = None # <<<<<<<<<<<<<< * if outcount != MPI_UNDEFINED: * indices = [iindices[i] for i from 0 <= i < outcount] */ __Pyx_INCREF(Py_None); __pyx_v_indices = Py_None; /* "mpi4py/MPI/Request.pyx":195 * cdef int i = 0 * cdef object indices = None * if outcount != MPI_UNDEFINED: # <<<<<<<<<<<<<< * indices = [iindices[i] for i from 0 <= i < outcount] * return indices */ __pyx_t_12 = ((__pyx_v_outcount != MPI_UNDEFINED) != 0); if (__pyx_t_12) { /* "mpi4py/MPI/Request.pyx":196 * cdef object indices = None * if outcount != MPI_UNDEFINED: * indices = [iindices[i] for i from 0 <= i < outcount] # <<<<<<<<<<<<<< * return indices * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_v_outcount; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { __pyx_t_13 = __Pyx_PyInt_From_int((__pyx_v_iindices[__pyx_v_i])); if (unlikely(!__pyx_t_13)) __PYX_ERR(25, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_13))) __PYX_ERR(25, 196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF_SET(__pyx_v_indices, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":195 * cdef int i = 0 * cdef object indices = None * if outcount != MPI_UNDEFINED: # <<<<<<<<<<<<<< * indices = [iindices[i] for i from 0 <= i < outcount] * return indices */ } /* "mpi4py/MPI/Request.pyx":197 * if outcount != MPI_UNDEFINED: * indices = [iindices[i] for i from 0 <= i < outcount] * return indices # <<<<<<<<<<<<<< * * # Cancel */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_indices); __pyx_r = __pyx_v_indices; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":175 * * @classmethod * def Testsome(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Test for completion of some previously initiated requests */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("mpi4py.MPI.Request.Testsome", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_indices); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":202 * # ------ * * def Cancel(self): # <<<<<<<<<<<<<< * """ * Cancel a communication request */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_29Cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_28Cancel[] = "Request.Cancel(self)\n\n Cancel a communication request\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_29Cancel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Cancel (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Cancel", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Cancel", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_28Cancel(((struct PyMPIRequestObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_28Cancel(struct PyMPIRequestObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Cancel", 0); /* "mpi4py/MPI/Request.pyx":206 * Cancel a communication request * """ * with nogil: CHKERR( MPI_Cancel(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Fortran Handle */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cancel((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(25, 206, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Request.pyx":202 * # ------ * * def Cancel(self): # <<<<<<<<<<<<<< * """ * Cancel a communication request */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.Cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":211 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_31py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_30py2f[] = "Request.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_31py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_30py2f(((struct PyMPIRequestObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_30py2f(struct PyMPIRequestObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Request.pyx":214 * """ * """ * return MPI_Request_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_Request_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":211 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Request.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":217 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_33f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_32f2py[] = "Request.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_33f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(25, 217, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 217, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_32f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_32f2py(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; MPI_Fint __pyx_t_5; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Request.pyx":220 * """ * """ * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * if issubclass(cls, Prequest): * request = Prequest.__new__(Prequest) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 220, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Request.pyx":221 * """ * cdef Request request = Request.__new__(Request) * if issubclass(cls, Prequest): # <<<<<<<<<<<<<< * request = Prequest.__new__(Prequest) * if issubclass(cls, Grequest): */ __pyx_t_3 = PyObject_IsSubclass(((PyObject *)__pyx_v_cls), ((PyObject *)__pyx_ptype_6mpi4py_3MPI_Prequest)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(25, 221, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/Request.pyx":222 * cdef Request request = Request.__new__(Request) * if issubclass(cls, Prequest): * request = Prequest.__new__(Prequest) # <<<<<<<<<<<<<< * if issubclass(cls, Grequest): * request = Grequest.__new__(Grequest) */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Prequest(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Prequest), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 222, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_request, ((struct PyMPIRequestObject *)__pyx_t_1)); __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":221 * """ * cdef Request request = Request.__new__(Request) * if issubclass(cls, Prequest): # <<<<<<<<<<<<<< * request = Prequest.__new__(Prequest) * if issubclass(cls, Grequest): */ } /* "mpi4py/MPI/Request.pyx":223 * if issubclass(cls, Prequest): * request = Prequest.__new__(Prequest) * if issubclass(cls, Grequest): # <<<<<<<<<<<<<< * request = Grequest.__new__(Grequest) * request.ob_mpi = MPI_Request_f2c(arg) */ __pyx_t_4 = PyObject_IsSubclass(((PyObject *)__pyx_v_cls), ((PyObject *)__pyx_ptype_6mpi4py_3MPI_Grequest)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(25, 223, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/Request.pyx":224 * request = Prequest.__new__(Prequest) * if issubclass(cls, Grequest): * request = Grequest.__new__(Grequest) # <<<<<<<<<<<<<< * request.ob_mpi = MPI_Request_f2c(arg) * return request */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Grequest(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Grequest), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 224, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_request, ((struct PyMPIRequestObject *)__pyx_t_2)); __pyx_t_2 = 0; /* "mpi4py/MPI/Request.pyx":223 * if issubclass(cls, Prequest): * request = Prequest.__new__(Prequest) * if issubclass(cls, Grequest): # <<<<<<<<<<<<<< * request = Grequest.__new__(Grequest) * request.ob_mpi = MPI_Request_f2c(arg) */ } /* "mpi4py/MPI/Request.pyx":225 * if issubclass(cls, Grequest): * request = Grequest.__new__(Grequest) * request.ob_mpi = MPI_Request_f2c(arg) # <<<<<<<<<<<<<< * return request * */ __pyx_t_5 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_5 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(25, 225, __pyx_L1_error) __pyx_v_request->ob_mpi = MPI_Request_f2c(__pyx_t_5); /* "mpi4py/MPI/Request.pyx":226 * request = Grequest.__new__(Grequest) * request.ob_mpi = MPI_Request_f2c(arg) * return request # <<<<<<<<<<<<<< * * # Python Communication */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":217 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Request.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":231 * # -------------------- * # * def wait(self, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for a send or receive to complete */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_35wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_34wait[] = "Request.wait(self, Status status=None)\n\n Wait for a send or receive to complete\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_35wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("wait (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "wait") < 0)) __PYX_ERR(25, 231, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_status = ((struct PyMPIStatusObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("wait", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 231, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.wait", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(25, 231, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_34wait(((struct PyMPIRequestObject *)__pyx_v_self), __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_34wait(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status) { PyObject *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("wait", 0); /* "mpi4py/MPI/Request.pyx":235 * Wait for a send or receive to complete * """ * cdef msg = PyMPI_wait(self, status) # <<<<<<<<<<<<<< * return msg * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_wait(__pyx_v_self, __pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":236 * """ * cdef msg = PyMPI_wait(self, status) * return msg # <<<<<<<<<<<<<< * # * def test(self, Status status=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_msg); __pyx_r = __pyx_v_msg; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":231 * # -------------------- * # * def wait(self, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for a send or receive to complete */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Request.wait", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":238 * return msg * # * def test(self, Status status=None): # <<<<<<<<<<<<<< * """ * Test for the completion of a send or receive */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_37test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_36test[] = "Request.test(self, Status status=None)\n\n Test for the completion of a send or receive\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_37test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("test (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "test") < 0)) __PYX_ERR(25, 238, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_status = ((struct PyMPIStatusObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("test", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 238, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.test", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(25, 238, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_36test(((struct PyMPIRequestObject *)__pyx_v_self), __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_36test(struct PyMPIRequestObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_flag; PyObject *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("test", 0); /* "mpi4py/MPI/Request.pyx":242 * Test for the completion of a send or receive * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef msg = PyMPI_test(self, &flag, status) * return (flag, msg) */ __pyx_v_flag = 0; /* "mpi4py/MPI/Request.pyx":243 * """ * cdef int flag = 0 * cdef msg = PyMPI_test(self, &flag, status) # <<<<<<<<<<<<<< * return (flag, msg) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_test(__pyx_v_self, (&__pyx_v_flag), __pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":244 * cdef int flag = 0 * cdef msg = PyMPI_test(self, &flag, status) * return (flag, msg) # <<<<<<<<<<<<<< * # * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_msg); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":238 * return msg * # * def test(self, Status status=None): # <<<<<<<<<<<<<< * """ * Test for the completion of a send or receive */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Request.test", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":247 * # * @classmethod * def waitany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for any previously initiated request to complete */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_39waitany(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_38waitany[] = "Request.waitany(type cls, requests, Status status=None)\n\n Wait for any previously initiated request to complete\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_39waitany(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("waitany (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "waitany") < 0)) __PYX_ERR(25, 247, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("waitany", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 247, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.waitany", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(25, 247, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_38waitany(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_38waitany(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_index; PyObject *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("waitany", 0); /* "mpi4py/MPI/Request.pyx":251 * Wait for any previously initiated request to complete * """ * cdef int index = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef msg = PyMPI_waitany(requests, &index, status) * return (index, msg) */ __pyx_v_index = MPI_UNDEFINED; /* "mpi4py/MPI/Request.pyx":252 * """ * cdef int index = MPI_UNDEFINED * cdef msg = PyMPI_waitany(requests, &index, status) # <<<<<<<<<<<<<< * return (index, msg) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_waitany(__pyx_v_requests, (&__pyx_v_index), __pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":253 * cdef int index = MPI_UNDEFINED * cdef msg = PyMPI_waitany(requests, &index, status) * return (index, msg) # <<<<<<<<<<<<<< * # * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_msg); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":247 * # * @classmethod * def waitany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for any previously initiated request to complete */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Request.waitany", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":256 * # * @classmethod * def testany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Test for completion of any previously initiated request */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_41testany(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_40testany[] = "Request.testany(type cls, requests, Status status=None)\n\n Test for completion of any previously initiated request\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_41testany(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("testany (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "testany") < 0)) __PYX_ERR(25, 256, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("testany", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 256, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.testany", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(25, 256, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_40testany(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_40testany(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_index; int __pyx_v_flag; PyObject *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("testany", 0); /* "mpi4py/MPI/Request.pyx":260 * Test for completion of any previously initiated request * """ * cdef int index = MPI_UNDEFINED # <<<<<<<<<<<<<< * cdef int flag = 0 * cdef msg = PyMPI_testany(requests, &index, &flag, status) */ __pyx_v_index = MPI_UNDEFINED; /* "mpi4py/MPI/Request.pyx":261 * """ * cdef int index = MPI_UNDEFINED * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef msg = PyMPI_testany(requests, &index, &flag, status) * return (index, flag, msg) */ __pyx_v_flag = 0; /* "mpi4py/MPI/Request.pyx":262 * cdef int index = MPI_UNDEFINED * cdef int flag = 0 * cdef msg = PyMPI_testany(requests, &index, &flag, status) # <<<<<<<<<<<<<< * return (index, flag, msg) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_testany(__pyx_v_requests, (&__pyx_v_index), (&__pyx_v_flag), __pyx_v_status); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":263 * cdef int flag = 0 * cdef msg = PyMPI_testany(requests, &index, &flag, status) * return (index, flag, msg) # <<<<<<<<<<<<<< * # * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_msg); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":256 * # * @classmethod * def testany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Test for completion of any previously initiated request */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Request.testany", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":266 * # * @classmethod * def waitall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Wait for all previously initiated requests to complete */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_43waitall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_42waitall[] = "Request.waitall(type cls, requests, statuses=None)\n\n Wait for all previously initiated requests to complete\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_43waitall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; PyObject *__pyx_v_statuses = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("waitall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_statuses,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statuses); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "waitall") < 0)) __PYX_ERR(25, 266, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_statuses = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("waitall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 266, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.waitall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_42waitall(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_statuses); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_42waitall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses) { PyObject *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("waitall", 0); /* "mpi4py/MPI/Request.pyx":270 * Wait for all previously initiated requests to complete * """ * cdef msg = PyMPI_waitall(requests, statuses) # <<<<<<<<<<<<<< * return msg * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_waitall(__pyx_v_requests, __pyx_v_statuses); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":271 * """ * cdef msg = PyMPI_waitall(requests, statuses) * return msg # <<<<<<<<<<<<<< * # * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_msg); __pyx_r = __pyx_v_msg; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":266 * # * @classmethod * def waitall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Wait for all previously initiated requests to complete */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Request.waitall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":274 * # * @classmethod * def testall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Test for completion of all previously initiated requests */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_45testall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Request_44testall[] = "Request.testall(type cls, requests, statuses=None)\n\n Test for completion of all previously initiated requests\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Request_45testall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; PyObject *__pyx_v_statuses = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("testall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,&__pyx_n_s_statuses,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_statuses); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "testall") < 0)) __PYX_ERR(25, 274, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_requests = values[0]; __pyx_v_statuses = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("testall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 274, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Request.testall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Request_44testall(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests, __pyx_v_statuses); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Request_44testall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests, PyObject *__pyx_v_statuses) { int __pyx_v_flag; PyObject *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("testall", 0); /* "mpi4py/MPI/Request.pyx":278 * Test for completion of all previously initiated requests * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef msg = PyMPI_testall(requests, &flag, statuses) * return (flag, msg) */ __pyx_v_flag = 0; /* "mpi4py/MPI/Request.pyx":279 * """ * cdef int flag = 0 * cdef msg = PyMPI_testall(requests, &flag, statuses) # <<<<<<<<<<<<<< * return (flag, msg) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_testall(__pyx_v_requests, (&__pyx_v_flag), __pyx_v_statuses); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":280 * cdef int flag = 0 * cdef msg = PyMPI_testall(requests, &flag, statuses) * return (flag, msg) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_msg); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":274 * # * @classmethod * def testall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Test for completion of all previously initiated requests */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Request.testall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":289 * """ * * def __cinit__(self, Request request=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_REQUEST_NULL: return * (request) */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_8Prequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_8Prequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIRequestObject *__pyx_v_request = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_request,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIRequestObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_request); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(25, 289, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_request = ((struct PyMPIRequestObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 289, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Prequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_request), __pyx_ptype_6mpi4py_3MPI_Request, 1, "request", 0))) __PYX_ERR(25, 289, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_8Prequest___cinit__(((struct PyMPIPrequestObject *)__pyx_v_self), __pyx_v_request); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_8Prequest___cinit__(struct PyMPIPrequestObject *__pyx_v_self, struct PyMPIRequestObject *__pyx_v_request) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Request.pyx":290 * * def __cinit__(self, Request request=None): * if self.ob_mpi == MPI_REQUEST_NULL: return # <<<<<<<<<<<<<< * (request) * */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.ob_mpi == MPI_REQUEST_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Request.pyx":291 * def __cinit__(self, Request request=None): * if self.ob_mpi == MPI_REQUEST_NULL: return * (request) # <<<<<<<<<<<<<< * * def Start(self): */ if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_v_request), __pyx_ptype_6mpi4py_3MPI_Prequest)))) __PYX_ERR(25, 291, __pyx_L1_error) ((void)((struct PyMPIPrequestObject *)__pyx_v_request)); /* "mpi4py/MPI/Request.pyx":289 * """ * * def __cinit__(self, Request request=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_REQUEST_NULL: return * (request) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Prequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":293 * (request) * * def Start(self): # <<<<<<<<<<<<<< * """ * Initiate a communication with a persistent request */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Prequest_3Start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Prequest_2Start[] = "Prequest.Start(self)\n\n Initiate a communication with a persistent request\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Prequest_3Start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Start (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Start", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Start", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Prequest_2Start(((struct PyMPIPrequestObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Prequest_2Start(struct PyMPIPrequestObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Start", 0); /* "mpi4py/MPI/Request.pyx":297 * Initiate a communication with a persistent request * """ * with nogil: CHKERR( MPI_Start(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * @classmethod */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Start((&__pyx_v_self->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(25, 297, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Request.pyx":293 * (request) * * def Start(self): # <<<<<<<<<<<<<< * """ * Initiate a communication with a persistent request */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Prequest.Start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":300 * * @classmethod * def Startall(cls, requests): # <<<<<<<<<<<<<< * """ * Start a collection of persistent requests */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Prequest_5Startall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Prequest_4Startall[] = "Prequest.Startall(type cls, requests)\n\n Start a collection of persistent requests\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Prequest_5Startall(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_requests = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Startall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_requests,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_requests)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Startall") < 0)) __PYX_ERR(25, 300, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_requests = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Startall", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 300, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Prequest.Startall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Prequest_4Startall(((PyTypeObject*)__pyx_v_cls), __pyx_v_requests); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Prequest_4Startall(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_requests) { int __pyx_v_count; MPI_Request *__pyx_v_irequests; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; char const *__pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; __Pyx_RefNannySetupContext("Startall", 0); /* "mpi4py/MPI/Request.pyx":304 * Start a collection of persistent requests * """ * cdef int count = 0 # <<<<<<<<<<<<<< * cdef MPI_Request *irequests = NULL * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) */ __pyx_v_count = 0; /* "mpi4py/MPI/Request.pyx":305 * """ * cdef int count = 0 * cdef MPI_Request *irequests = NULL # <<<<<<<<<<<<<< * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * # */ __pyx_v_irequests = NULL; /* "mpi4py/MPI/Request.pyx":306 * cdef int count = 0 * cdef MPI_Request *irequests = NULL * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) # <<<<<<<<<<<<<< * # * try: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_acquire_rs(__pyx_v_requests, Py_None, (&__pyx_v_count), (&__pyx_v_irequests), NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":308 * cdef tmp = acquire_rs(requests, None, &count, &irequests, NULL) * # * try: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Startall(count, irequests) ) * finally: */ /*try:*/ { /* "mpi4py/MPI/Request.pyx":309 * # * try: * with nogil: CHKERR( MPI_Startall(count, irequests) ) # <<<<<<<<<<<<<< * finally: * release_rs(requests, None, count, irequests, NULL) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Startall(__pyx_v_count, __pyx_v_irequests)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 309, __pyx_L7_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L4_error; } __pyx_L8:; } } } /* "mpi4py/MPI/Request.pyx":311 * with nogil: CHKERR( MPI_Startall(count, irequests) ) * finally: * release_rs(requests, None, count, irequests, NULL) # <<<<<<<<<<<<<< * * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(25, 311, __pyx_L1_error) goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __pyx_t_2 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename; { __pyx_t_11 = __pyx_f_6mpi4py_3MPI_release_rs(__pyx_v_requests, Py_None, __pyx_v_count, __pyx_v_irequests, NULL); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(25, 311, __pyx_L10_error) } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_lineno = __pyx_t_2; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4; goto __pyx_L1_error; __pyx_L10_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "mpi4py/MPI/Request.pyx":300 * * @classmethod * def Startall(cls, requests): # <<<<<<<<<<<<<< * """ * Start a collection of persistent requests */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Prequest.Startall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":321 * """ * * def __cinit__(self, Request request=None): # <<<<<<<<<<<<<< * self.ob_grequest = self.ob_mpi * if self.ob_mpi == MPI_REQUEST_NULL: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_8Grequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_8Grequest_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIRequestObject *__pyx_v_request = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_request,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIRequestObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_request); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(25, 321, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_request = ((struct PyMPIRequestObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 321, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Grequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_request), __pyx_ptype_6mpi4py_3MPI_Request, 1, "request", 0))) __PYX_ERR(25, 321, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_8Grequest___cinit__(((struct PyMPIGrequestObject *)__pyx_v_self), __pyx_v_request); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_8Grequest___cinit__(struct PyMPIGrequestObject *__pyx_v_self, struct PyMPIRequestObject *__pyx_v_request) { int __pyx_r; __Pyx_RefNannyDeclarations MPI_Request __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Request.pyx":322 * * def __cinit__(self, Request request=None): * self.ob_grequest = self.ob_mpi # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_REQUEST_NULL: return * (request) */ __pyx_t_1 = __pyx_v_self->__pyx_base.ob_mpi; __pyx_v_self->ob_grequest = __pyx_t_1; /* "mpi4py/MPI/Request.pyx":323 * def __cinit__(self, Request request=None): * self.ob_grequest = self.ob_mpi * if self.ob_mpi == MPI_REQUEST_NULL: return # <<<<<<<<<<<<<< * (request) * */ __pyx_t_2 = ((__pyx_v_self->__pyx_base.ob_mpi == MPI_REQUEST_NULL) != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Request.pyx":324 * self.ob_grequest = self.ob_mpi * if self.ob_mpi == MPI_REQUEST_NULL: return * (request) # <<<<<<<<<<<<<< * * @classmethod */ if (!(likely(__Pyx_TypeTest(((PyObject *)__pyx_v_request), __pyx_ptype_6mpi4py_3MPI_Grequest)))) __PYX_ERR(25, 324, __pyx_L1_error) ((void)((struct PyMPIGrequestObject *)__pyx_v_request)); /* "mpi4py/MPI/Request.pyx":321 * """ * * def __cinit__(self, Request request=None): # <<<<<<<<<<<<<< * self.ob_grequest = self.ob_mpi * if self.ob_mpi == MPI_REQUEST_NULL: return */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Grequest.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":327 * * @classmethod * def Start(cls, query_fn, free_fn, cancel_fn, # <<<<<<<<<<<<<< * args=None, kargs=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Grequest_3Start(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Grequest_2Start[] = "Grequest.Start(type cls, query_fn, free_fn, cancel_fn, args=None, kargs=None)\n\n Create and return a user-defined request\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Grequest_3Start(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_query_fn = 0; PyObject *__pyx_v_free_fn = 0; PyObject *__pyx_v_cancel_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Start (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_query_fn,&__pyx_n_s_free_fn,&__pyx_n_s_cancel_fn,&__pyx_n_s_args,&__pyx_n_s_kargs,0}; PyObject* values[5] = {0,0,0,0,0}; /* "mpi4py/MPI/Request.pyx":328 * @classmethod * def Start(cls, query_fn, free_fn, cancel_fn, * args=None, kargs=None): # <<<<<<<<<<<<<< * """ * Create and return a user-defined request */ values[3] = ((PyObject *)Py_None); values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_query_fn)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_free_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Start", 0, 3, 5, 1); __PYX_ERR(25, 327, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cancel_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Start", 0, 3, 5, 2); __PYX_ERR(25, 327, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kargs); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Start") < 0)) __PYX_ERR(25, 327, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_query_fn = values[0]; __pyx_v_free_fn = values[1]; __pyx_v_cancel_fn = values[2]; __pyx_v_args = values[3]; __pyx_v_kargs = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Start", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(25, 327, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Grequest.Start", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Grequest_2Start(((PyTypeObject*)__pyx_v_cls), __pyx_v_query_fn, __pyx_v_free_fn, __pyx_v_cancel_fn, __pyx_v_args, __pyx_v_kargs); /* "mpi4py/MPI/Request.pyx":327 * * @classmethod * def Start(cls, query_fn, free_fn, cancel_fn, # <<<<<<<<<<<<<< * args=None, kargs=None): * """ */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Grequest_2Start(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_query_fn, PyObject *__pyx_v_free_fn, PyObject *__pyx_v_cancel_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kargs) { struct PyMPIGrequestObject *__pyx_v_request = 0; struct __pyx_obj_6mpi4py_3MPI__p_greq *__pyx_v_state = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; MPI_Request __pyx_t_4; __Pyx_RefNannySetupContext("Start", 0); /* "mpi4py/MPI/Request.pyx":332 * Create and return a user-defined request * """ * cdef Grequest request = Grequest.__new__(Grequest) # <<<<<<<<<<<<<< * cdef _p_greq state = \ * _p_greq(query_fn, free_fn, cancel_fn, args, kargs) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Grequest(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Grequest), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 332, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIGrequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Request.pyx":334 * cdef Grequest request = Grequest.__new__(Grequest) * cdef _p_greq state = \ * _p_greq(query_fn, free_fn, cancel_fn, args, kargs) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Grequest_start( * greq_query_fn, greq_free_fn, greq_cancel_fn, */ __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_query_fn); __Pyx_GIVEREF(__pyx_v_query_fn); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_query_fn); __Pyx_INCREF(__pyx_v_free_fn); __Pyx_GIVEREF(__pyx_v_free_fn); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_free_fn); __Pyx_INCREF(__pyx_v_cancel_fn); __Pyx_GIVEREF(__pyx_v_cancel_fn); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_cancel_fn); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_args); __Pyx_INCREF(__pyx_v_kargs); __Pyx_GIVEREF(__pyx_v_kargs); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_kargs); __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6mpi4py_3MPI__p_greq), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_state = ((struct __pyx_obj_6mpi4py_3MPI__p_greq *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Request.pyx":335 * cdef _p_greq state = \ * _p_greq(query_fn, free_fn, cancel_fn, args, kargs) * with nogil: CHKERR( MPI_Grequest_start( # <<<<<<<<<<<<<< * greq_query_fn, greq_free_fn, greq_cancel_fn, * state, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Request.pyx":337 * with nogil: CHKERR( MPI_Grequest_start( * greq_query_fn, greq_free_fn, greq_cancel_fn, * state, &request.ob_mpi) ) # <<<<<<<<<<<<<< * Py_INCREF(state) * request.ob_grequest = request.ob_mpi */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Grequest_start(__pyx_f_6mpi4py_3MPI_greq_query_fn, __pyx_f_6mpi4py_3MPI_greq_free_fn, __pyx_f_6mpi4py_3MPI_greq_cancel_fn, ((void *)__pyx_v_state), (&__pyx_v_request->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(25, 335, __pyx_L4_error) } /* "mpi4py/MPI/Request.pyx":335 * cdef _p_greq state = \ * _p_greq(query_fn, free_fn, cancel_fn, args, kargs) * with nogil: CHKERR( MPI_Grequest_start( # <<<<<<<<<<<<<< * greq_query_fn, greq_free_fn, greq_cancel_fn, * state, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Request.pyx":338 * greq_query_fn, greq_free_fn, greq_cancel_fn, * state, &request.ob_mpi) ) * Py_INCREF(state) # <<<<<<<<<<<<<< * request.ob_grequest = request.ob_mpi * return request */ Py_INCREF(((PyObject *)__pyx_v_state)); /* "mpi4py/MPI/Request.pyx":339 * state, &request.ob_mpi) ) * Py_INCREF(state) * request.ob_grequest = request.ob_mpi # <<<<<<<<<<<<<< * return request * */ __pyx_t_4 = __pyx_v_request->__pyx_base.ob_mpi; __pyx_v_request->ob_grequest = __pyx_t_4; /* "mpi4py/MPI/Request.pyx":340 * Py_INCREF(state) * request.ob_grequest = request.ob_mpi * return request # <<<<<<<<<<<<<< * * def Complete(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Request.pyx":327 * * @classmethod * def Start(cls, query_fn, free_fn, cancel_fn, # <<<<<<<<<<<<<< * args=None, kargs=None): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Grequest.Start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XDECREF((PyObject *)__pyx_v_state); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Request.pyx":342 * return request * * def Complete(self): # <<<<<<<<<<<<<< * """ * Notify that a user-defined request is complete */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Grequest_5Complete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Grequest_4Complete[] = "Grequest.Complete(self)\n\n Notify that a user-defined request is complete\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Grequest_5Complete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Complete (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Complete", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Complete", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Grequest_4Complete(((struct PyMPIGrequestObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Grequest_4Complete(struct PyMPIGrequestObject *__pyx_v_self) { MPI_Request __pyx_v_grequest; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; MPI_Request __pyx_t_6; int __pyx_t_7; __Pyx_RefNannySetupContext("Complete", 0); /* "mpi4py/MPI/Request.pyx":346 * Notify that a user-defined request is complete * """ * if self.ob_mpi != MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * if self.ob_mpi != self.ob_grequest: * raise MPIException(MPI_ERR_REQUEST) */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.ob_mpi != MPI_REQUEST_NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/Request.pyx":347 * """ * if self.ob_mpi != MPI_REQUEST_NULL: * if self.ob_mpi != self.ob_grequest: # <<<<<<<<<<<<<< * raise MPIException(MPI_ERR_REQUEST) * cdef MPI_Request grequest = self.ob_grequest */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.ob_mpi != __pyx_v_self->ob_grequest) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/Request.pyx":348 * if self.ob_mpi != MPI_REQUEST_NULL: * if self.ob_mpi != self.ob_grequest: * raise MPIException(MPI_ERR_REQUEST) # <<<<<<<<<<<<<< * cdef MPI_Request grequest = self.ob_grequest * self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_ERR_REQUEST); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_6mpi4py_3MPI_MPIException); __pyx_t_4 = __pyx_v_6mpi4py_3MPI_MPIException; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(25, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(25, 348, __pyx_L1_error) /* "mpi4py/MPI/Request.pyx":347 * """ * if self.ob_mpi != MPI_REQUEST_NULL: * if self.ob_mpi != self.ob_grequest: # <<<<<<<<<<<<<< * raise MPIException(MPI_ERR_REQUEST) * cdef MPI_Request grequest = self.ob_grequest */ } /* "mpi4py/MPI/Request.pyx":346 * Notify that a user-defined request is complete * """ * if self.ob_mpi != MPI_REQUEST_NULL: # <<<<<<<<<<<<<< * if self.ob_mpi != self.ob_grequest: * raise MPIException(MPI_ERR_REQUEST) */ } /* "mpi4py/MPI/Request.pyx":349 * if self.ob_mpi != self.ob_grequest: * raise MPIException(MPI_ERR_REQUEST) * cdef MPI_Request grequest = self.ob_grequest # <<<<<<<<<<<<<< * self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? * with nogil: CHKERR( MPI_Grequest_complete(grequest) ) */ __pyx_t_6 = __pyx_v_self->ob_grequest; __pyx_v_grequest = __pyx_t_6; /* "mpi4py/MPI/Request.pyx":350 * raise MPIException(MPI_ERR_REQUEST) * cdef MPI_Request grequest = self.ob_grequest * self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Grequest_complete(grequest) ) * self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? */ __pyx_t_6 = __pyx_v_self->__pyx_base.ob_mpi; __pyx_v_self->ob_grequest = __pyx_t_6; /* "mpi4py/MPI/Request.pyx":351 * cdef MPI_Request grequest = self.ob_grequest * self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? * with nogil: CHKERR( MPI_Grequest_complete(grequest) ) # <<<<<<<<<<<<<< * self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_7 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Grequest_complete(__pyx_v_grequest)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(25, 351, __pyx_L6_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7; } __pyx_L6_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L7:; } } /* "mpi4py/MPI/Request.pyx":352 * self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? * with nogil: CHKERR( MPI_Grequest_complete(grequest) ) * self.ob_grequest = self.ob_mpi ## or MPI_REQUEST_NULL ?? # <<<<<<<<<<<<<< * * */ __pyx_t_6 = __pyx_v_self->__pyx_base.ob_mpi; __pyx_v_self->ob_grequest = __pyx_t_6; /* "mpi4py/MPI/Request.pyx":342 * return request * * def Complete(self): # <<<<<<<<<<<<<< * """ * Notify that a user-defined request is complete */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Grequest.Complete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":7 * """ * * def __cinit__(self, Message message=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_MESSAGE_NULL * if message is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_7Message_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_7Message_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIMessageObject *__pyx_v_message = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_message,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIMessageObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(26, 7, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_message = ((struct PyMPIMessageObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(26, 7, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Message.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), __pyx_ptype_6mpi4py_3MPI_Message, 1, "message", 0))) __PYX_ERR(26, 7, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message___cinit__(((struct PyMPIMessageObject *)__pyx_v_self), __pyx_v_message); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_7Message___cinit__(struct PyMPIMessageObject *__pyx_v_self, struct PyMPIMessageObject *__pyx_v_message) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Message __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Message.pyx":8 * * def __cinit__(self, Message message=None): * self.ob_mpi = MPI_MESSAGE_NULL # <<<<<<<<<<<<<< * if message is None: return * self.ob_mpi = message.ob_mpi */ __pyx_v_self->ob_mpi = MPI_MESSAGE_NULL; /* "mpi4py/MPI/Message.pyx":9 * def __cinit__(self, Message message=None): * self.ob_mpi = MPI_MESSAGE_NULL * if message is None: return # <<<<<<<<<<<<<< * self.ob_mpi = message.ob_mpi * self.ob_buf = message.ob_buf */ __pyx_t_1 = (((PyObject *)__pyx_v_message) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Message.pyx":10 * self.ob_mpi = MPI_MESSAGE_NULL * if message is None: return * self.ob_mpi = message.ob_mpi # <<<<<<<<<<<<<< * self.ob_buf = message.ob_buf * */ __pyx_t_3 = __pyx_v_message->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Message.pyx":11 * if message is None: return * self.ob_mpi = message.ob_mpi * self.ob_buf = message.ob_buf # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_4 = __pyx_v_message->ob_buf; __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->ob_buf); __Pyx_DECREF(__pyx_v_self->ob_buf); __pyx_v_self->ob_buf = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/Message.pyx":7 * """ * * def __cinit__(self, Message message=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_MESSAGE_NULL * if message is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":13 * self.ob_buf = message.ob_buf * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Message(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_7Message_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_7Message_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_7Message_2__dealloc__(((struct PyMPIMessageObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_7Message_2__dealloc__(struct PyMPIMessageObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/Message.pyx":14 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_Message(&self.ob_mpi) ) * */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/Message.pyx":15 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Message(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_Message((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(26, 15, __pyx_L1_error) /* "mpi4py/MPI/Message.pyx":13 * self.ob_buf = message.ob_buf * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Message(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.Message.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/Message.pyx":17 * CHKERR( del_Message(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Message): return NotImplemented * cdef Message s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_4__richcmp__(((struct PyMPIMessageObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_4__richcmp__(struct PyMPIMessageObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIMessageObject *__pyx_v_s = 0; struct PyMPIMessageObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Message.pyx":18 * * def __richcmp__(self, other, int op): * if not isinstance(other, Message): return NotImplemented # <<<<<<<<<<<<<< * cdef Message s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Message); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Message.pyx":19 * def __richcmp__(self, other, int op): * if not isinstance(other, Message): return NotImplemented * cdef Message s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIMessageObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIMessageObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Message.pyx":20 * if not isinstance(other, Message): return NotImplemented * cdef Message s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Message.pyx":21 * cdef Message s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Message.pyx":22 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Message.pyx":23 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Message.pyx":24 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(26, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(26, 24, __pyx_L1_error) /* "mpi4py/MPI/Message.pyx":17 * CHKERR( del_Message(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Message): return NotImplemented * cdef Message s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Message.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":26 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_MESSAGE_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_7Message_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_7Message_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_6__bool__(((struct PyMPIMessageObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_7Message_6__bool__(struct PyMPIMessageObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/Message.pyx":27 * * def __bool__(self): * return self.ob_mpi != MPI_MESSAGE_NULL # <<<<<<<<<<<<<< * * # Matching Probe */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_MESSAGE_NULL); goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":26 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_MESSAGE_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":33 * * @classmethod * def Probe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_9Probe(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_8Probe[] = "Message.Probe(type cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\n\n Blocking test for a matched message\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_9Probe(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Probe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[4] = {0,0,0,0}; /* "mpi4py/MPI/Message.pyx":34 * @classmethod * def Probe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): # <<<<<<<<<<<<<< * """ * Blocking test for a matched message */ values[3] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Probe") < 0)) __PYX_ERR(26, 33, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); if (values[1]) { __pyx_v_source = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 34, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__29; } if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 34, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__30; } __pyx_v_status = ((struct PyMPIStatusObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Probe", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(26, 33, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Message.Probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm", 0))) __PYX_ERR(26, 33, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(26, 34, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_8Probe(((PyTypeObject*)__pyx_v_cls), __pyx_v_comm, __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Message.pyx":33 * * @classmethod * def Probe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_8Probe(PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { MPI_Message __pyx_v_cmessage; MPI_Status *__pyx_v_statusp; struct PyMPIMessageObject *__pyx_v_message = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Probe", 0); /* "mpi4py/MPI/Message.pyx":38 * Blocking test for a matched message * """ * cdef MPI_Message cmessage = MPI_MESSAGE_NULL # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mprobe( */ __pyx_v_cmessage = MPI_MESSAGE_NULL; /* "mpi4py/MPI/Message.pyx":39 * """ * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Mprobe( * source, tag, comm.ob_mpi, &cmessage, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Message.pyx":40 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mprobe( # <<<<<<<<<<<<<< * source, tag, comm.ob_mpi, &cmessage, statusp) ) * cdef Message message = Message.__new__(cls) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Message.pyx":41 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mprobe( * source, tag, comm.ob_mpi, &cmessage, statusp) ) # <<<<<<<<<<<<<< * cdef Message message = Message.__new__(cls) * message.ob_mpi = cmessage */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Mprobe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm->ob_mpi, (&__pyx_v_cmessage), __pyx_v_statusp)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(26, 40, __pyx_L4_error) } /* "mpi4py/MPI/Message.pyx":40 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mprobe( # <<<<<<<<<<<<<< * source, tag, comm.ob_mpi, &cmessage, statusp) ) * cdef Message message = Message.__new__(cls) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Message.pyx":42 * with nogil: CHKERR( MPI_Mprobe( * source, tag, comm.ob_mpi, &cmessage, statusp) ) * cdef Message message = Message.__new__(cls) # <<<<<<<<<<<<<< * message.ob_mpi = cmessage * return message */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_cls)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_cls)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Message.pyx":43 * source, tag, comm.ob_mpi, &cmessage, statusp) ) * cdef Message message = Message.__new__(cls) * message.ob_mpi = cmessage # <<<<<<<<<<<<<< * return message * */ __pyx_v_message->ob_mpi = __pyx_v_cmessage; /* "mpi4py/MPI/Message.pyx":44 * cdef Message message = Message.__new__(cls) * message.ob_mpi = cmessage * return message # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = ((PyObject *)__pyx_v_message); goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":33 * * @classmethod * def Probe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Message.Probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":47 * * @classmethod * def Iprobe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_11Iprobe(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_10Iprobe[] = "Message.Iprobe(type cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\n\n Nonblocking test for a matched message\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_11Iprobe(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iprobe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[4] = {0,0,0,0}; /* "mpi4py/MPI/Message.pyx":48 * @classmethod * def Iprobe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): # <<<<<<<<<<<<<< * """ * Nonblocking test for a matched message */ values[3] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iprobe") < 0)) __PYX_ERR(26, 47, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); if (values[1]) { __pyx_v_source = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 48, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__31; } if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 48, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__32; } __pyx_v_status = ((struct PyMPIStatusObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iprobe", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(26, 47, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Message.Iprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm", 0))) __PYX_ERR(26, 47, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(26, 48, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_10Iprobe(((PyTypeObject*)__pyx_v_cls), __pyx_v_comm, __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Message.pyx":47 * * @classmethod * def Iprobe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_10Iprobe(PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_flag; MPI_Message __pyx_v_cmessage; MPI_Status *__pyx_v_statusp; struct PyMPIMessageObject *__pyx_v_message = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("Iprobe", 0); /* "mpi4py/MPI/Message.pyx":52 * Nonblocking test for a matched message * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_v_flag = 0; /* "mpi4py/MPI/Message.pyx":53 * """ * cdef int flag = 0 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Improbe( */ __pyx_v_cmessage = MPI_MESSAGE_NULL; /* "mpi4py/MPI/Message.pyx":54 * cdef int flag = 0 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Improbe( * source, tag, comm.ob_mpi, &flag, &cmessage, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Message.pyx":55 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Improbe( # <<<<<<<<<<<<<< * source, tag, comm.ob_mpi, &flag, &cmessage, statusp) ) * if flag == 0: return None */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Message.pyx":56 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Improbe( * source, tag, comm.ob_mpi, &flag, &cmessage, statusp) ) # <<<<<<<<<<<<<< * if flag == 0: return None * cdef Message message = Message.__new__(cls) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Improbe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm->ob_mpi, (&__pyx_v_flag), (&__pyx_v_cmessage), __pyx_v_statusp)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(26, 55, __pyx_L4_error) } /* "mpi4py/MPI/Message.pyx":55 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Improbe( # <<<<<<<<<<<<<< * source, tag, comm.ob_mpi, &flag, &cmessage, statusp) ) * if flag == 0: return None */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Message.pyx":57 * with nogil: CHKERR( MPI_Improbe( * source, tag, comm.ob_mpi, &flag, &cmessage, statusp) ) * if flag == 0: return None # <<<<<<<<<<<<<< * cdef Message message = Message.__new__(cls) * message.ob_mpi = cmessage */ __pyx_t_2 = ((__pyx_v_flag == 0) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Message.pyx":58 * source, tag, comm.ob_mpi, &flag, &cmessage, statusp) ) * if flag == 0: return None * cdef Message message = Message.__new__(cls) # <<<<<<<<<<<<<< * message.ob_mpi = cmessage * return message */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_n_s_new); if (unlikely(!__pyx_t_4)) __PYX_ERR(26, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_cls)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_cls)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Message.pyx":59 * if flag == 0: return None * cdef Message message = Message.__new__(cls) * message.ob_mpi = cmessage # <<<<<<<<<<<<<< * return message * */ __pyx_v_message->ob_mpi = __pyx_v_cmessage; /* "mpi4py/MPI/Message.pyx":60 * cdef Message message = Message.__new__(cls) * message.ob_mpi = cmessage * return message # <<<<<<<<<<<<<< * * # Matched receives */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = ((PyObject *)__pyx_v_message); goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":47 * * @classmethod * def Iprobe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Message.Iprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":65 * # ---------------- * * def Recv(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Blocking receive of matched message */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_13Recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_12Recv[] = "Message.Recv(self, buf, Status status=None)\n\n Blocking receive of matched message\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_13Recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Recv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Recv") < 0)) __PYX_ERR(26, 65, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Recv", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(26, 65, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Message.Recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(26, 65, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_12Recv(((struct PyMPIMessageObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_12Recv(struct PyMPIMessageObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { MPI_Message __pyx_v_message; int __pyx_v_source; struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_rmsg = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Message __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("Recv", 0); /* "mpi4py/MPI/Message.pyx":69 * Blocking receive of matched message * """ * cdef MPI_Message message = self.ob_mpi # <<<<<<<<<<<<<< * cdef int source = MPI_ANY_SOURCE * if message == MPI_MESSAGE_NO_PROC: */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_message = __pyx_t_1; /* "mpi4py/MPI/Message.pyx":70 * """ * cdef MPI_Message message = self.ob_mpi * cdef int source = MPI_ANY_SOURCE # <<<<<<<<<<<<<< * if message == MPI_MESSAGE_NO_PROC: * source = MPI_PROC_NULL */ __pyx_v_source = MPI_ANY_SOURCE; /* "mpi4py/MPI/Message.pyx":71 * cdef MPI_Message message = self.ob_mpi * cdef int source = MPI_ANY_SOURCE * if message == MPI_MESSAGE_NO_PROC: # <<<<<<<<<<<<<< * source = MPI_PROC_NULL * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) */ __pyx_t_2 = ((__pyx_v_message == MPI_MESSAGE_NO_PROC) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Message.pyx":72 * cdef int source = MPI_ANY_SOURCE * if message == MPI_MESSAGE_NO_PROC: * source = MPI_PROC_NULL # <<<<<<<<<<<<<< * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_v_source = MPI_PROC_NULL; /* "mpi4py/MPI/Message.pyx":71 * cdef MPI_Message message = self.ob_mpi * cdef int source = MPI_ANY_SOURCE * if message == MPI_MESSAGE_NO_PROC: # <<<<<<<<<<<<<< * source = MPI_PROC_NULL * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) */ } /* "mpi4py/MPI/Message.pyx":73 * if message == MPI_MESSAGE_NO_PROC: * source = MPI_PROC_NULL * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mrecv( */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_recv(__pyx_v_buf, __pyx_v_source)); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rmsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Message.pyx":74 * source = MPI_PROC_NULL * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Mrecv( * rmsg.buf, rmsg.count, rmsg.dtype, */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Message.pyx":75 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mrecv( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * &message, statusp) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Message.pyx":77 * with nogil: CHKERR( MPI_Mrecv( * rmsg.buf, rmsg.count, rmsg.dtype, * &message, statusp) ) # <<<<<<<<<<<<<< * if self is not __MESSAGE_NO_PROC__: * self.ob_mpi = message */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Mrecv(__pyx_v_rmsg->buf, __pyx_v_rmsg->count, __pyx_v_rmsg->dtype, (&__pyx_v_message), __pyx_v_statusp)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(26, 75, __pyx_L5_error) } /* "mpi4py/MPI/Message.pyx":75 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mrecv( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * &message, statusp) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Message.pyx":78 * rmsg.buf, rmsg.count, rmsg.dtype, * &message, statusp) ) * if self is not __MESSAGE_NO_PROC__: # <<<<<<<<<<<<<< * self.ob_mpi = message * */ __pyx_t_2 = (__pyx_v_self != __pyx_v_6mpi4py_3MPI___MESSAGE_NO_PROC__); __pyx_t_5 = (__pyx_t_2 != 0); if (__pyx_t_5) { /* "mpi4py/MPI/Message.pyx":79 * &message, statusp) ) * if self is not __MESSAGE_NO_PROC__: * self.ob_mpi = message # <<<<<<<<<<<<<< * * def Irecv(self, buf): */ __pyx_v_self->ob_mpi = __pyx_v_message; /* "mpi4py/MPI/Message.pyx":78 * rmsg.buf, rmsg.count, rmsg.dtype, * &message, statusp) ) * if self is not __MESSAGE_NO_PROC__: # <<<<<<<<<<<<<< * self.ob_mpi = message * */ } /* "mpi4py/MPI/Message.pyx":65 * # ---------------- * * def Recv(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Blocking receive of matched message */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Message.Recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":81 * self.ob_mpi = message * * def Irecv(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking receive of matched message */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_15Irecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_14Irecv[] = "Message.Irecv(self, buf)\n\n Nonblocking receive of matched message\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_15Irecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Irecv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Irecv") < 0)) __PYX_ERR(26, 81, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Irecv", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(26, 81, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Message.Irecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_14Irecv(((struct PyMPIMessageObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_14Irecv(struct PyMPIMessageObject *__pyx_v_self, PyObject *__pyx_v_buf) { MPI_Message __pyx_v_message; int __pyx_v_source; struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_rmsg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Message __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; __Pyx_RefNannySetupContext("Irecv", 0); /* "mpi4py/MPI/Message.pyx":85 * Nonblocking receive of matched message * """ * cdef MPI_Message message = self.ob_mpi # <<<<<<<<<<<<<< * cdef int source = MPI_ANY_SOURCE * if message == MPI_MESSAGE_NO_PROC: */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_message = __pyx_t_1; /* "mpi4py/MPI/Message.pyx":86 * """ * cdef MPI_Message message = self.ob_mpi * cdef int source = MPI_ANY_SOURCE # <<<<<<<<<<<<<< * if message == MPI_MESSAGE_NO_PROC: * source = MPI_PROC_NULL */ __pyx_v_source = MPI_ANY_SOURCE; /* "mpi4py/MPI/Message.pyx":87 * cdef MPI_Message message = self.ob_mpi * cdef int source = MPI_ANY_SOURCE * if message == MPI_MESSAGE_NO_PROC: # <<<<<<<<<<<<<< * source = MPI_PROC_NULL * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) */ __pyx_t_2 = ((__pyx_v_message == MPI_MESSAGE_NO_PROC) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Message.pyx":88 * cdef int source = MPI_ANY_SOURCE * if message == MPI_MESSAGE_NO_PROC: * source = MPI_PROC_NULL # <<<<<<<<<<<<<< * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Request request = Request.__new__(Request) */ __pyx_v_source = MPI_PROC_NULL; /* "mpi4py/MPI/Message.pyx":87 * cdef MPI_Message message = self.ob_mpi * cdef int source = MPI_ANY_SOURCE * if message == MPI_MESSAGE_NO_PROC: # <<<<<<<<<<<<<< * source = MPI_PROC_NULL * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) */ } /* "mpi4py/MPI/Message.pyx":89 * if message == MPI_MESSAGE_NO_PROC: * source = MPI_PROC_NULL * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Imrecv( */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_recv(__pyx_v_buf, __pyx_v_source)); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rmsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Message.pyx":90 * source = MPI_PROC_NULL * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Imrecv( * rmsg.buf, rmsg.count, rmsg.dtype, */ __pyx_t_3 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 90, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Message.pyx":91 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Imrecv( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * &message, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Message.pyx":93 * with nogil: CHKERR( MPI_Imrecv( * rmsg.buf, rmsg.count, rmsg.dtype, * &message, &request.ob_mpi) ) # <<<<<<<<<<<<<< * if self is not __MESSAGE_NO_PROC__: * self.ob_mpi = message */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Imrecv(__pyx_v_rmsg->buf, __pyx_v_rmsg->count, __pyx_v_rmsg->dtype, (&__pyx_v_message), (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(26, 91, __pyx_L5_error) } /* "mpi4py/MPI/Message.pyx":91 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Imrecv( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * &message, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Message.pyx":94 * rmsg.buf, rmsg.count, rmsg.dtype, * &message, &request.ob_mpi) ) * if self is not __MESSAGE_NO_PROC__: # <<<<<<<<<<<<<< * self.ob_mpi = message * request.ob_buf = rmsg */ __pyx_t_2 = (__pyx_v_self != __pyx_v_6mpi4py_3MPI___MESSAGE_NO_PROC__); __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { /* "mpi4py/MPI/Message.pyx":95 * &message, &request.ob_mpi) ) * if self is not __MESSAGE_NO_PROC__: * self.ob_mpi = message # <<<<<<<<<<<<<< * request.ob_buf = rmsg * return request */ __pyx_v_self->ob_mpi = __pyx_v_message; /* "mpi4py/MPI/Message.pyx":94 * rmsg.buf, rmsg.count, rmsg.dtype, * &message, &request.ob_mpi) ) * if self is not __MESSAGE_NO_PROC__: # <<<<<<<<<<<<<< * self.ob_mpi = message * request.ob_buf = rmsg */ } /* "mpi4py/MPI/Message.pyx":96 * if self is not __MESSAGE_NO_PROC__: * self.ob_mpi = message * request.ob_buf = rmsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_rmsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rmsg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_rmsg); /* "mpi4py/MPI/Message.pyx":97 * self.ob_mpi = message * request.ob_buf = rmsg * return request # <<<<<<<<<<<<<< * * # Python Communication */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":81 * self.ob_mpi = message * * def Irecv(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking receive of matched message */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Message.Irecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rmsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":103 * # * @classmethod * def probe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Blocking test for a matched message""" */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_17probe(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_16probe[] = "Message.probe(type cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\nBlocking test for a matched message"; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_17probe(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("probe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[4] = {0,0,0,0}; /* "mpi4py/MPI/Message.pyx":104 * @classmethod * def probe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): # <<<<<<<<<<<<<< * """Blocking test for a matched message""" * cdef Message message = Message.__new__(cls) */ values[3] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "probe") < 0)) __PYX_ERR(26, 103, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); if (values[1]) { __pyx_v_source = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 104, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__33; } if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 104, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__34; } __pyx_v_status = ((struct PyMPIStatusObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("probe", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(26, 103, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Message.probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm", 0))) __PYX_ERR(26, 103, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(26, 104, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_16probe(((PyTypeObject*)__pyx_v_cls), __pyx_v_comm, __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Message.pyx":103 * # * @classmethod * def probe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Blocking test for a matched message""" */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_16probe(PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { struct PyMPIMessageObject *__pyx_v_message = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("probe", 0); /* "mpi4py/MPI/Message.pyx":106 * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Blocking test for a matched message""" * cdef Message message = Message.__new__(cls) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * message.ob_buf = PyMPI_mprobe(source, tag, comm.ob_mpi, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_cls)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_cls)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Message.pyx":107 * """Blocking test for a matched message""" * cdef Message message = Message.__new__(cls) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * message.ob_buf = PyMPI_mprobe(source, tag, comm.ob_mpi, * &message.ob_mpi, statusp) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Message.pyx":108 * cdef Message message = Message.__new__(cls) * cdef MPI_Status *statusp = arg_Status(status) * message.ob_buf = PyMPI_mprobe(source, tag, comm.ob_mpi, # <<<<<<<<<<<<<< * &message.ob_mpi, statusp) * return message */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_mprobe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm->ob_mpi, (&__pyx_v_message->ob_mpi), __pyx_v_statusp); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_message->ob_buf); __Pyx_DECREF(__pyx_v_message->ob_buf); __pyx_v_message->ob_buf = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Message.pyx":110 * message.ob_buf = PyMPI_mprobe(source, tag, comm.ob_mpi, * &message.ob_mpi, statusp) * return message # <<<<<<<<<<<<<< * # * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = ((PyObject *)__pyx_v_message); goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":103 * # * @classmethod * def probe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Blocking test for a matched message""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Message.probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":113 * # * @classmethod * def iprobe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Nonblocking test for a matched message""" */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_19iprobe(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_18iprobe[] = "Message.iprobe(type cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\nNonblocking test for a matched message"; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_19iprobe(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("iprobe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[4] = {0,0,0,0}; /* "mpi4py/MPI/Message.pyx":114 * @classmethod * def iprobe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): # <<<<<<<<<<<<<< * """Nonblocking test for a matched message""" * cdef int flag = 0 */ values[3] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iprobe") < 0)) __PYX_ERR(26, 113, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); if (values[1]) { __pyx_v_source = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 114, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__35; } if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 114, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__36; } __pyx_v_status = ((struct PyMPIStatusObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("iprobe", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(26, 113, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Message.iprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm", 0))) __PYX_ERR(26, 113, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(26, 114, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_18iprobe(((PyTypeObject*)__pyx_v_cls), __pyx_v_comm, __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Message.pyx":113 * # * @classmethod * def iprobe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Nonblocking test for a matched message""" */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_18iprobe(PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_flag; struct PyMPIMessageObject *__pyx_v_message = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("iprobe", 0); /* "mpi4py/MPI/Message.pyx":116 * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Nonblocking test for a matched message""" * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef Message message = Message.__new__(cls) * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_v_flag = 0; /* "mpi4py/MPI/Message.pyx":117 * """Nonblocking test for a matched message""" * cdef int flag = 0 * cdef Message message = Message.__new__(cls) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * message.ob_buf = PyMPI_improbe(source, tag, comm.ob_mpi, &flag, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_cls)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_cls)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Message.pyx":118 * cdef int flag = 0 * cdef Message message = Message.__new__(cls) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * message.ob_buf = PyMPI_improbe(source, tag, comm.ob_mpi, &flag, * &message.ob_mpi, statusp) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Message.pyx":119 * cdef Message message = Message.__new__(cls) * cdef MPI_Status *statusp = arg_Status(status) * message.ob_buf = PyMPI_improbe(source, tag, comm.ob_mpi, &flag, # <<<<<<<<<<<<<< * &message.ob_mpi, statusp) * if flag == 0: return None */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_improbe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm->ob_mpi, (&__pyx_v_flag), (&__pyx_v_message->ob_mpi), __pyx_v_statusp); if (unlikely(!__pyx_t_2)) __PYX_ERR(26, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_message->ob_buf); __Pyx_DECREF(__pyx_v_message->ob_buf); __pyx_v_message->ob_buf = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Message.pyx":121 * message.ob_buf = PyMPI_improbe(source, tag, comm.ob_mpi, &flag, * &message.ob_mpi, statusp) * if flag == 0: return None # <<<<<<<<<<<<<< * return message * # */ __pyx_t_4 = ((__pyx_v_flag == 0) != 0); if (__pyx_t_4) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Message.pyx":122 * &message.ob_mpi, statusp) * if flag == 0: return None * return message # <<<<<<<<<<<<<< * # * def recv(self, Status status=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = ((PyObject *)__pyx_v_message); goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":113 * # * @classmethod * def iprobe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Nonblocking test for a matched message""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Message.iprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":124 * return message * # * def recv(self, Status status=None): # <<<<<<<<<<<<<< * """Blocking receive of matched message""" * cdef object rmsg = self.ob_buf */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_21recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_20recv[] = "Message.recv(self, Status status=None)\nBlocking receive of matched message"; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_21recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("recv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "recv") < 0)) __PYX_ERR(26, 124, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_status = ((struct PyMPIStatusObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("recv", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(26, 124, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Message.recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(26, 124, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_20recv(((struct PyMPIMessageObject *)__pyx_v_self), __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_20recv(struct PyMPIMessageObject *__pyx_v_self, struct PyMPIStatusObject *__pyx_v_status) { PyObject *__pyx_v_rmsg = 0; MPI_Message __pyx_v_message; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; MPI_Message __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("recv", 0); /* "mpi4py/MPI/Message.pyx":126 * def recv(self, Status status=None): * """Blocking receive of matched message""" * cdef object rmsg = self.ob_buf # <<<<<<<<<<<<<< * cdef MPI_Message message = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_t_1 = __pyx_v_self->ob_buf; __Pyx_INCREF(__pyx_t_1); __pyx_v_rmsg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Message.pyx":127 * """Blocking receive of matched message""" * cdef object rmsg = self.ob_buf * cdef MPI_Message message = self.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * rmsg = PyMPI_mrecv(rmsg, &message, statusp) */ __pyx_t_2 = __pyx_v_self->ob_mpi; __pyx_v_message = __pyx_t_2; /* "mpi4py/MPI/Message.pyx":128 * cdef object rmsg = self.ob_buf * cdef MPI_Message message = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * rmsg = PyMPI_mrecv(rmsg, &message, statusp) * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Message.pyx":129 * cdef MPI_Message message = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) * rmsg = PyMPI_mrecv(rmsg, &message, statusp) # <<<<<<<<<<<<<< * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message * if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_PyMPI_mrecv(__pyx_v_rmsg, (&__pyx_v_message), __pyx_v_statusp); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_rmsg, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Message.pyx":130 * cdef MPI_Status *statusp = arg_Status(status) * rmsg = PyMPI_mrecv(rmsg, &message, statusp) * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None * return rmsg */ __pyx_t_3 = (__pyx_v_self != __pyx_v_6mpi4py_3MPI___MESSAGE_NO_PROC__); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { __pyx_v_self->ob_mpi = __pyx_v_message; } /* "mpi4py/MPI/Message.pyx":131 * rmsg = PyMPI_mrecv(rmsg, &message, statusp) * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message * if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None # <<<<<<<<<<<<<< * return rmsg * # */ __pyx_t_4 = ((__pyx_v_self->ob_mpi == MPI_MESSAGE_NULL) != 0); if (__pyx_t_4) { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->ob_buf); __Pyx_DECREF(__pyx_v_self->ob_buf); __pyx_v_self->ob_buf = Py_None; } /* "mpi4py/MPI/Message.pyx":132 * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message * if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None * return rmsg # <<<<<<<<<<<<<< * # * def irecv(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rmsg); __pyx_r = __pyx_v_rmsg; goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":124 * return message * # * def recv(self, Status status=None): # <<<<<<<<<<<<<< * """Blocking receive of matched message""" * cdef object rmsg = self.ob_buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Message.recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":134 * return rmsg * # * def irecv(self): # <<<<<<<<<<<<<< * """Nonblocking receive of matched message""" * cdef object rmsg = self.ob_buf */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_23irecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_22irecv[] = "Message.irecv(self)\nNonblocking receive of matched message"; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_23irecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("irecv (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("irecv", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "irecv", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_22irecv(((struct PyMPIMessageObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_22irecv(struct PyMPIMessageObject *__pyx_v_self) { PyObject *__pyx_v_rmsg = 0; MPI_Message __pyx_v_message; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; MPI_Message __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("irecv", 0); /* "mpi4py/MPI/Message.pyx":136 * def irecv(self): * """Nonblocking receive of matched message""" * cdef object rmsg = self.ob_buf # <<<<<<<<<<<<<< * cdef MPI_Message message = self.ob_mpi * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = __pyx_v_self->ob_buf; __Pyx_INCREF(__pyx_t_1); __pyx_v_rmsg = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Message.pyx":137 * """Nonblocking receive of matched message""" * cdef object rmsg = self.ob_buf * cdef MPI_Message message = self.ob_mpi # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_imrecv(rmsg, &message, &request.ob_mpi) */ __pyx_t_2 = __pyx_v_self->ob_mpi; __pyx_v_message = __pyx_t_2; /* "mpi4py/MPI/Message.pyx":138 * cdef object rmsg = self.ob_buf * cdef MPI_Message message = self.ob_mpi * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * request.ob_buf = PyMPI_imrecv(rmsg, &message, &request.ob_mpi) * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 138, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Message.pyx":139 * cdef MPI_Message message = self.ob_mpi * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_imrecv(rmsg, &message, &request.ob_mpi) # <<<<<<<<<<<<<< * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message * if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_imrecv(__pyx_v_rmsg, (&__pyx_v_message), (&__pyx_v_request->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Message.pyx":140 * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_imrecv(rmsg, &message, &request.ob_mpi) * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None * return request */ __pyx_t_4 = (__pyx_v_self != __pyx_v_6mpi4py_3MPI___MESSAGE_NO_PROC__); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { __pyx_v_self->ob_mpi = __pyx_v_message; } /* "mpi4py/MPI/Message.pyx":141 * request.ob_buf = PyMPI_imrecv(rmsg, &message, &request.ob_mpi) * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message * if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None # <<<<<<<<<<<<<< * return request * */ __pyx_t_5 = ((__pyx_v_self->ob_mpi == MPI_MESSAGE_NULL) != 0); if (__pyx_t_5) { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->ob_buf); __Pyx_DECREF(__pyx_v_self->ob_buf); __pyx_v_self->ob_buf = Py_None; } /* "mpi4py/MPI/Message.pyx":142 * if self is not __MESSAGE_NO_PROC__: self.ob_mpi = message * if self.ob_mpi == MPI_MESSAGE_NULL: self.ob_buf = None * return request # <<<<<<<<<<<<<< * * # Fortran Handle */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":134 * return rmsg * # * def irecv(self): # <<<<<<<<<<<<<< * """Nonblocking receive of matched message""" * cdef object rmsg = self.ob_buf */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Message.irecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rmsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":147 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_25py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_24py2f[] = "Message.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_25py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_24py2f(((struct PyMPIMessageObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_24py2f(struct PyMPIMessageObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Message.pyx":150 * """ * """ * return MPI_Message_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_Message_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":147 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Message.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Message.pyx":153 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_27f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_7Message_26f2py[] = "Message.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_7Message_27f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(26, 153, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(26, 153, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Message.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_7Message_26f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_7Message_26f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIMessageObject *__pyx_v_message = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; MPI_Fint __pyx_t_3; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Message.pyx":156 * """ * """ * cdef Message message = Message.__new__(Message) # <<<<<<<<<<<<<< * message.ob_mpi = MPI_Message_f2c(arg) * return message */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Message(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 156, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Message.pyx":157 * """ * cdef Message message = Message.__new__(Message) * message.ob_mpi = MPI_Message_f2c(arg) # <<<<<<<<<<<<<< * return message * */ __pyx_t_3 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_3 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(26, 157, __pyx_L1_error) __pyx_v_message->ob_mpi = MPI_Message_f2c(__pyx_t_3); /* "mpi4py/MPI/Message.pyx":158 * cdef Message message = Message.__new__(Message) * message.ob_mpi = MPI_Message_f2c(arg) * return message # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = ((PyObject *)__pyx_v_message); goto __pyx_L0; /* "mpi4py/MPI/Message.pyx":153 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Message.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":7 * """ * * def __cinit__(self, Info info=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_INFO_NULL * if info is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4Info_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4Info_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIInfoObject *__pyx_v_info = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIInfoObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(27, 7, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_info = ((struct PyMPIInfoObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(27, 7, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Info.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 1, "info", 0))) __PYX_ERR(27, 7, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info___cinit__(((struct PyMPIInfoObject *)__pyx_v_self), __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4Info___cinit__(struct PyMPIInfoObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Info __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Info.pyx":8 * * def __cinit__(self, Info info=None): * self.ob_mpi = MPI_INFO_NULL # <<<<<<<<<<<<<< * if info is None: return * self.ob_mpi = info.ob_mpi */ __pyx_v_self->ob_mpi = MPI_INFO_NULL; /* "mpi4py/MPI/Info.pyx":9 * def __cinit__(self, Info info=None): * self.ob_mpi = MPI_INFO_NULL * if info is None: return # <<<<<<<<<<<<<< * self.ob_mpi = info.ob_mpi * */ __pyx_t_1 = (((PyObject *)__pyx_v_info) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":10 * self.ob_mpi = MPI_INFO_NULL * if info is None: return * self.ob_mpi = info.ob_mpi # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __pyx_v_info->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Info.pyx":7 * """ * * def __cinit__(self, Info info=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_INFO_NULL * if info is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":12 * self.ob_mpi = info.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Info(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_4Info_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_4Info_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_4Info_2__dealloc__(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_4Info_2__dealloc__(struct PyMPIInfoObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/Info.pyx":13 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_Info(&self.ob_mpi) ) * */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":14 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Info(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_Info((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(27, 14, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":12 * self.ob_mpi = info.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Info(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.Info.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/Info.pyx":16 * CHKERR( del_Info(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Info): return NotImplemented * cdef Info s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_4__richcmp__(((struct PyMPIInfoObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_4__richcmp__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIInfoObject *__pyx_v_s = 0; struct PyMPIInfoObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Info.pyx":17 * * def __richcmp__(self, other, int op): * if not isinstance(other, Info): return NotImplemented # <<<<<<<<<<<<<< * cdef Info s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Info); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":18 * def __richcmp__(self, other, int op): * if not isinstance(other, Info): return NotImplemented * cdef Info s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIInfoObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIInfoObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":19 * if not isinstance(other, Info): return NotImplemented * cdef Info s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":20 * cdef Info s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":21 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":22 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":23 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(27, 23, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":16 * CHKERR( del_Info(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Info): return NotImplemented * cdef Info s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Info.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":25 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_INFO_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4Info_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4Info_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_6__bool__(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4Info_6__bool__(struct PyMPIInfoObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/Info.pyx":26 * * def __bool__(self): * return self.ob_mpi != MPI_INFO_NULL # <<<<<<<<<<<<<< * * @classmethod */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_INFO_NULL); goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":25 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_INFO_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":29 * * @classmethod * def Create(cls): # <<<<<<<<<<<<<< * """ * Create a new, empty info object */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_9Create(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_8Create[] = "Info.Create(type cls)\n\n Create a new, empty info object\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_9Create(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Create", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Create", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_8Create(((PyTypeObject*)__pyx_v_cls)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_8Create(CYTHON_UNUSED PyTypeObject *__pyx_v_cls) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create", 0); /* "mpi4py/MPI/Info.pyx":33 * Create a new, empty info object * """ * cdef Info info = Info.__new__(Info) # <<<<<<<<<<<<<< * CHKERR( MPI_Info_create(&info.ob_mpi) ) * return info */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Info(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 33, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_info = ((struct PyMPIInfoObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Info.pyx":34 * """ * cdef Info info = Info.__new__(Info) * CHKERR( MPI_Info_create(&info.ob_mpi) ) # <<<<<<<<<<<<<< * return info * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Info_create((&__pyx_v_info->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(27, 34, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":35 * cdef Info info = Info.__new__(Info) * CHKERR( MPI_Info_create(&info.ob_mpi) ) * return info # <<<<<<<<<<<<<< * * def Free(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_info)); __pyx_r = ((PyObject *)__pyx_v_info); goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":29 * * @classmethod * def Create(cls): # <<<<<<<<<<<<<< * """ * Create a new, empty info object */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Info.Create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":37 * return info * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a info object */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_11Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_10Free[] = "Info.Free(self)\n\n Free a info object\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_11Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Free", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Free", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_10Free(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_10Free(struct PyMPIInfoObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Free", 0); /* "mpi4py/MPI/Info.pyx":41 * Free a info object * """ * CHKERR( MPI_Info_free(&self.ob_mpi) ) # <<<<<<<<<<<<<< * if self is __INFO_ENV__: self.ob_mpi = MPI_INFO_ENV * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Info_free((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(27, 41, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":42 * """ * CHKERR( MPI_Info_free(&self.ob_mpi) ) * if self is __INFO_ENV__: self.ob_mpi = MPI_INFO_ENV # <<<<<<<<<<<<<< * * def Dup(self): */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___INFO_ENV__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_INFO_ENV; } /* "mpi4py/MPI/Info.pyx":37 * return info * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a info object */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Info.Free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":44 * if self is __INFO_ENV__: self.ob_mpi = MPI_INFO_ENV * * def Dup(self): # <<<<<<<<<<<<<< * """ * Duplicate an existing info object, creating a new object, with */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_13Dup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_12Dup[] = "Info.Dup(self)\n\n Duplicate an existing info object, creating a new object, with\n the same (key, value) pairs and the same ordering of keys\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_13Dup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Dup (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Dup", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Dup", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_12Dup(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_12Dup(struct PyMPIInfoObject *__pyx_v_self) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Dup", 0); /* "mpi4py/MPI/Info.pyx":49 * the same (key, value) pairs and the same ordering of keys * """ * cdef Info info = Info.__new__(Info) # <<<<<<<<<<<<<< * CHKERR( MPI_Info_dup(self.ob_mpi, &info.ob_mpi) ) * return info */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Info(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 49, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_info = ((struct PyMPIInfoObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Info.pyx":50 * """ * cdef Info info = Info.__new__(Info) * CHKERR( MPI_Info_dup(self.ob_mpi, &info.ob_mpi) ) # <<<<<<<<<<<<<< * return info * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Info_dup(__pyx_v_self->ob_mpi, (&__pyx_v_info->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(27, 50, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":51 * cdef Info info = Info.__new__(Info) * CHKERR( MPI_Info_dup(self.ob_mpi, &info.ob_mpi) ) * return info # <<<<<<<<<<<<<< * * def Get(self, object key, int maxlen=-1): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_info)); __pyx_r = ((PyObject *)__pyx_v_info); goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":44 * if self is __INFO_ENV__: self.ob_mpi = MPI_INFO_ENV * * def Dup(self): # <<<<<<<<<<<<<< * """ * Duplicate an existing info object, creating a new object, with */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Info.Dup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":53 * return info * * def Get(self, object key, int maxlen=-1): # <<<<<<<<<<<<<< * """ * Retrieve the value associated with a key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_15Get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_14Get[] = "Info.Get(self, key, int maxlen=-1)\n\n Retrieve the value associated with a key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_15Get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; int __pyx_v_maxlen; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_maxlen,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxlen); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get") < 0)) __PYX_ERR(27, 53, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_key = values[0]; if (values[1]) { __pyx_v_maxlen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_maxlen == (int)-1) && PyErr_Occurred())) __PYX_ERR(27, 53, __pyx_L3_error) } else { __pyx_v_maxlen = ((int)-1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(27, 53, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Info.Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_14Get(((struct PyMPIInfoObject *)__pyx_v_self), __pyx_v_key, __pyx_v_maxlen); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_14Get(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key, int __pyx_v_maxlen) { char *__pyx_v_ckey; char *__pyx_v_cvalue; int __pyx_v_flag; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get", 0); __Pyx_INCREF(__pyx_v_key); /* "mpi4py/MPI/Info.pyx":57 * Retrieve the value associated with a key * """ * if maxlen < 0: maxlen = MPI_MAX_INFO_VAL # <<<<<<<<<<<<<< * if maxlen > MPI_MAX_INFO_VAL: maxlen = MPI_MAX_INFO_VAL * cdef char *ckey = NULL */ __pyx_t_1 = ((__pyx_v_maxlen < 0) != 0); if (__pyx_t_1) { __pyx_v_maxlen = MPI_MAX_INFO_VAL; } /* "mpi4py/MPI/Info.pyx":58 * """ * if maxlen < 0: maxlen = MPI_MAX_INFO_VAL * if maxlen > MPI_MAX_INFO_VAL: maxlen = MPI_MAX_INFO_VAL # <<<<<<<<<<<<<< * cdef char *ckey = NULL * cdef char *cvalue = NULL */ __pyx_t_1 = ((__pyx_v_maxlen > MPI_MAX_INFO_VAL) != 0); if (__pyx_t_1) { __pyx_v_maxlen = MPI_MAX_INFO_VAL; } /* "mpi4py/MPI/Info.pyx":59 * if maxlen < 0: maxlen = MPI_MAX_INFO_VAL * if maxlen > MPI_MAX_INFO_VAL: maxlen = MPI_MAX_INFO_VAL * cdef char *ckey = NULL # <<<<<<<<<<<<<< * cdef char *cvalue = NULL * cdef int flag = 0 */ __pyx_v_ckey = NULL; /* "mpi4py/MPI/Info.pyx":60 * if maxlen > MPI_MAX_INFO_VAL: maxlen = MPI_MAX_INFO_VAL * cdef char *ckey = NULL * cdef char *cvalue = NULL # <<<<<<<<<<<<<< * cdef int flag = 0 * key = asmpistr(key, &ckey) */ __pyx_v_cvalue = NULL; /* "mpi4py/MPI/Info.pyx":61 * cdef char *ckey = NULL * cdef char *cvalue = NULL * cdef int flag = 0 # <<<<<<<<<<<<<< * key = asmpistr(key, &ckey) * cdef tmp = allocate((maxlen+1), sizeof(char), &cvalue) */ __pyx_v_flag = 0; /* "mpi4py/MPI/Info.pyx":62 * cdef char *cvalue = NULL * cdef int flag = 0 * key = asmpistr(key, &ckey) # <<<<<<<<<<<<<< * cdef tmp = allocate((maxlen+1), sizeof(char), &cvalue) * CHKERR( MPI_Info_get(self.ob_mpi, ckey, maxlen, cvalue, &flag) ) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_key, (&__pyx_v_ckey)); if (unlikely(!__pyx_t_2)) __PYX_ERR(27, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Info.pyx":63 * cdef int flag = 0 * key = asmpistr(key, &ckey) * cdef tmp = allocate((maxlen+1), sizeof(char), &cvalue) # <<<<<<<<<<<<<< * CHKERR( MPI_Info_get(self.ob_mpi, ckey, maxlen, cvalue, &flag) ) * cvalue[maxlen] = 0 # just in case */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate((__pyx_v_maxlen + 1), (sizeof(char)), (&__pyx_v_cvalue))); if (unlikely(!__pyx_t_2)) __PYX_ERR(27, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Info.pyx":64 * key = asmpistr(key, &ckey) * cdef tmp = allocate((maxlen+1), sizeof(char), &cvalue) * CHKERR( MPI_Info_get(self.ob_mpi, ckey, maxlen, cvalue, &flag) ) # <<<<<<<<<<<<<< * cvalue[maxlen] = 0 # just in case * if not flag: return None */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Info_get(__pyx_v_self->ob_mpi, __pyx_v_ckey, __pyx_v_maxlen, __pyx_v_cvalue, (&__pyx_v_flag))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(27, 64, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":65 * cdef tmp = allocate((maxlen+1), sizeof(char), &cvalue) * CHKERR( MPI_Info_get(self.ob_mpi, ckey, maxlen, cvalue, &flag) ) * cvalue[maxlen] = 0 # just in case # <<<<<<<<<<<<<< * if not flag: return None * return mpistr(cvalue) */ (__pyx_v_cvalue[__pyx_v_maxlen]) = 0; /* "mpi4py/MPI/Info.pyx":66 * CHKERR( MPI_Info_get(self.ob_mpi, ckey, maxlen, cvalue, &flag) ) * cvalue[maxlen] = 0 # just in case * if not flag: return None # <<<<<<<<<<<<<< * return mpistr(cvalue) * */ __pyx_t_1 = ((!(__pyx_v_flag != 0)) != 0); if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":67 * cvalue[maxlen] = 0 # just in case * if not flag: return None * return mpistr(cvalue) # <<<<<<<<<<<<<< * * def Set(self, object key, object value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_mpistr(__pyx_v_cvalue); if (unlikely(!__pyx_t_2)) __PYX_ERR(27, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":53 * return info * * def Get(self, object key, int maxlen=-1): # <<<<<<<<<<<<<< * """ * Retrieve the value associated with a key */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Info.Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":69 * return mpistr(cvalue) * * def Set(self, object key, object value): # <<<<<<<<<<<<<< * """ * Add the (key, value) pair to info, and overrides the value if */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_17Set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_16Set[] = "Info.Set(self, key, value)\n\n Add the (key, value) pair to info, and overrides the value if\n a value for the same key was previously set\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_17Set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_value,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Set", 1, 2, 2, 1); __PYX_ERR(27, 69, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set") < 0)) __PYX_ERR(27, 69, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_key = values[0]; __pyx_v_value = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(27, 69, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Info.Set", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_16Set(((struct PyMPIInfoObject *)__pyx_v_self), __pyx_v_key, __pyx_v_value); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_16Set(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { char *__pyx_v_ckey; char *__pyx_v_cvalue; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Set", 0); __Pyx_INCREF(__pyx_v_key); __Pyx_INCREF(__pyx_v_value); /* "mpi4py/MPI/Info.pyx":74 * a value for the same key was previously set * """ * cdef char *ckey = NULL # <<<<<<<<<<<<<< * cdef char *cvalue = NULL * key = asmpistr(key, &ckey) */ __pyx_v_ckey = NULL; /* "mpi4py/MPI/Info.pyx":75 * """ * cdef char *ckey = NULL * cdef char *cvalue = NULL # <<<<<<<<<<<<<< * key = asmpistr(key, &ckey) * value = asmpistr(value, &cvalue) */ __pyx_v_cvalue = NULL; /* "mpi4py/MPI/Info.pyx":76 * cdef char *ckey = NULL * cdef char *cvalue = NULL * key = asmpistr(key, &ckey) # <<<<<<<<<<<<<< * value = asmpistr(value, &cvalue) * CHKERR( MPI_Info_set(self.ob_mpi, ckey, cvalue) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_key, (&__pyx_v_ckey)); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Info.pyx":77 * cdef char *cvalue = NULL * key = asmpistr(key, &ckey) * value = asmpistr(value, &cvalue) # <<<<<<<<<<<<<< * CHKERR( MPI_Info_set(self.ob_mpi, ckey, cvalue) ) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_value, (&__pyx_v_cvalue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Info.pyx":78 * key = asmpistr(key, &ckey) * value = asmpistr(value, &cvalue) * CHKERR( MPI_Info_set(self.ob_mpi, ckey, cvalue) ) # <<<<<<<<<<<<<< * * def Delete(self, object key): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Info_set(__pyx_v_self->ob_mpi, __pyx_v_ckey, __pyx_v_cvalue)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(27, 78, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":69 * return mpistr(cvalue) * * def Set(self, object key, object value): # <<<<<<<<<<<<<< * """ * Add the (key, value) pair to info, and overrides the value if */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Info.Set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":80 * CHKERR( MPI_Info_set(self.ob_mpi, ckey, cvalue) ) * * def Delete(self, object key): # <<<<<<<<<<<<<< * """ * Remove a (key, value) pair from info */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_19Delete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_18Delete[] = "Info.Delete(self, key)\n\n Remove a (key, value) pair from info\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_19Delete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Delete (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Delete") < 0)) __PYX_ERR(27, 80, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_key = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Delete", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(27, 80, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Info.Delete", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_18Delete(((struct PyMPIInfoObject *)__pyx_v_self), __pyx_v_key); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_18Delete(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key) { char *__pyx_v_ckey; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Delete", 0); __Pyx_INCREF(__pyx_v_key); /* "mpi4py/MPI/Info.pyx":84 * Remove a (key, value) pair from info * """ * cdef char *ckey = NULL # <<<<<<<<<<<<<< * key = asmpistr(key, &ckey) * CHKERR( MPI_Info_delete(self.ob_mpi, ckey) ) */ __pyx_v_ckey = NULL; /* "mpi4py/MPI/Info.pyx":85 * """ * cdef char *ckey = NULL * key = asmpistr(key, &ckey) # <<<<<<<<<<<<<< * CHKERR( MPI_Info_delete(self.ob_mpi, ckey) ) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_key, (&__pyx_v_ckey)); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Info.pyx":86 * cdef char *ckey = NULL * key = asmpistr(key, &ckey) * CHKERR( MPI_Info_delete(self.ob_mpi, ckey) ) # <<<<<<<<<<<<<< * * def Get_nkeys(self): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Info_delete(__pyx_v_self->ob_mpi, __pyx_v_ckey)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(27, 86, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":80 * CHKERR( MPI_Info_set(self.ob_mpi, ckey, cvalue) ) * * def Delete(self, object key): # <<<<<<<<<<<<<< * """ * Remove a (key, value) pair from info */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Info.Delete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":88 * CHKERR( MPI_Info_delete(self.ob_mpi, ckey) ) * * def Get_nkeys(self): # <<<<<<<<<<<<<< * """ * Return the number of currently defined keys in info */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_21Get_nkeys(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_20Get_nkeys[] = "Info.Get_nkeys(self)\n\n Return the number of currently defined keys in info\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_21Get_nkeys(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_nkeys (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_nkeys", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_nkeys", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_20Get_nkeys(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_20Get_nkeys(struct PyMPIInfoObject *__pyx_v_self) { int __pyx_v_nkeys; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_nkeys", 0); /* "mpi4py/MPI/Info.pyx":92 * Return the number of currently defined keys in info * """ * cdef int nkeys = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Info_get_nkeys(self.ob_mpi, &nkeys) ) * return nkeys */ __pyx_v_nkeys = 0; /* "mpi4py/MPI/Info.pyx":93 * """ * cdef int nkeys = 0 * CHKERR( MPI_Info_get_nkeys(self.ob_mpi, &nkeys) ) # <<<<<<<<<<<<<< * return nkeys * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Info_get_nkeys(__pyx_v_self->ob_mpi, (&__pyx_v_nkeys))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(27, 93, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":94 * cdef int nkeys = 0 * CHKERR( MPI_Info_get_nkeys(self.ob_mpi, &nkeys) ) * return nkeys # <<<<<<<<<<<<<< * * def Get_nthkey(self, int n): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nkeys); if (unlikely(!__pyx_t_2)) __PYX_ERR(27, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":88 * CHKERR( MPI_Info_delete(self.ob_mpi, ckey) ) * * def Get_nkeys(self): # <<<<<<<<<<<<<< * """ * Return the number of currently defined keys in info */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Info.Get_nkeys", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":96 * return nkeys * * def Get_nthkey(self, int n): # <<<<<<<<<<<<<< * """ * Return the nth defined key in info. Keys are numbered in the */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_23Get_nthkey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_22Get_nthkey[] = "Info.Get_nthkey(self, int n)\n\n Return the nth defined key in info. Keys are numbered in the\n range [0, N) where N is the value returned by\n `Info.Get_nkeys()`\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_23Get_nthkey(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_n; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_nthkey (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_nthkey") < 0)) __PYX_ERR(27, 96, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_n = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(27, 96, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_nthkey", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(27, 96, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Info.Get_nthkey", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_22Get_nthkey(((struct PyMPIInfoObject *)__pyx_v_self), __pyx_v_n); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_22Get_nthkey(struct PyMPIInfoObject *__pyx_v_self, int __pyx_v_n) { char __pyx_v_ckey[(MPI_MAX_INFO_KEY + 1)]; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_nthkey", 0); /* "mpi4py/MPI/Info.pyx":103 * """ * cdef char ckey[MPI_MAX_INFO_KEY+1] * CHKERR( MPI_Info_get_nthkey(self.ob_mpi, n, ckey) ) # <<<<<<<<<<<<<< * ckey[MPI_MAX_INFO_KEY] = 0 # just in case * return mpistr(ckey) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Info_get_nthkey(__pyx_v_self->ob_mpi, __pyx_v_n, __pyx_v_ckey)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(27, 103, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":104 * cdef char ckey[MPI_MAX_INFO_KEY+1] * CHKERR( MPI_Info_get_nthkey(self.ob_mpi, n, ckey) ) * ckey[MPI_MAX_INFO_KEY] = 0 # just in case # <<<<<<<<<<<<<< * return mpistr(ckey) * */ (__pyx_v_ckey[MPI_MAX_INFO_KEY]) = 0; /* "mpi4py/MPI/Info.pyx":105 * CHKERR( MPI_Info_get_nthkey(self.ob_mpi, n, ckey) ) * ckey[MPI_MAX_INFO_KEY] = 0 # just in case * return mpistr(ckey) # <<<<<<<<<<<<<< * * # Fortran Handle */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_mpistr(__pyx_v_ckey); if (unlikely(!__pyx_t_2)) __PYX_ERR(27, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":96 * return nkeys * * def Get_nthkey(self, int n): # <<<<<<<<<<<<<< * """ * Return the nth defined key in info. Keys are numbered in the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Info.Get_nthkey", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":110 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_25py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_24py2f[] = "Info.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_25py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_24py2f(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_24py2f(struct PyMPIInfoObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Info.pyx":113 * """ * """ * return MPI_Info_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_Info_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":110 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Info.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":116 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_27f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_26f2py[] = "Info.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_27f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(27, 116, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(27, 116, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Info.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_26f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_26f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; MPI_Fint __pyx_t_3; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Info.pyx":119 * """ * """ * cdef Info info = Info.__new__(Info) # <<<<<<<<<<<<<< * info.ob_mpi = MPI_Info_f2c(arg) * return info */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Info(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 119, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_info = ((struct PyMPIInfoObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Info.pyx":120 * """ * cdef Info info = Info.__new__(Info) * info.ob_mpi = MPI_Info_f2c(arg) # <<<<<<<<<<<<<< * return info * */ __pyx_t_3 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_3 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(27, 120, __pyx_L1_error) __pyx_v_info->ob_mpi = MPI_Info_f2c(__pyx_t_3); /* "mpi4py/MPI/Info.pyx":121 * cdef Info info = Info.__new__(Info) * info.ob_mpi = MPI_Info_f2c(arg) * return info # <<<<<<<<<<<<<< * * # Python mapping emulation */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_info)); __pyx_r = ((PyObject *)__pyx_v_info); goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":116 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Info.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":126 * # ------------------------ * * def __len__(self): # <<<<<<<<<<<<<< * if not self: return 0 * return self.Get_nkeys() */ /* Python wrapper */ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_4Info_29__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_4Info_29__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_28__len__(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_6mpi4py_3MPI_4Info_28__len__(struct PyMPIInfoObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; __Pyx_RefNannySetupContext("__len__", 0); /* "mpi4py/MPI/Info.pyx":127 * * def __len__(self): * if not self: return 0 # <<<<<<<<<<<<<< * return self.Get_nkeys() * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 127, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":128 * def __len__(self): * if not self: return 0 * return self.Get_nkeys() # <<<<<<<<<<<<<< * * def __contains__(self, object key): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_nkeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(27, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_6; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":126 * # ------------------------ * * def __len__(self): # <<<<<<<<<<<<<< * if not self: return 0 * return self.Get_nkeys() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Info.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":130 * return self.Get_nkeys() * * def __contains__(self, object key): # <<<<<<<<<<<<<< * if not self: return False * cdef char *ckey = NULL */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4Info_31__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4Info_31__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_30__contains__(((struct PyMPIInfoObject *)__pyx_v_self), ((PyObject *)__pyx_v_key)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4Info_30__contains__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key) { char *__pyx_v_ckey; int __pyx_v_dummy; int __pyx_v_haskey; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("__contains__", 0); __Pyx_INCREF(__pyx_v_key); /* "mpi4py/MPI/Info.pyx":131 * * def __contains__(self, object key): * if not self: return False # <<<<<<<<<<<<<< * cdef char *ckey = NULL * cdef int dummy = 0 */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 131, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":132 * def __contains__(self, object key): * if not self: return False * cdef char *ckey = NULL # <<<<<<<<<<<<<< * cdef int dummy = 0 * cdef int haskey = 0 */ __pyx_v_ckey = NULL; /* "mpi4py/MPI/Info.pyx":133 * if not self: return False * cdef char *ckey = NULL * cdef int dummy = 0 # <<<<<<<<<<<<<< * cdef int haskey = 0 * key = asmpistr(key, &ckey) */ __pyx_v_dummy = 0; /* "mpi4py/MPI/Info.pyx":134 * cdef char *ckey = NULL * cdef int dummy = 0 * cdef int haskey = 0 # <<<<<<<<<<<<<< * key = asmpistr(key, &ckey) * CHKERR( MPI_Info_get_valuelen(self.ob_mpi, ckey, &dummy, &haskey) ) */ __pyx_v_haskey = 0; /* "mpi4py/MPI/Info.pyx":135 * cdef int dummy = 0 * cdef int haskey = 0 * key = asmpistr(key, &ckey) # <<<<<<<<<<<<<< * CHKERR( MPI_Info_get_valuelen(self.ob_mpi, ckey, &dummy, &haskey) ) * return haskey */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_key, (&__pyx_v_ckey)); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_key, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":136 * cdef int haskey = 0 * key = asmpistr(key, &ckey) * CHKERR( MPI_Info_get_valuelen(self.ob_mpi, ckey, &dummy, &haskey) ) # <<<<<<<<<<<<<< * return haskey * */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Info_get_valuelen(__pyx_v_self->ob_mpi, __pyx_v_ckey, (&__pyx_v_dummy), (&__pyx_v_haskey))); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(27, 136, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":137 * key = asmpistr(key, &ckey) * CHKERR( MPI_Info_get_valuelen(self.ob_mpi, ckey, &dummy, &haskey) ) * return haskey # <<<<<<<<<<<<<< * * def __iter__(self): */ __pyx_r = (__pyx_v_haskey != 0); goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":130 * return self.Get_nkeys() * * def __contains__(self, object key): # <<<<<<<<<<<<<< * if not self: return False * cdef char *ckey = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Info.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":139 * return haskey * * def __iter__(self): # <<<<<<<<<<<<<< * return iter(self.keys()) * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_33__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_33__iter__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_32__iter__(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_32__iter__(struct PyMPIInfoObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); /* "mpi4py/MPI/Info.pyx":140 * * def __iter__(self): * return iter(self.keys()) # <<<<<<<<<<<<<< * * def __getitem__(self, object key): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(27, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(27, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":139 * return haskey * * def __iter__(self): # <<<<<<<<<<<<<< * return iter(self.keys()) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Info.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":142 * return iter(self.keys()) * * def __getitem__(self, object key): # <<<<<<<<<<<<<< * if not self: raise KeyError(key) * cdef object value = self.Get(key) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_35__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_35__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_34__getitem__(((struct PyMPIInfoObject *)__pyx_v_self), ((PyObject *)__pyx_v_key)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_34__getitem__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_v_value = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); /* "mpi4py/MPI/Info.pyx":143 * * def __getitem__(self, object key): * if not self: raise KeyError(key) # <<<<<<<<<<<<<< * cdef object value = self.Get(key) * if value is None: raise KeyError(key) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 143, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(27, 143, __pyx_L1_error) } /* "mpi4py/MPI/Info.pyx":144 * def __getitem__(self, object key): * if not self: raise KeyError(key) * cdef object value = self.Get(key) # <<<<<<<<<<<<<< * if value is None: raise KeyError(key) * return value */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_value = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":145 * if not self: raise KeyError(key) * cdef object value = self.Get(key) * if value is None: raise KeyError(key) # <<<<<<<<<<<<<< * return value * */ __pyx_t_2 = (__pyx_v_value == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_1)) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(27, 145, __pyx_L1_error) } /* "mpi4py/MPI/Info.pyx":146 * cdef object value = self.Get(key) * if value is None: raise KeyError(key) * return value # <<<<<<<<<<<<<< * * def __setitem__(self, object key, object value): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_value); __pyx_r = __pyx_v_value; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":142 * return iter(self.keys()) * * def __getitem__(self, object key): # <<<<<<<<<<<<<< * if not self: raise KeyError(key) * cdef object value = self.Get(key) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Info.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":148 * return value * * def __setitem__(self, object key, object value): # <<<<<<<<<<<<<< * if not self: raise KeyError(key) * self.Set(key, value) */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4Info_37__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4Info_37__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_36__setitem__(((struct PyMPIInfoObject *)__pyx_v_self), ((PyObject *)__pyx_v_key), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4Info_36__setitem__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__setitem__", 0); /* "mpi4py/MPI/Info.pyx":149 * * def __setitem__(self, object key, object value): * if not self: raise KeyError(key) # <<<<<<<<<<<<<< * self.Set(key, value) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 149, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(27, 149, __pyx_L1_error) } /* "mpi4py/MPI/Info.pyx":150 * def __setitem__(self, object key, object value): * if not self: raise KeyError(key) * self.Set(key, value) # <<<<<<<<<<<<<< * * def __delitem__(self, object key): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_key, __pyx_v_value}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 150, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_key, __pyx_v_value}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 150, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(27, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_key); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_value); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":148 * return value * * def __setitem__(self, object key, object value): # <<<<<<<<<<<<<< * if not self: raise KeyError(key) * self.Set(key, value) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.Info.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":152 * self.Set(key, value) * * def __delitem__(self, object key): # <<<<<<<<<<<<<< * if not self: raise KeyError(key) * if key not in self: raise KeyError(key) */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4Info_39__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4Info_39__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_38__delitem__(((struct PyMPIInfoObject *)__pyx_v_self), ((PyObject *)__pyx_v_key)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4Info_38__delitem__(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__delitem__", 0); /* "mpi4py/MPI/Info.pyx":153 * * def __delitem__(self, object key): * if not self: raise KeyError(key) # <<<<<<<<<<<<<< * if key not in self: raise KeyError(key) * self.Delete(key) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 153, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (unlikely(__pyx_t_2)) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(27, 153, __pyx_L1_error) } /* "mpi4py/MPI/Info.pyx":154 * def __delitem__(self, object key): * if not self: raise KeyError(key) * if key not in self: raise KeyError(key) # <<<<<<<<<<<<<< * self.Delete(key) * */ __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, ((PyObject *)__pyx_v_self), Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(27, 154, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_1)) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(27, 154, __pyx_L1_error) } /* "mpi4py/MPI/Info.pyx":155 * if not self: raise KeyError(key) * if key not in self: raise KeyError(key) * self.Delete(key) # <<<<<<<<<<<<<< * * def get(self, object key, object default=None): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Delete); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":152 * self.Set(key, value) * * def __delitem__(self, object key): # <<<<<<<<<<<<<< * if not self: raise KeyError(key) * if key not in self: raise KeyError(key) */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Info.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":157 * self.Delete(key) * * def get(self, object key, object default=None): # <<<<<<<<<<<<<< * """info get""" * if not self: return default */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_41get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_40get[] = "Info.get(self, key, default=None)\ninfo get"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_41get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_default = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_key,&__pyx_n_s_default,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_default); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(27, 157, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_key = values[0]; __pyx_v_default = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(27, 157, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Info.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_40get(((struct PyMPIInfoObject *)__pyx_v_self), __pyx_v_key, __pyx_v_default); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_40get(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_default) { PyObject *__pyx_v_value = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("get", 0); /* "mpi4py/MPI/Info.pyx":159 * def get(self, object key, object default=None): * """info get""" * if not self: return default # <<<<<<<<<<<<<< * cdef object value = self.Get(key) * if value is None: return default */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 159, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_default); __pyx_r = __pyx_v_default; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":160 * """info get""" * if not self: return default * cdef object value = self.Get(key) # <<<<<<<<<<<<<< * if value is None: return default * return value */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_value = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":161 * if not self: return default * cdef object value = self.Get(key) * if value is None: return default # <<<<<<<<<<<<<< * return value * */ __pyx_t_2 = (__pyx_v_value == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_default); __pyx_r = __pyx_v_default; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":162 * cdef object value = self.Get(key) * if value is None: return default * return value # <<<<<<<<<<<<<< * * def keys(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_value); __pyx_r = __pyx_v_value; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":157 * self.Delete(key) * * def get(self, object key, object default=None): # <<<<<<<<<<<<<< * """info get""" * if not self: return default */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Info.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":164 * return value * * def keys(self): # <<<<<<<<<<<<<< * """info keys""" * if not self: return [] */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_43keys(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_42keys[] = "Info.keys(self)\ninfo keys"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_43keys(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("keys (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("keys", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "keys", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_42keys(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_42keys(struct PyMPIInfoObject *__pyx_v_self) { PyObject *__pyx_v_keys = 0; int __pyx_v_k; int __pyx_v_nkeys; PyObject *__pyx_v_key = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("keys", 0); /* "mpi4py/MPI/Info.pyx":166 * def keys(self): * """info keys""" * if not self: return [] # <<<<<<<<<<<<<< * cdef list keys = [] * cdef int k = 0, nkeys = self.Get_nkeys() */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 166, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":167 * """info keys""" * if not self: return [] * cdef list keys = [] # <<<<<<<<<<<<<< * cdef int k = 0, nkeys = self.Get_nkeys() * cdef object key */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_keys = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":168 * if not self: return [] * cdef list keys = [] * cdef int k = 0, nkeys = self.Get_nkeys() # <<<<<<<<<<<<<< * cdef object key * for k from 0 <= k < nkeys: */ __pyx_v_k = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_nkeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(27, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_nkeys = __pyx_t_6; /* "mpi4py/MPI/Info.pyx":170 * cdef int k = 0, nkeys = self.Get_nkeys() * cdef object key * for k from 0 <= k < nkeys: # <<<<<<<<<<<<<< * key = self.Get_nthkey(k) * keys.append(key) */ __pyx_t_6 = __pyx_v_nkeys; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_6; __pyx_v_k++) { /* "mpi4py/MPI/Info.pyx":171 * cdef object key * for k from 0 <= k < nkeys: * key = self.Get_nthkey(k) # <<<<<<<<<<<<<< * keys.append(key) * return keys */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_nthkey); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_5)) __PYX_ERR(27, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":172 * for k from 0 <= k < nkeys: * key = self.Get_nthkey(k) * keys.append(key) # <<<<<<<<<<<<<< * return keys * */ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_keys, __pyx_v_key); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(27, 172, __pyx_L1_error) } /* "mpi4py/MPI/Info.pyx":173 * key = self.Get_nthkey(k) * keys.append(key) * return keys # <<<<<<<<<<<<<< * * def values(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_keys); __pyx_r = __pyx_v_keys; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":164 * return value * * def keys(self): # <<<<<<<<<<<<<< * """info keys""" * if not self: return [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.Info.keys", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_keys); __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":175 * return keys * * def values(self): # <<<<<<<<<<<<<< * """info values""" * if not self: return [] */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_45values(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_44values[] = "Info.values(self)\ninfo values"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_45values(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("values (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("values", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "values", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_44values(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_44values(struct PyMPIInfoObject *__pyx_v_self) { PyObject *__pyx_v_values = 0; int __pyx_v_k; int __pyx_v_nkeys; PyObject *__pyx_v_key = 0; PyObject *__pyx_v_val = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("values", 0); /* "mpi4py/MPI/Info.pyx":177 * def values(self): * """info values""" * if not self: return [] # <<<<<<<<<<<<<< * cdef list values = [] * cdef int k = 0, nkeys = self.Get_nkeys() */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 177, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":178 * """info values""" * if not self: return [] * cdef list values = [] # <<<<<<<<<<<<<< * cdef int k = 0, nkeys = self.Get_nkeys() * cdef object key, val */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_values = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":179 * if not self: return [] * cdef list values = [] * cdef int k = 0, nkeys = self.Get_nkeys() # <<<<<<<<<<<<<< * cdef object key, val * for k from 0 <= k < nkeys: */ __pyx_v_k = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_nkeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(27, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_nkeys = __pyx_t_6; /* "mpi4py/MPI/Info.pyx":181 * cdef int k = 0, nkeys = self.Get_nkeys() * cdef object key, val * for k from 0 <= k < nkeys: # <<<<<<<<<<<<<< * key = self.Get_nthkey(k) * val = self.Get(key) */ __pyx_t_6 = __pyx_v_nkeys; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_6; __pyx_v_k++) { /* "mpi4py/MPI/Info.pyx":182 * cdef object key, val * for k from 0 <= k < nkeys: * key = self.Get_nthkey(k) # <<<<<<<<<<<<<< * val = self.Get(key) * values.append(val) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_nthkey); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_5)) __PYX_ERR(27, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":183 * for k from 0 <= k < nkeys: * key = self.Get_nthkey(k) * val = self.Get(key) # <<<<<<<<<<<<<< * values.append(val) * return values */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":184 * key = self.Get_nthkey(k) * val = self.Get(key) * values.append(val) # <<<<<<<<<<<<<< * return values * */ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_v_val); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(27, 184, __pyx_L1_error) } /* "mpi4py/MPI/Info.pyx":185 * val = self.Get(key) * values.append(val) * return values # <<<<<<<<<<<<<< * * def items(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_values); __pyx_r = __pyx_v_values; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":175 * return keys * * def values(self): # <<<<<<<<<<<<<< * """info values""" * if not self: return [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.Info.values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_values); __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":187 * return values * * def items(self): # <<<<<<<<<<<<<< * """info items""" * if not self: return [] */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_47items(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_46items[] = "Info.items(self)\ninfo items"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_47items(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("items (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("items", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "items", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_46items(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_46items(struct PyMPIInfoObject *__pyx_v_self) { PyObject *__pyx_v_items = 0; int __pyx_v_k; int __pyx_v_nkeys; PyObject *__pyx_v_key = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("items", 0); /* "mpi4py/MPI/Info.pyx":189 * def items(self): * """info items""" * if not self: return [] # <<<<<<<<<<<<<< * cdef list items = [] * cdef int k = 0, nkeys = self.Get_nkeys() */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 189, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":190 * """info items""" * if not self: return [] * cdef list items = [] # <<<<<<<<<<<<<< * cdef int k = 0, nkeys = self.Get_nkeys() * cdef object key, value */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_items = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":191 * if not self: return [] * cdef list items = [] * cdef int k = 0, nkeys = self.Get_nkeys() # <<<<<<<<<<<<<< * cdef object key, value * for k from 0 <= k < nkeys: */ __pyx_v_k = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_nkeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(27, 191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_nkeys = __pyx_t_6; /* "mpi4py/MPI/Info.pyx":193 * cdef int k = 0, nkeys = self.Get_nkeys() * cdef object key, value * for k from 0 <= k < nkeys: # <<<<<<<<<<<<<< * key = self.Get_nthkey(k) * value = self.Get(key) */ __pyx_t_6 = __pyx_v_nkeys; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_6; __pyx_v_k++) { /* "mpi4py/MPI/Info.pyx":194 * cdef object key, value * for k from 0 <= k < nkeys: * key = self.Get_nthkey(k) # <<<<<<<<<<<<<< * value = self.Get(key) * items.append((key, value)) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_nthkey); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_5)) __PYX_ERR(27, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":195 * for k from 0 <= k < nkeys: * key = self.Get_nthkey(k) * value = self.Get(key) # <<<<<<<<<<<<<< * items.append((key, value)) * return items */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":196 * key = self.Get_nthkey(k) * value = self.Get(key) * items.append((key, value)) # <<<<<<<<<<<<<< * return items * */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_value); __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_items, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(27, 196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/Info.pyx":197 * value = self.Get(key) * items.append((key, value)) * return items # <<<<<<<<<<<<<< * * def update(self, other=(), **kwds): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_items); __pyx_r = __pyx_v_items; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":187 * return values * * def items(self): # <<<<<<<<<<<<<< * """info items""" * if not self: return [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.Info.items", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_items); __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":199 * return items * * def update(self, other=(), **kwds): # <<<<<<<<<<<<<< * """info update""" * if not self: raise KeyError */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_49update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_48update[] = "Info.update(self, other=(), **kwds)\ninfo update"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_49update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_other = 0; PyObject *__pyx_v_kwds = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update (wrapper)", 0); __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL; __Pyx_GOTREF(__pyx_v_kwds); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_other,0}; PyObject* values[1] = {0}; values[0] = ((PyObject *)__pyx_empty_tuple); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_other); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, pos_args, "update") < 0)) __PYX_ERR(27, 199, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_other = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("update", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(27, 199, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0; __Pyx_AddTraceback("mpi4py.MPI.Info.update", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_48update(((struct PyMPIInfoObject *)__pyx_v_self), __pyx_v_other, __pyx_v_kwds); /* function exit code */ __Pyx_XDECREF(__pyx_v_kwds); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_48update(struct PyMPIInfoObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_kwds) { PyObject *__pyx_v_key = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); __Pyx_RefNannySetupContext("update", 0); /* "mpi4py/MPI/Info.pyx":201 * def update(self, other=(), **kwds): * """info update""" * if not self: raise KeyError # <<<<<<<<<<<<<< * cdef object key, value * if hasattr(other, 'keys'): */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 201, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (unlikely(__pyx_t_2)) { __Pyx_Raise(__pyx_builtin_KeyError, 0, 0, 0); __PYX_ERR(27, 201, __pyx_L1_error) } /* "mpi4py/MPI/Info.pyx":203 * if not self: raise KeyError * cdef object key, value * if hasattr(other, 'keys'): # <<<<<<<<<<<<<< * for key in other.keys(): * self.Set(key, other[key]) */ __pyx_t_2 = __Pyx_HasAttr(__pyx_v_other, __pyx_n_s_keys); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(27, 203, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/Info.pyx":204 * cdef object key, value * if hasattr(other, 'keys'): * for key in other.keys(): # <<<<<<<<<<<<<< * self.Set(key, other[key]) * else: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(27, 204, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(27, 204, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(27, 204, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(27, 204, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":205 * if hasattr(other, 'keys'): * for key in other.keys(): * self.Set(key, other[key]) # <<<<<<<<<<<<<< * else: * for key, value in other: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set); if (unlikely(!__pyx_t_5)) __PYX_ERR(27, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_other, __pyx_v_key); if (unlikely(!__pyx_t_8)) __PYX_ERR(27, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_key, __pyx_t_8}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 205, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_key, __pyx_t_8}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 205, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(27, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_key); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":204 * cdef object key, value * if hasattr(other, 'keys'): * for key in other.keys(): # <<<<<<<<<<<<<< * self.Set(key, other[key]) * else: */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Info.pyx":203 * if not self: raise KeyError * cdef object key, value * if hasattr(other, 'keys'): # <<<<<<<<<<<<<< * for key in other.keys(): * self.Set(key, other[key]) */ goto __pyx_L4; } /* "mpi4py/MPI/Info.pyx":207 * self.Set(key, other[key]) * else: * for key, value in other: # <<<<<<<<<<<<<< * self.Set(key, value) * for key, value in kwds.items(): */ /*else*/ { if (likely(PyList_CheckExact(__pyx_v_other)) || PyTuple_CheckExact(__pyx_v_other)) { __pyx_t_4 = __pyx_v_other; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_other); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(27, 207, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(27, 207, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(27, 207, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(27, 207, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(27, 207, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_11 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_11); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(27, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(27, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(27, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_11 = __pyx_t_12(__pyx_t_8); if (unlikely(!__pyx_t_11)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_8), 2) < 0) __PYX_ERR(27, 207, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L10_unpacking_done; __pyx_L9_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(27, 207, __pyx_L1_error) __pyx_L10_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11); __pyx_t_11 = 0; /* "mpi4py/MPI/Info.pyx":208 * else: * for key, value in other: * self.Set(key, value) # <<<<<<<<<<<<<< * for key, value in kwds.items(): * self.Set(key, value) */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set); if (unlikely(!__pyx_t_11)) __PYX_ERR(27, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_key, __pyx_v_value}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 208, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_key, __pyx_v_value}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 208, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(27, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; } __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_v_key); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_value); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":207 * self.Set(key, other[key]) * else: * for key, value in other: # <<<<<<<<<<<<<< * self.Set(key, value) * for key, value in kwds.items(): */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L4:; /* "mpi4py/MPI/Info.pyx":209 * for key, value in other: * self.Set(key, value) * for key, value in kwds.items(): # <<<<<<<<<<<<<< * self.Set(key, value) * */ __pyx_t_4 = __Pyx_PyDict_Items(__pyx_v_kwds); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(27, 209, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(27, 209, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(27, 209, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(27, 209, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(27, 209, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_11 = PyList_GET_ITEM(sequence, 0); __pyx_t_8 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_8); #else __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(27, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(27, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(27, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; index = 0; __pyx_t_11 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_11)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); index = 1; __pyx_t_8 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_5), 2) < 0) __PYX_ERR(27, 209, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L14_unpacking_done; __pyx_L13_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(27, 209, __pyx_L1_error) __pyx_L14_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8); __pyx_t_8 = 0; /* "mpi4py/MPI/Info.pyx":210 * self.Set(key, value) * for key, value in kwds.items(): * self.Set(key, value) # <<<<<<<<<<<<<< * * def copy(self): */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set); if (unlikely(!__pyx_t_8)) __PYX_ERR(27, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_key, __pyx_v_value}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 210, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_key, __pyx_v_value}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 210, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_5 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(27, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_v_key); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_v_value); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Info.pyx":209 * for key, value in other: * self.Set(key, value) * for key, value in kwds.items(): # <<<<<<<<<<<<<< * self.Set(key, value) * */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":199 * return items * * def update(self, other=(), **kwds): # <<<<<<<<<<<<<< * """info update""" * if not self: raise KeyError */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("mpi4py.MPI.Info.update", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":212 * self.Set(key, value) * * def copy(self): # <<<<<<<<<<<<<< * """info copy""" * if not self: return Info() */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_51copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_50copy[] = "Info.copy(self)\ninfo copy"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_51copy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_50copy(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_50copy(struct PyMPIInfoObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("copy", 0); /* "mpi4py/MPI/Info.pyx":214 * def copy(self): * """info copy""" * if not self: return Info() # <<<<<<<<<<<<<< * return self.Dup() * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 214, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Info)); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":215 * """info copy""" * if not self: return Info() * return self.Dup() # <<<<<<<<<<<<<< * * def clear(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Dup); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Info.pyx":212 * self.Set(key, value) * * def copy(self): # <<<<<<<<<<<<<< * """info copy""" * if not self: return Info() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Info.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Info.pyx":217 * return self.Dup() * * def clear(self): # <<<<<<<<<<<<<< * """info clear""" * if not self: return None */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_53clear(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Info_52clear[] = "Info.clear(self)\ninfo clear"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Info_53clear(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("clear", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "clear", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Info_52clear(((struct PyMPIInfoObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Info_52clear(struct PyMPIInfoObject *__pyx_v_self) { PyObject *__pyx_v_key = 0; int __pyx_v_k; int __pyx_v_nkeys; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("clear", 0); /* "mpi4py/MPI/Info.pyx":219 * def clear(self): * """info clear""" * if not self: return None # <<<<<<<<<<<<<< * cdef object key * cdef int k = 0, nkeys = self.Get_nkeys() */ __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(27, 219, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Info.pyx":221 * if not self: return None * cdef object key * cdef int k = 0, nkeys = self.Get_nkeys() # <<<<<<<<<<<<<< * while k < nkeys: * key = self.Get_nthkey(0) */ __pyx_v_k = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_nkeys); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(27, 221, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_nkeys = __pyx_t_6; /* "mpi4py/MPI/Info.pyx":222 * cdef object key * cdef int k = 0, nkeys = self.Get_nkeys() * while k < nkeys: # <<<<<<<<<<<<<< * key = self.Get_nthkey(0) * self.Delete(key) */ while (1) { __pyx_t_2 = ((__pyx_v_k < __pyx_v_nkeys) != 0); if (!__pyx_t_2) break; /* "mpi4py/MPI/Info.pyx":223 * cdef int k = 0, nkeys = self.Get_nkeys() * while k < nkeys: * key = self.Get_nthkey(0) # <<<<<<<<<<<<<< * self.Delete(key) * k += 1 */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_nthkey); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_0); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":224 * while k < nkeys: * key = self.Get_nthkey(0) * self.Delete(key) # <<<<<<<<<<<<<< * k += 1 * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Delete); if (unlikely(!__pyx_t_4)) __PYX_ERR(27, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_key) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_key); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Info.pyx":225 * key = self.Get_nthkey(0) * self.Delete(key) * k += 1 # <<<<<<<<<<<<<< * * */ __pyx_v_k = (__pyx_v_k + 1); } /* "mpi4py/MPI/Info.pyx":217 * return self.Dup() * * def clear(self): # <<<<<<<<<<<<<< * """info clear""" * if not self: return None */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Info.clear", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":7 * """ * * def __cinit__(self, Op op=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_OP_NULL * if op is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_2Op_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_2Op_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIOpObject *__pyx_v_op = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_op,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIOpObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(28, 7, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_op = ((struct PyMPIOpObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(28, 7, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Op.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 1, "op", 0))) __PYX_ERR(28, 7, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op___cinit__(((struct PyMPIOpObject *)__pyx_v_self), __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_2Op___cinit__(struct PyMPIOpObject *__pyx_v_self, struct PyMPIOpObject *__pyx_v_op) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Op __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *, PyObject *); int __pyx_t_5; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Op.pyx":8 * * def __cinit__(self, Op op=None): * self.ob_mpi = MPI_OP_NULL # <<<<<<<<<<<<<< * if op is None: return * self.ob_mpi = op.ob_mpi */ __pyx_v_self->ob_mpi = MPI_OP_NULL; /* "mpi4py/MPI/Op.pyx":9 * def __cinit__(self, Op op=None): * self.ob_mpi = MPI_OP_NULL * if op is None: return # <<<<<<<<<<<<<< * self.ob_mpi = op.ob_mpi * self.ob_func = op.ob_func */ __pyx_t_1 = (((PyObject *)__pyx_v_op) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Op.pyx":10 * self.ob_mpi = MPI_OP_NULL * if op is None: return * self.ob_mpi = op.ob_mpi # <<<<<<<<<<<<<< * self.ob_func = op.ob_func * self.ob_usrid = op.ob_usrid */ __pyx_t_3 = __pyx_v_op->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Op.pyx":11 * if op is None: return * self.ob_mpi = op.ob_mpi * self.ob_func = op.ob_func # <<<<<<<<<<<<<< * self.ob_usrid = op.ob_usrid * */ __pyx_t_4 = __pyx_v_op->ob_func; __pyx_v_self->ob_func = __pyx_t_4; /* "mpi4py/MPI/Op.pyx":12 * self.ob_mpi = op.ob_mpi * self.ob_func = op.ob_func * self.ob_usrid = op.ob_usrid # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_5 = __pyx_v_op->ob_usrid; __pyx_v_self->ob_usrid = __pyx_t_5; /* "mpi4py/MPI/Op.pyx":7 * """ * * def __cinit__(self, Op op=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_OP_NULL * if op is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":14 * self.ob_usrid = op.ob_usrid * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Op(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_2Op_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_2Op_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_2Op_2__dealloc__(((struct PyMPIOpObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_2Op_2__dealloc__(struct PyMPIOpObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/Op.pyx":15 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_Op(&self.ob_mpi) ) * op_user_del(&self.ob_usrid) */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/Op.pyx":16 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Op(&self.ob_mpi) ) # <<<<<<<<<<<<<< * op_user_del(&self.ob_usrid) * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_Op((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(28, 16, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":17 * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Op(&self.ob_mpi) ) * op_user_del(&self.ob_usrid) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_op_user_del((&__pyx_v_self->ob_usrid)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(28, 17, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":14 * self.ob_usrid = op.ob_usrid * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Op(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.Op.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/Op.pyx":19 * op_user_del(&self.ob_usrid) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Op): return NotImplemented * cdef Op s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_4__richcmp__(((struct PyMPIOpObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_4__richcmp__(struct PyMPIOpObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIOpObject *__pyx_v_s = 0; struct PyMPIOpObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Op.pyx":20 * * def __richcmp__(self, other, int op): * if not isinstance(other, Op): return NotImplemented # <<<<<<<<<<<<<< * cdef Op s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Op); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Op.pyx":21 * def __richcmp__(self, other, int op): * if not isinstance(other, Op): return NotImplemented * cdef Op s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIOpObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIOpObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Op.pyx":22 * if not isinstance(other, Op): return NotImplemented * cdef Op s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(28, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Op.pyx":23 * cdef Op s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(28, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Op.pyx":24 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(28, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Op.pyx":25 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(28, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Op.pyx":26 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(28, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(28, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(28, 26, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":19 * op_user_del(&self.ob_usrid) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Op): return NotImplemented * cdef Op s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Op.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":28 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_OP_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_2Op_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_2Op_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_6__bool__(((struct PyMPIOpObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_2Op_6__bool__(struct PyMPIOpObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/Op.pyx":29 * * def __bool__(self): * return self.ob_mpi != MPI_OP_NULL # <<<<<<<<<<<<<< * * def __call__(self, x, y): */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_OP_NULL); goto __pyx_L0; /* "mpi4py/MPI/Op.pyx":28 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_OP_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":31 * return self.ob_mpi != MPI_OP_NULL * * def __call__(self, x, y): # <<<<<<<<<<<<<< * if self.ob_func != NULL: * return self.ob_func(x, y) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_9__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_9__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_x = 0; PyObject *__pyx_v_y = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); __PYX_ERR(28, 31, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(28, 31, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_x = values[0]; __pyx_v_y = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(28, 31, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Op.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_8__call__(((struct PyMPIOpObject *)__pyx_v_self), __pyx_v_x, __pyx_v_y); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_8__call__(struct PyMPIOpObject *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__call__", 0); /* "mpi4py/MPI/Op.pyx":32 * * def __call__(self, x, y): * if self.ob_func != NULL: # <<<<<<<<<<<<<< * return self.ob_func(x, y) * else: */ __pyx_t_1 = ((__pyx_v_self->ob_func != NULL) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/Op.pyx":33 * def __call__(self, x, y): * if self.ob_func != NULL: * return self.ob_func(x, y) # <<<<<<<<<<<<<< * else: * return op_user_py(self.ob_usrid, x, y, None) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_v_self->ob_func(__pyx_v_x, __pyx_v_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(28, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Op.pyx":32 * * def __call__(self, x, y): * if self.ob_func != NULL: # <<<<<<<<<<<<<< * return self.ob_func(x, y) * else: */ } /* "mpi4py/MPI/Op.pyx":35 * return self.ob_func(x, y) * else: * return op_user_py(self.ob_usrid, x, y, None) # <<<<<<<<<<<<<< * * @classmethod */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_op_user_py(__pyx_v_self->ob_usrid, __pyx_v_x, __pyx_v_y, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(28, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Op.pyx":31 * return self.ob_mpi != MPI_OP_NULL * * def __call__(self, x, y): # <<<<<<<<<<<<<< * if self.ob_func != NULL: * return self.ob_func(x, y) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Op.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":38 * * @classmethod * def Create(cls, function, bint commute=False): # <<<<<<<<<<<<<< * """ * Create a user-defined operation */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_11Create(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_2Op_10Create[] = "Op.Create(type cls, function, bool commute=False)\n\n Create a user-defined operation\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_11Create(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_function = 0; int __pyx_v_commute; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_function,&__pyx_n_s_commute,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_function)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_commute); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create") < 0)) __PYX_ERR(28, 38, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_function = values[0]; if (values[1]) { __pyx_v_commute = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_commute == (int)-1) && PyErr_Occurred())) __PYX_ERR(28, 38, __pyx_L3_error) } else { __pyx_v_commute = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(28, 38, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Op.Create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_10Create(((PyTypeObject*)__pyx_v_cls), __pyx_v_function, __pyx_v_commute); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_10Create(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_function, int __pyx_v_commute) { struct PyMPIOpObject *__pyx_v_op = 0; MPI_User_function *__pyx_v_cfunction; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create", 0); /* "mpi4py/MPI/Op.pyx":42 * Create a user-defined operation * """ * cdef Op op = Op.__new__(Op) # <<<<<<<<<<<<<< * cdef MPI_User_function *cfunction = NULL * op.ob_usrid = op_user_new(function, &cfunction) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Op(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Op), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 42, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_op = ((struct PyMPIOpObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Op.pyx":43 * """ * cdef Op op = Op.__new__(Op) * cdef MPI_User_function *cfunction = NULL # <<<<<<<<<<<<<< * op.ob_usrid = op_user_new(function, &cfunction) * CHKERR( MPI_Op_create(cfunction, commute, &op.ob_mpi) ) */ __pyx_v_cfunction = NULL; /* "mpi4py/MPI/Op.pyx":44 * cdef Op op = Op.__new__(Op) * cdef MPI_User_function *cfunction = NULL * op.ob_usrid = op_user_new(function, &cfunction) # <<<<<<<<<<<<<< * CHKERR( MPI_Op_create(cfunction, commute, &op.ob_mpi) ) * return op */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_op_user_new(__pyx_v_function, (&__pyx_v_cfunction)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(28, 44, __pyx_L1_error) __pyx_v_op->ob_usrid = __pyx_t_3; /* "mpi4py/MPI/Op.pyx":45 * cdef MPI_User_function *cfunction = NULL * op.ob_usrid = op_user_new(function, &cfunction) * CHKERR( MPI_Op_create(cfunction, commute, &op.ob_mpi) ) # <<<<<<<<<<<<<< * return op * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Op_create(__pyx_v_cfunction, __pyx_v_commute, (&__pyx_v_op->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(28, 45, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":46 * op.ob_usrid = op_user_new(function, &cfunction) * CHKERR( MPI_Op_create(cfunction, commute, &op.ob_mpi) ) * return op # <<<<<<<<<<<<<< * * def Free(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_op)); __pyx_r = ((PyObject *)__pyx_v_op); goto __pyx_L0; /* "mpi4py/MPI/Op.pyx":38 * * @classmethod * def Create(cls, function, bint commute=False): # <<<<<<<<<<<<<< * """ * Create a user-defined operation */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Op.Create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_op); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":48 * return op * * def Free(self): # <<<<<<<<<<<<<< * """ * Free the operation */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_13Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_2Op_12Free[] = "Op.Free(self)\n\n Free the operation\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_13Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Free", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Free", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_12Free(((struct PyMPIOpObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_12Free(struct PyMPIOpObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Free", 0); /* "mpi4py/MPI/Op.pyx":52 * Free the operation * """ * CHKERR( MPI_Op_free(&self.ob_mpi) ) # <<<<<<<<<<<<<< * op_user_del(&self.ob_usrid) * if self is __MAX__ : self.ob_mpi = MPI_MAX */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Op_free((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(28, 52, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":53 * """ * CHKERR( MPI_Op_free(&self.ob_mpi) ) * op_user_del(&self.ob_usrid) # <<<<<<<<<<<<<< * if self is __MAX__ : self.ob_mpi = MPI_MAX * elif self is __MIN__ : self.ob_mpi = MPI_MIN */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_op_user_del((&__pyx_v_self->ob_usrid)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(28, 53, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":54 * CHKERR( MPI_Op_free(&self.ob_mpi) ) * op_user_del(&self.ob_usrid) * if self is __MAX__ : self.ob_mpi = MPI_MAX # <<<<<<<<<<<<<< * elif self is __MIN__ : self.ob_mpi = MPI_MIN * elif self is __SUM__ : self.ob_mpi = MPI_SUM */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___MAX__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_MAX; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":55 * op_user_del(&self.ob_usrid) * if self is __MAX__ : self.ob_mpi = MPI_MAX * elif self is __MIN__ : self.ob_mpi = MPI_MIN # <<<<<<<<<<<<<< * elif self is __SUM__ : self.ob_mpi = MPI_SUM * elif self is __PROD__ : self.ob_mpi = MPI_PROD */ __pyx_t_3 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___MIN__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_self->ob_mpi = MPI_MIN; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":56 * if self is __MAX__ : self.ob_mpi = MPI_MAX * elif self is __MIN__ : self.ob_mpi = MPI_MIN * elif self is __SUM__ : self.ob_mpi = MPI_SUM # <<<<<<<<<<<<<< * elif self is __PROD__ : self.ob_mpi = MPI_PROD * elif self is __LAND__ : self.ob_mpi = MPI_LAND */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___SUM__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_SUM; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":57 * elif self is __MIN__ : self.ob_mpi = MPI_MIN * elif self is __SUM__ : self.ob_mpi = MPI_SUM * elif self is __PROD__ : self.ob_mpi = MPI_PROD # <<<<<<<<<<<<<< * elif self is __LAND__ : self.ob_mpi = MPI_LAND * elif self is __BAND__ : self.ob_mpi = MPI_BAND */ __pyx_t_3 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___PROD__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_self->ob_mpi = MPI_PROD; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":58 * elif self is __SUM__ : self.ob_mpi = MPI_SUM * elif self is __PROD__ : self.ob_mpi = MPI_PROD * elif self is __LAND__ : self.ob_mpi = MPI_LAND # <<<<<<<<<<<<<< * elif self is __BAND__ : self.ob_mpi = MPI_BAND * elif self is __LOR__ : self.ob_mpi = MPI_LOR */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___LAND__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_LAND; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":59 * elif self is __PROD__ : self.ob_mpi = MPI_PROD * elif self is __LAND__ : self.ob_mpi = MPI_LAND * elif self is __BAND__ : self.ob_mpi = MPI_BAND # <<<<<<<<<<<<<< * elif self is __LOR__ : self.ob_mpi = MPI_LOR * elif self is __BOR__ : self.ob_mpi = MPI_BOR */ __pyx_t_3 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___BAND__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_self->ob_mpi = MPI_BAND; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":60 * elif self is __LAND__ : self.ob_mpi = MPI_LAND * elif self is __BAND__ : self.ob_mpi = MPI_BAND * elif self is __LOR__ : self.ob_mpi = MPI_LOR # <<<<<<<<<<<<<< * elif self is __BOR__ : self.ob_mpi = MPI_BOR * elif self is __LXOR__ : self.ob_mpi = MPI_LXOR */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___LOR__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_LOR; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":61 * elif self is __BAND__ : self.ob_mpi = MPI_BAND * elif self is __LOR__ : self.ob_mpi = MPI_LOR * elif self is __BOR__ : self.ob_mpi = MPI_BOR # <<<<<<<<<<<<<< * elif self is __LXOR__ : self.ob_mpi = MPI_LXOR * elif self is __BXOR__ : self.ob_mpi = MPI_BXOR */ __pyx_t_3 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___BOR__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_self->ob_mpi = MPI_BOR; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":62 * elif self is __LOR__ : self.ob_mpi = MPI_LOR * elif self is __BOR__ : self.ob_mpi = MPI_BOR * elif self is __LXOR__ : self.ob_mpi = MPI_LXOR # <<<<<<<<<<<<<< * elif self is __BXOR__ : self.ob_mpi = MPI_BXOR * elif self is __MAXLOC__ : self.ob_mpi = MPI_MAXLOC */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___LXOR__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_LXOR; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":63 * elif self is __BOR__ : self.ob_mpi = MPI_BOR * elif self is __LXOR__ : self.ob_mpi = MPI_LXOR * elif self is __BXOR__ : self.ob_mpi = MPI_BXOR # <<<<<<<<<<<<<< * elif self is __MAXLOC__ : self.ob_mpi = MPI_MAXLOC * elif self is __MINLOC__ : self.ob_mpi = MPI_MINLOC */ __pyx_t_3 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___BXOR__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_self->ob_mpi = MPI_BXOR; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":64 * elif self is __LXOR__ : self.ob_mpi = MPI_LXOR * elif self is __BXOR__ : self.ob_mpi = MPI_BXOR * elif self is __MAXLOC__ : self.ob_mpi = MPI_MAXLOC # <<<<<<<<<<<<<< * elif self is __MINLOC__ : self.ob_mpi = MPI_MINLOC * elif self is __REPLACE__ : self.ob_mpi = MPI_REPLACE */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___MAXLOC__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_MAXLOC; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":65 * elif self is __BXOR__ : self.ob_mpi = MPI_BXOR * elif self is __MAXLOC__ : self.ob_mpi = MPI_MAXLOC * elif self is __MINLOC__ : self.ob_mpi = MPI_MINLOC # <<<<<<<<<<<<<< * elif self is __REPLACE__ : self.ob_mpi = MPI_REPLACE * elif self is __NO_OP__ : self.ob_mpi = MPI_NO_OP */ __pyx_t_3 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___MINLOC__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_self->ob_mpi = MPI_MINLOC; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":66 * elif self is __MAXLOC__ : self.ob_mpi = MPI_MAXLOC * elif self is __MINLOC__ : self.ob_mpi = MPI_MINLOC * elif self is __REPLACE__ : self.ob_mpi = MPI_REPLACE # <<<<<<<<<<<<<< * elif self is __NO_OP__ : self.ob_mpi = MPI_NO_OP * */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___REPLACE__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_REPLACE; goto __pyx_L3; } /* "mpi4py/MPI/Op.pyx":67 * elif self is __MINLOC__ : self.ob_mpi = MPI_MINLOC * elif self is __REPLACE__ : self.ob_mpi = MPI_REPLACE * elif self is __NO_OP__ : self.ob_mpi = MPI_NO_OP # <<<<<<<<<<<<<< * * # Process-local reduction */ __pyx_t_3 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___NO_OP__); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_self->ob_mpi = MPI_NO_OP; } __pyx_L3:; /* "mpi4py/MPI/Op.pyx":48 * return op * * def Free(self): # <<<<<<<<<<<<<< * """ * Free the operation */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Op.Free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":72 * # ----------------------- * * def Is_commutative(self): # <<<<<<<<<<<<<< * """ * Query reduction operations for their commutativity */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_15Is_commutative(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_2Op_14Is_commutative[] = "Op.Is_commutative(self)\n\n Query reduction operations for their commutativity\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_15Is_commutative(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Is_commutative (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Is_commutative", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Is_commutative", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_14Is_commutative(((struct PyMPIOpObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_14Is_commutative(struct PyMPIOpObject *__pyx_v_self) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Is_commutative", 0); /* "mpi4py/MPI/Op.pyx":76 * Query reduction operations for their commutativity * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Op_commutative(self.ob_mpi, &flag) ) * return flag */ __pyx_v_flag = 0; /* "mpi4py/MPI/Op.pyx":77 * """ * cdef int flag = 0 * CHKERR( MPI_Op_commutative(self.ob_mpi, &flag) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Op_commutative(__pyx_v_self->ob_mpi, (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(28, 77, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":78 * cdef int flag = 0 * CHKERR( MPI_Op_commutative(self.ob_mpi, &flag) ) * return flag # <<<<<<<<<<<<<< * * property is_commutative: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(28, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Op.pyx":72 * # ----------------------- * * def Is_commutative(self): # <<<<<<<<<<<<<< * """ * Query reduction operations for their commutativity */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Op.Is_commutative", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":82 * property is_commutative: * """is commutative""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Is_commutative() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_14is_commutative_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_14is_commutative_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_14is_commutative___get__(((struct PyMPIOpObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_14is_commutative___get__(struct PyMPIOpObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Op.pyx":83 * """is commutative""" * def __get__(self): * return self.Is_commutative() # <<<<<<<<<<<<<< * * def Reduce_local(self, inbuf, inoutbuf): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Is_commutative); if (unlikely(!__pyx_t_2)) __PYX_ERR(28, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Op.pyx":82 * property is_commutative: * """is commutative""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Is_commutative() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Op.is_commutative.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":85 * return self.Is_commutative() * * def Reduce_local(self, inbuf, inoutbuf): # <<<<<<<<<<<<<< * """ * Apply a reduction operator to local data */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_17Reduce_local(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_2Op_16Reduce_local[] = "Op.Reduce_local(self, inbuf, inoutbuf)\n\n Apply a reduction operator to local data\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_17Reduce_local(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_inbuf = 0; PyObject *__pyx_v_inoutbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Reduce_local (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inbuf,&__pyx_n_s_inoutbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inoutbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Reduce_local", 1, 2, 2, 1); __PYX_ERR(28, 85, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Reduce_local") < 0)) __PYX_ERR(28, 85, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_inbuf = values[0]; __pyx_v_inoutbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Reduce_local", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(28, 85, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Op.Reduce_local", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_16Reduce_local(((struct PyMPIOpObject *)__pyx_v_self), __pyx_v_inbuf, __pyx_v_inoutbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_16Reduce_local(struct PyMPIOpObject *__pyx_v_self, PyObject *__pyx_v_inbuf, PyObject *__pyx_v_inoutbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("Reduce_local", 0); /* "mpi4py/MPI/Op.pyx":90 * """ * # get *in* and *inout* buffers * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_cro_send(inbuf, 0) * m.for_cro_recv(inoutbuf, 0) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":91 * # get *in* and *inout* buffers * cdef _p_msg_cco m = message_cco() * m.for_cro_send(inbuf, 0) # <<<<<<<<<<<<<< * m.for_cro_recv(inoutbuf, 0) * # check counts and datatypes */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send(__pyx_v_m, __pyx_v_inbuf, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(28, 91, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":92 * cdef _p_msg_cco m = message_cco() * m.for_cro_send(inbuf, 0) * m.for_cro_recv(inoutbuf, 0) # <<<<<<<<<<<<<< * # check counts and datatypes * if m.scount != m.rcount: raise ValueError( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv(__pyx_v_m, __pyx_v_inoutbuf, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(28, 92, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":94 * m.for_cro_recv(inoutbuf, 0) * # check counts and datatypes * if m.scount != m.rcount: raise ValueError( # <<<<<<<<<<<<<< * "mismatch in inbuf count %d and inoutbuf count %d" % * (m.scount, m.rcount)) */ __pyx_t_3 = ((__pyx_v_m->scount != __pyx_v_m->rcount) != 0); if (unlikely(__pyx_t_3)) { /* "mpi4py/MPI/Op.pyx":96 * if m.scount != m.rcount: raise ValueError( * "mismatch in inbuf count %d and inoutbuf count %d" % * (m.scount, m.rcount)) # <<<<<<<<<<<<<< * if (m.stype != m.rtype): raise ValueError( * "mismatch in inbuf and inoutbuf MPI datatypes") */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_m->scount); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_m->rcount); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(28, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; /* "mpi4py/MPI/Op.pyx":95 * # check counts and datatypes * if m.scount != m.rcount: raise ValueError( * "mismatch in inbuf count %d and inoutbuf count %d" % # <<<<<<<<<<<<<< * (m.scount, m.rcount)) * if (m.stype != m.rtype): raise ValueError( */ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_mismatch_in_inbuf_count_d_and_in, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Op.pyx":94 * m.for_cro_recv(inoutbuf, 0) * # check counts and datatypes * if m.scount != m.rcount: raise ValueError( # <<<<<<<<<<<<<< * "mismatch in inbuf count %d and inoutbuf count %d" % * (m.scount, m.rcount)) */ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(28, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(28, 94, __pyx_L1_error) } /* "mpi4py/MPI/Op.pyx":97 * "mismatch in inbuf count %d and inoutbuf count %d" % * (m.scount, m.rcount)) * if (m.stype != m.rtype): raise ValueError( # <<<<<<<<<<<<<< * "mismatch in inbuf and inoutbuf MPI datatypes") * # do local reduction */ __pyx_t_3 = ((__pyx_v_m->stype != __pyx_v_m->rtype) != 0); if (unlikely(__pyx_t_3)) { __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(28, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(28, 97, __pyx_L1_error) } /* "mpi4py/MPI/Op.pyx":100 * "mismatch in inbuf and inoutbuf MPI datatypes") * # do local reduction * with nogil: CHKERR( MPI_Reduce_local( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, self.ob_mpi) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Op.pyx":101 * # do local reduction * with nogil: CHKERR( MPI_Reduce_local( * m.sbuf, m.rbuf, m.rcount, m.rtype, self.ob_mpi) ) # <<<<<<<<<<<<<< * * property is_predefined: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Reduce_local(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(28, 100, __pyx_L6_error) } /* "mpi4py/MPI/Op.pyx":100 * "mismatch in inbuf and inoutbuf MPI datatypes") * # do local reduction * with nogil: CHKERR( MPI_Reduce_local( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, self.ob_mpi) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7; } __pyx_L6_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L7:; } } /* "mpi4py/MPI/Op.pyx":85 * return self.Is_commutative() * * def Reduce_local(self, inbuf, inoutbuf): # <<<<<<<<<<<<<< * """ * Apply a reduction operator to local data */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Op.Reduce_local", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":105 * property is_predefined: * """is a predefined operation""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Op op = self.ob_mpi * return (op == MPI_OP_NULL or */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_13is_predefined_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_13is_predefined_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_13is_predefined___get__(((struct PyMPIOpObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_13is_predefined___get__(struct PyMPIOpObject *__pyx_v_self) { MPI_Op __pyx_v_op; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Op __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Op.pyx":106 * """is a predefined operation""" * def __get__(self): * cdef MPI_Op op = self.ob_mpi # <<<<<<<<<<<<<< * return (op == MPI_OP_NULL or * op == MPI_MAX or */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_op = __pyx_t_1; /* "mpi4py/MPI/Op.pyx":107 * def __get__(self): * cdef MPI_Op op = self.ob_mpi * return (op == MPI_OP_NULL or # <<<<<<<<<<<<<< * op == MPI_MAX or * op == MPI_MIN or */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = (__pyx_v_op == MPI_OP_NULL); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":108 * cdef MPI_Op op = self.ob_mpi * return (op == MPI_OP_NULL or * op == MPI_MAX or # <<<<<<<<<<<<<< * op == MPI_MIN or * op == MPI_SUM or */ __pyx_t_3 = (__pyx_v_op == MPI_MAX); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":109 * return (op == MPI_OP_NULL or * op == MPI_MAX or * op == MPI_MIN or # <<<<<<<<<<<<<< * op == MPI_SUM or * op == MPI_PROD or */ __pyx_t_3 = (__pyx_v_op == MPI_MIN); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":110 * op == MPI_MAX or * op == MPI_MIN or * op == MPI_SUM or # <<<<<<<<<<<<<< * op == MPI_PROD or * op == MPI_LAND or */ __pyx_t_3 = (__pyx_v_op == MPI_SUM); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":111 * op == MPI_MIN or * op == MPI_SUM or * op == MPI_PROD or # <<<<<<<<<<<<<< * op == MPI_LAND or * op == MPI_BAND or */ __pyx_t_3 = (__pyx_v_op == MPI_PROD); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":112 * op == MPI_SUM or * op == MPI_PROD or * op == MPI_LAND or # <<<<<<<<<<<<<< * op == MPI_BAND or * op == MPI_LOR or */ __pyx_t_3 = (__pyx_v_op == MPI_LAND); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":113 * op == MPI_PROD or * op == MPI_LAND or * op == MPI_BAND or # <<<<<<<<<<<<<< * op == MPI_LOR or * op == MPI_BOR or */ __pyx_t_3 = (__pyx_v_op == MPI_BAND); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":114 * op == MPI_LAND or * op == MPI_BAND or * op == MPI_LOR or # <<<<<<<<<<<<<< * op == MPI_BOR or * op == MPI_LXOR or */ __pyx_t_3 = (__pyx_v_op == MPI_LOR); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":115 * op == MPI_BAND or * op == MPI_LOR or * op == MPI_BOR or # <<<<<<<<<<<<<< * op == MPI_LXOR or * op == MPI_BXOR or */ __pyx_t_3 = (__pyx_v_op == MPI_BOR); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":116 * op == MPI_LOR or * op == MPI_BOR or * op == MPI_LXOR or # <<<<<<<<<<<<<< * op == MPI_BXOR or * op == MPI_MAXLOC or */ __pyx_t_3 = (__pyx_v_op == MPI_LXOR); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":117 * op == MPI_BOR or * op == MPI_LXOR or * op == MPI_BXOR or # <<<<<<<<<<<<<< * op == MPI_MAXLOC or * op == MPI_MINLOC or */ __pyx_t_3 = (__pyx_v_op == MPI_BXOR); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":118 * op == MPI_LXOR or * op == MPI_BXOR or * op == MPI_MAXLOC or # <<<<<<<<<<<<<< * op == MPI_MINLOC or * op == MPI_REPLACE or */ __pyx_t_3 = (__pyx_v_op == MPI_MAXLOC); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":119 * op == MPI_BXOR or * op == MPI_MAXLOC or * op == MPI_MINLOC or # <<<<<<<<<<<<<< * op == MPI_REPLACE or * op == MPI_NO_OP) */ __pyx_t_3 = (__pyx_v_op == MPI_MINLOC); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":120 * op == MPI_MAXLOC or * op == MPI_MINLOC or * op == MPI_REPLACE or # <<<<<<<<<<<<<< * op == MPI_NO_OP) * */ __pyx_t_3 = (__pyx_v_op == MPI_REPLACE); if (!__pyx_t_3) { } else { __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3_bool_binop_done; } /* "mpi4py/MPI/Op.pyx":121 * op == MPI_MINLOC or * op == MPI_REPLACE or * op == MPI_NO_OP) # <<<<<<<<<<<<<< * * # Fortran Handle */ __pyx_t_3 = (__pyx_v_op == MPI_NO_OP); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(28, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Op.pyx":105 * property is_predefined: * """is a predefined operation""" * def __get__(self): # <<<<<<<<<<<<<< * cdef MPI_Op op = self.ob_mpi * return (op == MPI_OP_NULL or */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Op.is_predefined.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":126 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_19py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_2Op_18py2f[] = "Op.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_19py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_18py2f(((struct PyMPIOpObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_18py2f(struct PyMPIOpObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Op.pyx":129 * """ * """ * return MPI_Op_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_Op_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Op.pyx":126 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Op.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Op.pyx":132 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_21f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_2Op_20f2py[] = "Op.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_2Op_21f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(28, 132, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(28, 132, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Op.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_2Op_20f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_2Op_20f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; MPI_Fint __pyx_t_3; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Op.pyx":135 * """ * """ * cdef Op op = Op.__new__(Op) # <<<<<<<<<<<<<< * op.ob_mpi = MPI_Op_f2c(arg) * return op */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Op(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Op), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 135, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_op = ((struct PyMPIOpObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Op.pyx":136 * """ * cdef Op op = Op.__new__(Op) * op.ob_mpi = MPI_Op_f2c(arg) # <<<<<<<<<<<<<< * return op * */ __pyx_t_3 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_3 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(28, 136, __pyx_L1_error) __pyx_v_op->ob_mpi = MPI_Op_f2c(__pyx_t_3); /* "mpi4py/MPI/Op.pyx":137 * cdef Op op = Op.__new__(Op) * op.ob_mpi = MPI_Op_f2c(arg) * return op # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_op)); __pyx_r = ((PyObject *)__pyx_v_op); goto __pyx_L0; /* "mpi4py/MPI/Op.pyx":132 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Op.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_op); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":7 * """ * * def __cinit__(self, Group group=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_GROUP_NULL * if group is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_5Group_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_5Group_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIGroupObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(29, 7, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_group = ((struct PyMPIGroupObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 7, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group), __pyx_ptype_6mpi4py_3MPI_Group, 1, "group", 0))) __PYX_ERR(29, 7, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group___cinit__(((struct PyMPIGroupObject *)__pyx_v_self), __pyx_v_group); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_5Group___cinit__(struct PyMPIGroupObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Group __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Group.pyx":8 * * def __cinit__(self, Group group=None): * self.ob_mpi = MPI_GROUP_NULL # <<<<<<<<<<<<<< * if group is None: return * self.ob_mpi = group.ob_mpi */ __pyx_v_self->ob_mpi = MPI_GROUP_NULL; /* "mpi4py/MPI/Group.pyx":9 * def __cinit__(self, Group group=None): * self.ob_mpi = MPI_GROUP_NULL * if group is None: return # <<<<<<<<<<<<<< * self.ob_mpi = group.ob_mpi * */ __pyx_t_1 = (((PyObject *)__pyx_v_group) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Group.pyx":10 * self.ob_mpi = MPI_GROUP_NULL * if group is None: return * self.ob_mpi = group.ob_mpi # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __pyx_v_group->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Group.pyx":7 * """ * * def __cinit__(self, Group group=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_GROUP_NULL * if group is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":12 * self.ob_mpi = group.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Group(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_5Group_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_5Group_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_5Group_2__dealloc__(((struct PyMPIGroupObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_5Group_2__dealloc__(struct PyMPIGroupObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/Group.pyx":13 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_Group(&self.ob_mpi) ) * */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/Group.pyx":14 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Group(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_Group((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(29, 14, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":12 * self.ob_mpi = group.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Group(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.Group.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/Group.pyx":16 * CHKERR( del_Group(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Group): return NotImplemented * cdef Group s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_4__richcmp__(((struct PyMPIGroupObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_4__richcmp__(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIGroupObject *__pyx_v_s = 0; struct PyMPIGroupObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Group.pyx":17 * * def __richcmp__(self, other, int op): * if not isinstance(other, Group): return NotImplemented # <<<<<<<<<<<<<< * cdef Group s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Group); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Group.pyx":18 * def __richcmp__(self, other, int op): * if not isinstance(other, Group): return NotImplemented * cdef Group s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIGroupObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIGroupObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Group.pyx":19 * if not isinstance(other, Group): return NotImplemented * cdef Group s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Group.pyx":20 * cdef Group s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Group.pyx":21 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Group.pyx":22 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Group.pyx":23 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(29, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(29, 23, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":16 * CHKERR( del_Group(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Group): return NotImplemented * cdef Group s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Group.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":25 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_GROUP_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_5Group_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_5Group_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_6__bool__(((struct PyMPIGroupObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_5Group_6__bool__(struct PyMPIGroupObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/Group.pyx":26 * * def __bool__(self): * return self.ob_mpi != MPI_GROUP_NULL # <<<<<<<<<<<<<< * * # Group Accessors */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_GROUP_NULL); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":25 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_GROUP_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":31 * # --------------- * * def Get_size(self): # <<<<<<<<<<<<<< * """ * Return the size of a group */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_9Get_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_8Get_size[] = "Group.Get_size(self)\n\n Return the size of a group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_9Get_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_size (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_size", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_size", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_8Get_size(((struct PyMPIGroupObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_8Get_size(struct PyMPIGroupObject *__pyx_v_self) { int __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_size", 0); /* "mpi4py/MPI/Group.pyx":35 * Return the size of a group * """ * cdef int size = -1 # <<<<<<<<<<<<<< * CHKERR( MPI_Group_size(self.ob_mpi, &size) ) * return size */ __pyx_v_size = -1; /* "mpi4py/MPI/Group.pyx":36 * """ * cdef int size = -1 * CHKERR( MPI_Group_size(self.ob_mpi, &size) ) # <<<<<<<<<<<<<< * return size * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_size(__pyx_v_self->ob_mpi, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(29, 36, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":37 * cdef int size = -1 * CHKERR( MPI_Group_size(self.ob_mpi, &size) ) * return size # <<<<<<<<<<<<<< * * property size: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":31 * # --------------- * * def Get_size(self): # <<<<<<<<<<<<<< * """ * Return the size of a group */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.Get_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":41 * property size: * """number of processes in group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_size() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_4size_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_4size___get__(((struct PyMPIGroupObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_4size___get__(struct PyMPIGroupObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Group.pyx":42 * """number of processes in group""" * def __get__(self): * return self.Get_size() # <<<<<<<<<<<<<< * * def Get_rank(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":41 * property size: * """number of processes in group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_size() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Group.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":44 * return self.Get_size() * * def Get_rank(self): # <<<<<<<<<<<<<< * """ * Return the rank of this process in a group */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_11Get_rank(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_10Get_rank[] = "Group.Get_rank(self)\n\n Return the rank of this process in a group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_11Get_rank(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_rank (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_rank", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_rank", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_10Get_rank(((struct PyMPIGroupObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_10Get_rank(struct PyMPIGroupObject *__pyx_v_self) { int __pyx_v_rank; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_rank", 0); /* "mpi4py/MPI/Group.pyx":48 * Return the rank of this process in a group * """ * cdef int rank = -1 # <<<<<<<<<<<<<< * CHKERR( MPI_Group_rank(self.ob_mpi, &rank) ) * return rank */ __pyx_v_rank = -1; /* "mpi4py/MPI/Group.pyx":49 * """ * cdef int rank = -1 * CHKERR( MPI_Group_rank(self.ob_mpi, &rank) ) # <<<<<<<<<<<<<< * return rank * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_rank(__pyx_v_self->ob_mpi, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(29, 49, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":50 * cdef int rank = -1 * CHKERR( MPI_Group_rank(self.ob_mpi, &rank) ) * return rank # <<<<<<<<<<<<<< * * property rank: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":44 * return self.Get_size() * * def Get_rank(self): # <<<<<<<<<<<<<< * """ * Return the rank of this process in a group */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.Get_rank", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":54 * property rank: * """rank of this process in group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_rank() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_4rank_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_4rank_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_4rank___get__(((struct PyMPIGroupObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_4rank___get__(struct PyMPIGroupObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Group.pyx":55 * """rank of this process in group""" * def __get__(self): * return self.Get_rank() # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":54 * property rank: * """rank of this process in group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_rank() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Group.rank.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":58 * * @classmethod * def Translate_ranks(cls, Group group1, ranks1, Group group2=None): # <<<<<<<<<<<<<< * """ * Translate the ranks of processes in */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_13Translate_ranks(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_12Translate_ranks[] = "Group.Translate_ranks(type cls, Group group1, ranks1, Group group2=None)\n\n Translate the ranks of processes in\n one group to those in another group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_13Translate_ranks(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group1 = 0; PyObject *__pyx_v_ranks1 = 0; struct PyMPIGroupObject *__pyx_v_group2 = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Translate_ranks (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group1,&__pyx_n_s_ranks1,&__pyx_n_s_group2,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)((struct PyMPIGroupObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ranks1)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Translate_ranks", 0, 2, 3, 1); __PYX_ERR(29, 58, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group2); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Translate_ranks") < 0)) __PYX_ERR(29, 58, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_group1 = ((struct PyMPIGroupObject *)values[0]); __pyx_v_ranks1 = values[1]; __pyx_v_group2 = ((struct PyMPIGroupObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Translate_ranks", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 58, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Translate_ranks", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group1), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group1", 0))) __PYX_ERR(29, 58, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group2), __pyx_ptype_6mpi4py_3MPI_Group, 1, "group2", 0))) __PYX_ERR(29, 58, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_12Translate_ranks(((PyTypeObject*)__pyx_v_cls), __pyx_v_group1, __pyx_v_ranks1, __pyx_v_group2); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_12Translate_ranks(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, PyObject *__pyx_v_ranks1, struct PyMPIGroupObject *__pyx_v_group2) { MPI_Group __pyx_v_grp1; MPI_Group __pyx_v_grp2; int __pyx_v_i; int __pyx_v_n; int *__pyx_v_iranks1; int *__pyx_v_iranks2; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; PyObject *__pyx_v_ranks2 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; MPI_Group __pyx_t_2; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; char const *__pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("Translate_ranks", 0); /* "mpi4py/MPI/Group.pyx":63 * one group to those in another group * """ * cdef MPI_Group grp1 = MPI_GROUP_NULL # <<<<<<<<<<<<<< * cdef MPI_Group grp2 = MPI_GROUP_NULL * cdef int i = 0, n = 0, *iranks1 = NULL, *iranks2 = NULL */ __pyx_v_grp1 = MPI_GROUP_NULL; /* "mpi4py/MPI/Group.pyx":64 * """ * cdef MPI_Group grp1 = MPI_GROUP_NULL * cdef MPI_Group grp2 = MPI_GROUP_NULL # <<<<<<<<<<<<<< * cdef int i = 0, n = 0, *iranks1 = NULL, *iranks2 = NULL * cdef tmp1 = getarray(ranks1, &n, &iranks1) */ __pyx_v_grp2 = MPI_GROUP_NULL; /* "mpi4py/MPI/Group.pyx":65 * cdef MPI_Group grp1 = MPI_GROUP_NULL * cdef MPI_Group grp2 = MPI_GROUP_NULL * cdef int i = 0, n = 0, *iranks1 = NULL, *iranks2 = NULL # <<<<<<<<<<<<<< * cdef tmp1 = getarray(ranks1, &n, &iranks1) * cdef tmp2 = newarray(n, &iranks2) */ __pyx_v_i = 0; __pyx_v_n = 0; __pyx_v_iranks1 = NULL; __pyx_v_iranks2 = NULL; /* "mpi4py/MPI/Group.pyx":66 * cdef MPI_Group grp2 = MPI_GROUP_NULL * cdef int i = 0, n = 0, *iranks1 = NULL, *iranks2 = NULL * cdef tmp1 = getarray(ranks1, &n, &iranks1) # <<<<<<<<<<<<<< * cdef tmp2 = newarray(n, &iranks2) * # */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_ranks1, (&__pyx_v_n), (&__pyx_v_iranks1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp1 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Group.pyx":67 * cdef int i = 0, n = 0, *iranks1 = NULL, *iranks2 = NULL * cdef tmp1 = getarray(ranks1, &n, &iranks1) * cdef tmp2 = newarray(n, &iranks2) # <<<<<<<<<<<<<< * # * grp1 = group1.ob_mpi */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_n, (&__pyx_v_iranks2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tmp2 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Group.pyx":69 * cdef tmp2 = newarray(n, &iranks2) * # * grp1 = group1.ob_mpi # <<<<<<<<<<<<<< * if group2 is not None: * grp2 = group2.ob_mpi */ __pyx_t_2 = __pyx_v_group1->ob_mpi; __pyx_v_grp1 = __pyx_t_2; /* "mpi4py/MPI/Group.pyx":70 * # * grp1 = group1.ob_mpi * if group2 is not None: # <<<<<<<<<<<<<< * grp2 = group2.ob_mpi * else: */ __pyx_t_3 = (((PyObject *)__pyx_v_group2) != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/Group.pyx":71 * grp1 = group1.ob_mpi * if group2 is not None: * grp2 = group2.ob_mpi # <<<<<<<<<<<<<< * else: * CHKERR( MPI_Comm_group(MPI_COMM_WORLD, &grp2) ) */ __pyx_t_2 = __pyx_v_group2->ob_mpi; __pyx_v_grp2 = __pyx_t_2; /* "mpi4py/MPI/Group.pyx":70 * # * grp1 = group1.ob_mpi * if group2 is not None: # <<<<<<<<<<<<<< * grp2 = group2.ob_mpi * else: */ goto __pyx_L3; } /* "mpi4py/MPI/Group.pyx":73 * grp2 = group2.ob_mpi * else: * CHKERR( MPI_Comm_group(MPI_COMM_WORLD, &grp2) ) # <<<<<<<<<<<<<< * try: * CHKERR( MPI_Group_translate_ranks(grp1, n, iranks1, */ /*else*/ { __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_group(MPI_COMM_WORLD, (&__pyx_v_grp2))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(29, 73, __pyx_L1_error) } __pyx_L3:; /* "mpi4py/MPI/Group.pyx":74 * else: * CHKERR( MPI_Comm_group(MPI_COMM_WORLD, &grp2) ) * try: # <<<<<<<<<<<<<< * CHKERR( MPI_Group_translate_ranks(grp1, n, iranks1, * grp2, iranks2) ) */ /*try:*/ { /* "mpi4py/MPI/Group.pyx":75 * CHKERR( MPI_Comm_group(MPI_COMM_WORLD, &grp2) ) * try: * CHKERR( MPI_Group_translate_ranks(grp1, n, iranks1, # <<<<<<<<<<<<<< * grp2, iranks2) ) * finally: */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_translate_ranks(__pyx_v_grp1, __pyx_v_n, __pyx_v_iranks1, __pyx_v_grp2, __pyx_v_iranks2)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(29, 75, __pyx_L5_error) } /* "mpi4py/MPI/Group.pyx":78 * grp2, iranks2) ) * finally: * if group2 is None: # <<<<<<<<<<<<<< * CHKERR( MPI_Group_free(&grp2) ) * # */ /*finally:*/ { /*normal exit:*/{ __pyx_t_4 = (((PyObject *)__pyx_v_group2) == Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { /* "mpi4py/MPI/Group.pyx":79 * finally: * if group2 is None: * CHKERR( MPI_Group_free(&grp2) ) # <<<<<<<<<<<<<< * # * cdef object ranks2 = [iranks2[i] for i from 0 <= i < n] */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_free((&__pyx_v_grp2))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(29, 79, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":78 * grp2, iranks2) ) * finally: * if group2 is None: # <<<<<<<<<<<<<< * CHKERR( MPI_Group_free(&grp2) ) * # */ } goto __pyx_L6; } __pyx_L5_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; { __pyx_t_3 = (((PyObject *)__pyx_v_group2) == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/Group.pyx":79 * finally: * if group2 is None: * CHKERR( MPI_Group_free(&grp2) ) # <<<<<<<<<<<<<< * # * cdef object ranks2 = [iranks2[i] for i from 0 <= i < n] */ __pyx_t_14 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_free((&__pyx_v_grp2))); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(29, 79, __pyx_L9_error) /* "mpi4py/MPI/Group.pyx":78 * grp2, iranks2) ) * finally: * if group2 is None: # <<<<<<<<<<<<<< * CHKERR( MPI_Group_free(&grp2) ) * # */ } } if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; goto __pyx_L1_error; __pyx_L9_error:; if (PY_MAJOR_VERSION >= 3) { __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; goto __pyx_L1_error; } __pyx_L6:; } /* "mpi4py/MPI/Group.pyx":81 * CHKERR( MPI_Group_free(&grp2) ) * # * cdef object ranks2 = [iranks2[i] for i from 0 <= i < n] # <<<<<<<<<<<<<< * return ranks2 * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { __pyx_t_15 = __Pyx_PyInt_From_int((__pyx_v_iranks2[__pyx_v_i])); if (unlikely(!__pyx_t_15)) __PYX_ERR(29, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_15))) __PYX_ERR(29, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __pyx_v_ranks2 = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/Group.pyx":82 * # * cdef object ranks2 = [iranks2[i] for i from 0 <= i < n] * return ranks2 # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ranks2); __pyx_r = __pyx_v_ranks2; goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":58 * * @classmethod * def Translate_ranks(cls, Group group1, ranks1, Group group2=None): # <<<<<<<<<<<<<< * """ * Translate the ranks of processes in */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("mpi4py.MPI.Group.Translate_ranks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_ranks2); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":85 * * @classmethod * def Compare(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Compare two groups */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_15Compare(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_14Compare[] = "Group.Compare(type cls, Group group1, Group group2)\n\n Compare two groups\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_15Compare(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group1 = 0; struct PyMPIGroupObject *__pyx_v_group2 = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Compare (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group1,&__pyx_n_s_group2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Compare", 1, 2, 2, 1); __PYX_ERR(29, 85, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Compare") < 0)) __PYX_ERR(29, 85, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_group1 = ((struct PyMPIGroupObject *)values[0]); __pyx_v_group2 = ((struct PyMPIGroupObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 85, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group1), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group1", 0))) __PYX_ERR(29, 85, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group2), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group2", 0))) __PYX_ERR(29, 85, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_14Compare(((PyTypeObject*)__pyx_v_cls), __pyx_v_group1, __pyx_v_group2); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_14Compare(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, struct PyMPIGroupObject *__pyx_v_group2) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Compare", 0); /* "mpi4py/MPI/Group.pyx":89 * Compare two groups * """ * cdef int flag = MPI_UNEQUAL # <<<<<<<<<<<<<< * CHKERR( MPI_Group_compare(group1.ob_mpi, group2.ob_mpi, &flag) ) * return flag */ __pyx_v_flag = MPI_UNEQUAL; /* "mpi4py/MPI/Group.pyx":90 * """ * cdef int flag = MPI_UNEQUAL * CHKERR( MPI_Group_compare(group1.ob_mpi, group2.ob_mpi, &flag) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_compare(__pyx_v_group1->ob_mpi, __pyx_v_group2->ob_mpi, (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(29, 90, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":91 * cdef int flag = MPI_UNEQUAL * CHKERR( MPI_Group_compare(group1.ob_mpi, group2.ob_mpi, &flag) ) * return flag # <<<<<<<<<<<<<< * * # Group Constructors */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":85 * * @classmethod * def Compare(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Compare two groups */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.Compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":96 * # ------------------ * * def Dup(self): # <<<<<<<<<<<<<< * """ * Duplicate a group */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_17Dup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_16Dup[] = "Group.Dup(self)\n\n Duplicate a group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_17Dup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Dup (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Dup", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Dup", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_16Dup(((struct PyMPIGroupObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_16Dup(struct PyMPIGroupObject *__pyx_v_self) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Dup", 0); /* "mpi4py/MPI/Group.pyx":100 * Duplicate a group * """ * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * CHKERR( MPI_Group_union(self.ob_mpi, MPI_GROUP_EMPTY, &group.ob_mpi) ) * return group */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 100, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Group.pyx":101 * """ * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_union(self.ob_mpi, MPI_GROUP_EMPTY, &group.ob_mpi) ) # <<<<<<<<<<<<<< * return group * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_union(__pyx_v_self->ob_mpi, MPI_GROUP_EMPTY, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 101, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":102 * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_union(self.ob_mpi, MPI_GROUP_EMPTY, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":96 * # ------------------ * * def Dup(self): # <<<<<<<<<<<<<< * """ * Duplicate a group */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.Dup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":105 * * @classmethod * def Union(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Produce a group by combining */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_19Union(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_18Union[] = "Group.Union(type cls, Group group1, Group group2)\n\n Produce a group by combining\n two existing groups\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_19Union(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group1 = 0; struct PyMPIGroupObject *__pyx_v_group2 = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Union (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group1,&__pyx_n_s_group2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Union", 1, 2, 2, 1); __PYX_ERR(29, 105, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Union") < 0)) __PYX_ERR(29, 105, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_group1 = ((struct PyMPIGroupObject *)values[0]); __pyx_v_group2 = ((struct PyMPIGroupObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Union", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 105, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Union", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group1), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group1", 0))) __PYX_ERR(29, 105, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group2), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group2", 0))) __PYX_ERR(29, 105, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_18Union(((PyTypeObject*)__pyx_v_cls), __pyx_v_group1, __pyx_v_group2); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_18Union(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, struct PyMPIGroupObject *__pyx_v_group2) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Union", 0); /* "mpi4py/MPI/Group.pyx":110 * two existing groups * """ * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * CHKERR( MPI_Group_union( * group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 110, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Group.pyx":111 * """ * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_union( # <<<<<<<<<<<<<< * group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) * return group */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_union(__pyx_v_group1->ob_mpi, __pyx_v_group2->ob_mpi, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 111, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":113 * CHKERR( MPI_Group_union( * group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":105 * * @classmethod * def Union(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Produce a group by combining */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.Union", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":116 * * @classmethod * def Intersection(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Produce a group as the intersection */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_21Intersection(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_20Intersection[] = "Group.Intersection(type cls, Group group1, Group group2)\n\n Produce a group as the intersection\n of two existing groups\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_21Intersection(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group1 = 0; struct PyMPIGroupObject *__pyx_v_group2 = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Intersection (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group1,&__pyx_n_s_group2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Intersection", 1, 2, 2, 1); __PYX_ERR(29, 116, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Intersection") < 0)) __PYX_ERR(29, 116, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_group1 = ((struct PyMPIGroupObject *)values[0]); __pyx_v_group2 = ((struct PyMPIGroupObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Intersection", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 116, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Intersection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group1), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group1", 0))) __PYX_ERR(29, 116, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group2), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group2", 0))) __PYX_ERR(29, 116, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_20Intersection(((PyTypeObject*)__pyx_v_cls), __pyx_v_group1, __pyx_v_group2); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_20Intersection(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, struct PyMPIGroupObject *__pyx_v_group2) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Intersection", 0); /* "mpi4py/MPI/Group.pyx":121 * of two existing groups * """ * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * CHKERR( MPI_Group_intersection( * group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 121, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Group.pyx":122 * """ * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_intersection( # <<<<<<<<<<<<<< * group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) * return group */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_intersection(__pyx_v_group1->ob_mpi, __pyx_v_group2->ob_mpi, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 122, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":124 * CHKERR( MPI_Group_intersection( * group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * Intersect = Intersection */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":116 * * @classmethod * def Intersection(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Produce a group as the intersection */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.Intersection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":129 * * @classmethod * def Difference(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Produce a group from the difference */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_23Difference(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_22Difference[] = "Group.Difference(type cls, Group group1, Group group2)\n\n Produce a group from the difference\n of two existing groups\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_23Difference(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group1 = 0; struct PyMPIGroupObject *__pyx_v_group2 = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Difference (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group1,&__pyx_n_s_group2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Difference", 1, 2, 2, 1); __PYX_ERR(29, 129, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Difference") < 0)) __PYX_ERR(29, 129, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_group1 = ((struct PyMPIGroupObject *)values[0]); __pyx_v_group2 = ((struct PyMPIGroupObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Difference", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 129, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Difference", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group1), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group1", 0))) __PYX_ERR(29, 129, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group2), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group2", 0))) __PYX_ERR(29, 129, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_22Difference(((PyTypeObject*)__pyx_v_cls), __pyx_v_group1, __pyx_v_group2); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_22Difference(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIGroupObject *__pyx_v_group1, struct PyMPIGroupObject *__pyx_v_group2) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Difference", 0); /* "mpi4py/MPI/Group.pyx":134 * of two existing groups * """ * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * CHKERR( MPI_Group_difference( * group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 134, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Group.pyx":135 * """ * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_difference( # <<<<<<<<<<<<<< * group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) * return group */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_difference(__pyx_v_group1->ob_mpi, __pyx_v_group2->ob_mpi, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 135, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":137 * CHKERR( MPI_Group_difference( * group1.ob_mpi, group2.ob_mpi, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * def Incl(self, ranks): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":129 * * @classmethod * def Difference(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Produce a group from the difference */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.Difference", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":139 * return group * * def Incl(self, ranks): # <<<<<<<<<<<<<< * """ * Produce a group by reordering an existing */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_25Incl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_24Incl[] = "Group.Incl(self, ranks)\n\n Produce a group by reordering an existing\n group and taking only listed members\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_25Incl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ranks = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Incl (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ranks,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ranks)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Incl") < 0)) __PYX_ERR(29, 139, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ranks = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Incl", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 139, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Incl", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_24Incl(((struct PyMPIGroupObject *)__pyx_v_self), __pyx_v_ranks); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_24Incl(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_ranks) { int __pyx_v_n; int *__pyx_v_iranks; struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Incl", 0); __Pyx_INCREF(__pyx_v_ranks); /* "mpi4py/MPI/Group.pyx":144 * group and taking only listed members * """ * cdef int n = 0, *iranks = NULL # <<<<<<<<<<<<<< * ranks = getarray(ranks, &n, &iranks) * cdef Group group = Group.__new__(Group) */ __pyx_v_n = 0; __pyx_v_iranks = NULL; /* "mpi4py/MPI/Group.pyx":145 * """ * cdef int n = 0, *iranks = NULL * ranks = getarray(ranks, &n, &iranks) # <<<<<<<<<<<<<< * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_incl(self.ob_mpi, n, iranks, &group.ob_mpi) ) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_ranks, (&__pyx_v_n), (&__pyx_v_iranks)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_ranks, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Group.pyx":146 * cdef int n = 0, *iranks = NULL * ranks = getarray(ranks, &n, &iranks) * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * CHKERR( MPI_Group_incl(self.ob_mpi, n, iranks, &group.ob_mpi) ) * return group */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 146, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Group.pyx":147 * ranks = getarray(ranks, &n, &iranks) * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_incl(self.ob_mpi, n, iranks, &group.ob_mpi) ) # <<<<<<<<<<<<<< * return group * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_incl(__pyx_v_self->ob_mpi, __pyx_v_n, __pyx_v_iranks, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 147, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":148 * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_incl(self.ob_mpi, n, iranks, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * def Excl(self, ranks): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":139 * return group * * def Incl(self, ranks): # <<<<<<<<<<<<<< * """ * Produce a group by reordering an existing */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.Incl", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XDECREF(__pyx_v_ranks); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":150 * return group * * def Excl(self, ranks): # <<<<<<<<<<<<<< * """ * Produce a group by reordering an existing */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_27Excl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_26Excl[] = "Group.Excl(self, ranks)\n\n Produce a group by reordering an existing\n group and taking only unlisted members\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_27Excl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ranks = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Excl (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ranks,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ranks)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Excl") < 0)) __PYX_ERR(29, 150, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ranks = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Excl", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 150, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Excl", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_26Excl(((struct PyMPIGroupObject *)__pyx_v_self), __pyx_v_ranks); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_26Excl(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_ranks) { int __pyx_v_n; int *__pyx_v_iranks; struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Excl", 0); __Pyx_INCREF(__pyx_v_ranks); /* "mpi4py/MPI/Group.pyx":155 * group and taking only unlisted members * """ * cdef int n = 0, *iranks = NULL # <<<<<<<<<<<<<< * ranks = getarray(ranks, &n, &iranks) * cdef Group group = Group.__new__(Group) */ __pyx_v_n = 0; __pyx_v_iranks = NULL; /* "mpi4py/MPI/Group.pyx":156 * """ * cdef int n = 0, *iranks = NULL * ranks = getarray(ranks, &n, &iranks) # <<<<<<<<<<<<<< * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_excl(self.ob_mpi, n, iranks, &group.ob_mpi) ) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_ranks, (&__pyx_v_n), (&__pyx_v_iranks)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_ranks, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Group.pyx":157 * cdef int n = 0, *iranks = NULL * ranks = getarray(ranks, &n, &iranks) * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * CHKERR( MPI_Group_excl(self.ob_mpi, n, iranks, &group.ob_mpi) ) * return group */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 157, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Group.pyx":158 * ranks = getarray(ranks, &n, &iranks) * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_excl(self.ob_mpi, n, iranks, &group.ob_mpi) ) # <<<<<<<<<<<<<< * return group * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_excl(__pyx_v_self->ob_mpi, __pyx_v_n, __pyx_v_iranks, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 158, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":159 * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_excl(self.ob_mpi, n, iranks, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * def Range_incl(self, ranks): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":150 * return group * * def Excl(self, ranks): # <<<<<<<<<<<<<< * """ * Produce a group by reordering an existing */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.Excl", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XDECREF(__pyx_v_ranks); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":161 * return group * * def Range_incl(self, ranks): # <<<<<<<<<<<<<< * """ * Create a new group from ranges of */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_29Range_incl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_28Range_incl[] = "Group.Range_incl(self, ranks)\n\n Create a new group from ranges of\n of ranks in an existing group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_29Range_incl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ranks = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Range_incl (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ranks,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ranks)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Range_incl") < 0)) __PYX_ERR(29, 161, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ranks = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Range_incl", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 161, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Range_incl", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_28Range_incl(((struct PyMPIGroupObject *)__pyx_v_self), __pyx_v_ranks); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_28Range_incl(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_ranks) { int *__pyx_v_p; int (*__pyx_v_ranges)[3]; int __pyx_v_i; int __pyx_v_n; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; __Pyx_RefNannySetupContext("Range_incl", 0); /* "mpi4py/MPI/Group.pyx":166 * of ranks in an existing group * """ * cdef int *p = NULL, (*ranges)[3]# = NULL ## XXX cython fails # <<<<<<<<<<<<<< * ranges = NULL * cdef int i = 0, n = len(ranks) */ __pyx_v_p = NULL; /* "mpi4py/MPI/Group.pyx":167 * """ * cdef int *p = NULL, (*ranges)[3]# = NULL ## XXX cython fails * ranges = NULL # <<<<<<<<<<<<<< * cdef int i = 0, n = len(ranks) * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) */ __pyx_v_ranges = NULL; /* "mpi4py/MPI/Group.pyx":168 * cdef int *p = NULL, (*ranges)[3]# = NULL ## XXX cython fails * ranges = NULL * cdef int i = 0, n = len(ranks) # <<<<<<<<<<<<<< * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) * for i from 0 <= i < n: */ __pyx_v_i = 0; __pyx_t_1 = PyObject_Length(__pyx_v_ranks); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(29, 168, __pyx_L1_error) __pyx_v_n = ((int)__pyx_t_1); /* "mpi4py/MPI/Group.pyx":169 * ranges = NULL * cdef int i = 0, n = len(ranks) * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * p = ranges[i] */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_n, (sizeof(int [3])), (&__pyx_v_ranges))); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Group.pyx":170 * cdef int i = 0, n = len(ranks) * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * p = ranges[i] * p[0], p[1], p[2] = ranks[i] */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "mpi4py/MPI/Group.pyx":171 * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) * for i from 0 <= i < n: * p = ranges[i] # <<<<<<<<<<<<<< * p[0], p[1], p[2] = ranks[i] * cdef Group group = Group.__new__(Group) */ __pyx_v_p = ((int *)(__pyx_v_ranges[__pyx_v_i])); /* "mpi4py/MPI/Group.pyx":172 * for i from 0 <= i < n: * p = ranges[i] * p[0], p[1], p[2] = ranks[i] # <<<<<<<<<<<<<< * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_range_incl(self.ob_mpi, n, ranges, &group.ob_mpi) ) */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ranks, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(29, 172, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); __pyx_t_6 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(29, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(29, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(29, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 2; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(29, 172, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(29, 172, __pyx_L1_error) __pyx_L6_unpacking_done:; } __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; (__pyx_v_p[0]) = __pyx_t_9; (__pyx_v_p[1]) = __pyx_t_10; (__pyx_v_p[2]) = __pyx_t_11; } /* "mpi4py/MPI/Group.pyx":173 * p = ranges[i] * p[0], p[1], p[2] = ranks[i] * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * CHKERR( MPI_Group_range_incl(self.ob_mpi, n, ranges, &group.ob_mpi) ) * return group */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 173, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_6 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/Group.pyx":174 * p[0], p[1], p[2] = ranks[i] * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_range_incl(self.ob_mpi, n, ranges, &group.ob_mpi) ) # <<<<<<<<<<<<<< * return group * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_range_incl(__pyx_v_self->ob_mpi, __pyx_v_n, __pyx_v_ranges, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 174, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":175 * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_range_incl(self.ob_mpi, n, ranges, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * def Range_excl(self, ranks): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":161 * return group * * def Range_incl(self, ranks): # <<<<<<<<<<<<<< * """ * Create a new group from ranges of */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.Group.Range_incl", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":177 * return group * * def Range_excl(self, ranks): # <<<<<<<<<<<<<< * """ * Create a new group by excluding ranges */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_31Range_excl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_30Range_excl[] = "Group.Range_excl(self, ranks)\n\n Create a new group by excluding ranges\n of processes from an existing group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_31Range_excl(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ranks = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Range_excl (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ranks,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ranks)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Range_excl") < 0)) __PYX_ERR(29, 177, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_ranks = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Range_excl", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 177, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Range_excl", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_30Range_excl(((struct PyMPIGroupObject *)__pyx_v_self), __pyx_v_ranks); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_30Range_excl(struct PyMPIGroupObject *__pyx_v_self, PyObject *__pyx_v_ranks) { int *__pyx_v_p; int (*__pyx_v_ranges)[3]; int __pyx_v_i; int __pyx_v_n; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; __Pyx_RefNannySetupContext("Range_excl", 0); /* "mpi4py/MPI/Group.pyx":182 * of processes from an existing group * """ * cdef int *p = NULL, (*ranges)[3]# = NULL ## XXX cython fails # <<<<<<<<<<<<<< * ranges = NULL * cdef int i = 0, n = len(ranks) */ __pyx_v_p = NULL; /* "mpi4py/MPI/Group.pyx":183 * """ * cdef int *p = NULL, (*ranges)[3]# = NULL ## XXX cython fails * ranges = NULL # <<<<<<<<<<<<<< * cdef int i = 0, n = len(ranks) * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) */ __pyx_v_ranges = NULL; /* "mpi4py/MPI/Group.pyx":184 * cdef int *p = NULL, (*ranges)[3]# = NULL ## XXX cython fails * ranges = NULL * cdef int i = 0, n = len(ranks) # <<<<<<<<<<<<<< * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) * for i from 0 <= i < n: */ __pyx_v_i = 0; __pyx_t_1 = PyObject_Length(__pyx_v_ranks); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(29, 184, __pyx_L1_error) __pyx_v_n = ((int)__pyx_t_1); /* "mpi4py/MPI/Group.pyx":185 * ranges = NULL * cdef int i = 0, n = len(ranks) * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) # <<<<<<<<<<<<<< * for i from 0 <= i < n: * p = ranges[i] */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_allocate(__pyx_v_n, (sizeof(int [3])), (&__pyx_v_ranges))); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Group.pyx":186 * cdef int i = 0, n = len(ranks) * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) * for i from 0 <= i < n: # <<<<<<<<<<<<<< * p = ranges[i] * p[0], p[1], p[2] = ranks[i] */ __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { /* "mpi4py/MPI/Group.pyx":187 * cdef tmp1 = allocate(n, sizeof(int[3]), &ranges) * for i from 0 <= i < n: * p = ranges[i] # <<<<<<<<<<<<<< * p[0], p[1], p[2] = ranks[i] * cdef Group group = Group.__new__(Group) */ __pyx_v_p = ((int *)(__pyx_v_ranges[__pyx_v_i])); /* "mpi4py/MPI/Group.pyx":188 * for i from 0 <= i < n: * p = ranges[i] * p[0], p[1], p[2] = ranks[i] # <<<<<<<<<<<<<< * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_range_excl(self.ob_mpi, n, ranges, &group.ob_mpi) ) */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ranks, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(29, 188, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); } else { __pyx_t_4 = PyList_GET_ITEM(sequence, 0); __pyx_t_5 = PyList_GET_ITEM(sequence, 1); __pyx_t_6 = PyList_GET_ITEM(sequence, 2); } __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(29, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(29, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(29, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(29, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 2; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(29, 188, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(29, 188, __pyx_L1_error) __pyx_L6_unpacking_done:; } __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(29, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; (__pyx_v_p[0]) = __pyx_t_9; (__pyx_v_p[1]) = __pyx_t_10; (__pyx_v_p[2]) = __pyx_t_11; } /* "mpi4py/MPI/Group.pyx":189 * p = ranges[i] * p[0], p[1], p[2] = ranks[i] * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * CHKERR( MPI_Group_range_excl(self.ob_mpi, n, ranges, &group.ob_mpi) ) * return group */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(29, 189, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_6 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/Group.pyx":190 * p[0], p[1], p[2] = ranks[i] * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_range_excl(self.ob_mpi, n, ranges, &group.ob_mpi) ) # <<<<<<<<<<<<<< * return group * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_range_excl(__pyx_v_self->ob_mpi, __pyx_v_n, __pyx_v_ranges, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(29, 190, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":191 * cdef Group group = Group.__new__(Group) * CHKERR( MPI_Group_range_excl(self.ob_mpi, n, ranges, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * # Group Destructor */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":177 * return group * * def Range_excl(self, ranks): # <<<<<<<<<<<<<< * """ * Create a new group by excluding ranges */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("mpi4py.MPI.Group.Range_excl", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":196 * # ---------------- * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a group */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_33Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_32Free[] = "Group.Free(self)\n\n Free a group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_33Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Free", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Free", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_32Free(((struct PyMPIGroupObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_32Free(struct PyMPIGroupObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Free", 0); /* "mpi4py/MPI/Group.pyx":200 * Free a group * """ * CHKERR( MPI_Group_free(&self.ob_mpi) ) # <<<<<<<<<<<<<< * if self is __GROUP_EMPTY__: self.ob_mpi = MPI_GROUP_EMPTY * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Group_free((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(29, 200, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":201 * """ * CHKERR( MPI_Group_free(&self.ob_mpi) ) * if self is __GROUP_EMPTY__: self.ob_mpi = MPI_GROUP_EMPTY # <<<<<<<<<<<<<< * * # Fortran Handle */ __pyx_t_2 = (__pyx_v_self == __pyx_v_6mpi4py_3MPI___GROUP_EMPTY__); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_GROUP_EMPTY; } /* "mpi4py/MPI/Group.pyx":196 * # ---------------- * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a group */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.Free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":206 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_35py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_34py2f[] = "Group.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_35py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_34py2f(((struct PyMPIGroupObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_34py2f(struct PyMPIGroupObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Group.pyx":209 * """ * """ * return MPI_Group_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_Group_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":206 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Group.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Group.pyx":212 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_37f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_5Group_36f2py[] = "Group.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_5Group_37f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(29, 212, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(29, 212, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Group.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_5Group_36f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_5Group_36f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; MPI_Fint __pyx_t_3; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Group.pyx":215 * """ * """ * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * group.ob_mpi = MPI_Group_f2c(arg) * return group */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 215, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Group.pyx":216 * """ * cdef Group group = Group.__new__(Group) * group.ob_mpi = MPI_Group_f2c(arg) # <<<<<<<<<<<<<< * return group * */ __pyx_t_3 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_3 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(29, 216, __pyx_L1_error) __pyx_v_group->ob_mpi = MPI_Group_f2c(__pyx_t_3); /* "mpi4py/MPI/Group.pyx":217 * cdef Group group = Group.__new__(Group) * group.ob_mpi = MPI_Group_f2c(arg) * return group # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Group.pyx":212 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Group.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":37 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_COMM_NULL * if comm is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4Comm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4Comm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPICommObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(7, 37, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 37, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 1, "comm", 0))) __PYX_ERR(7, 37, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm___cinit__(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4Comm___cinit__(struct PyMPICommObject *__pyx_v_self, struct PyMPICommObject *__pyx_v_comm) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Comm __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Comm.pyx":38 * * def __cinit__(self, Comm comm=None): * self.ob_mpi = MPI_COMM_NULL # <<<<<<<<<<<<<< * if comm is None: return * self.ob_mpi = comm.ob_mpi */ __pyx_v_self->ob_mpi = MPI_COMM_NULL; /* "mpi4py/MPI/Comm.pyx":39 * def __cinit__(self, Comm comm=None): * self.ob_mpi = MPI_COMM_NULL * if comm is None: return # <<<<<<<<<<<<<< * self.ob_mpi = comm.ob_mpi * */ __pyx_t_1 = (((PyObject *)__pyx_v_comm) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":40 * self.ob_mpi = MPI_COMM_NULL * if comm is None: return * self.ob_mpi = comm.ob_mpi # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __pyx_v_comm->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Comm.pyx":37 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_COMM_NULL * if comm is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":42 * self.ob_mpi = comm.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Comm(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_4Comm_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_4Comm_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_4Comm_2__dealloc__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_4Comm_2__dealloc__(struct PyMPICommObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/Comm.pyx":43 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_Comm(&self.ob_mpi) ) * */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":44 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Comm(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_Comm((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 44, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":42 * self.ob_mpi = comm.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Comm(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.Comm.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/Comm.pyx":46 * CHKERR( del_Comm(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Comm): return NotImplemented * cdef Comm s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_4__richcmp__(((struct PyMPICommObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4__richcmp__(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPICommObject *__pyx_v_s = 0; struct PyMPICommObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Comm.pyx":47 * * def __richcmp__(self, other, int op): * if not isinstance(other, Comm): return NotImplemented # <<<<<<<<<<<<<< * cdef Comm s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Comm); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":48 * def __richcmp__(self, other, int op): * if not isinstance(other, Comm): return NotImplemented * cdef Comm s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPICommObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPICommObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":49 * if not isinstance(other, Comm): return NotImplemented * cdef Comm s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":50 * cdef Comm s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":51 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":52 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":53 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(7, 53, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":46 * CHKERR( del_Comm(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Comm): return NotImplemented * cdef Comm s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Comm.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":55 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_COMM_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4Comm_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4Comm_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_6__bool__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4Comm_6__bool__(struct PyMPICommObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/Comm.pyx":56 * * def __bool__(self): * return self.ob_mpi != MPI_COMM_NULL # <<<<<<<<<<<<<< * * # Group */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_COMM_NULL); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":55 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_COMM_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":61 * # ----- * * def Get_group(self): # <<<<<<<<<<<<<< * """ * Access the group associated with a communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_9Get_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_8Get_group[] = "Comm.Get_group(self)\n\n Access the group associated with a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_9Get_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_group (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_group", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_group", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_8Get_group(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_8Get_group(struct PyMPICommObject *__pyx_v_self) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_group", 0); /* "mpi4py/MPI/Comm.pyx":65 * Access the group associated with a communicator * """ * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_group(self.ob_mpi, &group.ob_mpi) ) * return group */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 65, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":66 * """ * cdef Group group = Group.__new__(Group) * with nogil: CHKERR( MPI_Comm_group(self.ob_mpi, &group.ob_mpi) ) # <<<<<<<<<<<<<< * return group * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_group(__pyx_v_self->ob_mpi, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 66, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":67 * cdef Group group = Group.__new__(Group) * with nogil: CHKERR( MPI_Comm_group(self.ob_mpi, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * property group: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":61 * # ----- * * def Get_group(self): # <<<<<<<<<<<<<< * """ * Access the group associated with a communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":71 * property group: * """communicator group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_group() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_5group_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_5group_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_5group___get__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_5group___get__(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":72 * """communicator group""" * def __get__(self): * return self.Get_group() # <<<<<<<<<<<<<< * * # Communicator Accessors */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":71 * property group: * """communicator group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_group() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.group.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":77 * # ---------------------- * * def Get_size(self): # <<<<<<<<<<<<<< * """ * Return the number of processes in a communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_11Get_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_10Get_size[] = "Comm.Get_size(self)\n\n Return the number of processes in a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_11Get_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_size (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_size", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_size", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_10Get_size(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_10Get_size(struct PyMPICommObject *__pyx_v_self) { int __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_size", 0); /* "mpi4py/MPI/Comm.pyx":81 * Return the number of processes in a communicator * """ * cdef int size = -1 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_size(self.ob_mpi, &size) ) * return size */ __pyx_v_size = -1; /* "mpi4py/MPI/Comm.pyx":82 * """ * cdef int size = -1 * CHKERR( MPI_Comm_size(self.ob_mpi, &size) ) # <<<<<<<<<<<<<< * return size * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_size(__pyx_v_self->ob_mpi, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 82, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":83 * cdef int size = -1 * CHKERR( MPI_Comm_size(self.ob_mpi, &size) ) * return size # <<<<<<<<<<<<<< * * property size: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":77 * # ---------------------- * * def Get_size(self): # <<<<<<<<<<<<<< * """ * Return the number of processes in a communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":87 * property size: * """number of processes in communicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_size() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_4size_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_4size___get__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4size___get__(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":88 * """number of processes in communicator""" * def __get__(self): * return self.Get_size() # <<<<<<<<<<<<<< * * def Get_rank(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":87 * property size: * """number of processes in communicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_size() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":90 * return self.Get_size() * * def Get_rank(self): # <<<<<<<<<<<<<< * """ * Return the rank of this process in a communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_13Get_rank(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_12Get_rank[] = "Comm.Get_rank(self)\n\n Return the rank of this process in a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_13Get_rank(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_rank (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_rank", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_rank", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_12Get_rank(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_12Get_rank(struct PyMPICommObject *__pyx_v_self) { int __pyx_v_rank; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_rank", 0); /* "mpi4py/MPI/Comm.pyx":94 * Return the rank of this process in a communicator * """ * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * return rank */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/Comm.pyx":95 * """ * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) # <<<<<<<<<<<<<< * return rank * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_self->ob_mpi, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 95, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":96 * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * return rank # <<<<<<<<<<<<<< * * property rank: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":90 * return self.Get_size() * * def Get_rank(self): # <<<<<<<<<<<<<< * """ * Return the rank of this process in a communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_rank", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":100 * property rank: * """rank of this process in communicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_rank() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_4rank_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_4rank_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_4rank___get__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4rank___get__(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":101 * """rank of this process in communicator""" * def __get__(self): * return self.Get_rank() # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":100 * property rank: * """rank of this process in communicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_rank() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.rank.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":104 * * @classmethod * def Compare(cls, Comm comm1, Comm comm2): # <<<<<<<<<<<<<< * """ * Compare two communicators */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_15Compare(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_14Compare[] = "Comm.Compare(type cls, Comm comm1, Comm comm2)\n\n Compare two communicators\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_15Compare(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPICommObject *__pyx_v_comm1 = 0; struct PyMPICommObject *__pyx_v_comm2 = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Compare (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm1,&__pyx_n_s_comm2,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm1)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm2)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Compare", 1, 2, 2, 1); __PYX_ERR(7, 104, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Compare") < 0)) __PYX_ERR(7, 104, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_comm1 = ((struct PyMPICommObject *)values[0]); __pyx_v_comm2 = ((struct PyMPICommObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Compare", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 104, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm1), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm1", 0))) __PYX_ERR(7, 104, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm2), __pyx_ptype_6mpi4py_3MPI_Comm, 0, "comm2", 0))) __PYX_ERR(7, 104, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_14Compare(((PyTypeObject*)__pyx_v_cls), __pyx_v_comm1, __pyx_v_comm2); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_14Compare(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPICommObject *__pyx_v_comm1, struct PyMPICommObject *__pyx_v_comm2) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Compare", 0); /* "mpi4py/MPI/Comm.pyx":108 * Compare two communicators * """ * cdef int flag = MPI_UNEQUAL # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_compare( * comm1.ob_mpi, comm2.ob_mpi, &flag) ) */ __pyx_v_flag = MPI_UNEQUAL; /* "mpi4py/MPI/Comm.pyx":109 * """ * cdef int flag = MPI_UNEQUAL * with nogil: CHKERR( MPI_Comm_compare( # <<<<<<<<<<<<<< * comm1.ob_mpi, comm2.ob_mpi, &flag) ) * return flag */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":110 * cdef int flag = MPI_UNEQUAL * with nogil: CHKERR( MPI_Comm_compare( * comm1.ob_mpi, comm2.ob_mpi, &flag) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_compare(__pyx_v_comm1->ob_mpi, __pyx_v_comm2->ob_mpi, (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 109, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":109 * """ * cdef int flag = MPI_UNEQUAL * with nogil: CHKERR( MPI_Comm_compare( # <<<<<<<<<<<<<< * comm1.ob_mpi, comm2.ob_mpi, &flag) ) * return flag */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":111 * with nogil: CHKERR( MPI_Comm_compare( * comm1.ob_mpi, comm2.ob_mpi, &flag) ) * return flag # <<<<<<<<<<<<<< * * # Communicator Constructors */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":104 * * @classmethod * def Compare(cls, Comm comm1, Comm comm2): # <<<<<<<<<<<<<< * """ * Compare two communicators */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Compare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":116 * # ------------------------- * * def Clone(self): # <<<<<<<<<<<<<< * """ * Clone an existing communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_17Clone(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_16Clone[] = "Comm.Clone(self)\n\n Clone an existing communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_17Clone(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Clone (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Clone", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Clone", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_16Clone(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_16Clone(struct PyMPICommObject *__pyx_v_self) { PyTypeObject *__pyx_v_comm_type = 0; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Clone", 0); /* "mpi4py/MPI/Comm.pyx":120 * Clone an existing communicator * """ * cdef type comm_type = type(self) # <<<<<<<<<<<<<< * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_dup(self.ob_mpi, &comm.ob_mpi) ) */ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __pyx_v_comm_type = ((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); /* "mpi4py/MPI/Comm.pyx":121 * """ * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_dup(self.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_comm_type), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPICommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":122 * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_dup(self.ob_mpi, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_dup(__pyx_v_self->ob_mpi, (&__pyx_v_comm->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 122, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":123 * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_dup(self.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 123, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":124 * with nogil: CHKERR( MPI_Comm_dup(self.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Dup(self, Info info=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":116 * # ------------------------- * * def Clone(self): # <<<<<<<<<<<<<< * """ * Clone an existing communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Clone", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_comm_type); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":126 * return comm * * def Dup(self, Info info=None): # <<<<<<<<<<<<<< * """ * Duplicate an existing communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_19Dup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_18Dup[] = "Comm.Dup(self, Info info=None)\n\n Duplicate an existing communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_19Dup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Dup (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIInfoObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Dup") < 0)) __PYX_ERR(7, 126, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_info = ((struct PyMPIInfoObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Dup", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 126, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Dup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 1, "info", 0))) __PYX_ERR(7, 126, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_18Dup(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_18Dup(struct PyMPICommObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info) { MPI_Info __pyx_v_cinfo; PyTypeObject *__pyx_v_comm_type = 0; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("Dup", 0); /* "mpi4py/MPI/Comm.pyx":130 * Duplicate an existing communicator * """ * cdef MPI_Info cinfo = arg_Info(info) # <<<<<<<<<<<<<< * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) */ __pyx_v_cinfo = __pyx_f_6mpi4py_3MPI_arg_Info(((PyObject *)__pyx_v_info)); /* "mpi4py/MPI/Comm.pyx":131 * """ * cdef MPI_Info cinfo = arg_Info(info) * cdef type comm_type = type(self) # <<<<<<<<<<<<<< * cdef Comm comm = comm_type.__new__(comm_type) * if info is None: */ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __pyx_v_comm_type = ((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); /* "mpi4py/MPI/Comm.pyx":132 * cdef MPI_Info cinfo = arg_Info(info) * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) # <<<<<<<<<<<<<< * if info is None: * with nogil: CHKERR( MPI_Comm_dup( */ __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_comm_type), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPICommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":133 * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) * if info is None: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_dup( * self.ob_mpi, &comm.ob_mpi) ) */ __pyx_t_3 = (((PyObject *)__pyx_v_info) == Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/Comm.pyx":134 * cdef Comm comm = comm_type.__new__(comm_type) * if info is None: * with nogil: CHKERR( MPI_Comm_dup( # <<<<<<<<<<<<<< * self.ob_mpi, &comm.ob_mpi) ) * else: */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":135 * if info is None: * with nogil: CHKERR( MPI_Comm_dup( * self.ob_mpi, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * else: * with nogil: CHKERR( MPI_Comm_dup_with_info( */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_dup(__pyx_v_self->ob_mpi, (&__pyx_v_comm->ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 134, __pyx_L5_error) } /* "mpi4py/MPI/Comm.pyx":134 * cdef Comm comm = comm_type.__new__(comm_type) * if info is None: * with nogil: CHKERR( MPI_Comm_dup( # <<<<<<<<<<<<<< * self.ob_mpi, &comm.ob_mpi) ) * else: */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Comm.pyx":133 * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) * if info is None: # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_dup( * self.ob_mpi, &comm.ob_mpi) ) */ goto __pyx_L3; } /* "mpi4py/MPI/Comm.pyx":137 * self.ob_mpi, &comm.ob_mpi) ) * else: * with nogil: CHKERR( MPI_Comm_dup_with_info( # <<<<<<<<<<<<<< * self.ob_mpi, cinfo, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*else*/ { { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":138 * else: * with nogil: CHKERR( MPI_Comm_dup_with_info( * self.ob_mpi, cinfo, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_dup_with_info(__pyx_v_self->ob_mpi, __pyx_v_cinfo, (&__pyx_v_comm->ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 137, __pyx_L8_error) } /* "mpi4py/MPI/Comm.pyx":137 * self.ob_mpi, &comm.ob_mpi) ) * else: * with nogil: CHKERR( MPI_Comm_dup_with_info( # <<<<<<<<<<<<<< * self.ob_mpi, cinfo, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L9; } __pyx_L8_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L9:; } } } __pyx_L3:; /* "mpi4py/MPI/Comm.pyx":139 * with nogil: CHKERR( MPI_Comm_dup_with_info( * self.ob_mpi, cinfo, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->ob_mpi); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 139, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":140 * self.ob_mpi, cinfo, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Dup_with_info(self, Info info): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":126 * return comm * * def Dup(self, Info info=None): # <<<<<<<<<<<<<< * """ * Duplicate an existing communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Dup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_comm_type); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":142 * return comm * * def Dup_with_info(self, Info info): # <<<<<<<<<<<<<< * """ * Duplicate an existing communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_21Dup_with_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_20Dup_with_info[] = "Comm.Dup_with_info(self, Info info)\n\n Duplicate an existing communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_21Dup_with_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Dup_with_info (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Dup_with_info") < 0)) __PYX_ERR(7, 142, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_info = ((struct PyMPIInfoObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Dup_with_info", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 142, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Dup_with_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(7, 142, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_20Dup_with_info(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_20Dup_with_info(struct PyMPICommObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info) { PyTypeObject *__pyx_v_comm_type = 0; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Dup_with_info", 0); /* "mpi4py/MPI/Comm.pyx":146 * Duplicate an existing communicator * """ * cdef type comm_type = type(self) # <<<<<<<<<<<<<< * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_dup_with_info( */ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __pyx_v_comm_type = ((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); /* "mpi4py/MPI/Comm.pyx":147 * """ * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_dup_with_info( * self.ob_mpi, info.ob_mpi, &comm.ob_mpi) ) */ __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_comm_type), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPICommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":148 * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_dup_with_info( # <<<<<<<<<<<<<< * self.ob_mpi, info.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":149 * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_dup_with_info( * self.ob_mpi, info.ob_mpi, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_dup_with_info(__pyx_v_self->ob_mpi, __pyx_v_info->ob_mpi, (&__pyx_v_comm->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 148, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":148 * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_dup_with_info( # <<<<<<<<<<<<<< * self.ob_mpi, info.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":150 * with nogil: CHKERR( MPI_Comm_dup_with_info( * self.ob_mpi, info.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 150, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":151 * self.ob_mpi, info.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Idup(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":142 * return comm * * def Dup_with_info(self, Info info): # <<<<<<<<<<<<<< * """ * Duplicate an existing communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Dup_with_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_comm_type); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":153 * return comm * * def Idup(self): # <<<<<<<<<<<<<< * """ * Nonblocking duplicate an existing communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_23Idup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_22Idup[] = "Comm.Idup(self)\n\n Nonblocking duplicate an existing communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_23Idup(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Idup (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Idup", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Idup", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_22Idup(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_22Idup(struct PyMPICommObject *__pyx_v_self) { PyTypeObject *__pyx_v_comm_type = 0; struct PyMPICommObject *__pyx_v_comm = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Idup", 0); /* "mpi4py/MPI/Comm.pyx":157 * Nonblocking duplicate an existing communicator * """ * cdef type comm_type = type(self) # <<<<<<<<<<<<<< * cdef Comm comm = comm_type.__new__(comm_type) * cdef Request request = Request.__new__(Request) */ __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __pyx_v_comm_type = ((PyTypeObject*)((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); /* "mpi4py/MPI/Comm.pyx":158 * """ * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Comm_idup( */ __pyx_t_1 = __Pyx_tp_new(((PyObject *)__pyx_v_comm_type), __pyx_empty_tuple); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPICommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":159 * cdef type comm_type = type(self) * cdef Comm comm = comm_type.__new__(comm_type) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_idup( * self.ob_mpi, &comm.ob_mpi, &request.ob_mpi) ) */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 159, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":160 * cdef Comm comm = comm_type.__new__(comm_type) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Comm_idup( # <<<<<<<<<<<<<< * self.ob_mpi, &comm.ob_mpi, &request.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":161 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Comm_idup( * self.ob_mpi, &comm.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return (comm, request) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_idup(__pyx_v_self->ob_mpi, (&__pyx_v_comm->ob_mpi), (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 160, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":160 * cdef Comm comm = comm_type.__new__(comm_type) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Comm_idup( # <<<<<<<<<<<<<< * self.ob_mpi, &comm.ob_mpi, &request.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":162 * with nogil: CHKERR( MPI_Comm_idup( * self.ob_mpi, &comm.ob_mpi, &request.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return (comm, request) * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 162, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":163 * self.ob_mpi, &comm.ob_mpi, &request.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return (comm, request) # <<<<<<<<<<<<<< * * def Create(self, Group group): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __Pyx_GIVEREF(((PyObject *)__pyx_v_comm)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_comm)); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __Pyx_GIVEREF(((PyObject *)__pyx_v_request)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_request)); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":153 * return comm * * def Idup(self): # <<<<<<<<<<<<<< * """ * Nonblocking duplicate an existing communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Idup", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_comm_type); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":165 * return (comm, request) * * def Create(self, Group group): # <<<<<<<<<<<<<< * """ * Create communicator from group */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_25Create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_24Create[] = "Comm.Create(self, Group group)\n\n Create communicator from group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_25Create(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create") < 0)) __PYX_ERR(7, 165, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_group = ((struct PyMPIGroupObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 165, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group", 0))) __PYX_ERR(7, 165, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_24Create(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_group); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_24Create(struct PyMPICommObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group) { PyTypeObject *__pyx_v_comm_type = 0; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("Create", 0); /* "mpi4py/MPI/Comm.pyx":169 * Create communicator from group * """ * cdef type comm_type = Comm # <<<<<<<<<<<<<< * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm)); __pyx_v_comm_type = __pyx_ptype_6mpi4py_3MPI_Comm; /* "mpi4py/MPI/Comm.pyx":170 * """ * cdef type comm_type = Comm * if isinstance(self, Intracomm): comm_type = Intracomm # <<<<<<<<<<<<<< * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Intracomm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intracomm)); __Pyx_DECREF_SET(__pyx_v_comm_type, __pyx_ptype_6mpi4py_3MPI_Intracomm); goto __pyx_L3; } /* "mpi4py/MPI/Comm.pyx":171 * cdef type comm_type = Comm * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm # <<<<<<<<<<<<<< * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_create( */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Intercomm); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm)); __Pyx_DECREF_SET(__pyx_v_comm_type, __pyx_ptype_6mpi4py_3MPI_Intercomm); } __pyx_L3:; /* "mpi4py/MPI/Comm.pyx":172 * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_create( * self.ob_mpi, group.ob_mpi, &comm.ob_mpi) ) */ if (unlikely(((PyObject *)__pyx_v_comm_type) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object.__new__(X): X is not a type object (NoneType)"); __PYX_ERR(7, 172, __pyx_L1_error) } __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_v_comm_type), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_comm = ((struct PyMPICommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":173 * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_create( # <<<<<<<<<<<<<< * self.ob_mpi, group.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":174 * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_create( * self.ob_mpi, group.ob_mpi, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_create(__pyx_v_self->ob_mpi, __pyx_v_group->ob_mpi, (&__pyx_v_comm->ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 173, __pyx_L5_error) } /* "mpi4py/MPI/Comm.pyx":173 * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_create( # <<<<<<<<<<<<<< * self.ob_mpi, group.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Comm.pyx":175 * with nogil: CHKERR( MPI_Comm_create( * self.ob_mpi, group.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->ob_mpi); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 175, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":176 * self.ob_mpi, group.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Create_group(self, Group group, int tag=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":165 * return (comm, request) * * def Create(self, Group group): # <<<<<<<<<<<<<< * """ * Create communicator from group */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Comm.Create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_comm_type); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":178 * return comm * * def Create_group(self, Group group, int tag=0): # <<<<<<<<<<<<<< * """ * Create communicator from group */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_27Create_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_26Create_group[] = "Comm.Create_group(self, Group group, int tag=0)\n\n Create communicator from group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_27Create_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group = 0; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_group (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,&__pyx_n_s_tag,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_group") < 0)) __PYX_ERR(7, 178, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_group = ((struct PyMPIGroupObject *)values[0]); if (values[1]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 178, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_group", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 178, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Create_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group", 0))) __PYX_ERR(7, 178, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_26Create_group(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_group, __pyx_v_tag); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_26Create_group(struct PyMPICommObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group, int __pyx_v_tag) { PyTypeObject *__pyx_v_comm_type = 0; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("Create_group", 0); /* "mpi4py/MPI/Comm.pyx":182 * Create communicator from group * """ * cdef type comm_type = Comm # <<<<<<<<<<<<<< * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm)); __pyx_v_comm_type = __pyx_ptype_6mpi4py_3MPI_Comm; /* "mpi4py/MPI/Comm.pyx":183 * """ * cdef type comm_type = Comm * if isinstance(self, Intracomm): comm_type = Intracomm # <<<<<<<<<<<<<< * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Intracomm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intracomm)); __Pyx_DECREF_SET(__pyx_v_comm_type, __pyx_ptype_6mpi4py_3MPI_Intracomm); goto __pyx_L3; } /* "mpi4py/MPI/Comm.pyx":184 * cdef type comm_type = Comm * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm # <<<<<<<<<<<<<< * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_create_group( */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Intercomm); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm)); __Pyx_DECREF_SET(__pyx_v_comm_type, __pyx_ptype_6mpi4py_3MPI_Intercomm); } __pyx_L3:; /* "mpi4py/MPI/Comm.pyx":185 * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_create_group( * self.ob_mpi, group.ob_mpi, tag, &comm.ob_mpi) ) */ if (unlikely(((PyObject *)__pyx_v_comm_type) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object.__new__(X): X is not a type object (NoneType)"); __PYX_ERR(7, 185, __pyx_L1_error) } __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_v_comm_type), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_comm = ((struct PyMPICommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":186 * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_create_group( # <<<<<<<<<<<<<< * self.ob_mpi, group.ob_mpi, tag, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":187 * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_create_group( * self.ob_mpi, group.ob_mpi, tag, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_create_group(__pyx_v_self->ob_mpi, __pyx_v_group->ob_mpi, __pyx_v_tag, (&__pyx_v_comm->ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 186, __pyx_L5_error) } /* "mpi4py/MPI/Comm.pyx":186 * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_create_group( # <<<<<<<<<<<<<< * self.ob_mpi, group.ob_mpi, tag, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Comm.pyx":188 * with nogil: CHKERR( MPI_Comm_create_group( * self.ob_mpi, group.ob_mpi, tag, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->ob_mpi); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 188, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":189 * self.ob_mpi, group.ob_mpi, tag, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Split(self, int color=0, int key=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":178 * return comm * * def Create_group(self, Group group, int tag=0): # <<<<<<<<<<<<<< * """ * Create communicator from group */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Comm.Create_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_comm_type); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":191 * return comm * * def Split(self, int color=0, int key=0): # <<<<<<<<<<<<<< * """ * Split communicator by color and key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_29Split(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_28Split[] = "Comm.Split(self, int color=0, int key=0)\n\n Split communicator by color and key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_29Split(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_color; int __pyx_v_key; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Split (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_color,&__pyx_n_s_key,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_color); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Split") < 0)) __PYX_ERR(7, 191, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_color = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_color == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 191, __pyx_L3_error) } else { __pyx_v_color = ((int)0); } if (values[1]) { __pyx_v_key = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_key == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 191, __pyx_L3_error) } else { __pyx_v_key = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Split", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 191, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Split", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_28Split(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_color, __pyx_v_key); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_28Split(struct PyMPICommObject *__pyx_v_self, int __pyx_v_color, int __pyx_v_key) { PyTypeObject *__pyx_v_comm_type = 0; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("Split", 0); /* "mpi4py/MPI/Comm.pyx":195 * Split communicator by color and key * """ * cdef type comm_type = Comm # <<<<<<<<<<<<<< * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm)); __pyx_v_comm_type = __pyx_ptype_6mpi4py_3MPI_Comm; /* "mpi4py/MPI/Comm.pyx":196 * """ * cdef type comm_type = Comm * if isinstance(self, Intracomm): comm_type = Intracomm # <<<<<<<<<<<<<< * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Intracomm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intracomm)); __Pyx_DECREF_SET(__pyx_v_comm_type, __pyx_ptype_6mpi4py_3MPI_Intracomm); goto __pyx_L3; } /* "mpi4py/MPI/Comm.pyx":197 * cdef type comm_type = Comm * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm # <<<<<<<<<<<<<< * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_split( */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Intercomm); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm)); __Pyx_DECREF_SET(__pyx_v_comm_type, __pyx_ptype_6mpi4py_3MPI_Intercomm); } __pyx_L3:; /* "mpi4py/MPI/Comm.pyx":198 * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_split( * self.ob_mpi, color, key, &comm.ob_mpi) ) */ if (unlikely(((PyObject *)__pyx_v_comm_type) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object.__new__(X): X is not a type object (NoneType)"); __PYX_ERR(7, 198, __pyx_L1_error) } __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_v_comm_type), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_comm = ((struct PyMPICommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":199 * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_split( # <<<<<<<<<<<<<< * self.ob_mpi, color, key, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":200 * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_split( * self.ob_mpi, color, key, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_split(__pyx_v_self->ob_mpi, __pyx_v_color, __pyx_v_key, (&__pyx_v_comm->ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 199, __pyx_L5_error) } /* "mpi4py/MPI/Comm.pyx":199 * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_split( # <<<<<<<<<<<<<< * self.ob_mpi, color, key, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Comm.pyx":201 * with nogil: CHKERR( MPI_Comm_split( * self.ob_mpi, color, key, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->ob_mpi); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 201, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":202 * self.ob_mpi, color, key, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Split_type(self, int split_type, int key=0, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":191 * return comm * * def Split(self, int color=0, int key=0): # <<<<<<<<<<<<<< * """ * Split communicator by color and key */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Comm.Split", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_comm_type); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":204 * return comm * * def Split_type(self, int split_type, int key=0, # <<<<<<<<<<<<<< * Info info=INFO_NULL): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_31Split_type(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_30Split_type[] = "Comm.Split_type(self, int split_type, int key=0, Info info=INFO_NULL)\n\n Split communicator by color and key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_31Split_type(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_split_type; int __pyx_v_key; struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Split_type (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_split_type,&__pyx_n_s_key,&__pyx_n_s_info,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)__pyx_k__38; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_split_type)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_key); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Split_type") < 0)) __PYX_ERR(7, 204, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_split_type = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_split_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 204, __pyx_L3_error) if (values[1]) { __pyx_v_key = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_key == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 204, __pyx_L3_error) } else { __pyx_v_key = ((int)0); } __pyx_v_info = ((struct PyMPIInfoObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Split_type", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 204, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Split_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(7, 205, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_30Split_type(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_split_type, __pyx_v_key, __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_30Split_type(struct PyMPICommObject *__pyx_v_self, int __pyx_v_split_type, int __pyx_v_key, struct PyMPIInfoObject *__pyx_v_info) { PyTypeObject *__pyx_v_comm_type = 0; struct PyMPICommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("Split_type", 0); /* "mpi4py/MPI/Comm.pyx":209 * Split communicator by color and key * """ * cdef type comm_type = Comm # <<<<<<<<<<<<<< * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm */ __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm)); __pyx_v_comm_type = __pyx_ptype_6mpi4py_3MPI_Comm; /* "mpi4py/MPI/Comm.pyx":210 * """ * cdef type comm_type = Comm * if isinstance(self, Intracomm): comm_type = Intracomm # <<<<<<<<<<<<<< * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Intracomm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intracomm)); __Pyx_DECREF_SET(__pyx_v_comm_type, __pyx_ptype_6mpi4py_3MPI_Intracomm); goto __pyx_L3; } /* "mpi4py/MPI/Comm.pyx":211 * cdef type comm_type = Comm * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm # <<<<<<<<<<<<<< * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_split_type( */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Intercomm); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __Pyx_INCREF(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm)); __Pyx_DECREF_SET(__pyx_v_comm_type, __pyx_ptype_6mpi4py_3MPI_Intercomm); } __pyx_L3:; /* "mpi4py/MPI/Comm.pyx":212 * if isinstance(self, Intracomm): comm_type = Intracomm * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_split_type( * self.ob_mpi, split_type, key, info.ob_mpi, &comm.ob_mpi) ) */ if (unlikely(((PyObject *)__pyx_v_comm_type) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object.__new__(X): X is not a type object (NoneType)"); __PYX_ERR(7, 212, __pyx_L1_error) } __pyx_t_3 = __Pyx_tp_new(((PyObject *)__pyx_v_comm_type), __pyx_empty_tuple); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_comm = ((struct PyMPICommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":213 * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_split_type( # <<<<<<<<<<<<<< * self.ob_mpi, split_type, key, info.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":214 * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_split_type( * self.ob_mpi, split_type, key, info.ob_mpi, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_split_type(__pyx_v_self->ob_mpi, __pyx_v_split_type, __pyx_v_key, __pyx_v_info->ob_mpi, (&__pyx_v_comm->ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 213, __pyx_L5_error) } /* "mpi4py/MPI/Comm.pyx":213 * elif isinstance(self, Intercomm): comm_type = Intercomm * cdef Comm comm = comm_type.__new__(comm_type) * with nogil: CHKERR( MPI_Comm_split_type( # <<<<<<<<<<<<<< * self.ob_mpi, split_type, key, info.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Comm.pyx":215 * with nogil: CHKERR( MPI_Comm_split_type( * self.ob_mpi, split_type, key, info.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->ob_mpi); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 215, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":216 * self.ob_mpi, split_type, key, info.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * # Communicator Destructor */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":204 * return comm * * def Split_type(self, int split_type, int key=0, # <<<<<<<<<<<<<< * Info info=INFO_NULL): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Comm.Split_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_comm_type); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":221 * # ----------------------- * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_33Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_32Free[] = "Comm.Free(self)\n\n Free a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_33Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Free", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Free", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_32Free(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_32Free(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Free", 0); /* "mpi4py/MPI/Comm.pyx":225 * Free a communicator * """ * with nogil: CHKERR( MPI_Comm_free(&self.ob_mpi) ) # <<<<<<<<<<<<<< * if self is __COMM_SELF__: self.ob_mpi = MPI_COMM_SELF * if self is __COMM_WORLD__: self.ob_mpi = MPI_COMM_WORLD */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_free((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 225, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":226 * """ * with nogil: CHKERR( MPI_Comm_free(&self.ob_mpi) ) * if self is __COMM_SELF__: self.ob_mpi = MPI_COMM_SELF # <<<<<<<<<<<<<< * if self is __COMM_WORLD__: self.ob_mpi = MPI_COMM_WORLD * */ __pyx_t_2 = (((PyObject *)__pyx_v_self) == ((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_SELF__)); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __pyx_v_self->ob_mpi = MPI_COMM_SELF; } /* "mpi4py/MPI/Comm.pyx":227 * with nogil: CHKERR( MPI_Comm_free(&self.ob_mpi) ) * if self is __COMM_SELF__: self.ob_mpi = MPI_COMM_SELF * if self is __COMM_WORLD__: self.ob_mpi = MPI_COMM_WORLD # <<<<<<<<<<<<<< * * # Communicator Info */ __pyx_t_3 = (((PyObject *)__pyx_v_self) == ((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_WORLD__)); __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_v_self->ob_mpi = MPI_COMM_WORLD; } /* "mpi4py/MPI/Comm.pyx":221 * # ----------------------- * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a communicator */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":232 * # ----------------- * * def Set_info(self, Info info): # <<<<<<<<<<<<<< * """ * Set new values for the hints */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_35Set_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_34Set_info[] = "Comm.Set_info(self, Info info)\n\n Set new values for the hints\n associated with a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_35Set_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_info (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_info") < 0)) __PYX_ERR(7, 232, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_info = ((struct PyMPIInfoObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_info", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 232, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Set_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(7, 232, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_34Set_info(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_34Set_info(struct PyMPICommObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_info", 0); /* "mpi4py/MPI/Comm.pyx":237 * associated with a communicator * """ * with nogil: CHKERR( MPI_Comm_set_info( # <<<<<<<<<<<<<< * self.ob_mpi, info.ob_mpi) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":238 * """ * with nogil: CHKERR( MPI_Comm_set_info( * self.ob_mpi, info.ob_mpi) ) # <<<<<<<<<<<<<< * * def Get_info(self): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_set_info(__pyx_v_self->ob_mpi, __pyx_v_info->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 237, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":237 * associated with a communicator * """ * with nogil: CHKERR( MPI_Comm_set_info( # <<<<<<<<<<<<<< * self.ob_mpi, info.ob_mpi) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":232 * # ----------------- * * def Set_info(self, Info info): # <<<<<<<<<<<<<< * """ * Set new values for the hints */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Set_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":240 * self.ob_mpi, info.ob_mpi) ) * * def Get_info(self): # <<<<<<<<<<<<<< * """ * Return the hints for a communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_37Get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_36Get_info[] = "Comm.Get_info(self)\n\n Return the hints for a communicator\n that are currently in use\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_37Get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_info (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_info", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_info", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_36Get_info(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_36Get_info(struct PyMPICommObject *__pyx_v_self) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_info", 0); /* "mpi4py/MPI/Comm.pyx":245 * that are currently in use * """ * cdef Info info = Info.__new__(Info) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_get_info( * self.ob_mpi, &info.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Info(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 245, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_info = ((struct PyMPIInfoObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":246 * """ * cdef Info info = Info.__new__(Info) * with nogil: CHKERR( MPI_Comm_get_info( # <<<<<<<<<<<<<< * self.ob_mpi, &info.ob_mpi) ) * return info */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":247 * cdef Info info = Info.__new__(Info) * with nogil: CHKERR( MPI_Comm_get_info( * self.ob_mpi, &info.ob_mpi) ) # <<<<<<<<<<<<<< * return info * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_get_info(__pyx_v_self->ob_mpi, (&__pyx_v_info->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 246, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":246 * """ * cdef Info info = Info.__new__(Info) * with nogil: CHKERR( MPI_Comm_get_info( # <<<<<<<<<<<<<< * self.ob_mpi, &info.ob_mpi) ) * return info */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":248 * with nogil: CHKERR( MPI_Comm_get_info( * self.ob_mpi, &info.ob_mpi) ) * return info # <<<<<<<<<<<<<< * * property info: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_info)); __pyx_r = ((PyObject *)__pyx_v_info); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":240 * self.ob_mpi, info.ob_mpi) ) * * def Get_info(self): # <<<<<<<<<<<<<< * """ * Return the hints for a communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":252 * property info: * """communicator info""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_info() * def __set__(self, info): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_4info_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_4info_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_4info___get__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4info___get__(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":253 * """communicator info""" * def __get__(self): * return self.Get_info() # <<<<<<<<<<<<<< * def __set__(self, info): * self.Set_info(info) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":252 * property info: * """communicator info""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_info() * def __set__(self, info): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":254 * def __get__(self): * return self.Get_info() * def __set__(self, info): # <<<<<<<<<<<<<< * self.Set_info(info) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4Comm_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_info); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4Comm_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_info) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_4info_2__set__(((struct PyMPICommObject *)__pyx_v_self), ((PyObject *)__pyx_v_info)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4Comm_4info_2__set__(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_info) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/Comm.pyx":255 * return self.Get_info() * def __set__(self, info): * self.Set_info(info) # <<<<<<<<<<<<<< * * # Point to Point communication */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_info) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_info); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":254 * def __get__(self): * return self.Get_info() * def __set__(self, info): # <<<<<<<<<<<<<< * self.Set_info(info) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.info.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":263 * # ------------------------------------ * * def Send(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Blocking send */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_39Send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_38Send[] = "Comm.Send(self, buf, int dest, int tag=0)\n\n Blocking send\n\n .. note:: This function may block until the message is\n received. Whether or not `Send` blocks depends on\n several factors and is implementation dependent\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_39Send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Send (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Send", 0, 2, 3, 1); __PYX_ERR(7, 263, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Send") < 0)) __PYX_ERR(7, 263, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 263, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 263, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Send", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 263, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Send", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_38Send(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_38Send(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Send", 0); /* "mpi4py/MPI/Comm.pyx":271 * several factors and is implementation dependent * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Send( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":272 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * with nogil: CHKERR( MPI_Send( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":274 * with nogil: CHKERR( MPI_Send( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Send(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 272, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":272 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * with nogil: CHKERR( MPI_Send( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":263 * # ------------------------------------ * * def Send(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Blocking send */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Send", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":276 * dest, tag, self.ob_mpi) ) * * def Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_41Recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_40Recv[] = "Comm.Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\n\n Blocking receive\n\n .. note:: This function blocks until the message is received\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_41Recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Recv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[4] = {0,0,0,0}; /* "mpi4py/MPI/Comm.pyx":277 * * def Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """ * Blocking receive */ values[3] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Recv") < 0)) __PYX_ERR(7, 276, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; if (values[1]) { __pyx_v_source = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 276, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__39; } if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 276, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__40; } __pyx_v_status = ((struct PyMPIStatusObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Recv", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 276, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 277, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_40Recv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":276 * dest, tag, self.ob_mpi) ) * * def Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_40Recv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_rmsg = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Recv", 0); /* "mpi4py/MPI/Comm.pyx":283 * .. note:: This function blocks until the message is received * """ * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Recv( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_recv(__pyx_v_buf, __pyx_v_source)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rmsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":284 * """ * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Recv( * rmsg.buf, rmsg.count, rmsg.dtype, */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":285 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Recv( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, statusp) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":287 * with nogil: CHKERR( MPI_Recv( * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, statusp) ) # <<<<<<<<<<<<<< * * # Send-Receive */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Recv(__pyx_v_rmsg->buf, __pyx_v_rmsg->count, __pyx_v_rmsg->dtype, __pyx_v_source, __pyx_v_tag, __pyx_v_self->ob_mpi, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 285, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":285 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Recv( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, statusp) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":276 * dest, tag, self.ob_mpi) ) * * def Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":292 * # ------------ * * def Sendrecv(self, sendbuf, int dest, int sendtag=0, # <<<<<<<<<<<<<< * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_43Sendrecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_42Sendrecv[] = "Comm.Sendrecv(self, sendbuf, int dest, int sendtag=0, recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None)\n\n Send and receive a message\n\n .. note:: This function is guaranteed not to deadlock in\n situations where pairs of blocking sends and receives may\n deadlock.\n\n .. caution:: A common mistake when using this function is to\n mismatch the tags with the source and destination ranks,\n which can result in deadlock.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_43Sendrecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; int __pyx_v_dest; int __pyx_v_sendtag; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_source; int __pyx_v_recvtag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Sendrecv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_dest,&__pyx_n_s_sendtag,&__pyx_n_s_recvbuf,&__pyx_n_s_source,&__pyx_n_s_recvtag,&__pyx_n_s_status,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; /* "mpi4py/MPI/Comm.pyx":293 * * def Sendrecv(self, sendbuf, int dest, int sendtag=0, * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ values[3] = ((PyObject *)Py_None); /* "mpi4py/MPI/Comm.pyx":294 * def Sendrecv(self, sendbuf, int dest, int sendtag=0, * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """ * Send and receive a message */ values[6] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Sendrecv", 0, 2, 7, 1); __PYX_ERR(7, 292, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendtag); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvtag); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Sendrecv") < 0)) __PYX_ERR(7, 292, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 292, __pyx_L3_error) if (values[2]) { __pyx_v_sendtag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_sendtag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 292, __pyx_L3_error) } else { __pyx_v_sendtag = ((int)0); } __pyx_v_recvbuf = values[3]; if (values[4]) { __pyx_v_source = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 293, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__41; } if (values[5]) { __pyx_v_recvtag = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_recvtag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 293, __pyx_L3_error) } else { __pyx_v_recvtag = __pyx_k__42; } __pyx_v_status = ((struct PyMPIStatusObject *)values[6]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Sendrecv", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 292, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Sendrecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 294, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_42Sendrecv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_dest, __pyx_v_sendtag, __pyx_v_recvbuf, __pyx_v_source, __pyx_v_recvtag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":292 * # ------------ * * def Sendrecv(self, sendbuf, int dest, int sendtag=0, # <<<<<<<<<<<<<< * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_42Sendrecv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, int __pyx_v_dest, int __pyx_v_sendtag, PyObject *__pyx_v_recvbuf, int __pyx_v_source, int __pyx_v_recvtag, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_rmsg = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Sendrecv", 0); /* "mpi4py/MPI/Comm.pyx":306 * which can result in deadlock. * """ * cdef _p_msg_p2p smsg = message_p2p_send(sendbuf, dest) # <<<<<<<<<<<<<< * cdef _p_msg_p2p rmsg = message_p2p_recv(recvbuf, source) * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_sendbuf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":307 * """ * cdef _p_msg_p2p smsg = message_p2p_send(sendbuf, dest) * cdef _p_msg_p2p rmsg = message_p2p_recv(recvbuf, source) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Sendrecv( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_recv(__pyx_v_recvbuf, __pyx_v_source)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rmsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":308 * cdef _p_msg_p2p smsg = message_p2p_send(sendbuf, dest) * cdef _p_msg_p2p rmsg = message_p2p_recv(recvbuf, source) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Sendrecv( * smsg.buf, smsg.count, smsg.dtype, dest, sendtag, */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":309 * cdef _p_msg_p2p rmsg = message_p2p_recv(recvbuf, source) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Sendrecv( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, dest, sendtag, * rmsg.buf, rmsg.count, rmsg.dtype, source, recvtag, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":312 * smsg.buf, smsg.count, smsg.dtype, dest, sendtag, * rmsg.buf, rmsg.count, rmsg.dtype, source, recvtag, * self.ob_mpi, statusp) ) # <<<<<<<<<<<<<< * * def Sendrecv_replace(self, buf, int dest, int sendtag=0, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Sendrecv(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_sendtag, __pyx_v_rmsg->buf, __pyx_v_rmsg->count, __pyx_v_rmsg->dtype, __pyx_v_source, __pyx_v_recvtag, __pyx_v_self->ob_mpi, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 309, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":309 * cdef _p_msg_p2p rmsg = message_p2p_recv(recvbuf, source) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Sendrecv( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, dest, sendtag, * rmsg.buf, rmsg.count, rmsg.dtype, source, recvtag, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":292 * # ------------ * * def Sendrecv(self, sendbuf, int dest, int sendtag=0, # <<<<<<<<<<<<<< * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Sendrecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XDECREF((PyObject *)__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":314 * self.ob_mpi, statusp) ) * * def Sendrecv_replace(self, buf, int dest, int sendtag=0, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_45Sendrecv_replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_44Sendrecv_replace[] = "Comm.Sendrecv_replace(self, buf, int dest, int sendtag=0, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None)\n\n Send and receive a message\n\n .. note:: This function is guaranteed not to deadlock in\n situations where pairs of blocking sends and receives may\n deadlock.\n\n .. caution:: A common mistake when using this function is to\n mismatch the tags with the source and destination ranks,\n which can result in deadlock.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_45Sendrecv_replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_sendtag; int __pyx_v_source; int __pyx_v_recvtag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Sendrecv_replace (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_sendtag,&__pyx_n_s_source,&__pyx_n_s_recvtag,&__pyx_n_s_status,0}; PyObject* values[6] = {0,0,0,0,0,0}; /* "mpi4py/MPI/Comm.pyx":316 * def Sendrecv_replace(self, buf, int dest, int sendtag=0, * int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """ * Send and receive a message */ values[5] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Sendrecv_replace", 0, 2, 6, 1); __PYX_ERR(7, 314, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendtag); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvtag); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Sendrecv_replace") < 0)) __PYX_ERR(7, 314, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 314, __pyx_L3_error) if (values[2]) { __pyx_v_sendtag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_sendtag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 314, __pyx_L3_error) } else { __pyx_v_sendtag = ((int)0); } if (values[3]) { __pyx_v_source = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 315, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__43; } if (values[4]) { __pyx_v_recvtag = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_recvtag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 315, __pyx_L3_error) } else { __pyx_v_recvtag = __pyx_k__44; } __pyx_v_status = ((struct PyMPIStatusObject *)values[5]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Sendrecv_replace", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 314, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Sendrecv_replace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 316, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_44Sendrecv_replace(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_sendtag, __pyx_v_source, __pyx_v_recvtag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":314 * self.ob_mpi, statusp) ) * * def Sendrecv_replace(self, buf, int dest, int sendtag=0, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_44Sendrecv_replace(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_sendtag, int __pyx_v_source, int __pyx_v_recvtag, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_rank; struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_rmsg = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Sendrecv_replace", 0); /* "mpi4py/MPI/Comm.pyx":328 * which can result in deadlock. * """ * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * if dest != MPI_PROC_NULL: rank = dest * if source != MPI_PROC_NULL: rank = source */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/Comm.pyx":329 * """ * cdef int rank = MPI_PROC_NULL * if dest != MPI_PROC_NULL: rank = dest # <<<<<<<<<<<<<< * if source != MPI_PROC_NULL: rank = source * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, rank) */ __pyx_t_1 = ((__pyx_v_dest != MPI_PROC_NULL) != 0); if (__pyx_t_1) { __pyx_v_rank = __pyx_v_dest; } /* "mpi4py/MPI/Comm.pyx":330 * cdef int rank = MPI_PROC_NULL * if dest != MPI_PROC_NULL: rank = dest * if source != MPI_PROC_NULL: rank = source # <<<<<<<<<<<<<< * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, rank) * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_t_1 = ((__pyx_v_source != MPI_PROC_NULL) != 0); if (__pyx_t_1) { __pyx_v_rank = __pyx_v_source; } /* "mpi4py/MPI/Comm.pyx":331 * if dest != MPI_PROC_NULL: rank = dest * if source != MPI_PROC_NULL: rank = source * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, rank) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Sendrecv_replace( */ __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_recv(__pyx_v_buf, __pyx_v_rank)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_rmsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":332 * if source != MPI_PROC_NULL: rank = source * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, rank) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Sendrecv_replace( * rmsg.buf, rmsg.count, rmsg.dtype, */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":333 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, rank) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Sendrecv_replace( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * dest, sendtag, source, recvtag, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":336 * rmsg.buf, rmsg.count, rmsg.dtype, * dest, sendtag, source, recvtag, * self.ob_mpi, statusp) ) # <<<<<<<<<<<<<< * * # Nonblocking Communications */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Sendrecv_replace(__pyx_v_rmsg->buf, __pyx_v_rmsg->count, __pyx_v_rmsg->dtype, __pyx_v_dest, __pyx_v_sendtag, __pyx_v_source, __pyx_v_recvtag, __pyx_v_self->ob_mpi, __pyx_v_statusp)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 333, __pyx_L6_error) } /* "mpi4py/MPI/Comm.pyx":333 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, rank) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Sendrecv_replace( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * dest, sendtag, source, recvtag, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7; } __pyx_L6_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L7:; } } /* "mpi4py/MPI/Comm.pyx":314 * self.ob_mpi, statusp) ) * * def Sendrecv_replace(self, buf, int dest, int sendtag=0, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Sendrecv_replace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":341 * # -------------------------- * * def Isend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Nonblocking send */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_47Isend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_46Isend[] = "Comm.Isend(self, buf, int dest, int tag=0)\n\n Nonblocking send\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_47Isend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Isend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Isend", 0, 2, 3, 1); __PYX_ERR(7, 341, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Isend") < 0)) __PYX_ERR(7, 341, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 341, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 341, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Isend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 341, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Isend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_46Isend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_46Isend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Isend", 0); /* "mpi4py/MPI/Comm.pyx":345 * Nonblocking send * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Isend( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":346 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Isend( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 346, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":347 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Isend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":349 * with nogil: CHKERR( MPI_Isend( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = smsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Isend(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 347, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":347 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Isend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":350 * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_smsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_smsg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_smsg); /* "mpi4py/MPI/Comm.pyx":351 * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg * return request # <<<<<<<<<<<<<< * * def Irecv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":341 * # -------------------------- * * def Isend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Nonblocking send */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Isend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":353 * return request * * def Irecv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): # <<<<<<<<<<<<<< * """ * Nonblocking receive */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_49Irecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_48Irecv[] = "Comm.Irecv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG)\n\n Nonblocking receive\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_49Irecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_source; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Irecv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_source,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Irecv") < 0)) __PYX_ERR(7, 353, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; if (values[1]) { __pyx_v_source = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 353, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__45; } if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 353, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__46; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Irecv", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 353, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Irecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_48Irecv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_source, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_48Irecv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_rmsg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Irecv", 0); /* "mpi4py/MPI/Comm.pyx":357 * Nonblocking receive * """ * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Irecv( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_recv(__pyx_v_buf, __pyx_v_source)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rmsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":358 * """ * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Irecv( * rmsg.buf, rmsg.count, rmsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 358, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":359 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Irecv( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":361 * with nogil: CHKERR( MPI_Irecv( * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = rmsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Irecv(__pyx_v_rmsg->buf, __pyx_v_rmsg->count, __pyx_v_rmsg->dtype, __pyx_v_source, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 359, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":359 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Irecv( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":362 * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = rmsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_rmsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rmsg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_rmsg); /* "mpi4py/MPI/Comm.pyx":363 * source, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = rmsg * return request # <<<<<<<<<<<<<< * * # Probe */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":353 * return request * * def Irecv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): # <<<<<<<<<<<<<< * """ * Nonblocking receive */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Irecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rmsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":368 * # ----- * * def Probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_51Probe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_50Probe[] = "Comm.Probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\n\n Blocking test for a message\n\n .. note:: This function blocks until the message arrives.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_51Probe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Probe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; /* "mpi4py/MPI/Comm.pyx":369 * * def Probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """ * Blocking test for a message */ values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Probe") < 0)) __PYX_ERR(7, 368, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_source = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 368, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__47; } if (values[1]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 368, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__48; } __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Probe", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 368, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 369, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_50Probe(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":368 * # ----- * * def Probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_50Probe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Probe", 0); /* "mpi4py/MPI/Comm.pyx":375 * .. note:: This function blocks until the message arrives. * """ * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Probe( * source, tag, self.ob_mpi, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":376 * """ * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Probe( # <<<<<<<<<<<<<< * source, tag, self.ob_mpi, statusp) ) * return True */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":377 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Probe( * source, tag, self.ob_mpi, statusp) ) # <<<<<<<<<<<<<< * return True * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Probe(__pyx_v_source, __pyx_v_tag, __pyx_v_self->ob_mpi, __pyx_v_statusp)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 376, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":376 * """ * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Probe( # <<<<<<<<<<<<<< * source, tag, self.ob_mpi, statusp) ) * return True */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":378 * with nogil: CHKERR( MPI_Probe( * source, tag, self.ob_mpi, statusp) ) * return True # <<<<<<<<<<<<<< * * def Iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":368 * # ----- * * def Probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":380 * return True * * def Iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_53Iprobe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_52Iprobe[] = "Comm.Iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\n\n Nonblocking test for a message\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_53Iprobe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iprobe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; /* "mpi4py/MPI/Comm.pyx":381 * * def Iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """ * Nonblocking test for a message */ values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iprobe") < 0)) __PYX_ERR(7, 380, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_source = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 380, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__49; } if (values[1]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 380, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__50; } __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iprobe", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 380, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Iprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 381, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_52Iprobe(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":380 * return True * * def Iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_52Iprobe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_flag; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Iprobe", 0); /* "mpi4py/MPI/Comm.pyx":385 * Nonblocking test for a message * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Iprobe( */ __pyx_v_flag = 0; /* "mpi4py/MPI/Comm.pyx":386 * """ * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Iprobe( * source, tag, self.ob_mpi, &flag, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":387 * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Iprobe( # <<<<<<<<<<<<<< * source, tag, self.ob_mpi, &flag, statusp) ) * return flag */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":388 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Iprobe( * source, tag, self.ob_mpi, &flag, statusp) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Iprobe(__pyx_v_source, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_flag), __pyx_v_statusp)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 387, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":387 * cdef int flag = 0 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Iprobe( # <<<<<<<<<<<<<< * source, tag, self.ob_mpi, &flag, statusp) ) * return flag */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":389 * with nogil: CHKERR( MPI_Iprobe( * source, tag, self.ob_mpi, &flag, statusp) ) * return flag # <<<<<<<<<<<<<< * * # Matching Probe */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":380 * return True * * def Iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Iprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":394 * # -------------- * * def Mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_55Mprobe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_54Mprobe[] = "Comm.Mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\n\n Blocking test for a matched message\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_55Mprobe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Mprobe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; /* "mpi4py/MPI/Comm.pyx":395 * * def Mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """ * Blocking test for a matched message */ values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Mprobe") < 0)) __PYX_ERR(7, 394, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_source = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 394, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__51; } if (values[1]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 394, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__52; } __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Mprobe", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 394, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Mprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 395, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_54Mprobe(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":394 * # -------------- * * def Mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_54Mprobe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { MPI_Message __pyx_v_cmessage; MPI_Status *__pyx_v_statusp; struct PyMPIMessageObject *__pyx_v_message = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Mprobe", 0); /* "mpi4py/MPI/Comm.pyx":399 * Blocking test for a matched message * """ * cdef MPI_Message cmessage = MPI_MESSAGE_NULL # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mprobe( */ __pyx_v_cmessage = MPI_MESSAGE_NULL; /* "mpi4py/MPI/Comm.pyx":400 * """ * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Mprobe( * source, tag, self.ob_mpi, &cmessage, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":401 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mprobe( # <<<<<<<<<<<<<< * source, tag, self.ob_mpi, &cmessage, statusp) ) * cdef Message message = Message.__new__(Message) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":402 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mprobe( * source, tag, self.ob_mpi, &cmessage, statusp) ) # <<<<<<<<<<<<<< * cdef Message message = Message.__new__(Message) * message.ob_mpi = cmessage */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Mprobe(__pyx_v_source, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_cmessage), __pyx_v_statusp)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 401, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":401 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Mprobe( # <<<<<<<<<<<<<< * source, tag, self.ob_mpi, &cmessage, statusp) ) * cdef Message message = Message.__new__(Message) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":403 * with nogil: CHKERR( MPI_Mprobe( * source, tag, self.ob_mpi, &cmessage, statusp) ) * cdef Message message = Message.__new__(Message) # <<<<<<<<<<<<<< * message.ob_mpi = cmessage * return message */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Message(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 403, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":404 * source, tag, self.ob_mpi, &cmessage, statusp) ) * cdef Message message = Message.__new__(Message) * message.ob_mpi = cmessage # <<<<<<<<<<<<<< * return message * */ __pyx_v_message->ob_mpi = __pyx_v_cmessage; /* "mpi4py/MPI/Comm.pyx":405 * cdef Message message = Message.__new__(Message) * message.ob_mpi = cmessage * return message # <<<<<<<<<<<<<< * * def Improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = ((PyObject *)__pyx_v_message); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":394 * # -------------- * * def Mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Mprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":407 * return message * * def Improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_57Improbe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_56Improbe[] = "Comm.Improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\n\n Nonblocking test for a matched message\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_57Improbe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Improbe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; /* "mpi4py/MPI/Comm.pyx":408 * * def Improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """ * Nonblocking test for a matched message */ values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Improbe") < 0)) __PYX_ERR(7, 407, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_source = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 407, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__53; } if (values[1]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 407, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__54; } __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Improbe", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 407, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Improbe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 408, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_56Improbe(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":407 * return message * * def Improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_56Improbe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_flag; MPI_Message __pyx_v_cmessage; MPI_Status *__pyx_v_statusp; struct PyMPIMessageObject *__pyx_v_message = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Improbe", 0); /* "mpi4py/MPI/Comm.pyx":412 * Nonblocking test for a matched message * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_v_flag = 0; /* "mpi4py/MPI/Comm.pyx":413 * """ * cdef int flag = 0 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Improbe( */ __pyx_v_cmessage = MPI_MESSAGE_NULL; /* "mpi4py/MPI/Comm.pyx":414 * cdef int flag = 0 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Improbe( * source, tag, self.ob_mpi, &flag, &cmessage, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":415 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Improbe( # <<<<<<<<<<<<<< * source, tag, self.ob_mpi, &flag, &cmessage, statusp) ) * if flag == 0: return None */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":416 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Improbe( * source, tag, self.ob_mpi, &flag, &cmessage, statusp) ) # <<<<<<<<<<<<<< * if flag == 0: return None * cdef Message message = Message.__new__(Message) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Improbe(__pyx_v_source, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_flag), (&__pyx_v_cmessage), __pyx_v_statusp)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 415, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":415 * cdef MPI_Message cmessage = MPI_MESSAGE_NULL * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_Improbe( # <<<<<<<<<<<<<< * source, tag, self.ob_mpi, &flag, &cmessage, statusp) ) * if flag == 0: return None */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":417 * with nogil: CHKERR( MPI_Improbe( * source, tag, self.ob_mpi, &flag, &cmessage, statusp) ) * if flag == 0: return None # <<<<<<<<<<<<<< * cdef Message message = Message.__new__(Message) * message.ob_mpi = cmessage */ __pyx_t_2 = ((__pyx_v_flag == 0) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":418 * source, tag, self.ob_mpi, &flag, &cmessage, statusp) ) * if flag == 0: return None * cdef Message message = Message.__new__(Message) # <<<<<<<<<<<<<< * message.ob_mpi = cmessage * return message */ __pyx_t_3 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Message(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 418, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":419 * if flag == 0: return None * cdef Message message = Message.__new__(Message) * message.ob_mpi = cmessage # <<<<<<<<<<<<<< * return message * */ __pyx_v_message->ob_mpi = __pyx_v_cmessage; /* "mpi4py/MPI/Comm.pyx":420 * cdef Message message = Message.__new__(Message) * message.ob_mpi = cmessage * return message # <<<<<<<<<<<<<< * * # Persistent Communication */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = ((PyObject *)__pyx_v_message); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":407 * return message * * def Improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Comm.Improbe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":425 * # ------------------------ * * def Send_init(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Create a persistent request for a standard send */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_59Send_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_58Send_init[] = "Comm.Send_init(self, buf, int dest, int tag=0)\n\n Create a persistent request for a standard send\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_59Send_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Send_init (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Send_init", 0, 2, 3, 1); __PYX_ERR(7, 425, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Send_init") < 0)) __PYX_ERR(7, 425, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 425, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 425, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Send_init", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 425, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Send_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_58Send_init(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_58Send_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; struct PyMPIPrequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Send_init", 0); /* "mpi4py/MPI/Comm.pyx":429 * Create a persistent request for a standard send * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Send_init( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":430 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Send_init( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Prequest(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Prequest), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 430, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIPrequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":431 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Send_init( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":433 * with nogil: CHKERR( MPI_Send_init( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = smsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Send_init(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 431, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":431 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Send_init( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":434 * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_smsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_smsg)); __Pyx_GOTREF(__pyx_v_request->__pyx_base.ob_buf); __Pyx_DECREF(__pyx_v_request->__pyx_base.ob_buf); __pyx_v_request->__pyx_base.ob_buf = ((PyObject *)__pyx_v_smsg); /* "mpi4py/MPI/Comm.pyx":435 * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg * return request # <<<<<<<<<<<<<< * * def Recv_init(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":425 * # ------------------------ * * def Send_init(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Create a persistent request for a standard send */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Send_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":437 * return request * * def Recv_init(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): # <<<<<<<<<<<<<< * """ * Create a persistent request for a receive */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_61Recv_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_60Recv_init[] = "Comm.Recv_init(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG)\n\n Create a persistent request for a receive\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_61Recv_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_source; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Recv_init (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_source,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Recv_init") < 0)) __PYX_ERR(7, 437, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; if (values[1]) { __pyx_v_source = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 437, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__55; } if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 437, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__56; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Recv_init", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 437, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Recv_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_60Recv_init(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_source, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_60Recv_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_rmsg = 0; struct PyMPIPrequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Recv_init", 0); /* "mpi4py/MPI/Comm.pyx":441 * Create a persistent request for a receive * """ * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) # <<<<<<<<<<<<<< * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Recv_init( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_recv(__pyx_v_buf, __pyx_v_source)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rmsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":442 * """ * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Prequest request = Prequest.__new__(Prequest) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Recv_init( * rmsg.buf, rmsg.count, rmsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Prequest(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Prequest), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 442, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIPrequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":443 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Recv_init( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":445 * with nogil: CHKERR( MPI_Recv_init( * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = rmsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Recv_init(__pyx_v_rmsg->buf, __pyx_v_rmsg->count, __pyx_v_rmsg->dtype, __pyx_v_source, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 443, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":443 * cdef _p_msg_p2p rmsg = message_p2p_recv(buf, source) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Recv_init( # <<<<<<<<<<<<<< * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":446 * rmsg.buf, rmsg.count, rmsg.dtype, * source, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = rmsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_rmsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rmsg)); __Pyx_GOTREF(__pyx_v_request->__pyx_base.ob_buf); __Pyx_DECREF(__pyx_v_request->__pyx_base.ob_buf); __pyx_v_request->__pyx_base.ob_buf = ((PyObject *)__pyx_v_rmsg); /* "mpi4py/MPI/Comm.pyx":447 * source, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = rmsg * return request # <<<<<<<<<<<<<< * * # Communication Modes */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":437 * return request * * def Recv_init(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): # <<<<<<<<<<<<<< * """ * Create a persistent request for a receive */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Recv_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rmsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":454 * # Blocking calls * * def Bsend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Blocking send in buffered mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_63Bsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_62Bsend[] = "Comm.Bsend(self, buf, int dest, int tag=0)\n\n Blocking send in buffered mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_63Bsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Bsend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Bsend", 0, 2, 3, 1); __PYX_ERR(7, 454, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Bsend") < 0)) __PYX_ERR(7, 454, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 454, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 454, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Bsend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 454, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Bsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_62Bsend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_62Bsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Bsend", 0); /* "mpi4py/MPI/Comm.pyx":458 * Blocking send in buffered mode * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bsend( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":459 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * with nogil: CHKERR( MPI_Bsend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":461 * with nogil: CHKERR( MPI_Bsend( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Ssend(self, buf, int dest, int tag=0): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Bsend(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 459, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":459 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * with nogil: CHKERR( MPI_Bsend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":454 * # Blocking calls * * def Bsend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Blocking send in buffered mode */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Bsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":463 * dest, tag, self.ob_mpi) ) * * def Ssend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Blocking send in synchronous mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_65Ssend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_64Ssend[] = "Comm.Ssend(self, buf, int dest, int tag=0)\n\n Blocking send in synchronous mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_65Ssend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ssend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ssend", 0, 2, 3, 1); __PYX_ERR(7, 463, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ssend") < 0)) __PYX_ERR(7, 463, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 463, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 463, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ssend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 463, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ssend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_64Ssend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_64Ssend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Ssend", 0); /* "mpi4py/MPI/Comm.pyx":467 * Blocking send in synchronous mode * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ssend( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":468 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * with nogil: CHKERR( MPI_Ssend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":470 * with nogil: CHKERR( MPI_Ssend( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Rsend(self, buf, int dest, int tag=0): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ssend(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 468, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":468 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * with nogil: CHKERR( MPI_Ssend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":463 * dest, tag, self.ob_mpi) ) * * def Ssend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Blocking send in synchronous mode */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ssend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":472 * dest, tag, self.ob_mpi) ) * * def Rsend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Blocking send in ready mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_67Rsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_66Rsend[] = "Comm.Rsend(self, buf, int dest, int tag=0)\n\n Blocking send in ready mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_67Rsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Rsend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Rsend", 0, 2, 3, 1); __PYX_ERR(7, 472, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Rsend") < 0)) __PYX_ERR(7, 472, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 472, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 472, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Rsend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 472, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Rsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_66Rsend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_66Rsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Rsend", 0); /* "mpi4py/MPI/Comm.pyx":476 * Blocking send in ready mode * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Rsend( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":477 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * with nogil: CHKERR( MPI_Rsend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":479 * with nogil: CHKERR( MPI_Rsend( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Nonblocking calls */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Rsend(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 477, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":477 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * with nogil: CHKERR( MPI_Rsend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":472 * dest, tag, self.ob_mpi) ) * * def Rsend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Blocking send in ready mode */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Rsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":483 * # Nonblocking calls * * def Ibsend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Nonblocking send in buffered mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_69Ibsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_68Ibsend[] = "Comm.Ibsend(self, buf, int dest, int tag=0)\n\n Nonblocking send in buffered mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_69Ibsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ibsend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ibsend", 0, 2, 3, 1); __PYX_ERR(7, 483, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ibsend") < 0)) __PYX_ERR(7, 483, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 483, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 483, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ibsend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 483, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ibsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_68Ibsend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_68Ibsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Ibsend", 0); /* "mpi4py/MPI/Comm.pyx":487 * Nonblocking send in buffered mode * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ibsend( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":488 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ibsend( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 488, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":489 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ibsend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":491 * with nogil: CHKERR( MPI_Ibsend( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = smsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ibsend(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 489, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":489 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ibsend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":492 * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_smsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_smsg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_smsg); /* "mpi4py/MPI/Comm.pyx":493 * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg * return request # <<<<<<<<<<<<<< * * def Issend(self, buf, int dest, int tag=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":483 * # Nonblocking calls * * def Ibsend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Nonblocking send in buffered mode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ibsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":495 * return request * * def Issend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Nonblocking send in synchronous mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_71Issend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_70Issend[] = "Comm.Issend(self, buf, int dest, int tag=0)\n\n Nonblocking send in synchronous mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_71Issend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Issend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Issend", 0, 2, 3, 1); __PYX_ERR(7, 495, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Issend") < 0)) __PYX_ERR(7, 495, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 495, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 495, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Issend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 495, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Issend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_70Issend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_70Issend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Issend", 0); /* "mpi4py/MPI/Comm.pyx":499 * Nonblocking send in synchronous mode * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Issend( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":500 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Issend( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 500, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":501 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Issend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":503 * with nogil: CHKERR( MPI_Issend( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = smsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Issend(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 501, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":501 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Issend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":504 * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_smsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_smsg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_smsg); /* "mpi4py/MPI/Comm.pyx":505 * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg * return request # <<<<<<<<<<<<<< * * def Irsend(self, buf, int dest, int tag=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":495 * return request * * def Issend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Nonblocking send in synchronous mode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Issend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":507 * return request * * def Irsend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Nonblocking send in ready mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_73Irsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_72Irsend[] = "Comm.Irsend(self, buf, int dest, int tag=0)\n\n Nonblocking send in ready mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_73Irsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Irsend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Irsend", 0, 2, 3, 1); __PYX_ERR(7, 507, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Irsend") < 0)) __PYX_ERR(7, 507, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 507, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 507, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Irsend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 507, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Irsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_72Irsend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_72Irsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Irsend", 0); /* "mpi4py/MPI/Comm.pyx":511 * Nonblocking send in ready mode * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Irsend( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":512 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Irsend( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 512, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":513 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Irsend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":515 * with nogil: CHKERR( MPI_Irsend( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = smsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Irsend(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 513, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":513 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Irsend( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":516 * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_smsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_smsg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_smsg); /* "mpi4py/MPI/Comm.pyx":517 * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg * return request # <<<<<<<<<<<<<< * * # Persistent Requests */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":507 * return request * * def Irsend(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Nonblocking send in ready mode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Irsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":521 * # Persistent Requests * * def Bsend_init(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Persistent request for a send in buffered mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_75Bsend_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_74Bsend_init[] = "Comm.Bsend_init(self, buf, int dest, int tag=0)\n\n Persistent request for a send in buffered mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_75Bsend_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Bsend_init (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Bsend_init", 0, 2, 3, 1); __PYX_ERR(7, 521, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Bsend_init") < 0)) __PYX_ERR(7, 521, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 521, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 521, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Bsend_init", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 521, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Bsend_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_74Bsend_init(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_74Bsend_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; struct PyMPIPrequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Bsend_init", 0); /* "mpi4py/MPI/Comm.pyx":525 * Persistent request for a send in buffered mode * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Bsend_init( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":526 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bsend_init( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Prequest(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Prequest), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 526, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIPrequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":527 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Bsend_init( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":529 * with nogil: CHKERR( MPI_Bsend_init( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = smsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Bsend_init(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 527, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":527 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Bsend_init( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":530 * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_smsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_smsg)); __Pyx_GOTREF(__pyx_v_request->__pyx_base.ob_buf); __Pyx_DECREF(__pyx_v_request->__pyx_base.ob_buf); __pyx_v_request->__pyx_base.ob_buf = ((PyObject *)__pyx_v_smsg); /* "mpi4py/MPI/Comm.pyx":531 * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg * return request # <<<<<<<<<<<<<< * * def Ssend_init(self, buf, int dest, int tag=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":521 * # Persistent Requests * * def Bsend_init(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Persistent request for a send in buffered mode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Bsend_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":533 * return request * * def Ssend_init(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Persistent request for a send in synchronous mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_77Ssend_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_76Ssend_init[] = "Comm.Ssend_init(self, buf, int dest, int tag=0)\n\n Persistent request for a send in synchronous mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_77Ssend_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ssend_init (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ssend_init", 0, 2, 3, 1); __PYX_ERR(7, 533, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ssend_init") < 0)) __PYX_ERR(7, 533, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 533, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 533, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ssend_init", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 533, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ssend_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_76Ssend_init(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_76Ssend_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; struct PyMPIPrequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Ssend_init", 0); /* "mpi4py/MPI/Comm.pyx":537 * Persistent request for a send in synchronous mode * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Ssend_init( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":538 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ssend_init( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Prequest(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Prequest), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 538, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIPrequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":539 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Ssend_init( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":541 * with nogil: CHKERR( MPI_Ssend_init( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = smsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ssend_init(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 539, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":539 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Ssend_init( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":542 * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_smsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_smsg)); __Pyx_GOTREF(__pyx_v_request->__pyx_base.ob_buf); __Pyx_DECREF(__pyx_v_request->__pyx_base.ob_buf); __pyx_v_request->__pyx_base.ob_buf = ((PyObject *)__pyx_v_smsg); /* "mpi4py/MPI/Comm.pyx":543 * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg * return request # <<<<<<<<<<<<<< * * def Rsend_init(self, buf, int dest, int tag=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":533 * return request * * def Ssend_init(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Persistent request for a send in synchronous mode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ssend_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":545 * return request * * def Rsend_init(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Persistent request for a send in ready mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_79Rsend_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_78Rsend_init[] = "Comm.Rsend_init(self, buf, int dest, int tag=0)\n\n Persistent request for a send in ready mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_79Rsend_init(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Rsend_init (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Rsend_init", 0, 2, 3, 1); __PYX_ERR(7, 545, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Rsend_init") < 0)) __PYX_ERR(7, 545, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 545, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 545, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Rsend_init", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 545, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Rsend_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_78Rsend_init(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_78Rsend_init(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_dest, int __pyx_v_tag) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *__pyx_v_smsg = 0; struct PyMPIPrequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Rsend_init", 0); /* "mpi4py/MPI/Comm.pyx":549 * Persistent request for a send in ready mode * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) # <<<<<<<<<<<<<< * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Rsend_init( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_p2p_send(__pyx_v_buf, __pyx_v_dest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_smsg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":550 * """ * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Rsend_init( * smsg.buf, smsg.count, smsg.dtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Prequest(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Prequest), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 550, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIPrequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":551 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Rsend_init( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":553 * with nogil: CHKERR( MPI_Rsend_init( * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = smsg * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Rsend_init(__pyx_v_smsg->buf, __pyx_v_smsg->count, __pyx_v_smsg->dtype, __pyx_v_dest, __pyx_v_tag, __pyx_v_self->ob_mpi, (&__pyx_v_request->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 551, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":551 * cdef _p_msg_p2p smsg = message_p2p_send(buf, dest) * cdef Prequest request = Prequest.__new__(Prequest) * with nogil: CHKERR( MPI_Rsend_init( # <<<<<<<<<<<<<< * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":554 * smsg.buf, smsg.count, smsg.dtype, * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_smsg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_smsg)); __Pyx_GOTREF(__pyx_v_request->__pyx_base.ob_buf); __Pyx_DECREF(__pyx_v_request->__pyx_base.ob_buf); __pyx_v_request->__pyx_base.ob_buf = ((PyObject *)__pyx_v_smsg); /* "mpi4py/MPI/Comm.pyx":555 * dest, tag, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = smsg * return request # <<<<<<<<<<<<<< * * # Collective Communications */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":545 * return request * * def Rsend_init(self, buf, int dest, int tag=0): # <<<<<<<<<<<<<< * """ * Persistent request for a send in ready mode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Rsend_init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_smsg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":563 * # ----------------------- * * def Barrier(self): # <<<<<<<<<<<<<< * """ * Barrier synchronization */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_81Barrier(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_80Barrier[] = "Comm.Barrier(self)\n\n Barrier synchronization\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_81Barrier(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Barrier (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Barrier", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Barrier", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_80Barrier(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_80Barrier(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Barrier", 0); /* "mpi4py/MPI/Comm.pyx":567 * Barrier synchronization * """ * with nogil: CHKERR( MPI_Barrier(self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Global Communication Functions */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Barrier(__pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 567, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":563 * # ----------------------- * * def Barrier(self): # <<<<<<<<<<<<<< * """ * Barrier synchronization */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Barrier", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":572 * # ------------------------------ * * def Bcast(self, buf, int root=0): # <<<<<<<<<<<<<< * """ * Broadcast a message from one process */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_83Bcast(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_82Bcast[] = "Comm.Bcast(self, buf, int root=0)\n\n Broadcast a message from one process\n to all other processes in a group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_83Bcast(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Bcast (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_root,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Bcast") < 0)) __PYX_ERR(7, 572, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; if (values[1]) { __pyx_v_root = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 572, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Bcast", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 572, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Bcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_82Bcast(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_82Bcast(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Bcast", 0); /* "mpi4py/MPI/Comm.pyx":577 * to all other processes in a group * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_bcast(buf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Bcast( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":578 * """ * cdef _p_msg_cco m = message_cco() * m.for_bcast(buf, root, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Bcast( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_bcast(__pyx_v_m, __pyx_v_buf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 578, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":579 * cdef _p_msg_cco m = message_cco() * m.for_bcast(buf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Bcast( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * root, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":581 * with nogil: CHKERR( MPI_Bcast( * m.sbuf, m.scount, m.stype, * root, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Gather(self, sendbuf, recvbuf, int root=0): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Bcast(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_root, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 579, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":579 * cdef _p_msg_cco m = message_cco() * m.for_bcast(buf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Bcast( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * root, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":572 * # ------------------------------ * * def Bcast(self, buf, int root=0): # <<<<<<<<<<<<<< * """ * Broadcast a message from one process */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Bcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":583 * root, self.ob_mpi) ) * * def Gather(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Gather together values from a group of processes */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_85Gather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_84Gather[] = "Comm.Gather(self, sendbuf, recvbuf, int root=0)\n\n Gather together values from a group of processes\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_85Gather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Gather (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Gather", 0, 2, 3, 1); __PYX_ERR(7, 583, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Gather") < 0)) __PYX_ERR(7, 583, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 583, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Gather", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 583, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Gather", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_84Gather(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_84Gather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Gather", 0); /* "mpi4py/MPI/Comm.pyx":587 * Gather together values from a group of processes * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Gather( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":588 * """ * cdef _p_msg_cco m = message_cco() * m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Gather( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_gather(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 588, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":589 * cdef _p_msg_cco m = message_cco() * m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Gather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":592 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * root, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Gatherv(self, sendbuf, recvbuf, int root=0): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Gather(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_root, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 589, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":589 * cdef _p_msg_cco m = message_cco() * m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Gather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":583 * root, self.ob_mpi) ) * * def Gather(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Gather together values from a group of processes */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Gather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":594 * root, self.ob_mpi) ) * * def Gatherv(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Gather Vector, gather data to one process from all other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_87Gatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_86Gatherv[] = "Comm.Gatherv(self, sendbuf, recvbuf, int root=0)\n\n Gather Vector, gather data to one process from all other\n processes in a group providing different amount of data and\n displacements at the receiving sides\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_87Gatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Gatherv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Gatherv", 0, 2, 3, 1); __PYX_ERR(7, 594, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Gatherv") < 0)) __PYX_ERR(7, 594, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 594, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Gatherv", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 594, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Gatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_86Gatherv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_86Gatherv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Gatherv", 0); /* "mpi4py/MPI/Comm.pyx":600 * displacements at the receiving sides * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Gatherv( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":601 * """ * cdef _p_msg_cco m = message_cco() * m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Gatherv( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_gather(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 601, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":602 * cdef _p_msg_cco m = message_cco() * m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Gatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":605 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * root, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Scatter(self, sendbuf, recvbuf, int root=0): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Gatherv(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_root, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 602, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":602 * cdef _p_msg_cco m = message_cco() * m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Gatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":594 * root, self.ob_mpi) ) * * def Gatherv(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Gather Vector, gather data to one process from all other */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Gatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":607 * root, self.ob_mpi) ) * * def Scatter(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Scatter data from one process */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_89Scatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_88Scatter[] = "Comm.Scatter(self, sendbuf, recvbuf, int root=0)\n\n Scatter data from one process\n to all other processes in a group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_89Scatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Scatter (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Scatter", 0, 2, 3, 1); __PYX_ERR(7, 607, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Scatter") < 0)) __PYX_ERR(7, 607, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 607, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Scatter", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 607, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_88Scatter(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_88Scatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Scatter", 0); /* "mpi4py/MPI/Comm.pyx":612 * to all other processes in a group * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Scatter( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":613 * """ * cdef _p_msg_cco m = message_cco() * m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Scatter( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scatter(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 613, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":614 * cdef _p_msg_cco m = message_cco() * m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Scatter( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":617 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * root, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Scatterv(self, sendbuf, recvbuf, int root=0): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Scatter(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_root, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 614, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":614 * cdef _p_msg_cco m = message_cco() * m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Scatter( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":607 * root, self.ob_mpi) ) * * def Scatter(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Scatter data from one process */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":619 * root, self.ob_mpi) ) * * def Scatterv(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Scatter Vector, scatter data from one process to all other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_91Scatterv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_90Scatterv[] = "Comm.Scatterv(self, sendbuf, recvbuf, int root=0)\n\n Scatter Vector, scatter data from one process to all other\n processes in a group providing different amount of data and\n displacements at the sending side\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_91Scatterv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Scatterv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Scatterv", 0, 2, 3, 1); __PYX_ERR(7, 619, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Scatterv") < 0)) __PYX_ERR(7, 619, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 619, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Scatterv", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 619, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Scatterv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_90Scatterv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_90Scatterv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Scatterv", 0); /* "mpi4py/MPI/Comm.pyx":625 * displacements at the sending side * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Scatterv( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":626 * """ * cdef _p_msg_cco m = message_cco() * m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Scatterv( * m.sbuf, m.scounts, m.sdispls, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scatter(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 626, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":627 * cdef _p_msg_cco m = message_cco() * m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Scatterv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":630 * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcount, m.rtype, * root, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Allgather(self, sendbuf, recvbuf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Scatterv(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdispls, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_root, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 627, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":627 * cdef _p_msg_cco m = message_cco() * m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Scatterv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":619 * root, self.ob_mpi) ) * * def Scatterv(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Scatter Vector, scatter data from one process to all other */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Scatterv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":632 * root, self.ob_mpi) ) * * def Allgather(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Gather to All, gather data from all processes and */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_93Allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_92Allgather[] = "Comm.Allgather(self, sendbuf, recvbuf)\n\n Gather to All, gather data from all processes and\n distribute it to all other processes in a group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_93Allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Allgather (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Allgather", 1, 2, 2, 1); __PYX_ERR(7, 632, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Allgather") < 0)) __PYX_ERR(7, 632, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Allgather", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 632, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_92Allgather(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_92Allgather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Allgather", 0); /* "mpi4py/MPI/Comm.pyx":637 * distribute it to all other processes in a group * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Allgather( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":638 * """ * cdef _p_msg_cco m = message_cco() * m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Allgather( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allgather(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 638, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":639 * cdef _p_msg_cco m = message_cco() * m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Allgather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":642 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Allgatherv(self, sendbuf, recvbuf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Allgather(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 639, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":639 * cdef _p_msg_cco m = message_cco() * m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Allgather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":632 * root, self.ob_mpi) ) * * def Allgather(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Gather to All, gather data from all processes and */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":644 * self.ob_mpi) ) * * def Allgatherv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Gather to All Vector, gather data from all processes and */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_95Allgatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_94Allgatherv[] = "Comm.Allgatherv(self, sendbuf, recvbuf)\n\n Gather to All Vector, gather data from all processes and\n distribute it to all other processes in a group providing\n different amount of data and displacements\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_95Allgatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Allgatherv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Allgatherv", 1, 2, 2, 1); __PYX_ERR(7, 644, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Allgatherv") < 0)) __PYX_ERR(7, 644, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Allgatherv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 644, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Allgatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_94Allgatherv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_94Allgatherv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Allgatherv", 0); /* "mpi4py/MPI/Comm.pyx":650 * different amount of data and displacements * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Allgatherv( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":651 * """ * cdef _p_msg_cco m = message_cco() * m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Allgatherv( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allgather(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 651, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":652 * cdef _p_msg_cco m = message_cco() * m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Allgatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":655 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Alltoall(self, sendbuf, recvbuf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Allgatherv(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 652, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":652 * cdef _p_msg_cco m = message_cco() * m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Allgatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":644 * self.ob_mpi) ) * * def Allgatherv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Gather to All Vector, gather data from all processes and */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Allgatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":657 * self.ob_mpi) ) * * def Alltoall(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * All to All Scatter/Gather, send data from all to all */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_97Alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_96Alltoall[] = "Comm.Alltoall(self, sendbuf, recvbuf)\n\n All to All Scatter/Gather, send data from all to all\n processes in a group\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_97Alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Alltoall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Alltoall", 1, 2, 2, 1); __PYX_ERR(7, 657, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Alltoall") < 0)) __PYX_ERR(7, 657, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Alltoall", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 657, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_96Alltoall(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_96Alltoall(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Alltoall", 0); /* "mpi4py/MPI/Comm.pyx":662 * processes in a group * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Alltoall( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":663 * """ * cdef _p_msg_cco m = message_cco() * m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Alltoall( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_alltoall(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 663, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":664 * cdef _p_msg_cco m = message_cco() * m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Alltoall( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":667 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Alltoallv(self, sendbuf, recvbuf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Alltoall(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 664, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":664 * cdef _p_msg_cco m = message_cco() * m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Alltoall( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":657 * self.ob_mpi) ) * * def Alltoall(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * All to All Scatter/Gather, send data from all to all */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":669 * self.ob_mpi) ) * * def Alltoallv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * All to All Scatter/Gather Vector, send data from all to all */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_99Alltoallv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_98Alltoallv[] = "Comm.Alltoallv(self, sendbuf, recvbuf)\n\n All to All Scatter/Gather Vector, send data from all to all\n processes in a group providing different amount of data and\n displacements\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_99Alltoallv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Alltoallv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Alltoallv", 1, 2, 2, 1); __PYX_ERR(7, 669, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Alltoallv") < 0)) __PYX_ERR(7, 669, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Alltoallv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 669, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Alltoallv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_98Alltoallv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_98Alltoallv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Alltoallv", 0); /* "mpi4py/MPI/Comm.pyx":675 * displacements * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Alltoallv( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":676 * """ * cdef _p_msg_cco m = message_cco() * m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Alltoallv( * m.sbuf, m.scounts, m.sdispls, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_alltoall(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 676, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":677 * cdef _p_msg_cco m = message_cco() * m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Alltoallv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":680 * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Alltoallw(self, sendbuf, recvbuf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Alltoallv(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdispls, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 677, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":677 * cdef _p_msg_cco m = message_cco() * m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Alltoallv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":669 * self.ob_mpi) ) * * def Alltoallv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * All to All Scatter/Gather Vector, send data from all to all */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Alltoallv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":682 * self.ob_mpi) ) * * def Alltoallw(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Generalized All-to-All communication allowing different */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_101Alltoallw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_100Alltoallw[] = "Comm.Alltoallw(self, sendbuf, recvbuf)\n\n Generalized All-to-All communication allowing different\n counts, displacements and datatypes for each partner\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_101Alltoallw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Alltoallw (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Alltoallw", 1, 2, 2, 1); __PYX_ERR(7, 682, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Alltoallw") < 0)) __PYX_ERR(7, 682, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Alltoallw", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 682, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Alltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_100Alltoallw(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_100Alltoallw(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Alltoallw", 0); /* "mpi4py/MPI/Comm.pyx":687 * counts, displacements and datatypes for each partner * """ * cdef _p_msg_ccow m = message_ccow() # <<<<<<<<<<<<<< * m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Alltoallw( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_ccow()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":688 * """ * cdef _p_msg_ccow m = message_ccow() * m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Alltoallw( * m.sbuf, m.scounts, m.sdispls, m.stypes, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_alltoallw(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 688, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":689 * cdef _p_msg_ccow m = message_ccow() * m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Alltoallw( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stypes, * m.rbuf, m.rcounts, m.rdispls, m.rtypes, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":692 * m.sbuf, m.scounts, m.sdispls, m.stypes, * m.rbuf, m.rcounts, m.rdispls, m.rtypes, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Alltoallw(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdispls, __pyx_v_m->stypes, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtypes, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 689, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":689 * cdef _p_msg_ccow m = message_ccow() * m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Alltoallw( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stypes, * m.rbuf, m.rcounts, m.rdispls, m.rtypes, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":682 * self.ob_mpi) ) * * def Alltoallw(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Generalized All-to-All communication allowing different */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Alltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":698 * # --------------------------- * * def Reduce(self, sendbuf, recvbuf, Op op=SUM, int root=0): # <<<<<<<<<<<<<< * """ * Reduce */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_103Reduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_102Reduce[] = "Comm.Reduce(self, sendbuf, recvbuf, Op op=SUM, int root=0)\n\n Reduce\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_103Reduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Reduce (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,&__pyx_n_s_root,0}; PyObject* values[4] = {0,0,0,0}; values[2] = (PyObject *)__pyx_k__57; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Reduce", 0, 2, 4, 1); __PYX_ERR(7, 698, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Reduce") < 0)) __PYX_ERR(7, 698, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); if (values[3]) { __pyx_v_root = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 698, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Reduce", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 698, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 698, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_102Reduce(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op, __pyx_v_root); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_102Reduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Reduce", 0); /* "mpi4py/MPI/Comm.pyx":702 * Reduce * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Reduce( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":703 * """ * cdef _p_msg_cco m = message_cco() * m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Reduce( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 703, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":704 * cdef _p_msg_cco m = message_cco() * m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Reduce( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, root, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":706 * with nogil: CHKERR( MPI_Reduce( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, root, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Allreduce(self, sendbuf, recvbuf, Op op=SUM): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Reduce(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_root, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 704, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":704 * cdef _p_msg_cco m = message_cco() * m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) * with nogil: CHKERR( MPI_Reduce( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, root, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":698 * # --------------------------- * * def Reduce(self, sendbuf, recvbuf, Op op=SUM, int root=0): # <<<<<<<<<<<<<< * """ * Reduce */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":708 * op.ob_mpi, root, self.ob_mpi) ) * * def Allreduce(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * All Reduce */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_105Allreduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_104Allreduce[] = "Comm.Allreduce(self, sendbuf, recvbuf, Op op=SUM)\n\n All Reduce\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_105Allreduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Allreduce (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)__pyx_k__58; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Allreduce", 0, 2, 3, 1); __PYX_ERR(7, 708, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Allreduce") < 0)) __PYX_ERR(7, 708, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Allreduce", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 708, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Allreduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 708, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_104Allreduce(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_104Allreduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Allreduce", 0); /* "mpi4py/MPI/Comm.pyx":712 * All Reduce * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Allreduce( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":713 * """ * cdef _p_msg_cco m = message_cco() * m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Allreduce( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allreduce(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 713, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":714 * cdef _p_msg_cco m = message_cco() * m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Allreduce( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":716 * with nogil: CHKERR( MPI_Allreduce( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Reduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Allreduce(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 714, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":714 * cdef _p_msg_cco m = message_cco() * m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Allreduce( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":708 * op.ob_mpi, root, self.ob_mpi) ) * * def Allreduce(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * All Reduce */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Allreduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":718 * op.ob_mpi, self.ob_mpi) ) * * def Reduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Reduce-Scatter Block (regular, non-vector version) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_107Reduce_scatter_block(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_106Reduce_scatter_block[] = "Comm.Reduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM)\n\n Reduce-Scatter Block (regular, non-vector version)\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_107Reduce_scatter_block(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Reduce_scatter_block (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)__pyx_k__59; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Reduce_scatter_block", 0, 2, 3, 1); __PYX_ERR(7, 718, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Reduce_scatter_block") < 0)) __PYX_ERR(7, 718, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Reduce_scatter_block", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 718, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Reduce_scatter_block", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 718, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_106Reduce_scatter_block(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_106Reduce_scatter_block(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Reduce_scatter_block", 0); /* "mpi4py/MPI/Comm.pyx":722 * Reduce-Scatter Block (regular, non-vector version) * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Reduce_scatter_block( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":723 * """ * cdef _p_msg_cco m = message_cco() * m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Reduce_scatter_block( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter_block(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 723, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":724 * cdef _p_msg_cco m = message_cco() * m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Reduce_scatter_block( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":726 * with nogil: CHKERR( MPI_Reduce_scatter_block( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Reduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Reduce_scatter_block(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 724, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":724 * cdef _p_msg_cco m = message_cco() * m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Reduce_scatter_block( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":718 * op.ob_mpi, self.ob_mpi) ) * * def Reduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Reduce-Scatter Block (regular, non-vector version) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Reduce_scatter_block", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":728 * op.ob_mpi, self.ob_mpi) ) * * def Reduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Reduce-Scatter (vector version) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_109Reduce_scatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_108Reduce_scatter[] = "Comm.Reduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM)\n\n Reduce-Scatter (vector version)\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_109Reduce_scatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_v_recvcounts = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Reduce_scatter (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_recvcounts,&__pyx_n_s_op,0}; PyObject* values[4] = {0,0,0,0}; values[2] = ((PyObject *)Py_None); values[3] = (PyObject *)__pyx_k__60; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Reduce_scatter", 0, 2, 4, 1); __PYX_ERR(7, 728, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvcounts); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Reduce_scatter") < 0)) __PYX_ERR(7, 728, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_recvcounts = values[2]; __pyx_v_op = ((struct PyMPIOpObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Reduce_scatter", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 728, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Reduce_scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 728, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_108Reduce_scatter(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_recvcounts, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_108Reduce_scatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, PyObject *__pyx_v_recvcounts, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Reduce_scatter", 0); /* "mpi4py/MPI/Comm.pyx":732 * Reduce-Scatter (vector version) * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_reduce_scatter(sendbuf, recvbuf, * recvcounts, self.ob_mpi) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":733 * """ * cdef _p_msg_cco m = message_cco() * m.for_reduce_scatter(sendbuf, recvbuf, # <<<<<<<<<<<<<< * recvcounts, self.ob_mpi) * with nogil: CHKERR( MPI_Reduce_scatter( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_recvcounts, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 733, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":735 * m.for_reduce_scatter(sendbuf, recvbuf, * recvcounts, self.ob_mpi) * with nogil: CHKERR( MPI_Reduce_scatter( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcounts, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":737 * with nogil: CHKERR( MPI_Reduce_scatter( * m.sbuf, m.rbuf, m.rcounts, m.rtype, * op.ob_mpi, self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Nonblocking Collectives */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Reduce_scatter(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 735, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":735 * m.for_reduce_scatter(sendbuf, recvbuf, * recvcounts, self.ob_mpi) * with nogil: CHKERR( MPI_Reduce_scatter( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcounts, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":728 * op.ob_mpi, self.ob_mpi) ) * * def Reduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Reduce-Scatter (vector version) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Reduce_scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":742 * # ----------------------- * * def Ibarrier(self): # <<<<<<<<<<<<<< * """ * Nonblocking Barrier */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_111Ibarrier(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_110Ibarrier[] = "Comm.Ibarrier(self)\n\n Nonblocking Barrier\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_111Ibarrier(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ibarrier (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Ibarrier", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Ibarrier", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_110Ibarrier(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_110Ibarrier(struct PyMPICommObject *__pyx_v_self) { struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Ibarrier", 0); /* "mpi4py/MPI/Comm.pyx":746 * Nonblocking Barrier * """ * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ibarrier(self.ob_mpi, &request.ob_mpi) ) * return request */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 746, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":747 * """ * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ibarrier(self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * return request * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ibarrier(__pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 747, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":748 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ibarrier(self.ob_mpi, &request.ob_mpi) ) * return request # <<<<<<<<<<<<<< * * def Ibcast(self, buf, int root=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":742 * # ----------------------- * * def Ibarrier(self): # <<<<<<<<<<<<<< * """ * Nonblocking Barrier */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ibarrier", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":750 * return request * * def Ibcast(self, buf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Broadcast */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_113Ibcast(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_112Ibcast[] = "Comm.Ibcast(self, buf, int root=0)\n\n Nonblocking Broadcast\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_113Ibcast(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ibcast (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_root,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ibcast") < 0)) __PYX_ERR(7, 750, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; if (values[1]) { __pyx_v_root = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 750, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ibcast", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 750, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ibcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_112Ibcast(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_112Ibcast(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ibcast", 0); /* "mpi4py/MPI/Comm.pyx":754 * Nonblocking Broadcast * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_bcast(buf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":755 * """ * cdef _p_msg_cco m = message_cco() * m.for_bcast(buf, root, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ibcast( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_bcast(__pyx_v_m, __pyx_v_buf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 755, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":756 * cdef _p_msg_cco m = message_cco() * m.for_bcast(buf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ibcast( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 756, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":757 * m.for_bcast(buf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ibcast( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * root, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":759 * with nogil: CHKERR( MPI_Ibcast( * m.sbuf, m.scount, m.stype, * root, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ibcast(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_root, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 757, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":757 * m.for_bcast(buf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ibcast( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * root, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":760 * m.sbuf, m.scount, m.stype, * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":761 * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Igather(self, sendbuf, recvbuf, int root=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":750 * return request * * def Ibcast(self, buf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Broadcast */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ibcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":763 * return request * * def Igather(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Gather */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_115Igather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_114Igather[] = "Comm.Igather(self, sendbuf, recvbuf, int root=0)\n\n Nonblocking Gather\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_115Igather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Igather (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Igather", 0, 2, 3, 1); __PYX_ERR(7, 763, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Igather") < 0)) __PYX_ERR(7, 763, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 763, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Igather", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 763, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Igather", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_114Igather(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_114Igather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Igather", 0); /* "mpi4py/MPI/Comm.pyx":767 * Nonblocking Gather * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":768 * """ * cdef _p_msg_cco m = message_cco() * m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Igather( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_gather(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 768, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":769 * cdef _p_msg_cco m = message_cco() * m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Igather( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 769, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":770 * m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Igather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":773 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * root, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Igather(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_root, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 770, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":770 * m.for_gather(0, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Igather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":774 * m.rbuf, m.rcount, m.rtype, * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":775 * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Igatherv(self, sendbuf, recvbuf, int root=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":763 * return request * * def Igather(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Gather */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Igather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":777 * return request * * def Igatherv(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Gather Vector */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_117Igatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_116Igatherv[] = "Comm.Igatherv(self, sendbuf, recvbuf, int root=0)\n\n Nonblocking Gather Vector\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_117Igatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Igatherv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Igatherv", 0, 2, 3, 1); __PYX_ERR(7, 777, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Igatherv") < 0)) __PYX_ERR(7, 777, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 777, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Igatherv", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 777, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Igatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_116Igatherv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_116Igatherv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Igatherv", 0); /* "mpi4py/MPI/Comm.pyx":781 * Nonblocking Gather Vector * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":782 * """ * cdef _p_msg_cco m = message_cco() * m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Igatherv( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_gather(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 782, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":783 * cdef _p_msg_cco m = message_cco() * m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Igatherv( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 783, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":784 * m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Igatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":787 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * root, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Igatherv(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_root, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 784, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":784 * m.for_gather(1, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Igatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":788 * m.rbuf, m.rcounts, m.rdispls, m.rtype, * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":789 * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iscatter(self, sendbuf, recvbuf, int root=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":777 * return request * * def Igatherv(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Gather Vector */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Igatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":791 * return request * * def Iscatter(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Scatter */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_119Iscatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_118Iscatter[] = "Comm.Iscatter(self, sendbuf, recvbuf, int root=0)\n\n Nonblocking Scatter\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_119Iscatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iscatter (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iscatter", 0, 2, 3, 1); __PYX_ERR(7, 791, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iscatter") < 0)) __PYX_ERR(7, 791, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 791, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iscatter", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 791, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Iscatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_118Iscatter(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_118Iscatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Iscatter", 0); /* "mpi4py/MPI/Comm.pyx":795 * Nonblocking Scatter * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":796 * """ * cdef _p_msg_cco m = message_cco() * m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iscatter( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scatter(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 796, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":797 * cdef _p_msg_cco m = message_cco() * m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Iscatter( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 797, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":798 * m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iscatter( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":801 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * root, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Iscatter(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_root, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 798, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":798 * m.for_scatter(0, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iscatter( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":802 * m.rbuf, m.rcount, m.rtype, * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":803 * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iscatterv(self, sendbuf, recvbuf, int root=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":791 * return request * * def Iscatter(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Scatter */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Iscatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":805 * return request * * def Iscatterv(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Scatter Vector */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_121Iscatterv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_120Iscatterv[] = "Comm.Iscatterv(self, sendbuf, recvbuf, int root=0)\n\n Nonblocking Scatter Vector\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_121Iscatterv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iscatterv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iscatterv", 0, 2, 3, 1); __PYX_ERR(7, 805, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iscatterv") < 0)) __PYX_ERR(7, 805, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 805, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iscatterv", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 805, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Iscatterv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_120Iscatterv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_120Iscatterv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Iscatterv", 0); /* "mpi4py/MPI/Comm.pyx":809 * Nonblocking Scatter Vector * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":810 * """ * cdef _p_msg_cco m = message_cco() * m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iscatterv( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scatter(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 810, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":811 * cdef _p_msg_cco m = message_cco() * m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Iscatterv( * m.sbuf, m.scounts, m.sdispls, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 811, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":812 * m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iscatterv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":815 * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcount, m.rtype, * root, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Iscatterv(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdispls, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_root, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 812, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":812 * m.for_scatter(1, sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iscatterv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":816 * m.rbuf, m.rcount, m.rtype, * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":817 * root, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iallgather(self, sendbuf, recvbuf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":805 * return request * * def Iscatterv(self, sendbuf, recvbuf, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Scatter Vector */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Iscatterv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":819 * return request * * def Iallgather(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Gather to All */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_123Iallgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_122Iallgather[] = "Comm.Iallgather(self, sendbuf, recvbuf)\n\n Nonblocking Gather to All\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_123Iallgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iallgather (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iallgather", 1, 2, 2, 1); __PYX_ERR(7, 819, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iallgather") < 0)) __PYX_ERR(7, 819, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iallgather", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 819, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Iallgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_122Iallgather(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_122Iallgather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Iallgather", 0); /* "mpi4py/MPI/Comm.pyx":823 * Nonblocking Gather to All * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":824 * """ * cdef _p_msg_cco m = message_cco() * m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iallgather( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allgather(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 824, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":825 * cdef _p_msg_cco m = message_cco() * m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Iallgather( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 825, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":826 * m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iallgather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":829 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Iallgather(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 826, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":826 * m.for_allgather(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iallgather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":830 * m.rbuf, m.rcount, m.rtype, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":831 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iallgatherv(self, sendbuf, recvbuf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":819 * return request * * def Iallgather(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Gather to All */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Iallgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":833 * return request * * def Iallgatherv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Gather to All Vector */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_125Iallgatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_124Iallgatherv[] = "Comm.Iallgatherv(self, sendbuf, recvbuf)\n\n Nonblocking Gather to All Vector\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_125Iallgatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iallgatherv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iallgatherv", 1, 2, 2, 1); __PYX_ERR(7, 833, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iallgatherv") < 0)) __PYX_ERR(7, 833, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iallgatherv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 833, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Iallgatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_124Iallgatherv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_124Iallgatherv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Iallgatherv", 0); /* "mpi4py/MPI/Comm.pyx":837 * Nonblocking Gather to All Vector * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":838 * """ * cdef _p_msg_cco m = message_cco() * m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iallgatherv( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allgather(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 838, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":839 * cdef _p_msg_cco m = message_cco() * m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Iallgatherv( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 839, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":840 * m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iallgatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":843 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * return request * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Iallgatherv(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 840, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":840 * m.for_allgather(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iallgatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":844 * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi, &request.ob_mpi) ) * return request # <<<<<<<<<<<<<< * * def Ialltoall(self, sendbuf, recvbuf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":833 * return request * * def Iallgatherv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Gather to All Vector */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Iallgatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":846 * return request * * def Ialltoall(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking All to All Scatter/Gather */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_127Ialltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_126Ialltoall[] = "Comm.Ialltoall(self, sendbuf, recvbuf)\n\n Nonblocking All to All Scatter/Gather\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_127Ialltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ialltoall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ialltoall", 1, 2, 2, 1); __PYX_ERR(7, 846, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ialltoall") < 0)) __PYX_ERR(7, 846, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ialltoall", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 846, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ialltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_126Ialltoall(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_126Ialltoall(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ialltoall", 0); /* "mpi4py/MPI/Comm.pyx":850 * Nonblocking All to All Scatter/Gather * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":851 * """ * cdef _p_msg_cco m = message_cco() * m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ialltoall( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_alltoall(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 851, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":852 * cdef _p_msg_cco m = message_cco() * m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ialltoall( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 852, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":853 * m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ialltoall( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":856 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ialltoall(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 853, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":853 * m.for_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ialltoall( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":857 * m.rbuf, m.rcount, m.rtype, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":858 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Ialltoallv(self, sendbuf, recvbuf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":846 * return request * * def Ialltoall(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking All to All Scatter/Gather */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ialltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":860 * return request * * def Ialltoallv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking All to All Scatter/Gather Vector */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_129Ialltoallv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_128Ialltoallv[] = "Comm.Ialltoallv(self, sendbuf, recvbuf)\n\n Nonblocking All to All Scatter/Gather Vector\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_129Ialltoallv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ialltoallv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ialltoallv", 1, 2, 2, 1); __PYX_ERR(7, 860, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ialltoallv") < 0)) __PYX_ERR(7, 860, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ialltoallv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 860, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ialltoallv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_128Ialltoallv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_128Ialltoallv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ialltoallv", 0); /* "mpi4py/MPI/Comm.pyx":864 * Nonblocking All to All Scatter/Gather Vector * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":865 * """ * cdef _p_msg_cco m = message_cco() * m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ialltoallv( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_alltoall(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 865, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":866 * cdef _p_msg_cco m = message_cco() * m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ialltoallv( * m.sbuf, m.scounts, m.sdispls, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 866, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":867 * m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ialltoallv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":870 * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ialltoallv(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdispls, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 867, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":867 * m.for_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ialltoallv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":871 * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":872 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Ialltoallw(self, sendbuf, recvbuf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":860 * return request * * def Ialltoallv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking All to All Scatter/Gather Vector */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ialltoallv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":874 * return request * * def Ialltoallw(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Generalized All-to-All */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_131Ialltoallw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_130Ialltoallw[] = "Comm.Ialltoallw(self, sendbuf, recvbuf)\n\n Nonblocking Generalized All-to-All\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_131Ialltoallw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ialltoallw (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ialltoallw", 1, 2, 2, 1); __PYX_ERR(7, 874, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ialltoallw") < 0)) __PYX_ERR(7, 874, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ialltoallw", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 874, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ialltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_130Ialltoallw(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_130Ialltoallw(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ialltoallw", 0); /* "mpi4py/MPI/Comm.pyx":878 * Nonblocking Generalized All-to-All * """ * cdef _p_msg_ccow m = message_ccow() # <<<<<<<<<<<<<< * m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_ccow()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":879 * """ * cdef _p_msg_ccow m = message_ccow() * m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ialltoallw( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_alltoallw(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 879, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":880 * cdef _p_msg_ccow m = message_ccow() * m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ialltoallw( * m.sbuf, m.scounts, m.sdispls, m.stypes, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 880, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":881 * m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ialltoallw( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stypes, * m.rbuf, m.rcounts, m.rdispls, m.rtypes, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":884 * m.sbuf, m.scounts, m.sdispls, m.stypes, * m.rbuf, m.rcounts, m.rdispls, m.rtypes, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ialltoallw(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdispls, __pyx_v_m->stypes, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtypes, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 881, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":881 * m.for_alltoallw(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ialltoallw( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stypes, * m.rbuf, m.rcounts, m.rdispls, m.rtypes, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":885 * m.rbuf, m.rcounts, m.rdispls, m.rtypes, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":886 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Ireduce(self, sendbuf, recvbuf, Op op=SUM, int root=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":874 * return request * * def Ialltoallw(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Generalized All-to-All */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ialltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":888 * return request * * def Ireduce(self, sendbuf, recvbuf, Op op=SUM, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Reduce */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_133Ireduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_132Ireduce[] = "Comm.Ireduce(self, sendbuf, recvbuf, Op op=SUM, int root=0)\n\n Nonblocking Reduce\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_133Ireduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ireduce (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,&__pyx_n_s_root,0}; PyObject* values[4] = {0,0,0,0}; values[2] = (PyObject *)__pyx_k__61; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ireduce", 0, 2, 4, 1); __PYX_ERR(7, 888, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ireduce") < 0)) __PYX_ERR(7, 888, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); if (values[3]) { __pyx_v_root = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 888, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ireduce", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 888, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ireduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 888, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_132Ireduce(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op, __pyx_v_root); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_132Ireduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op, int __pyx_v_root) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ireduce", 0); /* "mpi4py/MPI/Comm.pyx":892 * Nonblocking Reduce * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":893 * """ * cdef _p_msg_cco m = message_cco() * m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ireduce( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_root, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 893, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":894 * cdef _p_msg_cco m = message_cco() * m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ireduce( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 894, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":895 * m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ireduce( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, root, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":897 * with nogil: CHKERR( MPI_Ireduce( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, root, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * return request * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ireduce(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_root, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 895, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":895 * m.for_reduce(sendbuf, recvbuf, root, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ireduce( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, root, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":898 * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, root, self.ob_mpi, &request.ob_mpi) ) * return request # <<<<<<<<<<<<<< * * def Iallreduce(self, sendbuf, recvbuf, Op op=SUM): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":888 * return request * * def Ireduce(self, sendbuf, recvbuf, Op op=SUM, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Reduce */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ireduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":900 * return request * * def Iallreduce(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Nonblocking All Reduce */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_135Iallreduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_134Iallreduce[] = "Comm.Iallreduce(self, sendbuf, recvbuf, Op op=SUM)\n\n Nonblocking All Reduce\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_135Iallreduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iallreduce (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)__pyx_k__62; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iallreduce", 0, 2, 3, 1); __PYX_ERR(7, 900, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iallreduce") < 0)) __PYX_ERR(7, 900, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iallreduce", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 900, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Iallreduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 900, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_134Iallreduce(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_134Iallreduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Iallreduce", 0); /* "mpi4py/MPI/Comm.pyx":904 * Nonblocking All Reduce * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":905 * """ * cdef _p_msg_cco m = message_cco() * m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iallreduce( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allreduce(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 905, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":906 * cdef _p_msg_cco m = message_cco() * m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Iallreduce( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 906, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":907 * m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iallreduce( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":909 * with nogil: CHKERR( MPI_Iallreduce( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * return request * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Iallreduce(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 907, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":907 * m.for_allreduce(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iallreduce( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":910 * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) * return request # <<<<<<<<<<<<<< * * def Ireduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":900 * return request * * def Iallreduce(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Nonblocking All Reduce */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Iallreduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":912 * return request * * def Ireduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Nonblocking Reduce-Scatter Block (regular, non-vector version) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_137Ireduce_scatter_block(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_136Ireduce_scatter_block[] = "Comm.Ireduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM)\n\n Nonblocking Reduce-Scatter Block (regular, non-vector version)\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_137Ireduce_scatter_block(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ireduce_scatter_block (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)__pyx_k__63; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ireduce_scatter_block", 0, 2, 3, 1); __PYX_ERR(7, 912, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ireduce_scatter_block") < 0)) __PYX_ERR(7, 912, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ireduce_scatter_block", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 912, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ireduce_scatter_block", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 912, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_136Ireduce_scatter_block(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_136Ireduce_scatter_block(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ireduce_scatter_block", 0); /* "mpi4py/MPI/Comm.pyx":916 * Nonblocking Reduce-Scatter Block (regular, non-vector version) * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":917 * """ * cdef _p_msg_cco m = message_cco() * m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ireduce_scatter_block( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter_block(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 917, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":918 * cdef _p_msg_cco m = message_cco() * m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ireduce_scatter_block( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 918, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":919 * m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ireduce_scatter_block( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":921 * with nogil: CHKERR( MPI_Ireduce_scatter_block( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * return request * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ireduce_scatter_block(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 919, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":919 * m.for_reduce_scatter_block(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ireduce_scatter_block( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":922 * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) * return request # <<<<<<<<<<<<<< * * def Ireduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":912 * return request * * def Ireduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Nonblocking Reduce-Scatter Block (regular, non-vector version) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ireduce_scatter_block", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":924 * return request * * def Ireduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Nonblocking Reduce-Scatter (vector version) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_139Ireduce_scatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_138Ireduce_scatter[] = "Comm.Ireduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM)\n\n Nonblocking Reduce-Scatter (vector version)\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_139Ireduce_scatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_v_recvcounts = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ireduce_scatter (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_recvcounts,&__pyx_n_s_op,0}; PyObject* values[4] = {0,0,0,0}; values[2] = ((PyObject *)Py_None); values[3] = (PyObject *)__pyx_k__64; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ireduce_scatter", 0, 2, 4, 1); __PYX_ERR(7, 924, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvcounts); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ireduce_scatter") < 0)) __PYX_ERR(7, 924, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_recvcounts = values[2]; __pyx_v_op = ((struct PyMPIOpObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ireduce_scatter", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 924, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Ireduce_scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 924, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_138Ireduce_scatter(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_recvcounts, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_138Ireduce_scatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, PyObject *__pyx_v_recvcounts, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ireduce_scatter", 0); /* "mpi4py/MPI/Comm.pyx":928 * Nonblocking Reduce-Scatter (vector version) * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_reduce_scatter(sendbuf, recvbuf, * recvcounts, self.ob_mpi) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":929 * """ * cdef _p_msg_cco m = message_cco() * m.for_reduce_scatter(sendbuf, recvbuf, # <<<<<<<<<<<<<< * recvcounts, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_recvcounts, __pyx_v_self->ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 929, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":931 * m.for_reduce_scatter(sendbuf, recvbuf, * recvcounts, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ireduce_scatter( * m.sbuf, m.rbuf, m.rcounts, m.rtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 931, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":932 * recvcounts, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ireduce_scatter( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcounts, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":934 * with nogil: CHKERR( MPI_Ireduce_scatter( * m.sbuf, m.rbuf, m.rcounts, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * return request * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ireduce_scatter(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 932, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":932 * recvcounts, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ireduce_scatter( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcounts, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":935 * m.sbuf, m.rbuf, m.rcounts, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) * return request # <<<<<<<<<<<<<< * * # Tests */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":924 * return request * * def Ireduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Nonblocking Reduce-Scatter (vector version) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Ireduce_scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":940 * # ----- * * def Is_inter(self): # <<<<<<<<<<<<<< * """ * Test to see if a comm is an intercommunicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_141Is_inter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_140Is_inter[] = "Comm.Is_inter(self)\n\n Test to see if a comm is an intercommunicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_141Is_inter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Is_inter (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Is_inter", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Is_inter", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_140Is_inter(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_140Is_inter(struct PyMPICommObject *__pyx_v_self) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Is_inter", 0); /* "mpi4py/MPI/Comm.pyx":944 * Test to see if a comm is an intercommunicator * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &flag) ) * return flag */ __pyx_v_flag = 0; /* "mpi4py/MPI/Comm.pyx":945 * """ * cdef int flag = 0 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &flag) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_self->ob_mpi, (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 945, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":946 * cdef int flag = 0 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &flag) ) * return flag # <<<<<<<<<<<<<< * * property is_inter: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":940 * # ----- * * def Is_inter(self): # <<<<<<<<<<<<<< * """ * Test to see if a comm is an intercommunicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Is_inter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":950 * property is_inter: * """is intercommunicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Is_inter() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_8is_inter_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_8is_inter_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_8is_inter___get__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_8is_inter___get__(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":951 * """is intercommunicator""" * def __get__(self): * return self.Is_inter() # <<<<<<<<<<<<<< * * def Is_intra(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Is_inter); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":950 * property is_inter: * """is intercommunicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Is_inter() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.is_inter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":953 * return self.Is_inter() * * def Is_intra(self): # <<<<<<<<<<<<<< * """ * Test to see if a comm is an intracommunicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_143Is_intra(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_142Is_intra[] = "Comm.Is_intra(self)\n\n Test to see if a comm is an intracommunicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_143Is_intra(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Is_intra (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Is_intra", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Is_intra", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_142Is_intra(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_142Is_intra(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("Is_intra", 0); /* "mpi4py/MPI/Comm.pyx":957 * Test to see if a comm is an intracommunicator * """ * return not self.Is_inter() # <<<<<<<<<<<<<< * * property is_intra: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Is_inter); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(7, 957, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":953 * return self.Is_inter() * * def Is_intra(self): # <<<<<<<<<<<<<< * """ * Test to see if a comm is an intracommunicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.Is_intra", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":961 * property is_intra: * """is intracommunicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Is_intra() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_8is_intra_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_8is_intra_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_8is_intra___get__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_8is_intra___get__(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":962 * """is intracommunicator""" * def __get__(self): * return self.Is_intra() # <<<<<<<<<<<<<< * * def Get_topology(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Is_intra); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":961 * property is_intra: * """is intracommunicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Is_intra() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.is_intra.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":964 * return self.Is_intra() * * def Get_topology(self): # <<<<<<<<<<<<<< * """ * Determine the type of topology (if any) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_145Get_topology(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_144Get_topology[] = "Comm.Get_topology(self)\n\n Determine the type of topology (if any)\n associated with a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_145Get_topology(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_topology (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_topology", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_topology", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_144Get_topology(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_144Get_topology(struct PyMPICommObject *__pyx_v_self) { int __pyx_v_topo; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_topology", 0); /* "mpi4py/MPI/Comm.pyx":969 * associated with a communicator * """ * cdef int topo = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * return topo */ __pyx_v_topo = MPI_UNDEFINED; /* "mpi4py/MPI/Comm.pyx":970 * """ * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) # <<<<<<<<<<<<<< * return topo * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Topo_test(__pyx_v_self->ob_mpi, (&__pyx_v_topo))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 970, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":971 * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * return topo # <<<<<<<<<<<<<< * * property topology: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_topo); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":964 * return self.Is_intra() * * def Get_topology(self): # <<<<<<<<<<<<<< * """ * Determine the type of topology (if any) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_topology", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":975 * property topology: * """communicator topology type""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topology() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_8topology_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_8topology_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_8topology___get__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_8topology___get__(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":976 * """communicator topology type""" * def __get__(self): * return self.Get_topology() # <<<<<<<<<<<<<< * * property is_topo: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_topology); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":975 * property topology: * """communicator topology type""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topology() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.topology.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":980 * property is_topo: * """is a topology communicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topology() != MPI_UNDEFINED * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_7is_topo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_7is_topo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_7is_topo___get__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_7is_topo___get__(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":981 * """is a topology communicator""" * def __get__(self): * return self.Get_topology() != MPI_UNDEFINED # <<<<<<<<<<<<<< * * # Process Creation and Management */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_topology); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_int(MPI_UNDEFINED); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":980 * property is_topo: * """is a topology communicator""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topology() != MPI_UNDEFINED * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.is_topo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":987 * * @classmethod * def Get_parent(cls): # <<<<<<<<<<<<<< * """ * Return the parent intercommunicator for this process */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_147Get_parent(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_146Get_parent[] = "Comm.Get_parent(type cls)\n\n Return the parent intercommunicator for this process\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_147Get_parent(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_parent (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_parent", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_parent", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_146Get_parent(((PyTypeObject*)__pyx_v_cls)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_146Get_parent(CYTHON_UNUSED PyTypeObject *__pyx_v_cls) { struct PyMPIIntercommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Get_parent", 0); /* "mpi4py/MPI/Comm.pyx":991 * Return the parent intercommunicator for this process * """ * cdef Intercomm comm = __COMM_PARENT__ # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_get_parent(&comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ __Pyx_INCREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_PARENT__)); __pyx_v_comm = __pyx_v_6mpi4py_3MPI___COMM_PARENT__; /* "mpi4py/MPI/Comm.pyx":992 * """ * cdef Intercomm comm = __COMM_PARENT__ * with nogil: CHKERR( MPI_Comm_get_parent(&comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_get_parent((&__pyx_v_comm->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 992, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":993 * cdef Intercomm comm = __COMM_PARENT__ * with nogil: CHKERR( MPI_Comm_get_parent(&comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.ob_mpi); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 993, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":994 * with nogil: CHKERR( MPI_Comm_get_parent(&comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Disconnect(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":987 * * @classmethod * def Get_parent(cls): # <<<<<<<<<<<<<< * """ * Return the parent intercommunicator for this process */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_parent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":996 * return comm * * def Disconnect(self): # <<<<<<<<<<<<<< * """ * Disconnect from a communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_149Disconnect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_148Disconnect[] = "Comm.Disconnect(self)\n\n Disconnect from a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_149Disconnect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Disconnect (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Disconnect", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Disconnect", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_148Disconnect(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_148Disconnect(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Disconnect", 0); /* "mpi4py/MPI/Comm.pyx":1000 * Disconnect from a communicator * """ * with nogil: CHKERR( MPI_Comm_disconnect(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * @classmethod */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_disconnect((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1000, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":996 * return comm * * def Disconnect(self): # <<<<<<<<<<<<<< * """ * Disconnect from a communicator */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Disconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1003 * * @classmethod * def Join(cls, int fd): # <<<<<<<<<<<<<< * """ * Create a intercommunicator by joining */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_151Join(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_150Join[] = "Comm.Join(type cls, int fd)\n\n Create a intercommunicator by joining\n two processes connected by a socket\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_151Join(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_fd; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Join (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fd,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fd)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Join") < 0)) __PYX_ERR(7, 1003, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_fd = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_fd == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1003, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Join", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1003, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Join", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_150Join(((PyTypeObject*)__pyx_v_cls), __pyx_v_fd); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_150Join(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_fd) { struct PyMPIIntercommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Join", 0); /* "mpi4py/MPI/Comm.pyx":1008 * two processes connected by a socket * """ * cdef Intercomm comm = Intercomm.__new__(Intercomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_join(fd, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Intercomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1008, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPIIntercommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1009 * """ * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_join(fd, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_join(__pyx_v_fd, (&__pyx_v_comm->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 1009, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1010 * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_join(fd, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 1010, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1011 * with nogil: CHKERR( MPI_Comm_join(fd, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * # Attributes */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1003 * * @classmethod * def Join(cls, int fd): # <<<<<<<<<<<<<< * """ * Create a intercommunicator by joining */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Join", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1016 * # ---------- * * def Get_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Retrieve attribute value by key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_153Get_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_152Get_attr[] = "Comm.Get_attr(self, int keyval)\n\n Retrieve attribute value by key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_153Get_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_attr") < 0)) __PYX_ERR(7, 1016, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1016, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_attr", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1016, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_152Get_attr(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_keyval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_152Get_attr(struct PyMPICommObject *__pyx_v_self, int __pyx_v_keyval) { void *__pyx_v_attrval; int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Get_attr", 0); /* "mpi4py/MPI/Comm.pyx":1020 * Retrieve attribute value by key * """ * cdef void *attrval = NULL # <<<<<<<<<<<<<< * cdef int flag = 0 * CHKERR( MPI_Comm_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) */ __pyx_v_attrval = NULL; /* "mpi4py/MPI/Comm.pyx":1021 * """ * cdef void *attrval = NULL * cdef int flag = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) * if not flag: return None */ __pyx_v_flag = 0; /* "mpi4py/MPI/Comm.pyx":1022 * cdef void *attrval = NULL * cdef int flag = 0 * CHKERR( MPI_Comm_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) # <<<<<<<<<<<<<< * if not flag: return None * if attrval == NULL: return 0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_get_attr(__pyx_v_self->ob_mpi, __pyx_v_keyval, (&__pyx_v_attrval), (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1022, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1023 * cdef int flag = 0 * CHKERR( MPI_Comm_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) * if not flag: return None # <<<<<<<<<<<<<< * if attrval == NULL: return 0 * # MPI-1 predefined attribute keyvals */ __pyx_t_2 = ((!(__pyx_v_flag != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":1024 * CHKERR( MPI_Comm_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) * if not flag: return None * if attrval == NULL: return 0 # <<<<<<<<<<<<<< * # MPI-1 predefined attribute keyvals * if (keyval == MPI_TAG_UB or */ __pyx_t_2 = ((__pyx_v_attrval == NULL) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":1026 * if attrval == NULL: return 0 * # MPI-1 predefined attribute keyvals * if (keyval == MPI_TAG_UB or # <<<<<<<<<<<<<< * keyval == MPI_HOST or * keyval == MPI_IO or */ __pyx_t_3 = ((__pyx_v_keyval == MPI_TAG_UB) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } /* "mpi4py/MPI/Comm.pyx":1027 * # MPI-1 predefined attribute keyvals * if (keyval == MPI_TAG_UB or * keyval == MPI_HOST or # <<<<<<<<<<<<<< * keyval == MPI_IO or * keyval == MPI_WTIME_IS_GLOBAL): */ __pyx_t_3 = ((__pyx_v_keyval == MPI_HOST) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } /* "mpi4py/MPI/Comm.pyx":1028 * if (keyval == MPI_TAG_UB or * keyval == MPI_HOST or * keyval == MPI_IO or # <<<<<<<<<<<<<< * keyval == MPI_WTIME_IS_GLOBAL): * return (attrval)[0] */ __pyx_t_3 = ((__pyx_v_keyval == MPI_IO) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } /* "mpi4py/MPI/Comm.pyx":1029 * keyval == MPI_HOST or * keyval == MPI_IO or * keyval == MPI_WTIME_IS_GLOBAL): # <<<<<<<<<<<<<< * return (attrval)[0] * # MPI-2 predefined attribute keyvals */ __pyx_t_3 = ((__pyx_v_keyval == MPI_WTIME_IS_GLOBAL) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L6_bool_binop_done:; /* "mpi4py/MPI/Comm.pyx":1026 * if attrval == NULL: return 0 * # MPI-1 predefined attribute keyvals * if (keyval == MPI_TAG_UB or # <<<<<<<<<<<<<< * keyval == MPI_HOST or * keyval == MPI_IO or */ if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1030 * keyval == MPI_IO or * keyval == MPI_WTIME_IS_GLOBAL): * return (attrval)[0] # <<<<<<<<<<<<<< * # MPI-2 predefined attribute keyvals * elif (keyval == MPI_UNIVERSE_SIZE or */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int((((int *)__pyx_v_attrval)[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1026 * if attrval == NULL: return 0 * # MPI-1 predefined attribute keyvals * if (keyval == MPI_TAG_UB or # <<<<<<<<<<<<<< * keyval == MPI_HOST or * keyval == MPI_IO or */ } /* "mpi4py/MPI/Comm.pyx":1032 * return (attrval)[0] * # MPI-2 predefined attribute keyvals * elif (keyval == MPI_UNIVERSE_SIZE or # <<<<<<<<<<<<<< * keyval == MPI_APPNUM or * keyval == MPI_LASTUSEDCODE): */ __pyx_t_3 = ((__pyx_v_keyval == MPI_UNIVERSE_SIZE) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L10_bool_binop_done; } /* "mpi4py/MPI/Comm.pyx":1033 * # MPI-2 predefined attribute keyvals * elif (keyval == MPI_UNIVERSE_SIZE or * keyval == MPI_APPNUM or # <<<<<<<<<<<<<< * keyval == MPI_LASTUSEDCODE): * return (attrval)[0] */ __pyx_t_3 = ((__pyx_v_keyval == MPI_APPNUM) != 0); if (!__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L10_bool_binop_done; } /* "mpi4py/MPI/Comm.pyx":1034 * elif (keyval == MPI_UNIVERSE_SIZE or * keyval == MPI_APPNUM or * keyval == MPI_LASTUSEDCODE): # <<<<<<<<<<<<<< * return (attrval)[0] * # user-defined attribute keyval */ __pyx_t_3 = ((__pyx_v_keyval == MPI_LASTUSEDCODE) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L10_bool_binop_done:; /* "mpi4py/MPI/Comm.pyx":1032 * return (attrval)[0] * # MPI-2 predefined attribute keyvals * elif (keyval == MPI_UNIVERSE_SIZE or # <<<<<<<<<<<<<< * keyval == MPI_APPNUM or * keyval == MPI_LASTUSEDCODE): */ if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1035 * keyval == MPI_APPNUM or * keyval == MPI_LASTUSEDCODE): * return (attrval)[0] # <<<<<<<<<<<<<< * # user-defined attribute keyval * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int((((int *)__pyx_v_attrval)[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1032 * return (attrval)[0] * # MPI-2 predefined attribute keyvals * elif (keyval == MPI_UNIVERSE_SIZE or # <<<<<<<<<<<<<< * keyval == MPI_APPNUM or * keyval == MPI_LASTUSEDCODE): */ } /* "mpi4py/MPI/Comm.pyx":1037 * return (attrval)[0] * # user-defined attribute keyval * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) # <<<<<<<<<<<<<< * * def Set_attr(self, int keyval, object attrval): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_get(__pyx_v_self->ob_mpi, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1016 * # ---------- * * def Get_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Retrieve attribute value by key */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1039 * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) * * def Set_attr(self, int keyval, object attrval): # <<<<<<<<<<<<<< * """ * Store attribute value associated with a key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_155Set_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_154Set_attr[] = "Comm.Set_attr(self, int keyval, attrval)\n\n Store attribute value associated with a key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_155Set_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_v_attrval = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,&__pyx_n_s_attrval,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrval)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Set_attr", 1, 2, 2, 1); __PYX_ERR(7, 1039, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_attr") < 0)) __PYX_ERR(7, 1039, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1039, __pyx_L3_error) __pyx_v_attrval = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_attr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1039, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Set_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_154Set_attr(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_keyval, __pyx_v_attrval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_154Set_attr(struct PyMPICommObject *__pyx_v_self, int __pyx_v_keyval, PyObject *__pyx_v_attrval) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_attr", 0); /* "mpi4py/MPI/Comm.pyx":1043 * Store attribute value associated with a key * """ * PyMPI_attr_set(self.ob_mpi, keyval, attrval) # <<<<<<<<<<<<<< * * def Delete_attr(self, int keyval): */ __pyx_t_1 = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_set(__pyx_v_self->ob_mpi, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1043, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1039 * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) * * def Set_attr(self, int keyval, object attrval): # <<<<<<<<<<<<<< * """ * Store attribute value associated with a key */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Set_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1045 * PyMPI_attr_set(self.ob_mpi, keyval, attrval) * * def Delete_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Delete attribute value associated with a key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_157Delete_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_156Delete_attr[] = "Comm.Delete_attr(self, int keyval)\n\n Delete attribute value associated with a key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_157Delete_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Delete_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Delete_attr") < 0)) __PYX_ERR(7, 1045, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1045, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Delete_attr", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1045, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Delete_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_156Delete_attr(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_keyval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_156Delete_attr(struct PyMPICommObject *__pyx_v_self, int __pyx_v_keyval) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Delete_attr", 0); /* "mpi4py/MPI/Comm.pyx":1049 * Delete attribute value associated with a key * """ * CHKERR( MPI_Comm_delete_attr(self.ob_mpi, keyval) ) # <<<<<<<<<<<<<< * * @classmethod */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_delete_attr(__pyx_v_self->ob_mpi, __pyx_v_keyval)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1049, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1045 * PyMPI_attr_set(self.ob_mpi, keyval, attrval) * * def Delete_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Delete attribute value associated with a key */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Delete_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1052 * * @classmethod * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): # <<<<<<<<<<<<<< * """ * Create a new attribute key for communicators */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_159Create_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_158Create_keyval[] = "Comm.Create_keyval(type cls, copy_fn=None, delete_fn=None, nopython=False)\n\n Create a new attribute key for communicators\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_159Create_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_copy_fn = 0; PyObject *__pyx_v_delete_fn = 0; PyObject *__pyx_v_nopython = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_keyval (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_copy_fn,&__pyx_n_s_delete_fn,&__pyx_n_s_nopython,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_copy_fn); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delete_fn); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nopython); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_keyval") < 0)) __PYX_ERR(7, 1052, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_copy_fn = values[0]; __pyx_v_delete_fn = values[1]; __pyx_v_nopython = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_keyval", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1052, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Create_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_158Create_keyval(((PyTypeObject*)__pyx_v_cls), __pyx_v_copy_fn, __pyx_v_delete_fn, __pyx_v_nopython); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_158Create_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_copy_fn, PyObject *__pyx_v_delete_fn, PyObject *__pyx_v_nopython) { PyObject *__pyx_v_state = 0; int __pyx_v_keyval; MPI_Comm_copy_attr_function *__pyx_v__copy; MPI_Comm_delete_attr_function *__pyx_v__del; void *__pyx_v_extra_state; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_keyval", 0); /* "mpi4py/MPI/Comm.pyx":1056 * Create a new attribute key for communicators * """ * cdef object state = _p_keyval(copy_fn, delete_fn, nopython) # <<<<<<<<<<<<<< * cdef int keyval = MPI_KEYVAL_INVALID * cdef MPI_Comm_copy_attr_function *_copy = PyMPI_attr_copy_fn */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_copy_fn); __Pyx_GIVEREF(__pyx_v_copy_fn); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_copy_fn); __Pyx_INCREF(__pyx_v_delete_fn); __Pyx_GIVEREF(__pyx_v_delete_fn); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_delete_fn); __Pyx_INCREF(__pyx_v_nopython); __Pyx_GIVEREF(__pyx_v_nopython); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nopython); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6mpi4py_3MPI__p_keyval), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_state = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1057 * """ * cdef object state = _p_keyval(copy_fn, delete_fn, nopython) * cdef int keyval = MPI_KEYVAL_INVALID # <<<<<<<<<<<<<< * cdef MPI_Comm_copy_attr_function *_copy = PyMPI_attr_copy_fn * cdef MPI_Comm_delete_attr_function *_del = PyMPI_attr_delete_fn */ __pyx_v_keyval = MPI_KEYVAL_INVALID; /* "mpi4py/MPI/Comm.pyx":1058 * cdef object state = _p_keyval(copy_fn, delete_fn, nopython) * cdef int keyval = MPI_KEYVAL_INVALID * cdef MPI_Comm_copy_attr_function *_copy = PyMPI_attr_copy_fn # <<<<<<<<<<<<<< * cdef MPI_Comm_delete_attr_function *_del = PyMPI_attr_delete_fn * cdef void *extra_state = state */ __pyx_v__copy = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_fn; /* "mpi4py/MPI/Comm.pyx":1059 * cdef int keyval = MPI_KEYVAL_INVALID * cdef MPI_Comm_copy_attr_function *_copy = PyMPI_attr_copy_fn * cdef MPI_Comm_delete_attr_function *_del = PyMPI_attr_delete_fn # <<<<<<<<<<<<<< * cdef void *extra_state = state * CHKERR( MPI_Comm_create_keyval(_copy, _del, &keyval, extra_state) ) */ __pyx_v__del = __pyx_fuse_1__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_fn; /* "mpi4py/MPI/Comm.pyx":1060 * cdef MPI_Comm_copy_attr_function *_copy = PyMPI_attr_copy_fn * cdef MPI_Comm_delete_attr_function *_del = PyMPI_attr_delete_fn * cdef void *extra_state = state # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_create_keyval(_copy, _del, &keyval, extra_state) ) * comm_keyval[keyval] = state */ __pyx_v_extra_state = ((void *)__pyx_v_state); /* "mpi4py/MPI/Comm.pyx":1061 * cdef MPI_Comm_delete_attr_function *_del = PyMPI_attr_delete_fn * cdef void *extra_state = state * CHKERR( MPI_Comm_create_keyval(_copy, _del, &keyval, extra_state) ) # <<<<<<<<<<<<<< * comm_keyval[keyval] = state * return keyval */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_create_keyval(__pyx_v__copy, __pyx_v__del, (&__pyx_v_keyval), __pyx_v_extra_state)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 1061, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1062 * cdef void *extra_state = state * CHKERR( MPI_Comm_create_keyval(_copy, _del, &keyval, extra_state) ) * comm_keyval[keyval] = state # <<<<<<<<<<<<<< * return keyval * */ if (unlikely(__pyx_v_6mpi4py_3MPI_comm_keyval == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(7, 1062, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyDict_SetItem(__pyx_v_6mpi4py_3MPI_comm_keyval, __pyx_t_2, __pyx_v_state) < 0)) __PYX_ERR(7, 1062, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1063 * CHKERR( MPI_Comm_create_keyval(_copy, _del, &keyval, extra_state) ) * comm_keyval[keyval] = state * return keyval # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1052 * * @classmethod * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): # <<<<<<<<<<<<<< * """ * Create a new attribute key for communicators */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Create_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1066 * * @classmethod * def Free_keyval(cls, int keyval): # <<<<<<<<<<<<<< * """ * Free and attribute key for communicators */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_161Free_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_160Free_keyval[] = "Comm.Free_keyval(type cls, int keyval)\n\n Free and attribute key for communicators\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_161Free_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free_keyval (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Free_keyval") < 0)) __PYX_ERR(7, 1066, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1066, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Free_keyval", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1066, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Free_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_160Free_keyval(((PyTypeObject*)__pyx_v_cls), __pyx_v_keyval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_160Free_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_keyval) { int __pyx_v_keyval_save; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("Free_keyval", 0); /* "mpi4py/MPI/Comm.pyx":1070 * Free and attribute key for communicators * """ * cdef int keyval_save = keyval # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_free_keyval(&keyval) ) * try: del comm_keyval[keyval_save] */ __pyx_v_keyval_save = __pyx_v_keyval; /* "mpi4py/MPI/Comm.pyx":1071 * """ * cdef int keyval_save = keyval * CHKERR( MPI_Comm_free_keyval(&keyval) ) # <<<<<<<<<<<<<< * try: del comm_keyval[keyval_save] * except KeyError: pass */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_free_keyval((&__pyx_v_keyval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1071, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1072 * cdef int keyval_save = keyval * CHKERR( MPI_Comm_free_keyval(&keyval) ) * try: del comm_keyval[keyval_save] # <<<<<<<<<<<<<< * except KeyError: pass * return keyval */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { if (unlikely(__pyx_v_6mpi4py_3MPI_comm_keyval == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(7, 1072, __pyx_L3_error) } __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_keyval_save); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1072, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_DelItem(__pyx_v_6mpi4py_3MPI_comm_keyval, __pyx_t_5) < 0)) __PYX_ERR(7, 1072, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Comm.pyx":1073 * CHKERR( MPI_Comm_free_keyval(&keyval) ) * try: del comm_keyval[keyval_save] * except KeyError: pass # <<<<<<<<<<<<<< * return keyval * */ __pyx_t_1 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_1) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "mpi4py/MPI/Comm.pyx":1072 * cdef int keyval_save = keyval * CHKERR( MPI_Comm_free_keyval(&keyval) ) * try: del comm_keyval[keyval_save] # <<<<<<<<<<<<<< * except KeyError: pass * return keyval */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/Comm.pyx":1074 * try: del comm_keyval[keyval_save] * except KeyError: pass * return keyval # <<<<<<<<<<<<<< * * # Error handling */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1066 * * @classmethod * def Free_keyval(cls, int keyval): # <<<<<<<<<<<<<< * """ * Free and attribute key for communicators */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Comm.Free_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1079 * # -------------- * * def Get_errhandler(self): # <<<<<<<<<<<<<< * """ * Get the error handler for a communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_163Get_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_162Get_errhandler[] = "Comm.Get_errhandler(self)\n\n Get the error handler for a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_163Get_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_errhandler (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_errhandler", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_errhandler", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_162Get_errhandler(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_162Get_errhandler(struct PyMPICommObject *__pyx_v_self) { struct PyMPIErrhandlerObject *__pyx_v_errhandler = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_errhandler", 0); /* "mpi4py/MPI/Comm.pyx":1083 * Get the error handler for a communicator * """ * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) * return errhandler */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Errhandler(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Errhandler), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1083, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_errhandler = ((struct PyMPIErrhandlerObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1084 * """ * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * CHKERR( MPI_Comm_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) # <<<<<<<<<<<<<< * return errhandler * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_get_errhandler(__pyx_v_self->ob_mpi, (&__pyx_v_errhandler->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 1084, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1085 * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * CHKERR( MPI_Comm_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) * return errhandler # <<<<<<<<<<<<<< * * def Set_errhandler(self, Errhandler errhandler): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_errhandler)); __pyx_r = ((PyObject *)__pyx_v_errhandler); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1079 * # -------------- * * def Get_errhandler(self): # <<<<<<<<<<<<<< * """ * Get the error handler for a communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_errhandler); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1087 * return errhandler * * def Set_errhandler(self, Errhandler errhandler): # <<<<<<<<<<<<<< * """ * Set the error handler for a communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_165Set_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_164Set_errhandler[] = "Comm.Set_errhandler(self, Errhandler errhandler)\n\n Set the error handler for a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_165Set_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIErrhandlerObject *__pyx_v_errhandler = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_errhandler (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errhandler,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errhandler)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_errhandler") < 0)) __PYX_ERR(7, 1087, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_errhandler = ((struct PyMPIErrhandlerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_errhandler", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1087, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Set_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_errhandler), __pyx_ptype_6mpi4py_3MPI_Errhandler, 0, "errhandler", 0))) __PYX_ERR(7, 1087, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_164Set_errhandler(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_errhandler); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_164Set_errhandler(struct PyMPICommObject *__pyx_v_self, struct PyMPIErrhandlerObject *__pyx_v_errhandler) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_errhandler", 0); /* "mpi4py/MPI/Comm.pyx":1091 * Set the error handler for a communicator * """ * CHKERR( MPI_Comm_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) # <<<<<<<<<<<<<< * * def Call_errhandler(self, int errorcode): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_set_errhandler(__pyx_v_self->ob_mpi, __pyx_v_errhandler->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1091, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1087 * return errhandler * * def Set_errhandler(self, Errhandler errhandler): # <<<<<<<<<<<<<< * """ * Set the error handler for a communicator */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Set_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1093 * CHKERR( MPI_Comm_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) * * def Call_errhandler(self, int errorcode): # <<<<<<<<<<<<<< * """ * Call the error handler installed on a communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_167Call_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_166Call_errhandler[] = "Comm.Call_errhandler(self, int errorcode)\n\n Call the error handler installed on a communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_167Call_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_errorcode; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Call_errhandler (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errorcode,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errorcode)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Call_errhandler") < 0)) __PYX_ERR(7, 1093, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_errorcode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_errorcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1093, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Call_errhandler", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1093, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Call_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_166Call_errhandler(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_errorcode); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_166Call_errhandler(struct PyMPICommObject *__pyx_v_self, int __pyx_v_errorcode) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Call_errhandler", 0); /* "mpi4py/MPI/Comm.pyx":1097 * Call the error handler installed on a communicator * """ * CHKERR( MPI_Comm_call_errhandler(self.ob_mpi, errorcode) ) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_call_errhandler(__pyx_v_self->ob_mpi, __pyx_v_errorcode)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1097, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1093 * CHKERR( MPI_Comm_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) * * def Call_errhandler(self, int errorcode): # <<<<<<<<<<<<<< * """ * Call the error handler installed on a communicator */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Call_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1100 * * * def Abort(self, int errorcode=0): # <<<<<<<<<<<<<< * """ * Terminate MPI execution environment */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_169Abort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_168Abort[] = "Comm.Abort(self, int errorcode=0)\n\n Terminate MPI execution environment\n\n .. warning:: This is a direct call, use it with care!!!.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_169Abort(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_errorcode; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Abort (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errorcode,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errorcode); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Abort") < 0)) __PYX_ERR(7, 1100, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_errorcode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_errorcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1100, __pyx_L3_error) } else { __pyx_v_errorcode = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Abort", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1100, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Abort", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_168Abort(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_errorcode); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_168Abort(struct PyMPICommObject *__pyx_v_self, int __pyx_v_errorcode) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Abort", 0); /* "mpi4py/MPI/Comm.pyx":1106 * .. warning:: This is a direct call, use it with care!!!. * """ * CHKERR( MPI_Abort(self.ob_mpi, errorcode) ) # <<<<<<<<<<<<<< * * # Naming Objects */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Abort(__pyx_v_self->ob_mpi, __pyx_v_errorcode)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1106, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1100 * * * def Abort(self, int errorcode=0): # <<<<<<<<<<<<<< * """ * Terminate MPI execution environment */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Abort", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1111 * # -------------- * * def Get_name(self): # <<<<<<<<<<<<<< * """ * Get the print name for this communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_171Get_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_170Get_name[] = "Comm.Get_name(self)\n\n Get the print name for this communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_171Get_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_name (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_name", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_name", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_170Get_name(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_170Get_name(struct PyMPICommObject *__pyx_v_self) { char __pyx_v_name[(MPI_MAX_OBJECT_NAME + 1)]; int __pyx_v_nlen; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_name", 0); /* "mpi4py/MPI/Comm.pyx":1116 * """ * cdef char name[MPI_MAX_OBJECT_NAME+1] * cdef int nlen = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_get_name(self.ob_mpi, name, &nlen) ) * return tompistr(name, nlen) */ __pyx_v_nlen = 0; /* "mpi4py/MPI/Comm.pyx":1117 * cdef char name[MPI_MAX_OBJECT_NAME+1] * cdef int nlen = 0 * CHKERR( MPI_Comm_get_name(self.ob_mpi, name, &nlen) ) # <<<<<<<<<<<<<< * return tompistr(name, nlen) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_get_name(__pyx_v_self->ob_mpi, __pyx_v_name, (&__pyx_v_nlen))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1117, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1118 * cdef int nlen = 0 * CHKERR( MPI_Comm_get_name(self.ob_mpi, name, &nlen) ) * return tompistr(name, nlen) # <<<<<<<<<<<<<< * * def Set_name(self, name): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_tompistr(__pyx_v_name, __pyx_v_nlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1111 * # -------------- * * def Get_name(self): # <<<<<<<<<<<<<< * """ * Get the print name for this communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.Get_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1120 * return tompistr(name, nlen) * * def Set_name(self, name): # <<<<<<<<<<<<<< * """ * Set the print name for this communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_173Set_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_172Set_name[] = "Comm.Set_name(self, name)\n\n Set the print name for this communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_173Set_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_name (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_name") < 0)) __PYX_ERR(7, 1120, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_name = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_name", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1120, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.Set_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_172Set_name(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_name); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_172Set_name(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_name) { char *__pyx_v_cname; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Set_name", 0); __Pyx_INCREF(__pyx_v_name); /* "mpi4py/MPI/Comm.pyx":1124 * Set the print name for this communicator * """ * cdef char *cname = NULL # <<<<<<<<<<<<<< * name = asmpistr(name, &cname) * CHKERR( MPI_Comm_set_name(self.ob_mpi, cname) ) */ __pyx_v_cname = NULL; /* "mpi4py/MPI/Comm.pyx":1125 * """ * cdef char *cname = NULL * name = asmpistr(name, &cname) # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_set_name(self.ob_mpi, cname) ) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_name, (&__pyx_v_cname)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1126 * cdef char *cname = NULL * name = asmpistr(name, &cname) * CHKERR( MPI_Comm_set_name(self.ob_mpi, cname) ) # <<<<<<<<<<<<<< * * property name: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_set_name(__pyx_v_self->ob_mpi, __pyx_v_cname)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1126, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1120 * return tompistr(name, nlen) * * def Set_name(self, name): # <<<<<<<<<<<<<< * """ * Set the print name for this communicator */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.Set_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1130 * property name: * """communicator name""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_name() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_4name___get__(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_4name___get__(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1131 * """communicator name""" * def __get__(self): * return self.Get_name() # <<<<<<<<<<<<<< * def __set__(self, value): * self.Set_name(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1130 * property name: * """communicator name""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_name() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1132 * def __get__(self): * return self.Get_name() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_name(value) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4Comm_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4Comm_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_4name_2__set__(((struct PyMPICommObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4Comm_4name_2__set__(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/Comm.pyx":1133 * return self.Get_name() * def __set__(self, value): * self.Set_name(value) # <<<<<<<<<<<<<< * * # Fortran Handle */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1132 * def __get__(self): * return self.Get_name() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_name(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1138 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_175py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_174py2f[] = "Comm.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_175py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_174py2f(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_174py2f(struct PyMPICommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Comm.pyx":1141 * """ * """ * return MPI_Comm_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_Comm_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1138 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Comm.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1144 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_177f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_176f2py[] = "Comm.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_177f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(7, 1144, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1144, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_176f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_176f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Fint __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Comm.pyx":1147 * """ * """ * cdef MPI_Comm comm = MPI_Comm_f2c(arg) # <<<<<<<<<<<<<< * return PyMPIComm_New(comm) * */ __pyx_t_1 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_1 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(7, 1147, __pyx_L1_error) __pyx_v_comm = MPI_Comm_f2c(__pyx_t_1); /* "mpi4py/MPI/Comm.pyx":1148 * """ * cdef MPI_Comm comm = MPI_Comm_f2c(arg) * return PyMPIComm_New(comm) # <<<<<<<<<<<<<< * * # Python Communication */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPIComm_New(__pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1144 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1153 * # -------------------- * # * def send(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Send""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_179send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_178send[] = "Comm.send(self, obj, int dest, int tag=0)\nSend"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_179send(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("send", 0, 2, 3, 1); __PYX_ERR(7, 1153, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send") < 0)) __PYX_ERR(7, 1153, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1153, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1153, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("send", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1153, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.send", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_178send(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_obj, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_178send(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("send", 0); /* "mpi4py/MPI/Comm.pyx":1155 * def send(self, obj, int dest, int tag=0): * """Send""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_send(obj, dest, tag, comm) * # */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1156 * """Send""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_send(obj, dest, tag, comm) # <<<<<<<<<<<<<< * # * def bsend(self, obj, int dest, int tag=0): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_send(__pyx_v_obj, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1153 * # -------------------- * # * def send(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Send""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.send", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1158 * return PyMPI_send(obj, dest, tag, comm) * # * def bsend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Send in buffered mode""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_181bsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_180bsend[] = "Comm.bsend(self, obj, int dest, int tag=0)\nSend in buffered mode"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_181bsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bsend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("bsend", 0, 2, 3, 1); __PYX_ERR(7, 1158, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bsend") < 0)) __PYX_ERR(7, 1158, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1158, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1158, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("bsend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1158, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.bsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_180bsend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_obj, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_180bsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("bsend", 0); /* "mpi4py/MPI/Comm.pyx":1160 * def bsend(self, obj, int dest, int tag=0): * """Send in buffered mode""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_bsend(obj, dest, tag, comm) * # */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1161 * """Send in buffered mode""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_bsend(obj, dest, tag, comm) # <<<<<<<<<<<<<< * # * def ssend(self, obj, int dest, int tag=0): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_bsend(__pyx_v_obj, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1158 * return PyMPI_send(obj, dest, tag, comm) * # * def bsend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Send in buffered mode""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.bsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1163 * return PyMPI_bsend(obj, dest, tag, comm) * # * def ssend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Send in synchronous mode""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_183ssend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_182ssend[] = "Comm.ssend(self, obj, int dest, int tag=0)\nSend in synchronous mode"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_183ssend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ssend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ssend", 0, 2, 3, 1); __PYX_ERR(7, 1163, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ssend") < 0)) __PYX_ERR(7, 1163, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1163, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1163, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ssend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1163, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.ssend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_182ssend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_obj, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_182ssend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("ssend", 0); /* "mpi4py/MPI/Comm.pyx":1165 * def ssend(self, obj, int dest, int tag=0): * """Send in synchronous mode""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_ssend(obj, dest, tag, comm) * # */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1166 * """Send in synchronous mode""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_ssend(obj, dest, tag, comm) # <<<<<<<<<<<<<< * # * def recv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_ssend(__pyx_v_obj, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1163 * return PyMPI_bsend(obj, dest, tag, comm) * # * def ssend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Send in synchronous mode""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.ssend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1168 * return PyMPI_ssend(obj, dest, tag, comm) * # * def recv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Receive""" */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_185recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_184recv[] = "Comm.recv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\nReceive"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_185recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("recv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[4] = {0,0,0,0}; values[0] = ((PyObject *)Py_None); /* "mpi4py/MPI/Comm.pyx":1169 * # * def recv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """Receive""" * cdef MPI_Comm comm = self.ob_mpi */ values[3] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "recv") < 0)) __PYX_ERR(7, 1168, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; if (values[1]) { __pyx_v_source = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1168, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__65; } if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1168, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__66; } __pyx_v_status = ((struct PyMPIStatusObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("recv", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1168, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 1169, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_184recv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":1168 * return PyMPI_ssend(obj, dest, tag, comm) * # * def recv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Receive""" */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_184recv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { MPI_Comm __pyx_v_comm; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("recv", 0); /* "mpi4py/MPI/Comm.pyx":1171 * Status status=None): * """Receive""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * return PyMPI_recv(buf, source, tag, comm, statusp) */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1172 * """Receive""" * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * return PyMPI_recv(buf, source, tag, comm, statusp) * # */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":1173 * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) * return PyMPI_recv(buf, source, tag, comm, statusp) # <<<<<<<<<<<<<< * # * def sendrecv(self, sendobj, int dest, int sendtag=0, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_recv(__pyx_v_buf, __pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_statusp); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1168 * return PyMPI_ssend(obj, dest, tag, comm) * # * def recv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Receive""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.recv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1175 * return PyMPI_recv(buf, source, tag, comm, statusp) * # * def sendrecv(self, sendobj, int dest, int sendtag=0, # <<<<<<<<<<<<<< * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_187sendrecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_186sendrecv[] = "Comm.sendrecv(self, sendobj, int dest, int sendtag=0, recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None)\nSend and Receive"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_187sendrecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; int __pyx_v_dest; int __pyx_v_sendtag; PyObject *__pyx_v_recvbuf = 0; int __pyx_v_source; int __pyx_v_recvtag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sendrecv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,&__pyx_n_s_dest,&__pyx_n_s_sendtag,&__pyx_n_s_recvbuf,&__pyx_n_s_source,&__pyx_n_s_recvtag,&__pyx_n_s_status,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; /* "mpi4py/MPI/Comm.pyx":1176 * # * def sendrecv(self, sendobj, int dest, int sendtag=0, * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Send and Receive""" */ values[3] = ((PyObject *)Py_None); /* "mpi4py/MPI/Comm.pyx":1177 * def sendrecv(self, sendobj, int dest, int sendtag=0, * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """Send and Receive""" * cdef MPI_Comm comm = self.ob_mpi */ values[6] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("sendrecv", 0, 2, 7, 1); __PYX_ERR(7, 1175, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendtag); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvtag); if (value) { values[5] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 6: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sendrecv") < 0)) __PYX_ERR(7, 1175, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); CYTHON_FALLTHROUGH; case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendobj = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1175, __pyx_L3_error) if (values[2]) { __pyx_v_sendtag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_sendtag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1175, __pyx_L3_error) } else { __pyx_v_sendtag = ((int)0); } __pyx_v_recvbuf = values[3]; if (values[4]) { __pyx_v_source = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1176, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__67; } if (values[5]) { __pyx_v_recvtag = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_recvtag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1176, __pyx_L3_error) } else { __pyx_v_recvtag = __pyx_k__68; } __pyx_v_status = ((struct PyMPIStatusObject *)values[6]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("sendrecv", 0, 2, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1175, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.sendrecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 1177, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_186sendrecv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendobj, __pyx_v_dest, __pyx_v_sendtag, __pyx_v_recvbuf, __pyx_v_source, __pyx_v_recvtag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":1175 * return PyMPI_recv(buf, source, tag, comm, statusp) * # * def sendrecv(self, sendobj, int dest, int sendtag=0, # <<<<<<<<<<<<<< * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_186sendrecv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, int __pyx_v_dest, int __pyx_v_sendtag, PyObject *__pyx_v_recvbuf, int __pyx_v_source, int __pyx_v_recvtag, struct PyMPIStatusObject *__pyx_v_status) { MPI_Comm __pyx_v_comm; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("sendrecv", 0); /* "mpi4py/MPI/Comm.pyx":1179 * Status status=None): * """Send and Receive""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * return PyMPI_sendrecv(sendobj, dest, sendtag, */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1180 * """Send and Receive""" * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * return PyMPI_sendrecv(sendobj, dest, sendtag, * recvbuf, source, recvtag, */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":1181 * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) * return PyMPI_sendrecv(sendobj, dest, sendtag, # <<<<<<<<<<<<<< * recvbuf, source, recvtag, * comm, statusp) */ __Pyx_XDECREF(__pyx_r); /* "mpi4py/MPI/Comm.pyx":1183 * return PyMPI_sendrecv(sendobj, dest, sendtag, * recvbuf, source, recvtag, * comm, statusp) # <<<<<<<<<<<<<< * # * def isend(self, obj, int dest, int tag=0): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_sendrecv(__pyx_v_sendobj, __pyx_v_dest, __pyx_v_sendtag, __pyx_v_recvbuf, __pyx_v_source, __pyx_v_recvtag, __pyx_v_comm, __pyx_v_statusp); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1175 * return PyMPI_recv(buf, source, tag, comm, statusp) * # * def sendrecv(self, sendobj, int dest, int sendtag=0, # <<<<<<<<<<<<<< * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, * Status status=None): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.sendrecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1185 * comm, statusp) * # * def isend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Nonblocking send""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_189isend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_188isend[] = "Comm.isend(self, obj, int dest, int tag=0)\nNonblocking send"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_189isend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("isend", 0, 2, 3, 1); __PYX_ERR(7, 1185, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isend") < 0)) __PYX_ERR(7, 1185, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1185, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1185, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("isend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1185, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.isend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_188isend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_obj, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_188isend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag) { MPI_Comm __pyx_v_comm; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("isend", 0); /* "mpi4py/MPI/Comm.pyx":1187 * def isend(self, obj, int dest, int tag=0): * """Nonblocking send""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_isend(obj, dest, tag, comm, &request.ob_mpi) */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1188 * """Nonblocking send""" * cdef MPI_Comm comm = self.ob_mpi * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * request.ob_buf = PyMPI_isend(obj, dest, tag, comm, &request.ob_mpi) * return request */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1188, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1189 * cdef MPI_Comm comm = self.ob_mpi * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_isend(obj, dest, tag, comm, &request.ob_mpi) # <<<<<<<<<<<<<< * return request * # */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_isend(__pyx_v_obj, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm, (&__pyx_v_request->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1190 * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_isend(obj, dest, tag, comm, &request.ob_mpi) * return request # <<<<<<<<<<<<<< * # * def ibsend(self, obj, int dest, int tag=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1185 * comm, statusp) * # * def isend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Nonblocking send""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.isend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1192 * return request * # * def ibsend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Nonblocking send in buffered mode""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_191ibsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_190ibsend[] = "Comm.ibsend(self, obj, int dest, int tag=0)\nNonblocking send in buffered mode"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_191ibsend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ibsend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("ibsend", 0, 2, 3, 1); __PYX_ERR(7, 1192, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ibsend") < 0)) __PYX_ERR(7, 1192, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1192, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1192, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("ibsend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1192, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.ibsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_190ibsend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_obj, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_190ibsend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag) { MPI_Comm __pyx_v_comm; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("ibsend", 0); /* "mpi4py/MPI/Comm.pyx":1194 * def ibsend(self, obj, int dest, int tag=0): * """Nonblocking send in buffered mode""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_ibsend(obj, dest, tag, comm, &request.ob_mpi) */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1195 * """Nonblocking send in buffered mode""" * cdef MPI_Comm comm = self.ob_mpi * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * request.ob_buf = PyMPI_ibsend(obj, dest, tag, comm, &request.ob_mpi) * return request */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1195, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1196 * cdef MPI_Comm comm = self.ob_mpi * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_ibsend(obj, dest, tag, comm, &request.ob_mpi) # <<<<<<<<<<<<<< * return request * # */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_ibsend(__pyx_v_obj, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm, (&__pyx_v_request->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1197 * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_ibsend(obj, dest, tag, comm, &request.ob_mpi) * return request # <<<<<<<<<<<<<< * # * def issend(self, obj, int dest, int tag=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1192 * return request * # * def ibsend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Nonblocking send in buffered mode""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.ibsend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1199 * return request * # * def issend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Nonblocking send in synchronous mode""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_193issend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_192issend[] = "Comm.issend(self, obj, int dest, int tag=0)\nNonblocking send in synchronous mode"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_193issend(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_dest; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("issend (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_dest,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("issend", 0, 2, 3, 1); __PYX_ERR(7, 1199, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "issend") < 0)) __PYX_ERR(7, 1199, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; __pyx_v_dest = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1199, __pyx_L3_error) if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1199, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("issend", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1199, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.issend", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_192issend(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_obj, __pyx_v_dest, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_192issend(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_dest, int __pyx_v_tag) { MPI_Comm __pyx_v_comm; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("issend", 0); /* "mpi4py/MPI/Comm.pyx":1201 * def issend(self, obj, int dest, int tag=0): * """Nonblocking send in synchronous mode""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_issend(obj, dest, tag, comm, &request.ob_mpi) */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1202 * """Nonblocking send in synchronous mode""" * cdef MPI_Comm comm = self.ob_mpi * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * request.ob_buf = PyMPI_issend(obj, dest, tag, comm, &request.ob_mpi) * return request */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1202, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1203 * cdef MPI_Comm comm = self.ob_mpi * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_issend(obj, dest, tag, comm, &request.ob_mpi) # <<<<<<<<<<<<<< * return request * # */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_issend(__pyx_v_obj, __pyx_v_dest, __pyx_v_tag, __pyx_v_comm, (&__pyx_v_request->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1204 * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_issend(obj, dest, tag, comm, &request.ob_mpi) * return request # <<<<<<<<<<<<<< * # * def irecv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1199 * return request * # * def issend(self, obj, int dest, int tag=0): # <<<<<<<<<<<<<< * """Nonblocking send in synchronous mode""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.issend", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1206 * return request * # * def irecv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG): # <<<<<<<<<<<<<< * """Nonblocking receive""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_195irecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_194irecv[] = "Comm.irecv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG)\nNonblocking receive"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_195irecv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; int __pyx_v_source; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("irecv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_source,&__pyx_n_s_tag,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "irecv") < 0)) __PYX_ERR(7, 1206, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; if (values[1]) { __pyx_v_source = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1206, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__69; } if (values[2]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1206, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__70; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("irecv", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1206, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.irecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_194irecv(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_source, __pyx_v_tag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_194irecv(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_buf, int __pyx_v_source, int __pyx_v_tag) { MPI_Comm __pyx_v_comm; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("irecv", 0); /* "mpi4py/MPI/Comm.pyx":1208 * def irecv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG): * """Nonblocking receive""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_irecv(buf, source, tag, comm, &request.ob_mpi) */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1209 * """Nonblocking receive""" * cdef MPI_Comm comm = self.ob_mpi * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * request.ob_buf = PyMPI_irecv(buf, source, tag, comm, &request.ob_mpi) * return request */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1209, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1210 * cdef MPI_Comm comm = self.ob_mpi * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_irecv(buf, source, tag, comm, &request.ob_mpi) # <<<<<<<<<<<<<< * return request * # */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_irecv(__pyx_v_buf, __pyx_v_source, __pyx_v_tag, __pyx_v_comm, (&__pyx_v_request->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1211 * cdef Request request = Request.__new__(Request) * request.ob_buf = PyMPI_irecv(buf, source, tag, comm, &request.ob_mpi) * return request # <<<<<<<<<<<<<< * # * def probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1206 * return request * # * def irecv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG): # <<<<<<<<<<<<<< * """Nonblocking receive""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.irecv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1213 * return request * # * def probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Blocking test for a message""" */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_197probe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_196probe[] = "Comm.probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\nBlocking test for a message"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_197probe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("probe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; /* "mpi4py/MPI/Comm.pyx":1214 * # * def probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """Blocking test for a message""" * cdef MPI_Comm comm = self.ob_mpi */ values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "probe") < 0)) __PYX_ERR(7, 1213, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_source = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1213, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__71; } if (values[1]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1213, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__72; } __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("probe", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1213, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 1214, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_196probe(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":1213 * return request * # * def probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Blocking test for a message""" */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_196probe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { MPI_Comm __pyx_v_comm; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("probe", 0); /* "mpi4py/MPI/Comm.pyx":1216 * Status status=None): * """Blocking test for a message""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * return PyMPI_probe(source, tag, comm, statusp) */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1217 * """Blocking test for a message""" * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * return PyMPI_probe(source, tag, comm, statusp) * # */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":1218 * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) * return PyMPI_probe(source, tag, comm, statusp) # <<<<<<<<<<<<<< * # * def iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_probe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_statusp); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1213 * return request * # * def probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Blocking test for a message""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.probe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1220 * return PyMPI_probe(source, tag, comm, statusp) * # * def iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Nonblocking test for a message""" */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_199iprobe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_198iprobe[] = "Comm.iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\nNonblocking test for a message"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_199iprobe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("iprobe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; /* "mpi4py/MPI/Comm.pyx":1221 * # * def iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """Nonblocking test for a message""" * cdef MPI_Comm comm = self.ob_mpi */ values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iprobe") < 0)) __PYX_ERR(7, 1220, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_source = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1220, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__73; } if (values[1]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1220, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__74; } __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("iprobe", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1220, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.iprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 1221, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_198iprobe(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":1220 * return PyMPI_probe(source, tag, comm, statusp) * # * def iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Nonblocking test for a message""" */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_198iprobe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { MPI_Comm __pyx_v_comm; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("iprobe", 0); /* "mpi4py/MPI/Comm.pyx":1223 * Status status=None): * """Nonblocking test for a message""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * return PyMPI_iprobe(source, tag, comm, statusp) */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1224 * """Nonblocking test for a message""" * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * return PyMPI_iprobe(source, tag, comm, statusp) * # */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":1225 * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) * return PyMPI_iprobe(source, tag, comm, statusp) # <<<<<<<<<<<<<< * # * def mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_iprobe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, __pyx_v_statusp); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1220 * return PyMPI_probe(source, tag, comm, statusp) * # * def iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Nonblocking test for a message""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.iprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1227 * return PyMPI_iprobe(source, tag, comm, statusp) * # * def mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Blocking test for a matched message""" */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_201mprobe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_200mprobe[] = "Comm.mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\nBlocking test for a matched message"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_201mprobe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("mprobe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; /* "mpi4py/MPI/Comm.pyx":1228 * # * def mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """Blocking test for a matched message""" * cdef MPI_Comm comm = self.ob_mpi */ values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mprobe") < 0)) __PYX_ERR(7, 1227, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_source = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1227, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__75; } if (values[1]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1227, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__76; } __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("mprobe", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1227, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.mprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 1228, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_200mprobe(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":1227 * return PyMPI_iprobe(source, tag, comm, statusp) * # * def mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Blocking test for a matched message""" */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_200mprobe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { MPI_Comm __pyx_v_comm; MPI_Status *__pyx_v_statusp; struct PyMPIMessageObject *__pyx_v_message = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("mprobe", 0); /* "mpi4py/MPI/Comm.pyx":1230 * Status status=None): * """Blocking test for a matched message""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * cdef Message message = Message.__new__(Message) */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1231 * """Blocking test for a matched message""" * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * cdef Message message = Message.__new__(Message) * message.ob_buf = PyMPI_mprobe(source, tag, comm, */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":1232 * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) * cdef Message message = Message.__new__(Message) # <<<<<<<<<<<<<< * message.ob_buf = PyMPI_mprobe(source, tag, comm, * &message.ob_mpi, statusp) */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Message(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1232, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1233 * cdef MPI_Status *statusp = arg_Status(status) * cdef Message message = Message.__new__(Message) * message.ob_buf = PyMPI_mprobe(source, tag, comm, # <<<<<<<<<<<<<< * &message.ob_mpi, statusp) * return message */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_mprobe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, (&__pyx_v_message->ob_mpi), __pyx_v_statusp); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_message->ob_buf); __Pyx_DECREF(__pyx_v_message->ob_buf); __pyx_v_message->ob_buf = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1235 * message.ob_buf = PyMPI_mprobe(source, tag, comm, * &message.ob_mpi, statusp) * return message # <<<<<<<<<<<<<< * # * def improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = ((PyObject *)__pyx_v_message); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1227 * return PyMPI_iprobe(source, tag, comm, statusp) * # * def mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Blocking test for a matched message""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.mprobe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1237 * return message * # * def improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Nonblocking test for a matched message""" */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_203improbe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_202improbe[] = "Comm.improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)\nNonblocking test for a matched message"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_203improbe(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_source; int __pyx_v_tag; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("improbe (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_tag,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; /* "mpi4py/MPI/Comm.pyx":1238 * # * def improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, * Status status=None): # <<<<<<<<<<<<<< * """Nonblocking test for a matched message""" * cdef int flag = 0 */ values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "improbe") < 0)) __PYX_ERR(7, 1237, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_source = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1237, __pyx_L3_error) } else { __pyx_v_source = __pyx_k__77; } if (values[1]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1237, __pyx_L3_error) } else { __pyx_v_tag = __pyx_k__78; } __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("improbe", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1237, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.improbe", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(7, 1238, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_202improbe(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_source, __pyx_v_tag, __pyx_v_status); /* "mpi4py/MPI/Comm.pyx":1237 * return message * # * def improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Nonblocking test for a matched message""" */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_202improbe(struct PyMPICommObject *__pyx_v_self, int __pyx_v_source, int __pyx_v_tag, struct PyMPIStatusObject *__pyx_v_status) { int __pyx_v_flag; MPI_Comm __pyx_v_comm; MPI_Status *__pyx_v_statusp; struct PyMPIMessageObject *__pyx_v_message = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("improbe", 0); /* "mpi4py/MPI/Comm.pyx":1240 * Status status=None): * """Nonblocking test for a matched message""" * cdef int flag = 0 # <<<<<<<<<<<<<< * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) */ __pyx_v_flag = 0; /* "mpi4py/MPI/Comm.pyx":1241 * """Nonblocking test for a matched message""" * cdef int flag = 0 * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * cdef Message message = Message.__new__(Message) */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1242 * cdef int flag = 0 * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * cdef Message message = Message.__new__(Message) * message.ob_buf = PyMPI_improbe(source, tag, comm, &flag, */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/Comm.pyx":1243 * cdef MPI_Comm comm = self.ob_mpi * cdef MPI_Status *statusp = arg_Status(status) * cdef Message message = Message.__new__(Message) # <<<<<<<<<<<<<< * message.ob_buf = PyMPI_improbe(source, tag, comm, &flag, * &message.ob_mpi, statusp) */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Message(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Message), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1243, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_message = ((struct PyMPIMessageObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1244 * cdef MPI_Status *statusp = arg_Status(status) * cdef Message message = Message.__new__(Message) * message.ob_buf = PyMPI_improbe(source, tag, comm, &flag, # <<<<<<<<<<<<<< * &message.ob_mpi, statusp) * if flag == 0: return None */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_improbe(__pyx_v_source, __pyx_v_tag, __pyx_v_comm, (&__pyx_v_flag), (&__pyx_v_message->ob_mpi), __pyx_v_statusp); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_message->ob_buf); __Pyx_DECREF(__pyx_v_message->ob_buf); __pyx_v_message->ob_buf = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1246 * message.ob_buf = PyMPI_improbe(source, tag, comm, &flag, * &message.ob_mpi, statusp) * if flag == 0: return None # <<<<<<<<<<<<<< * return message * # */ __pyx_t_4 = ((__pyx_v_flag == 0) != 0); if (__pyx_t_4) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":1247 * &message.ob_mpi, statusp) * if flag == 0: return None * return message # <<<<<<<<<<<<<< * # * def barrier(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_message)); __pyx_r = ((PyObject *)__pyx_v_message); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1237 * return message * # * def improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Nonblocking test for a matched message""" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.improbe", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_message); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1249 * return message * # * def barrier(self): # <<<<<<<<<<<<<< * """Barrier""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_205barrier(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_204barrier[] = "Comm.barrier(self)\nBarrier"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_205barrier(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("barrier (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("barrier", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "barrier", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_204barrier(((struct PyMPICommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_204barrier(struct PyMPICommObject *__pyx_v_self) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("barrier", 0); /* "mpi4py/MPI/Comm.pyx":1251 * def barrier(self): * """Barrier""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_barrier(comm) * # */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1252 * """Barrier""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_barrier(comm) # <<<<<<<<<<<<<< * # * def bcast(self, obj, int root=0): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_barrier(__pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1249 * return message * # * def barrier(self): # <<<<<<<<<<<<<< * """Barrier""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.barrier", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1254 * return PyMPI_barrier(comm) * # * def bcast(self, obj, int root=0): # <<<<<<<<<<<<<< * """Broadcast""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_207bcast(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_206bcast[] = "Comm.bcast(self, obj, int root=0)\nBroadcast"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_207bcast(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_obj = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("bcast (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_root,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bcast") < 0)) __PYX_ERR(7, 1254, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_obj = values[0]; if (values[1]) { __pyx_v_root = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1254, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("bcast", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1254, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.bcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_206bcast(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_obj, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_206bcast(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_root) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("bcast", 0); /* "mpi4py/MPI/Comm.pyx":1256 * def bcast(self, obj, int root=0): * """Broadcast""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_bcast(obj, root, comm) * # */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1257 * """Broadcast""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_bcast(obj, root, comm) # <<<<<<<<<<<<<< * # * def gather(self, sendobj, int root=0): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_bcast(__pyx_v_obj, __pyx_v_root, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1254 * return PyMPI_barrier(comm) * # * def bcast(self, obj, int root=0): # <<<<<<<<<<<<<< * """Broadcast""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.bcast", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1259 * return PyMPI_bcast(obj, root, comm) * # * def gather(self, sendobj, int root=0): # <<<<<<<<<<<<<< * """Gather""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_209gather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_208gather[] = "Comm.gather(self, sendobj, int root=0)\nGather"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_209gather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("gather (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,&__pyx_n_s_root,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gather") < 0)) __PYX_ERR(7, 1259, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendobj = values[0]; if (values[1]) { __pyx_v_root = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1259, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("gather", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1259, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.gather", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_208gather(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendobj, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_208gather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, int __pyx_v_root) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("gather", 0); /* "mpi4py/MPI/Comm.pyx":1261 * def gather(self, sendobj, int root=0): * """Gather""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_gather(sendobj, root, comm) * # */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1262 * """Gather""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_gather(sendobj, root, comm) # <<<<<<<<<<<<<< * # * def scatter(self, sendobj, int root=0): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_gather(__pyx_v_sendobj, __pyx_v_root, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1259 * return PyMPI_bcast(obj, root, comm) * # * def gather(self, sendobj, int root=0): # <<<<<<<<<<<<<< * """Gather""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.gather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1264 * return PyMPI_gather(sendobj, root, comm) * # * def scatter(self, sendobj, int root=0): # <<<<<<<<<<<<<< * """Scatter""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_211scatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_210scatter[] = "Comm.scatter(self, sendobj, int root=0)\nScatter"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_211scatter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("scatter (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,&__pyx_n_s_root,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scatter") < 0)) __PYX_ERR(7, 1264, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendobj = values[0]; if (values[1]) { __pyx_v_root = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1264, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("scatter", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1264, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_210scatter(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendobj, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_210scatter(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, int __pyx_v_root) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("scatter", 0); /* "mpi4py/MPI/Comm.pyx":1266 * def scatter(self, sendobj, int root=0): * """Scatter""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_scatter(sendobj, root, comm) * # */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1267 * """Scatter""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_scatter(sendobj, root, comm) # <<<<<<<<<<<<<< * # * def allgather(self, sendobj): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_scatter(__pyx_v_sendobj, __pyx_v_root, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1264 * return PyMPI_gather(sendobj, root, comm) * # * def scatter(self, sendobj, int root=0): # <<<<<<<<<<<<<< * """Scatter""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.scatter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1269 * return PyMPI_scatter(sendobj, root, comm) * # * def allgather(self, sendobj): # <<<<<<<<<<<<<< * """Gather to All""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_213allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_212allgather[] = "Comm.allgather(self, sendobj)\nGather to All"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_213allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("allgather (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allgather") < 0)) __PYX_ERR(7, 1269, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_sendobj = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("allgather", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1269, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_212allgather(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendobj); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_212allgather(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("allgather", 0); /* "mpi4py/MPI/Comm.pyx":1271 * def allgather(self, sendobj): * """Gather to All""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_allgather(sendobj, comm) * # */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1272 * """Gather to All""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_allgather(sendobj, comm) # <<<<<<<<<<<<<< * # * def alltoall(self, sendobj): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_allgather(__pyx_v_sendobj, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1269 * return PyMPI_scatter(sendobj, root, comm) * # * def allgather(self, sendobj): # <<<<<<<<<<<<<< * """Gather to All""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1274 * return PyMPI_allgather(sendobj, comm) * # * def alltoall(self, sendobj): # <<<<<<<<<<<<<< * """All to All Scatter/Gather""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_215alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_214alltoall[] = "Comm.alltoall(self, sendobj)\nAll to All Scatter/Gather"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_215alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("alltoall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "alltoall") < 0)) __PYX_ERR(7, 1274, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_sendobj = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("alltoall", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1274, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_214alltoall(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendobj); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_214alltoall(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("alltoall", 0); /* "mpi4py/MPI/Comm.pyx":1276 * def alltoall(self, sendobj): * """All to All Scatter/Gather""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_alltoall(sendobj, comm) * # */ __pyx_t_1 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1277 * """All to All Scatter/Gather""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_alltoall(sendobj, comm) # <<<<<<<<<<<<<< * # * def reduce(self, sendobj, op=SUM, int root=0): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_alltoall(__pyx_v_sendobj, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1274 * return PyMPI_allgather(sendobj, comm) * # * def alltoall(self, sendobj): # <<<<<<<<<<<<<< * """All to All Scatter/Gather""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Comm.alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1279 * return PyMPI_alltoall(sendobj, comm) * # * def reduce(self, sendobj, op=SUM, int root=0): # <<<<<<<<<<<<<< * """Reduce""" * if op is None: op = SUM */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_217reduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_216reduce[] = "Comm.reduce(self, sendobj, op=SUM, int root=0)\nReduce"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_217reduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; PyObject *__pyx_v_op = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reduce (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,&__pyx_n_s_op,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; values[1] = __pyx_k__79; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reduce") < 0)) __PYX_ERR(7, 1279, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendobj = values[0]; __pyx_v_op = values[1]; if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1279, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("reduce", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1279, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_216reduce(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendobj, __pyx_v_op, __pyx_v_root); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_216reduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op, int __pyx_v_root) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; MPI_Comm __pyx_t_4; __Pyx_RefNannySetupContext("reduce", 0); __Pyx_INCREF(__pyx_v_op); /* "mpi4py/MPI/Comm.pyx":1281 * def reduce(self, sendobj, op=SUM, int root=0): * """Reduce""" * if op is None: op = SUM # <<<<<<<<<<<<<< * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_reduce(sendobj, op, root, comm) */ __pyx_t_1 = (__pyx_v_op == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_op, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/Comm.pyx":1282 * """Reduce""" * if op is None: op = SUM * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_reduce(sendobj, op, root, comm) * # */ __pyx_t_4 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_4; /* "mpi4py/MPI/Comm.pyx":1283 * if op is None: op = SUM * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_reduce(sendobj, op, root, comm) # <<<<<<<<<<<<<< * # * def allreduce(self, sendobj, op=SUM): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_reduce(__pyx_v_sendobj, __pyx_v_op, __pyx_v_root, __pyx_v_comm); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1279 * return PyMPI_alltoall(sendobj, comm) * # * def reduce(self, sendobj, op=SUM, int root=0): # <<<<<<<<<<<<<< * """Reduce""" * if op is None: op = SUM */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.reduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_op); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1285 * return PyMPI_reduce(sendobj, op, root, comm) * # * def allreduce(self, sendobj, op=SUM): # <<<<<<<<<<<<<< * """Reduce to All""" * if op is None: op = SUM */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_219allreduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4Comm_218allreduce[] = "Comm.allreduce(self, sendobj, op=SUM)\nReduce to All"; static PyObject *__pyx_pw_6mpi4py_3MPI_4Comm_219allreduce(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; PyObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("allreduce (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,&__pyx_n_s_op,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k__80; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allreduce") < 0)) __PYX_ERR(7, 1285, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendobj = values[0]; __pyx_v_op = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("allreduce", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1285, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Comm.allreduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4Comm_218allreduce(((struct PyMPICommObject *)__pyx_v_self), __pyx_v_sendobj, __pyx_v_op); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4Comm_218allreduce(struct PyMPICommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; MPI_Comm __pyx_t_4; __Pyx_RefNannySetupContext("allreduce", 0); __Pyx_INCREF(__pyx_v_op); /* "mpi4py/MPI/Comm.pyx":1287 * def allreduce(self, sendobj, op=SUM): * """Reduce to All""" * if op is None: op = SUM # <<<<<<<<<<<<<< * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_allreduce(sendobj, op, comm) */ __pyx_t_1 = (__pyx_v_op == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_op, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/Comm.pyx":1288 * """Reduce to All""" * if op is None: op = SUM * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_allreduce(sendobj, op, comm) * */ __pyx_t_4 = __pyx_v_self->ob_mpi; __pyx_v_comm = __pyx_t_4; /* "mpi4py/MPI/Comm.pyx":1289 * if op is None: op = SUM * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_allreduce(sendobj, op, comm) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_allreduce(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1285 * return PyMPI_reduce(sendobj, op, root, comm) * # * def allreduce(self, sendobj, op=SUM): # <<<<<<<<<<<<<< * """Reduce to All""" * if op is None: op = SUM */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Comm.allreduce", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_op); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1298 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int inter = 1 */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9Intracomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9Intracomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPICommObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(7, 1298, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1298, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 1, "comm", 0))) __PYX_ERR(7, 1298, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm___cinit__(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9Intracomm___cinit__(struct PyMPIIntracommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm) { int __pyx_v_inter; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Comm.pyx":1299 * * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return # <<<<<<<<<<<<<< * cdef int inter = 1 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.ob_mpi == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":1300 * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return * cdef int inter = 1 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) * if inter: raise TypeError( */ __pyx_v_inter = 1; /* "mpi4py/MPI/Comm.pyx":1301 * if self.ob_mpi == MPI_COMM_NULL: return * cdef int inter = 1 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) # <<<<<<<<<<<<<< * if inter: raise TypeError( * "expecting an intracommunicator") */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1301, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1302 * cdef int inter = 1 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) * if inter: raise TypeError( # <<<<<<<<<<<<<< * "expecting an intracommunicator") * */ __pyx_t_1 = (__pyx_v_inter != 0); if (unlikely(__pyx_t_1)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(7, 1302, __pyx_L1_error) } /* "mpi4py/MPI/Comm.pyx":1298 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int inter = 1 */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1308 * # ------------------------- * * def Create_cart(self, dims, periods=None, bint reorder=False): # <<<<<<<<<<<<<< * """ * Create cartesian communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_3Create_cart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_2Create_cart[] = "Intracomm.Create_cart(self, dims, periods=None, bool reorder=False)\n\n Create cartesian communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_3Create_cart(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dims = 0; PyObject *__pyx_v_periods = 0; int __pyx_v_reorder; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_cart (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dims,&__pyx_n_s_periods,&__pyx_n_s_reorder,0}; PyObject* values[3] = {0,0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dims)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_periods); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reorder); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_cart") < 0)) __PYX_ERR(7, 1308, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dims = values[0]; __pyx_v_periods = values[1]; if (values[2]) { __pyx_v_reorder = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reorder == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1308, __pyx_L3_error) } else { __pyx_v_reorder = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_cart", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1308, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_cart", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_2Create_cart(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_dims, __pyx_v_periods, __pyx_v_reorder); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_2Create_cart(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_dims, PyObject *__pyx_v_periods, int __pyx_v_reorder) { int __pyx_v_ndims; int *__pyx_v_idims; int *__pyx_v_iperiods; struct PyMPICartcommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("Create_cart", 0); __Pyx_INCREF(__pyx_v_dims); __Pyx_INCREF(__pyx_v_periods); /* "mpi4py/MPI/Comm.pyx":1312 * Create cartesian communicator * """ * cdef int ndims = 0, *idims = NULL, *iperiods = NULL # <<<<<<<<<<<<<< * dims = getarray(dims, &ndims, &idims) * if periods is None: periods = False */ __pyx_v_ndims = 0; __pyx_v_idims = NULL; __pyx_v_iperiods = NULL; /* "mpi4py/MPI/Comm.pyx":1313 * """ * cdef int ndims = 0, *idims = NULL, *iperiods = NULL * dims = getarray(dims, &ndims, &idims) # <<<<<<<<<<<<<< * if periods is None: periods = False * if isinstance(periods, bool): periods = [periods] * ndims */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_dims, (&__pyx_v_ndims), (&__pyx_v_idims)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_dims, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1314 * cdef int ndims = 0, *idims = NULL, *iperiods = NULL * dims = getarray(dims, &ndims, &idims) * if periods is None: periods = False # <<<<<<<<<<<<<< * if isinstance(periods, bool): periods = [periods] * ndims * periods = chkarray(periods, ndims, &iperiods) */ __pyx_t_2 = (__pyx_v_periods == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_periods, Py_False); } /* "mpi4py/MPI/Comm.pyx":1315 * dims = getarray(dims, &ndims, &idims) * if periods is None: periods = False * if isinstance(periods, bool): periods = [periods] * ndims # <<<<<<<<<<<<<< * periods = chkarray(periods, ndims, &iperiods) * # */ __pyx_t_1 = ((PyObject*)&PyBool_Type); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_periods, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 1315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndims<0) ? 0:__pyx_v_ndims)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_ndims; __pyx_temp++) { __Pyx_INCREF(__pyx_v_periods); __Pyx_GIVEREF(__pyx_v_periods); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_v_periods); } } __Pyx_DECREF_SET(__pyx_v_periods, __pyx_t_1); __pyx_t_1 = 0; } /* "mpi4py/MPI/Comm.pyx":1316 * if periods is None: periods = False * if isinstance(periods, bool): periods = [periods] * ndims * periods = chkarray(periods, ndims, &iperiods) # <<<<<<<<<<<<<< * # * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_periods, __pyx_v_ndims, (&__pyx_v_iperiods)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_periods, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1318 * periods = chkarray(periods, ndims, &iperiods) * # * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Cart_create( * self.ob_mpi, ndims, idims, iperiods, reorder, &comm.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Cartcomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Cartcomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1318, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPICartcommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":1319 * # * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) * with nogil: CHKERR( MPI_Cart_create( # <<<<<<<<<<<<<< * self.ob_mpi, ndims, idims, iperiods, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1320 * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) * with nogil: CHKERR( MPI_Cart_create( * self.ob_mpi, ndims, idims, iperiods, reorder, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cart_create(__pyx_v_self->__pyx_base.ob_mpi, __pyx_v_ndims, __pyx_v_idims, __pyx_v_iperiods, __pyx_v_reorder, (&__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 1319, __pyx_L6_error) } /* "mpi4py/MPI/Comm.pyx":1319 * # * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) * with nogil: CHKERR( MPI_Cart_create( # <<<<<<<<<<<<<< * self.ob_mpi, ndims, idims, iperiods, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7; } __pyx_L6_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L7:; } } /* "mpi4py/MPI/Comm.pyx":1321 * with nogil: CHKERR( MPI_Cart_create( * self.ob_mpi, ndims, idims, iperiods, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 1321, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1322 * self.ob_mpi, ndims, idims, iperiods, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Create_graph(self, index, edges, bint reorder=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1308 * # ------------------------- * * def Create_cart(self, dims, periods=None, bint reorder=False): # <<<<<<<<<<<<<< * """ * Create cartesian communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_cart", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XDECREF(__pyx_v_dims); __Pyx_XDECREF(__pyx_v_periods); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1324 * return comm * * def Create_graph(self, index, edges, bint reorder=False): # <<<<<<<<<<<<<< * """ * Create graph communicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_5Create_graph(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_4Create_graph[] = "Intracomm.Create_graph(self, index, edges, bool reorder=False)\n\n Create graph communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_5Create_graph(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_index = 0; PyObject *__pyx_v_edges = 0; int __pyx_v_reorder; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_graph (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_edges,&__pyx_n_s_reorder,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edges)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_graph", 0, 2, 3, 1); __PYX_ERR(7, 1324, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reorder); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_graph") < 0)) __PYX_ERR(7, 1324, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_index = values[0]; __pyx_v_edges = values[1]; if (values[2]) { __pyx_v_reorder = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reorder == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1324, __pyx_L3_error) } else { __pyx_v_reorder = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_graph", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1324, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_4Create_graph(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_index, __pyx_v_edges, __pyx_v_reorder); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_4Create_graph(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_edges, int __pyx_v_reorder) { int __pyx_v_nnodes; int *__pyx_v_iindex; int __pyx_v_nedges; int *__pyx_v_iedges; struct PyMPIGraphcommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("Create_graph", 0); __Pyx_INCREF(__pyx_v_index); __Pyx_INCREF(__pyx_v_edges); /* "mpi4py/MPI/Comm.pyx":1328 * Create graph communicator * """ * cdef int nnodes = 0, *iindex = NULL # <<<<<<<<<<<<<< * index = getarray(index, &nnodes, &iindex) * cdef int nedges = 0, *iedges = NULL */ __pyx_v_nnodes = 0; __pyx_v_iindex = NULL; /* "mpi4py/MPI/Comm.pyx":1329 * """ * cdef int nnodes = 0, *iindex = NULL * index = getarray(index, &nnodes, &iindex) # <<<<<<<<<<<<<< * cdef int nedges = 0, *iedges = NULL * edges = getarray(edges, &nedges, &iedges) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_index, (&__pyx_v_nnodes), (&__pyx_v_iindex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1330 * cdef int nnodes = 0, *iindex = NULL * index = getarray(index, &nnodes, &iindex) * cdef int nedges = 0, *iedges = NULL # <<<<<<<<<<<<<< * edges = getarray(edges, &nedges, &iedges) * # extension: 'standard' adjacency arrays */ __pyx_v_nedges = 0; __pyx_v_iedges = NULL; /* "mpi4py/MPI/Comm.pyx":1331 * index = getarray(index, &nnodes, &iindex) * cdef int nedges = 0, *iedges = NULL * edges = getarray(edges, &nedges, &iedges) # <<<<<<<<<<<<<< * # extension: 'standard' adjacency arrays * if iindex[0]==0 and iindex[nnodes-1]==nedges: */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_edges, (&__pyx_v_nedges), (&__pyx_v_iedges)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_edges, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1333 * edges = getarray(edges, &nedges, &iedges) * # extension: 'standard' adjacency arrays * if iindex[0]==0 and iindex[nnodes-1]==nedges: # <<<<<<<<<<<<<< * nnodes -= 1; iindex += 1; * # */ __pyx_t_3 = (((__pyx_v_iindex[0]) == 0) != 0); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = (((__pyx_v_iindex[(__pyx_v_nnodes - 1)]) == __pyx_v_nedges) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1334 * # extension: 'standard' adjacency arrays * if iindex[0]==0 and iindex[nnodes-1]==nedges: * nnodes -= 1; iindex += 1; # <<<<<<<<<<<<<< * # * cdef Graphcomm comm = Graphcomm.__new__(Graphcomm) */ __pyx_v_nnodes = (__pyx_v_nnodes - 1); __pyx_v_iindex = (__pyx_v_iindex + 1); /* "mpi4py/MPI/Comm.pyx":1333 * edges = getarray(edges, &nedges, &iedges) * # extension: 'standard' adjacency arrays * if iindex[0]==0 and iindex[nnodes-1]==nedges: # <<<<<<<<<<<<<< * nnodes -= 1; iindex += 1; * # */ } /* "mpi4py/MPI/Comm.pyx":1336 * nnodes -= 1; iindex += 1; * # * cdef Graphcomm comm = Graphcomm.__new__(Graphcomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Graph_create( * self.ob_mpi, nnodes, iindex, iedges, reorder, &comm.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Graphcomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Graphcomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1336, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPIGraphcommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":1337 * # * cdef Graphcomm comm = Graphcomm.__new__(Graphcomm) * with nogil: CHKERR( MPI_Graph_create( # <<<<<<<<<<<<<< * self.ob_mpi, nnodes, iindex, iedges, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1338 * cdef Graphcomm comm = Graphcomm.__new__(Graphcomm) * with nogil: CHKERR( MPI_Graph_create( * self.ob_mpi, nnodes, iindex, iedges, reorder, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Graph_create(__pyx_v_self->__pyx_base.ob_mpi, __pyx_v_nnodes, __pyx_v_iindex, __pyx_v_iedges, __pyx_v_reorder, (&__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 1337, __pyx_L7_error) } /* "mpi4py/MPI/Comm.pyx":1337 * # * cdef Graphcomm comm = Graphcomm.__new__(Graphcomm) * with nogil: CHKERR( MPI_Graph_create( # <<<<<<<<<<<<<< * self.ob_mpi, nnodes, iindex, iedges, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L8:; } } /* "mpi4py/MPI/Comm.pyx":1339 * with nogil: CHKERR( MPI_Graph_create( * self.ob_mpi, nnodes, iindex, iedges, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 1339, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1340 * self.ob_mpi, nnodes, iindex, iedges, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Create_dist_graph_adjacent(self, sources, destinations, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1324 * return comm * * def Create_graph(self, index, edges, bint reorder=False): # <<<<<<<<<<<<<< * """ * Create graph communicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_edges); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1342 * return comm * * def Create_dist_graph_adjacent(self, sources, destinations, # <<<<<<<<<<<<<< * sourceweights=None, destweights=None, * Info info=INFO_NULL, bint reorder=False): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_7Create_dist_graph_adjacent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_6Create_dist_graph_adjacent[] = "Intracomm.Create_dist_graph_adjacent(self, sources, destinations, sourceweights=None, destweights=None, Info info=INFO_NULL, bool reorder=False)\n\n Create distributed graph communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_7Create_dist_graph_adjacent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sources = 0; PyObject *__pyx_v_destinations = 0; PyObject *__pyx_v_sourceweights = 0; PyObject *__pyx_v_destweights = 0; struct PyMPIInfoObject *__pyx_v_info = 0; int __pyx_v_reorder; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_dist_graph_adjacent (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sources,&__pyx_n_s_destinations,&__pyx_n_s_sourceweights,&__pyx_n_s_destweights,&__pyx_n_s_info,&__pyx_n_s_reorder,0}; PyObject* values[6] = {0,0,0,0,0,0}; /* "mpi4py/MPI/Comm.pyx":1343 * * def Create_dist_graph_adjacent(self, sources, destinations, * sourceweights=None, destweights=None, # <<<<<<<<<<<<<< * Info info=INFO_NULL, bint reorder=False): * """ */ values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); values[4] = (PyObject *)__pyx_k__82; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sources)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_destinations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_dist_graph_adjacent", 0, 2, 6, 1); __PYX_ERR(7, 1342, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourceweights); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_destweights); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reorder); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_dist_graph_adjacent") < 0)) __PYX_ERR(7, 1342, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sources = values[0]; __pyx_v_destinations = values[1]; __pyx_v_sourceweights = values[2]; __pyx_v_destweights = values[3]; __pyx_v_info = ((struct PyMPIInfoObject *)values[4]); if (values[5]) { __pyx_v_reorder = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_reorder == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1344, __pyx_L3_error) } else { /* "mpi4py/MPI/Comm.pyx":1344 * def Create_dist_graph_adjacent(self, sources, destinations, * sourceweights=None, destweights=None, * Info info=INFO_NULL, bint reorder=False): # <<<<<<<<<<<<<< * """ * Create distributed graph communicator */ __pyx_v_reorder = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_dist_graph_adjacent", 0, 2, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1342, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_dist_graph_adjacent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(7, 1344, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_6Create_dist_graph_adjacent(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_sources, __pyx_v_destinations, __pyx_v_sourceweights, __pyx_v_destweights, __pyx_v_info, __pyx_v_reorder); /* "mpi4py/MPI/Comm.pyx":1342 * return comm * * def Create_dist_graph_adjacent(self, sources, destinations, # <<<<<<<<<<<<<< * sourceweights=None, destweights=None, * Info info=INFO_NULL, bint reorder=False): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_6Create_dist_graph_adjacent(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sources, PyObject *__pyx_v_destinations, PyObject *__pyx_v_sourceweights, PyObject *__pyx_v_destweights, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_reorder) { int __pyx_v_indegree; int *__pyx_v_isource; int __pyx_v_outdegree; int *__pyx_v_idest; int *__pyx_v_isourceweight; int *__pyx_v_idestweight; struct PyMPIDistgraphcommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("Create_dist_graph_adjacent", 0); __Pyx_INCREF(__pyx_v_sources); __Pyx_INCREF(__pyx_v_destinations); __Pyx_INCREF(__pyx_v_sourceweights); __Pyx_INCREF(__pyx_v_destweights); /* "mpi4py/MPI/Comm.pyx":1348 * Create distributed graph communicator * """ * cdef int indegree = 0, *isource = NULL # <<<<<<<<<<<<<< * cdef int outdegree = 0, *idest = NULL * cdef int *isourceweight = MPI_UNWEIGHTED */ __pyx_v_indegree = 0; __pyx_v_isource = NULL; /* "mpi4py/MPI/Comm.pyx":1349 * """ * cdef int indegree = 0, *isource = NULL * cdef int outdegree = 0, *idest = NULL # <<<<<<<<<<<<<< * cdef int *isourceweight = MPI_UNWEIGHTED * cdef int *idestweight = MPI_UNWEIGHTED */ __pyx_v_outdegree = 0; __pyx_v_idest = NULL; /* "mpi4py/MPI/Comm.pyx":1350 * cdef int indegree = 0, *isource = NULL * cdef int outdegree = 0, *idest = NULL * cdef int *isourceweight = MPI_UNWEIGHTED # <<<<<<<<<<<<<< * cdef int *idestweight = MPI_UNWEIGHTED * if sources is not None: */ __pyx_v_isourceweight = MPI_UNWEIGHTED; /* "mpi4py/MPI/Comm.pyx":1351 * cdef int outdegree = 0, *idest = NULL * cdef int *isourceweight = MPI_UNWEIGHTED * cdef int *idestweight = MPI_UNWEIGHTED # <<<<<<<<<<<<<< * if sources is not None: * sources = getarray(sources, &indegree, &isource) */ __pyx_v_idestweight = MPI_UNWEIGHTED; /* "mpi4py/MPI/Comm.pyx":1352 * cdef int *isourceweight = MPI_UNWEIGHTED * cdef int *idestweight = MPI_UNWEIGHTED * if sources is not None: # <<<<<<<<<<<<<< * sources = getarray(sources, &indegree, &isource) * sourceweights = asarray_weights( */ __pyx_t_1 = (__pyx_v_sources != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1353 * cdef int *idestweight = MPI_UNWEIGHTED * if sources is not None: * sources = getarray(sources, &indegree, &isource) # <<<<<<<<<<<<<< * sourceweights = asarray_weights( * sourceweights, indegree, &isourceweight) */ __pyx_t_3 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_sources, (&__pyx_v_indegree), (&__pyx_v_isource)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_sources, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1352 * cdef int *isourceweight = MPI_UNWEIGHTED * cdef int *idestweight = MPI_UNWEIGHTED * if sources is not None: # <<<<<<<<<<<<<< * sources = getarray(sources, &indegree, &isource) * sourceweights = asarray_weights( */ } /* "mpi4py/MPI/Comm.pyx":1354 * if sources is not None: * sources = getarray(sources, &indegree, &isource) * sourceweights = asarray_weights( # <<<<<<<<<<<<<< * sourceweights, indegree, &isourceweight) * if destinations is not None: */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asarray_weights(__pyx_v_sourceweights, __pyx_v_indegree, (&__pyx_v_isourceweight)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_sourceweights, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1356 * sourceweights = asarray_weights( * sourceweights, indegree, &isourceweight) * if destinations is not None: # <<<<<<<<<<<<<< * destinations = getarray(destinations, &outdegree, &idest) * destweights = asarray_weights( */ __pyx_t_2 = (__pyx_v_destinations != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/Comm.pyx":1357 * sourceweights, indegree, &isourceweight) * if destinations is not None: * destinations = getarray(destinations, &outdegree, &idest) # <<<<<<<<<<<<<< * destweights = asarray_weights( * destweights, outdegree, &idestweight) */ __pyx_t_3 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_destinations, (&__pyx_v_outdegree), (&__pyx_v_idest)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_destinations, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1356 * sourceweights = asarray_weights( * sourceweights, indegree, &isourceweight) * if destinations is not None: # <<<<<<<<<<<<<< * destinations = getarray(destinations, &outdegree, &idest) * destweights = asarray_weights( */ } /* "mpi4py/MPI/Comm.pyx":1358 * if destinations is not None: * destinations = getarray(destinations, &outdegree, &idest) * destweights = asarray_weights( # <<<<<<<<<<<<<< * destweights, outdegree, &idestweight) * # */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asarray_weights(__pyx_v_destweights, __pyx_v_outdegree, (&__pyx_v_idestweight)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_destweights, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1362 * # * cdef Distgraphcomm comm = \ * Distgraphcomm.__new__(Distgraphcomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Dist_graph_create_adjacent( * self.ob_mpi, */ __pyx_t_3 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Distgraphcomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Distgraphcomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1362, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_comm = ((struct PyMPIDistgraphcommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":1363 * cdef Distgraphcomm comm = \ * Distgraphcomm.__new__(Distgraphcomm) * with nogil: CHKERR( MPI_Dist_graph_create_adjacent( # <<<<<<<<<<<<<< * self.ob_mpi, * indegree, isource, isourceweight, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1367 * indegree, isource, isourceweight, * outdegree, idest, idestweight, * info.ob_mpi, reorder, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Dist_graph_create_adjacent(__pyx_v_self->__pyx_base.ob_mpi, __pyx_v_indegree, __pyx_v_isource, __pyx_v_isourceweight, __pyx_v_outdegree, __pyx_v_idest, __pyx_v_idestweight, __pyx_v_info->ob_mpi, __pyx_v_reorder, (&__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 1363, __pyx_L6_error) } /* "mpi4py/MPI/Comm.pyx":1363 * cdef Distgraphcomm comm = \ * Distgraphcomm.__new__(Distgraphcomm) * with nogil: CHKERR( MPI_Dist_graph_create_adjacent( # <<<<<<<<<<<<<< * self.ob_mpi, * indegree, isource, isourceweight, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7; } __pyx_L6_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L7:; } } /* "mpi4py/MPI/Comm.pyx":1368 * outdegree, idest, idestweight, * info.ob_mpi, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(7, 1368, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1369 * info.ob_mpi, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Create_dist_graph(self, sources, degrees, destinations, weights=None, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1342 * return comm * * def Create_dist_graph_adjacent(self, sources, destinations, # <<<<<<<<<<<<<< * sourceweights=None, destweights=None, * Info info=INFO_NULL, bint reorder=False): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_dist_graph_adjacent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XDECREF(__pyx_v_sources); __Pyx_XDECREF(__pyx_v_destinations); __Pyx_XDECREF(__pyx_v_sourceweights); __Pyx_XDECREF(__pyx_v_destweights); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1371 * return comm * * def Create_dist_graph(self, sources, degrees, destinations, weights=None, # <<<<<<<<<<<<<< * Info info=INFO_NULL, bint reorder=False): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_9Create_dist_graph(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_8Create_dist_graph[] = "Intracomm.Create_dist_graph(self, sources, degrees, destinations, weights=None, Info info=INFO_NULL, bool reorder=False)\n\n Create distributed graph communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_9Create_dist_graph(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sources = 0; PyObject *__pyx_v_degrees = 0; PyObject *__pyx_v_destinations = 0; PyObject *__pyx_v_weights = 0; struct PyMPIInfoObject *__pyx_v_info = 0; int __pyx_v_reorder; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_dist_graph (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sources,&__pyx_n_s_degrees,&__pyx_n_s_destinations,&__pyx_n_s_weights,&__pyx_n_s_info,&__pyx_n_s_reorder,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[3] = ((PyObject *)Py_None); values[4] = (PyObject *)__pyx_k__83; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sources)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_degrees)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_dist_graph", 0, 3, 6, 1); __PYX_ERR(7, 1371, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_destinations)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_dist_graph", 0, 3, 6, 2); __PYX_ERR(7, 1371, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_weights); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reorder); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_dist_graph") < 0)) __PYX_ERR(7, 1371, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sources = values[0]; __pyx_v_degrees = values[1]; __pyx_v_destinations = values[2]; __pyx_v_weights = values[3]; __pyx_v_info = ((struct PyMPIInfoObject *)values[4]); if (values[5]) { __pyx_v_reorder = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_reorder == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1372, __pyx_L3_error) } else { /* "mpi4py/MPI/Comm.pyx":1372 * * def Create_dist_graph(self, sources, degrees, destinations, weights=None, * Info info=INFO_NULL, bint reorder=False): # <<<<<<<<<<<<<< * """ * Create distributed graph communicator */ __pyx_v_reorder = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_dist_graph", 0, 3, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1371, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_dist_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(7, 1372, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_8Create_dist_graph(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_sources, __pyx_v_degrees, __pyx_v_destinations, __pyx_v_weights, __pyx_v_info, __pyx_v_reorder); /* "mpi4py/MPI/Comm.pyx":1371 * return comm * * def Create_dist_graph(self, sources, degrees, destinations, weights=None, # <<<<<<<<<<<<<< * Info info=INFO_NULL, bint reorder=False): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_8Create_dist_graph(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sources, PyObject *__pyx_v_degrees, PyObject *__pyx_v_destinations, PyObject *__pyx_v_weights, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_reorder) { int __pyx_v_nv; int __pyx_v_ne; int __pyx_v_i; int *__pyx_v_isource; int *__pyx_v_idegree; int *__pyx_v_idest; int *__pyx_v_iweight; struct PyMPIDistgraphcommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Create_dist_graph", 0); __Pyx_INCREF(__pyx_v_sources); __Pyx_INCREF(__pyx_v_degrees); __Pyx_INCREF(__pyx_v_destinations); __Pyx_INCREF(__pyx_v_weights); /* "mpi4py/MPI/Comm.pyx":1376 * Create distributed graph communicator * """ * cdef int nv = 0, ne = 0, i = 0 # <<<<<<<<<<<<<< * cdef int *isource = NULL, *idegree = NULL, * cdef int *idest = NULL, *iweight = MPI_UNWEIGHTED */ __pyx_v_nv = 0; __pyx_v_ne = 0; __pyx_v_i = 0; /* "mpi4py/MPI/Comm.pyx":1377 * """ * cdef int nv = 0, ne = 0, i = 0 * cdef int *isource = NULL, *idegree = NULL, # <<<<<<<<<<<<<< * cdef int *idest = NULL, *iweight = MPI_UNWEIGHTED * sources = getarray(sources, &nv, &isource) */ __pyx_v_isource = NULL; __pyx_v_idegree = NULL; /* "mpi4py/MPI/Comm.pyx":1378 * cdef int nv = 0, ne = 0, i = 0 * cdef int *isource = NULL, *idegree = NULL, * cdef int *idest = NULL, *iweight = MPI_UNWEIGHTED # <<<<<<<<<<<<<< * sources = getarray(sources, &nv, &isource) * degrees = chkarray(degrees, nv, &idegree) */ __pyx_v_idest = NULL; __pyx_v_iweight = MPI_UNWEIGHTED; /* "mpi4py/MPI/Comm.pyx":1379 * cdef int *isource = NULL, *idegree = NULL, * cdef int *idest = NULL, *iweight = MPI_UNWEIGHTED * sources = getarray(sources, &nv, &isource) # <<<<<<<<<<<<<< * degrees = chkarray(degrees, nv, &idegree) * for i from 0 <= i < nv: ne += idegree[i] */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_sources, (&__pyx_v_nv), (&__pyx_v_isource)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_sources, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1380 * cdef int *idest = NULL, *iweight = MPI_UNWEIGHTED * sources = getarray(sources, &nv, &isource) * degrees = chkarray(degrees, nv, &idegree) # <<<<<<<<<<<<<< * for i from 0 <= i < nv: ne += idegree[i] * destinations = chkarray(destinations, ne, &idest) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_degrees, __pyx_v_nv, (&__pyx_v_idegree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_degrees, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1381 * sources = getarray(sources, &nv, &isource) * degrees = chkarray(degrees, nv, &idegree) * for i from 0 <= i < nv: ne += idegree[i] # <<<<<<<<<<<<<< * destinations = chkarray(destinations, ne, &idest) * weights = asarray_weights(weights, ne, &iweight) */ __pyx_t_2 = __pyx_v_nv; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { __pyx_v_ne = (__pyx_v_ne + (__pyx_v_idegree[__pyx_v_i])); } /* "mpi4py/MPI/Comm.pyx":1382 * degrees = chkarray(degrees, nv, &idegree) * for i from 0 <= i < nv: ne += idegree[i] * destinations = chkarray(destinations, ne, &idest) # <<<<<<<<<<<<<< * weights = asarray_weights(weights, ne, &iweight) * # */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_destinations, __pyx_v_ne, (&__pyx_v_idest)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_destinations, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1383 * for i from 0 <= i < nv: ne += idegree[i] * destinations = chkarray(destinations, ne, &idest) * weights = asarray_weights(weights, ne, &iweight) # <<<<<<<<<<<<<< * # * cdef Distgraphcomm comm = \ */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asarray_weights(__pyx_v_weights, __pyx_v_ne, (&__pyx_v_iweight)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_weights, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1386 * # * cdef Distgraphcomm comm = \ * Distgraphcomm.__new__(Distgraphcomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Dist_graph_create( * self.ob_mpi, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Distgraphcomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Distgraphcomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1386, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPIDistgraphcommObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1387 * cdef Distgraphcomm comm = \ * Distgraphcomm.__new__(Distgraphcomm) * with nogil: CHKERR( MPI_Dist_graph_create( # <<<<<<<<<<<<<< * self.ob_mpi, * nv, isource, idegree, idest, iweight, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1390 * self.ob_mpi, * nv, isource, idegree, idest, iweight, * info.ob_mpi, reorder, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Dist_graph_create(__pyx_v_self->__pyx_base.ob_mpi, __pyx_v_nv, __pyx_v_isource, __pyx_v_idegree, __pyx_v_idest, __pyx_v_iweight, __pyx_v_info->ob_mpi, __pyx_v_reorder, (&__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1387, __pyx_L6_error) } /* "mpi4py/MPI/Comm.pyx":1387 * cdef Distgraphcomm comm = \ * Distgraphcomm.__new__(Distgraphcomm) * with nogil: CHKERR( MPI_Dist_graph_create( # <<<<<<<<<<<<<< * self.ob_mpi, * nv, isource, idegree, idest, iweight, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7; } __pyx_L6_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L7:; } } /* "mpi4py/MPI/Comm.pyx":1391 * nv, isource, idegree, idest, iweight, * info.ob_mpi, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1391, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1392 * info.ob_mpi, reorder, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Create_intercomm(self, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1371 * return comm * * def Create_dist_graph(self, sources, degrees, destinations, weights=None, # <<<<<<<<<<<<<< * Info info=INFO_NULL, bint reorder=False): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_dist_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XDECREF(__pyx_v_sources); __Pyx_XDECREF(__pyx_v_degrees); __Pyx_XDECREF(__pyx_v_destinations); __Pyx_XDECREF(__pyx_v_weights); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1394 * return comm * * def Create_intercomm(self, # <<<<<<<<<<<<<< * int local_leader, * Intracomm peer_comm, */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_11Create_intercomm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_10Create_intercomm[] = "Intracomm.Create_intercomm(self, int local_leader, Intracomm peer_comm, int remote_leader, int tag=0)\n\n Create intercommunicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_11Create_intercomm(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_local_leader; struct PyMPIIntracommObject *__pyx_v_peer_comm = 0; int __pyx_v_remote_leader; int __pyx_v_tag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_intercomm (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_local_leader,&__pyx_n_s_peer_comm,&__pyx_n_s_remote_leader,&__pyx_n_s_tag,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_local_leader)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_peer_comm)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_intercomm", 0, 3, 4, 1); __PYX_ERR(7, 1394, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_remote_leader)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Create_intercomm", 0, 3, 4, 2); __PYX_ERR(7, 1394, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_intercomm") < 0)) __PYX_ERR(7, 1394, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_local_leader = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_local_leader == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1395, __pyx_L3_error) __pyx_v_peer_comm = ((struct PyMPIIntracommObject *)values[1]); __pyx_v_remote_leader = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_remote_leader == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1397, __pyx_L3_error) if (values[3]) { __pyx_v_tag = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_tag == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1398, __pyx_L3_error) } else { __pyx_v_tag = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_intercomm", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1394, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_intercomm", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_peer_comm), __pyx_ptype_6mpi4py_3MPI_Intracomm, 0, "peer_comm", 0))) __PYX_ERR(7, 1396, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_10Create_intercomm(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_local_leader, __pyx_v_peer_comm, __pyx_v_remote_leader, __pyx_v_tag); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_10Create_intercomm(struct PyMPIIntracommObject *__pyx_v_self, int __pyx_v_local_leader, struct PyMPIIntracommObject *__pyx_v_peer_comm, int __pyx_v_remote_leader, int __pyx_v_tag) { struct PyMPIIntercommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_intercomm", 0); /* "mpi4py/MPI/Comm.pyx":1402 * Create intercommunicator * """ * cdef Intercomm comm = Intercomm.__new__(Intercomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Intercomm_create( * self.ob_mpi, local_leader, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Intercomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1402, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPIIntercommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1403 * """ * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Intercomm_create( # <<<<<<<<<<<<<< * self.ob_mpi, local_leader, * peer_comm.ob_mpi, remote_leader, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1406 * self.ob_mpi, local_leader, * peer_comm.ob_mpi, remote_leader, * tag, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Intercomm_create(__pyx_v_self->__pyx_base.ob_mpi, __pyx_v_local_leader, __pyx_v_peer_comm->__pyx_base.ob_mpi, __pyx_v_remote_leader, __pyx_v_tag, (&__pyx_v_comm->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 1403, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1403 * """ * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Intercomm_create( # <<<<<<<<<<<<<< * self.ob_mpi, local_leader, * peer_comm.ob_mpi, remote_leader, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1407 * peer_comm.ob_mpi, remote_leader, * tag, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 1407, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1408 * tag, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * # Low-Level Topology Functions */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1394 * return comm * * def Create_intercomm(self, # <<<<<<<<<<<<<< * int local_leader, * Intracomm peer_comm, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Create_intercomm", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1413 * # ---------------------------- * * def Cart_map(self, dims, periods=None): # <<<<<<<<<<<<<< * """ * Return an optimal placement for the */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_13Cart_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_12Cart_map[] = "Intracomm.Cart_map(self, dims, periods=None)\n\n Return an optimal placement for the\n calling process on the physical machine\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_13Cart_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dims = 0; PyObject *__pyx_v_periods = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Cart_map (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dims,&__pyx_n_s_periods,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dims)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_periods); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Cart_map") < 0)) __PYX_ERR(7, 1413, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_dims = values[0]; __pyx_v_periods = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Cart_map", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1413, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Cart_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_12Cart_map(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_dims, __pyx_v_periods); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_12Cart_map(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_dims, PyObject *__pyx_v_periods) { int __pyx_v_ndims; int *__pyx_v_idims; int *__pyx_v_iperiods; int __pyx_v_rank; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("Cart_map", 0); __Pyx_INCREF(__pyx_v_dims); __Pyx_INCREF(__pyx_v_periods); /* "mpi4py/MPI/Comm.pyx":1418 * calling process on the physical machine * """ * cdef int ndims = 0, *idims = NULL, *iperiods = NULL # <<<<<<<<<<<<<< * dims = getarray(dims, &ndims, &idims) * if periods is None: periods = False */ __pyx_v_ndims = 0; __pyx_v_idims = NULL; __pyx_v_iperiods = NULL; /* "mpi4py/MPI/Comm.pyx":1419 * """ * cdef int ndims = 0, *idims = NULL, *iperiods = NULL * dims = getarray(dims, &ndims, &idims) # <<<<<<<<<<<<<< * if periods is None: periods = False * if isinstance(periods, bool): periods = [periods] * ndims */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_dims, (&__pyx_v_ndims), (&__pyx_v_idims)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_dims, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1420 * cdef int ndims = 0, *idims = NULL, *iperiods = NULL * dims = getarray(dims, &ndims, &idims) * if periods is None: periods = False # <<<<<<<<<<<<<< * if isinstance(periods, bool): periods = [periods] * ndims * periods = chkarray(periods, ndims, &iperiods) */ __pyx_t_2 = (__pyx_v_periods == Py_None); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_periods, Py_False); } /* "mpi4py/MPI/Comm.pyx":1421 * dims = getarray(dims, &ndims, &idims) * if periods is None: periods = False * if isinstance(periods, bool): periods = [periods] * ndims # <<<<<<<<<<<<<< * periods = chkarray(periods, ndims, &iperiods) * cdef int rank = MPI_PROC_NULL */ __pyx_t_1 = ((PyObject*)&PyBool_Type); __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_IsInstance(__pyx_v_periods, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 1421, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndims<0) ? 0:__pyx_v_ndims)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_ndims; __pyx_temp++) { __Pyx_INCREF(__pyx_v_periods); __Pyx_GIVEREF(__pyx_v_periods); PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_v_periods); } } __Pyx_DECREF_SET(__pyx_v_periods, __pyx_t_1); __pyx_t_1 = 0; } /* "mpi4py/MPI/Comm.pyx":1422 * if periods is None: periods = False * if isinstance(periods, bool): periods = [periods] * ndims * periods = chkarray(periods, ndims, &iperiods) # <<<<<<<<<<<<<< * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Cart_map(self.ob_mpi, ndims, idims, iperiods, &rank) ) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_periods, __pyx_v_ndims, (&__pyx_v_iperiods)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_periods, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1423 * if isinstance(periods, bool): periods = [periods] * ndims * periods = chkarray(periods, ndims, &iperiods) * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Cart_map(self.ob_mpi, ndims, idims, iperiods, &rank) ) * return rank */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/Comm.pyx":1424 * periods = chkarray(periods, ndims, &iperiods) * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Cart_map(self.ob_mpi, ndims, idims, iperiods, &rank) ) # <<<<<<<<<<<<<< * return rank * */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cart_map(__pyx_v_self->__pyx_base.ob_mpi, __pyx_v_ndims, __pyx_v_idims, __pyx_v_iperiods, (&__pyx_v_rank))); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(7, 1424, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1425 * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Cart_map(self.ob_mpi, ndims, idims, iperiods, &rank) ) * return rank # <<<<<<<<<<<<<< * * def Graph_map(self, index, edges): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rank); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1413 * # ---------------------------- * * def Cart_map(self, dims, periods=None): # <<<<<<<<<<<<<< * """ * Return an optimal placement for the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Cart_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dims); __Pyx_XDECREF(__pyx_v_periods); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1427 * return rank * * def Graph_map(self, index, edges): # <<<<<<<<<<<<<< * """ * Return an optimal placement for the */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_15Graph_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_14Graph_map[] = "Intracomm.Graph_map(self, index, edges)\n\n Return an optimal placement for the\n calling process on the physical machine\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_15Graph_map(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_index = 0; PyObject *__pyx_v_edges = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Graph_map (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,&__pyx_n_s_edges,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_edges)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Graph_map", 1, 2, 2, 1); __PYX_ERR(7, 1427, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Graph_map") < 0)) __PYX_ERR(7, 1427, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_index = values[0]; __pyx_v_edges = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Graph_map", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1427, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Graph_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_14Graph_map(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_index, __pyx_v_edges); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_14Graph_map(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_edges) { int __pyx_v_nnodes; int *__pyx_v_iindex; int __pyx_v_nedges; int *__pyx_v_iedges; int __pyx_v_rank; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("Graph_map", 0); __Pyx_INCREF(__pyx_v_index); __Pyx_INCREF(__pyx_v_edges); /* "mpi4py/MPI/Comm.pyx":1432 * calling process on the physical machine * """ * cdef int nnodes = 0, *iindex = NULL # <<<<<<<<<<<<<< * index = getarray(index, &nnodes, &iindex) * cdef int nedges = 0, *iedges = NULL */ __pyx_v_nnodes = 0; __pyx_v_iindex = NULL; /* "mpi4py/MPI/Comm.pyx":1433 * """ * cdef int nnodes = 0, *iindex = NULL * index = getarray(index, &nnodes, &iindex) # <<<<<<<<<<<<<< * cdef int nedges = 0, *iedges = NULL * edges = getarray(edges, &nedges, &iedges) */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_index, (&__pyx_v_nnodes), (&__pyx_v_iindex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1434 * cdef int nnodes = 0, *iindex = NULL * index = getarray(index, &nnodes, &iindex) * cdef int nedges = 0, *iedges = NULL # <<<<<<<<<<<<<< * edges = getarray(edges, &nedges, &iedges) * # extension: accept more 'standard' adjacency arrays */ __pyx_v_nedges = 0; __pyx_v_iedges = NULL; /* "mpi4py/MPI/Comm.pyx":1435 * index = getarray(index, &nnodes, &iindex) * cdef int nedges = 0, *iedges = NULL * edges = getarray(edges, &nedges, &iedges) # <<<<<<<<<<<<<< * # extension: accept more 'standard' adjacency arrays * if iindex[0]==0 and iindex[nnodes-1]==nedges: */ __pyx_t_1 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_getarray(__pyx_v_edges, (&__pyx_v_nedges), (&__pyx_v_iedges)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_edges, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1437 * edges = getarray(edges, &nedges, &iedges) * # extension: accept more 'standard' adjacency arrays * if iindex[0]==0 and iindex[nnodes-1]==nedges: # <<<<<<<<<<<<<< * nnodes -= 1; iindex += 1; * cdef int rank = MPI_PROC_NULL */ __pyx_t_3 = (((__pyx_v_iindex[0]) == 0) != 0); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = (((__pyx_v_iindex[(__pyx_v_nnodes - 1)]) == __pyx_v_nedges) != 0); __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1438 * # extension: accept more 'standard' adjacency arrays * if iindex[0]==0 and iindex[nnodes-1]==nedges: * nnodes -= 1; iindex += 1; # <<<<<<<<<<<<<< * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Graph_map(self.ob_mpi, nnodes, iindex, iedges, &rank) ) */ __pyx_v_nnodes = (__pyx_v_nnodes - 1); __pyx_v_iindex = (__pyx_v_iindex + 1); /* "mpi4py/MPI/Comm.pyx":1437 * edges = getarray(edges, &nedges, &iedges) * # extension: accept more 'standard' adjacency arrays * if iindex[0]==0 and iindex[nnodes-1]==nedges: # <<<<<<<<<<<<<< * nnodes -= 1; iindex += 1; * cdef int rank = MPI_PROC_NULL */ } /* "mpi4py/MPI/Comm.pyx":1439 * if iindex[0]==0 and iindex[nnodes-1]==nedges: * nnodes -= 1; iindex += 1; * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Graph_map(self.ob_mpi, nnodes, iindex, iedges, &rank) ) * return rank */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/Comm.pyx":1440 * nnodes -= 1; iindex += 1; * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Graph_map(self.ob_mpi, nnodes, iindex, iedges, &rank) ) # <<<<<<<<<<<<<< * return rank * */ __pyx_t_4 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Graph_map(__pyx_v_self->__pyx_base.ob_mpi, __pyx_v_nnodes, __pyx_v_iindex, __pyx_v_iedges, (&__pyx_v_rank))); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(7, 1440, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1441 * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Graph_map(self.ob_mpi, nnodes, iindex, iedges, &rank) ) * return rank # <<<<<<<<<<<<<< * * # Global Reduction Operations */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rank); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1427 * return rank * * def Graph_map(self, index, edges): # <<<<<<<<<<<<<< * """ * Return an optimal placement for the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Graph_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_edges); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1448 * # Inclusive Scan * * def Scan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Inclusive Scan */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_17Scan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_16Scan[] = "Intracomm.Scan(self, sendbuf, recvbuf, Op op=SUM)\n\n Inclusive Scan\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_17Scan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Scan (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)__pyx_k__84; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Scan", 0, 2, 3, 1); __PYX_ERR(7, 1448, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Scan") < 0)) __PYX_ERR(7, 1448, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Scan", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1448, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Scan", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 1448, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_16Scan(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_16Scan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Scan", 0); /* "mpi4py/MPI/Comm.pyx":1452 * Inclusive Scan * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_scan(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Scan( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1453 * """ * cdef _p_msg_cco m = message_cco() * m.for_scan(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Scan( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scan(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1453, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1454 * cdef _p_msg_cco m = message_cco() * m.for_scan(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Scan( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1456 * with nogil: CHKERR( MPI_Scan( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Exclusive Scan */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Scan(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->__pyx_base.ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1454, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1454 * cdef _p_msg_cco m = message_cco() * m.for_scan(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Scan( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1448 * # Inclusive Scan * * def Scan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Inclusive Scan */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Scan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1460 * # Exclusive Scan * * def Exscan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Exclusive Scan */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_19Exscan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_18Exscan[] = "Intracomm.Exscan(self, sendbuf, recvbuf, Op op=SUM)\n\n Exclusive Scan\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_19Exscan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Exscan (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)__pyx_k__85; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Exscan", 0, 2, 3, 1); __PYX_ERR(7, 1460, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Exscan") < 0)) __PYX_ERR(7, 1460, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Exscan", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1460, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Exscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 1460, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_18Exscan(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_18Exscan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Exscan", 0); /* "mpi4py/MPI/Comm.pyx":1464 * Exclusive Scan * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_exscan(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Exscan( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1465 * """ * cdef _p_msg_cco m = message_cco() * m.for_exscan(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Exscan( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_exscan(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1465, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1466 * cdef _p_msg_cco m = message_cco() * m.for_exscan(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Exscan( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1468 * with nogil: CHKERR( MPI_Exscan( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Nonblocking */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Exscan(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->__pyx_base.ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1466, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1466 * cdef _p_msg_cco m = message_cco() * m.for_exscan(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Exscan( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1460 * # Exclusive Scan * * def Exscan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Exclusive Scan */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Exscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1472 * # Nonblocking * * def Iscan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Inclusive Scan */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_21Iscan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_20Iscan[] = "Intracomm.Iscan(self, sendbuf, recvbuf, Op op=SUM)\n\n Inclusive Scan\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_21Iscan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iscan (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)__pyx_k__86; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iscan", 0, 2, 3, 1); __PYX_ERR(7, 1472, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iscan") < 0)) __PYX_ERR(7, 1472, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iscan", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1472, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Iscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 1472, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_20Iscan(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_20Iscan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Iscan", 0); /* "mpi4py/MPI/Comm.pyx":1476 * Inclusive Scan * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_scan(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1477 * """ * cdef _p_msg_cco m = message_cco() * m.for_scan(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iscan( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scan(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1477, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1478 * cdef _p_msg_cco m = message_cco() * m.for_scan(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Iscan( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1478, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1479 * m.for_scan(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iscan( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1481 * with nogil: CHKERR( MPI_Iscan( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * return request * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Iscan(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1479, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1479 * m.for_scan(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iscan( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1482 * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) * return request # <<<<<<<<<<<<<< * * def Iexscan(self, sendbuf, recvbuf, Op op=SUM): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1472 * # Nonblocking * * def Iscan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Inclusive Scan */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Iscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1484 * return request * * def Iexscan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Inclusive Scan */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_23Iexscan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_22Iexscan[] = "Intracomm.Iexscan(self, sendbuf, recvbuf, Op op=SUM)\n\n Inclusive Scan\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_23Iexscan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iexscan (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,&__pyx_n_s_op,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)__pyx_k__87; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iexscan", 0, 2, 3, 1); __PYX_ERR(7, 1484, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iexscan") < 0)) __PYX_ERR(7, 1484, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; __pyx_v_op = ((struct PyMPIOpObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iexscan", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1484, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Iexscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(7, 1484, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_22Iexscan(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_22Iexscan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Iexscan", 0); /* "mpi4py/MPI/Comm.pyx":1488 * Inclusive Scan * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_exscan(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1489 * """ * cdef _p_msg_cco m = message_cco() * m.for_exscan(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iexscan( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_exscan(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1489, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1490 * cdef _p_msg_cco m = message_cco() * m.for_exscan(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Iexscan( * m.sbuf, m.rbuf, m.rcount, m.rtype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1490, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1491 * m.for_exscan(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iexscan( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1493 * with nogil: CHKERR( MPI_Iexscan( * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * return request * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Iexscan(__pyx_v_m->sbuf, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_op->ob_mpi, __pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1491, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1491 * m.for_exscan(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Iexscan( # <<<<<<<<<<<<<< * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1494 * m.sbuf, m.rbuf, m.rcount, m.rtype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) * return request # <<<<<<<<<<<<<< * * # Python Communication */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1484 * return request * * def Iexscan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Inclusive Scan */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Iexscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1498 * # Python Communication * # * def scan(self, sendobj, op=SUM): # <<<<<<<<<<<<<< * """Inclusive Scan""" * if op is None: op = SUM */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_25scan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_24scan[] = "Intracomm.scan(self, sendobj, op=SUM)\nInclusive Scan"; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_25scan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; PyObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("scan (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,&__pyx_n_s_op,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k__88; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scan") < 0)) __PYX_ERR(7, 1498, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendobj = values[0]; __pyx_v_op = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("scan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1498, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.scan", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_24scan(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_sendobj, __pyx_v_op); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_24scan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; MPI_Comm __pyx_t_4; __Pyx_RefNannySetupContext("scan", 0); __Pyx_INCREF(__pyx_v_op); /* "mpi4py/MPI/Comm.pyx":1500 * def scan(self, sendobj, op=SUM): * """Inclusive Scan""" * if op is None: op = SUM # <<<<<<<<<<<<<< * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_scan(sendobj, op, comm) */ __pyx_t_1 = (__pyx_v_op == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_op, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/Comm.pyx":1501 * """Inclusive Scan""" * if op is None: op = SUM * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_scan(sendobj, op, comm) * # */ __pyx_t_4 = __pyx_v_self->__pyx_base.ob_mpi; __pyx_v_comm = __pyx_t_4; /* "mpi4py/MPI/Comm.pyx":1502 * if op is None: op = SUM * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_scan(sendobj, op, comm) # <<<<<<<<<<<<<< * # * def exscan(self, sendobj, op=SUM): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_scan(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1498 * # Python Communication * # * def scan(self, sendobj, op=SUM): # <<<<<<<<<<<<<< * """Inclusive Scan""" * if op is None: op = SUM */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.scan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_op); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1504 * return PyMPI_scan(sendobj, op, comm) * # * def exscan(self, sendobj, op=SUM): # <<<<<<<<<<<<<< * """Exclusive Scan""" * if op is None: op = SUM */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_27exscan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_26exscan[] = "Intracomm.exscan(self, sendobj, op=SUM)\nExclusive Scan"; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_27exscan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; PyObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("exscan (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,&__pyx_n_s_op,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k__89; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "exscan") < 0)) __PYX_ERR(7, 1504, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_sendobj = values[0]; __pyx_v_op = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("exscan", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1504, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.exscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_26exscan(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_sendobj, __pyx_v_op); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_26exscan(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_sendobj, PyObject *__pyx_v_op) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; MPI_Comm __pyx_t_4; __Pyx_RefNannySetupContext("exscan", 0); __Pyx_INCREF(__pyx_v_op); /* "mpi4py/MPI/Comm.pyx":1506 * def exscan(self, sendobj, op=SUM): * """Exclusive Scan""" * if op is None: op = SUM # <<<<<<<<<<<<<< * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_exscan(sendobj, op, comm) */ __pyx_t_1 = (__pyx_v_op == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_op, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/Comm.pyx":1507 * """Exclusive Scan""" * if op is None: op = SUM * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_exscan(sendobj, op, comm) * */ __pyx_t_4 = __pyx_v_self->__pyx_base.ob_mpi; __pyx_v_comm = __pyx_t_4; /* "mpi4py/MPI/Comm.pyx":1508 * if op is None: op = SUM * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_exscan(sendobj, op, comm) # <<<<<<<<<<<<<< * * # Establishing Communication */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_f_6mpi4py_3MPI_PyMPI_exscan(__pyx_v_sendobj, __pyx_v_op, __pyx_v_comm); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1504 * return PyMPI_scan(sendobj, op, comm) * # * def exscan(self, sendobj, op=SUM): # <<<<<<<<<<<<<< * """Exclusive Scan""" * if op is None: op = SUM */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.exscan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_op); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1515 * # Starting Processes * * def Spawn(self, command, args=None, int maxprocs=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, int root=0, errcodes=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_29Spawn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_28Spawn[] = "Intracomm.Spawn(self, command, args=None, int maxprocs=1, Info info=INFO_NULL, int root=0, errcodes=None)\n\n Spawn instances of a single MPI application\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_29Spawn(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_command = 0; PyObject *__pyx_v_args = 0; int __pyx_v_maxprocs; struct PyMPIInfoObject *__pyx_v_info = 0; int __pyx_v_root; PyObject *__pyx_v_errcodes = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Spawn (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_command,&__pyx_n_s_args,&__pyx_n_s_maxprocs,&__pyx_n_s_info,&__pyx_n_s_root,&__pyx_n_s_errcodes,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[3] = (PyObject *)__pyx_k__90; /* "mpi4py/MPI/Comm.pyx":1516 * * def Spawn(self, command, args=None, int maxprocs=1, * Info info=INFO_NULL, int root=0, errcodes=None): # <<<<<<<<<<<<<< * """ * Spawn instances of a single MPI application */ values[5] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_command)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxprocs); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errcodes); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Spawn") < 0)) __PYX_ERR(7, 1515, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_command = values[0]; __pyx_v_args = values[1]; if (values[2]) { __pyx_v_maxprocs = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_maxprocs == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1515, __pyx_L3_error) } else { __pyx_v_maxprocs = ((int)1); } __pyx_v_info = ((struct PyMPIInfoObject *)values[3]); if (values[4]) { __pyx_v_root = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1516, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } __pyx_v_errcodes = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Spawn", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1515, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Spawn", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(7, 1516, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_28Spawn(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_command, __pyx_v_args, __pyx_v_maxprocs, __pyx_v_info, __pyx_v_root, __pyx_v_errcodes); /* "mpi4py/MPI/Comm.pyx":1515 * # Starting Processes * * def Spawn(self, command, args=None, int maxprocs=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, int root=0, errcodes=None): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_28Spawn(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_command, PyObject *__pyx_v_args, int __pyx_v_maxprocs, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_root, PyObject *__pyx_v_errcodes) { char *__pyx_v_cmd; char **__pyx_v_argv; int *__pyx_v_ierrcodes; int __pyx_v_rank; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp3 = 0; struct PyMPIIntercommObject *__pyx_v_comm = 0; int __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("Spawn", 0); /* "mpi4py/MPI/Comm.pyx":1520 * Spawn instances of a single MPI application * """ * cdef char *cmd = NULL # <<<<<<<<<<<<<< * cdef char **argv = MPI_ARGV_NULL * cdef int *ierrcodes = MPI_ERRCODES_IGNORE */ __pyx_v_cmd = NULL; /* "mpi4py/MPI/Comm.pyx":1521 * """ * cdef char *cmd = NULL * cdef char **argv = MPI_ARGV_NULL # <<<<<<<<<<<<<< * cdef int *ierrcodes = MPI_ERRCODES_IGNORE * # */ __pyx_v_argv = MPI_ARGV_NULL; /* "mpi4py/MPI/Comm.pyx":1522 * cdef char *cmd = NULL * cdef char **argv = MPI_ARGV_NULL * cdef int *ierrcodes = MPI_ERRCODES_IGNORE # <<<<<<<<<<<<<< * # * cdef int rank = MPI_UNDEFINED */ __pyx_v_ierrcodes = MPI_ERRCODES_IGNORE; /* "mpi4py/MPI/Comm.pyx":1524 * cdef int *ierrcodes = MPI_ERRCODES_IGNORE * # * cdef int rank = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * cdef tmp1, tmp2, tmp3 */ __pyx_v_rank = MPI_UNDEFINED; /* "mpi4py/MPI/Comm.pyx":1525 * # * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) # <<<<<<<<<<<<<< * cdef tmp1, tmp2, tmp3 * if root == rank: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1525, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1527 * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * cdef tmp1, tmp2, tmp3 * if root == rank: # <<<<<<<<<<<<<< * tmp1 = asmpistr(command, &cmd) * tmp2 = asarray_argv(args, &argv) */ __pyx_t_2 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1528 * cdef tmp1, tmp2, tmp3 * if root == rank: * tmp1 = asmpistr(command, &cmd) # <<<<<<<<<<<<<< * tmp2 = asarray_argv(args, &argv) * if errcodes is not None: */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_command, (&__pyx_v_cmd)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1529 * if root == rank: * tmp1 = asmpistr(command, &cmd) * tmp2 = asarray_argv(args, &argv) # <<<<<<<<<<<<<< * if errcodes is not None: * tmp3 = newarray(maxprocs, &ierrcodes) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asarray_argv(__pyx_v_args, (&__pyx_v_argv)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp2 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1527 * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * cdef tmp1, tmp2, tmp3 * if root == rank: # <<<<<<<<<<<<<< * tmp1 = asmpistr(command, &cmd) * tmp2 = asarray_argv(args, &argv) */ } /* "mpi4py/MPI/Comm.pyx":1530 * tmp1 = asmpistr(command, &cmd) * tmp2 = asarray_argv(args, &argv) * if errcodes is not None: # <<<<<<<<<<<<<< * tmp3 = newarray(maxprocs, &ierrcodes) * # */ __pyx_t_2 = (__pyx_v_errcodes != Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/Comm.pyx":1531 * tmp2 = asarray_argv(args, &argv) * if errcodes is not None: * tmp3 = newarray(maxprocs, &ierrcodes) # <<<<<<<<<<<<<< * # * cdef Intercomm comm = Intercomm.__new__(Intercomm) */ __pyx_t_3 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_maxprocs, (&__pyx_v_ierrcodes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp3 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1530 * tmp1 = asmpistr(command, &cmd) * tmp2 = asarray_argv(args, &argv) * if errcodes is not None: # <<<<<<<<<<<<<< * tmp3 = newarray(maxprocs, &ierrcodes) * # */ } /* "mpi4py/MPI/Comm.pyx":1533 * tmp3 = newarray(maxprocs, &ierrcodes) * # * cdef Intercomm comm = Intercomm.__new__(Intercomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_spawn( * cmd, argv, maxprocs, info.ob_mpi, root, */ __pyx_t_3 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Intercomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1533, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_5 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_comm = ((struct PyMPIIntercommObject *)__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Comm.pyx":1534 * # * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_spawn( # <<<<<<<<<<<<<< * cmd, argv, maxprocs, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi, ierrcodes) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1536 * with nogil: CHKERR( MPI_Comm_spawn( * cmd, argv, maxprocs, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi, ierrcodes) ) # <<<<<<<<<<<<<< * # * cdef int i=0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_spawn(__pyx_v_cmd, __pyx_v_argv, __pyx_v_maxprocs, __pyx_v_info->ob_mpi, __pyx_v_root, __pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_comm->__pyx_base.ob_mpi), __pyx_v_ierrcodes)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1534, __pyx_L6_error) } /* "mpi4py/MPI/Comm.pyx":1534 * # * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_spawn( # <<<<<<<<<<<<<< * cmd, argv, maxprocs, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi, ierrcodes) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L7; } __pyx_L6_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L7:; } } /* "mpi4py/MPI/Comm.pyx":1538 * self.ob_mpi, &comm.ob_mpi, ierrcodes) ) * # * cdef int i=0 # <<<<<<<<<<<<<< * if errcodes is not None: * errcodes[:] = [ierrcodes[i] for i from 0 <= i < maxprocs] */ __pyx_v_i = 0; /* "mpi4py/MPI/Comm.pyx":1539 * # * cdef int i=0 * if errcodes is not None: # <<<<<<<<<<<<<< * errcodes[:] = [ierrcodes[i] for i from 0 <= i < maxprocs] * # */ __pyx_t_4 = (__pyx_v_errcodes != Py_None); __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1540 * cdef int i=0 * if errcodes is not None: * errcodes[:] = [ierrcodes[i] for i from 0 <= i < maxprocs] # <<<<<<<<<<<<<< * # * comm_set_eh(comm.ob_mpi) */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_v_maxprocs; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_ierrcodes[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 1540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (__Pyx_PyObject_SetSlice(__pyx_v_errcodes, __pyx_t_5, 0, 0, NULL, NULL, &__pyx_slice__91, 0, 0, 1) < 0) __PYX_ERR(7, 1540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Comm.pyx":1539 * # * cdef int i=0 * if errcodes is not None: # <<<<<<<<<<<<<< * errcodes[:] = [ierrcodes[i] for i from 0 <= i < maxprocs] * # */ } /* "mpi4py/MPI/Comm.pyx":1542 * errcodes[:] = [ierrcodes[i] for i from 0 <= i < maxprocs] * # * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.ob_mpi); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1542, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1543 * # * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * def Spawn_multiple(self, command, args=None, maxprocs=None, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1515 * # Starting Processes * * def Spawn(self, command, args=None, int maxprocs=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, int root=0, errcodes=None): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Spawn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_tmp3); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1545 * return comm * * def Spawn_multiple(self, command, args=None, maxprocs=None, # <<<<<<<<<<<<<< * info=INFO_NULL, int root=0, errcodes=None): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_31Spawn_multiple(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_30Spawn_multiple[] = "Intracomm.Spawn_multiple(self, command, args=None, maxprocs=None, info=INFO_NULL, int root=0, errcodes=None)\n\n Spawn instances of multiple MPI applications\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_31Spawn_multiple(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_command = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_maxprocs = 0; PyObject *__pyx_v_info = 0; int __pyx_v_root; PyObject *__pyx_v_errcodes = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Spawn_multiple (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_command,&__pyx_n_s_args,&__pyx_n_s_maxprocs,&__pyx_n_s_info,&__pyx_n_s_root,&__pyx_n_s_errcodes,0}; PyObject* values[6] = {0,0,0,0,0,0}; values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = __pyx_k__92; /* "mpi4py/MPI/Comm.pyx":1546 * * def Spawn_multiple(self, command, args=None, maxprocs=None, * info=INFO_NULL, int root=0, errcodes=None): # <<<<<<<<<<<<<< * """ * Spawn instances of multiple MPI applications */ values[5] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_command)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_args); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxprocs); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[4] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 5: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errcodes); if (value) { values[5] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Spawn_multiple") < 0)) __PYX_ERR(7, 1545, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_command = values[0]; __pyx_v_args = values[1]; __pyx_v_maxprocs = values[2]; __pyx_v_info = values[3]; if (values[4]) { __pyx_v_root = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1546, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } __pyx_v_errcodes = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Spawn_multiple", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1545, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Spawn_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_30Spawn_multiple(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_command, __pyx_v_args, __pyx_v_maxprocs, __pyx_v_info, __pyx_v_root, __pyx_v_errcodes); /* "mpi4py/MPI/Comm.pyx":1545 * return comm * * def Spawn_multiple(self, command, args=None, maxprocs=None, # <<<<<<<<<<<<<< * info=INFO_NULL, int root=0, errcodes=None): * """ */ /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_30Spawn_multiple(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_command, PyObject *__pyx_v_args, PyObject *__pyx_v_maxprocs, PyObject *__pyx_v_info, int __pyx_v_root, PyObject *__pyx_v_errcodes) { int __pyx_v_count; char **__pyx_v_cmds; char ***__pyx_v_argvs; MPI_Info *__pyx_v_infos; int *__pyx_v_imaxprocs; int *__pyx_v_ierrcodes; int __pyx_v_rank; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp3 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp4 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp5 = 0; int __pyx_v_i; int __pyx_v_np; struct PyMPIIntercommObject *__pyx_v_comm = 0; int __pyx_v_j; int __pyx_v_p; int __pyx_v_q; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; __Pyx_RefNannySetupContext("Spawn_multiple", 0); /* "mpi4py/MPI/Comm.pyx":1550 * Spawn instances of multiple MPI applications * """ * cdef int count = 0 # <<<<<<<<<<<<<< * cdef char **cmds = NULL * cdef char ***argvs = MPI_ARGVS_NULL */ __pyx_v_count = 0; /* "mpi4py/MPI/Comm.pyx":1551 * """ * cdef int count = 0 * cdef char **cmds = NULL # <<<<<<<<<<<<<< * cdef char ***argvs = MPI_ARGVS_NULL * cdef MPI_Info *infos = NULL */ __pyx_v_cmds = NULL; /* "mpi4py/MPI/Comm.pyx":1552 * cdef int count = 0 * cdef char **cmds = NULL * cdef char ***argvs = MPI_ARGVS_NULL # <<<<<<<<<<<<<< * cdef MPI_Info *infos = NULL * cdef int *imaxprocs = NULL */ __pyx_v_argvs = MPI_ARGVS_NULL; /* "mpi4py/MPI/Comm.pyx":1553 * cdef char **cmds = NULL * cdef char ***argvs = MPI_ARGVS_NULL * cdef MPI_Info *infos = NULL # <<<<<<<<<<<<<< * cdef int *imaxprocs = NULL * cdef int *ierrcodes = MPI_ERRCODES_IGNORE */ __pyx_v_infos = NULL; /* "mpi4py/MPI/Comm.pyx":1554 * cdef char ***argvs = MPI_ARGVS_NULL * cdef MPI_Info *infos = NULL * cdef int *imaxprocs = NULL # <<<<<<<<<<<<<< * cdef int *ierrcodes = MPI_ERRCODES_IGNORE * # */ __pyx_v_imaxprocs = NULL; /* "mpi4py/MPI/Comm.pyx":1555 * cdef MPI_Info *infos = NULL * cdef int *imaxprocs = NULL * cdef int *ierrcodes = MPI_ERRCODES_IGNORE # <<<<<<<<<<<<<< * # * cdef int rank = MPI_UNDEFINED */ __pyx_v_ierrcodes = MPI_ERRCODES_IGNORE; /* "mpi4py/MPI/Comm.pyx":1557 * cdef int *ierrcodes = MPI_ERRCODES_IGNORE * # * cdef int rank = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * cdef tmp1, tmp2, tmp3, tmp4, tmp5 */ __pyx_v_rank = MPI_UNDEFINED; /* "mpi4py/MPI/Comm.pyx":1558 * # * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) # <<<<<<<<<<<<<< * cdef tmp1, tmp2, tmp3, tmp4, tmp5 * if root == rank: */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1558, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1560 * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * cdef tmp1, tmp2, tmp3, tmp4, tmp5 * if root == rank: # <<<<<<<<<<<<<< * tmp1 = asarray_cmds(command, &count, &cmds) * tmp2 = asarray_argvs(args, count, &argvs) */ __pyx_t_2 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1561 * cdef tmp1, tmp2, tmp3, tmp4, tmp5 * if root == rank: * tmp1 = asarray_cmds(command, &count, &cmds) # <<<<<<<<<<<<<< * tmp2 = asarray_argvs(args, count, &argvs) * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asarray_cmds(__pyx_v_command, (&__pyx_v_count), (&__pyx_v_cmds)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp1 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1562 * if root == rank: * tmp1 = asarray_cmds(command, &count, &cmds) * tmp2 = asarray_argvs(args, count, &argvs) # <<<<<<<<<<<<<< * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) * tmp4 = asarray_Info(info, count, &infos) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asarray_argvs(__pyx_v_args, __pyx_v_count, (&__pyx_v_argvs)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp2 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1563 * tmp1 = asarray_cmds(command, &count, &cmds) * tmp2 = asarray_argvs(args, count, &argvs) * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) # <<<<<<<<<<<<<< * tmp4 = asarray_Info(info, count, &infos) * cdef int i=0, np=0 */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asarray_nprocs(__pyx_v_maxprocs, __pyx_v_count, (&__pyx_v_imaxprocs)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp3 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1564 * tmp2 = asarray_argvs(args, count, &argvs) * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) * tmp4 = asarray_Info(info, count, &infos) # <<<<<<<<<<<<<< * cdef int i=0, np=0 * if errcodes is not None: */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asarray_Info(__pyx_v_info, __pyx_v_count, (&__pyx_v_infos)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp4 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1560 * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * cdef tmp1, tmp2, tmp3, tmp4, tmp5 * if root == rank: # <<<<<<<<<<<<<< * tmp1 = asarray_cmds(command, &count, &cmds) * tmp2 = asarray_argvs(args, count, &argvs) */ } /* "mpi4py/MPI/Comm.pyx":1565 * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) * tmp4 = asarray_Info(info, count, &infos) * cdef int i=0, np=0 # <<<<<<<<<<<<<< * if errcodes is not None: * if root != rank: */ __pyx_v_i = 0; __pyx_v_np = 0; /* "mpi4py/MPI/Comm.pyx":1566 * tmp4 = asarray_Info(info, count, &infos) * cdef int i=0, np=0 * if errcodes is not None: # <<<<<<<<<<<<<< * if root != rank: * count = len(maxprocs) */ __pyx_t_2 = (__pyx_v_errcodes != Py_None); __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { /* "mpi4py/MPI/Comm.pyx":1567 * cdef int i=0, np=0 * if errcodes is not None: * if root != rank: # <<<<<<<<<<<<<< * count = len(maxprocs) * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) */ __pyx_t_4 = ((__pyx_v_root != __pyx_v_rank) != 0); if (__pyx_t_4) { /* "mpi4py/MPI/Comm.pyx":1568 * if errcodes is not None: * if root != rank: * count = len(maxprocs) # <<<<<<<<<<<<<< * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) * for i from 0 <= i < count: np += imaxprocs[i] */ __pyx_t_5 = PyObject_Length(__pyx_v_maxprocs); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(7, 1568, __pyx_L1_error) __pyx_v_count = ((int)__pyx_t_5); /* "mpi4py/MPI/Comm.pyx":1569 * if root != rank: * count = len(maxprocs) * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) # <<<<<<<<<<<<<< * for i from 0 <= i < count: np += imaxprocs[i] * tmp5 = newarray(np, &ierrcodes) */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asarray_nprocs(__pyx_v_maxprocs, __pyx_v_count, (&__pyx_v_imaxprocs)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_tmp3, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1567 * cdef int i=0, np=0 * if errcodes is not None: * if root != rank: # <<<<<<<<<<<<<< * count = len(maxprocs) * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) */ } /* "mpi4py/MPI/Comm.pyx":1570 * count = len(maxprocs) * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) * for i from 0 <= i < count: np += imaxprocs[i] # <<<<<<<<<<<<<< * tmp5 = newarray(np, &ierrcodes) * # */ __pyx_t_1 = __pyx_v_count; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_v_np = (__pyx_v_np + (__pyx_v_imaxprocs[__pyx_v_i])); } /* "mpi4py/MPI/Comm.pyx":1571 * tmp3 = asarray_nprocs(maxprocs, count, &imaxprocs) * for i from 0 <= i < count: np += imaxprocs[i] * tmp5 = newarray(np, &ierrcodes) # <<<<<<<<<<<<<< * # * cdef Intercomm comm = Intercomm.__new__(Intercomm) */ __pyx_t_3 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_np, (&__pyx_v_ierrcodes)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_tmp5 = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1566 * tmp4 = asarray_Info(info, count, &infos) * cdef int i=0, np=0 * if errcodes is not None: # <<<<<<<<<<<<<< * if root != rank: * count = len(maxprocs) */ } /* "mpi4py/MPI/Comm.pyx":1573 * tmp5 = newarray(np, &ierrcodes) * # * cdef Intercomm comm = Intercomm.__new__(Intercomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_spawn_multiple( * count, cmds, argvs, imaxprocs, infos, root, */ __pyx_t_3 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Intercomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1573, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_6 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_comm = ((struct PyMPIIntercommObject *)__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/Comm.pyx":1574 * # * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_spawn_multiple( # <<<<<<<<<<<<<< * count, cmds, argvs, imaxprocs, infos, root, * self.ob_mpi, &comm.ob_mpi, ierrcodes) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1576 * with nogil: CHKERR( MPI_Comm_spawn_multiple( * count, cmds, argvs, imaxprocs, infos, root, * self.ob_mpi, &comm.ob_mpi, ierrcodes) ) # <<<<<<<<<<<<<< * # * cdef int j=0, p=0, q=0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_spawn_multiple(__pyx_v_count, __pyx_v_cmds, __pyx_v_argvs, __pyx_v_imaxprocs, __pyx_v_infos, __pyx_v_root, __pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_comm->__pyx_base.ob_mpi), __pyx_v_ierrcodes)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1574, __pyx_L9_error) } /* "mpi4py/MPI/Comm.pyx":1574 * # * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_spawn_multiple( # <<<<<<<<<<<<<< * count, cmds, argvs, imaxprocs, infos, root, * self.ob_mpi, &comm.ob_mpi, ierrcodes) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L10; } __pyx_L9_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L10:; } } /* "mpi4py/MPI/Comm.pyx":1578 * self.ob_mpi, &comm.ob_mpi, ierrcodes) ) * # * cdef int j=0, p=0, q=0 # <<<<<<<<<<<<<< * if errcodes is not None: * errcodes[:] = [[] for j from 0 <= j < count] */ __pyx_v_j = 0; __pyx_v_p = 0; __pyx_v_q = 0; /* "mpi4py/MPI/Comm.pyx":1579 * # * cdef int j=0, p=0, q=0 * if errcodes is not None: # <<<<<<<<<<<<<< * errcodes[:] = [[] for j from 0 <= j < count] * for i from 0 <= i < count: */ __pyx_t_4 = (__pyx_v_errcodes != Py_None); __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1580 * cdef int j=0, p=0, q=0 * if errcodes is not None: * errcodes[:] = [[] for j from 0 <= j < count] # <<<<<<<<<<<<<< * for i from 0 <= i < count: * q = p + imaxprocs[i] */ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_v_count; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) { __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 1580, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } if (__Pyx_PyObject_SetSlice(__pyx_v_errcodes, __pyx_t_6, 0, 0, NULL, NULL, &__pyx_slice__91, 0, 0, 1) < 0) __PYX_ERR(7, 1580, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/Comm.pyx":1581 * if errcodes is not None: * errcodes[:] = [[] for j from 0 <= j < count] * for i from 0 <= i < count: # <<<<<<<<<<<<<< * q = p + imaxprocs[i] * errcodes[i][:] = [ierrcodes[j] for j from p <= j < q] */ __pyx_t_1 = __pyx_v_count; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { /* "mpi4py/MPI/Comm.pyx":1582 * errcodes[:] = [[] for j from 0 <= j < count] * for i from 0 <= i < count: * q = p + imaxprocs[i] # <<<<<<<<<<<<<< * errcodes[i][:] = [ierrcodes[j] for j from p <= j < q] * p = q */ __pyx_v_q = (__pyx_v_p + (__pyx_v_imaxprocs[__pyx_v_i])); /* "mpi4py/MPI/Comm.pyx":1583 * for i from 0 <= i < count: * q = p + imaxprocs[i] * errcodes[i][:] = [ierrcodes[j] for j from p <= j < q] # <<<<<<<<<<<<<< * p = q * # */ __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __pyx_v_q; for (__pyx_v_j = __pyx_v_p; __pyx_v_j < __pyx_t_7; __pyx_v_j++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_ierrcodes[__pyx_v_j])); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 1583, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_errcodes, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetSlice(__pyx_t_3, __pyx_t_6, 0, 0, NULL, NULL, &__pyx_slice__91, 0, 0, 1) < 0) __PYX_ERR(7, 1583, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "mpi4py/MPI/Comm.pyx":1584 * q = p + imaxprocs[i] * errcodes[i][:] = [ierrcodes[j] for j from p <= j < q] * p = q # <<<<<<<<<<<<<< * # * comm_set_eh(comm.ob_mpi) */ __pyx_v_p = __pyx_v_q; } /* "mpi4py/MPI/Comm.pyx":1579 * # * cdef int j=0, p=0, q=0 * if errcodes is not None: # <<<<<<<<<<<<<< * errcodes[:] = [[] for j from 0 <= j < count] * for i from 0 <= i < count: */ } /* "mpi4py/MPI/Comm.pyx":1586 * p = q * # * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.ob_mpi); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1586, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1587 * # * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * # Server Routines */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1545 * return comm * * def Spawn_multiple(self, command, args=None, maxprocs=None, # <<<<<<<<<<<<<< * info=INFO_NULL, int root=0, errcodes=None): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Spawn_multiple", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_tmp3); __Pyx_XDECREF(__pyx_v_tmp4); __Pyx_XDECREF(__pyx_v_tmp5); __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1591 * # Server Routines * * def Accept(self, port_name, Info info=INFO_NULL, int root=0): # <<<<<<<<<<<<<< * """ * Accept a request to form a new intercommunicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_33Accept(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_32Accept[] = "Intracomm.Accept(self, port_name, Info info=INFO_NULL, int root=0)\n\n Accept a request to form a new intercommunicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_33Accept(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_port_name = 0; struct PyMPIInfoObject *__pyx_v_info = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Accept (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_port_name,&__pyx_n_s_info,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; values[1] = (PyObject *)__pyx_k__93; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Accept") < 0)) __PYX_ERR(7, 1591, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_port_name = values[0]; __pyx_v_info = ((struct PyMPIInfoObject *)values[1]); if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1591, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Accept", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1591, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Accept", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(7, 1591, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_32Accept(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_port_name, __pyx_v_info, __pyx_v_root); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_32Accept(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_port_name, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_root) { char *__pyx_v_cportname; int __pyx_v_rank; struct PyMPIIntercommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Accept", 0); __Pyx_INCREF(__pyx_v_port_name); /* "mpi4py/MPI/Comm.pyx":1595 * Accept a request to form a new intercommunicator * """ * cdef char *cportname = NULL # <<<<<<<<<<<<<< * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) */ __pyx_v_cportname = NULL; /* "mpi4py/MPI/Comm.pyx":1596 * """ * cdef char *cportname = NULL * cdef int rank = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * if root == rank: */ __pyx_v_rank = MPI_UNDEFINED; /* "mpi4py/MPI/Comm.pyx":1597 * cdef char *cportname = NULL * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) # <<<<<<<<<<<<<< * if root == rank: * port_name = asmpistr(port_name, &cportname) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1597, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1598 * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) */ __pyx_t_2 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1599 * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * if root == rank: * port_name = asmpistr(port_name, &cportname) # <<<<<<<<<<<<<< * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_accept( */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_port_name, (&__pyx_v_cportname)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_port_name, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1598 * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) */ } /* "mpi4py/MPI/Comm.pyx":1600 * if root == rank: * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_accept( * cportname, info.ob_mpi, root, */ __pyx_t_3 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Intercomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1600, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_comm = ((struct PyMPIIntercommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":1601 * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_accept( # <<<<<<<<<<<<<< * cportname, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1603 * with nogil: CHKERR( MPI_Comm_accept( * cportname, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_accept(__pyx_v_cportname, __pyx_v_info->ob_mpi, __pyx_v_root, __pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_comm->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1601, __pyx_L5_error) } /* "mpi4py/MPI/Comm.pyx":1601 * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_accept( # <<<<<<<<<<<<<< * cportname, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Comm.pyx":1604 * cportname, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.ob_mpi); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1604, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1605 * self.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * # Client Routines */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1591 * # Server Routines * * def Accept(self, port_name, Info info=INFO_NULL, int root=0): # <<<<<<<<<<<<<< * """ * Accept a request to form a new intercommunicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Accept", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XDECREF(__pyx_v_port_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1609 * # Client Routines * * def Connect(self, port_name, Info info=INFO_NULL, int root=0): # <<<<<<<<<<<<<< * """ * Make a request to form a new intercommunicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_35Connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intracomm_34Connect[] = "Intracomm.Connect(self, port_name, Info info=INFO_NULL, int root=0)\n\n Make a request to form a new intercommunicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intracomm_35Connect(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_port_name = 0; struct PyMPIInfoObject *__pyx_v_info = 0; int __pyx_v_root; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Connect (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_port_name,&__pyx_n_s_info,&__pyx_n_s_root,0}; PyObject* values[3] = {0,0,0}; values[1] = (PyObject *)__pyx_k__94; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_root); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Connect") < 0)) __PYX_ERR(7, 1609, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_port_name = values[0]; __pyx_v_info = ((struct PyMPIInfoObject *)values[1]); if (values[2]) { __pyx_v_root = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_root == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1609, __pyx_L3_error) } else { __pyx_v_root = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Connect", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1609, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(7, 1609, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intracomm_34Connect(((struct PyMPIIntracommObject *)__pyx_v_self), __pyx_v_port_name, __pyx_v_info, __pyx_v_root); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intracomm_34Connect(struct PyMPIIntracommObject *__pyx_v_self, PyObject *__pyx_v_port_name, struct PyMPIInfoObject *__pyx_v_info, int __pyx_v_root) { char *__pyx_v_cportname; int __pyx_v_rank; struct PyMPIIntercommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Connect", 0); __Pyx_INCREF(__pyx_v_port_name); /* "mpi4py/MPI/Comm.pyx":1613 * Make a request to form a new intercommunicator * """ * cdef char *cportname = NULL # <<<<<<<<<<<<<< * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) */ __pyx_v_cportname = NULL; /* "mpi4py/MPI/Comm.pyx":1614 * """ * cdef char *cportname = NULL * cdef int rank = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * if root == rank: */ __pyx_v_rank = MPI_UNDEFINED; /* "mpi4py/MPI/Comm.pyx":1615 * cdef char *cportname = NULL * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) # <<<<<<<<<<<<<< * if root == rank: * port_name = asmpistr(port_name, &cportname) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_rank(__pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1615, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1616 * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) */ __pyx_t_2 = ((__pyx_v_root == __pyx_v_rank) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1617 * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * if root == rank: * port_name = asmpistr(port_name, &cportname) # <<<<<<<<<<<<<< * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_connect( */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_port_name, (&__pyx_v_cportname)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_port_name, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1616 * cdef int rank = MPI_UNDEFINED * CHKERR( MPI_Comm_rank(self.ob_mpi, &rank) ) * if root == rank: # <<<<<<<<<<<<<< * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) */ } /* "mpi4py/MPI/Comm.pyx":1618 * if root == rank: * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_connect( * cportname, info.ob_mpi, root, */ __pyx_t_3 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Intercomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Intercomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1618, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_comm = ((struct PyMPIIntercommObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":1619 * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_connect( # <<<<<<<<<<<<<< * cportname, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1621 * with nogil: CHKERR( MPI_Comm_connect( * cportname, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_connect(__pyx_v_cportname, __pyx_v_info->ob_mpi, __pyx_v_root, __pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_comm->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1619, __pyx_L5_error) } /* "mpi4py/MPI/Comm.pyx":1619 * port_name = asmpistr(port_name, &cportname) * cdef Intercomm comm = Intercomm.__new__(Intercomm) * with nogil: CHKERR( MPI_Comm_connect( # <<<<<<<<<<<<<< * cportname, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Comm.pyx":1622 * cportname, info.ob_mpi, root, * self.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.ob_mpi); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1622, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1623 * self.ob_mpi, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1609 * # Client Routines * * def Connect(self, port_name, Info info=INFO_NULL, int root=0): # <<<<<<<<<<<<<< * """ * Make a request to form a new intercommunicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Intracomm.Connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XDECREF(__pyx_v_port_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1632 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_8Topocomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_8Topocomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPICommObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(7, 1632, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1632, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 1, "comm", 0))) __PYX_ERR(7, 1632, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm___cinit__(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_8Topocomm___cinit__(struct PyMPITopocommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm) { int __pyx_v_topo; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Comm.pyx":1633 * * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return # <<<<<<<<<<<<<< * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.ob_mpi == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":1634 * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo == MPI_UNDEFINED: raise TypeError( */ __pyx_v_topo = MPI_UNDEFINED; /* "mpi4py/MPI/Comm.pyx":1635 * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) # <<<<<<<<<<<<<< * if topo == MPI_UNDEFINED: raise TypeError( * "expecting a topology communicator") */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Topo_test(__pyx_v_self->__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_topo))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1635, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1636 * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo == MPI_UNDEFINED: raise TypeError( # <<<<<<<<<<<<<< * "expecting a topology communicator") * */ __pyx_t_1 = ((__pyx_v_topo == MPI_UNDEFINED) != 0); if (unlikely(__pyx_t_1)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(7, 1636, __pyx_L1_error) } /* "mpi4py/MPI/Comm.pyx":1632 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1641 * property degrees: * "number of incoming and outgoing neighbors" * def __get__(self): # <<<<<<<<<<<<<< * cdef object dim, rank * cdef object nneighbors */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_7degrees_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_7degrees_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_7degrees___get__(((struct PyMPITopocommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_7degrees___get__(struct PyMPITopocommObject *__pyx_v_self) { PyObject *__pyx_v_dim = 0; PyObject *__pyx_v_rank = 0; PyObject *__pyx_v_nneighbors = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1644 * cdef object dim, rank * cdef object nneighbors * if isinstance(self, Cartcomm): # <<<<<<<<<<<<<< * dim = self.Get_dim() * return (2*dim, 2*dim) */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Cartcomm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1645 * cdef object nneighbors * if isinstance(self, Cartcomm): * dim = self.Get_dim() # <<<<<<<<<<<<<< * return (2*dim, 2*dim) * if isinstance(self, Graphcomm): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_dim); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_dim = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1646 * if isinstance(self, Cartcomm): * dim = self.Get_dim() * return (2*dim, 2*dim) # <<<<<<<<<<<<<< * if isinstance(self, Graphcomm): * rank = self.Get_rank() */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyNumber_Multiply(__pyx_int_2, __pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Multiply(__pyx_int_2, __pyx_v_dim); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1644 * cdef object dim, rank * cdef object nneighbors * if isinstance(self, Cartcomm): # <<<<<<<<<<<<<< * dim = self.Get_dim() * return (2*dim, 2*dim) */ } /* "mpi4py/MPI/Comm.pyx":1647 * dim = self.Get_dim() * return (2*dim, 2*dim) * if isinstance(self, Graphcomm): # <<<<<<<<<<<<<< * rank = self.Get_rank() * nneighbors = self.Get_neighbors_count(rank) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Graphcomm); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/Comm.pyx":1648 * return (2*dim, 2*dim) * if isinstance(self, Graphcomm): * rank = self.Get_rank() # <<<<<<<<<<<<<< * nneighbors = self.Get_neighbors_count(rank) * return (nneighbors, nneighbors) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_rank); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_rank = __pyx_t_5; __pyx_t_5 = 0; /* "mpi4py/MPI/Comm.pyx":1649 * if isinstance(self, Graphcomm): * rank = self.Get_rank() * nneighbors = self.Get_neighbors_count(rank) # <<<<<<<<<<<<<< * return (nneighbors, nneighbors) * if isinstance(self, Distgraphcomm): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_neighbors_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_rank) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_rank); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nneighbors = __pyx_t_5; __pyx_t_5 = 0; /* "mpi4py/MPI/Comm.pyx":1650 * rank = self.Get_rank() * nneighbors = self.Get_neighbors_count(rank) * return (nneighbors, nneighbors) # <<<<<<<<<<<<<< * if isinstance(self, Distgraphcomm): * nneighbors = self.Get_dist_neighbors_count()[:2] */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_nneighbors); __Pyx_GIVEREF(__pyx_v_nneighbors); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_nneighbors); __Pyx_INCREF(__pyx_v_nneighbors); __Pyx_GIVEREF(__pyx_v_nneighbors); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_nneighbors); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1647 * dim = self.Get_dim() * return (2*dim, 2*dim) * if isinstance(self, Graphcomm): # <<<<<<<<<<<<<< * rank = self.Get_rank() * nneighbors = self.Get_neighbors_count(rank) */ } /* "mpi4py/MPI/Comm.pyx":1651 * nneighbors = self.Get_neighbors_count(rank) * return (nneighbors, nneighbors) * if isinstance(self, Distgraphcomm): # <<<<<<<<<<<<<< * nneighbors = self.Get_dist_neighbors_count()[:2] * return nneighbors */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Distgraphcomm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1652 * return (nneighbors, nneighbors) * if isinstance(self, Distgraphcomm): * nneighbors = self.Get_dist_neighbors_count()[:2] # <<<<<<<<<<<<<< * return nneighbors * raise TypeError("Not a topology communicator") */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_dist_neighbors_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 2, NULL, NULL, &__pyx_slice__96, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_nneighbors = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":1653 * if isinstance(self, Distgraphcomm): * nneighbors = self.Get_dist_neighbors_count()[:2] * return nneighbors # <<<<<<<<<<<<<< * raise TypeError("Not a topology communicator") * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_nneighbors); __pyx_r = __pyx_v_nneighbors; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1651 * nneighbors = self.Get_neighbors_count(rank) * return (nneighbors, nneighbors) * if isinstance(self, Distgraphcomm): # <<<<<<<<<<<<<< * nneighbors = self.Get_dist_neighbors_count()[:2] * return nneighbors */ } /* "mpi4py/MPI/Comm.pyx":1654 * nneighbors = self.Get_dist_neighbors_count()[:2] * return nneighbors * raise TypeError("Not a topology communicator") # <<<<<<<<<<<<<< * * property indegree: */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(7, 1654, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1641 * property degrees: * "number of incoming and outgoing neighbors" * def __get__(self): # <<<<<<<<<<<<<< * cdef object dim, rank * cdef object nneighbors */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.degrees.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_dim); __Pyx_XDECREF(__pyx_v_rank); __Pyx_XDECREF(__pyx_v_nneighbors); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1658 * property indegree: * "number of incoming neighbors" * def __get__(self): # <<<<<<<<<<<<<< * return self.degrees[0] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_8indegree_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_8indegree_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_8indegree___get__(((struct PyMPITopocommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_8indegree___get__(struct PyMPITopocommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1659 * "number of incoming neighbors" * def __get__(self): * return self.degrees[0] # <<<<<<<<<<<<<< * * property outdegree: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_degrees); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1658 * property indegree: * "number of incoming neighbors" * def __get__(self): # <<<<<<<<<<<<<< * return self.degrees[0] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.indegree.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1663 * property outdegree: * "number of outgoing neighbors" * def __get__(self): # <<<<<<<<<<<<<< * return self.degrees[1] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_9outdegree_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_9outdegree_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_9outdegree___get__(((struct PyMPITopocommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_9outdegree___get__(struct PyMPITopocommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1664 * "number of outgoing neighbors" * def __get__(self): * return self.degrees[1] # <<<<<<<<<<<<<< * * property inoutedges: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_degrees); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1663 * property outdegree: * "number of outgoing neighbors" * def __get__(self): # <<<<<<<<<<<<<< * return self.degrees[1] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.outdegree.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1668 * property inoutedges: * "incoming and outgoing neighbors" * def __get__(self): # <<<<<<<<<<<<<< * cdef object direction, source, dest, rank * cdef object neighbors */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_10inoutedges_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_10inoutedges_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_10inoutedges___get__(((struct PyMPITopocommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_10inoutedges___get__(struct PyMPITopocommObject *__pyx_v_self) { PyObject *__pyx_v_direction = 0; PyObject *__pyx_v_source = 0; PyObject *__pyx_v_dest = 0; PyObject *__pyx_v_rank = 0; PyObject *__pyx_v_neighbors = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); int __pyx_t_12; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1671 * cdef object direction, source, dest, rank * cdef object neighbors * if isinstance(self, Cartcomm): # <<<<<<<<<<<<<< * neighbors = [] * for direction in range(self.Get_dim()): */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Cartcomm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1672 * cdef object neighbors * if isinstance(self, Cartcomm): * neighbors = [] # <<<<<<<<<<<<<< * for direction in range(self.Get_dim()): * source, dest = self.Shift(direction, 1) */ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_neighbors = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1673 * if isinstance(self, Cartcomm): * neighbors = [] * for direction in range(self.Get_dim()): # <<<<<<<<<<<<<< * source, dest = self.Shift(direction, 1) * neighbors.append(source) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_dim); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 1673, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(7, 1673, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(7, 1673, __pyx_L1_error) #else __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(7, 1673, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_direction, __pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":1674 * neighbors = [] * for direction in range(self.Get_dim()): * source, dest = self.Shift(direction, 1) # <<<<<<<<<<<<<< * neighbors.append(source) * neighbors.append(dest) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Shift); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; __pyx_t_9 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_direction, __pyx_int_1}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1674, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_direction, __pyx_int_1}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1674, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); } else #endif { __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_INCREF(__pyx_v_direction); __Pyx_GIVEREF(__pyx_v_direction); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_direction); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_int_1); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(7, 1674, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_10); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(7, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(7, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_11(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_10 = __pyx_t_11(__pyx_t_8); if (unlikely(!__pyx_t_10)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_8), 2) < 0) __PYX_ERR(7, 1674, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(7, 1674, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_source, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_dest, __pyx_t_10); __pyx_t_10 = 0; /* "mpi4py/MPI/Comm.pyx":1675 * for direction in range(self.Get_dim()): * source, dest = self.Shift(direction, 1) * neighbors.append(source) # <<<<<<<<<<<<<< * neighbors.append(dest) * return (neighbors, neighbors) */ __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_neighbors, __pyx_v_source); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(7, 1675, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1676 * source, dest = self.Shift(direction, 1) * neighbors.append(source) * neighbors.append(dest) # <<<<<<<<<<<<<< * return (neighbors, neighbors) * if isinstance(self, Graphcomm): */ __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_neighbors, __pyx_v_dest); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(7, 1676, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1673 * if isinstance(self, Cartcomm): * neighbors = [] * for direction in range(self.Get_dim()): # <<<<<<<<<<<<<< * source, dest = self.Shift(direction, 1) * neighbors.append(source) */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1677 * neighbors.append(source) * neighbors.append(dest) * return (neighbors, neighbors) # <<<<<<<<<<<<<< * if isinstance(self, Graphcomm): * rank = self.Get_rank() */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_neighbors); __Pyx_GIVEREF(__pyx_v_neighbors); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_neighbors); __Pyx_INCREF(__pyx_v_neighbors); __Pyx_GIVEREF(__pyx_v_neighbors); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_neighbors); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1671 * cdef object direction, source, dest, rank * cdef object neighbors * if isinstance(self, Cartcomm): # <<<<<<<<<<<<<< * neighbors = [] * for direction in range(self.Get_dim()): */ } /* "mpi4py/MPI/Comm.pyx":1678 * neighbors.append(dest) * return (neighbors, neighbors) * if isinstance(self, Graphcomm): # <<<<<<<<<<<<<< * rank = self.Get_rank() * neighbors = self.Get_neighbors(rank) */ __pyx_t_2 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Graphcomm); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/Comm.pyx":1679 * return (neighbors, neighbors) * if isinstance(self, Graphcomm): * rank = self.Get_rank() # <<<<<<<<<<<<<< * neighbors = self.Get_neighbors(rank) * return (neighbors, neighbors) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_rank); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_rank = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1680 * if isinstance(self, Graphcomm): * rank = self.Get_rank() * neighbors = self.Get_neighbors(rank) # <<<<<<<<<<<<<< * return (neighbors, neighbors) * if isinstance(self, Distgraphcomm): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_neighbors); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_10, __pyx_v_rank) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_rank); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_neighbors = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1681 * rank = self.Get_rank() * neighbors = self.Get_neighbors(rank) * return (neighbors, neighbors) # <<<<<<<<<<<<<< * if isinstance(self, Distgraphcomm): * neighbors = self.Get_dist_neighbors()[:2] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_neighbors); __Pyx_GIVEREF(__pyx_v_neighbors); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_neighbors); __Pyx_INCREF(__pyx_v_neighbors); __Pyx_GIVEREF(__pyx_v_neighbors); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_neighbors); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1678 * neighbors.append(dest) * return (neighbors, neighbors) * if isinstance(self, Graphcomm): # <<<<<<<<<<<<<< * rank = self.Get_rank() * neighbors = self.Get_neighbors(rank) */ } /* "mpi4py/MPI/Comm.pyx":1682 * neighbors = self.Get_neighbors(rank) * return (neighbors, neighbors) * if isinstance(self, Distgraphcomm): # <<<<<<<<<<<<<< * neighbors = self.Get_dist_neighbors()[:2] * return neighbors */ __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_self), __pyx_ptype_6mpi4py_3MPI_Distgraphcomm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":1683 * return (neighbors, neighbors) * if isinstance(self, Distgraphcomm): * neighbors = self.Get_dist_neighbors()[:2] # <<<<<<<<<<<<<< * return neighbors * raise TypeError("Not a topology communicator") */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_dist_neighbors); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 2, NULL, NULL, &__pyx_slice__96, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_neighbors = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":1684 * if isinstance(self, Distgraphcomm): * neighbors = self.Get_dist_neighbors()[:2] * return neighbors # <<<<<<<<<<<<<< * raise TypeError("Not a topology communicator") * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_neighbors); __pyx_r = __pyx_v_neighbors; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1682 * neighbors = self.Get_neighbors(rank) * return (neighbors, neighbors) * if isinstance(self, Distgraphcomm): # <<<<<<<<<<<<<< * neighbors = self.Get_dist_neighbors()[:2] * return neighbors */ } /* "mpi4py/MPI/Comm.pyx":1685 * neighbors = self.Get_dist_neighbors()[:2] * return neighbors * raise TypeError("Not a topology communicator") # <<<<<<<<<<<<<< * * property inedges: */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(7, 1685, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1668 * property inoutedges: * "incoming and outgoing neighbors" * def __get__(self): # <<<<<<<<<<<<<< * cdef object direction, source, dest, rank * cdef object neighbors */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.inoutedges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_direction); __Pyx_XDECREF(__pyx_v_source); __Pyx_XDECREF(__pyx_v_dest); __Pyx_XDECREF(__pyx_v_rank); __Pyx_XDECREF(__pyx_v_neighbors); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1689 * property inedges: * "incoming neighbors" * def __get__(self): # <<<<<<<<<<<<<< * return self.inoutedges[0] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_7inedges_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_7inedges_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_7inedges___get__(((struct PyMPITopocommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_7inedges___get__(struct PyMPITopocommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1690 * "incoming neighbors" * def __get__(self): * return self.inoutedges[0] # <<<<<<<<<<<<<< * * property outedges: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_inoutedges); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1689 * property inedges: * "incoming neighbors" * def __get__(self): # <<<<<<<<<<<<<< * return self.inoutedges[0] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.inedges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1694 * property outedges: * "outgoing neighbors" * def __get__(self): # <<<<<<<<<<<<<< * return self.inoutedges[1] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_8outedges_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_8outedges_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_8outedges___get__(((struct PyMPITopocommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_8outedges___get__(struct PyMPITopocommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1695 * "outgoing neighbors" * def __get__(self): * return self.inoutedges[1] # <<<<<<<<<<<<<< * * # Neighborhood Collectives */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_inoutedges); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1694 * property outedges: * "outgoing neighbors" * def __get__(self): # <<<<<<<<<<<<<< * return self.inoutedges[1] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.outedges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1700 * # ------------------------ * * def Neighbor_allgather(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor Gather to All */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_3Neighbor_allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_2Neighbor_allgather[] = "Topocomm.Neighbor_allgather(self, sendbuf, recvbuf)\n\n Neighbor Gather to All\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_3Neighbor_allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Neighbor_allgather (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Neighbor_allgather", 1, 2, 2, 1); __PYX_ERR(7, 1700, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Neighbor_allgather") < 0)) __PYX_ERR(7, 1700, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Neighbor_allgather", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1700, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_2Neighbor_allgather(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_2Neighbor_allgather(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Neighbor_allgather", 0); /* "mpi4py/MPI/Comm.pyx":1704 * Neighbor Gather to All * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_allgather( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1705 * """ * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_allgather( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_allgather(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1705, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1706 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_allgather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1709 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Neighbor_allgatherv(self, sendbuf, recvbuf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Neighbor_allgather(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1706, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1706 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_allgather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1700 * # ------------------------ * * def Neighbor_allgather(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor Gather to All */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1711 * self.ob_mpi) ) * * def Neighbor_allgatherv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor Gather to All Vector */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_5Neighbor_allgatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_4Neighbor_allgatherv[] = "Topocomm.Neighbor_allgatherv(self, sendbuf, recvbuf)\n\n Neighbor Gather to All Vector\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_5Neighbor_allgatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Neighbor_allgatherv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Neighbor_allgatherv", 1, 2, 2, 1); __PYX_ERR(7, 1711, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Neighbor_allgatherv") < 0)) __PYX_ERR(7, 1711, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Neighbor_allgatherv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1711, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_allgatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_4Neighbor_allgatherv(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_4Neighbor_allgatherv(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Neighbor_allgatherv", 0); /* "mpi4py/MPI/Comm.pyx":1715 * Neighbor Gather to All Vector * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_allgatherv( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1716 * """ * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_allgatherv( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_allgather(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1716, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1717 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_allgatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1720 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Neighbor_alltoall(self, sendbuf, recvbuf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Neighbor_allgatherv(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1717, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1717 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_allgatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1711 * self.ob_mpi) ) * * def Neighbor_allgatherv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor Gather to All Vector */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_allgatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1722 * self.ob_mpi) ) * * def Neighbor_alltoall(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor All-to-All */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_7Neighbor_alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_6Neighbor_alltoall[] = "Topocomm.Neighbor_alltoall(self, sendbuf, recvbuf)\n\n Neighbor All-to-All\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_7Neighbor_alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Neighbor_alltoall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Neighbor_alltoall", 1, 2, 2, 1); __PYX_ERR(7, 1722, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Neighbor_alltoall") < 0)) __PYX_ERR(7, 1722, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Neighbor_alltoall", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1722, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_6Neighbor_alltoall(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_6Neighbor_alltoall(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Neighbor_alltoall", 0); /* "mpi4py/MPI/Comm.pyx":1726 * Neighbor All-to-All * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_alltoall( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1727 * """ * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_alltoall( * m.sbuf, m.scount, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_alltoall(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1727, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1728 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_alltoall( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1731 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Neighbor_alltoallv(self, sendbuf, recvbuf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Neighbor_alltoall(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1728, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1728 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_alltoall( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1722 * self.ob_mpi) ) * * def Neighbor_alltoall(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor All-to-All */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1733 * self.ob_mpi) ) * * def Neighbor_alltoallv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor All-to-All Vector */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_9Neighbor_alltoallv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_8Neighbor_alltoallv[] = "Topocomm.Neighbor_alltoallv(self, sendbuf, recvbuf)\n\n Neighbor All-to-All Vector\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_9Neighbor_alltoallv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Neighbor_alltoallv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Neighbor_alltoallv", 1, 2, 2, 1); __PYX_ERR(7, 1733, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Neighbor_alltoallv") < 0)) __PYX_ERR(7, 1733, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Neighbor_alltoallv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1733, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_alltoallv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_8Neighbor_alltoallv(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_8Neighbor_alltoallv(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Neighbor_alltoallv", 0); /* "mpi4py/MPI/Comm.pyx":1737 * Neighbor All-to-All Vector * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_alltoallv( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1738 * """ * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_alltoallv( * m.sbuf, m.scounts, m.sdispls, m.stype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_alltoall(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1738, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1739 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_alltoallv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1742 * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Neighbor_alltoallw(self, sendbuf, recvbuf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Neighbor_alltoallv(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdispls, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1739, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1739 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_alltoallv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1733 * self.ob_mpi) ) * * def Neighbor_alltoallv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor All-to-All Vector */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_alltoallv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1744 * self.ob_mpi) ) * * def Neighbor_alltoallw(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor All-to-All Generalized */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_11Neighbor_alltoallw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_10Neighbor_alltoallw[] = "Topocomm.Neighbor_alltoallw(self, sendbuf, recvbuf)\n\n Neighbor All-to-All Generalized\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_11Neighbor_alltoallw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Neighbor_alltoallw (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Neighbor_alltoallw", 1, 2, 2, 1); __PYX_ERR(7, 1744, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Neighbor_alltoallw") < 0)) __PYX_ERR(7, 1744, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Neighbor_alltoallw", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1744, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_alltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_10Neighbor_alltoallw(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_10Neighbor_alltoallw(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Neighbor_alltoallw", 0); /* "mpi4py/MPI/Comm.pyx":1748 * Neighbor All-to-All Generalized * """ * cdef _p_msg_ccow m = message_ccow() # <<<<<<<<<<<<<< * m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_alltoallw( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_ccow()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1749 * """ * cdef _p_msg_ccow m = message_ccow() * m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Neighbor_alltoallw( * m.sbuf, m.scounts, m.sdisplsA, m.stypes, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_neighbor_alltoallw(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1749, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1750 * cdef _p_msg_ccow m = message_ccow() * m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_alltoallw( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdisplsA, m.stypes, * m.rbuf, m.rcounts, m.rdisplsA, m.rtypes, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1753 * m.sbuf, m.scounts, m.sdisplsA, m.stypes, * m.rbuf, m.rcounts, m.rdisplsA, m.rtypes, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Nonblocking Neighborhood Collectives */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Neighbor_alltoallw(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdisplsA, __pyx_v_m->stypes, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdisplsA, __pyx_v_m->rtypes, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1750, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1750 * cdef _p_msg_ccow m = message_ccow() * m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) * with nogil: CHKERR( MPI_Neighbor_alltoallw( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdisplsA, m.stypes, * m.rbuf, m.rcounts, m.rdisplsA, m.rtypes, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1744 * self.ob_mpi) ) * * def Neighbor_alltoallw(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Neighbor All-to-All Generalized */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Neighbor_alltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1758 * # ------------------------------------ * * def Ineighbor_allgather(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor Gather to All */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_13Ineighbor_allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_12Ineighbor_allgather[] = "Topocomm.Ineighbor_allgather(self, sendbuf, recvbuf)\n\n Nonblocking Neighbor Gather to All\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_13Ineighbor_allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ineighbor_allgather (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ineighbor_allgather", 1, 2, 2, 1); __PYX_ERR(7, 1758, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ineighbor_allgather") < 0)) __PYX_ERR(7, 1758, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ineighbor_allgather", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1758, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_12Ineighbor_allgather(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_12Ineighbor_allgather(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ineighbor_allgather", 0); /* "mpi4py/MPI/Comm.pyx":1762 * Nonblocking Neighbor Gather to All * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1763 * """ * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_allgather( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_allgather(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1763, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1764 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ineighbor_allgather( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1764, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1765 * m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_allgather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1768 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ineighbor_allgather(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1765, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1765 * m.for_neighbor_allgather(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_allgather( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1769 * m.rbuf, m.rcount, m.rtype, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":1770 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Ineighbor_allgatherv(self, sendbuf, recvbuf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1758 * # ------------------------------------ * * def Ineighbor_allgather(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor Gather to All */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1772 * return request * * def Ineighbor_allgatherv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor Gather to All Vector */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_15Ineighbor_allgatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_14Ineighbor_allgatherv[] = "Topocomm.Ineighbor_allgatherv(self, sendbuf, recvbuf)\n\n Nonblocking Neighbor Gather to All Vector\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_15Ineighbor_allgatherv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ineighbor_allgatherv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ineighbor_allgatherv", 1, 2, 2, 1); __PYX_ERR(7, 1772, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ineighbor_allgatherv") < 0)) __PYX_ERR(7, 1772, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ineighbor_allgatherv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1772, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_allgatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_14Ineighbor_allgatherv(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_14Ineighbor_allgatherv(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ineighbor_allgatherv", 0); /* "mpi4py/MPI/Comm.pyx":1776 * Nonblocking Neighbor Gather to All Vector * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1777 * """ * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_allgatherv( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_allgather(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1777, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1778 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ineighbor_allgatherv( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1778, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1779 * m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_allgatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1782 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ineighbor_allgatherv(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1779, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1779 * m.for_neighbor_allgather(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_allgatherv( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1783 * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":1784 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Ineighbor_alltoall(self, sendbuf, recvbuf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1772 * return request * * def Ineighbor_allgatherv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor Gather to All Vector */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_allgatherv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1786 * return request * * def Ineighbor_alltoall(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor All-to-All */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_17Ineighbor_alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_16Ineighbor_alltoall[] = "Topocomm.Ineighbor_alltoall(self, sendbuf, recvbuf)\n\n Nonblocking Neighbor All-to-All\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_17Ineighbor_alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ineighbor_alltoall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ineighbor_alltoall", 1, 2, 2, 1); __PYX_ERR(7, 1786, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ineighbor_alltoall") < 0)) __PYX_ERR(7, 1786, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ineighbor_alltoall", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1786, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_16Ineighbor_alltoall(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_16Ineighbor_alltoall(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ineighbor_alltoall", 0); /* "mpi4py/MPI/Comm.pyx":1790 * Nonblocking Neighbor All-to-All * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1791 * """ * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_alltoall( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_alltoall(__pyx_v_m, 0, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1791, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1792 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ineighbor_alltoall( * m.sbuf, m.scount, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1792, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1793 * m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_alltoall( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1796 * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ineighbor_alltoall(__pyx_v_m->sbuf, __pyx_v_m->scount, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcount, __pyx_v_m->rtype, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1793, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1793 * m.for_neighbor_alltoall(0, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_alltoall( # <<<<<<<<<<<<<< * m.sbuf, m.scount, m.stype, * m.rbuf, m.rcount, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1797 * m.rbuf, m.rcount, m.rtype, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":1798 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Ineighbor_alltoallv(self, sendbuf, recvbuf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1786 * return request * * def Ineighbor_alltoall(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor All-to-All */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1800 * return request * * def Ineighbor_alltoallv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor All-to-All Vector */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_19Ineighbor_alltoallv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_18Ineighbor_alltoallv[] = "Topocomm.Ineighbor_alltoallv(self, sendbuf, recvbuf)\n\n Nonblocking Neighbor All-to-All Vector\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_19Ineighbor_alltoallv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ineighbor_alltoallv (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ineighbor_alltoallv", 1, 2, 2, 1); __PYX_ERR(7, 1800, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ineighbor_alltoallv") < 0)) __PYX_ERR(7, 1800, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ineighbor_alltoallv", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1800, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_alltoallv", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_18Ineighbor_alltoallv(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_18Ineighbor_alltoallv(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ineighbor_alltoallv", 0); /* "mpi4py/MPI/Comm.pyx":1804 * Nonblocking Neighbor All-to-All Vector * """ * cdef _p_msg_cco m = message_cco() # <<<<<<<<<<<<<< * m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_cco()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1805 * """ * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_alltoallv( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_alltoall(__pyx_v_m, 1, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1805, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1806 * cdef _p_msg_cco m = message_cco() * m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ineighbor_alltoallv( * m.sbuf, m.scounts, m.sdispls, m.stype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1806, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1807 * m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_alltoallv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1810 * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ineighbor_alltoallv(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdispls, __pyx_v_m->stype, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdispls, __pyx_v_m->rtype, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1807, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1807 * m.for_neighbor_alltoall(1, sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_alltoallv( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdispls, m.stype, * m.rbuf, m.rcounts, m.rdispls, m.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1811 * m.rbuf, m.rcounts, m.rdispls, m.rtype, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":1812 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Ineighbor_alltoallw(self, sendbuf, recvbuf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1800 * return request * * def Ineighbor_alltoallv(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor All-to-All Vector */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_alltoallv", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1814 * return request * * def Ineighbor_alltoallw(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor All-to-All Generalized */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_21Ineighbor_alltoallw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_20Ineighbor_alltoallw[] = "Topocomm.Ineighbor_alltoallw(self, sendbuf, recvbuf)\n\n Nonblocking Neighbor All-to-All Generalized\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_21Ineighbor_alltoallw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendbuf = 0; PyObject *__pyx_v_recvbuf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Ineighbor_alltoallw (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendbuf,&__pyx_n_s_recvbuf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendbuf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_recvbuf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Ineighbor_alltoallw", 1, 2, 2, 1); __PYX_ERR(7, 1814, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Ineighbor_alltoallw") < 0)) __PYX_ERR(7, 1814, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sendbuf = values[0]; __pyx_v_recvbuf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Ineighbor_alltoallw", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1814, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_alltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_20Ineighbor_alltoallw(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendbuf, __pyx_v_recvbuf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_20Ineighbor_alltoallw(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendbuf, PyObject *__pyx_v_recvbuf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Ineighbor_alltoallw", 0); /* "mpi4py/MPI/Comm.pyx":1818 * Nonblocking Neighbor All-to-All Generalized * """ * cdef _p_msg_ccow m = message_ccow() # <<<<<<<<<<<<<< * m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_ccow()); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1819 * """ * cdef _p_msg_ccow m = message_ccow() * m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_alltoallw( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_neighbor_alltoallw(__pyx_v_m, __pyx_v_sendbuf, __pyx_v_recvbuf, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1819, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1820 * cdef _p_msg_ccow m = message_ccow() * m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Ineighbor_alltoallw( * m.sbuf, m.scounts, m.sdisplsA, m.stypes, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1820, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1821 * m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_alltoallw( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdisplsA, m.stypes, * m.rbuf, m.rcounts, m.rdisplsA, m.rtypes, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1824 * m.sbuf, m.scounts, m.sdisplsA, m.stypes, * m.rbuf, m.rcounts, m.rdisplsA, m.rtypes, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Ineighbor_alltoallw(__pyx_v_m->sbuf, __pyx_v_m->scounts, __pyx_v_m->sdisplsA, __pyx_v_m->stypes, __pyx_v_m->rbuf, __pyx_v_m->rcounts, __pyx_v_m->rdisplsA, __pyx_v_m->rtypes, __pyx_v_self->__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1821, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":1821 * m.for_neighbor_alltoallw(sendbuf, recvbuf, self.ob_mpi) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Ineighbor_alltoallw( # <<<<<<<<<<<<<< * m.sbuf, m.scounts, m.sdisplsA, m.stypes, * m.rbuf, m.rcounts, m.rdisplsA, m.rtypes, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1825 * m.rbuf, m.rcounts, m.rdisplsA, m.rtypes, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/Comm.pyx":1826 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * # Python Communication */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1814 * return request * * def Ineighbor_alltoallw(self, sendbuf, recvbuf): # <<<<<<<<<<<<<< * """ * Nonblocking Neighbor All-to-All Generalized */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.Ineighbor_alltoallw", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1830 * # Python Communication * # * def neighbor_allgather(self, sendobj): # <<<<<<<<<<<<<< * """Neighbor Gather to All""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_23neighbor_allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_22neighbor_allgather[] = "Topocomm.neighbor_allgather(self, sendobj)\nNeighbor Gather to All"; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_23neighbor_allgather(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("neighbor_allgather (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "neighbor_allgather") < 0)) __PYX_ERR(7, 1830, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_sendobj = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("neighbor_allgather", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1830, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.neighbor_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_22neighbor_allgather(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendobj); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_22neighbor_allgather(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendobj) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("neighbor_allgather", 0); /* "mpi4py/MPI/Comm.pyx":1832 * def neighbor_allgather(self, sendobj): * """Neighbor Gather to All""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_neighbor_allgather(sendobj, comm) * # */ __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1833 * """Neighbor Gather to All""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_neighbor_allgather(sendobj, comm) # <<<<<<<<<<<<<< * # * def neighbor_alltoall(self, sendobj): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_neighbor_allgather(__pyx_v_sendobj, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1830 * # Python Communication * # * def neighbor_allgather(self, sendobj): # <<<<<<<<<<<<<< * """Neighbor Gather to All""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.neighbor_allgather", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1835 * return PyMPI_neighbor_allgather(sendobj, comm) * # * def neighbor_alltoall(self, sendobj): # <<<<<<<<<<<<<< * """Neighbor All to All Scatter/Gather""" * cdef MPI_Comm comm = self.ob_mpi */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_25neighbor_alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Topocomm_24neighbor_alltoall[] = "Topocomm.neighbor_alltoall(self, sendobj)\nNeighbor All to All Scatter/Gather"; static PyObject *__pyx_pw_6mpi4py_3MPI_8Topocomm_25neighbor_alltoall(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_sendobj = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("neighbor_alltoall (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sendobj,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sendobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "neighbor_alltoall") < 0)) __PYX_ERR(7, 1835, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_sendobj = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("neighbor_alltoall", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1835, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Topocomm.neighbor_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Topocomm_24neighbor_alltoall(((struct PyMPITopocommObject *)__pyx_v_self), __pyx_v_sendobj); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Topocomm_24neighbor_alltoall(struct PyMPITopocommObject *__pyx_v_self, PyObject *__pyx_v_sendobj) { MPI_Comm __pyx_v_comm; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations MPI_Comm __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("neighbor_alltoall", 0); /* "mpi4py/MPI/Comm.pyx":1837 * def neighbor_alltoall(self, sendobj): * """Neighbor All to All Scatter/Gather""" * cdef MPI_Comm comm = self.ob_mpi # <<<<<<<<<<<<<< * return PyMPI_neighbor_alltoall(sendobj, comm) * */ __pyx_t_1 = __pyx_v_self->__pyx_base.__pyx_base.ob_mpi; __pyx_v_comm = __pyx_t_1; /* "mpi4py/MPI/Comm.pyx":1838 * """Neighbor All to All Scatter/Gather""" * cdef MPI_Comm comm = self.ob_mpi * return PyMPI_neighbor_alltoall(sendobj, comm) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_PyMPI_neighbor_alltoall(__pyx_v_sendobj, __pyx_v_comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1835 * return PyMPI_neighbor_allgather(sendobj, comm) * # * def neighbor_alltoall(self, sendobj): # <<<<<<<<<<<<<< * """Neighbor All to All Scatter/Gather""" * cdef MPI_Comm comm = self.ob_mpi */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Topocomm.neighbor_alltoall", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1847 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_8Cartcomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_8Cartcomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPICommObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(7, 1847, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1847, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 1, "comm", 0))) __PYX_ERR(7, 1847, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm___cinit__(((struct PyMPICartcommObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_8Cartcomm___cinit__(struct PyMPICartcommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm) { int __pyx_v_topo; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Comm.pyx":1848 * * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return # <<<<<<<<<<<<<< * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":1849 * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo != MPI_CART: raise TypeError( */ __pyx_v_topo = MPI_UNDEFINED; /* "mpi4py/MPI/Comm.pyx":1850 * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) # <<<<<<<<<<<<<< * if topo != MPI_CART: raise TypeError( * "expecting a Cartesian communicator") */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Topo_test(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_topo))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1850, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1851 * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo != MPI_CART: raise TypeError( # <<<<<<<<<<<<<< * "expecting a Cartesian communicator") * */ __pyx_t_1 = ((__pyx_v_topo != MPI_CART) != 0); if (unlikely(__pyx_t_1)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(7, 1851, __pyx_L1_error) } /* "mpi4py/MPI/Comm.pyx":1847 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1857 * # --------------------------- * * def Get_dim(self): # <<<<<<<<<<<<<< * """ * Return number of dimensions */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_3Get_dim(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Cartcomm_2Get_dim[] = "Cartcomm.Get_dim(self)\n\n Return number of dimensions\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_3Get_dim(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_dim (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_dim", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_dim", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_2Get_dim(((struct PyMPICartcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_2Get_dim(struct PyMPICartcommObject *__pyx_v_self) { int __pyx_v_dim; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_dim", 0); /* "mpi4py/MPI/Comm.pyx":1861 * Return number of dimensions * """ * cdef int dim = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Cartdim_get(self.ob_mpi, &dim) ) * return dim */ __pyx_v_dim = 0; /* "mpi4py/MPI/Comm.pyx":1862 * """ * cdef int dim = 0 * CHKERR( MPI_Cartdim_get(self.ob_mpi, &dim) ) # <<<<<<<<<<<<<< * return dim * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cartdim_get(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_dim))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1862, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1863 * cdef int dim = 0 * CHKERR( MPI_Cartdim_get(self.ob_mpi, &dim) ) * return dim # <<<<<<<<<<<<<< * * property dim: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1857 * # --------------------------- * * def Get_dim(self): # <<<<<<<<<<<<<< * """ * Return number of dimensions */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Get_dim", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1867 * property dim: * """number of dimensions""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dim() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_3dim_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_3dim_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_3dim___get__(((struct PyMPICartcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_3dim___get__(struct PyMPICartcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1868 * """number of dimensions""" * def __get__(self): * return self.Get_dim() # <<<<<<<<<<<<<< * * property ndim: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_dim); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1867 * property dim: * """number of dimensions""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dim() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.dim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1872 * property ndim: * """number of dimensions""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dim() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_4ndim_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_4ndim___get__(((struct PyMPICartcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_4ndim___get__(struct PyMPICartcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1873 * """number of dimensions""" * def __get__(self): * return self.Get_dim() # <<<<<<<<<<<<<< * * def Get_topo(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_dim); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1872 * property ndim: * """number of dimensions""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dim() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1875 * return self.Get_dim() * * def Get_topo(self): # <<<<<<<<<<<<<< * """ * Return information on the cartesian topology */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_5Get_topo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Cartcomm_4Get_topo[] = "Cartcomm.Get_topo(self)\n\n Return information on the cartesian topology\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_5Get_topo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_topo (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_topo", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_topo", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_4Get_topo(((struct PyMPICartcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_4Get_topo(struct PyMPICartcommObject *__pyx_v_self) { int __pyx_v_ndim; int *__pyx_v_idims; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; int *__pyx_v_iperiods; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; int *__pyx_v_icoords; CYTHON_UNUSED PyObject *__pyx_v_tmp3 = 0; int __pyx_v_i; PyObject *__pyx_v_dims = 0; PyObject *__pyx_v_periods = 0; PyObject *__pyx_v_coords = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Get_topo", 0); /* "mpi4py/MPI/Comm.pyx":1879 * Return information on the cartesian topology * """ * cdef int ndim = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) * cdef int *idims = NULL */ __pyx_v_ndim = 0; /* "mpi4py/MPI/Comm.pyx":1880 * """ * cdef int ndim = 0 * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) # <<<<<<<<<<<<<< * cdef int *idims = NULL * cdef tmp1 = newarray(ndim, &idims) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cartdim_get(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_ndim))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1880, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1881 * cdef int ndim = 0 * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) * cdef int *idims = NULL # <<<<<<<<<<<<<< * cdef tmp1 = newarray(ndim, &idims) * cdef int *iperiods = NULL */ __pyx_v_idims = NULL; /* "mpi4py/MPI/Comm.pyx":1882 * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) * cdef int *idims = NULL * cdef tmp1 = newarray(ndim, &idims) # <<<<<<<<<<<<<< * cdef int *iperiods = NULL * cdef tmp2 = newarray(ndim, &iperiods) */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_ndim, (&__pyx_v_idims)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1883 * cdef int *idims = NULL * cdef tmp1 = newarray(ndim, &idims) * cdef int *iperiods = NULL # <<<<<<<<<<<<<< * cdef tmp2 = newarray(ndim, &iperiods) * cdef int *icoords = NULL */ __pyx_v_iperiods = NULL; /* "mpi4py/MPI/Comm.pyx":1884 * cdef tmp1 = newarray(ndim, &idims) * cdef int *iperiods = NULL * cdef tmp2 = newarray(ndim, &iperiods) # <<<<<<<<<<<<<< * cdef int *icoords = NULL * cdef tmp3 = newarray(ndim, &icoords) */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_ndim, (&__pyx_v_iperiods)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp2 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1885 * cdef int *iperiods = NULL * cdef tmp2 = newarray(ndim, &iperiods) * cdef int *icoords = NULL # <<<<<<<<<<<<<< * cdef tmp3 = newarray(ndim, &icoords) * CHKERR( MPI_Cart_get(self.ob_mpi, ndim, idims, iperiods, icoords) ) */ __pyx_v_icoords = NULL; /* "mpi4py/MPI/Comm.pyx":1886 * cdef tmp2 = newarray(ndim, &iperiods) * cdef int *icoords = NULL * cdef tmp3 = newarray(ndim, &icoords) # <<<<<<<<<<<<<< * CHKERR( MPI_Cart_get(self.ob_mpi, ndim, idims, iperiods, icoords) ) * cdef int i = 0 */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_ndim, (&__pyx_v_icoords)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp3 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1887 * cdef int *icoords = NULL * cdef tmp3 = newarray(ndim, &icoords) * CHKERR( MPI_Cart_get(self.ob_mpi, ndim, idims, iperiods, icoords) ) # <<<<<<<<<<<<<< * cdef int i = 0 * cdef object dims = [idims[i] for i from 0 <= i < ndim] */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cart_get(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_ndim, __pyx_v_idims, __pyx_v_iperiods, __pyx_v_icoords)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1887, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1888 * cdef tmp3 = newarray(ndim, &icoords) * CHKERR( MPI_Cart_get(self.ob_mpi, ndim, idims, iperiods, icoords) ) * cdef int i = 0 # <<<<<<<<<<<<<< * cdef object dims = [idims[i] for i from 0 <= i < ndim] * cdef object periods = [iperiods[i] for i from 0 <= i < ndim] */ __pyx_v_i = 0; /* "mpi4py/MPI/Comm.pyx":1889 * CHKERR( MPI_Cart_get(self.ob_mpi, ndim, idims, iperiods, icoords) ) * cdef int i = 0 * cdef object dims = [idims[i] for i from 0 <= i < ndim] # <<<<<<<<<<<<<< * cdef object periods = [iperiods[i] for i from 0 <= i < ndim] * cdef object coords = [icoords[i] for i from 0 <= i < ndim] */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_ndim; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_idims[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 1889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_dims = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1890 * cdef int i = 0 * cdef object dims = [idims[i] for i from 0 <= i < ndim] * cdef object periods = [iperiods[i] for i from 0 <= i < ndim] # <<<<<<<<<<<<<< * cdef object coords = [icoords[i] for i from 0 <= i < ndim] * return (dims, periods, coords) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_ndim; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_iperiods[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 1890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_periods = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1891 * cdef object dims = [idims[i] for i from 0 <= i < ndim] * cdef object periods = [iperiods[i] for i from 0 <= i < ndim] * cdef object coords = [icoords[i] for i from 0 <= i < ndim] # <<<<<<<<<<<<<< * return (dims, periods, coords) * */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_ndim; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_icoords[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 1891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_coords = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1892 * cdef object periods = [iperiods[i] for i from 0 <= i < ndim] * cdef object coords = [icoords[i] for i from 0 <= i < ndim] * return (dims, periods, coords) # <<<<<<<<<<<<<< * * property topo: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_dims); __Pyx_GIVEREF(__pyx_v_dims); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_dims); __Pyx_INCREF(__pyx_v_periods); __Pyx_GIVEREF(__pyx_v_periods); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_periods); __Pyx_INCREF(__pyx_v_coords); __Pyx_GIVEREF(__pyx_v_coords); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_coords); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1875 * return self.Get_dim() * * def Get_topo(self): # <<<<<<<<<<<<<< * """ * Return information on the cartesian topology */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Get_topo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_tmp3); __Pyx_XDECREF(__pyx_v_dims); __Pyx_XDECREF(__pyx_v_periods); __Pyx_XDECREF(__pyx_v_coords); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1896 * property topo: * """topology information""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_4topo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_4topo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_4topo___get__(((struct PyMPICartcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_4topo___get__(struct PyMPICartcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1897 * """topology information""" * def __get__(self): * return self.Get_topo() # <<<<<<<<<<<<<< * * property dims: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_topo); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1896 * property topo: * """topology information""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.topo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1901 * property dims: * """dimensions""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[0] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_4dims_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_4dims_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_4dims___get__(((struct PyMPICartcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_4dims___get__(struct PyMPICartcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1902 * """dimensions""" * def __get__(self): * return self.Get_topo()[0] # <<<<<<<<<<<<<< * * property periods: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_topo); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1901 * property dims: * """dimensions""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[0] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.dims.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1906 * property periods: * """periodicity""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[1] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_7periods_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_7periods_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_7periods___get__(((struct PyMPICartcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_7periods___get__(struct PyMPICartcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1907 * """periodicity""" * def __get__(self): * return self.Get_topo()[1] # <<<<<<<<<<<<<< * * property coords: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_topo); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1906 * property periods: * """periodicity""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[1] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.periods.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1911 * property coords: * """coordinates""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[2] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_6coords_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_6coords_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_6coords___get__(((struct PyMPICartcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_6coords___get__(struct PyMPICartcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":1912 * """coordinates""" * def __get__(self): * return self.Get_topo()[2] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_topo); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1911 * property coords: * """coordinates""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[2] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.coords.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1918 * # ------------------------------ * * def Get_cart_rank(self, coords): # <<<<<<<<<<<<<< * """ * Translate logical coordinates to ranks */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_7Get_cart_rank(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Cartcomm_6Get_cart_rank[] = "Cartcomm.Get_cart_rank(self, coords)\n\n Translate logical coordinates to ranks\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_7Get_cart_rank(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_coords = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_cart_rank (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coords,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coords)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_cart_rank") < 0)) __PYX_ERR(7, 1918, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_coords = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_cart_rank", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1918, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Get_cart_rank", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_6Get_cart_rank(((struct PyMPICartcommObject *)__pyx_v_self), __pyx_v_coords); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_6Get_cart_rank(struct PyMPICartcommObject *__pyx_v_self, PyObject *__pyx_v_coords) { int __pyx_v_ndim; int *__pyx_v_icoords; int __pyx_v_rank; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_cart_rank", 0); __Pyx_INCREF(__pyx_v_coords); /* "mpi4py/MPI/Comm.pyx":1922 * Translate logical coordinates to ranks * """ * cdef int ndim = 0, *icoords = NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Cartdim_get( self.ob_mpi, &ndim) ) * coords = chkarray(coords, ndim, &icoords) */ __pyx_v_ndim = 0; __pyx_v_icoords = NULL; /* "mpi4py/MPI/Comm.pyx":1923 * """ * cdef int ndim = 0, *icoords = NULL * CHKERR( MPI_Cartdim_get( self.ob_mpi, &ndim) ) # <<<<<<<<<<<<<< * coords = chkarray(coords, ndim, &icoords) * cdef int rank = MPI_PROC_NULL */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cartdim_get(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_ndim))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1923, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1924 * cdef int ndim = 0, *icoords = NULL * CHKERR( MPI_Cartdim_get( self.ob_mpi, &ndim) ) * coords = chkarray(coords, ndim, &icoords) # <<<<<<<<<<<<<< * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Cart_rank(self.ob_mpi, icoords, &rank) ) */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_coords, __pyx_v_ndim, (&__pyx_v_icoords)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_coords, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1925 * CHKERR( MPI_Cartdim_get( self.ob_mpi, &ndim) ) * coords = chkarray(coords, ndim, &icoords) * cdef int rank = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Cart_rank(self.ob_mpi, icoords, &rank) ) * return rank */ __pyx_v_rank = MPI_PROC_NULL; /* "mpi4py/MPI/Comm.pyx":1926 * coords = chkarray(coords, ndim, &icoords) * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Cart_rank(self.ob_mpi, icoords, &rank) ) # <<<<<<<<<<<<<< * return rank * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cart_rank(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_icoords, (&__pyx_v_rank))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1926, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1927 * cdef int rank = MPI_PROC_NULL * CHKERR( MPI_Cart_rank(self.ob_mpi, icoords, &rank) ) * return rank # <<<<<<<<<<<<<< * * def Get_coords(self, int rank): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1918 * # ------------------------------ * * def Get_cart_rank(self, coords): # <<<<<<<<<<<<<< * """ * Translate logical coordinates to ranks */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Get_cart_rank", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_coords); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1929 * return rank * * def Get_coords(self, int rank): # <<<<<<<<<<<<<< * """ * Translate ranks to logical coordinates */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_9Get_coords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Cartcomm_8Get_coords[] = "Cartcomm.Get_coords(self, int rank)\n\n Translate ranks to logical coordinates\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_9Get_coords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_rank; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_coords (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rank,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_coords") < 0)) __PYX_ERR(7, 1929, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rank = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1929, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_coords", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1929, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Get_coords", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_8Get_coords(((struct PyMPICartcommObject *)__pyx_v_self), __pyx_v_rank); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_8Get_coords(struct PyMPICartcommObject *__pyx_v_self, int __pyx_v_rank) { int __pyx_v_i; int __pyx_v_ndim; int *__pyx_v_icoords; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_v_coords = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Get_coords", 0); /* "mpi4py/MPI/Comm.pyx":1933 * Translate ranks to logical coordinates * """ * cdef int i = 0, ndim = 0, *icoords = NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) * cdef tmp = newarray(ndim, &icoords) */ __pyx_v_i = 0; __pyx_v_ndim = 0; __pyx_v_icoords = NULL; /* "mpi4py/MPI/Comm.pyx":1934 * """ * cdef int i = 0, ndim = 0, *icoords = NULL * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) # <<<<<<<<<<<<<< * cdef tmp = newarray(ndim, &icoords) * CHKERR( MPI_Cart_coords(self.ob_mpi, rank, ndim, icoords) ) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cartdim_get(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_ndim))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1934, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1935 * cdef int i = 0, ndim = 0, *icoords = NULL * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) * cdef tmp = newarray(ndim, &icoords) # <<<<<<<<<<<<<< * CHKERR( MPI_Cart_coords(self.ob_mpi, rank, ndim, icoords) ) * cdef object coords = [icoords[i] for i from 0 <= i < ndim] */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_ndim, (&__pyx_v_icoords)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1936 * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) * cdef tmp = newarray(ndim, &icoords) * CHKERR( MPI_Cart_coords(self.ob_mpi, rank, ndim, icoords) ) # <<<<<<<<<<<<<< * cdef object coords = [icoords[i] for i from 0 <= i < ndim] * return coords */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cart_coords(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_rank, __pyx_v_ndim, __pyx_v_icoords)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1936, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1937 * cdef tmp = newarray(ndim, &icoords) * CHKERR( MPI_Cart_coords(self.ob_mpi, rank, ndim, icoords) ) * cdef object coords = [icoords[i] for i from 0 <= i < ndim] # <<<<<<<<<<<<<< * return coords * */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_ndim; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_icoords[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 1937, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_coords = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1938 * CHKERR( MPI_Cart_coords(self.ob_mpi, rank, ndim, icoords) ) * cdef object coords = [icoords[i] for i from 0 <= i < ndim] * return coords # <<<<<<<<<<<<<< * * # Cartesian Shift Function */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_coords); __pyx_r = __pyx_v_coords; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1929 * return rank * * def Get_coords(self, int rank): # <<<<<<<<<<<<<< * """ * Translate ranks to logical coordinates */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Get_coords", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_coords); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1943 * # ------------------------ * * def Shift(self, int direction, int disp): # <<<<<<<<<<<<<< * """ * Return a tuple (source,dest) of process ranks */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_11Shift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Cartcomm_10Shift[] = "Cartcomm.Shift(self, int direction, int disp)\n\n Return a tuple (source,dest) of process ranks\n for data shifting with Comm.Sendrecv()\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_11Shift(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_direction; int __pyx_v_disp; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Shift (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_direction,&__pyx_n_s_disp,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_direction)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_disp)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Shift", 1, 2, 2, 1); __PYX_ERR(7, 1943, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Shift") < 0)) __PYX_ERR(7, 1943, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_direction = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_direction == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1943, __pyx_L3_error) __pyx_v_disp = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_disp == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1943, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Shift", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1943, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Shift", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_10Shift(((struct PyMPICartcommObject *)__pyx_v_self), __pyx_v_direction, __pyx_v_disp); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_10Shift(struct PyMPICartcommObject *__pyx_v_self, int __pyx_v_direction, int __pyx_v_disp) { int __pyx_v_source; int __pyx_v_dest; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Shift", 0); /* "mpi4py/MPI/Comm.pyx":1948 * for data shifting with Comm.Sendrecv() * """ * cdef int source = MPI_PROC_NULL, dest = MPI_PROC_NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Cart_shift(self.ob_mpi, direction, disp, &source, &dest) ) * return (source, dest) */ __pyx_v_source = MPI_PROC_NULL; __pyx_v_dest = MPI_PROC_NULL; /* "mpi4py/MPI/Comm.pyx":1949 * """ * cdef int source = MPI_PROC_NULL, dest = MPI_PROC_NULL * CHKERR( MPI_Cart_shift(self.ob_mpi, direction, disp, &source, &dest) ) # <<<<<<<<<<<<<< * return (source, dest) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cart_shift(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_direction, __pyx_v_disp, (&__pyx_v_source), (&__pyx_v_dest))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1949, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1950 * cdef int source = MPI_PROC_NULL, dest = MPI_PROC_NULL * CHKERR( MPI_Cart_shift(self.ob_mpi, direction, disp, &source, &dest) ) * return (source, dest) # <<<<<<<<<<<<<< * * # Cartesian Partition Function */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dest); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1943 * # ------------------------ * * def Shift(self, int direction, int disp): # <<<<<<<<<<<<<< * """ * Return a tuple (source,dest) of process ranks */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Shift", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1955 * # ---------------------------- * * def Sub(self, remain_dims): # <<<<<<<<<<<<<< * """ * Return cartesian communicators */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_13Sub(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_8Cartcomm_12Sub[] = "Cartcomm.Sub(self, remain_dims)\n\n Return cartesian communicators\n that form lower-dimensional subgrids\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_8Cartcomm_13Sub(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_remain_dims = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Sub (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_remain_dims,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_remain_dims)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Sub") < 0)) __PYX_ERR(7, 1955, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_remain_dims = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Sub", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1955, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Sub", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_8Cartcomm_12Sub(((struct PyMPICartcommObject *)__pyx_v_self), __pyx_v_remain_dims); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_8Cartcomm_12Sub(struct PyMPICartcommObject *__pyx_v_self, PyObject *__pyx_v_remain_dims) { int __pyx_v_ndim; int *__pyx_v_iremdims; struct PyMPICartcommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Sub", 0); __Pyx_INCREF(__pyx_v_remain_dims); /* "mpi4py/MPI/Comm.pyx":1960 * that form lower-dimensional subgrids * """ * cdef int ndim = 0, *iremdims = NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) * remain_dims = chkarray(remain_dims, ndim, &iremdims) */ __pyx_v_ndim = 0; __pyx_v_iremdims = NULL; /* "mpi4py/MPI/Comm.pyx":1961 * """ * cdef int ndim = 0, *iremdims = NULL * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) # <<<<<<<<<<<<<< * remain_dims = chkarray(remain_dims, ndim, &iremdims) * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cartdim_get(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_ndim))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1961, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1962 * cdef int ndim = 0, *iremdims = NULL * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) * remain_dims = chkarray(remain_dims, ndim, &iremdims) # <<<<<<<<<<<<<< * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) * with nogil: CHKERR( MPI_Cart_sub(self.ob_mpi, iremdims, &comm.ob_mpi) ) */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_remain_dims, __pyx_v_ndim, (&__pyx_v_iremdims)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_remain_dims, __pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":1963 * CHKERR( MPI_Cartdim_get(self.ob_mpi, &ndim) ) * remain_dims = chkarray(remain_dims, ndim, &iremdims) * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Cart_sub(self.ob_mpi, iremdims, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Cartcomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Cartcomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1963, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_comm = ((struct PyMPICartcommObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":1964 * remain_dims = chkarray(remain_dims, ndim, &iremdims) * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) * with nogil: CHKERR( MPI_Cart_sub(self.ob_mpi, iremdims, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Cart_sub(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_iremdims, (&__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1964, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":1965 * cdef Cartcomm comm = Cartcomm.__new__(Cartcomm) * with nogil: CHKERR( MPI_Cart_sub(self.ob_mpi, iremdims, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.__pyx_base.__pyx_base.ob_mpi); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 1965, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1966 * with nogil: CHKERR( MPI_Cart_sub(self.ob_mpi, iremdims, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1955 * # ---------------------------- * * def Sub(self, remain_dims): # <<<<<<<<<<<<<< * """ * Return cartesian communicators */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Cartcomm.Sub", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XDECREF(__pyx_v_remain_dims); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1971 * # Cartesian Convenience Function * * def Compute_dims(int nnodes, dims): # <<<<<<<<<<<<<< * """ * Return a balanced distribution of */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_23Compute_dims(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_22Compute_dims[] = "Compute_dims(int nnodes, dims)\n\n Return a balanced distribution of\n processes per coordinate direction\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_23Compute_dims = {"Compute_dims", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_23Compute_dims, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_22Compute_dims}; static PyObject *__pyx_pw_6mpi4py_3MPI_23Compute_dims(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_nnodes; PyObject *__pyx_v_dims = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Compute_dims (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nnodes,&__pyx_n_s_dims,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nnodes)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dims)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Compute_dims", 1, 2, 2, 1); __PYX_ERR(7, 1971, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Compute_dims") < 0)) __PYX_ERR(7, 1971, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_nnodes = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nnodes == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1971, __pyx_L3_error) __pyx_v_dims = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Compute_dims", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1971, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Compute_dims", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_22Compute_dims(__pyx_self, __pyx_v_nnodes, __pyx_v_dims); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_22Compute_dims(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nnodes, PyObject *__pyx_v_dims) { int __pyx_v_i; int __pyx_v_ndims; int *__pyx_v_idims; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("Compute_dims", 0); __Pyx_INCREF(__pyx_v_dims); /* "mpi4py/MPI/Comm.pyx":1976 * processes per coordinate direction * """ * cdef int i = 0, ndims = 0, *idims = NULL # <<<<<<<<<<<<<< * try: * ndims = len(dims) */ __pyx_v_i = 0; __pyx_v_ndims = 0; __pyx_v_idims = NULL; /* "mpi4py/MPI/Comm.pyx":1977 * """ * cdef int i = 0, ndims = 0, *idims = NULL * try: # <<<<<<<<<<<<<< * ndims = len(dims) * except: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "mpi4py/MPI/Comm.pyx":1978 * cdef int i = 0, ndims = 0, *idims = NULL * try: * ndims = len(dims) # <<<<<<<<<<<<<< * except: * ndims = dims */ __pyx_t_4 = PyObject_Length(__pyx_v_dims); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(7, 1978, __pyx_L3_error) __pyx_v_ndims = ((int)__pyx_t_4); /* "mpi4py/MPI/Comm.pyx":1977 * """ * cdef int i = 0, ndims = 0, *idims = NULL * try: # <<<<<<<<<<<<<< * ndims = len(dims) * except: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "mpi4py/MPI/Comm.pyx":1979 * try: * ndims = len(dims) * except: # <<<<<<<<<<<<<< * ndims = dims * dims = [0] * ndims */ /*except:*/ { __Pyx_AddTraceback("mpi4py.MPI.Compute_dims", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(7, 1979, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "mpi4py/MPI/Comm.pyx":1980 * ndims = len(dims) * except: * ndims = dims # <<<<<<<<<<<<<< * dims = [0] * ndims * cdef tmp = chkarray(dims, ndims, &idims) */ __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_dims); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1980, __pyx_L5_except_error) __pyx_v_ndims = __pyx_t_8; /* "mpi4py/MPI/Comm.pyx":1981 * except: * ndims = dims * dims = [0] * ndims # <<<<<<<<<<<<<< * cdef tmp = chkarray(dims, ndims, &idims) * CHKERR( MPI_Dims_create(nnodes, ndims, idims) ) */ __pyx_t_9 = PyList_New(1 * ((__pyx_v_ndims<0) ? 0:__pyx_v_ndims)); if (unlikely(!__pyx_t_9)) __PYX_ERR(7, 1981, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_ndims; __pyx_temp++) { __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_9, __pyx_temp, __pyx_int_0); } } __Pyx_DECREF_SET(__pyx_v_dims, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; /* "mpi4py/MPI/Comm.pyx":1977 * """ * cdef int i = 0, ndims = 0, *idims = NULL * try: # <<<<<<<<<<<<<< * ndims = len(dims) * except: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "mpi4py/MPI/Comm.pyx":1982 * ndims = dims * dims = [0] * ndims * cdef tmp = chkarray(dims, ndims, &idims) # <<<<<<<<<<<<<< * CHKERR( MPI_Dims_create(nnodes, ndims, idims) ) * dims = [idims[i] for i from 0 <= i < ndims] */ __pyx_t_7 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_chkarray(__pyx_v_dims, __pyx_v_ndims, (&__pyx_v_idims)); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_tmp = __pyx_t_7; __pyx_t_7 = 0; /* "mpi4py/MPI/Comm.pyx":1983 * dims = [0] * ndims * cdef tmp = chkarray(dims, ndims, &idims) * CHKERR( MPI_Dims_create(nnodes, ndims, idims) ) # <<<<<<<<<<<<<< * dims = [idims[i] for i from 0 <= i < ndims] * return dims */ __pyx_t_8 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Dims_create(__pyx_v_nnodes, __pyx_v_ndims, __pyx_v_idims)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(7, 1983, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1984 * cdef tmp = chkarray(dims, ndims, &idims) * CHKERR( MPI_Dims_create(nnodes, ndims, idims) ) * dims = [idims[i] for i from 0 <= i < ndims] # <<<<<<<<<<<<<< * return dims * */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 1984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __pyx_v_ndims; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_idims[__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 1984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_6))) __PYX_ERR(7, 1984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF_SET(__pyx_v_dims, __pyx_t_7); __pyx_t_7 = 0; /* "mpi4py/MPI/Comm.pyx":1985 * CHKERR( MPI_Dims_create(nnodes, ndims, idims) ) * dims = [idims[i] for i from 0 <= i < ndims] * return dims # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_dims); __pyx_r = __pyx_v_dims; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":1971 * # Cartesian Convenience Function * * def Compute_dims(int nnodes, dims): # <<<<<<<<<<<<<< * """ * Return a balanced distribution of */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("mpi4py.MPI.Compute_dims", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_dims); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":1994 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9Graphcomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9Graphcomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPICommObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(7, 1994, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 1994, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 1, "comm", 0))) __PYX_ERR(7, 1994, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm___cinit__(((struct PyMPIGraphcommObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9Graphcomm___cinit__(struct PyMPIGraphcommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm) { int __pyx_v_topo; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Comm.pyx":1995 * * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return # <<<<<<<<<<<<<< * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":1996 * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo != MPI_GRAPH: raise TypeError( */ __pyx_v_topo = MPI_UNDEFINED; /* "mpi4py/MPI/Comm.pyx":1997 * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) # <<<<<<<<<<<<<< * if topo != MPI_GRAPH: raise TypeError( * "expecting a general graph communicator") */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Topo_test(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_topo))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 1997, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1998 * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo != MPI_GRAPH: raise TypeError( # <<<<<<<<<<<<<< * "expecting a general graph communicator") * */ __pyx_t_1 = ((__pyx_v_topo != MPI_GRAPH) != 0); if (unlikely(__pyx_t_1)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(7, 1998, __pyx_L1_error) } /* "mpi4py/MPI/Comm.pyx":1994 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2004 * # ----------------------- * * def Get_dims(self): # <<<<<<<<<<<<<< * """ * Return the number of nodes and edges */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_3Get_dims(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Graphcomm_2Get_dims[] = "Graphcomm.Get_dims(self)\n\n Return the number of nodes and edges\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_3Get_dims(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_dims (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_dims", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_dims", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_2Get_dims(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_2Get_dims(struct PyMPIGraphcommObject *__pyx_v_self) { int __pyx_v_nnodes; int __pyx_v_nedges; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Get_dims", 0); /* "mpi4py/MPI/Comm.pyx":2008 * Return the number of nodes and edges * """ * cdef int nnodes = 0, nedges = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Graphdims_get(self.ob_mpi, &nnodes, &nedges) ) * return (nnodes, nedges) */ __pyx_v_nnodes = 0; __pyx_v_nedges = 0; /* "mpi4py/MPI/Comm.pyx":2009 * """ * cdef int nnodes = 0, nedges = 0 * CHKERR( MPI_Graphdims_get(self.ob_mpi, &nnodes, &nedges) ) # <<<<<<<<<<<<<< * return (nnodes, nedges) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Graphdims_get(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_nnodes), (&__pyx_v_nedges))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2009, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2010 * cdef int nnodes = 0, nedges = 0 * CHKERR( MPI_Graphdims_get(self.ob_mpi, &nnodes, &nedges) ) * return (nnodes, nedges) # <<<<<<<<<<<<<< * * property dims: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nnodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nedges); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 2010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 2010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2004 * # ----------------------- * * def Get_dims(self): # <<<<<<<<<<<<<< * """ * Return the number of nodes and edges */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.Get_dims", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2014 * property dims: * """number of nodes and edges""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dims() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_4dims_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_4dims_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_4dims___get__(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_4dims___get__(struct PyMPIGraphcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2015 * """number of nodes and edges""" * def __get__(self): * return self.Get_dims() # <<<<<<<<<<<<<< * * property nnodes: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_dims); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2014 * property dims: * """number of nodes and edges""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dims() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.dims.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2019 * property nnodes: * """number of nodes""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dims()[0] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_6nnodes_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_6nnodes_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_6nnodes___get__(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_6nnodes___get__(struct PyMPIGraphcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2020 * """number of nodes""" * def __get__(self): * return self.Get_dims()[0] # <<<<<<<<<<<<<< * * property nedges: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_dims); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2019 * property nnodes: * """number of nodes""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dims()[0] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.nnodes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2024 * property nedges: * """number of edges""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dims()[1] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_6nedges_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_6nedges_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_6nedges___get__(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_6nedges___get__(struct PyMPIGraphcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2025 * """number of edges""" * def __get__(self): * return self.Get_dims()[1] # <<<<<<<<<<<<<< * * def Get_topo(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_dims); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2024 * property nedges: * """number of edges""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_dims()[1] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.nedges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2027 * return self.Get_dims()[1] * * def Get_topo(self): # <<<<<<<<<<<<<< * """ * Return index and edges */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_5Get_topo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Graphcomm_4Get_topo[] = "Graphcomm.Get_topo(self)\n\n Return index and edges\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_5Get_topo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_topo (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_topo", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_topo", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_4Get_topo(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_4Get_topo(struct PyMPIGraphcommObject *__pyx_v_self) { int __pyx_v_nindex; int __pyx_v_nedges; int *__pyx_v_iindex; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; int *__pyx_v_iedges; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; int __pyx_v_i; PyObject *__pyx_v_index = 0; PyObject *__pyx_v_edges = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Get_topo", 0); /* "mpi4py/MPI/Comm.pyx":2031 * Return index and edges * """ * cdef int nindex = 0, nedges = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Graphdims_get( self.ob_mpi, &nindex, &nedges) ) * cdef int *iindex = NULL */ __pyx_v_nindex = 0; __pyx_v_nedges = 0; /* "mpi4py/MPI/Comm.pyx":2032 * """ * cdef int nindex = 0, nedges = 0 * CHKERR( MPI_Graphdims_get( self.ob_mpi, &nindex, &nedges) ) # <<<<<<<<<<<<<< * cdef int *iindex = NULL * cdef tmp1 = newarray(nindex, &iindex) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Graphdims_get(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_nindex), (&__pyx_v_nedges))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2032, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2033 * cdef int nindex = 0, nedges = 0 * CHKERR( MPI_Graphdims_get( self.ob_mpi, &nindex, &nedges) ) * cdef int *iindex = NULL # <<<<<<<<<<<<<< * cdef tmp1 = newarray(nindex, &iindex) * cdef int *iedges = NULL */ __pyx_v_iindex = NULL; /* "mpi4py/MPI/Comm.pyx":2034 * CHKERR( MPI_Graphdims_get( self.ob_mpi, &nindex, &nedges) ) * cdef int *iindex = NULL * cdef tmp1 = newarray(nindex, &iindex) # <<<<<<<<<<<<<< * cdef int *iedges = NULL * cdef tmp2 = newarray(nedges, &iedges) */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_nindex, (&__pyx_v_iindex)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2035 * cdef int *iindex = NULL * cdef tmp1 = newarray(nindex, &iindex) * cdef int *iedges = NULL # <<<<<<<<<<<<<< * cdef tmp2 = newarray(nedges, &iedges) * CHKERR( MPI_Graph_get(self.ob_mpi, nindex, nedges, iindex, iedges) ) */ __pyx_v_iedges = NULL; /* "mpi4py/MPI/Comm.pyx":2036 * cdef tmp1 = newarray(nindex, &iindex) * cdef int *iedges = NULL * cdef tmp2 = newarray(nedges, &iedges) # <<<<<<<<<<<<<< * CHKERR( MPI_Graph_get(self.ob_mpi, nindex, nedges, iindex, iedges) ) * cdef int i = 0 */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_nedges, (&__pyx_v_iedges)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp2 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2037 * cdef int *iedges = NULL * cdef tmp2 = newarray(nedges, &iedges) * CHKERR( MPI_Graph_get(self.ob_mpi, nindex, nedges, iindex, iedges) ) # <<<<<<<<<<<<<< * cdef int i = 0 * cdef object index = [iindex[i] for i from 0 <= i < nindex] */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Graph_get(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_nindex, __pyx_v_nedges, __pyx_v_iindex, __pyx_v_iedges)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2037, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2038 * cdef tmp2 = newarray(nedges, &iedges) * CHKERR( MPI_Graph_get(self.ob_mpi, nindex, nedges, iindex, iedges) ) * cdef int i = 0 # <<<<<<<<<<<<<< * cdef object index = [iindex[i] for i from 0 <= i < nindex] * cdef object edges = [iedges[i] for i from 0 <= i < nedges] */ __pyx_v_i = 0; /* "mpi4py/MPI/Comm.pyx":2039 * CHKERR( MPI_Graph_get(self.ob_mpi, nindex, nedges, iindex, iedges) ) * cdef int i = 0 * cdef object index = [iindex[i] for i from 0 <= i < nindex] # <<<<<<<<<<<<<< * cdef object edges = [iedges[i] for i from 0 <= i < nedges] * return (index, edges) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_nindex; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_iindex[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 2039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 2039, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_index = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2040 * cdef int i = 0 * cdef object index = [iindex[i] for i from 0 <= i < nindex] * cdef object edges = [iedges[i] for i from 0 <= i < nedges] # <<<<<<<<<<<<<< * return (index, edges) * */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_nedges; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_iedges[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 2040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 2040, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_edges = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2041 * cdef object index = [iindex[i] for i from 0 <= i < nindex] * cdef object edges = [iedges[i] for i from 0 <= i < nedges] * return (index, edges) # <<<<<<<<<<<<<< * * property topo: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_index); __Pyx_GIVEREF(__pyx_v_index); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_index); __Pyx_INCREF(__pyx_v_edges); __Pyx_GIVEREF(__pyx_v_edges); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_edges); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2027 * return self.Get_dims()[1] * * def Get_topo(self): # <<<<<<<<<<<<<< * """ * Return index and edges */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.Get_topo", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_index); __Pyx_XDECREF(__pyx_v_edges); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2045 * property topo: * """topology information""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_4topo_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_4topo_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_4topo___get__(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_4topo___get__(struct PyMPIGraphcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2046 * """topology information""" * def __get__(self): * return self.Get_topo() # <<<<<<<<<<<<<< * * property index: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_topo); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2045 * property topo: * """topology information""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.topo.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2050 * property index: * """index""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[0] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_5index_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_5index_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_5index___get__(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_5index___get__(struct PyMPIGraphcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2051 * """index""" * def __get__(self): * return self.Get_topo()[0] # <<<<<<<<<<<<<< * * property edges: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_topo); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2050 * property index: * """index""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[0] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2055 * property edges: * """edges""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[1] * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_5edges_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_5edges_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_5edges___get__(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_5edges___get__(struct PyMPIGraphcommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2056 * """edges""" * def __get__(self): * return self.Get_topo()[1] # <<<<<<<<<<<<<< * * # Graph Information Functions */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_topo); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2055 * property edges: * """edges""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_topo()[1] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.edges.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2061 * # --------------------------- * * def Get_neighbors_count(self, int rank): # <<<<<<<<<<<<<< * """ * Return number of neighbors of a process */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_7Get_neighbors_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Graphcomm_6Get_neighbors_count[] = "Graphcomm.Get_neighbors_count(self, int rank)\n\n Return number of neighbors of a process\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_7Get_neighbors_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_rank; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_neighbors_count (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rank,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_neighbors_count") < 0)) __PYX_ERR(7, 2061, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rank = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 2061, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_neighbors_count", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2061, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.Get_neighbors_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_6Get_neighbors_count(((struct PyMPIGraphcommObject *)__pyx_v_self), __pyx_v_rank); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_6Get_neighbors_count(struct PyMPIGraphcommObject *__pyx_v_self, int __pyx_v_rank) { int __pyx_v_nneighbors; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_neighbors_count", 0); /* "mpi4py/MPI/Comm.pyx":2065 * Return number of neighbors of a process * """ * cdef int nneighbors = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Graph_neighbors_count(self.ob_mpi, rank, &nneighbors) ) * return nneighbors */ __pyx_v_nneighbors = 0; /* "mpi4py/MPI/Comm.pyx":2066 * """ * cdef int nneighbors = 0 * CHKERR( MPI_Graph_neighbors_count(self.ob_mpi, rank, &nneighbors) ) # <<<<<<<<<<<<<< * return nneighbors * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Graph_neighbors_count(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_rank, (&__pyx_v_nneighbors))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2066, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2067 * cdef int nneighbors = 0 * CHKERR( MPI_Graph_neighbors_count(self.ob_mpi, rank, &nneighbors) ) * return nneighbors # <<<<<<<<<<<<<< * * property nneighbors: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_nneighbors); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2061 * # --------------------------- * * def Get_neighbors_count(self, int rank): # <<<<<<<<<<<<<< * """ * Return number of neighbors of a process */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.Get_neighbors_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2071 * property nneighbors: * """number of neighbors""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int rank = self.Get_rank() * return self.Get_neighbors_count(rank) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_10nneighbors_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_10nneighbors_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_10nneighbors___get__(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_10nneighbors___get__(struct PyMPIGraphcommObject *__pyx_v_self) { int __pyx_v_rank; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2072 * """number of neighbors""" * def __get__(self): * cdef int rank = self.Get_rank() # <<<<<<<<<<<<<< * return self.Get_neighbors_count(rank) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 2072, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rank = __pyx_t_4; /* "mpi4py/MPI/Comm.pyx":2073 * def __get__(self): * cdef int rank = self.Get_rank() * return self.Get_neighbors_count(rank) # <<<<<<<<<<<<<< * * def Get_neighbors(self, int rank): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_neighbors_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rank); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 2073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2071 * property nneighbors: * """number of neighbors""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int rank = self.Get_rank() * return self.Get_neighbors_count(rank) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.nneighbors.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2075 * return self.Get_neighbors_count(rank) * * def Get_neighbors(self, int rank): # <<<<<<<<<<<<<< * """ * Return list of neighbors of a process */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_9Get_neighbors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Graphcomm_8Get_neighbors[] = "Graphcomm.Get_neighbors(self, int rank)\n\n Return list of neighbors of a process\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_9Get_neighbors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_rank; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_neighbors (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rank,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_neighbors") < 0)) __PYX_ERR(7, 2075, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rank = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 2075, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_neighbors", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2075, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.Get_neighbors", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_8Get_neighbors(((struct PyMPIGraphcommObject *)__pyx_v_self), __pyx_v_rank); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_8Get_neighbors(struct PyMPIGraphcommObject *__pyx_v_self, int __pyx_v_rank) { int __pyx_v_i; int __pyx_v_nneighbors; int *__pyx_v_ineighbors; CYTHON_UNUSED PyObject *__pyx_v_tmp = 0; PyObject *__pyx_v_neighbors = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Get_neighbors", 0); /* "mpi4py/MPI/Comm.pyx":2079 * Return list of neighbors of a process * """ * cdef int i = 0, nneighbors = 0, *ineighbors = NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Graph_neighbors_count( * self.ob_mpi, rank, &nneighbors) ) */ __pyx_v_i = 0; __pyx_v_nneighbors = 0; __pyx_v_ineighbors = NULL; /* "mpi4py/MPI/Comm.pyx":2080 * """ * cdef int i = 0, nneighbors = 0, *ineighbors = NULL * CHKERR( MPI_Graph_neighbors_count( # <<<<<<<<<<<<<< * self.ob_mpi, rank, &nneighbors) ) * cdef tmp = newarray(nneighbors, &ineighbors) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Graph_neighbors_count(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_rank, (&__pyx_v_nneighbors))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2080, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2082 * CHKERR( MPI_Graph_neighbors_count( * self.ob_mpi, rank, &nneighbors) ) * cdef tmp = newarray(nneighbors, &ineighbors) # <<<<<<<<<<<<<< * CHKERR( MPI_Graph_neighbors( * self.ob_mpi, rank, nneighbors, ineighbors) ) */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_nneighbors, (&__pyx_v_ineighbors)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2083 * self.ob_mpi, rank, &nneighbors) ) * cdef tmp = newarray(nneighbors, &ineighbors) * CHKERR( MPI_Graph_neighbors( # <<<<<<<<<<<<<< * self.ob_mpi, rank, nneighbors, ineighbors) ) * cdef object neighbors = [ineighbors[i] for i from 0 <= i < nneighbors] */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Graph_neighbors(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_rank, __pyx_v_nneighbors, __pyx_v_ineighbors)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2083, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2085 * CHKERR( MPI_Graph_neighbors( * self.ob_mpi, rank, nneighbors, ineighbors) ) * cdef object neighbors = [ineighbors[i] for i from 0 <= i < nneighbors] # <<<<<<<<<<<<<< * return neighbors * */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_nneighbors; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_ineighbors[__pyx_v_i])); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 2085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(7, 2085, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_v_neighbors = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2086 * self.ob_mpi, rank, nneighbors, ineighbors) ) * cdef object neighbors = [ineighbors[i] for i from 0 <= i < nneighbors] * return neighbors # <<<<<<<<<<<<<< * * property neighbors: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_neighbors); __pyx_r = __pyx_v_neighbors; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2075 * return self.Get_neighbors_count(rank) * * def Get_neighbors(self, int rank): # <<<<<<<<<<<<<< * """ * Return list of neighbors of a process */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.Get_neighbors", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp); __Pyx_XDECREF(__pyx_v_neighbors); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2090 * property neighbors: * """neighbors""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int rank = self.Get_rank() * return self.Get_neighbors(rank) */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_9neighbors_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Graphcomm_9neighbors_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Graphcomm_9neighbors___get__(((struct PyMPIGraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Graphcomm_9neighbors___get__(struct PyMPIGraphcommObject *__pyx_v_self) { int __pyx_v_rank; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2091 * """neighbors""" * def __get__(self): * cdef int rank = self.Get_rank() # <<<<<<<<<<<<<< * return self.Get_neighbors(rank) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 2091, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rank = __pyx_t_4; /* "mpi4py/MPI/Comm.pyx":2092 * def __get__(self): * cdef int rank = self.Get_rank() * return self.Get_neighbors(rank) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_neighbors); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rank); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 2092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2090 * property neighbors: * """neighbors""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int rank = self.Get_rank() * return self.Get_neighbors(rank) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Graphcomm.neighbors.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2101 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_13Distgraphcomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_13Distgraphcomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPICommObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(7, 2101, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2101, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Distgraphcomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 1, "comm", 0))) __PYX_ERR(7, 2101, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_13Distgraphcomm___cinit__(((struct PyMPIDistgraphcommObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_13Distgraphcomm___cinit__(struct PyMPIDistgraphcommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm) { int __pyx_v_topo; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Comm.pyx":2102 * * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return # <<<<<<<<<<<<<< * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":2103 * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED # <<<<<<<<<<<<<< * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo != MPI_DIST_GRAPH: raise TypeError( */ __pyx_v_topo = MPI_UNDEFINED; /* "mpi4py/MPI/Comm.pyx":2104 * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) # <<<<<<<<<<<<<< * if topo != MPI_DIST_GRAPH: raise TypeError( * "expecting a distributed graph communicator") */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Topo_test(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_topo))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 2104, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2105 * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo != MPI_DIST_GRAPH: raise TypeError( # <<<<<<<<<<<<<< * "expecting a distributed graph communicator") * */ __pyx_t_1 = ((__pyx_v_topo != MPI_DIST_GRAPH) != 0); if (unlikely(__pyx_t_1)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 2105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(7, 2105, __pyx_L1_error) } /* "mpi4py/MPI/Comm.pyx":2101 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int topo = MPI_UNDEFINED */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Distgraphcomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2111 * # -------------------------- * * def Get_dist_neighbors_count(self): # <<<<<<<<<<<<<< * """ * Return adjacency information for a distributed graph topology */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_13Distgraphcomm_3Get_dist_neighbors_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_13Distgraphcomm_2Get_dist_neighbors_count[] = "Distgraphcomm.Get_dist_neighbors_count(self)\n\n Return adjacency information for a distributed graph topology\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_13Distgraphcomm_3Get_dist_neighbors_count(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_dist_neighbors_count (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_dist_neighbors_count", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_dist_neighbors_count", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_13Distgraphcomm_2Get_dist_neighbors_count(((struct PyMPIDistgraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_13Distgraphcomm_2Get_dist_neighbors_count(struct PyMPIDistgraphcommObject *__pyx_v_self) { int __pyx_v_indegree; int __pyx_v_outdegree; int __pyx_v_weighted; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("Get_dist_neighbors_count", 0); /* "mpi4py/MPI/Comm.pyx":2115 * Return adjacency information for a distributed graph topology * """ * cdef int indegree = 0 # <<<<<<<<<<<<<< * cdef int outdegree = 0 * cdef int weighted = 0 */ __pyx_v_indegree = 0; /* "mpi4py/MPI/Comm.pyx":2116 * """ * cdef int indegree = 0 * cdef int outdegree = 0 # <<<<<<<<<<<<<< * cdef int weighted = 0 * CHKERR( MPI_Dist_graph_neighbors_count( */ __pyx_v_outdegree = 0; /* "mpi4py/MPI/Comm.pyx":2117 * cdef int indegree = 0 * cdef int outdegree = 0 * cdef int weighted = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Dist_graph_neighbors_count( * self.ob_mpi, &indegree, &outdegree, &weighted) ) */ __pyx_v_weighted = 0; /* "mpi4py/MPI/Comm.pyx":2118 * cdef int outdegree = 0 * cdef int weighted = 0 * CHKERR( MPI_Dist_graph_neighbors_count( # <<<<<<<<<<<<<< * self.ob_mpi, &indegree, &outdegree, &weighted) ) * return (indegree, outdegree, weighted) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Dist_graph_neighbors_count(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_indegree), (&__pyx_v_outdegree), (&__pyx_v_weighted))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2118, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2120 * CHKERR( MPI_Dist_graph_neighbors_count( * self.ob_mpi, &indegree, &outdegree, &weighted) ) * return (indegree, outdegree, weighted) # <<<<<<<<<<<<<< * * def Get_dist_neighbors(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_indegree); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_outdegree); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 2120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_weighted != 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 2120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 2120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2111 * # -------------------------- * * def Get_dist_neighbors_count(self): # <<<<<<<<<<<<<< * """ * Return adjacency information for a distributed graph topology */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Distgraphcomm.Get_dist_neighbors_count", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2122 * return (indegree, outdegree, weighted) * * def Get_dist_neighbors(self): # <<<<<<<<<<<<<< * """ * Return adjacency information for a distributed graph topology */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_13Distgraphcomm_5Get_dist_neighbors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_13Distgraphcomm_4Get_dist_neighbors[] = "Distgraphcomm.Get_dist_neighbors(self)\n\n Return adjacency information for a distributed graph topology\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_13Distgraphcomm_5Get_dist_neighbors(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_dist_neighbors (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_dist_neighbors", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_dist_neighbors", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_13Distgraphcomm_4Get_dist_neighbors(((struct PyMPIDistgraphcommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_13Distgraphcomm_4Get_dist_neighbors(struct PyMPIDistgraphcommObject *__pyx_v_self) { int __pyx_v_maxindegree; int __pyx_v_maxoutdegree; int __pyx_v_weighted; int *__pyx_v_sources; int *__pyx_v_destinations; int *__pyx_v_sourceweights; int *__pyx_v_destweights; CYTHON_UNUSED PyObject *__pyx_v_tmp1 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp2 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp3 = 0; CYTHON_UNUSED PyObject *__pyx_v_tmp4 = 0; int __pyx_v_i; PyObject *__pyx_v_src = 0; PyObject *__pyx_v_dst = 0; PyObject *__pyx_v_sw = 0; PyObject *__pyx_v_dw = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Get_dist_neighbors", 0); /* "mpi4py/MPI/Comm.pyx":2126 * Return adjacency information for a distributed graph topology * """ * cdef int maxindegree = 0, maxoutdegree = 0, weighted = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Dist_graph_neighbors_count( * self.ob_mpi, &maxindegree, &maxoutdegree, &weighted) ) */ __pyx_v_maxindegree = 0; __pyx_v_maxoutdegree = 0; __pyx_v_weighted = 0; /* "mpi4py/MPI/Comm.pyx":2127 * """ * cdef int maxindegree = 0, maxoutdegree = 0, weighted = 0 * CHKERR( MPI_Dist_graph_neighbors_count( # <<<<<<<<<<<<<< * self.ob_mpi, &maxindegree, &maxoutdegree, &weighted) ) * # */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Dist_graph_neighbors_count(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, (&__pyx_v_maxindegree), (&__pyx_v_maxoutdegree), (&__pyx_v_weighted))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2127, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2130 * self.ob_mpi, &maxindegree, &maxoutdegree, &weighted) ) * # * cdef int *sources = NULL, *destinations = NULL # <<<<<<<<<<<<<< * cdef int *sourceweights = MPI_UNWEIGHTED * cdef int *destweights = MPI_UNWEIGHTED */ __pyx_v_sources = NULL; __pyx_v_destinations = NULL; /* "mpi4py/MPI/Comm.pyx":2131 * # * cdef int *sources = NULL, *destinations = NULL * cdef int *sourceweights = MPI_UNWEIGHTED # <<<<<<<<<<<<<< * cdef int *destweights = MPI_UNWEIGHTED * cdef tmp1, tmp2, tmp3, tmp4 */ __pyx_v_sourceweights = MPI_UNWEIGHTED; /* "mpi4py/MPI/Comm.pyx":2132 * cdef int *sources = NULL, *destinations = NULL * cdef int *sourceweights = MPI_UNWEIGHTED * cdef int *destweights = MPI_UNWEIGHTED # <<<<<<<<<<<<<< * cdef tmp1, tmp2, tmp3, tmp4 * tmp1 = newarray(maxindegree, &sources) */ __pyx_v_destweights = MPI_UNWEIGHTED; /* "mpi4py/MPI/Comm.pyx":2134 * cdef int *destweights = MPI_UNWEIGHTED * cdef tmp1, tmp2, tmp3, tmp4 * tmp1 = newarray(maxindegree, &sources) # <<<<<<<<<<<<<< * tmp2 = newarray(maxoutdegree, &destinations) * cdef int i = 0 */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_maxindegree, (&__pyx_v_sources)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp1 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2135 * cdef tmp1, tmp2, tmp3, tmp4 * tmp1 = newarray(maxindegree, &sources) * tmp2 = newarray(maxoutdegree, &destinations) # <<<<<<<<<<<<<< * cdef int i = 0 * if weighted: */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_maxoutdegree, (&__pyx_v_destinations)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp2 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2136 * tmp1 = newarray(maxindegree, &sources) * tmp2 = newarray(maxoutdegree, &destinations) * cdef int i = 0 # <<<<<<<<<<<<<< * if weighted: * tmp3 = newarray(maxindegree, &sourceweights) */ __pyx_v_i = 0; /* "mpi4py/MPI/Comm.pyx":2137 * tmp2 = newarray(maxoutdegree, &destinations) * cdef int i = 0 * if weighted: # <<<<<<<<<<<<<< * tmp3 = newarray(maxindegree, &sourceweights) * for i from 0 <= i < maxindegree: sourceweights[i] = 1 */ __pyx_t_3 = (__pyx_v_weighted != 0); if (__pyx_t_3) { /* "mpi4py/MPI/Comm.pyx":2138 * cdef int i = 0 * if weighted: * tmp3 = newarray(maxindegree, &sourceweights) # <<<<<<<<<<<<<< * for i from 0 <= i < maxindegree: sourceweights[i] = 1 * tmp4 = newarray(maxoutdegree, &destweights) */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_maxindegree, (&__pyx_v_sourceweights)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp3 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2139 * if weighted: * tmp3 = newarray(maxindegree, &sourceweights) * for i from 0 <= i < maxindegree: sourceweights[i] = 1 # <<<<<<<<<<<<<< * tmp4 = newarray(maxoutdegree, &destweights) * for i from 0 <= i < maxoutdegree: destweights[i] = 1 */ __pyx_t_1 = __pyx_v_maxindegree; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { (__pyx_v_sourceweights[__pyx_v_i]) = 1; } /* "mpi4py/MPI/Comm.pyx":2140 * tmp3 = newarray(maxindegree, &sourceweights) * for i from 0 <= i < maxindegree: sourceweights[i] = 1 * tmp4 = newarray(maxoutdegree, &destweights) # <<<<<<<<<<<<<< * for i from 0 <= i < maxoutdegree: destweights[i] = 1 * # */ __pyx_t_2 = __pyx_fuse_0__pyx_f_6mpi4py_3MPI_newarray(__pyx_v_maxoutdegree, (&__pyx_v_destweights)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_tmp4 = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2141 * for i from 0 <= i < maxindegree: sourceweights[i] = 1 * tmp4 = newarray(maxoutdegree, &destweights) * for i from 0 <= i < maxoutdegree: destweights[i] = 1 # <<<<<<<<<<<<<< * # * CHKERR( MPI_Dist_graph_neighbors( */ __pyx_t_1 = __pyx_v_maxoutdegree; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { (__pyx_v_destweights[__pyx_v_i]) = 1; } /* "mpi4py/MPI/Comm.pyx":2137 * tmp2 = newarray(maxoutdegree, &destinations) * cdef int i = 0 * if weighted: # <<<<<<<<<<<<<< * tmp3 = newarray(maxindegree, &sourceweights) * for i from 0 <= i < maxindegree: sourceweights[i] = 1 */ } /* "mpi4py/MPI/Comm.pyx":2143 * for i from 0 <= i < maxoutdegree: destweights[i] = 1 * # * CHKERR( MPI_Dist_graph_neighbors( # <<<<<<<<<<<<<< * self.ob_mpi, * maxindegree, sources, sourceweights, */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Dist_graph_neighbors(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.ob_mpi, __pyx_v_maxindegree, __pyx_v_sources, __pyx_v_sourceweights, __pyx_v_maxoutdegree, __pyx_v_destinations, __pyx_v_destweights)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2143, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2148 * maxoutdegree, destinations, destweights) ) * # * cdef object src = [sources[i] for i from 0 <= i < maxindegree] # <<<<<<<<<<<<<< * cdef object dst = [destinations[i] for i from 0 <= i < maxoutdegree] * if not weighted: return (src, dst, None) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_maxindegree; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_sources[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 2148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(7, 2148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_v_src = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2149 * # * cdef object src = [sources[i] for i from 0 <= i < maxindegree] * cdef object dst = [destinations[i] for i from 0 <= i < maxoutdegree] # <<<<<<<<<<<<<< * if not weighted: return (src, dst, None) * # */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_maxoutdegree; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_destinations[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 2149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(7, 2149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_v_dst = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2150 * cdef object src = [sources[i] for i from 0 <= i < maxindegree] * cdef object dst = [destinations[i] for i from 0 <= i < maxoutdegree] * if not weighted: return (src, dst, None) # <<<<<<<<<<<<<< * # * cdef object sw = [sourceweights[i] for i from 0 <= i < maxindegree] */ __pyx_t_3 = ((!(__pyx_v_weighted != 0)) != 0); if (__pyx_t_3) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_src); __Pyx_GIVEREF(__pyx_v_src); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_src); __Pyx_INCREF(__pyx_v_dst); __Pyx_GIVEREF(__pyx_v_dst); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_dst); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":2152 * if not weighted: return (src, dst, None) * # * cdef object sw = [sourceweights[i] for i from 0 <= i < maxindegree] # <<<<<<<<<<<<<< * cdef object dw = [destweights[i] for i from 0 <= i < maxoutdegree] * return (src, dst, (sw, dw)) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_maxindegree; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_sourceweights[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 2152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(7, 2152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_v_sw = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2153 * # * cdef object sw = [sourceweights[i] for i from 0 <= i < maxindegree] * cdef object dw = [destweights[i] for i from 0 <= i < maxoutdegree] # <<<<<<<<<<<<<< * return (src, dst, (sw, dw)) * */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_maxoutdegree; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_destweights[__pyx_v_i])); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 2153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(7, 2153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_v_dw = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2154 * cdef object sw = [sourceweights[i] for i from 0 <= i < maxindegree] * cdef object dw = [destweights[i] for i from 0 <= i < maxoutdegree] * return (src, dst, (sw, dw)) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_sw); __Pyx_GIVEREF(__pyx_v_sw); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_sw); __Pyx_INCREF(__pyx_v_dw); __Pyx_GIVEREF(__pyx_v_dw); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_dw); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_src); __Pyx_GIVEREF(__pyx_v_src); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_src); __Pyx_INCREF(__pyx_v_dst); __Pyx_GIVEREF(__pyx_v_dst); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_dst); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2122 * return (indegree, outdegree, weighted) * * def Get_dist_neighbors(self): # <<<<<<<<<<<<<< * """ * Return adjacency information for a distributed graph topology */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Distgraphcomm.Get_dist_neighbors", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tmp1); __Pyx_XDECREF(__pyx_v_tmp2); __Pyx_XDECREF(__pyx_v_tmp3); __Pyx_XDECREF(__pyx_v_tmp4); __Pyx_XDECREF(__pyx_v_src); __Pyx_XDECREF(__pyx_v_dst); __Pyx_XDECREF(__pyx_v_sw); __Pyx_XDECREF(__pyx_v_dw); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2163 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int inter = 0 */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_9Intercomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_9Intercomm_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPICommObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(7, 2163, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPICommObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2163, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intercomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Comm, 1, "comm", 0))) __PYX_ERR(7, 2163, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intercomm___cinit__(((struct PyMPIIntercommObject *)__pyx_v_self), __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_9Intercomm___cinit__(struct PyMPIIntercommObject *__pyx_v_self, CYTHON_UNUSED struct PyMPICommObject *__pyx_v_comm) { int __pyx_v_inter; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Comm.pyx":2164 * * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return # <<<<<<<<<<<<<< * cdef int inter = 0 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) */ __pyx_t_1 = ((__pyx_v_self->__pyx_base.ob_mpi == MPI_COMM_NULL) != 0); if (__pyx_t_1) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Comm.pyx":2165 * def __cinit__(self, Comm comm=None): * if self.ob_mpi == MPI_COMM_NULL: return * cdef int inter = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) * if not inter: raise TypeError( */ __pyx_v_inter = 0; /* "mpi4py/MPI/Comm.pyx":2166 * if self.ob_mpi == MPI_COMM_NULL: return * cdef int inter = 0 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) # <<<<<<<<<<<<<< * if not inter: raise TypeError( * "expecting an intercommunicator") */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_test_inter(__pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_inter))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 2166, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2167 * cdef int inter = 0 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) * if not inter: raise TypeError( # <<<<<<<<<<<<<< * "expecting an intercommunicator") * */ __pyx_t_1 = ((!(__pyx_v_inter != 0)) != 0); if (unlikely(__pyx_t_1)) { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 2167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(7, 2167, __pyx_L1_error) } /* "mpi4py/MPI/Comm.pyx":2163 * """ * * def __cinit__(self, Comm comm=None): # <<<<<<<<<<<<<< * if self.ob_mpi == MPI_COMM_NULL: return * cdef int inter = 0 */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Intercomm.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2173 * # --------------------------- * * def Get_remote_group(self): # <<<<<<<<<<<<<< * """ * Access the remote group associated */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_3Get_remote_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intercomm_2Get_remote_group[] = "Intercomm.Get_remote_group(self)\n\n Access the remote group associated\n with the inter-communicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_3Get_remote_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_remote_group (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_remote_group", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_remote_group", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intercomm_2Get_remote_group(((struct PyMPIIntercommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_2Get_remote_group(struct PyMPIIntercommObject *__pyx_v_self) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_remote_group", 0); /* "mpi4py/MPI/Comm.pyx":2178 * with the inter-communicator * """ * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Comm_remote_group( * self.ob_mpi, &group.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2178, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2179 * """ * cdef Group group = Group.__new__(Group) * with nogil: CHKERR( MPI_Comm_remote_group( # <<<<<<<<<<<<<< * self.ob_mpi, &group.ob_mpi) ) * return group */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":2180 * cdef Group group = Group.__new__(Group) * with nogil: CHKERR( MPI_Comm_remote_group( * self.ob_mpi, &group.ob_mpi) ) # <<<<<<<<<<<<<< * return group * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_group(__pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 2179, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":2179 * """ * cdef Group group = Group.__new__(Group) * with nogil: CHKERR( MPI_Comm_remote_group( # <<<<<<<<<<<<<< * self.ob_mpi, &group.ob_mpi) ) * return group */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":2181 * with nogil: CHKERR( MPI_Comm_remote_group( * self.ob_mpi, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * property remote_group: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2173 * # --------------------------- * * def Get_remote_group(self): # <<<<<<<<<<<<<< * """ * Access the remote group associated */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Intercomm.Get_remote_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2185 * property remote_group: * """remote group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_remote_group() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_12remote_group_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_12remote_group_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intercomm_12remote_group___get__(((struct PyMPIIntercommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_12remote_group___get__(struct PyMPIIntercommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2186 * """remote group""" * def __get__(self): * return self.Get_remote_group() # <<<<<<<<<<<<<< * * def Get_remote_size(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_remote_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2185 * property remote_group: * """remote group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_remote_group() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Intercomm.remote_group.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2188 * return self.Get_remote_group() * * def Get_remote_size(self): # <<<<<<<<<<<<<< * """ * Intercommunicator remote size */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_5Get_remote_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intercomm_4Get_remote_size[] = "Intercomm.Get_remote_size(self)\n\n Intercommunicator remote size\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_5Get_remote_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_remote_size (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_remote_size", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_remote_size", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intercomm_4Get_remote_size(((struct PyMPIIntercommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_4Get_remote_size(struct PyMPIIntercommObject *__pyx_v_self) { int __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_remote_size", 0); /* "mpi4py/MPI/Comm.pyx":2192 * Intercommunicator remote size * """ * cdef int size = -1 # <<<<<<<<<<<<<< * CHKERR( MPI_Comm_remote_size(self.ob_mpi, &size) ) * return size */ __pyx_v_size = -1; /* "mpi4py/MPI/Comm.pyx":2193 * """ * cdef int size = -1 * CHKERR( MPI_Comm_remote_size(self.ob_mpi, &size) ) # <<<<<<<<<<<<<< * return size * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Comm_remote_size(__pyx_v_self->__pyx_base.ob_mpi, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2193, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2194 * cdef int size = -1 * CHKERR( MPI_Comm_remote_size(self.ob_mpi, &size) ) * return size # <<<<<<<<<<<<<< * * property remote_size: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2188 * return self.Get_remote_group() * * def Get_remote_size(self): # <<<<<<<<<<<<<< * """ * Intercommunicator remote size */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Intercomm.Get_remote_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2198 * property remote_size: * """number of remote processes""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_remote_size() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_11remote_size_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_11remote_size_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intercomm_11remote_size___get__(((struct PyMPIIntercommObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_11remote_size___get__(struct PyMPIIntercommObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Comm.pyx":2199 * """number of remote processes""" * def __get__(self): * return self.Get_remote_size() # <<<<<<<<<<<<<< * * # Communicator Constructors */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_remote_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2198 * property remote_size: * """number of remote processes""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_remote_size() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Intercomm.remote_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2204 * # ------------------------- * * def Merge(self, bint high=False): # <<<<<<<<<<<<<< * """ * Merge intercommunicator */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_7Merge(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_9Intercomm_6Merge[] = "Intercomm.Merge(self, bool high=False)\n\n Merge intercommunicator\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_9Intercomm_7Merge(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_high; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Merge (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_high,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_high); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Merge") < 0)) __PYX_ERR(7, 2204, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_high = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_high == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 2204, __pyx_L3_error) } else { __pyx_v_high = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Merge", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2204, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Intercomm.Merge", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_9Intercomm_6Merge(((struct PyMPIIntercommObject *)__pyx_v_self), __pyx_v_high); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_9Intercomm_6Merge(struct PyMPIIntercommObject *__pyx_v_self, int __pyx_v_high) { struct PyMPIIntracommObject *__pyx_v_comm = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Merge", 0); /* "mpi4py/MPI/Comm.pyx":2208 * Merge intercommunicator * """ * cdef Intracomm comm = Intracomm.__new__(Intracomm) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Intercomm_merge( * self.ob_mpi, high, &comm.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Intracomm(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Intracomm), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2208, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_comm = ((struct PyMPIIntracommObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Comm.pyx":2209 * """ * cdef Intracomm comm = Intracomm.__new__(Intracomm) * with nogil: CHKERR( MPI_Intercomm_merge( # <<<<<<<<<<<<<< * self.ob_mpi, high, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Comm.pyx":2210 * cdef Intracomm comm = Intracomm.__new__(Intracomm) * with nogil: CHKERR( MPI_Intercomm_merge( * self.ob_mpi, high, &comm.ob_mpi) ) # <<<<<<<<<<<<<< * comm_set_eh(comm.ob_mpi) * return comm */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Intercomm_merge(__pyx_v_self->__pyx_base.ob_mpi, __pyx_v_high, (&__pyx_v_comm->__pyx_base.ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 2209, __pyx_L4_error) } /* "mpi4py/MPI/Comm.pyx":2209 * """ * cdef Intracomm comm = Intracomm.__new__(Intracomm) * with nogil: CHKERR( MPI_Intercomm_merge( # <<<<<<<<<<<<<< * self.ob_mpi, high, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":2211 * with nogil: CHKERR( MPI_Intercomm_merge( * self.ob_mpi, high, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) # <<<<<<<<<<<<<< * return comm * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_comm_set_eh(__pyx_v_comm->__pyx_base.ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(7, 2211, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2212 * self.ob_mpi, high, &comm.ob_mpi) ) * comm_set_eh(comm.ob_mpi) * return comm # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_comm)); __pyx_r = ((PyObject *)__pyx_v_comm); goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2204 * # ------------------------- * * def Merge(self, bint high=False): # <<<<<<<<<<<<<< * """ * Merge intercommunicator */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Intercomm.Merge", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_comm); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2236 * #: Upper bound of memory overhead for sending in buffered mode * * def Attach_buffer(buf): # <<<<<<<<<<<<<< * """ * Attach a user-provided buffer for */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_25Attach_buffer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_24Attach_buffer[] = "Attach_buffer(buf)\n\n Attach a user-provided buffer for\n sending in buffered mode\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_25Attach_buffer = {"Attach_buffer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_25Attach_buffer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_24Attach_buffer}; static PyObject *__pyx_pw_6mpi4py_3MPI_25Attach_buffer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Attach_buffer (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Attach_buffer") < 0)) __PYX_ERR(7, 2236, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Attach_buffer", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2236, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Attach_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_24Attach_buffer(__pyx_self, __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_24Attach_buffer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_buf) { void *__pyx_v_base; int __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Attach_buffer", 0); /* "mpi4py/MPI/Comm.pyx":2241 * sending in buffered mode * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef int size = 0 * attach_buffer(buf, &base, &size) */ __pyx_v_base = NULL; /* "mpi4py/MPI/Comm.pyx":2242 * """ * cdef void *base = NULL * cdef int size = 0 # <<<<<<<<<<<<<< * attach_buffer(buf, &base, &size) * with nogil: CHKERR( MPI_Buffer_attach(base, size) ) */ __pyx_v_size = 0; /* "mpi4py/MPI/Comm.pyx":2243 * cdef void *base = NULL * cdef int size = 0 * attach_buffer(buf, &base, &size) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Buffer_attach(base, size) ) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_attach_buffer(__pyx_v_buf, (&__pyx_v_base), (&__pyx_v_size)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2243, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2244 * cdef int size = 0 * attach_buffer(buf, &base, &size) * with nogil: CHKERR( MPI_Buffer_attach(base, size) ) # <<<<<<<<<<<<<< * * def Detach_buffer(): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Buffer_attach(__pyx_v_base, __pyx_v_size)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2244, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":2236 * #: Upper bound of memory overhead for sending in buffered mode * * def Attach_buffer(buf): # <<<<<<<<<<<<<< * """ * Attach a user-provided buffer for */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Attach_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2246 * with nogil: CHKERR( MPI_Buffer_attach(base, size) ) * * def Detach_buffer(): # <<<<<<<<<<<<<< * """ * Remove an existing attached buffer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_27Detach_buffer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_26Detach_buffer[] = "Detach_buffer()\n\n Remove an existing attached buffer\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_27Detach_buffer = {"Detach_buffer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_27Detach_buffer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_26Detach_buffer}; static PyObject *__pyx_pw_6mpi4py_3MPI_27Detach_buffer(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Detach_buffer (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Detach_buffer", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Detach_buffer", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_26Detach_buffer(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_26Detach_buffer(CYTHON_UNUSED PyObject *__pyx_self) { void *__pyx_v_base; int __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Detach_buffer", 0); /* "mpi4py/MPI/Comm.pyx":2250 * Remove an existing attached buffer * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef int size = 0 * with nogil: CHKERR( MPI_Buffer_detach(&base, &size) ) */ __pyx_v_base = NULL; /* "mpi4py/MPI/Comm.pyx":2251 * """ * cdef void *base = NULL * cdef int size = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Buffer_detach(&base, &size) ) * return detach_buffer(base, size) */ __pyx_v_size = 0; /* "mpi4py/MPI/Comm.pyx":2252 * cdef void *base = NULL * cdef int size = 0 * with nogil: CHKERR( MPI_Buffer_detach(&base, &size) ) # <<<<<<<<<<<<<< * return detach_buffer(base, size) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Buffer_detach((&__pyx_v_base), (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2252, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":2253 * cdef int size = 0 * with nogil: CHKERR( MPI_Buffer_detach(&base, &size) ) * return detach_buffer(base, size) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_detach_buffer(__pyx_v_base, __pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2246 * with nogil: CHKERR( MPI_Buffer_attach(base, size) ) * * def Detach_buffer(): # <<<<<<<<<<<<<< * """ * Remove an existing attached buffer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Detach_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2263 * # --------------- * * def Open_port(Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Return an address that can be used to establish */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_29Open_port(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_28Open_port[] = "Open_port(Info info=INFO_NULL)\n\n Return an address that can be used to establish\n connections between groups of MPI processes\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_29Open_port = {"Open_port", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_29Open_port, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_28Open_port}; static PyObject *__pyx_pw_6mpi4py_3MPI_29Open_port(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Open_port (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)__pyx_k__102; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Open_port") < 0)) __PYX_ERR(7, 2263, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_info = ((struct PyMPIInfoObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Open_port", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2263, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Open_port", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(7, 2263, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_28Open_port(__pyx_self, __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_28Open_port(CYTHON_UNUSED PyObject *__pyx_self, struct PyMPIInfoObject *__pyx_v_info) { char __pyx_v_cportname[(MPI_MAX_PORT_NAME + 1)]; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Open_port", 0); /* "mpi4py/MPI/Comm.pyx":2269 * """ * cdef char cportname[MPI_MAX_PORT_NAME+1] * with nogil: CHKERR( MPI_Open_port(info.ob_mpi, cportname) ) # <<<<<<<<<<<<<< * cportname[MPI_MAX_PORT_NAME] = 0 # just in case * return mpistr(cportname) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Open_port(__pyx_v_info->ob_mpi, __pyx_v_cportname)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(7, 2269, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":2270 * cdef char cportname[MPI_MAX_PORT_NAME+1] * with nogil: CHKERR( MPI_Open_port(info.ob_mpi, cportname) ) * cportname[MPI_MAX_PORT_NAME] = 0 # just in case # <<<<<<<<<<<<<< * return mpistr(cportname) * */ (__pyx_v_cportname[MPI_MAX_PORT_NAME]) = 0; /* "mpi4py/MPI/Comm.pyx":2271 * with nogil: CHKERR( MPI_Open_port(info.ob_mpi, cportname) ) * cportname[MPI_MAX_PORT_NAME] = 0 # just in case * return mpistr(cportname) # <<<<<<<<<<<<<< * * def Close_port(port_name): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_mpistr(__pyx_v_cportname); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 2271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2263 * # --------------- * * def Open_port(Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Return an address that can be used to establish */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Open_port", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2273 * return mpistr(cportname) * * def Close_port(port_name): # <<<<<<<<<<<<<< * """ * Close a port */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_31Close_port(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_30Close_port[] = "Close_port(port_name)\n\n Close a port\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_31Close_port = {"Close_port", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_31Close_port, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_30Close_port}; static PyObject *__pyx_pw_6mpi4py_3MPI_31Close_port(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_port_name = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Close_port (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_port_name,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Close_port") < 0)) __PYX_ERR(7, 2273, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_port_name = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Close_port", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2273, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Close_port", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_30Close_port(__pyx_self, __pyx_v_port_name); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_30Close_port(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_port_name) { char *__pyx_v_cportname; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Close_port", 0); __Pyx_INCREF(__pyx_v_port_name); /* "mpi4py/MPI/Comm.pyx":2277 * Close a port * """ * cdef char *cportname = NULL # <<<<<<<<<<<<<< * port_name = asmpistr(port_name, &cportname) * with nogil: CHKERR( MPI_Close_port(cportname) ) */ __pyx_v_cportname = NULL; /* "mpi4py/MPI/Comm.pyx":2278 * """ * cdef char *cportname = NULL * port_name = asmpistr(port_name, &cportname) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Close_port(cportname) ) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_port_name, (&__pyx_v_cportname)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_port_name, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2279 * cdef char *cportname = NULL * port_name = asmpistr(port_name, &cportname) * with nogil: CHKERR( MPI_Close_port(cportname) ) # <<<<<<<<<<<<<< * * # Name Publishing */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Close_port(__pyx_v_cportname)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 2279, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":2273 * return mpistr(cportname) * * def Close_port(port_name): # <<<<<<<<<<<<<< * """ * Close a port */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Close_port", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_port_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2284 * # --------------- * * def Publish_name(service_name, port_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Publish a service name */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_33Publish_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_32Publish_name[] = "Publish_name(service_name, port_name, info=INFO_NULL)\n\n Publish a service name\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_33Publish_name = {"Publish_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_33Publish_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_32Publish_name}; static PyObject *__pyx_pw_6mpi4py_3MPI_33Publish_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_service_name = 0; PyObject *__pyx_v_port_name = 0; PyObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Publish_name (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_service_name,&__pyx_n_s_port_name,&__pyx_n_s_info,0}; PyObject* values[3] = {0,0,0}; values[2] = __pyx_k__103; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_service_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Publish_name", 0, 2, 3, 1); __PYX_ERR(7, 2284, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Publish_name") < 0)) __PYX_ERR(7, 2284, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_service_name = values[0]; __pyx_v_port_name = values[1]; __pyx_v_info = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Publish_name", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2284, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Publish_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_32Publish_name(__pyx_self, __pyx_v_service_name, __pyx_v_port_name, __pyx_v_info); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_32Publish_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_service_name, PyObject *__pyx_v_port_name, PyObject *__pyx_v_info) { char *__pyx_v_csrvcname; char *__pyx_v_cportname; MPI_Info __pyx_v_cinfo; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("Publish_name", 0); __Pyx_INCREF(__pyx_v_service_name); __Pyx_INCREF(__pyx_v_port_name); __Pyx_INCREF(__pyx_v_info); /* "mpi4py/MPI/Comm.pyx":2288 * Publish a service name * """ * if isinstance(port_name, Info): # backward compatibility # <<<<<<<<<<<<<< * port_name, info = info, port_name * cdef char *csrvcname = NULL */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_port_name, __pyx_ptype_6mpi4py_3MPI_Info); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":2289 * """ * if isinstance(port_name, Info): # backward compatibility * port_name, info = info, port_name # <<<<<<<<<<<<<< * cdef char *csrvcname = NULL * service_name = asmpistr(service_name, &csrvcname) */ __pyx_t_3 = __pyx_v_info; __pyx_t_4 = __pyx_v_port_name; __pyx_v_port_name = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_info = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":2288 * Publish a service name * """ * if isinstance(port_name, Info): # backward compatibility # <<<<<<<<<<<<<< * port_name, info = info, port_name * cdef char *csrvcname = NULL */ } /* "mpi4py/MPI/Comm.pyx":2290 * if isinstance(port_name, Info): # backward compatibility * port_name, info = info, port_name * cdef char *csrvcname = NULL # <<<<<<<<<<<<<< * service_name = asmpistr(service_name, &csrvcname) * cdef char *cportname = NULL */ __pyx_v_csrvcname = NULL; /* "mpi4py/MPI/Comm.pyx":2291 * port_name, info = info, port_name * cdef char *csrvcname = NULL * service_name = asmpistr(service_name, &csrvcname) # <<<<<<<<<<<<<< * cdef char *cportname = NULL * port_name = asmpistr(port_name, &cportname) */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_service_name, (&__pyx_v_csrvcname)); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 2291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_service_name, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Comm.pyx":2292 * cdef char *csrvcname = NULL * service_name = asmpistr(service_name, &csrvcname) * cdef char *cportname = NULL # <<<<<<<<<<<<<< * port_name = asmpistr(port_name, &cportname) * cdef MPI_Info cinfo = arg_Info(info) */ __pyx_v_cportname = NULL; /* "mpi4py/MPI/Comm.pyx":2293 * service_name = asmpistr(service_name, &csrvcname) * cdef char *cportname = NULL * port_name = asmpistr(port_name, &cportname) # <<<<<<<<<<<<<< * cdef MPI_Info cinfo = arg_Info(info) * with nogil: CHKERR( MPI_Publish_name(csrvcname, cinfo, cportname) ) */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_port_name, (&__pyx_v_cportname)); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 2293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_port_name, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Comm.pyx":2294 * cdef char *cportname = NULL * port_name = asmpistr(port_name, &cportname) * cdef MPI_Info cinfo = arg_Info(info) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Publish_name(csrvcname, cinfo, cportname) ) * */ if (!(likely(__Pyx_TypeTest(__pyx_v_info, __pyx_ptype_6mpi4py_3MPI_Info)))) __PYX_ERR(7, 2294, __pyx_L1_error) __pyx_v_cinfo = __pyx_f_6mpi4py_3MPI_arg_Info(__pyx_v_info); /* "mpi4py/MPI/Comm.pyx":2295 * port_name = asmpistr(port_name, &cportname) * cdef MPI_Info cinfo = arg_Info(info) * with nogil: CHKERR( MPI_Publish_name(csrvcname, cinfo, cportname) ) # <<<<<<<<<<<<<< * * def Unpublish_name(service_name, port_name, info=INFO_NULL): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_6 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Publish_name(__pyx_v_csrvcname, __pyx_v_cinfo, __pyx_v_cportname)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(7, 2295, __pyx_L5_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Comm.pyx":2284 * # --------------- * * def Publish_name(service_name, port_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Publish a service name */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Publish_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_service_name); __Pyx_XDECREF(__pyx_v_port_name); __Pyx_XDECREF(__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2297 * with nogil: CHKERR( MPI_Publish_name(csrvcname, cinfo, cportname) ) * * def Unpublish_name(service_name, port_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Unpublish a service name */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_35Unpublish_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_34Unpublish_name[] = "Unpublish_name(service_name, port_name, info=INFO_NULL)\n\n Unpublish a service name\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_35Unpublish_name = {"Unpublish_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_35Unpublish_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_34Unpublish_name}; static PyObject *__pyx_pw_6mpi4py_3MPI_35Unpublish_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_service_name = 0; PyObject *__pyx_v_port_name = 0; PyObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Unpublish_name (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_service_name,&__pyx_n_s_port_name,&__pyx_n_s_info,0}; PyObject* values[3] = {0,0,0}; values[2] = __pyx_k__104; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_service_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port_name)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Unpublish_name", 0, 2, 3, 1); __PYX_ERR(7, 2297, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Unpublish_name") < 0)) __PYX_ERR(7, 2297, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_service_name = values[0]; __pyx_v_port_name = values[1]; __pyx_v_info = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Unpublish_name", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2297, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Unpublish_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_34Unpublish_name(__pyx_self, __pyx_v_service_name, __pyx_v_port_name, __pyx_v_info); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_34Unpublish_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_service_name, PyObject *__pyx_v_port_name, PyObject *__pyx_v_info) { char *__pyx_v_csrvcname; char *__pyx_v_cportname; MPI_Info __pyx_v_cinfo; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("Unpublish_name", 0); __Pyx_INCREF(__pyx_v_service_name); __Pyx_INCREF(__pyx_v_port_name); __Pyx_INCREF(__pyx_v_info); /* "mpi4py/MPI/Comm.pyx":2301 * Unpublish a service name * """ * if isinstance(port_name, Info): # backward compatibility # <<<<<<<<<<<<<< * port_name, info = info, port_name * cdef char *csrvcname = NULL */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_port_name, __pyx_ptype_6mpi4py_3MPI_Info); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Comm.pyx":2302 * """ * if isinstance(port_name, Info): # backward compatibility * port_name, info = info, port_name # <<<<<<<<<<<<<< * cdef char *csrvcname = NULL * service_name = asmpistr(service_name, &csrvcname) */ __pyx_t_3 = __pyx_v_info; __pyx_t_4 = __pyx_v_port_name; __pyx_v_port_name = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_info = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/Comm.pyx":2301 * Unpublish a service name * """ * if isinstance(port_name, Info): # backward compatibility # <<<<<<<<<<<<<< * port_name, info = info, port_name * cdef char *csrvcname = NULL */ } /* "mpi4py/MPI/Comm.pyx":2303 * if isinstance(port_name, Info): # backward compatibility * port_name, info = info, port_name * cdef char *csrvcname = NULL # <<<<<<<<<<<<<< * service_name = asmpistr(service_name, &csrvcname) * cdef char *cportname = NULL */ __pyx_v_csrvcname = NULL; /* "mpi4py/MPI/Comm.pyx":2304 * port_name, info = info, port_name * cdef char *csrvcname = NULL * service_name = asmpistr(service_name, &csrvcname) # <<<<<<<<<<<<<< * cdef char *cportname = NULL * port_name = asmpistr(port_name, &cportname) */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_service_name, (&__pyx_v_csrvcname)); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 2304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_service_name, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Comm.pyx":2305 * cdef char *csrvcname = NULL * service_name = asmpistr(service_name, &csrvcname) * cdef char *cportname = NULL # <<<<<<<<<<<<<< * port_name = asmpistr(port_name, &cportname) * cdef MPI_Info cinfo = arg_Info(info) */ __pyx_v_cportname = NULL; /* "mpi4py/MPI/Comm.pyx":2306 * service_name = asmpistr(service_name, &csrvcname) * cdef char *cportname = NULL * port_name = asmpistr(port_name, &cportname) # <<<<<<<<<<<<<< * cdef MPI_Info cinfo = arg_Info(info) * with nogil: CHKERR( MPI_Unpublish_name(csrvcname, cinfo, cportname) ) */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_port_name, (&__pyx_v_cportname)); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_port_name, __pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Comm.pyx":2307 * cdef char *cportname = NULL * port_name = asmpistr(port_name, &cportname) * cdef MPI_Info cinfo = arg_Info(info) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Unpublish_name(csrvcname, cinfo, cportname) ) * */ if (!(likely(__Pyx_TypeTest(__pyx_v_info, __pyx_ptype_6mpi4py_3MPI_Info)))) __PYX_ERR(7, 2307, __pyx_L1_error) __pyx_v_cinfo = __pyx_f_6mpi4py_3MPI_arg_Info(__pyx_v_info); /* "mpi4py/MPI/Comm.pyx":2308 * port_name = asmpistr(port_name, &cportname) * cdef MPI_Info cinfo = arg_Info(info) * with nogil: CHKERR( MPI_Unpublish_name(csrvcname, cinfo, cportname) ) # <<<<<<<<<<<<<< * * def Lookup_name(service_name, info=INFO_NULL): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_6 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Unpublish_name(__pyx_v_csrvcname, __pyx_v_cinfo, __pyx_v_cportname)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(7, 2308, __pyx_L5_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Comm.pyx":2297 * with nogil: CHKERR( MPI_Publish_name(csrvcname, cinfo, cportname) ) * * def Unpublish_name(service_name, port_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Unpublish a service name */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Unpublish_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_service_name); __Pyx_XDECREF(__pyx_v_port_name); __Pyx_XDECREF(__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Comm.pyx":2310 * with nogil: CHKERR( MPI_Unpublish_name(csrvcname, cinfo, cportname) ) * * def Lookup_name(service_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Lookup a port name given a service name */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_37Lookup_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_36Lookup_name[] = "Lookup_name(service_name, info=INFO_NULL)\n\n Lookup a port name given a service name\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_37Lookup_name = {"Lookup_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_37Lookup_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_36Lookup_name}; static PyObject *__pyx_pw_6mpi4py_3MPI_37Lookup_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_service_name = 0; PyObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Lookup_name (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_service_name,&__pyx_n_s_info,0}; PyObject* values[2] = {0,0}; values[1] = __pyx_k__105; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_service_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Lookup_name") < 0)) __PYX_ERR(7, 2310, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_service_name = values[0]; __pyx_v_info = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Lookup_name", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(7, 2310, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Lookup_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_36Lookup_name(__pyx_self, __pyx_v_service_name, __pyx_v_info); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_36Lookup_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_service_name, PyObject *__pyx_v_info) { char *__pyx_v_csrvcname; MPI_Info __pyx_v_cinfo; char __pyx_v_cportname[(MPI_MAX_PORT_NAME + 1)]; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Lookup_name", 0); __Pyx_INCREF(__pyx_v_service_name); /* "mpi4py/MPI/Comm.pyx":2314 * Lookup a port name given a service name * """ * cdef char *csrvcname = NULL # <<<<<<<<<<<<<< * service_name = asmpistr(service_name, &csrvcname) * cdef MPI_Info cinfo = arg_Info(info) */ __pyx_v_csrvcname = NULL; /* "mpi4py/MPI/Comm.pyx":2315 * """ * cdef char *csrvcname = NULL * service_name = asmpistr(service_name, &csrvcname) # <<<<<<<<<<<<<< * cdef MPI_Info cinfo = arg_Info(info) * cdef char cportname[MPI_MAX_PORT_NAME+1] */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_service_name, (&__pyx_v_csrvcname)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_service_name, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2316 * cdef char *csrvcname = NULL * service_name = asmpistr(service_name, &csrvcname) * cdef MPI_Info cinfo = arg_Info(info) # <<<<<<<<<<<<<< * cdef char cportname[MPI_MAX_PORT_NAME+1] * with nogil: CHKERR( MPI_Lookup_name(csrvcname, cinfo, cportname) ) */ if (!(likely(__Pyx_TypeTest(__pyx_v_info, __pyx_ptype_6mpi4py_3MPI_Info)))) __PYX_ERR(7, 2316, __pyx_L1_error) __pyx_v_cinfo = __pyx_f_6mpi4py_3MPI_arg_Info(__pyx_v_info); /* "mpi4py/MPI/Comm.pyx":2318 * cdef MPI_Info cinfo = arg_Info(info) * cdef char cportname[MPI_MAX_PORT_NAME+1] * with nogil: CHKERR( MPI_Lookup_name(csrvcname, cinfo, cportname) ) # <<<<<<<<<<<<<< * cportname[MPI_MAX_PORT_NAME] = 0 # just in case * return mpistr(cportname) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Lookup_name(__pyx_v_csrvcname, __pyx_v_cinfo, __pyx_v_cportname)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 2318, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Comm.pyx":2319 * cdef char cportname[MPI_MAX_PORT_NAME+1] * with nogil: CHKERR( MPI_Lookup_name(csrvcname, cinfo, cportname) ) * cportname[MPI_MAX_PORT_NAME] = 0 # just in case # <<<<<<<<<<<<<< * return mpistr(cportname) */ (__pyx_v_cportname[MPI_MAX_PORT_NAME]) = 0; /* "mpi4py/MPI/Comm.pyx":2320 * with nogil: CHKERR( MPI_Lookup_name(csrvcname, cinfo, cportname) ) * cportname[MPI_MAX_PORT_NAME] = 0 # just in case * return mpistr(cportname) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_6mpi4py_3MPI_mpistr(__pyx_v_cportname); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Comm.pyx":2310 * with nogil: CHKERR( MPI_Unpublish_name(csrvcname, cinfo, cportname) ) * * def Lookup_name(service_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Lookup a port name given a service name */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Lookup_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_service_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":33 * """ * * def __cinit__(self, Win win=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_WIN_NULL * if win is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_3Win_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_3Win_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIWinObject *__pyx_v_win = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_win,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIWinObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_win); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(30, 33, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_win = ((struct PyMPIWinObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 33, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_win), __pyx_ptype_6mpi4py_3MPI_Win, 1, "win", 0))) __PYX_ERR(30, 33, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win___cinit__(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_win); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_3Win___cinit__(struct PyMPIWinObject *__pyx_v_self, struct PyMPIWinObject *__pyx_v_win) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_Win __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/Win.pyx":34 * * def __cinit__(self, Win win=None): * self.ob_mpi = MPI_WIN_NULL # <<<<<<<<<<<<<< * if win is None: return * self.ob_mpi = win.ob_mpi */ __pyx_v_self->ob_mpi = MPI_WIN_NULL; /* "mpi4py/MPI/Win.pyx":35 * def __cinit__(self, Win win=None): * self.ob_mpi = MPI_WIN_NULL * if win is None: return # <<<<<<<<<<<<<< * self.ob_mpi = win.ob_mpi * self.ob_mem = win.ob_mem */ __pyx_t_1 = (((PyObject *)__pyx_v_win) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":36 * self.ob_mpi = MPI_WIN_NULL * if win is None: return * self.ob_mpi = win.ob_mpi # <<<<<<<<<<<<<< * self.ob_mem = win.ob_mem * */ __pyx_t_3 = __pyx_v_win->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/Win.pyx":37 * if win is None: return * self.ob_mpi = win.ob_mpi * self.ob_mem = win.ob_mem # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_4 = __pyx_v_win->ob_mem; __Pyx_INCREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->ob_mem); __Pyx_DECREF(__pyx_v_self->ob_mem); __pyx_v_self->ob_mem = __pyx_t_4; __pyx_t_4 = 0; /* "mpi4py/MPI/Win.pyx":33 * """ * * def __cinit__(self, Win win=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_WIN_NULL * if win is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":39 * self.ob_mem = win.ob_mem * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Win(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_3Win_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_3Win_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_3Win_2__dealloc__(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_3Win_2__dealloc__(struct PyMPIWinObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/Win.pyx":40 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_Win(&self.ob_mpi) ) * */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":41 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Win(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_Win((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 41, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":39 * self.ob_mem = win.ob_mem * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_Win(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.Win.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/Win.pyx":43 * CHKERR( del_Win(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Win): return NotImplemented * cdef Win s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_4__richcmp__(((struct PyMPIWinObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_4__richcmp__(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIWinObject *__pyx_v_s = 0; struct PyMPIWinObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/Win.pyx":44 * * def __richcmp__(self, other, int op): * if not isinstance(other, Win): return NotImplemented # <<<<<<<<<<<<<< * cdef Win s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_Win); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":45 * def __richcmp__(self, other, int op): * if not isinstance(other, Win): return NotImplemented * cdef Win s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIWinObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIWinObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":46 * if not isinstance(other, Win): return NotImplemented * cdef Win s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":47 * cdef Win s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":48 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":49 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":50 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(30, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(30, 50, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":43 * CHKERR( del_Win(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, Win): return NotImplemented * cdef Win s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Win.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":52 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_WIN_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_3Win_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_3Win_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_6__bool__(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_3Win_6__bool__(struct PyMPIWinObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/Win.pyx":53 * * def __bool__(self): * return self.ob_mpi != MPI_WIN_NULL # <<<<<<<<<<<<<< * * # Window Creation */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_WIN_NULL); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":52 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_WIN_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":59 * * @classmethod * def Create(cls, memory, int disp_unit=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_9Create(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_8Create[] = "Win.Create(type cls, memory, int disp_unit=1, Info info=INFO_NULL, Intracomm comm=COMM_SELF)\n\n Create an window object for one-sided communication\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_9Create(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_memory = 0; int __pyx_v_disp_unit; struct PyMPIInfoObject *__pyx_v_info = 0; struct PyMPIIntracommObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memory,&__pyx_n_s_disp_unit,&__pyx_n_s_info,&__pyx_n_s_comm,0}; PyObject* values[4] = {0,0,0,0}; values[2] = (PyObject *)__pyx_k__106; values[3] = (PyObject *)__pyx_k__107; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_disp_unit); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create") < 0)) __PYX_ERR(30, 59, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_memory = values[0]; if (values[1]) { __pyx_v_disp_unit = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_disp_unit == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 59, __pyx_L3_error) } else { __pyx_v_disp_unit = ((int)1); } __pyx_v_info = ((struct PyMPIInfoObject *)values[2]); __pyx_v_comm = ((struct PyMPIIntracommObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 59, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Create", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(30, 60, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Intracomm, 0, "comm", 0))) __PYX_ERR(30, 60, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_8Create(((PyTypeObject*)__pyx_v_cls), __pyx_v_memory, __pyx_v_disp_unit, __pyx_v_info, __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_8Create(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_memory, int __pyx_v_disp_unit, struct PyMPIInfoObject *__pyx_v_info, struct PyMPIIntracommObject *__pyx_v_comm) { void *__pyx_v_base; MPI_Aint __pyx_v_size; struct PyMPIWinObject *__pyx_v_win = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; __Pyx_RefNannySetupContext("Create", 0); __Pyx_INCREF(__pyx_v_memory); /* "mpi4py/MPI/Win.pyx":64 * Create an window object for one-sided communication * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint size = 0 * if memory is __BOTTOM__: */ __pyx_v_base = NULL; /* "mpi4py/MPI/Win.pyx":65 * """ * cdef void *base = NULL * cdef MPI_Aint size = 0 # <<<<<<<<<<<<<< * if memory is __BOTTOM__: * base = MPI_BOTTOM */ __pyx_v_size = 0; /* "mpi4py/MPI/Win.pyx":66 * cdef void *base = NULL * cdef MPI_Aint size = 0 * if memory is __BOTTOM__: # <<<<<<<<<<<<<< * base = MPI_BOTTOM * memory = None */ __pyx_t_1 = (__pyx_v_memory == __pyx_v_6mpi4py_3MPI___BOTTOM__); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Win.pyx":67 * cdef MPI_Aint size = 0 * if memory is __BOTTOM__: * base = MPI_BOTTOM # <<<<<<<<<<<<<< * memory = None * elif memory is not None: */ __pyx_v_base = MPI_BOTTOM; /* "mpi4py/MPI/Win.pyx":68 * if memory is __BOTTOM__: * base = MPI_BOTTOM * memory = None # <<<<<<<<<<<<<< * elif memory is not None: * memory = getbuffer_w(memory, &base, &size) */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_memory, Py_None); /* "mpi4py/MPI/Win.pyx":66 * cdef void *base = NULL * cdef MPI_Aint size = 0 * if memory is __BOTTOM__: # <<<<<<<<<<<<<< * base = MPI_BOTTOM * memory = None */ goto __pyx_L3; } /* "mpi4py/MPI/Win.pyx":69 * base = MPI_BOTTOM * memory = None * elif memory is not None: # <<<<<<<<<<<<<< * memory = getbuffer_w(memory, &base, &size) * cdef Win win = Win.__new__(Win) */ __pyx_t_2 = (__pyx_v_memory != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/Win.pyx":70 * memory = None * elif memory is not None: * memory = getbuffer_w(memory, &base, &size) # <<<<<<<<<<<<<< * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_create( */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_memory, (&__pyx_v_base), (&__pyx_v_size))); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_memory, __pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":69 * base = MPI_BOTTOM * memory = None * elif memory is not None: # <<<<<<<<<<<<<< * memory = getbuffer_w(memory, &base, &size) * cdef Win win = Win.__new__(Win) */ } __pyx_L3:; /* "mpi4py/MPI/Win.pyx":71 * elif memory is not None: * memory = getbuffer_w(memory, &base, &size) * cdef Win win = Win.__new__(Win) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_create( * base, size, disp_unit, */ __pyx_t_3 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Win(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Win), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 71, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = ((PyObject *)__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_win = ((struct PyMPIWinObject *)__pyx_t_4); __pyx_t_4 = 0; /* "mpi4py/MPI/Win.pyx":72 * memory = getbuffer_w(memory, &base, &size) * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_create( # <<<<<<<<<<<<<< * base, size, disp_unit, * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":74 * with nogil: CHKERR( MPI_Win_create( * base, size, disp_unit, * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) # <<<<<<<<<<<<<< * win_set_eh(win.ob_mpi) * win.ob_mem = memory */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_create(__pyx_v_base, __pyx_v_size, __pyx_v_disp_unit, __pyx_v_info->ob_mpi, __pyx_v_comm->__pyx_base.ob_mpi, (&__pyx_v_win->ob_mpi))); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(30, 72, __pyx_L5_error) } /* "mpi4py/MPI/Win.pyx":72 * memory = getbuffer_w(memory, &base, &size) * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_create( # <<<<<<<<<<<<<< * base, size, disp_unit, * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L6; } __pyx_L5_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L6:; } } /* "mpi4py/MPI/Win.pyx":75 * base, size, disp_unit, * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) # <<<<<<<<<<<<<< * win.ob_mem = memory * return win */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_win_set_eh(__pyx_v_win->ob_mpi); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(30, 75, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":76 * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) * win.ob_mem = memory # <<<<<<<<<<<<<< * return win * */ __Pyx_INCREF(__pyx_v_memory); __Pyx_GIVEREF(__pyx_v_memory); __Pyx_GOTREF(__pyx_v_win->ob_mem); __Pyx_DECREF(__pyx_v_win->ob_mem); __pyx_v_win->ob_mem = __pyx_v_memory; /* "mpi4py/MPI/Win.pyx":77 * win_set_eh(win.ob_mpi) * win.ob_mem = memory * return win # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_win)); __pyx_r = ((PyObject *)__pyx_v_win); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":59 * * @classmethod * def Create(cls, memory, int disp_unit=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Win.Create", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_win); __Pyx_XDECREF(__pyx_v_memory); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":80 * * @classmethod * def Allocate(cls, Aint size, int disp_unit=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_11Allocate(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_10Allocate[] = "Win.Allocate(type cls, Aint size, int disp_unit=1, Info info=INFO_NULL, Intracomm comm=COMM_SELF)\n\n Create an window object for one-sided communication\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_11Allocate(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Aint __pyx_v_size; int __pyx_v_disp_unit; struct PyMPIInfoObject *__pyx_v_info = 0; struct PyMPIIntracommObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Allocate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_disp_unit,&__pyx_n_s_info,&__pyx_n_s_comm,0}; PyObject* values[4] = {0,0,0,0}; values[2] = (PyObject *)__pyx_k__108; values[3] = (PyObject *)__pyx_k__109; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_disp_unit); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Allocate") < 0)) __PYX_ERR(30, 80, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size = __Pyx_PyInt_As_MPI_Aint(values[0]); if (unlikely((__pyx_v_size == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(30, 80, __pyx_L3_error) if (values[1]) { __pyx_v_disp_unit = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_disp_unit == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 80, __pyx_L3_error) } else { __pyx_v_disp_unit = ((int)1); } __pyx_v_info = ((struct PyMPIInfoObject *)values[2]); __pyx_v_comm = ((struct PyMPIIntracommObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Allocate", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 80, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Allocate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(30, 81, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Intracomm, 0, "comm", 0))) __PYX_ERR(30, 81, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_10Allocate(((PyTypeObject*)__pyx_v_cls), __pyx_v_size, __pyx_v_disp_unit, __pyx_v_info, __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_10Allocate(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, MPI_Aint __pyx_v_size, int __pyx_v_disp_unit, struct PyMPIInfoObject *__pyx_v_info, struct PyMPIIntracommObject *__pyx_v_comm) { void *__pyx_v_base; struct PyMPIWinObject *__pyx_v_win = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Allocate", 0); /* "mpi4py/MPI/Win.pyx":85 * Create an window object for one-sided communication * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_allocate( */ __pyx_v_base = NULL; /* "mpi4py/MPI/Win.pyx":86 * """ * cdef void *base = NULL * cdef Win win = Win.__new__(Win) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_allocate( * size, disp_unit, info.ob_mpi, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Win(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Win), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 86, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_win = ((struct PyMPIWinObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Win.pyx":87 * cdef void *base = NULL * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_allocate( # <<<<<<<<<<<<<< * size, disp_unit, info.ob_mpi, * comm.ob_mpi, &base, &win.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":89 * with nogil: CHKERR( MPI_Win_allocate( * size, disp_unit, info.ob_mpi, * comm.ob_mpi, &base, &win.ob_mpi) ) # <<<<<<<<<<<<<< * win_set_eh(win.ob_mpi) * return win */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_allocate(__pyx_v_size, __pyx_v_disp_unit, __pyx_v_info->ob_mpi, __pyx_v_comm->__pyx_base.ob_mpi, (&__pyx_v_base), (&__pyx_v_win->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 87, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":87 * cdef void *base = NULL * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_allocate( # <<<<<<<<<<<<<< * size, disp_unit, info.ob_mpi, * comm.ob_mpi, &base, &win.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":90 * size, disp_unit, info.ob_mpi, * comm.ob_mpi, &base, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) # <<<<<<<<<<<<<< * return win * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_win_set_eh(__pyx_v_win->ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 90, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":91 * comm.ob_mpi, &base, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) * return win # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_win)); __pyx_r = ((PyObject *)__pyx_v_win); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":80 * * @classmethod * def Allocate(cls, Aint size, int disp_unit=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.Allocate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_win); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":94 * * @classmethod * def Allocate_shared(cls, Aint size, int disp_unit=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_13Allocate_shared(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_12Allocate_shared[] = "Win.Allocate_shared(type cls, Aint size, int disp_unit=1, Info info=INFO_NULL, Intracomm comm=COMM_SELF)\n\n Create an window object for one-sided communication\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_13Allocate_shared(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Aint __pyx_v_size; int __pyx_v_disp_unit; struct PyMPIInfoObject *__pyx_v_info = 0; struct PyMPIIntracommObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Allocate_shared (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_disp_unit,&__pyx_n_s_info,&__pyx_n_s_comm,0}; PyObject* values[4] = {0,0,0,0}; values[2] = (PyObject *)__pyx_k__110; values[3] = (PyObject *)__pyx_k__111; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_disp_unit); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Allocate_shared") < 0)) __PYX_ERR(30, 94, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size = __Pyx_PyInt_As_MPI_Aint(values[0]); if (unlikely((__pyx_v_size == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(30, 94, __pyx_L3_error) if (values[1]) { __pyx_v_disp_unit = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_disp_unit == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 94, __pyx_L3_error) } else { __pyx_v_disp_unit = ((int)1); } __pyx_v_info = ((struct PyMPIInfoObject *)values[2]); __pyx_v_comm = ((struct PyMPIIntracommObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Allocate_shared", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 94, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Allocate_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(30, 95, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Intracomm, 0, "comm", 0))) __PYX_ERR(30, 95, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_12Allocate_shared(((PyTypeObject*)__pyx_v_cls), __pyx_v_size, __pyx_v_disp_unit, __pyx_v_info, __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_12Allocate_shared(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, MPI_Aint __pyx_v_size, int __pyx_v_disp_unit, struct PyMPIInfoObject *__pyx_v_info, struct PyMPIIntracommObject *__pyx_v_comm) { void *__pyx_v_base; struct PyMPIWinObject *__pyx_v_win = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Allocate_shared", 0); /* "mpi4py/MPI/Win.pyx":99 * Create an window object for one-sided communication * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_allocate_shared( */ __pyx_v_base = NULL; /* "mpi4py/MPI/Win.pyx":100 * """ * cdef void *base = NULL * cdef Win win = Win.__new__(Win) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_allocate_shared( * size, disp_unit, info.ob_mpi, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Win(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Win), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 100, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_win = ((struct PyMPIWinObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Win.pyx":101 * cdef void *base = NULL * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_allocate_shared( # <<<<<<<<<<<<<< * size, disp_unit, info.ob_mpi, * comm.ob_mpi, &base, &win.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":103 * with nogil: CHKERR( MPI_Win_allocate_shared( * size, disp_unit, info.ob_mpi, * comm.ob_mpi, &base, &win.ob_mpi) ) # <<<<<<<<<<<<<< * win_set_eh(win.ob_mpi) * return win */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_allocate_shared(__pyx_v_size, __pyx_v_disp_unit, __pyx_v_info->ob_mpi, __pyx_v_comm->__pyx_base.ob_mpi, (&__pyx_v_base), (&__pyx_v_win->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 101, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":101 * cdef void *base = NULL * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_allocate_shared( # <<<<<<<<<<<<<< * size, disp_unit, info.ob_mpi, * comm.ob_mpi, &base, &win.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":104 * size, disp_unit, info.ob_mpi, * comm.ob_mpi, &base, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) # <<<<<<<<<<<<<< * return win * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_win_set_eh(__pyx_v_win->ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 104, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":105 * comm.ob_mpi, &base, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) * return win # <<<<<<<<<<<<<< * * def Shared_query(self, int rank): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_win)); __pyx_r = ((PyObject *)__pyx_v_win); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":94 * * @classmethod * def Allocate_shared(cls, Aint size, int disp_unit=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.Allocate_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_win); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":107 * return win * * def Shared_query(self, int rank): # <<<<<<<<<<<<<< * """ * Query the process-local address */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_15Shared_query(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_14Shared_query[] = "Win.Shared_query(self, int rank)\n\n Query the process-local address\n for remote memory segments\n created with `Win.Allocate_shared()`\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_15Shared_query(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_rank; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Shared_query (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rank,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Shared_query") < 0)) __PYX_ERR(30, 107, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rank = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 107, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Shared_query", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 107, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Shared_query", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_14Shared_query(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_rank); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_14Shared_query(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank) { void *__pyx_v_base; MPI_Aint __pyx_v_size; int __pyx_v_disp_unit; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Shared_query", 0); /* "mpi4py/MPI/Win.pyx":113 * created with `Win.Allocate_shared()` * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint size = 0 * cdef int disp_unit = 1 */ __pyx_v_base = NULL; /* "mpi4py/MPI/Win.pyx":114 * """ * cdef void *base = NULL * cdef MPI_Aint size = 0 # <<<<<<<<<<<<<< * cdef int disp_unit = 1 * with nogil: CHKERR( MPI_Win_shared_query( */ __pyx_v_size = 0; /* "mpi4py/MPI/Win.pyx":115 * cdef void *base = NULL * cdef MPI_Aint size = 0 * cdef int disp_unit = 1 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_shared_query( * self.ob_mpi, rank, */ __pyx_v_disp_unit = 1; /* "mpi4py/MPI/Win.pyx":116 * cdef MPI_Aint size = 0 * cdef int disp_unit = 1 * with nogil: CHKERR( MPI_Win_shared_query( # <<<<<<<<<<<<<< * self.ob_mpi, rank, * &size, &disp_unit, &base) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":118 * with nogil: CHKERR( MPI_Win_shared_query( * self.ob_mpi, rank, * &size, &disp_unit, &base) ) # <<<<<<<<<<<<<< * return (asbuffer(self, base, size, 0), disp_unit) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_shared_query(__pyx_v_self->ob_mpi, __pyx_v_rank, (&__pyx_v_size), (&__pyx_v_disp_unit), (&__pyx_v_base))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 116, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":116 * cdef MPI_Aint size = 0 * cdef int disp_unit = 1 * with nogil: CHKERR( MPI_Win_shared_query( # <<<<<<<<<<<<<< * self.ob_mpi, rank, * &size, &disp_unit, &base) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":119 * self.ob_mpi, rank, * &size, &disp_unit, &base) ) * return (asbuffer(self, base, size, 0), disp_unit) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_asbuffer(((PyObject *)__pyx_v_self), __pyx_v_base, __pyx_v_size, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_disp_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(30, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":107 * return win * * def Shared_query(self, int rank): # <<<<<<<<<<<<<< * """ * Query the process-local address */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Win.Shared_query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":122 * * @classmethod * def Create_dynamic(cls, Info info=INFO_NULL, Intracomm comm=COMM_SELF): # <<<<<<<<<<<<<< * """ * Create an window object for one-sided communication */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_17Create_dynamic(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_16Create_dynamic[] = "Win.Create_dynamic(type cls, Info info=INFO_NULL, Intracomm comm=COMM_SELF)\n\n Create an window object for one-sided communication\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_17Create_dynamic(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIInfoObject *__pyx_v_info = 0; struct PyMPIIntracommObject *__pyx_v_comm = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_dynamic (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,&__pyx_n_s_comm,0}; PyObject* values[2] = {0,0}; values[0] = (PyObject *)__pyx_k__112; values[1] = (PyObject *)__pyx_k__113; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_dynamic") < 0)) __PYX_ERR(30, 122, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_info = ((struct PyMPIInfoObject *)values[0]); __pyx_v_comm = ((struct PyMPIIntracommObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_dynamic", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 122, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Create_dynamic", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(30, 122, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Intracomm, 0, "comm", 0))) __PYX_ERR(30, 122, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_16Create_dynamic(((PyTypeObject*)__pyx_v_cls), __pyx_v_info, __pyx_v_comm); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_16Create_dynamic(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIInfoObject *__pyx_v_info, struct PyMPIIntracommObject *__pyx_v_comm) { struct PyMPIWinObject *__pyx_v_win = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_dynamic", 0); /* "mpi4py/MPI/Win.pyx":126 * Create an window object for one-sided communication * """ * cdef Win win = Win.__new__(Win) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_create_dynamic( * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Win(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Win), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 126, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_win = ((struct PyMPIWinObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Win.pyx":127 * """ * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_create_dynamic( # <<<<<<<<<<<<<< * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":128 * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_create_dynamic( * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) # <<<<<<<<<<<<<< * win_set_eh(win.ob_mpi) * win.ob_mem = {} */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_create_dynamic(__pyx_v_info->ob_mpi, __pyx_v_comm->__pyx_base.ob_mpi, (&__pyx_v_win->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 127, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":127 * """ * cdef Win win = Win.__new__(Win) * with nogil: CHKERR( MPI_Win_create_dynamic( # <<<<<<<<<<<<<< * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":129 * with nogil: CHKERR( MPI_Win_create_dynamic( * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) # <<<<<<<<<<<<<< * win.ob_mem = {} * return win */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_win_set_eh(__pyx_v_win->ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 129, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":130 * info.ob_mpi, comm.ob_mpi, &win.ob_mpi) ) * win_set_eh(win.ob_mpi) * win.ob_mem = {} # <<<<<<<<<<<<<< * return win * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_win->ob_mem); __Pyx_DECREF(__pyx_v_win->ob_mem); __pyx_v_win->ob_mem = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Win.pyx":131 * win_set_eh(win.ob_mpi) * win.ob_mem = {} * return win # <<<<<<<<<<<<<< * * def Attach(self, memory): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_win)); __pyx_r = ((PyObject *)__pyx_v_win); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":122 * * @classmethod * def Create_dynamic(cls, Info info=INFO_NULL, Intracomm comm=COMM_SELF): # <<<<<<<<<<<<<< * """ * Create an window object for one-sided communication */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.Create_dynamic", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_win); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":133 * return win * * def Attach(self, memory): # <<<<<<<<<<<<<< * """ * Attach a local memory region */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_19Attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_18Attach[] = "Win.Attach(self, memory)\n\n Attach a local memory region\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_19Attach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_memory = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Attach (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memory,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Attach") < 0)) __PYX_ERR(30, 133, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_memory = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Attach", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 133, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Attach", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_18Attach(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_memory); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_18Attach(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_memory) { void *__pyx_v_base; MPI_Aint __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("Attach", 0); __Pyx_INCREF(__pyx_v_memory); /* "mpi4py/MPI/Win.pyx":137 * Attach a local memory region * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint size = 0 * memory = getbuffer_w(memory, &base, &size) */ __pyx_v_base = NULL; /* "mpi4py/MPI/Win.pyx":138 * """ * cdef void *base = NULL * cdef MPI_Aint size = 0 # <<<<<<<<<<<<<< * memory = getbuffer_w(memory, &base, &size) * with nogil: CHKERR( MPI_Win_attach(self.ob_mpi, base, size) ) */ __pyx_v_size = 0; /* "mpi4py/MPI/Win.pyx":139 * cdef void *base = NULL * cdef MPI_Aint size = 0 * memory = getbuffer_w(memory, &base, &size) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_attach(self.ob_mpi, base, size) ) * try: (self.ob_mem)[base] = memory */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_memory, (&__pyx_v_base), (&__pyx_v_size))); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_memory, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":140 * cdef MPI_Aint size = 0 * memory = getbuffer_w(memory, &base, &size) * with nogil: CHKERR( MPI_Win_attach(self.ob_mpi, base, size) ) # <<<<<<<<<<<<<< * try: (self.ob_mem)[base] = memory * except: pass */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_attach(__pyx_v_self->ob_mpi, __pyx_v_base, __pyx_v_size)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 140, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":141 * memory = getbuffer_w(memory, &base, &size) * with nogil: CHKERR( MPI_Win_attach(self.ob_mpi, base, size) ) * try: (self.ob_mem)[base] = memory # <<<<<<<<<<<<<< * except: pass * */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { if (unlikely(__pyx_v_self->ob_mem == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(30, 141, __pyx_L6_error) } __pyx_t_1 = __Pyx_PyInt_From_MPI_Aint(((MPI_Aint)__pyx_v_base)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 141, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_SetItem(((PyObject*)__pyx_v_self->ob_mem), __pyx_t_1, __pyx_v_memory) < 0)) __PYX_ERR(30, 141, __pyx_L6_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":142 * with nogil: CHKERR( MPI_Win_attach(self.ob_mpi, base, size) ) * try: (self.ob_mem)[base] = memory * except: pass # <<<<<<<<<<<<<< * * def Detach(self, memory): */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L7_exception_handled; } __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L11_try_end:; } /* "mpi4py/MPI/Win.pyx":133 * return win * * def Attach(self, memory): # <<<<<<<<<<<<<< * """ * Attach a local memory region */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Attach", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_memory); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":144 * except: pass * * def Detach(self, memory): # <<<<<<<<<<<<<< * """ * Detach a local memory region */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_21Detach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_20Detach[] = "Win.Detach(self, memory)\n\n Detach a local memory region\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_21Detach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_memory = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Detach (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memory,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_memory)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Detach") < 0)) __PYX_ERR(30, 144, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_memory = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Detach", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 144, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Detach", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_20Detach(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_memory); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_20Detach(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_memory) { void *__pyx_v_base; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("Detach", 0); __Pyx_INCREF(__pyx_v_memory); /* "mpi4py/MPI/Win.pyx":148 * Detach a local memory region * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * memory = getbuffer_w(memory, &base, NULL) * with nogil: CHKERR( MPI_Win_detach(self.ob_mpi, base) ) */ __pyx_v_base = NULL; /* "mpi4py/MPI/Win.pyx":149 * """ * cdef void *base = NULL * memory = getbuffer_w(memory, &base, NULL) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_detach(self.ob_mpi, base) ) * try: del (self.ob_mem)[base] */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer_w(__pyx_v_memory, (&__pyx_v_base), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_memory, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":150 * cdef void *base = NULL * memory = getbuffer_w(memory, &base, NULL) * with nogil: CHKERR( MPI_Win_detach(self.ob_mpi, base) ) # <<<<<<<<<<<<<< * try: del (self.ob_mem)[base] * except: pass */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_detach(__pyx_v_self->ob_mpi, __pyx_v_base)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 150, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":151 * memory = getbuffer_w(memory, &base, NULL) * with nogil: CHKERR( MPI_Win_detach(self.ob_mpi, base) ) * try: del (self.ob_mem)[base] # <<<<<<<<<<<<<< * except: pass * */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { if (unlikely(__pyx_v_self->ob_mem == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(30, 151, __pyx_L6_error) } __pyx_t_1 = __Pyx_PyInt_From_MPI_Aint(((MPI_Aint)__pyx_v_base)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 151, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(PyDict_DelItem(((PyObject*)__pyx_v_self->ob_mem), __pyx_t_1) < 0)) __PYX_ERR(30, 151, __pyx_L6_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":152 * with nogil: CHKERR( MPI_Win_detach(self.ob_mpi, base) ) * try: del (self.ob_mem)[base] * except: pass # <<<<<<<<<<<<<< * * def Free(self): */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L7_exception_handled; } __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L11_try_end:; } /* "mpi4py/MPI/Win.pyx":144 * except: pass * * def Detach(self, memory): # <<<<<<<<<<<<<< * """ * Detach a local memory region */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Detach", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_memory); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":154 * except: pass * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a window */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_23Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_22Free[] = "Win.Free(self)\n\n Free a window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_23Free(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Free", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Free", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_22Free(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_22Free(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Free", 0); /* "mpi4py/MPI/Win.pyx":158 * Free a window * """ * with nogil: CHKERR( MPI_Win_free(&self.ob_mpi) ) # <<<<<<<<<<<<<< * self.ob_mem = None * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_free((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 158, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":159 * """ * with nogil: CHKERR( MPI_Win_free(&self.ob_mpi) ) * self.ob_mem = None # <<<<<<<<<<<<<< * * # Window Info */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->ob_mem); __Pyx_DECREF(__pyx_v_self->ob_mem); __pyx_v_self->ob_mem = Py_None; /* "mpi4py/MPI/Win.pyx":154 * except: pass * * def Free(self): # <<<<<<<<<<<<<< * """ * Free a window */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Free", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":164 * # ----------- * * def Set_info(self, Info info): # <<<<<<<<<<<<<< * """ * Set new values for the hints */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_25Set_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_24Set_info[] = "Win.Set_info(self, Info info)\n\n Set new values for the hints\n associated with a window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_25Set_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_info (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_info") < 0)) __PYX_ERR(30, 164, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_info = ((struct PyMPIInfoObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_info", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 164, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Set_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(30, 164, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_24Set_info(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_24Set_info(struct PyMPIWinObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_info", 0); /* "mpi4py/MPI/Win.pyx":169 * associated with a window * """ * with nogil: CHKERR( MPI_Win_set_info(self.ob_mpi, info.ob_mpi) ) # <<<<<<<<<<<<<< * * def Get_info(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_set_info(__pyx_v_self->ob_mpi, __pyx_v_info->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 169, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":164 * # ----------- * * def Set_info(self, Info info): # <<<<<<<<<<<<<< * """ * Set new values for the hints */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Set_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":171 * with nogil: CHKERR( MPI_Win_set_info(self.ob_mpi, info.ob_mpi) ) * * def Get_info(self): # <<<<<<<<<<<<<< * """ * Return the hints for a windows */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_27Get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_26Get_info[] = "Win.Get_info(self)\n\n Return the hints for a windows\n that are currently in use\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_27Get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_info (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_info", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_info", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_26Get_info(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_26Get_info(struct PyMPIWinObject *__pyx_v_self) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_info", 0); /* "mpi4py/MPI/Win.pyx":176 * that are currently in use * """ * cdef Info info = Info.__new__(Info) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_get_info( self.ob_mpi, &info.ob_mpi) ) * return info */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Info(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 176, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_info = ((struct PyMPIInfoObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Win.pyx":177 * """ * cdef Info info = Info.__new__(Info) * with nogil: CHKERR( MPI_Win_get_info( self.ob_mpi, &info.ob_mpi) ) # <<<<<<<<<<<<<< * return info * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_info(__pyx_v_self->ob_mpi, (&__pyx_v_info->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 177, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":178 * cdef Info info = Info.__new__(Info) * with nogil: CHKERR( MPI_Win_get_info( self.ob_mpi, &info.ob_mpi) ) * return info # <<<<<<<<<<<<<< * * property info: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_info)); __pyx_r = ((PyObject *)__pyx_v_info); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":171 * with nogil: CHKERR( MPI_Win_set_info(self.ob_mpi, info.ob_mpi) ) * * def Get_info(self): # <<<<<<<<<<<<<< * """ * Return the hints for a windows */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.Get_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":182 * property info: * """window info""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_info() * def __set__(self, info): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_4info_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_4info_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_4info___get__(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_4info___get__(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Win.pyx":183 * """window info""" * def __get__(self): * return self.Get_info() # <<<<<<<<<<<<<< * def __set__(self, info): * self.Set_info(info) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":182 * property info: * """window info""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_info() * def __set__(self, info): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":184 * def __get__(self): * return self.Get_info() * def __set__(self, info): # <<<<<<<<<<<<<< * self.Set_info(info) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_3Win_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_info); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_3Win_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_info) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_4info_2__set__(((struct PyMPIWinObject *)__pyx_v_self), ((PyObject *)__pyx_v_info)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_3Win_4info_2__set__(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_info) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/Win.pyx":185 * return self.Get_info() * def __set__(self, info): * self.Set_info(info) # <<<<<<<<<<<<<< * * # Window Group */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_info) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_info); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":184 * def __get__(self): * return self.Get_info() * def __set__(self, info): # <<<<<<<<<<<<<< * self.Set_info(info) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.info.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":190 * # ------------- * * def Get_group(self): # <<<<<<<<<<<<<< * """ * Return a duplicate of the group of the */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_29Get_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_28Get_group[] = "Win.Get_group(self)\n\n Return a duplicate of the group of the\n communicator used to create the window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_29Get_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_group (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_group", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_group", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_28Get_group(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_28Get_group(struct PyMPIWinObject *__pyx_v_self) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Get_group", 0); /* "mpi4py/MPI/Win.pyx":195 * communicator used to create the window * """ * cdef Group group = Group() # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_get_group(self.ob_mpi, &group.ob_mpi) ) * return group */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Group)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":196 * """ * cdef Group group = Group() * with nogil: CHKERR( MPI_Win_get_group(self.ob_mpi, &group.ob_mpi) ) # <<<<<<<<<<<<<< * return group * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_group(__pyx_v_self->ob_mpi, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 196, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":197 * cdef Group group = Group() * with nogil: CHKERR( MPI_Win_get_group(self.ob_mpi, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * property group: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":190 * # ------------- * * def Get_group(self): # <<<<<<<<<<<<<< * """ * Return a duplicate of the group of the */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Get_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":201 * property group: * """window group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_group() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_5group_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_5group_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_5group___get__(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_5group___get__(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Win.pyx":202 * """window group""" * def __get__(self): * return self.Get_group() # <<<<<<<<<<<<<< * * # Window Attributes */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":201 * property group: * """window group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_group() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.group.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":207 * # ----------------- * * def Get_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Retrieve attribute value by key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_31Get_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_30Get_attr[] = "Win.Get_attr(self, int keyval)\n\n Retrieve attribute value by key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_31Get_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_attr") < 0)) __PYX_ERR(30, 207, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 207, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_attr", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 207, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Get_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_30Get_attr(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_keyval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_30Get_attr(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_keyval) { void *__pyx_v_attrval; int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Get_attr", 0); /* "mpi4py/MPI/Win.pyx":211 * Retrieve attribute value by key * """ * cdef void *attrval = NULL # <<<<<<<<<<<<<< * cdef int flag = 0 * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) */ __pyx_v_attrval = NULL; /* "mpi4py/MPI/Win.pyx":212 * """ * cdef void *attrval = NULL * cdef int flag = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) * if flag == 0: return None */ __pyx_v_flag = 0; /* "mpi4py/MPI/Win.pyx":213 * cdef void *attrval = NULL * cdef int flag = 0 * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) # <<<<<<<<<<<<<< * if flag == 0: return None * if attrval == NULL: return 0 */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_attr(__pyx_v_self->ob_mpi, __pyx_v_keyval, (&__pyx_v_attrval), (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 213, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":214 * cdef int flag = 0 * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) * if flag == 0: return None # <<<<<<<<<<<<<< * if attrval == NULL: return 0 * # MPI-2 predefined attribute keyvals */ __pyx_t_2 = ((__pyx_v_flag == 0) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":215 * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, &attrval, &flag) ) * if flag == 0: return None * if attrval == NULL: return 0 # <<<<<<<<<<<<<< * # MPI-2 predefined attribute keyvals * if keyval == MPI_WIN_BASE: */ __pyx_t_2 = ((__pyx_v_attrval == NULL) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_0); __pyx_r = __pyx_int_0; goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":217 * if attrval == NULL: return 0 * # MPI-2 predefined attribute keyvals * if keyval == MPI_WIN_BASE: # <<<<<<<<<<<<<< * return attrval * elif keyval == MPI_WIN_SIZE: */ __pyx_t_2 = ((__pyx_v_keyval == MPI_WIN_BASE) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Win.pyx":218 * # MPI-2 predefined attribute keyvals * if keyval == MPI_WIN_BASE: * return attrval # <<<<<<<<<<<<<< * elif keyval == MPI_WIN_SIZE: * return (attrval)[0] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint(((MPI_Aint)__pyx_v_attrval)); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":217 * if attrval == NULL: return 0 * # MPI-2 predefined attribute keyvals * if keyval == MPI_WIN_BASE: # <<<<<<<<<<<<<< * return attrval * elif keyval == MPI_WIN_SIZE: */ } /* "mpi4py/MPI/Win.pyx":219 * if keyval == MPI_WIN_BASE: * return attrval * elif keyval == MPI_WIN_SIZE: # <<<<<<<<<<<<<< * return (attrval)[0] * elif keyval == MPI_WIN_DISP_UNIT: */ __pyx_t_2 = ((__pyx_v_keyval == MPI_WIN_SIZE) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Win.pyx":220 * return attrval * elif keyval == MPI_WIN_SIZE: * return (attrval)[0] # <<<<<<<<<<<<<< * elif keyval == MPI_WIN_DISP_UNIT: * return (attrval)[0] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint((((MPI_Aint *)__pyx_v_attrval)[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":219 * if keyval == MPI_WIN_BASE: * return attrval * elif keyval == MPI_WIN_SIZE: # <<<<<<<<<<<<<< * return (attrval)[0] * elif keyval == MPI_WIN_DISP_UNIT: */ } /* "mpi4py/MPI/Win.pyx":221 * elif keyval == MPI_WIN_SIZE: * return (attrval)[0] * elif keyval == MPI_WIN_DISP_UNIT: # <<<<<<<<<<<<<< * return (attrval)[0] * # MPI-3 predefined attribute keyvals */ __pyx_t_2 = ((__pyx_v_keyval == MPI_WIN_DISP_UNIT) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Win.pyx":222 * return (attrval)[0] * elif keyval == MPI_WIN_DISP_UNIT: * return (attrval)[0] # <<<<<<<<<<<<<< * # MPI-3 predefined attribute keyvals * elif keyval == MPI_WIN_CREATE_FLAVOR: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int((((int *)__pyx_v_attrval)[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":221 * elif keyval == MPI_WIN_SIZE: * return (attrval)[0] * elif keyval == MPI_WIN_DISP_UNIT: # <<<<<<<<<<<<<< * return (attrval)[0] * # MPI-3 predefined attribute keyvals */ } /* "mpi4py/MPI/Win.pyx":224 * return (attrval)[0] * # MPI-3 predefined attribute keyvals * elif keyval == MPI_WIN_CREATE_FLAVOR: # <<<<<<<<<<<<<< * return (attrval)[0] * elif keyval == MPI_WIN_MODEL: */ __pyx_t_2 = ((__pyx_v_keyval == MPI_WIN_CREATE_FLAVOR) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Win.pyx":225 * # MPI-3 predefined attribute keyvals * elif keyval == MPI_WIN_CREATE_FLAVOR: * return (attrval)[0] # <<<<<<<<<<<<<< * elif keyval == MPI_WIN_MODEL: * return (attrval)[0] */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int((((int *)__pyx_v_attrval)[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":224 * return (attrval)[0] * # MPI-3 predefined attribute keyvals * elif keyval == MPI_WIN_CREATE_FLAVOR: # <<<<<<<<<<<<<< * return (attrval)[0] * elif keyval == MPI_WIN_MODEL: */ } /* "mpi4py/MPI/Win.pyx":226 * elif keyval == MPI_WIN_CREATE_FLAVOR: * return (attrval)[0] * elif keyval == MPI_WIN_MODEL: # <<<<<<<<<<<<<< * return (attrval)[0] * # user-defined attribute keyval */ __pyx_t_2 = ((__pyx_v_keyval == MPI_WIN_MODEL) != 0); if (__pyx_t_2) { /* "mpi4py/MPI/Win.pyx":227 * return (attrval)[0] * elif keyval == MPI_WIN_MODEL: * return (attrval)[0] # <<<<<<<<<<<<<< * # user-defined attribute keyval * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int((((int *)__pyx_v_attrval)[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":226 * elif keyval == MPI_WIN_CREATE_FLAVOR: * return (attrval)[0] * elif keyval == MPI_WIN_MODEL: # <<<<<<<<<<<<<< * return (attrval)[0] * # user-defined attribute keyval */ } /* "mpi4py/MPI/Win.pyx":229 * return (attrval)[0] * # user-defined attribute keyval * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) # <<<<<<<<<<<<<< * * def Set_attr(self, int keyval, object attrval): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_get(__pyx_v_self->ob_mpi, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":207 * # ----------------- * * def Get_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Retrieve attribute value by key */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.Get_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":231 * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) * * def Set_attr(self, int keyval, object attrval): # <<<<<<<<<<<<<< * """ * Store attribute value associated with a key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_33Set_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_32Set_attr[] = "Win.Set_attr(self, int keyval, attrval)\n\n Store attribute value associated with a key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_33Set_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_v_attrval = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,&__pyx_n_s_attrval,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attrval)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Set_attr", 1, 2, 2, 1); __PYX_ERR(30, 231, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_attr") < 0)) __PYX_ERR(30, 231, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 231, __pyx_L3_error) __pyx_v_attrval = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_attr", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 231, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Set_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_32Set_attr(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_keyval, __pyx_v_attrval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_32Set_attr(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_keyval, PyObject *__pyx_v_attrval) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_attr", 0); /* "mpi4py/MPI/Win.pyx":235 * Store attribute value associated with a key * """ * PyMPI_attr_set(self.ob_mpi, keyval, attrval) # <<<<<<<<<<<<<< * * def Delete_attr(self, int keyval): */ __pyx_t_1 = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_set(__pyx_v_self->ob_mpi, __pyx_v_keyval, __pyx_v_attrval); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 235, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":231 * return PyMPI_attr_get(self.ob_mpi, keyval, attrval) * * def Set_attr(self, int keyval, object attrval): # <<<<<<<<<<<<<< * """ * Store attribute value associated with a key */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Set_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":237 * PyMPI_attr_set(self.ob_mpi, keyval, attrval) * * def Delete_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Delete attribute value associated with a key */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_35Delete_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_34Delete_attr[] = "Win.Delete_attr(self, int keyval)\n\n Delete attribute value associated with a key\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_35Delete_attr(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Delete_attr (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Delete_attr") < 0)) __PYX_ERR(30, 237, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 237, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Delete_attr", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 237, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Delete_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_34Delete_attr(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_keyval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_34Delete_attr(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_keyval) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Delete_attr", 0); /* "mpi4py/MPI/Win.pyx":241 * Delete attribute value associated with a key * """ * CHKERR( MPI_Win_delete_attr(self.ob_mpi, keyval) ) # <<<<<<<<<<<<<< * * @classmethod */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_delete_attr(__pyx_v_self->ob_mpi, __pyx_v_keyval)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 241, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":237 * PyMPI_attr_set(self.ob_mpi, keyval, attrval) * * def Delete_attr(self, int keyval): # <<<<<<<<<<<<<< * """ * Delete attribute value associated with a key */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Delete_attr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":244 * * @classmethod * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): # <<<<<<<<<<<<<< * """ * Create a new attribute key for windows */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_37Create_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_36Create_keyval[] = "Win.Create_keyval(type cls, copy_fn=None, delete_fn=None, nopython=False)\n\n Create a new attribute key for windows\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_37Create_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_copy_fn = 0; PyObject *__pyx_v_delete_fn = 0; PyObject *__pyx_v_nopython = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Create_keyval (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_copy_fn,&__pyx_n_s_delete_fn,&__pyx_n_s_nopython,0}; PyObject* values[3] = {0,0,0}; values[0] = ((PyObject *)Py_None); values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_copy_fn); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_delete_fn); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nopython); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Create_keyval") < 0)) __PYX_ERR(30, 244, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_copy_fn = values[0]; __pyx_v_delete_fn = values[1]; __pyx_v_nopython = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Create_keyval", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 244, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Create_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_36Create_keyval(((PyTypeObject*)__pyx_v_cls), __pyx_v_copy_fn, __pyx_v_delete_fn, __pyx_v_nopython); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_36Create_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_copy_fn, PyObject *__pyx_v_delete_fn, PyObject *__pyx_v_nopython) { PyObject *__pyx_v_state = 0; int __pyx_v_keyval; MPI_Win_copy_attr_function *__pyx_v__copy; MPI_Win_delete_attr_function *__pyx_v__del; void *__pyx_v_extra_state; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Create_keyval", 0); /* "mpi4py/MPI/Win.pyx":248 * Create a new attribute key for windows * """ * cdef object state = _p_keyval(copy_fn, delete_fn, nopython) # <<<<<<<<<<<<<< * cdef int keyval = MPI_KEYVAL_INVALID * cdef MPI_Win_copy_attr_function *_copy = PyMPI_attr_copy_fn */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_copy_fn); __Pyx_GIVEREF(__pyx_v_copy_fn); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_copy_fn); __Pyx_INCREF(__pyx_v_delete_fn); __Pyx_GIVEREF(__pyx_v_delete_fn); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_delete_fn); __Pyx_INCREF(__pyx_v_nopython); __Pyx_GIVEREF(__pyx_v_nopython); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nopython); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6mpi4py_3MPI__p_keyval), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_state = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/Win.pyx":249 * """ * cdef object state = _p_keyval(copy_fn, delete_fn, nopython) * cdef int keyval = MPI_KEYVAL_INVALID # <<<<<<<<<<<<<< * cdef MPI_Win_copy_attr_function *_copy = PyMPI_attr_copy_fn * cdef MPI_Win_delete_attr_function *_del = PyMPI_attr_delete_fn */ __pyx_v_keyval = MPI_KEYVAL_INVALID; /* "mpi4py/MPI/Win.pyx":250 * cdef object state = _p_keyval(copy_fn, delete_fn, nopython) * cdef int keyval = MPI_KEYVAL_INVALID * cdef MPI_Win_copy_attr_function *_copy = PyMPI_attr_copy_fn # <<<<<<<<<<<<<< * cdef MPI_Win_delete_attr_function *_del = PyMPI_attr_delete_fn * cdef void *extra_state = state */ __pyx_v__copy = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_copy_fn; /* "mpi4py/MPI/Win.pyx":251 * cdef int keyval = MPI_KEYVAL_INVALID * cdef MPI_Win_copy_attr_function *_copy = PyMPI_attr_copy_fn * cdef MPI_Win_delete_attr_function *_del = PyMPI_attr_delete_fn # <<<<<<<<<<<<<< * cdef void *extra_state = state * CHKERR( MPI_Win_create_keyval(_copy, _del, &keyval, extra_state) ) */ __pyx_v__del = __pyx_fuse_2__pyx_f_6mpi4py_3MPI_PyMPI_attr_delete_fn; /* "mpi4py/MPI/Win.pyx":252 * cdef MPI_Win_copy_attr_function *_copy = PyMPI_attr_copy_fn * cdef MPI_Win_delete_attr_function *_del = PyMPI_attr_delete_fn * cdef void *extra_state = state # <<<<<<<<<<<<<< * CHKERR( MPI_Win_create_keyval(_copy, _del, &keyval, extra_state) ) * win_keyval[keyval] = state */ __pyx_v_extra_state = ((void *)__pyx_v_state); /* "mpi4py/MPI/Win.pyx":253 * cdef MPI_Win_delete_attr_function *_del = PyMPI_attr_delete_fn * cdef void *extra_state = state * CHKERR( MPI_Win_create_keyval(_copy, _del, &keyval, extra_state) ) # <<<<<<<<<<<<<< * win_keyval[keyval] = state * return keyval */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_create_keyval(__pyx_v__copy, __pyx_v__del, (&__pyx_v_keyval), __pyx_v_extra_state)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 253, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":254 * cdef void *extra_state = state * CHKERR( MPI_Win_create_keyval(_copy, _del, &keyval, extra_state) ) * win_keyval[keyval] = state # <<<<<<<<<<<<<< * return keyval * */ if (unlikely(__pyx_v_6mpi4py_3MPI_win_keyval == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(30, 254, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyDict_SetItem(__pyx_v_6mpi4py_3MPI_win_keyval, __pyx_t_2, __pyx_v_state) < 0)) __PYX_ERR(30, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Win.pyx":255 * CHKERR( MPI_Win_create_keyval(_copy, _del, &keyval, extra_state) ) * win_keyval[keyval] = state * return keyval # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":244 * * @classmethod * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): # <<<<<<<<<<<<<< * """ * Create a new attribute key for windows */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.Create_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":258 * * @classmethod * def Free_keyval(cls, int keyval): # <<<<<<<<<<<<<< * """ * Free and attribute key for windows */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_39Free_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_38Free_keyval[] = "Win.Free_keyval(type cls, int keyval)\n\n Free and attribute key for windows\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_39Free_keyval(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_keyval; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free_keyval (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_keyval,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_keyval)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Free_keyval") < 0)) __PYX_ERR(30, 258, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_keyval = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_keyval == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 258, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Free_keyval", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 258, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Free_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_38Free_keyval(((PyTypeObject*)__pyx_v_cls), __pyx_v_keyval); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_38Free_keyval(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, int __pyx_v_keyval) { int __pyx_v_keyval_save; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("Free_keyval", 0); /* "mpi4py/MPI/Win.pyx":262 * Free and attribute key for windows * """ * cdef int keyval_save = keyval # <<<<<<<<<<<<<< * CHKERR( MPI_Win_free_keyval(&keyval) ) * try: del win_keyval[keyval_save] */ __pyx_v_keyval_save = __pyx_v_keyval; /* "mpi4py/MPI/Win.pyx":263 * """ * cdef int keyval_save = keyval * CHKERR( MPI_Win_free_keyval(&keyval) ) # <<<<<<<<<<<<<< * try: del win_keyval[keyval_save] * except KeyError: pass */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_free_keyval((&__pyx_v_keyval))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 263, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":264 * cdef int keyval_save = keyval * CHKERR( MPI_Win_free_keyval(&keyval) ) * try: del win_keyval[keyval_save] # <<<<<<<<<<<<<< * except KeyError: pass * return keyval */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { if (unlikely(__pyx_v_6mpi4py_3MPI_win_keyval == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(30, 264, __pyx_L3_error) } __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_keyval_save); if (unlikely(!__pyx_t_5)) __PYX_ERR(30, 264, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(PyDict_DelItem(__pyx_v_6mpi4py_3MPI_win_keyval, __pyx_t_5) < 0)) __PYX_ERR(30, 264, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "mpi4py/MPI/Win.pyx":265 * CHKERR( MPI_Win_free_keyval(&keyval) ) * try: del win_keyval[keyval_save] * except KeyError: pass # <<<<<<<<<<<<<< * return keyval * */ __pyx_t_1 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_1) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "mpi4py/MPI/Win.pyx":264 * cdef int keyval_save = keyval * CHKERR( MPI_Win_free_keyval(&keyval) ) * try: del win_keyval[keyval_save] # <<<<<<<<<<<<<< * except KeyError: pass * return keyval */ __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); __pyx_L8_try_end:; } /* "mpi4py/MPI/Win.pyx":266 * try: del win_keyval[keyval_save] * except KeyError: pass * return keyval # <<<<<<<<<<<<<< * * property attrs: */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_keyval); if (unlikely(!__pyx_t_5)) __PYX_ERR(30, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":258 * * @classmethod * def Free_keyval(cls, int keyval): # <<<<<<<<<<<<<< * """ * Free and attribute key for windows */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Win.Free_keyval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":270 * property attrs: * "window attributes" * def __get__(self): # <<<<<<<<<<<<<< * cdef void *base = NULL * cdef MPI_Aint size = 0 */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_5attrs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_5attrs_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_5attrs___get__(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_5attrs___get__(struct PyMPIWinObject *__pyx_v_self) { void *__pyx_v_base; MPI_Aint __pyx_v_size; int __pyx_v_disp_unit; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Win.pyx":271 * "window attributes" * def __get__(self): * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint size = 0 * cdef int disp_unit = 1 */ __pyx_v_base = NULL; /* "mpi4py/MPI/Win.pyx":272 * def __get__(self): * cdef void *base = NULL * cdef MPI_Aint size = 0 # <<<<<<<<<<<<<< * cdef int disp_unit = 1 * win_get_base(self.ob_mpi, &base) */ __pyx_v_size = 0; /* "mpi4py/MPI/Win.pyx":273 * cdef void *base = NULL * cdef MPI_Aint size = 0 * cdef int disp_unit = 1 # <<<<<<<<<<<<<< * win_get_base(self.ob_mpi, &base) * win_get_size(self.ob_mpi, &size) */ __pyx_v_disp_unit = 1; /* "mpi4py/MPI/Win.pyx":274 * cdef MPI_Aint size = 0 * cdef int disp_unit = 1 * win_get_base(self.ob_mpi, &base) # <<<<<<<<<<<<<< * win_get_size(self.ob_mpi, &size) * win_get_unit(self.ob_mpi, &disp_unit) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_win_get_base(__pyx_v_self->ob_mpi, (&__pyx_v_base)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 274, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":275 * cdef int disp_unit = 1 * win_get_base(self.ob_mpi, &base) * win_get_size(self.ob_mpi, &size) # <<<<<<<<<<<<<< * win_get_unit(self.ob_mpi, &disp_unit) * return (base, size, disp_unit) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_win_get_size(__pyx_v_self->ob_mpi, (&__pyx_v_size)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 275, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":276 * win_get_base(self.ob_mpi, &base) * win_get_size(self.ob_mpi, &size) * win_get_unit(self.ob_mpi, &disp_unit) # <<<<<<<<<<<<<< * return (base, size, disp_unit) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_win_get_unit(__pyx_v_self->ob_mpi, (&__pyx_v_disp_unit)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 276, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":277 * win_get_size(self.ob_mpi, &size) * win_get_unit(self.ob_mpi, &disp_unit) * return (base, size, disp_unit) # <<<<<<<<<<<<<< * * property flavor: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Aint(((MPI_Aint)__pyx_v_base)); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_disp_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(30, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(30, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":270 * property attrs: * "window attributes" * def __get__(self): # <<<<<<<<<<<<<< * cdef void *base = NULL * cdef MPI_Aint size = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("mpi4py.MPI.Win.attrs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":281 * property flavor: * """window create flavor""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int keyval = MPI_WIN_CREATE_FLAVOR * cdef int *attrval = NULL */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_6flavor_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_6flavor_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_6flavor___get__(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_6flavor___get__(struct PyMPIWinObject *__pyx_v_self) { int __pyx_v_keyval; int *__pyx_v_attrval; int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Win.pyx":282 * """window create flavor""" * def __get__(self): * cdef int keyval = MPI_WIN_CREATE_FLAVOR # <<<<<<<<<<<<<< * cdef int *attrval = NULL * cdef int flag = 0 */ __pyx_v_keyval = MPI_WIN_CREATE_FLAVOR; /* "mpi4py/MPI/Win.pyx":283 * def __get__(self): * cdef int keyval = MPI_WIN_CREATE_FLAVOR * cdef int *attrval = NULL # <<<<<<<<<<<<<< * cdef int flag = 0 * if keyval != MPI_KEYVAL_INVALID: */ __pyx_v_attrval = NULL; /* "mpi4py/MPI/Win.pyx":284 * cdef int keyval = MPI_WIN_CREATE_FLAVOR * cdef int *attrval = NULL * cdef int flag = 0 # <<<<<<<<<<<<<< * if keyval != MPI_KEYVAL_INVALID: * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, */ __pyx_v_flag = 0; /* "mpi4py/MPI/Win.pyx":285 * cdef int *attrval = NULL * cdef int flag = 0 * if keyval != MPI_KEYVAL_INVALID: # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, * &attrval, &flag) ) */ __pyx_t_1 = ((__pyx_v_keyval != MPI_KEYVAL_INVALID) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/Win.pyx":286 * cdef int flag = 0 * if keyval != MPI_KEYVAL_INVALID: * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, # <<<<<<<<<<<<<< * &attrval, &flag) ) * if flag and attrval != NULL: return attrval[0] */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_attr(__pyx_v_self->ob_mpi, __pyx_v_keyval, ((void *)(&__pyx_v_attrval)), (&__pyx_v_flag))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 286, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":288 * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, * &attrval, &flag) ) * if flag and attrval != NULL: return attrval[0] # <<<<<<<<<<<<<< * return MPI_WIN_FLAVOR_CREATE * */ __pyx_t_3 = (__pyx_v_flag != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = ((__pyx_v_attrval != NULL) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_attrval[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(30, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":285 * cdef int *attrval = NULL * cdef int flag = 0 * if keyval != MPI_KEYVAL_INVALID: # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, * &attrval, &flag) ) */ } /* "mpi4py/MPI/Win.pyx":289 * &attrval, &flag) ) * if flag and attrval != NULL: return attrval[0] * return MPI_WIN_FLAVOR_CREATE # <<<<<<<<<<<<<< * * property model: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int(MPI_WIN_FLAVOR_CREATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(30, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":281 * property flavor: * """window create flavor""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int keyval = MPI_WIN_CREATE_FLAVOR * cdef int *attrval = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Win.flavor.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":293 * property model: * """window memory model""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int keyval = MPI_WIN_MODEL * cdef int *attrval = NULL */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_5model___get__(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_5model___get__(struct PyMPIWinObject *__pyx_v_self) { int __pyx_v_keyval; int *__pyx_v_attrval; int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Win.pyx":294 * """window memory model""" * def __get__(self): * cdef int keyval = MPI_WIN_MODEL # <<<<<<<<<<<<<< * cdef int *attrval = NULL * cdef int flag = 0 */ __pyx_v_keyval = MPI_WIN_MODEL; /* "mpi4py/MPI/Win.pyx":295 * def __get__(self): * cdef int keyval = MPI_WIN_MODEL * cdef int *attrval = NULL # <<<<<<<<<<<<<< * cdef int flag = 0 * if keyval != MPI_KEYVAL_INVALID: */ __pyx_v_attrval = NULL; /* "mpi4py/MPI/Win.pyx":296 * cdef int keyval = MPI_WIN_MODEL * cdef int *attrval = NULL * cdef int flag = 0 # <<<<<<<<<<<<<< * if keyval != MPI_KEYVAL_INVALID: * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, */ __pyx_v_flag = 0; /* "mpi4py/MPI/Win.pyx":297 * cdef int *attrval = NULL * cdef int flag = 0 * if keyval != MPI_KEYVAL_INVALID: # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, * &attrval, &flag) ) */ __pyx_t_1 = ((__pyx_v_keyval != MPI_KEYVAL_INVALID) != 0); if (__pyx_t_1) { /* "mpi4py/MPI/Win.pyx":298 * cdef int flag = 0 * if keyval != MPI_KEYVAL_INVALID: * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, # <<<<<<<<<<<<<< * &attrval, &flag) ) * if flag and attrval != NULL: return attrval[0] */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_attr(__pyx_v_self->ob_mpi, __pyx_v_keyval, ((void *)(&__pyx_v_attrval)), (&__pyx_v_flag))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 298, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":300 * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, * &attrval, &flag) ) * if flag and attrval != NULL: return attrval[0] # <<<<<<<<<<<<<< * return MPI_WIN_SEPARATE * */ __pyx_t_3 = (__pyx_v_flag != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = ((__pyx_v_attrval != NULL) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_attrval[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(30, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":297 * cdef int *attrval = NULL * cdef int flag = 0 * if keyval != MPI_KEYVAL_INVALID: # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_attr(self.ob_mpi, keyval, * &attrval, &flag) ) */ } /* "mpi4py/MPI/Win.pyx":301 * &attrval, &flag) ) * if flag and attrval != NULL: return attrval[0] * return MPI_WIN_SEPARATE # <<<<<<<<<<<<<< * * def tomemory(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyInt_From_int(MPI_WIN_SEPARATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(30, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":293 * property model: * """window memory model""" * def __get__(self): # <<<<<<<<<<<<<< * cdef int keyval = MPI_WIN_MODEL * cdef int *attrval = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Win.model.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":303 * return MPI_WIN_SEPARATE * * def tomemory(self): # <<<<<<<<<<<<<< * """ * Return window memory buffer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_41tomemory(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_40tomemory[] = "Win.tomemory(self)\n\n Return window memory buffer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_41tomemory(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tomemory (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("tomemory", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "tomemory", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_40tomemory(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_40tomemory(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("tomemory", 0); /* "mpi4py/MPI/Win.pyx":307 * Return window memory buffer * """ * return getbuffer(self, 0, 1) # <<<<<<<<<<<<<< * * # buffer interface (PEP 3118) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_getbuffer(((PyObject *)__pyx_v_self), 0, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":303 * return MPI_WIN_SEPARATE * * def tomemory(self): # <<<<<<<<<<<<<< * """ * Return window memory buffer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.tomemory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":311 * # buffer interface (PEP 3118) * * def __getbuffer__(self, Py_buffer *view, int flags): # <<<<<<<<<<<<<< * if view.obj == Py_None: Py_CLEAR(view.obj) * cdef void *base = NULL */ /* Python wrapper */ static CYTHON_UNUSED int __pyx_pw_6mpi4py_3MPI_3Win_43__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_view, int __pyx_v_flags); /*proto*/ static CYTHON_UNUSED int __pyx_pw_6mpi4py_3MPI_3Win_43__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_view, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_42__getbuffer__(((struct PyMPIWinObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_view), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_3Win_42__getbuffer__(struct PyMPIWinObject *__pyx_v_self, Py_buffer *__pyx_v_view, int __pyx_v_flags) { void *__pyx_v_base; MPI_Aint __pyx_v_size; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; if (__pyx_v_view == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_view->obj = NULL; /* "mpi4py/MPI/Win.pyx":312 * * def __getbuffer__(self, Py_buffer *view, int flags): * if view.obj == Py_None: Py_CLEAR(view.obj) # <<<<<<<<<<<<<< * cdef void *base = NULL * cdef MPI_Aint size = 0 */ __pyx_t_1 = ((__pyx_v_view->obj == Py_None) != 0); if (__pyx_t_1) { Py_CLEAR(__pyx_v_view->obj); } /* "mpi4py/MPI/Win.pyx":313 * def __getbuffer__(self, Py_buffer *view, int flags): * if view.obj == Py_None: Py_CLEAR(view.obj) * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef MPI_Aint size = 0 * win_get_base(self.ob_mpi, &base) */ __pyx_v_base = NULL; /* "mpi4py/MPI/Win.pyx":314 * if view.obj == Py_None: Py_CLEAR(view.obj) * cdef void *base = NULL * cdef MPI_Aint size = 0 # <<<<<<<<<<<<<< * win_get_base(self.ob_mpi, &base) * win_get_size(self.ob_mpi, &size) */ __pyx_v_size = 0; /* "mpi4py/MPI/Win.pyx":315 * cdef void *base = NULL * cdef MPI_Aint size = 0 * win_get_base(self.ob_mpi, &base) # <<<<<<<<<<<<<< * win_get_size(self.ob_mpi, &size) * PyBuffer_FillInfo(view, self, base, size, 0, flags) */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_win_get_base(__pyx_v_self->ob_mpi, (&__pyx_v_base)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 315, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":316 * cdef MPI_Aint size = 0 * win_get_base(self.ob_mpi, &base) * win_get_size(self.ob_mpi, &size) # <<<<<<<<<<<<<< * PyBuffer_FillInfo(view, self, base, size, 0, flags) * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_win_get_size(__pyx_v_self->ob_mpi, (&__pyx_v_size)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 316, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":317 * win_get_base(self.ob_mpi, &base) * win_get_size(self.ob_mpi, &size) * PyBuffer_FillInfo(view, self, base, size, 0, flags) # <<<<<<<<<<<<<< * * # buffer interface (legacy) */ __pyx_t_2 = PyBuffer_FillInfo(__pyx_v_view, ((PyObject *)__pyx_v_self), __pyx_v_base, __pyx_v_size, 0, __pyx_v_flags); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 317, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":311 * # buffer interface (PEP 3118) * * def __getbuffer__(self, Py_buffer *view, int flags): # <<<<<<<<<<<<<< * if view.obj == Py_None: Py_CLEAR(view.obj) * cdef void *base = NULL */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; Py_CLEAR(__pyx_v_view->obj); goto __pyx_L2; __pyx_L0:; __pyx_L2:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":321 * # buffer interface (legacy) * * def __getsegcount__(self, Py_ssize_t *lenp): # <<<<<<<<<<<<<< * if lenp == NULL: return 1 * cdef MPI_Aint size = 0 */ /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pw_6mpi4py_3MPI_3Win_45__getsegcount__(PyObject *__pyx_v_self, Py_ssize_t *__pyx_v_lenp); /*proto*/ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_3Win_45__getsegcount__(PyObject *__pyx_v_self, Py_ssize_t *__pyx_v_lenp) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getsegcount__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_44__getsegcount__(((struct PyMPIWinObject *)__pyx_v_self), ((Py_ssize_t *)__pyx_v_lenp)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_3Win_44__getsegcount__(struct PyMPIWinObject *__pyx_v_self, Py_ssize_t *__pyx_v_lenp) { MPI_Aint __pyx_v_size; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__getsegcount__", 0); /* "mpi4py/MPI/Win.pyx":322 * * def __getsegcount__(self, Py_ssize_t *lenp): * if lenp == NULL: return 1 # <<<<<<<<<<<<<< * cdef MPI_Aint size = 0 * win_get_size(self.ob_mpi, &size) */ __pyx_t_1 = ((__pyx_v_lenp == NULL) != 0); if (__pyx_t_1) { __pyx_r = 1; goto __pyx_L0; } /* "mpi4py/MPI/Win.pyx":323 * def __getsegcount__(self, Py_ssize_t *lenp): * if lenp == NULL: return 1 * cdef MPI_Aint size = 0 # <<<<<<<<<<<<<< * win_get_size(self.ob_mpi, &size) * lenp[0] = size */ __pyx_v_size = 0; /* "mpi4py/MPI/Win.pyx":324 * if lenp == NULL: return 1 * cdef MPI_Aint size = 0 * win_get_size(self.ob_mpi, &size) # <<<<<<<<<<<<<< * lenp[0] = size * return 1 */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_win_get_size(__pyx_v_self->ob_mpi, (&__pyx_v_size)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 324, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":325 * cdef MPI_Aint size = 0 * win_get_size(self.ob_mpi, &size) * lenp[0] = size # <<<<<<<<<<<<<< * return 1 * */ (__pyx_v_lenp[0]) = ((Py_ssize_t)__pyx_v_size); /* "mpi4py/MPI/Win.pyx":326 * win_get_size(self.ob_mpi, &size) * lenp[0] = size * return 1 # <<<<<<<<<<<<<< * * def __getreadbuffer__(self, Py_ssize_t idx, void **bufp): */ __pyx_r = 1; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":321 * # buffer interface (legacy) * * def __getsegcount__(self, Py_ssize_t *lenp): # <<<<<<<<<<<<<< * if lenp == NULL: return 1 * cdef MPI_Aint size = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.__getsegcount__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ /* "mpi4py/MPI/Win.pyx":328 * return 1 * * def __getreadbuffer__(self, Py_ssize_t idx, void **bufp): # <<<<<<<<<<<<<< * if idx != 0: * raise SystemError("accessing non-existent buffer segment") */ /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pw_6mpi4py_3MPI_3Win_47__getreadbuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_bufp); /*proto*/ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_3Win_47__getreadbuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_bufp) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getreadbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_46__getreadbuffer__(((struct PyMPIWinObject *)__pyx_v_self), ((Py_ssize_t)__pyx_v_idx), ((void **)__pyx_v_bufp)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_3Win_46__getreadbuffer__(struct PyMPIWinObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_bufp) { MPI_Aint __pyx_v_size; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("__getreadbuffer__", 0); /* "mpi4py/MPI/Win.pyx":329 * * def __getreadbuffer__(self, Py_ssize_t idx, void **bufp): * if idx != 0: # <<<<<<<<<<<<<< * raise SystemError("accessing non-existent buffer segment") * cdef MPI_Aint size = 0 */ __pyx_t_1 = ((__pyx_v_idx != 0) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/Win.pyx":330 * def __getreadbuffer__(self, Py_ssize_t idx, void **bufp): * if idx != 0: * raise SystemError("accessing non-existent buffer segment") # <<<<<<<<<<<<<< * cdef MPI_Aint size = 0 * win_get_base(self.ob_mpi, bufp) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_SystemError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(30, 330, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":329 * * def __getreadbuffer__(self, Py_ssize_t idx, void **bufp): * if idx != 0: # <<<<<<<<<<<<<< * raise SystemError("accessing non-existent buffer segment") * cdef MPI_Aint size = 0 */ } /* "mpi4py/MPI/Win.pyx":331 * if idx != 0: * raise SystemError("accessing non-existent buffer segment") * cdef MPI_Aint size = 0 # <<<<<<<<<<<<<< * win_get_base(self.ob_mpi, bufp) * win_get_size(self.ob_mpi, &size) */ __pyx_v_size = 0; /* "mpi4py/MPI/Win.pyx":332 * raise SystemError("accessing non-existent buffer segment") * cdef MPI_Aint size = 0 * win_get_base(self.ob_mpi, bufp) # <<<<<<<<<<<<<< * win_get_size(self.ob_mpi, &size) * return size */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_win_get_base(__pyx_v_self->ob_mpi, __pyx_v_bufp); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 332, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":333 * cdef MPI_Aint size = 0 * win_get_base(self.ob_mpi, bufp) * win_get_size(self.ob_mpi, &size) # <<<<<<<<<<<<<< * return size * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_win_get_size(__pyx_v_self->ob_mpi, (&__pyx_v_size)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 333, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":334 * win_get_base(self.ob_mpi, bufp) * win_get_size(self.ob_mpi, &size) * return size # <<<<<<<<<<<<<< * * def __getwritebuffer__(self, Py_ssize_t idx, void **bufp): */ __pyx_r = ((Py_ssize_t)__pyx_v_size); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":328 * return 1 * * def __getreadbuffer__(self, Py_ssize_t idx, void **bufp): # <<<<<<<<<<<<<< * if idx != 0: * raise SystemError("accessing non-existent buffer segment") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.__getreadbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ /* "mpi4py/MPI/Win.pyx":336 * return size * * def __getwritebuffer__(self, Py_ssize_t idx, void **bufp): # <<<<<<<<<<<<<< * if idx != 0: * raise SystemError("accessing non-existent buffer segment") */ /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pw_6mpi4py_3MPI_3Win_49__getwritebuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_bufp); /*proto*/ static Py_ssize_t __pyx_pw_6mpi4py_3MPI_3Win_49__getwritebuffer__(PyObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_bufp) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getwritebuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_48__getwritebuffer__(((struct PyMPIWinObject *)__pyx_v_self), ((Py_ssize_t)__pyx_v_idx), ((void **)__pyx_v_bufp)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ #if PY_MAJOR_VERSION < 3 static Py_ssize_t __pyx_pf_6mpi4py_3MPI_3Win_48__getwritebuffer__(struct PyMPIWinObject *__pyx_v_self, Py_ssize_t __pyx_v_idx, void **__pyx_v_bufp) { MPI_Aint __pyx_v_size; Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("__getwritebuffer__", 0); /* "mpi4py/MPI/Win.pyx":337 * * def __getwritebuffer__(self, Py_ssize_t idx, void **bufp): * if idx != 0: # <<<<<<<<<<<<<< * raise SystemError("accessing non-existent buffer segment") * cdef MPI_Aint size = 0 */ __pyx_t_1 = ((__pyx_v_idx != 0) != 0); if (unlikely(__pyx_t_1)) { /* "mpi4py/MPI/Win.pyx":338 * def __getwritebuffer__(self, Py_ssize_t idx, void **bufp): * if idx != 0: * raise SystemError("accessing non-existent buffer segment") # <<<<<<<<<<<<<< * cdef MPI_Aint size = 0 * win_get_base(self.ob_mpi, bufp) */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_SystemError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(30, 338, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":337 * * def __getwritebuffer__(self, Py_ssize_t idx, void **bufp): * if idx != 0: # <<<<<<<<<<<<<< * raise SystemError("accessing non-existent buffer segment") * cdef MPI_Aint size = 0 */ } /* "mpi4py/MPI/Win.pyx":339 * if idx != 0: * raise SystemError("accessing non-existent buffer segment") * cdef MPI_Aint size = 0 # <<<<<<<<<<<<<< * win_get_base(self.ob_mpi, bufp) * win_get_size(self.ob_mpi, &size) */ __pyx_v_size = 0; /* "mpi4py/MPI/Win.pyx":340 * raise SystemError("accessing non-existent buffer segment") * cdef MPI_Aint size = 0 * win_get_base(self.ob_mpi, bufp) # <<<<<<<<<<<<<< * win_get_size(self.ob_mpi, &size) * return size */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_win_get_base(__pyx_v_self->ob_mpi, __pyx_v_bufp); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 340, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":341 * cdef MPI_Aint size = 0 * win_get_base(self.ob_mpi, bufp) * win_get_size(self.ob_mpi, &size) # <<<<<<<<<<<<<< * return size * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_win_get_size(__pyx_v_self->ob_mpi, (&__pyx_v_size)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 341, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":342 * win_get_base(self.ob_mpi, bufp) * win_get_size(self.ob_mpi, &size) * return size # <<<<<<<<<<<<<< * * # Communication Operations */ __pyx_r = ((Py_ssize_t)__pyx_v_size); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":336 * return size * * def __getwritebuffer__(self, Py_ssize_t idx, void **bufp): # <<<<<<<<<<<<<< * if idx != 0: * raise SystemError("accessing non-existent buffer segment") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.__getwritebuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ /* "mpi4py/MPI/Win.pyx":347 * # ------------------------ * * def Put(self, origin, int target_rank, target=None): # <<<<<<<<<<<<<< * """ * Put data into a memory window on a remote process. */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_51Put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_50Put[] = "Win.Put(self, origin, int target_rank, target=None)\n\n Put data into a memory window on a remote process.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_51Put(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; int __pyx_v_target_rank; PyObject *__pyx_v_target = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Put (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_target_rank,&__pyx_n_s_target,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Put", 0, 2, 3, 1); __PYX_ERR(30, 347, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Put") < 0)) __PYX_ERR(30, 347, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 347, __pyx_L3_error) __pyx_v_target = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Put", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 347, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Put", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_50Put(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_50Put(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Put", 0); /* "mpi4py/MPI/Win.pyx":351 * Put data into a memory window on a remote process. * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_put(origin, target_rank, target) * with nogil: CHKERR( MPI_Put( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":352 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_put(origin, target_rank, target) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Put( * msg.oaddr, msg.ocount, msg.otype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_put(__pyx_v_msg, __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 352, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":353 * cdef _p_msg_rma msg = message_rma() * msg.for_put(origin, target_rank, target) * with nogil: CHKERR( MPI_Put( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":357 * target_rank, * msg.tdisp, msg.tcount, msg.ttype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Get(self, origin, int target_rank, target=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Put(__pyx_v_msg->oaddr, __pyx_v_msg->ocount, __pyx_v_msg->otype, __pyx_v_target_rank, __pyx_v_msg->tdisp, __pyx_v_msg->tcount, __pyx_v_msg->ttype, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 353, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":353 * cdef _p_msg_rma msg = message_rma() * msg.for_put(origin, target_rank, target) * with nogil: CHKERR( MPI_Put( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":347 * # ------------------------ * * def Put(self, origin, int target_rank, target=None): # <<<<<<<<<<<<<< * """ * Put data into a memory window on a remote process. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Put", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":359 * self.ob_mpi) ) * * def Get(self, origin, int target_rank, target=None): # <<<<<<<<<<<<<< * """ * Get data from a memory window on a remote process. */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_53Get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_52Get[] = "Win.Get(self, origin, int target_rank, target=None)\n\n Get data from a memory window on a remote process.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_53Get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; int __pyx_v_target_rank; PyObject *__pyx_v_target = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_target_rank,&__pyx_n_s_target,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Get", 0, 2, 3, 1); __PYX_ERR(30, 359, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get") < 0)) __PYX_ERR(30, 359, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 359, __pyx_L3_error) __pyx_v_target = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 359, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_52Get(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_52Get(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Get", 0); /* "mpi4py/MPI/Win.pyx":363 * Get data from a memory window on a remote process. * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_get(origin, target_rank, target) * with nogil: CHKERR( MPI_Get( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":364 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_get(origin, target_rank, target) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Get( * msg.oaddr, msg.ocount, msg.otype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get(__pyx_v_msg, __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 364, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":365 * cdef _p_msg_rma msg = message_rma() * msg.for_get(origin, target_rank, target) * with nogil: CHKERR( MPI_Get( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":369 * target_rank, * msg.tdisp, msg.tcount, msg.ttype, * self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Accumulate(self, origin, int target_rank, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get(__pyx_v_msg->oaddr, __pyx_v_msg->ocount, __pyx_v_msg->otype, __pyx_v_target_rank, __pyx_v_msg->tdisp, __pyx_v_msg->tcount, __pyx_v_msg->ttype, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 365, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":365 * cdef _p_msg_rma msg = message_rma() * msg.for_get(origin, target_rank, target) * with nogil: CHKERR( MPI_Get( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":359 * self.ob_mpi) ) * * def Get(self, origin, int target_rank, target=None): # <<<<<<<<<<<<<< * """ * Get data from a memory window on a remote process. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Get", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":371 * self.ob_mpi) ) * * def Accumulate(self, origin, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_55Accumulate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_54Accumulate[] = "Win.Accumulate(self, origin, int target_rank, target=None, Op op=SUM)\n\n Accumulate data into the target process\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_55Accumulate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; int __pyx_v_target_rank; PyObject *__pyx_v_target = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Accumulate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_target_rank,&__pyx_n_s_target,&__pyx_n_s_op,0}; PyObject* values[4] = {0,0,0,0}; /* "mpi4py/MPI/Win.pyx":372 * * def Accumulate(self, origin, int target_rank, * target=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Accumulate data into the target process */ values[2] = ((PyObject *)Py_None); values[3] = (PyObject *)__pyx_k__114; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Accumulate", 0, 2, 4, 1); __PYX_ERR(30, 371, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Accumulate") < 0)) __PYX_ERR(30, 371, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 371, __pyx_L3_error) __pyx_v_target = values[2]; __pyx_v_op = ((struct PyMPIOpObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Accumulate", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 371, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Accumulate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(30, 372, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_54Accumulate(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target, __pyx_v_op); /* "mpi4py/MPI/Win.pyx":371 * self.ob_mpi) ) * * def Accumulate(self, origin, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_54Accumulate(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Accumulate", 0); /* "mpi4py/MPI/Win.pyx":376 * Accumulate data into the target process * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_acc(origin, target_rank, target) * with nogil: CHKERR( MPI_Accumulate( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":377 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_acc(origin, target_rank, target) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Accumulate( * msg.oaddr, msg.ocount, msg.otype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_acc(__pyx_v_msg, __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 377, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":378 * cdef _p_msg_rma msg = message_rma() * msg.for_acc(origin, target_rank, target) * with nogil: CHKERR( MPI_Accumulate( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":382 * target_rank, * msg.tdisp, msg.tcount, msg.ttype, * op.ob_mpi, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Get_accumulate(self, origin, result, int target_rank, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Accumulate(__pyx_v_msg->oaddr, __pyx_v_msg->ocount, __pyx_v_msg->otype, __pyx_v_target_rank, __pyx_v_msg->tdisp, __pyx_v_msg->tcount, __pyx_v_msg->ttype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 378, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":378 * cdef _p_msg_rma msg = message_rma() * msg.for_acc(origin, target_rank, target) * with nogil: CHKERR( MPI_Accumulate( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":371 * self.ob_mpi) ) * * def Accumulate(self, origin, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Accumulate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":384 * op.ob_mpi, self.ob_mpi) ) * * def Get_accumulate(self, origin, result, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_57Get_accumulate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_56Get_accumulate[] = "Win.Get_accumulate(self, origin, result, int target_rank, target=None, Op op=SUM)\n\n Fetch-and-accumulate data into the target process\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_57Get_accumulate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; PyObject *__pyx_v_result = 0; int __pyx_v_target_rank; PyObject *__pyx_v_target = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_accumulate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_result,&__pyx_n_s_target_rank,&__pyx_n_s_target,&__pyx_n_s_op,0}; PyObject* values[5] = {0,0,0,0,0}; /* "mpi4py/MPI/Win.pyx":385 * * def Get_accumulate(self, origin, result, int target_rank, * target=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Fetch-and-accumulate data into the target process */ values[3] = ((PyObject *)Py_None); values[4] = (PyObject *)__pyx_k__115; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Get_accumulate", 0, 3, 5, 1); __PYX_ERR(30, 384, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Get_accumulate", 0, 3, 5, 2); __PYX_ERR(30, 384, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_accumulate") < 0)) __PYX_ERR(30, 384, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_result = values[1]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 384, __pyx_L3_error) __pyx_v_target = values[3]; __pyx_v_op = ((struct PyMPIOpObject *)values[4]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_accumulate", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 384, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Get_accumulate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(30, 385, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_56Get_accumulate(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_result, __pyx_v_target_rank, __pyx_v_target, __pyx_v_op); /* "mpi4py/MPI/Win.pyx":384 * op.ob_mpi, self.ob_mpi) ) * * def Get_accumulate(self, origin, result, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_56Get_accumulate(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_target_rank, PyObject *__pyx_v_target, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Get_accumulate", 0); /* "mpi4py/MPI/Win.pyx":389 * Fetch-and-accumulate data into the target process * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_get_acc(origin, result, target_rank, target) * with nogil: CHKERR( MPI_Get_accumulate( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":390 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_get_acc(origin, result, target_rank, target) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Get_accumulate( * msg.oaddr, msg.ocount, msg.otype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get_acc(__pyx_v_msg, __pyx_v_origin, __pyx_v_result, __pyx_v_target_rank, __pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 390, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":391 * cdef _p_msg_rma msg = message_rma() * msg.for_get_acc(origin, result, target_rank, target) * with nogil: CHKERR( MPI_Get_accumulate( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * msg.raddr, msg.rcount, msg.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":396 * target_rank, * msg.tdisp, msg.tcount, msg.ttype, * op.ob_mpi, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Fetch_and_op(self, origin, result,int target_rank, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_accumulate(__pyx_v_msg->oaddr, __pyx_v_msg->ocount, __pyx_v_msg->otype, __pyx_v_msg->raddr, __pyx_v_msg->rcount, __pyx_v_msg->rtype, __pyx_v_target_rank, __pyx_v_msg->tdisp, __pyx_v_msg->tcount, __pyx_v_msg->ttype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 391, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":391 * cdef _p_msg_rma msg = message_rma() * msg.for_get_acc(origin, result, target_rank, target) * with nogil: CHKERR( MPI_Get_accumulate( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * msg.raddr, msg.rcount, msg.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":384 * op.ob_mpi, self.ob_mpi) ) * * def Get_accumulate(self, origin, result, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Get_accumulate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":398 * op.ob_mpi, self.ob_mpi) ) * * def Fetch_and_op(self, origin, result,int target_rank, # <<<<<<<<<<<<<< * Aint target_disp=0, Op op=SUM): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_59Fetch_and_op(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_58Fetch_and_op[] = "Win.Fetch_and_op(self, origin, result, int target_rank, Aint target_disp=0, Op op=SUM)\n\n Perform one-sided read-modify-write\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_59Fetch_and_op(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; PyObject *__pyx_v_result = 0; int __pyx_v_target_rank; MPI_Aint __pyx_v_target_disp; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Fetch_and_op (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_result,&__pyx_n_s_target_rank,&__pyx_n_s_target_disp,&__pyx_n_s_op,0}; PyObject* values[5] = {0,0,0,0,0}; values[4] = (PyObject *)__pyx_k__116; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Fetch_and_op", 0, 3, 5, 1); __PYX_ERR(30, 398, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Fetch_and_op", 0, 3, 5, 2); __PYX_ERR(30, 398, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_disp); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Fetch_and_op") < 0)) __PYX_ERR(30, 398, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_result = values[1]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 398, __pyx_L3_error) if (values[3]) { __pyx_v_target_disp = __Pyx_PyInt_As_MPI_Aint(values[3]); if (unlikely((__pyx_v_target_disp == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(30, 399, __pyx_L3_error) } else { __pyx_v_target_disp = ((MPI_Aint)0); } __pyx_v_op = ((struct PyMPIOpObject *)values[4]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Fetch_and_op", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 398, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Fetch_and_op", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(30, 399, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_58Fetch_and_op(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_result, __pyx_v_target_rank, __pyx_v_target_disp, __pyx_v_op); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_58Fetch_and_op(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_target_rank, MPI_Aint __pyx_v_target_disp, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Fetch_and_op", 0); /* "mpi4py/MPI/Win.pyx":403 * Perform one-sided read-modify-write * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_fetch_op(origin, result, target_rank, target_disp) * with nogil: CHKERR( MPI_Fetch_and_op( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":404 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_fetch_op(origin, result, target_rank, target_disp) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Fetch_and_op( * msg.oaddr, msg.raddr, msg.ttype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_fetch_op(__pyx_v_msg, __pyx_v_origin, __pyx_v_result, __pyx_v_target_rank, __pyx_v_target_disp); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 404, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":405 * cdef _p_msg_rma msg = message_rma() * msg.for_fetch_op(origin, result, target_rank, target_disp) * with nogil: CHKERR( MPI_Fetch_and_op( # <<<<<<<<<<<<<< * msg.oaddr, msg.raddr, msg.ttype, * target_rank, target_disp, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":408 * msg.oaddr, msg.raddr, msg.ttype, * target_rank, target_disp, * op.ob_mpi, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Compare_and_swap(self, origin, compare, result, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Fetch_and_op(__pyx_v_msg->oaddr, __pyx_v_msg->raddr, __pyx_v_msg->ttype, __pyx_v_target_rank, __pyx_v_target_disp, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 405, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":405 * cdef _p_msg_rma msg = message_rma() * msg.for_fetch_op(origin, result, target_rank, target_disp) * with nogil: CHKERR( MPI_Fetch_and_op( # <<<<<<<<<<<<<< * msg.oaddr, msg.raddr, msg.ttype, * target_rank, target_disp, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":398 * op.ob_mpi, self.ob_mpi) ) * * def Fetch_and_op(self, origin, result,int target_rank, # <<<<<<<<<<<<<< * Aint target_disp=0, Op op=SUM): * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Fetch_and_op", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":410 * op.ob_mpi, self.ob_mpi) ) * * def Compare_and_swap(self, origin, compare, result, # <<<<<<<<<<<<<< * int target_rank, Aint target_disp=0): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_61Compare_and_swap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_60Compare_and_swap[] = "Win.Compare_and_swap(self, origin, compare, result, int target_rank, Aint target_disp=0)\n\n Perform one-sided atomic compare-and-swap\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_61Compare_and_swap(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; PyObject *__pyx_v_compare = 0; PyObject *__pyx_v_result = 0; int __pyx_v_target_rank; MPI_Aint __pyx_v_target_disp; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Compare_and_swap (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_compare,&__pyx_n_s_result,&__pyx_n_s_target_rank,&__pyx_n_s_target_disp,0}; PyObject* values[5] = {0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compare)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Compare_and_swap", 0, 4, 5, 1); __PYX_ERR(30, 410, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Compare_and_swap", 0, 4, 5, 2); __PYX_ERR(30, 410, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Compare_and_swap", 0, 4, 5, 3); __PYX_ERR(30, 410, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_disp); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Compare_and_swap") < 0)) __PYX_ERR(30, 410, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_compare = values[1]; __pyx_v_result = values[2]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 411, __pyx_L3_error) if (values[4]) { __pyx_v_target_disp = __Pyx_PyInt_As_MPI_Aint(values[4]); if (unlikely((__pyx_v_target_disp == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(30, 411, __pyx_L3_error) } else { __pyx_v_target_disp = ((MPI_Aint)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Compare_and_swap", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 410, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Compare_and_swap", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_60Compare_and_swap(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_compare, __pyx_v_result, __pyx_v_target_rank, __pyx_v_target_disp); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_60Compare_and_swap(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_compare, PyObject *__pyx_v_result, int __pyx_v_target_rank, MPI_Aint __pyx_v_target_disp) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Compare_and_swap", 0); /* "mpi4py/MPI/Win.pyx":415 * Perform one-sided atomic compare-and-swap * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_cmp_swap(origin, compare, result, target_rank, target_disp) * with nogil: CHKERR( MPI_Compare_and_swap( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":416 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_cmp_swap(origin, compare, result, target_rank, target_disp) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Compare_and_swap( * msg.oaddr, msg.caddr, msg.raddr, msg.ttype, */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_cmp_swap(__pyx_v_msg, __pyx_v_origin, __pyx_v_compare, __pyx_v_result, __pyx_v_target_rank, __pyx_v_target_disp); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 416, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":417 * cdef _p_msg_rma msg = message_rma() * msg.for_cmp_swap(origin, compare, result, target_rank, target_disp) * with nogil: CHKERR( MPI_Compare_and_swap( # <<<<<<<<<<<<<< * msg.oaddr, msg.caddr, msg.raddr, msg.ttype, * target_rank, target_disp, self.ob_mpi) ) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":419 * with nogil: CHKERR( MPI_Compare_and_swap( * msg.oaddr, msg.caddr, msg.raddr, msg.ttype, * target_rank, target_disp, self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Request-based RMA Communication Operations */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Compare_and_swap(__pyx_v_msg->oaddr, __pyx_v_msg->caddr, __pyx_v_msg->raddr, __pyx_v_msg->ttype, __pyx_v_target_rank, __pyx_v_target_disp, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 417, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":417 * cdef _p_msg_rma msg = message_rma() * msg.for_cmp_swap(origin, compare, result, target_rank, target_disp) * with nogil: CHKERR( MPI_Compare_and_swap( # <<<<<<<<<<<<<< * msg.oaddr, msg.caddr, msg.raddr, msg.ttype, * target_rank, target_disp, self.ob_mpi) ) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":410 * op.ob_mpi, self.ob_mpi) ) * * def Compare_and_swap(self, origin, compare, result, # <<<<<<<<<<<<<< * int target_rank, Aint target_disp=0): * """ */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Compare_and_swap", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":424 * # ------------------------------------------ * * def Rput(self, origin, int target_rank, target=None): # <<<<<<<<<<<<<< * """ * Put data into a memory window on a remote process. */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_63Rput(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_62Rput[] = "Win.Rput(self, origin, int target_rank, target=None)\n\n Put data into a memory window on a remote process.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_63Rput(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; int __pyx_v_target_rank; PyObject *__pyx_v_target = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Rput (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_target_rank,&__pyx_n_s_target,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Rput", 0, 2, 3, 1); __PYX_ERR(30, 424, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Rput") < 0)) __PYX_ERR(30, 424, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 424, __pyx_L3_error) __pyx_v_target = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Rput", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 424, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Rput", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_62Rput(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_62Rput(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Rput", 0); /* "mpi4py/MPI/Win.pyx":428 * Put data into a memory window on a remote process. * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_put(origin, target_rank, target) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":429 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_put(origin, target_rank, target) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Rput( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_put(__pyx_v_msg, __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 429, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":430 * cdef _p_msg_rma msg = message_rma() * msg.for_put(origin, target_rank, target) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Rput( * msg.oaddr, msg.ocount, msg.otype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 430, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":431 * msg.for_put(origin, target_rank, target) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Rput( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":435 * target_rank, * msg.tdisp, msg.tcount, msg.ttype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = msg * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Rput(__pyx_v_msg->oaddr, __pyx_v_msg->ocount, __pyx_v_msg->otype, __pyx_v_target_rank, __pyx_v_msg->tdisp, __pyx_v_msg->tcount, __pyx_v_msg->ttype, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 431, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":431 * msg.for_put(origin, target_rank, target) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Rput( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":436 * msg.tdisp, msg.tcount, msg.ttype, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = msg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_msg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_msg); /* "mpi4py/MPI/Win.pyx":437 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = msg * return request # <<<<<<<<<<<<<< * * def Rget(self, origin, int target_rank, target=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":424 * # ------------------------------------------ * * def Rput(self, origin, int target_rank, target=None): # <<<<<<<<<<<<<< * """ * Put data into a memory window on a remote process. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.Rput", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":439 * return request * * def Rget(self, origin, int target_rank, target=None): # <<<<<<<<<<<<<< * """ * Get data from a memory window on a remote process. */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_65Rget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_64Rget[] = "Win.Rget(self, origin, int target_rank, target=None)\n\n Get data from a memory window on a remote process.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_65Rget(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; int __pyx_v_target_rank; PyObject *__pyx_v_target = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Rget (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_target_rank,&__pyx_n_s_target,0}; PyObject* values[3] = {0,0,0}; values[2] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Rget", 0, 2, 3, 1); __PYX_ERR(30, 439, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Rget") < 0)) __PYX_ERR(30, 439, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 439, __pyx_L3_error) __pyx_v_target = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Rget", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 439, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Rget", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_64Rget(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_64Rget(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Rget", 0); /* "mpi4py/MPI/Win.pyx":443 * Get data from a memory window on a remote process. * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_get(origin, target_rank, target) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":444 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_get(origin, target_rank, target) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Rget( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get(__pyx_v_msg, __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 444, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":445 * cdef _p_msg_rma msg = message_rma() * msg.for_get(origin, target_rank, target) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Rget( * msg.oaddr, msg.ocount, msg.otype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 445, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":446 * msg.for_get(origin, target_rank, target) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Rget( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":450 * target_rank, * msg.tdisp, msg.tcount, msg.ttype, * self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = msg * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Rget(__pyx_v_msg->oaddr, __pyx_v_msg->ocount, __pyx_v_msg->otype, __pyx_v_target_rank, __pyx_v_msg->tdisp, __pyx_v_msg->tcount, __pyx_v_msg->ttype, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 446, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":446 * msg.for_get(origin, target_rank, target) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Rget( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":451 * msg.tdisp, msg.tcount, msg.ttype, * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = msg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_msg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_msg); /* "mpi4py/MPI/Win.pyx":452 * self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = msg * return request # <<<<<<<<<<<<<< * * def Raccumulate(self, origin, int target_rank, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":439 * return request * * def Rget(self, origin, int target_rank, target=None): # <<<<<<<<<<<<<< * """ * Get data from a memory window on a remote process. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.Rget", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":454 * return request * * def Raccumulate(self, origin, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_67Raccumulate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_66Raccumulate[] = "Win.Raccumulate(self, origin, int target_rank, target=None, Op op=SUM)\n\n Fetch-and-accumulate data into the target process\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_67Raccumulate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; int __pyx_v_target_rank; PyObject *__pyx_v_target = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Raccumulate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_target_rank,&__pyx_n_s_target,&__pyx_n_s_op,0}; PyObject* values[4] = {0,0,0,0}; /* "mpi4py/MPI/Win.pyx":455 * * def Raccumulate(self, origin, int target_rank, * target=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Fetch-and-accumulate data into the target process */ values[2] = ((PyObject *)Py_None); values[3] = (PyObject *)__pyx_k__117; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Raccumulate", 0, 2, 4, 1); __PYX_ERR(30, 454, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Raccumulate") < 0)) __PYX_ERR(30, 454, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 454, __pyx_L3_error) __pyx_v_target = values[2]; __pyx_v_op = ((struct PyMPIOpObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Raccumulate", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 454, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Raccumulate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(30, 455, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_66Raccumulate(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target, __pyx_v_op); /* "mpi4py/MPI/Win.pyx":454 * return request * * def Raccumulate(self, origin, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_66Raccumulate(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, int __pyx_v_target_rank, PyObject *__pyx_v_target, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Raccumulate", 0); /* "mpi4py/MPI/Win.pyx":459 * Fetch-and-accumulate data into the target process * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_acc(origin, target_rank, target) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":460 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_acc(origin, target_rank, target) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Raccumulate( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_acc(__pyx_v_msg, __pyx_v_origin, __pyx_v_target_rank, __pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 460, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":461 * cdef _p_msg_rma msg = message_rma() * msg.for_acc(origin, target_rank, target) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Raccumulate( * msg.oaddr, msg.ocount, msg.otype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 461, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":462 * msg.for_acc(origin, target_rank, target) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Raccumulate( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":466 * target_rank, * msg.tdisp, msg.tcount, msg.ttype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = msg * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Raccumulate(__pyx_v_msg->oaddr, __pyx_v_msg->ocount, __pyx_v_msg->otype, __pyx_v_target_rank, __pyx_v_msg->tdisp, __pyx_v_msg->tcount, __pyx_v_msg->ttype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 462, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":462 * msg.for_acc(origin, target_rank, target) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Raccumulate( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * target_rank, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":467 * msg.tdisp, msg.tcount, msg.ttype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = msg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_msg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_msg); /* "mpi4py/MPI/Win.pyx":468 * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = msg * return request # <<<<<<<<<<<<<< * * def Rget_accumulate(self, origin, result, int target_rank, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":454 * return request * * def Raccumulate(self, origin, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.Raccumulate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":470 * return request * * def Rget_accumulate(self, origin, result, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_69Rget_accumulate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_68Rget_accumulate[] = "Win.Rget_accumulate(self, origin, result, int target_rank, target=None, Op op=SUM)\n\n Accumulate data into the target process\n using remote memory access.\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_69Rget_accumulate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_origin = 0; PyObject *__pyx_v_result = 0; int __pyx_v_target_rank; PyObject *__pyx_v_target = 0; struct PyMPIOpObject *__pyx_v_op = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Rget_accumulate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_result,&__pyx_n_s_target_rank,&__pyx_n_s_target,&__pyx_n_s_op,0}; PyObject* values[5] = {0,0,0,0,0}; /* "mpi4py/MPI/Win.pyx":471 * * def Rget_accumulate(self, origin, result, int target_rank, * target=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Accumulate data into the target process */ values[3] = ((PyObject *)Py_None); values[4] = (PyObject *)__pyx_k__118; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_origin)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Rget_accumulate", 0, 3, 5, 1); __PYX_ERR(30, 470, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target_rank)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Rget_accumulate", 0, 3, 5, 2); __PYX_ERR(30, 470, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_op); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Rget_accumulate") < 0)) __PYX_ERR(30, 470, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_origin = values[0]; __pyx_v_result = values[1]; __pyx_v_target_rank = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_target_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 470, __pyx_L3_error) __pyx_v_target = values[3]; __pyx_v_op = ((struct PyMPIOpObject *)values[4]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Rget_accumulate", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 470, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Rget_accumulate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_6mpi4py_3MPI_Op, 0, "op", 0))) __PYX_ERR(30, 471, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_68Rget_accumulate(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_origin, __pyx_v_result, __pyx_v_target_rank, __pyx_v_target, __pyx_v_op); /* "mpi4py/MPI/Win.pyx":470 * return request * * def Rget_accumulate(self, origin, result, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_68Rget_accumulate(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_result, int __pyx_v_target_rank, PyObject *__pyx_v_target, struct PyMPIOpObject *__pyx_v_op) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *__pyx_v_msg = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("Rget_accumulate", 0); /* "mpi4py/MPI/Win.pyx":476 * using remote memory access. * """ * cdef _p_msg_rma msg = message_rma() # <<<<<<<<<<<<<< * msg.for_get_acc(origin, result, target_rank, target) * cdef Request request = Request.__new__(Request) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_rma()); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_msg = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":477 * """ * cdef _p_msg_rma msg = message_rma() * msg.for_get_acc(origin, result, target_rank, target) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Rget_accumulate( */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get_acc(__pyx_v_msg, __pyx_v_origin, __pyx_v_result, __pyx_v_target_rank, __pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 477, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":478 * cdef _p_msg_rma msg = message_rma() * msg.for_get_acc(origin, result, target_rank, target) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Rget_accumulate( * msg.oaddr, msg.ocount, msg.otype, */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 478, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_3 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":479 * msg.for_get_acc(origin, result, target_rank, target) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Rget_accumulate( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * msg.raddr, msg.rcount, msg.rtype, */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":484 * target_rank, * msg.tdisp, msg.tcount, msg.ttype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = msg * return request */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Rget_accumulate(__pyx_v_msg->oaddr, __pyx_v_msg->ocount, __pyx_v_msg->otype, __pyx_v_msg->raddr, __pyx_v_msg->rcount, __pyx_v_msg->rtype, __pyx_v_target_rank, __pyx_v_msg->tdisp, __pyx_v_msg->tcount, __pyx_v_msg->ttype, __pyx_v_op->ob_mpi, __pyx_v_self->ob_mpi, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 479, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":479 * msg.for_get_acc(origin, result, target_rank, target) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_Rget_accumulate( # <<<<<<<<<<<<<< * msg.oaddr, msg.ocount, msg.otype, * msg.raddr, msg.rcount, msg.rtype, */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":485 * msg.tdisp, msg.tcount, msg.ttype, * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = msg # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_msg)); __Pyx_GIVEREF(((PyObject *)__pyx_v_msg)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_msg); /* "mpi4py/MPI/Win.pyx":486 * op.ob_mpi, self.ob_mpi, &request.ob_mpi) ) * request.ob_buf = msg * return request # <<<<<<<<<<<<<< * * # Synchronization Calls */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":470 * return request * * def Rget_accumulate(self, origin, result, int target_rank, # <<<<<<<<<<<<<< * target=None, Op op=SUM): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.Rget_accumulate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_msg); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":494 * # ----- * * def Fence(self, int assertion=0): # <<<<<<<<<<<<<< * """ * Perform an MPI fence synchronization on a window */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_71Fence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_70Fence[] = "Win.Fence(self, int assertion=0)\n\n Perform an MPI fence synchronization on a window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_71Fence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_assertion; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Fence (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_assertion,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_assertion); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Fence") < 0)) __PYX_ERR(30, 494, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_assertion = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_assertion == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 494, __pyx_L3_error) } else { __pyx_v_assertion = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Fence", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 494, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Fence", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_70Fence(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_assertion); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_70Fence(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_assertion) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Fence", 0); /* "mpi4py/MPI/Win.pyx":498 * Perform an MPI fence synchronization on a window * """ * with nogil: CHKERR( MPI_Win_fence(assertion, self.ob_mpi) ) # <<<<<<<<<<<<<< * * # General Active Target Synchronization */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_fence(__pyx_v_assertion, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 498, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":494 * # ----- * * def Fence(self, int assertion=0): # <<<<<<<<<<<<<< * """ * Perform an MPI fence synchronization on a window */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Fence", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":503 * # ------------------------------------- * * def Start(self, Group group, int assertion=0): # <<<<<<<<<<<<<< * """ * Start an RMA access epoch for MPI */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_73Start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_72Start[] = "Win.Start(self, Group group, int assertion=0)\n\n Start an RMA access epoch for MPI\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_73Start(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group = 0; int __pyx_v_assertion; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Start (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,&__pyx_n_s_assertion,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_assertion); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Start") < 0)) __PYX_ERR(30, 503, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_group = ((struct PyMPIGroupObject *)values[0]); if (values[1]) { __pyx_v_assertion = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_assertion == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 503, __pyx_L3_error) } else { __pyx_v_assertion = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Start", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 503, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Start", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group", 0))) __PYX_ERR(30, 503, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_72Start(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_group, __pyx_v_assertion); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_72Start(struct PyMPIWinObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group, int __pyx_v_assertion) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Start", 0); /* "mpi4py/MPI/Win.pyx":507 * Start an RMA access epoch for MPI * """ * with nogil: CHKERR( MPI_Win_start( # <<<<<<<<<<<<<< * group.ob_mpi, assertion, self.ob_mpi) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":508 * """ * with nogil: CHKERR( MPI_Win_start( * group.ob_mpi, assertion, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Complete(self): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_start(__pyx_v_group->ob_mpi, __pyx_v_assertion, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 507, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":507 * Start an RMA access epoch for MPI * """ * with nogil: CHKERR( MPI_Win_start( # <<<<<<<<<<<<<< * group.ob_mpi, assertion, self.ob_mpi) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":503 * # ------------------------------------- * * def Start(self, Group group, int assertion=0): # <<<<<<<<<<<<<< * """ * Start an RMA access epoch for MPI */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":510 * group.ob_mpi, assertion, self.ob_mpi) ) * * def Complete(self): # <<<<<<<<<<<<<< * """ * Completes an RMA operations begun after an `Win.Start()` */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_75Complete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_74Complete[] = "Win.Complete(self)\n\n Completes an RMA operations begun after an `Win.Start()`\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_75Complete(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Complete (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Complete", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Complete", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_74Complete(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_74Complete(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Complete", 0); /* "mpi4py/MPI/Win.pyx":514 * Completes an RMA operations begun after an `Win.Start()` * """ * with nogil: CHKERR( MPI_Win_complete(self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Post(self, Group group, int assertion=0): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_complete(__pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 514, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":510 * group.ob_mpi, assertion, self.ob_mpi) ) * * def Complete(self): # <<<<<<<<<<<<<< * """ * Completes an RMA operations begun after an `Win.Start()` */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Complete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":516 * with nogil: CHKERR( MPI_Win_complete(self.ob_mpi) ) * * def Post(self, Group group, int assertion=0): # <<<<<<<<<<<<<< * """ * Start an RMA exposure epoch */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_77Post(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_76Post[] = "Win.Post(self, Group group, int assertion=0)\n\n Start an RMA exposure epoch\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_77Post(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIGroupObject *__pyx_v_group = 0; int __pyx_v_assertion; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Post (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_group,&__pyx_n_s_assertion,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_group)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_assertion); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Post") < 0)) __PYX_ERR(30, 516, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_group = ((struct PyMPIGroupObject *)values[0]); if (values[1]) { __pyx_v_assertion = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_assertion == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 516, __pyx_L3_error) } else { __pyx_v_assertion = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Post", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 516, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Post", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_group), __pyx_ptype_6mpi4py_3MPI_Group, 0, "group", 0))) __PYX_ERR(30, 516, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_76Post(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_group, __pyx_v_assertion); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_76Post(struct PyMPIWinObject *__pyx_v_self, struct PyMPIGroupObject *__pyx_v_group, int __pyx_v_assertion) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Post", 0); /* "mpi4py/MPI/Win.pyx":520 * Start an RMA exposure epoch * """ * with nogil: CHKERR( MPI_Win_post( # <<<<<<<<<<<<<< * group.ob_mpi, assertion, self.ob_mpi) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":521 * """ * with nogil: CHKERR( MPI_Win_post( * group.ob_mpi, assertion, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Wait(self): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_post(__pyx_v_group->ob_mpi, __pyx_v_assertion, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 520, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":520 * Start an RMA exposure epoch * """ * with nogil: CHKERR( MPI_Win_post( # <<<<<<<<<<<<<< * group.ob_mpi, assertion, self.ob_mpi) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":516 * with nogil: CHKERR( MPI_Win_complete(self.ob_mpi) ) * * def Post(self, Group group, int assertion=0): # <<<<<<<<<<<<<< * """ * Start an RMA exposure epoch */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Post", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":523 * group.ob_mpi, assertion, self.ob_mpi) ) * * def Wait(self): # <<<<<<<<<<<<<< * """ * Complete an RMA exposure epoch begun with `Win.Post()` */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_79Wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_78Wait[] = "Win.Wait(self)\n\n Complete an RMA exposure epoch begun with `Win.Post()`\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_79Wait(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Wait (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Wait", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Wait", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_78Wait(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_78Wait(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Wait", 0); /* "mpi4py/MPI/Win.pyx":527 * Complete an RMA exposure epoch begun with `Win.Post()` * """ * with nogil: CHKERR( MPI_Win_wait(self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Test(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_wait(__pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 527, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":523 * group.ob_mpi, assertion, self.ob_mpi) ) * * def Wait(self): # <<<<<<<<<<<<<< * """ * Complete an RMA exposure epoch begun with `Win.Post()` */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Wait", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":529 * with nogil: CHKERR( MPI_Win_wait(self.ob_mpi) ) * * def Test(self): # <<<<<<<<<<<<<< * """ * Test whether an RMA exposure epoch has completed */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_81Test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_80Test[] = "Win.Test(self)\n\n Test whether an RMA exposure epoch has completed\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_81Test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Test (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Test", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Test", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_80Test(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_80Test(struct PyMPIWinObject *__pyx_v_self) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Test", 0); /* "mpi4py/MPI/Win.pyx":533 * Test whether an RMA exposure epoch has completed * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_Win_test(self.ob_mpi, &flag) ) * return flag */ __pyx_v_flag = 0; /* "mpi4py/MPI/Win.pyx":534 * """ * cdef int flag = 0 * with nogil: CHKERR( MPI_Win_test(self.ob_mpi, &flag) ) # <<<<<<<<<<<<<< * return flag * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_test(__pyx_v_self->ob_mpi, (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 534, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":535 * cdef int flag = 0 * with nogil: CHKERR( MPI_Win_test(self.ob_mpi, &flag) ) * return flag # <<<<<<<<<<<<<< * * # Lock */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":529 * with nogil: CHKERR( MPI_Win_wait(self.ob_mpi) ) * * def Test(self): # <<<<<<<<<<<<<< * """ * Test whether an RMA exposure epoch has completed */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.Test", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":540 * # ---- * * def Lock(self, int rank, int lock_type=LOCK_EXCLUSIVE, int assertion=0): # <<<<<<<<<<<<<< * """ * Begin an RMA access epoch at the target process */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_83Lock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_82Lock[] = "Win.Lock(self, int rank, int lock_type=LOCK_EXCLUSIVE, int assertion=0)\n\n Begin an RMA access epoch at the target process\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_83Lock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_rank; int __pyx_v_lock_type; int __pyx_v_assertion; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Lock (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rank,&__pyx_n_s_lock_type,&__pyx_n_s_assertion,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lock_type); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_assertion); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Lock") < 0)) __PYX_ERR(30, 540, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_rank = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 540, __pyx_L3_error) if (values[1]) { __pyx_v_lock_type = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_lock_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 540, __pyx_L3_error) } else { __pyx_v_lock_type = __pyx_k__119; } if (values[2]) { __pyx_v_assertion = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_assertion == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 540, __pyx_L3_error) } else { __pyx_v_assertion = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Lock", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 540, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Lock", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_82Lock(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_rank, __pyx_v_lock_type, __pyx_v_assertion); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_82Lock(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank, int __pyx_v_lock_type, int __pyx_v_assertion) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Lock", 0); /* "mpi4py/MPI/Win.pyx":544 * Begin an RMA access epoch at the target process * """ * with nogil: CHKERR( MPI_Win_lock( # <<<<<<<<<<<<<< * lock_type, rank, assertion, self.ob_mpi) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/Win.pyx":545 * """ * with nogil: CHKERR( MPI_Win_lock( * lock_type, rank, assertion, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Unlock(self, int rank): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_lock(__pyx_v_lock_type, __pyx_v_rank, __pyx_v_assertion, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 544, __pyx_L4_error) } /* "mpi4py/MPI/Win.pyx":544 * Begin an RMA access epoch at the target process * """ * with nogil: CHKERR( MPI_Win_lock( # <<<<<<<<<<<<<< * lock_type, rank, assertion, self.ob_mpi) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":540 * # ---- * * def Lock(self, int rank, int lock_type=LOCK_EXCLUSIVE, int assertion=0): # <<<<<<<<<<<<<< * """ * Begin an RMA access epoch at the target process */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Lock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":547 * lock_type, rank, assertion, self.ob_mpi) ) * * def Unlock(self, int rank): # <<<<<<<<<<<<<< * """ * Complete an RMA access epoch at the target process */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_85Unlock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_84Unlock[] = "Win.Unlock(self, int rank)\n\n Complete an RMA access epoch at the target process\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_85Unlock(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_rank; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Unlock (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rank,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Unlock") < 0)) __PYX_ERR(30, 547, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rank = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 547, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Unlock", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 547, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Unlock", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_84Unlock(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_rank); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_84Unlock(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Unlock", 0); /* "mpi4py/MPI/Win.pyx":551 * Complete an RMA access epoch at the target process * """ * with nogil: CHKERR( MPI_Win_unlock(rank, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Lock_all(self, int assertion=0): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_unlock(__pyx_v_rank, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 551, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":547 * lock_type, rank, assertion, self.ob_mpi) ) * * def Unlock(self, int rank): # <<<<<<<<<<<<<< * """ * Complete an RMA access epoch at the target process */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Unlock", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":553 * with nogil: CHKERR( MPI_Win_unlock(rank, self.ob_mpi) ) * * def Lock_all(self, int assertion=0): # <<<<<<<<<<<<<< * """ * Begin an RMA access epoch at all processes */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_87Lock_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_86Lock_all[] = "Win.Lock_all(self, int assertion=0)\n\n Begin an RMA access epoch at all processes\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_87Lock_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_assertion; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Lock_all (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_assertion,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_assertion); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Lock_all") < 0)) __PYX_ERR(30, 553, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_assertion = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_assertion == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 553, __pyx_L3_error) } else { __pyx_v_assertion = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Lock_all", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 553, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Lock_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_86Lock_all(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_assertion); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_86Lock_all(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_assertion) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Lock_all", 0); /* "mpi4py/MPI/Win.pyx":557 * Begin an RMA access epoch at all processes * """ * with nogil: CHKERR( MPI_Win_lock_all(assertion, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Unlock_all(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_lock_all(__pyx_v_assertion, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 557, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":553 * with nogil: CHKERR( MPI_Win_unlock(rank, self.ob_mpi) ) * * def Lock_all(self, int assertion=0): # <<<<<<<<<<<<<< * """ * Begin an RMA access epoch at all processes */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Lock_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":559 * with nogil: CHKERR( MPI_Win_lock_all(assertion, self.ob_mpi) ) * * def Unlock_all(self): # <<<<<<<<<<<<<< * """ * Complete an RMA access epoch at all processes */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_89Unlock_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_88Unlock_all[] = "Win.Unlock_all(self)\n\n Complete an RMA access epoch at all processes\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_89Unlock_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Unlock_all (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Unlock_all", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Unlock_all", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_88Unlock_all(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_88Unlock_all(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Unlock_all", 0); /* "mpi4py/MPI/Win.pyx":563 * Complete an RMA access epoch at all processes * """ * with nogil: CHKERR( MPI_Win_unlock_all(self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Flush and Sync */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_unlock_all(__pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 563, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":559 * with nogil: CHKERR( MPI_Win_lock_all(assertion, self.ob_mpi) ) * * def Unlock_all(self): # <<<<<<<<<<<<<< * """ * Complete an RMA access epoch at all processes */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Unlock_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":568 * # -------------- * * def Flush(self, int rank): # <<<<<<<<<<<<<< * """ * Complete all outstanding RMA operations at the given target */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_91Flush(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_90Flush[] = "Win.Flush(self, int rank)\n\n Complete all outstanding RMA operations at the given target\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_91Flush(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_rank; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Flush (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rank,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Flush") < 0)) __PYX_ERR(30, 568, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rank = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 568, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Flush", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 568, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Flush", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_90Flush(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_rank); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_90Flush(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Flush", 0); /* "mpi4py/MPI/Win.pyx":572 * Complete all outstanding RMA operations at the given target * """ * with nogil: CHKERR( MPI_Win_flush(rank, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Flush_all(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_flush(__pyx_v_rank, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 572, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":568 * # -------------- * * def Flush(self, int rank): # <<<<<<<<<<<<<< * """ * Complete all outstanding RMA operations at the given target */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Flush", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":574 * with nogil: CHKERR( MPI_Win_flush(rank, self.ob_mpi) ) * * def Flush_all(self): # <<<<<<<<<<<<<< * """ * Complete all outstanding RMA operations at all targets */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_93Flush_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_92Flush_all[] = "Win.Flush_all(self)\n\n Complete all outstanding RMA operations at all targets\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_93Flush_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Flush_all (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Flush_all", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Flush_all", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_92Flush_all(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_92Flush_all(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Flush_all", 0); /* "mpi4py/MPI/Win.pyx":578 * Complete all outstanding RMA operations at all targets * """ * with nogil: CHKERR( MPI_Win_flush_all(self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Flush_local(self, int rank): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_flush_all(__pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 578, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":574 * with nogil: CHKERR( MPI_Win_flush(rank, self.ob_mpi) ) * * def Flush_all(self): # <<<<<<<<<<<<<< * """ * Complete all outstanding RMA operations at all targets */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Flush_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":580 * with nogil: CHKERR( MPI_Win_flush_all(self.ob_mpi) ) * * def Flush_local(self, int rank): # <<<<<<<<<<<<<< * """ * Complete locally all outstanding RMA operations at the given target */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_95Flush_local(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_94Flush_local[] = "Win.Flush_local(self, int rank)\n\n Complete locally all outstanding RMA operations at the given target\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_95Flush_local(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_rank; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Flush_local (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rank,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Flush_local") < 0)) __PYX_ERR(30, 580, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_rank = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_rank == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 580, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Flush_local", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 580, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Flush_local", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_94Flush_local(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_rank); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_94Flush_local(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_rank) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Flush_local", 0); /* "mpi4py/MPI/Win.pyx":584 * Complete locally all outstanding RMA operations at the given target * """ * with nogil: CHKERR( MPI_Win_flush_local(rank, self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Flush_local_all(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_flush_local(__pyx_v_rank, __pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 584, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":580 * with nogil: CHKERR( MPI_Win_flush_all(self.ob_mpi) ) * * def Flush_local(self, int rank): # <<<<<<<<<<<<<< * """ * Complete locally all outstanding RMA operations at the given target */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Flush_local", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":586 * with nogil: CHKERR( MPI_Win_flush_local(rank, self.ob_mpi) ) * * def Flush_local_all(self): # <<<<<<<<<<<<<< * """ * Complete locally all outstanding RMA opera- tions at all targets */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_97Flush_local_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_96Flush_local_all[] = "Win.Flush_local_all(self)\n\n Complete locally all outstanding RMA opera- tions at all targets\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_97Flush_local_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Flush_local_all (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Flush_local_all", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Flush_local_all", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_96Flush_local_all(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_96Flush_local_all(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Flush_local_all", 0); /* "mpi4py/MPI/Win.pyx":590 * Complete locally all outstanding RMA opera- tions at all targets * """ * with nogil: CHKERR( MPI_Win_flush_local_all(self.ob_mpi) ) # <<<<<<<<<<<<<< * * def Sync(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_flush_local_all(__pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 590, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":586 * with nogil: CHKERR( MPI_Win_flush_local(rank, self.ob_mpi) ) * * def Flush_local_all(self): # <<<<<<<<<<<<<< * """ * Complete locally all outstanding RMA opera- tions at all targets */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Flush_local_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":592 * with nogil: CHKERR( MPI_Win_flush_local_all(self.ob_mpi) ) * * def Sync(self): # <<<<<<<<<<<<<< * """ * Synchronize public and private copies of the given window */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_99Sync(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_98Sync[] = "Win.Sync(self)\n\n Synchronize public and private copies of the given window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_99Sync(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Sync (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Sync", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Sync", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_98Sync(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_98Sync(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Sync", 0); /* "mpi4py/MPI/Win.pyx":596 * Synchronize public and private copies of the given window * """ * with nogil: CHKERR( MPI_Win_sync(self.ob_mpi) ) # <<<<<<<<<<<<<< * * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_sync(__pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 596, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/Win.pyx":592 * with nogil: CHKERR( MPI_Win_flush_local_all(self.ob_mpi) ) * * def Sync(self): # <<<<<<<<<<<<<< * """ * Synchronize public and private copies of the given window */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Sync", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":602 * # -------------- * * def Get_errhandler(self): # <<<<<<<<<<<<<< * """ * Get the error handler for a window */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_101Get_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_100Get_errhandler[] = "Win.Get_errhandler(self)\n\n Get the error handler for a window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_101Get_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_errhandler (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_errhandler", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_errhandler", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_100Get_errhandler(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_100Get_errhandler(struct PyMPIWinObject *__pyx_v_self) { struct PyMPIErrhandlerObject *__pyx_v_errhandler = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_errhandler", 0); /* "mpi4py/MPI/Win.pyx":606 * Get the error handler for a window * """ * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) * return errhandler */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Errhandler(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Errhandler), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 606, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_errhandler = ((struct PyMPIErrhandlerObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Win.pyx":607 * """ * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * CHKERR( MPI_Win_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) # <<<<<<<<<<<<<< * return errhandler * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_errhandler(__pyx_v_self->ob_mpi, (&__pyx_v_errhandler->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(30, 607, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":608 * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * CHKERR( MPI_Win_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) * return errhandler # <<<<<<<<<<<<<< * * def Set_errhandler(self, Errhandler errhandler): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_errhandler)); __pyx_r = ((PyObject *)__pyx_v_errhandler); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":602 * # -------------- * * def Get_errhandler(self): # <<<<<<<<<<<<<< * """ * Get the error handler for a window */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.Get_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_errhandler); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":610 * return errhandler * * def Set_errhandler(self, Errhandler errhandler): # <<<<<<<<<<<<<< * """ * Set the error handler for a window */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_103Set_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_102Set_errhandler[] = "Win.Set_errhandler(self, Errhandler errhandler)\n\n Set the error handler for a window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_103Set_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIErrhandlerObject *__pyx_v_errhandler = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_errhandler (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errhandler,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errhandler)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_errhandler") < 0)) __PYX_ERR(30, 610, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_errhandler = ((struct PyMPIErrhandlerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_errhandler", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 610, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Set_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_errhandler), __pyx_ptype_6mpi4py_3MPI_Errhandler, 0, "errhandler", 0))) __PYX_ERR(30, 610, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_102Set_errhandler(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_errhandler); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_102Set_errhandler(struct PyMPIWinObject *__pyx_v_self, struct PyMPIErrhandlerObject *__pyx_v_errhandler) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_errhandler", 0); /* "mpi4py/MPI/Win.pyx":614 * Set the error handler for a window * """ * CHKERR( MPI_Win_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) # <<<<<<<<<<<<<< * * def Call_errhandler(self, int errorcode): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_set_errhandler(__pyx_v_self->ob_mpi, __pyx_v_errhandler->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 614, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":610 * return errhandler * * def Set_errhandler(self, Errhandler errhandler): # <<<<<<<<<<<<<< * """ * Set the error handler for a window */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Set_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":616 * CHKERR( MPI_Win_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) * * def Call_errhandler(self, int errorcode): # <<<<<<<<<<<<<< * """ * Call the error handler installed on a window */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_105Call_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_104Call_errhandler[] = "Win.Call_errhandler(self, int errorcode)\n\n Call the error handler installed on a window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_105Call_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_errorcode; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Call_errhandler (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errorcode,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errorcode)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Call_errhandler") < 0)) __PYX_ERR(30, 616, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_errorcode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_errorcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 616, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Call_errhandler", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 616, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Call_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_104Call_errhandler(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_errorcode); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_104Call_errhandler(struct PyMPIWinObject *__pyx_v_self, int __pyx_v_errorcode) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Call_errhandler", 0); /* "mpi4py/MPI/Win.pyx":620 * Call the error handler installed on a window * """ * CHKERR( MPI_Win_call_errhandler(self.ob_mpi, errorcode) ) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_call_errhandler(__pyx_v_self->ob_mpi, __pyx_v_errorcode)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 620, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":616 * CHKERR( MPI_Win_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) * * def Call_errhandler(self, int errorcode): # <<<<<<<<<<<<<< * """ * Call the error handler installed on a window */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Call_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":626 * # -------------- * * def Get_name(self): # <<<<<<<<<<<<<< * """ * Get the print name associated with the window */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_107Get_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_106Get_name[] = "Win.Get_name(self)\n\n Get the print name associated with the window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_107Get_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_name (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_name", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_name", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_106Get_name(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_106Get_name(struct PyMPIWinObject *__pyx_v_self) { char __pyx_v_name[(MPI_MAX_OBJECT_NAME + 1)]; int __pyx_v_nlen; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_name", 0); /* "mpi4py/MPI/Win.pyx":631 * """ * cdef char name[MPI_MAX_OBJECT_NAME+1] * cdef int nlen = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Win_get_name(self.ob_mpi, name, &nlen) ) * return tompistr(name, nlen) */ __pyx_v_nlen = 0; /* "mpi4py/MPI/Win.pyx":632 * cdef char name[MPI_MAX_OBJECT_NAME+1] * cdef int nlen = 0 * CHKERR( MPI_Win_get_name(self.ob_mpi, name, &nlen) ) # <<<<<<<<<<<<<< * return tompistr(name, nlen) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_get_name(__pyx_v_self->ob_mpi, __pyx_v_name, (&__pyx_v_nlen))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(30, 632, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":633 * cdef int nlen = 0 * CHKERR( MPI_Win_get_name(self.ob_mpi, name, &nlen) ) * return tompistr(name, nlen) # <<<<<<<<<<<<<< * * def Set_name(self, name): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_tompistr(__pyx_v_name, __pyx_v_nlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":626 * # -------------- * * def Get_name(self): # <<<<<<<<<<<<<< * """ * Get the print name associated with the window */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.Get_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":635 * return tompistr(name, nlen) * * def Set_name(self, name): # <<<<<<<<<<<<<< * """ * Set the print name associated with the window */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_109Set_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_108Set_name[] = "Win.Set_name(self, name)\n\n Set the print name associated with the window\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_109Set_name(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_name (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name_2,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_name") < 0)) __PYX_ERR(30, 635, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_name = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_name", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 635, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.Set_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_108Set_name(((struct PyMPIWinObject *)__pyx_v_self), __pyx_v_name); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_108Set_name(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_name) { char *__pyx_v_cname; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Set_name", 0); __Pyx_INCREF(__pyx_v_name); /* "mpi4py/MPI/Win.pyx":639 * Set the print name associated with the window * """ * cdef char *cname = NULL # <<<<<<<<<<<<<< * name = asmpistr(name, &cname) * CHKERR( MPI_Win_set_name(self.ob_mpi, cname) ) */ __pyx_v_cname = NULL; /* "mpi4py/MPI/Win.pyx":640 * """ * cdef char *cname = NULL * name = asmpistr(name, &cname) # <<<<<<<<<<<<<< * CHKERR( MPI_Win_set_name(self.ob_mpi, cname) ) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_name, (&__pyx_v_cname)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":641 * cdef char *cname = NULL * name = asmpistr(name, &cname) * CHKERR( MPI_Win_set_name(self.ob_mpi, cname) ) # <<<<<<<<<<<<<< * * property name: */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Win_set_name(__pyx_v_self->ob_mpi, __pyx_v_cname)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(30, 641, __pyx_L1_error) /* "mpi4py/MPI/Win.pyx":635 * return tompistr(name, nlen) * * def Set_name(self, name): # <<<<<<<<<<<<<< * """ * Set the print name associated with the window */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.Set_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":645 * property name: * """window name""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_name() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_4name___get__(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_4name___get__(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/Win.pyx":646 * """window name""" * def __get__(self): * return self.Get_name() # <<<<<<<<<<<<<< * def __set__(self, value): * self.Set_name(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":645 * property name: * """window name""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_name() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":647 * def __get__(self): * return self.Get_name() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_name(value) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_3Win_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_3Win_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_4name_2__set__(((struct PyMPIWinObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_3Win_4name_2__set__(struct PyMPIWinObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/Win.pyx":648 * return self.Get_name() * def __set__(self, value): * self.Set_name(value) # <<<<<<<<<<<<<< * * # Fortran Handle */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(30, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":647 * def __get__(self): * return self.Get_name() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_name(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.Win.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":653 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_111py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_110py2f[] = "Win.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_111py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_110py2f(((struct PyMPIWinObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_110py2f(struct PyMPIWinObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/Win.pyx":656 * """ * """ * return MPI_Win_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_Win_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":653 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Win.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/Win.pyx":659 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_113f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_3Win_112f2py[] = "Win.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_3Win_113f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(30, 659, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(30, 659, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Win.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_3Win_112f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_3Win_112f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIWinObject *__pyx_v_win = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; MPI_Fint __pyx_t_3; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/Win.pyx":662 * """ * """ * cdef Win win = Win.__new__(Win) # <<<<<<<<<<<<<< * win.ob_mpi = MPI_Win_f2c(arg) * return win */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Win(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Win), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 662, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_win = ((struct PyMPIWinObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/Win.pyx":663 * """ * cdef Win win = Win.__new__(Win) * win.ob_mpi = MPI_Win_f2c(arg) # <<<<<<<<<<<<<< * return win * */ __pyx_t_3 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_3 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(30, 663, __pyx_L1_error) __pyx_v_win->ob_mpi = MPI_Win_f2c(__pyx_t_3); /* "mpi4py/MPI/Win.pyx":664 * cdef Win win = Win.__new__(Win) * win.ob_mpi = MPI_Win_f2c(arg) * return win # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_win)); __pyx_r = ((PyObject *)__pyx_v_win); goto __pyx_L0; /* "mpi4py/MPI/Win.pyx":659 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Win.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_win); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":57 * """ * * def __cinit__(self, File file=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_FILE_NULL * if file is None: return */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4File_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4File_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIFileObject *__pyx_v_file = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_file,0}; PyObject* values[1] = {0}; values[0] = (PyObject *)((struct PyMPIFileObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(31, 57, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_file = ((struct PyMPIFileObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 57, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file), __pyx_ptype_6mpi4py_3MPI_File, 1, "file", 0))) __PYX_ERR(31, 57, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File___cinit__(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_file); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4File___cinit__(struct PyMPIFileObject *__pyx_v_self, struct PyMPIFileObject *__pyx_v_file) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; MPI_File __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); /* "mpi4py/MPI/File.pyx":58 * * def __cinit__(self, File file=None): * self.ob_mpi = MPI_FILE_NULL # <<<<<<<<<<<<<< * if file is None: return * self.ob_mpi = file.ob_mpi */ __pyx_v_self->ob_mpi = MPI_FILE_NULL; /* "mpi4py/MPI/File.pyx":59 * def __cinit__(self, File file=None): * self.ob_mpi = MPI_FILE_NULL * if file is None: return # <<<<<<<<<<<<<< * self.ob_mpi = file.ob_mpi * */ __pyx_t_1 = (((PyObject *)__pyx_v_file) == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 0; goto __pyx_L0; } /* "mpi4py/MPI/File.pyx":60 * self.ob_mpi = MPI_FILE_NULL * if file is None: return * self.ob_mpi = file.ob_mpi # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_t_3 = __pyx_v_file->ob_mpi; __pyx_v_self->ob_mpi = __pyx_t_3; /* "mpi4py/MPI/File.pyx":57 * """ * * def __cinit__(self, File file=None): # <<<<<<<<<<<<<< * self.ob_mpi = MPI_FILE_NULL * if file is None: return */ /* function exit code */ __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":62 * self.ob_mpi = file.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_File(&self.ob_mpi) ) */ /* Python wrapper */ static void __pyx_pw_6mpi4py_3MPI_4File_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_6mpi4py_3MPI_4File_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_6mpi4py_3MPI_4File_2__dealloc__(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_6mpi4py_3MPI_4File_2__dealloc__(struct PyMPIFileObject *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "mpi4py/MPI/File.pyx":63 * * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return # <<<<<<<<<<<<<< * CHKERR( del_File(&self.ob_mpi) ) * */ __pyx_t_1 = ((!((__pyx_v_self->flags & __pyx_e_6mpi4py_3MPI_PyMPI_OWNED) != 0)) != 0); if (__pyx_t_1) { goto __pyx_L0; } /* "mpi4py/MPI/File.pyx":64 * def __dealloc__(self): * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_File(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(__pyx_f_6mpi4py_3MPI_del_File((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 64, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":62 * self.ob_mpi = file.ob_mpi * * def __dealloc__(self): # <<<<<<<<<<<<<< * if not (self.flags & PyMPI_OWNED): return * CHKERR( del_File(&self.ob_mpi) ) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_WriteUnraisable("mpi4py.MPI.File.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "mpi4py/MPI/File.pyx":66 * CHKERR( del_File(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, File): return NotImplemented * cdef File s = self, o = other */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_5__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_4__richcmp__(((struct PyMPIFileObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_4__richcmp__(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { struct PyMPIFileObject *__pyx_v_s = 0; struct PyMPIFileObject *__pyx_v_o = 0; PyObject *__pyx_v_mod = 0; PyObject *__pyx_v_cls = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "mpi4py/MPI/File.pyx":67 * * def __richcmp__(self, other, int op): * if not isinstance(other, File): return NotImplemented # <<<<<<<<<<<<<< * cdef File s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6mpi4py_3MPI_File); __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_builtin_NotImplemented); __pyx_r = __pyx_builtin_NotImplemented; goto __pyx_L0; } /* "mpi4py/MPI/File.pyx":68 * def __richcmp__(self, other, int op): * if not isinstance(other, File): return NotImplemented * cdef File s = self, o = other # <<<<<<<<<<<<<< * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_v_s = ((struct PyMPIFileObject *)__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_v_other; __Pyx_INCREF(__pyx_t_3); __pyx_v_o = ((struct PyMPIFileObject *)__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":69 * if not isinstance(other, File): return NotImplemented * cdef File s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) # <<<<<<<<<<<<<< * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ */ __pyx_t_2 = ((__pyx_v_op == Py_EQ) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi == __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/File.pyx":70 * cdef File s = self, o = other * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) # <<<<<<<<<<<<<< * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ */ __pyx_t_2 = ((__pyx_v_op == Py_NE) != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_v_s->ob_mpi != __pyx_v_o->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/File.pyx":71 * if op == Py_EQ: return (s.ob_mpi == o.ob_mpi) * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ # <<<<<<<<<<<<<< * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_mod = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":72 * elif op == Py_NE: return (s.ob_mpi != o.ob_mpi) * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ # <<<<<<<<<<<<<< * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_cls = __pyx_t_3; __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":73 * cdef mod = type(self).__module__ * cdef cls = type(self).__name__ * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) # <<<<<<<<<<<<<< * * def __bool__(self): */ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_mod); __Pyx_GIVEREF(__pyx_v_mod); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_mod); __Pyx_INCREF(__pyx_v_cls); __Pyx_GIVEREF(__pyx_v_cls); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_cls); __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_unorderable_type_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(31, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(31, 73, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":66 * CHKERR( del_File(&self.ob_mpi) ) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if not isinstance(other, File): return NotImplemented * cdef File s = self, o = other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.File.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_s); __Pyx_XDECREF((PyObject *)__pyx_v_o); __Pyx_XDECREF(__pyx_v_mod); __Pyx_XDECREF(__pyx_v_cls); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":75 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_FILE_NULL * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4File_7__bool__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4File_7__bool__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_6__bool__(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4File_6__bool__(struct PyMPIFileObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__bool__", 0); /* "mpi4py/MPI/File.pyx":76 * * def __bool__(self): * return self.ob_mpi != MPI_FILE_NULL # <<<<<<<<<<<<<< * * # File Manipulation */ __pyx_r = (__pyx_v_self->ob_mpi != MPI_FILE_NULL); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":75 * raise TypeError("unorderable type: '%s.%s'" % (mod, cls)) * * def __bool__(self): # <<<<<<<<<<<<<< * return self.ob_mpi != MPI_FILE_NULL * */ /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":82 * * @classmethod * def Open(cls, Intracomm comm, filename, # <<<<<<<<<<<<<< * int amode=MODE_RDONLY, Info info=INFO_NULL): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_9Open(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_8Open[] = "File.Open(type cls, Intracomm comm, filename, int amode=MODE_RDONLY, Info info=INFO_NULL)\n\n Open a file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_9Open(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIIntracommObject *__pyx_v_comm = 0; PyObject *__pyx_v_filename = 0; int __pyx_v_amode; struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Open (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comm,&__pyx_n_s_filename,&__pyx_n_s_amode,&__pyx_n_s_info,0}; PyObject* values[4] = {0,0,0,0}; values[3] = (PyObject *)__pyx_k__120; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_comm)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Open", 0, 2, 4, 1); __PYX_ERR(31, 82, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_amode); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Open") < 0)) __PYX_ERR(31, 82, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_comm = ((struct PyMPIIntracommObject *)values[0]); __pyx_v_filename = values[1]; if (values[2]) { __pyx_v_amode = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_amode == (int)-1) && PyErr_Occurred())) __PYX_ERR(31, 83, __pyx_L3_error) } else { __pyx_v_amode = __pyx_k__121; } __pyx_v_info = ((struct PyMPIInfoObject *)values[3]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Open", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 82, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Open", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_comm), __pyx_ptype_6mpi4py_3MPI_Intracomm, 0, "comm", 0))) __PYX_ERR(31, 82, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(31, 83, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_8Open(((PyTypeObject*)__pyx_v_cls), __pyx_v_comm, __pyx_v_filename, __pyx_v_amode, __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_8Open(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, struct PyMPIIntracommObject *__pyx_v_comm, PyObject *__pyx_v_filename, int __pyx_v_amode, struct PyMPIInfoObject *__pyx_v_info) { char *__pyx_v_cfilename; struct PyMPIFileObject *__pyx_v_file = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Open", 0); __Pyx_INCREF(__pyx_v_filename); /* "mpi4py/MPI/File.pyx":87 * Open a file * """ * cdef char *cfilename = NULL # <<<<<<<<<<<<<< * filename = asmpistr(filename, &cfilename) * cdef File file = File.__new__(File) */ __pyx_v_cfilename = NULL; /* "mpi4py/MPI/File.pyx":88 * """ * cdef char *cfilename = NULL * filename = asmpistr(filename, &cfilename) # <<<<<<<<<<<<<< * cdef File file = File.__new__(File) * with nogil: CHKERR( MPI_File_open( */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_filename, (&__pyx_v_cfilename)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":89 * cdef char *cfilename = NULL * filename = asmpistr(filename, &cfilename) * cdef File file = File.__new__(File) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_open( * comm.ob_mpi, cfilename, amode, info.ob_mpi, &file.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_File(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_File), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 89, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_file = ((struct PyMPIFileObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":90 * filename = asmpistr(filename, &cfilename) * cdef File file = File.__new__(File) * with nogil: CHKERR( MPI_File_open( # <<<<<<<<<<<<<< * comm.ob_mpi, cfilename, amode, info.ob_mpi, &file.ob_mpi) ) * file_set_eh(file.ob_mpi) */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":91 * cdef File file = File.__new__(File) * with nogil: CHKERR( MPI_File_open( * comm.ob_mpi, cfilename, amode, info.ob_mpi, &file.ob_mpi) ) # <<<<<<<<<<<<<< * file_set_eh(file.ob_mpi) * return file */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_open(__pyx_v_comm->__pyx_base.ob_mpi, __pyx_v_cfilename, __pyx_v_amode, __pyx_v_info->ob_mpi, (&__pyx_v_file->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 90, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":90 * filename = asmpistr(filename, &cfilename) * cdef File file = File.__new__(File) * with nogil: CHKERR( MPI_File_open( # <<<<<<<<<<<<<< * comm.ob_mpi, cfilename, amode, info.ob_mpi, &file.ob_mpi) ) * file_set_eh(file.ob_mpi) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":92 * with nogil: CHKERR( MPI_File_open( * comm.ob_mpi, cfilename, amode, info.ob_mpi, &file.ob_mpi) ) * file_set_eh(file.ob_mpi) # <<<<<<<<<<<<<< * return file * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_file_set_eh(__pyx_v_file->ob_mpi); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 92, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":93 * comm.ob_mpi, cfilename, amode, info.ob_mpi, &file.ob_mpi) ) * file_set_eh(file.ob_mpi) * return file # <<<<<<<<<<<<<< * * def Close(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_file)); __pyx_r = ((PyObject *)__pyx_v_file); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":82 * * @classmethod * def Open(cls, Intracomm comm, filename, # <<<<<<<<<<<<<< * int amode=MODE_RDONLY, Info info=INFO_NULL): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Open", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_file); __Pyx_XDECREF(__pyx_v_filename); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":95 * return file * * def Close(self): # <<<<<<<<<<<<<< * """ * Close a file */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_11Close(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_10Close[] = "File.Close(self)\n\n Close a file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_11Close(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Close (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Close", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Close", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_10Close(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_10Close(struct PyMPIFileObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Close", 0); /* "mpi4py/MPI/File.pyx":99 * Close a file * """ * with nogil: CHKERR( MPI_File_close(&self.ob_mpi) ) # <<<<<<<<<<<<<< * * @classmethod */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_close((&__pyx_v_self->ob_mpi))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 99, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":95 * return file * * def Close(self): # <<<<<<<<<<<<<< * """ * Close a file */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":102 * * @classmethod * def Delete(cls, filename, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Delete a file */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_13Delete(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_12Delete[] = "File.Delete(type cls, filename, Info info=INFO_NULL)\n\n Delete a file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_13Delete(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_filename = 0; struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Delete (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_info,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)__pyx_k__122; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Delete") < 0)) __PYX_ERR(31, 102, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_filename = values[0]; __pyx_v_info = ((struct PyMPIInfoObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Delete", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 102, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Delete", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(31, 102, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_12Delete(((PyTypeObject*)__pyx_v_cls), __pyx_v_filename, __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_12Delete(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_filename, struct PyMPIInfoObject *__pyx_v_info) { char *__pyx_v_cfilename; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Delete", 0); __Pyx_INCREF(__pyx_v_filename); /* "mpi4py/MPI/File.pyx":106 * Delete a file * """ * cdef char *cfilename = NULL # <<<<<<<<<<<<<< * filename = asmpistr(filename, &cfilename) * with nogil: CHKERR( MPI_File_delete(cfilename, info.ob_mpi) ) */ __pyx_v_cfilename = NULL; /* "mpi4py/MPI/File.pyx":107 * """ * cdef char *cfilename = NULL * filename = asmpistr(filename, &cfilename) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_delete(cfilename, info.ob_mpi) ) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_filename, (&__pyx_v_cfilename)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":108 * cdef char *cfilename = NULL * filename = asmpistr(filename, &cfilename) * with nogil: CHKERR( MPI_File_delete(cfilename, info.ob_mpi) ) # <<<<<<<<<<<<<< * * def Set_size(self, Offset size): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_delete(__pyx_v_cfilename, __pyx_v_info->ob_mpi)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 108, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":102 * * @classmethod * def Delete(cls, filename, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Delete a file */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Delete", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_filename); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":110 * with nogil: CHKERR( MPI_File_delete(cfilename, info.ob_mpi) ) * * def Set_size(self, Offset size): # <<<<<<<<<<<<<< * """ * Sets the file size */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_15Set_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_14Set_size[] = "File.Set_size(self, Offset size)\n\n Sets the file size\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_15Set_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_size; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_size (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_size") < 0)) __PYX_ERR(31, 110, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_size = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_size == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 110, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_size", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 110, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Set_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_14Set_size(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_size); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_14Set_size(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_size) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_size", 0); /* "mpi4py/MPI/File.pyx":114 * Sets the file size * """ * with nogil: CHKERR( MPI_File_set_size(self.ob_mpi, size) ) # <<<<<<<<<<<<<< * * def Preallocate(self, Offset size): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_set_size(__pyx_v_self->ob_mpi, __pyx_v_size)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 114, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":110 * with nogil: CHKERR( MPI_File_delete(cfilename, info.ob_mpi) ) * * def Set_size(self, Offset size): # <<<<<<<<<<<<<< * """ * Sets the file size */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Set_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":116 * with nogil: CHKERR( MPI_File_set_size(self.ob_mpi, size) ) * * def Preallocate(self, Offset size): # <<<<<<<<<<<<<< * """ * Preallocate storage space for a file */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_17Preallocate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_16Preallocate[] = "File.Preallocate(self, Offset size)\n\n Preallocate storage space for a file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_17Preallocate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_size; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Preallocate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Preallocate") < 0)) __PYX_ERR(31, 116, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_size = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_size == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 116, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Preallocate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 116, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Preallocate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_16Preallocate(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_size); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_16Preallocate(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_size) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Preallocate", 0); /* "mpi4py/MPI/File.pyx":120 * Preallocate storage space for a file * """ * with nogil: CHKERR( MPI_File_preallocate(self.ob_mpi, size) ) # <<<<<<<<<<<<<< * * def Get_size(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_preallocate(__pyx_v_self->ob_mpi, __pyx_v_size)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 120, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":116 * with nogil: CHKERR( MPI_File_set_size(self.ob_mpi, size) ) * * def Preallocate(self, Offset size): # <<<<<<<<<<<<<< * """ * Preallocate storage space for a file */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Preallocate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":122 * with nogil: CHKERR( MPI_File_preallocate(self.ob_mpi, size) ) * * def Get_size(self): # <<<<<<<<<<<<<< * """ * Return the file size */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_19Get_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_18Get_size[] = "File.Get_size(self)\n\n Return the file size\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_19Get_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_size (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_size", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_size", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_18Get_size(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_18Get_size(struct PyMPIFileObject *__pyx_v_self) { MPI_Offset __pyx_v_size; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_size", 0); /* "mpi4py/MPI/File.pyx":126 * Return the file size * """ * cdef MPI_Offset size = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_get_size(self.ob_mpi, &size) ) * return size */ __pyx_v_size = 0; /* "mpi4py/MPI/File.pyx":127 * """ * cdef MPI_Offset size = 0 * with nogil: CHKERR( MPI_File_get_size(self.ob_mpi, &size) ) # <<<<<<<<<<<<<< * return size * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_size(__pyx_v_self->ob_mpi, (&__pyx_v_size))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 127, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":128 * cdef MPI_Offset size = 0 * with nogil: CHKERR( MPI_File_get_size(self.ob_mpi, &size) ) * return size # <<<<<<<<<<<<<< * * property size: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Offset(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":122 * with nogil: CHKERR( MPI_File_preallocate(self.ob_mpi, size) ) * * def Get_size(self): # <<<<<<<<<<<<<< * """ * Return the file size */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":132 * property size: * """file size""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_size() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_4size_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_4size___get__(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_4size___get__(struct PyMPIFileObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/File.pyx":133 * """file size""" * def __get__(self): * return self.Get_size() # <<<<<<<<<<<<<< * * def Get_amode(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":132 * property size: * """file size""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_size() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.File.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":135 * return self.Get_size() * * def Get_amode(self): # <<<<<<<<<<<<<< * """ * Return the file access mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_21Get_amode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_20Get_amode[] = "File.Get_amode(self)\n\n Return the file access mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_21Get_amode(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_amode (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_amode", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_amode", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_20Get_amode(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_20Get_amode(struct PyMPIFileObject *__pyx_v_self) { int __pyx_v_amode; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_amode", 0); /* "mpi4py/MPI/File.pyx":139 * Return the file access mode * """ * cdef int amode = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_get_amode(self.ob_mpi, &amode) ) * return amode */ __pyx_v_amode = 0; /* "mpi4py/MPI/File.pyx":140 * """ * cdef int amode = 0 * with nogil: CHKERR( MPI_File_get_amode(self.ob_mpi, &amode) ) # <<<<<<<<<<<<<< * return amode * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_amode(__pyx_v_self->ob_mpi, (&__pyx_v_amode))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 140, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":141 * cdef int amode = 0 * with nogil: CHKERR( MPI_File_get_amode(self.ob_mpi, &amode) ) * return amode # <<<<<<<<<<<<<< * * property amode: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_amode); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":135 * return self.Get_size() * * def Get_amode(self): # <<<<<<<<<<<<<< * """ * Return the file access mode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_amode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":145 * property amode: * """file access mode""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_amode() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_5amode_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_5amode_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_5amode___get__(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_5amode___get__(struct PyMPIFileObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/File.pyx":146 * """file access mode""" * def __get__(self): * return self.Get_amode() # <<<<<<<<<<<<<< * * # File Group */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_amode); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":145 * property amode: * """file access mode""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_amode() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.File.amode.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":151 * # ---------- * * def Get_group(self): # <<<<<<<<<<<<<< * """ * Return the group of processes */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_23Get_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_22Get_group[] = "File.Get_group(self)\n\n Return the group of processes\n that opened the file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_23Get_group(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_group (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_group", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_group", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_22Get_group(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_22Get_group(struct PyMPIFileObject *__pyx_v_self) { struct PyMPIGroupObject *__pyx_v_group = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_group", 0); /* "mpi4py/MPI/File.pyx":156 * that opened the file * """ * cdef Group group = Group.__new__(Group) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_get_group(self.ob_mpi, &group.ob_mpi) ) * return group */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Group(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Group), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 156, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_group = ((struct PyMPIGroupObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":157 * """ * cdef Group group = Group.__new__(Group) * with nogil: CHKERR( MPI_File_get_group(self.ob_mpi, &group.ob_mpi) ) # <<<<<<<<<<<<<< * return group * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_group(__pyx_v_self->ob_mpi, (&__pyx_v_group->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 157, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":158 * cdef Group group = Group.__new__(Group) * with nogil: CHKERR( MPI_File_get_group(self.ob_mpi, &group.ob_mpi) ) * return group # <<<<<<<<<<<<<< * * property group: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_group)); __pyx_r = ((PyObject *)__pyx_v_group); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":151 * # ---------- * * def Get_group(self): # <<<<<<<<<<<<<< * """ * Return the group of processes */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_group", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_group); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":162 * property group: * """file group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_group() * */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_5group_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_5group_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_5group___get__(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_5group___get__(struct PyMPIFileObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/File.pyx":163 * """file group""" * def __get__(self): * return self.Get_group() # <<<<<<<<<<<<<< * * # File Info */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":162 * property group: * """file group""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_group() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.File.group.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":168 * # --------- * * def Set_info(self, Info info): # <<<<<<<<<<<<<< * """ * Set new values for the hints */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_25Set_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_24Set_info[] = "File.Set_info(self, Info info)\n\n Set new values for the hints\n associated with a file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_25Set_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_info (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_info,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_info") < 0)) __PYX_ERR(31, 168, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_info = ((struct PyMPIInfoObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_info", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 168, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Set_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(31, 168, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_24Set_info(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_24Set_info(struct PyMPIFileObject *__pyx_v_self, struct PyMPIInfoObject *__pyx_v_info) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_info", 0); /* "mpi4py/MPI/File.pyx":173 * associated with a file * """ * with nogil: CHKERR( MPI_File_set_info(self.ob_mpi, info.ob_mpi) ) # <<<<<<<<<<<<<< * * def Get_info(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_set_info(__pyx_v_self->ob_mpi, __pyx_v_info->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 173, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":168 * # --------- * * def Set_info(self, Info info): # <<<<<<<<<<<<<< * """ * Set new values for the hints */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Set_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":175 * with nogil: CHKERR( MPI_File_set_info(self.ob_mpi, info.ob_mpi) ) * * def Get_info(self): # <<<<<<<<<<<<<< * """ * Return the hints for a file that */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_27Get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_26Get_info[] = "File.Get_info(self)\n\n Return the hints for a file that\n that are currently in use\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_27Get_info(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_info (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_info", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_info", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_26Get_info(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_26Get_info(struct PyMPIFileObject *__pyx_v_self) { struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_info", 0); /* "mpi4py/MPI/File.pyx":180 * that are currently in use * """ * cdef Info info = Info.__new__(Info) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_get_info(self.ob_mpi, &info.ob_mpi) ) * return info */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Info(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Info), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 180, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_info = ((struct PyMPIInfoObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":181 * """ * cdef Info info = Info.__new__(Info) * with nogil: CHKERR( MPI_File_get_info(self.ob_mpi, &info.ob_mpi) ) # <<<<<<<<<<<<<< * return info * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_info(__pyx_v_self->ob_mpi, (&__pyx_v_info->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 181, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":182 * cdef Info info = Info.__new__(Info) * with nogil: CHKERR( MPI_File_get_info(self.ob_mpi, &info.ob_mpi) ) * return info # <<<<<<<<<<<<<< * * property info: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_info)); __pyx_r = ((PyObject *)__pyx_v_info); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":175 * with nogil: CHKERR( MPI_File_set_info(self.ob_mpi, info.ob_mpi) ) * * def Get_info(self): # <<<<<<<<<<<<<< * """ * Return the hints for a file that */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":186 * property info: * """file info""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_info() * def __set__(self, info): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_4info_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_4info_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_4info___get__(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_4info___get__(struct PyMPIFileObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/File.pyx":187 * """file info""" * def __get__(self): * return self.Get_info() # <<<<<<<<<<<<<< * def __set__(self, info): * self.Set_info(info) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":186 * property info: * """file info""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_info() * def __set__(self, info): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.File.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":188 * def __get__(self): * return self.Get_info() * def __set__(self, info): # <<<<<<<<<<<<<< * self.Set_info(info) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4File_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_info); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4File_4info_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_info) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_4info_2__set__(((struct PyMPIFileObject *)__pyx_v_self), ((PyObject *)__pyx_v_info)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4File_4info_2__set__(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_info) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/File.pyx":189 * return self.Get_info() * def __set__(self, info): * self.Set_info(info) # <<<<<<<<<<<<<< * * # File Views */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_info) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_info); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":188 * def __get__(self): * return self.Get_info() * def __set__(self, info): # <<<<<<<<<<<<<< * self.Set_info(info) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.File.info.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":194 * # ---------- * * def Set_view(self, Offset disp=0, # <<<<<<<<<<<<<< * Datatype etype=None, Datatype filetype=None, * object datarep=None, Info info=INFO_NULL): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_29Set_view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_28Set_view[] = "File.Set_view(self, Offset disp=0, Datatype etype=None, Datatype filetype=None, datarep=None, Info info=INFO_NULL)\n\n Set the file view\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_29Set_view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_disp; struct PyMPIDatatypeObject *__pyx_v_etype = 0; struct PyMPIDatatypeObject *__pyx_v_filetype = 0; PyObject *__pyx_v_datarep = 0; struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_view (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_disp,&__pyx_n_s_etype,&__pyx_n_s_filetype,&__pyx_n_s_datarep,&__pyx_n_s_info,0}; PyObject* values[5] = {0,0,0,0,0}; /* "mpi4py/MPI/File.pyx":195 * * def Set_view(self, Offset disp=0, * Datatype etype=None, Datatype filetype=None, # <<<<<<<<<<<<<< * object datarep=None, Info info=INFO_NULL): * """ */ values[1] = (PyObject *)((struct PyMPIDatatypeObject *)Py_None); values[2] = (PyObject *)((struct PyMPIDatatypeObject *)Py_None); /* "mpi4py/MPI/File.pyx":196 * def Set_view(self, Offset disp=0, * Datatype etype=None, Datatype filetype=None, * object datarep=None, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Set the file view */ values[3] = ((PyObject *)Py_None); values[4] = (PyObject *)__pyx_k__123; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_disp); if (value) { values[0] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_etype); if (value) { values[1] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filetype); if (value) { values[2] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datarep); if (value) { values[3] = value; kw_args--; } } CYTHON_FALLTHROUGH; case 4: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_view") < 0)) __PYX_ERR(31, 194, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_disp = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_disp == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 194, __pyx_L3_error) } else { __pyx_v_disp = ((MPI_Offset)0); } __pyx_v_etype = ((struct PyMPIDatatypeObject *)values[1]); __pyx_v_filetype = ((struct PyMPIDatatypeObject *)values[2]); __pyx_v_datarep = values[3]; __pyx_v_info = ((struct PyMPIInfoObject *)values[4]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_view", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 194, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Set_view", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_etype), __pyx_ptype_6mpi4py_3MPI_Datatype, 1, "etype", 0))) __PYX_ERR(31, 195, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filetype), __pyx_ptype_6mpi4py_3MPI_Datatype, 1, "filetype", 0))) __PYX_ERR(31, 195, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(31, 196, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_28Set_view(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_disp, __pyx_v_etype, __pyx_v_filetype, __pyx_v_datarep, __pyx_v_info); /* "mpi4py/MPI/File.pyx":194 * # ---------- * * def Set_view(self, Offset disp=0, # <<<<<<<<<<<<<< * Datatype etype=None, Datatype filetype=None, * object datarep=None, Info info=INFO_NULL): */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_28Set_view(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_disp, struct PyMPIDatatypeObject *__pyx_v_etype, struct PyMPIDatatypeObject *__pyx_v_filetype, PyObject *__pyx_v_datarep, struct PyMPIInfoObject *__pyx_v_info) { char *__pyx_v_cdatarep; MPI_Datatype __pyx_v_cetype; MPI_Datatype __pyx_v_cftype; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; MPI_Datatype __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("Set_view", 0); __Pyx_INCREF(__pyx_v_datarep); /* "mpi4py/MPI/File.pyx":200 * Set the file view * """ * cdef char *cdatarep = b"native" # <<<<<<<<<<<<<< * if datarep is not None: datarep = asmpistr(datarep, &cdatarep) * cdef MPI_Datatype cetype = MPI_BYTE */ __pyx_v_cdatarep = ((char *)"native"); /* "mpi4py/MPI/File.pyx":201 * """ * cdef char *cdatarep = b"native" * if datarep is not None: datarep = asmpistr(datarep, &cdatarep) # <<<<<<<<<<<<<< * cdef MPI_Datatype cetype = MPI_BYTE * if etype is not None: cetype = etype.ob_mpi */ __pyx_t_1 = (__pyx_v_datarep != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_datarep, (&__pyx_v_cdatarep)); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_datarep, __pyx_t_3); __pyx_t_3 = 0; } /* "mpi4py/MPI/File.pyx":202 * cdef char *cdatarep = b"native" * if datarep is not None: datarep = asmpistr(datarep, &cdatarep) * cdef MPI_Datatype cetype = MPI_BYTE # <<<<<<<<<<<<<< * if etype is not None: cetype = etype.ob_mpi * cdef MPI_Datatype cftype = cetype */ __pyx_v_cetype = MPI_BYTE; /* "mpi4py/MPI/File.pyx":203 * if datarep is not None: datarep = asmpistr(datarep, &cdatarep) * cdef MPI_Datatype cetype = MPI_BYTE * if etype is not None: cetype = etype.ob_mpi # <<<<<<<<<<<<<< * cdef MPI_Datatype cftype = cetype * if filetype is not None: cftype = filetype.ob_mpi */ __pyx_t_2 = (((PyObject *)__pyx_v_etype) != Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_t_4 = __pyx_v_etype->ob_mpi; __pyx_v_cetype = __pyx_t_4; } /* "mpi4py/MPI/File.pyx":204 * cdef MPI_Datatype cetype = MPI_BYTE * if etype is not None: cetype = etype.ob_mpi * cdef MPI_Datatype cftype = cetype # <<<<<<<<<<<<<< * if filetype is not None: cftype = filetype.ob_mpi * with nogil: CHKERR( MPI_File_set_view( */ __pyx_v_cftype = __pyx_v_cetype; /* "mpi4py/MPI/File.pyx":205 * if etype is not None: cetype = etype.ob_mpi * cdef MPI_Datatype cftype = cetype * if filetype is not None: cftype = filetype.ob_mpi # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_set_view( * self.ob_mpi, disp, cetype, cftype, cdatarep, info.ob_mpi) ) */ __pyx_t_1 = (((PyObject *)__pyx_v_filetype) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_t_4 = __pyx_v_filetype->ob_mpi; __pyx_v_cftype = __pyx_t_4; } /* "mpi4py/MPI/File.pyx":206 * cdef MPI_Datatype cftype = cetype * if filetype is not None: cftype = filetype.ob_mpi * with nogil: CHKERR( MPI_File_set_view( # <<<<<<<<<<<<<< * self.ob_mpi, disp, cetype, cftype, cdatarep, info.ob_mpi) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":207 * if filetype is not None: cftype = filetype.ob_mpi * with nogil: CHKERR( MPI_File_set_view( * self.ob_mpi, disp, cetype, cftype, cdatarep, info.ob_mpi) ) # <<<<<<<<<<<<<< * * def Get_view(self): */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_set_view(__pyx_v_self->ob_mpi, __pyx_v_disp, __pyx_v_cetype, __pyx_v_cftype, __pyx_v_cdatarep, __pyx_v_info->ob_mpi)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(31, 206, __pyx_L7_error) } /* "mpi4py/MPI/File.pyx":206 * cdef MPI_Datatype cftype = cetype * if filetype is not None: cftype = filetype.ob_mpi * with nogil: CHKERR( MPI_File_set_view( # <<<<<<<<<<<<<< * self.ob_mpi, disp, cetype, cftype, cdatarep, info.ob_mpi) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L8; } __pyx_L7_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L8:; } } /* "mpi4py/MPI/File.pyx":194 * # ---------- * * def Set_view(self, Offset disp=0, # <<<<<<<<<<<<<< * Datatype etype=None, Datatype filetype=None, * object datarep=None, Info info=INFO_NULL): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.File.Set_view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_datarep); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":209 * self.ob_mpi, disp, cetype, cftype, cdatarep, info.ob_mpi) ) * * def Get_view(self): # <<<<<<<<<<<<<< * """ * Return the file view */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_31Get_view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_30Get_view[] = "File.Get_view(self)\n\n Return the file view\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_31Get_view(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_view (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_view", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_view", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_30Get_view(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_30Get_view(struct PyMPIFileObject *__pyx_v_self) { MPI_Offset __pyx_v_disp; struct PyMPIDatatypeObject *__pyx_v_etype = 0; struct PyMPIDatatypeObject *__pyx_v_ftype = 0; char __pyx_v_cdatarep[(MPI_MAX_DATAREP_STRING + 1)]; PyObject *__pyx_v_datarep = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_view", 0); /* "mpi4py/MPI/File.pyx":213 * Return the file view * """ * cdef MPI_Offset disp = 0 # <<<<<<<<<<<<<< * cdef Datatype etype = Datatype.__new__(Datatype) * cdef Datatype ftype = Datatype.__new__(Datatype) */ __pyx_v_disp = 0; /* "mpi4py/MPI/File.pyx":214 * """ * cdef MPI_Offset disp = 0 * cdef Datatype etype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * cdef Datatype ftype = Datatype.__new__(Datatype) * cdef char cdatarep[MPI_MAX_DATAREP_STRING+1] */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 214, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_etype = ((struct PyMPIDatatypeObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":215 * cdef MPI_Offset disp = 0 * cdef Datatype etype = Datatype.__new__(Datatype) * cdef Datatype ftype = Datatype.__new__(Datatype) # <<<<<<<<<<<<<< * cdef char cdatarep[MPI_MAX_DATAREP_STRING+1] * with nogil: CHKERR( MPI_File_get_view( */ __pyx_t_2 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Datatype(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Datatype), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 215, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = ((PyObject *)__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_ftype = ((struct PyMPIDatatypeObject *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":217 * cdef Datatype ftype = Datatype.__new__(Datatype) * cdef char cdatarep[MPI_MAX_DATAREP_STRING+1] * with nogil: CHKERR( MPI_File_get_view( # <<<<<<<<<<<<<< * self.ob_mpi, &disp, &etype.ob_mpi, &ftype.ob_mpi, cdatarep) ) * #if builtin_Datatype(etype.ob_mpi): etype.flags = 0 */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":218 * cdef char cdatarep[MPI_MAX_DATAREP_STRING+1] * with nogil: CHKERR( MPI_File_get_view( * self.ob_mpi, &disp, &etype.ob_mpi, &ftype.ob_mpi, cdatarep) ) # <<<<<<<<<<<<<< * #if builtin_Datatype(etype.ob_mpi): etype.flags = 0 * #if builtin_Datatype(ftype.ob_mpi): ftype.flags = 0 */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_view(__pyx_v_self->ob_mpi, (&__pyx_v_disp), (&__pyx_v_etype->ob_mpi), (&__pyx_v_ftype->ob_mpi), __pyx_v_cdatarep)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 217, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":217 * cdef Datatype ftype = Datatype.__new__(Datatype) * cdef char cdatarep[MPI_MAX_DATAREP_STRING+1] * with nogil: CHKERR( MPI_File_get_view( # <<<<<<<<<<<<<< * self.ob_mpi, &disp, &etype.ob_mpi, &ftype.ob_mpi, cdatarep) ) * #if builtin_Datatype(etype.ob_mpi): etype.flags = 0 */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":221 * #if builtin_Datatype(etype.ob_mpi): etype.flags = 0 * #if builtin_Datatype(ftype.ob_mpi): ftype.flags = 0 * cdatarep[MPI_MAX_DATAREP_STRING] = 0 # just in case # <<<<<<<<<<<<<< * cdef object datarep = mpistr(cdatarep) * return (disp, etype, ftype, datarep) */ (__pyx_v_cdatarep[MPI_MAX_DATAREP_STRING]) = 0; /* "mpi4py/MPI/File.pyx":222 * #if builtin_Datatype(ftype.ob_mpi): ftype.flags = 0 * cdatarep[MPI_MAX_DATAREP_STRING] = 0 # just in case * cdef object datarep = mpistr(cdatarep) # <<<<<<<<<<<<<< * return (disp, etype, ftype, datarep) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_mpistr(__pyx_v_cdatarep); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_datarep = __pyx_t_1; __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":223 * cdatarep[MPI_MAX_DATAREP_STRING] = 0 # just in case * cdef object datarep = mpistr(cdatarep) * return (disp, etype, ftype, datarep) # <<<<<<<<<<<<<< * * # Data Access */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Offset(__pyx_v_disp); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_etype)); __Pyx_GIVEREF(((PyObject *)__pyx_v_etype)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_etype)); __Pyx_INCREF(((PyObject *)__pyx_v_ftype)); __Pyx_GIVEREF(((PyObject *)__pyx_v_ftype)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_v_ftype)); __Pyx_INCREF(__pyx_v_datarep); __Pyx_GIVEREF(__pyx_v_datarep); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_datarep); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":209 * self.ob_mpi, disp, cetype, cftype, cdatarep, info.ob_mpi) ) * * def Get_view(self): # <<<<<<<<<<<<<< * """ * Return the file view */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_view", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_etype); __Pyx_XDECREF((PyObject *)__pyx_v_ftype); __Pyx_XDECREF(__pyx_v_datarep); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":231 * # --------------------------------- * * def Read_at(self, Offset offset, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Read using explicit offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_33Read_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_32Read_at[] = "File.Read_at(self, Offset offset, buf, Status status=None)\n\n Read using explicit offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_33Read_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_at (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Read_at", 0, 2, 3, 1); __PYX_ERR(31, 231, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_at") < 0)) __PYX_ERR(31, 231, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 231, __pyx_L3_error) __pyx_v_buf = values[1]; __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_at", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 231, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 231, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_32Read_at(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_32Read_at(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_at", 0); /* "mpi4py/MPI/File.pyx":235 * Read using explicit offset * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":236 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":237 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":238 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Read_at_all(self, Offset offset, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_at(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 237, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":237 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":231 * # --------------------------------- * * def Read_at(self, Offset offset, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Read using explicit offset */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":240 * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * * def Read_at_all(self, Offset offset, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective read using explicit offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_35Read_at_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_34Read_at_all[] = "File.Read_at_all(self, Offset offset, buf, Status status=None)\n\n Collective read using explicit offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_35Read_at_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_at_all (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Read_at_all", 0, 2, 3, 1); __PYX_ERR(31, 240, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_at_all") < 0)) __PYX_ERR(31, 240, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 240, __pyx_L3_error) __pyx_v_buf = values[1]; __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_at_all", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 240, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_at_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 240, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_34Read_at_all(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_34Read_at_all(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_at_all", 0); /* "mpi4py/MPI/File.pyx":244 * Collective read using explicit offset * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at_all( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":245 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":246 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at_all( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":247 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Write_at(self, Offset offset, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_at_all(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 246, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":246 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at_all( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":240 * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * * def Read_at_all(self, Offset offset, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective read using explicit offset */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_at_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":249 * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * * def Write_at(self, Offset offset, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Write using explicit offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_37Write_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_36Write_at[] = "File.Write_at(self, Offset offset, buf, Status status=None)\n\n Write using explicit offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_37Write_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_at (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Write_at", 0, 2, 3, 1); __PYX_ERR(31, 249, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_at") < 0)) __PYX_ERR(31, 249, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 249, __pyx_L3_error) __pyx_v_buf = values[1]; __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_at", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 249, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 249, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_36Write_at(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_36Write_at(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_at", 0); /* "mpi4py/MPI/File.pyx":253 * Write using explicit offset * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":254 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":255 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":256 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Write_at_all(self, Offset offset, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_at(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 255, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":255 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":249 * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * * def Write_at(self, Offset offset, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Write using explicit offset */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":258 * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * * def Write_at_all(self, Offset offset, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective write using explicit offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_39Write_at_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_38Write_at_all[] = "File.Write_at_all(self, Offset offset, buf, Status status=None)\n\n Collective write using explicit offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_39Write_at_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_at_all (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[3] = {0,0,0}; values[2] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Write_at_all", 0, 2, 3, 1); __PYX_ERR(31, 258, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_at_all") < 0)) __PYX_ERR(31, 258, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 258, __pyx_L3_error) __pyx_v_buf = values[1]; __pyx_v_status = ((struct PyMPIStatusObject *)values[2]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_at_all", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 258, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_at_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 258, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_38Write_at_all(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_38Write_at_all(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_at_all", 0); /* "mpi4py/MPI/File.pyx":262 * Collective write using explicit offset * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at_all( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":263 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":264 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at_all( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":265 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Iread_at(self, Offset offset, buf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_at_all(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 264, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":264 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at_all( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":258 * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * * def Write_at_all(self, Offset offset, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective write using explicit offset */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_at_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":267 * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * * def Iread_at(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Nonblocking read using explicit offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_41Iread_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_40Iread_at[] = "File.Iread_at(self, Offset offset, buf)\n\n Nonblocking read using explicit offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_41Iread_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iread_at (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iread_at", 1, 2, 2, 1); __PYX_ERR(31, 267, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iread_at") < 0)) __PYX_ERR(31, 267, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 267, __pyx_L3_error) __pyx_v_buf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iread_at", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 267, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iread_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_40Iread_at(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_40Iread_at(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iread_at", 0); /* "mpi4py/MPI/File.pyx":271 * Nonblocking read using explicit offset * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_at( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":272 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iread_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 272, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":273 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_at( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":274 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iread_at(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 273, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":273 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_at( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":275 * with nogil: CHKERR( MPI_File_iread_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":276 * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iread_at_all(self, Offset offset, buf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":267 * self.ob_mpi, offset, m.buf, m.count, m.dtype, statusp) ) * * def Iread_at(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Nonblocking read using explicit offset */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iread_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":278 * return request * * def Iread_at_all(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Nonblocking collective read using explicit offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_43Iread_at_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_42Iread_at_all[] = "File.Iread_at_all(self, Offset offset, buf)\n\n Nonblocking collective read using explicit offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_43Iread_at_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iread_at_all (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iread_at_all", 1, 2, 2, 1); __PYX_ERR(31, 278, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iread_at_all") < 0)) __PYX_ERR(31, 278, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 278, __pyx_L3_error) __pyx_v_buf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iread_at_all", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 278, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iread_at_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_42Iread_at_all(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_42Iread_at_all(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iread_at_all", 0); /* "mpi4py/MPI/File.pyx":282 * Nonblocking collective read using explicit offset * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_at_all( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":283 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iread_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 283, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":284 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_at_all( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":285 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iread_at_all(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 284, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":284 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_at_all( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":286 * with nogil: CHKERR( MPI_File_iread_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":287 * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iwrite_at(self, Offset offset, buf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":278 * return request * * def Iread_at_all(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Nonblocking collective read using explicit offset */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iread_at_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":289 * return request * * def Iwrite_at(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Nonblocking write using explicit offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_45Iwrite_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_44Iwrite_at[] = "File.Iwrite_at(self, Offset offset, buf)\n\n Nonblocking write using explicit offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_45Iwrite_at(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iwrite_at (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iwrite_at", 1, 2, 2, 1); __PYX_ERR(31, 289, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iwrite_at") < 0)) __PYX_ERR(31, 289, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 289, __pyx_L3_error) __pyx_v_buf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iwrite_at", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 289, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_44Iwrite_at(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_44Iwrite_at(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iwrite_at", 0); /* "mpi4py/MPI/File.pyx":293 * Nonblocking write using explicit offset * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_at( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":294 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iwrite_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 294, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":295 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_at( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":296 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iwrite_at(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 295, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":295 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_at( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":297 * with nogil: CHKERR( MPI_File_iwrite_at( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":298 * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iwrite_at_all(self, Offset offset, buf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":289 * return request * * def Iwrite_at(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Nonblocking write using explicit offset */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite_at", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":300 * return request * * def Iwrite_at_all(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Nonblocking collective write using explicit offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_47Iwrite_at_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_46Iwrite_at_all[] = "File.Iwrite_at_all(self, Offset offset, buf)\n\n Nonblocking collective write using explicit offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_47Iwrite_at_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iwrite_at_all (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Iwrite_at_all", 1, 2, 2, 1); __PYX_ERR(31, 300, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iwrite_at_all") < 0)) __PYX_ERR(31, 300, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 300, __pyx_L3_error) __pyx_v_buf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iwrite_at_all", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 300, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite_at_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_46Iwrite_at_all(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_46Iwrite_at_all(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iwrite_at_all", 0); /* "mpi4py/MPI/File.pyx":304 * Nonblocking collective write using explicit offset * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_at_all( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":305 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iwrite_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 305, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":306 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_at_all( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":307 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iwrite_at_all(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 306, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":306 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_at_all( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":308 * with nogil: CHKERR( MPI_File_iwrite_at_all( * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":309 * self.ob_mpi, offset, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * # Data Access with Individual File Pointers */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":300 * return request * * def Iwrite_at_all(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Nonblocking collective write using explicit offset */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite_at_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":314 * # ----------------------------------------- * * def Read(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Read using individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_49Read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_48Read[] = "File.Read(self, buf, Status status=None)\n\n Read using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_49Read(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read") < 0)) __PYX_ERR(31, 314, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 314, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 314, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_48Read(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_48Read(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read", 0); /* "mpi4py/MPI/File.pyx":318 * Read using individual file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":319 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":320 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":321 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Read_all(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 320, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":320 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":314 * # ----------------------------------------- * * def Read(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Read using individual file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":323 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Read_all(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective read using individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_51Read_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_50Read_all[] = "File.Read_all(self, buf, Status status=None)\n\n Collective read using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_51Read_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_all (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_all") < 0)) __PYX_ERR(31, 323, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_all", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 323, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 323, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_50Read_all(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_50Read_all(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_all", 0); /* "mpi4py/MPI/File.pyx":327 * Collective read using individual file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_all( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":328 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_all( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":329 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_all( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":330 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_all( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Write(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_all(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 329, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":329 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_all( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":323 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Read_all(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective read using individual file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":332 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Write(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Write using individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_53Write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_52Write[] = "File.Write(self, buf, Status status=None)\n\n Write using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_53Write(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write") < 0)) __PYX_ERR(31, 332, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 332, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 332, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_52Write(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_52Write(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write", 0); /* "mpi4py/MPI/File.pyx":336 * Write using individual file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":337 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":338 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":339 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Write_all(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 338, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":338 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":332 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Write(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Write using individual file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":341 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Write_all(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective write using individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_55Write_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_54Write_all[] = "File.Write_all(self, buf, Status status=None)\n\n Collective write using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_55Write_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_all (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_all") < 0)) __PYX_ERR(31, 341, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_all", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 341, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 341, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_54Write_all(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_54Write_all(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_all", 0); /* "mpi4py/MPI/File.pyx":345 * Collective write using individual file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_all( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":346 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_all( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":347 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_all( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":348 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_all( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Iread(self, buf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_all(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 347, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":347 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_all( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":341 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Write_all(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective write using individual file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":350 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Iread(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking read using individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_57Iread(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_56Iread[] = "File.Iread(self, buf)\n\n Nonblocking read using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_57Iread(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iread (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iread") < 0)) __PYX_ERR(31, 350, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iread", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 350, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iread", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_56Iread(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_56Iread(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iread", 0); /* "mpi4py/MPI/File.pyx":354 * Nonblocking read using individual file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":355 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iread( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 355, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":356 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":357 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iread(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 356, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":356 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":358 * with nogil: CHKERR( MPI_File_iread( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":359 * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iread_all(self, buf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":350 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Iread(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking read using individual file pointer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iread", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":361 * return request * * def Iread_all(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking collective read using individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_59Iread_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_58Iread_all[] = "File.Iread_all(self, buf)\n\n Nonblocking collective read using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_59Iread_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iread_all (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iread_all") < 0)) __PYX_ERR(31, 361, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iread_all", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 361, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iread_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_58Iread_all(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_58Iread_all(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iread_all", 0); /* "mpi4py/MPI/File.pyx":365 * Nonblocking collective read using individual file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_all( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":366 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iread_all( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 366, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":367 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_all( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":368 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_all( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iread_all(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 367, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":367 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_all( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":369 * with nogil: CHKERR( MPI_File_iread_all( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":370 * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iwrite(self, buf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":361 * return request * * def Iread_all(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking collective read using individual file pointer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iread_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":372 * return request * * def Iwrite(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking write using individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_61Iwrite(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_60Iwrite[] = "File.Iwrite(self, buf)\n\n Nonblocking write using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_61Iwrite(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iwrite (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iwrite") < 0)) __PYX_ERR(31, 372, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iwrite", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 372, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_60Iwrite(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_60Iwrite(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iwrite", 0); /* "mpi4py/MPI/File.pyx":376 * Nonblocking write using individual file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":377 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iwrite( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 377, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":378 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":379 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iwrite(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 378, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":378 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":380 * with nogil: CHKERR( MPI_File_iwrite( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":381 * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iwrite_all(self, buf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":372 * return request * * def Iwrite(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking write using individual file pointer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":383 * return request * * def Iwrite_all(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking collective write using individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_63Iwrite_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_62Iwrite_all[] = "File.Iwrite_all(self, buf)\n\n Nonblocking collective write using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_63Iwrite_all(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iwrite_all (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iwrite_all") < 0)) __PYX_ERR(31, 383, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iwrite_all", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 383, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_62Iwrite_all(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_62Iwrite_all(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iwrite_all", 0); /* "mpi4py/MPI/File.pyx":387 * Nonblocking collective write using individual file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_all( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":388 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iwrite_all( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 388, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":389 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_all( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":390 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_all( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iwrite_all(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 389, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":389 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_all( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":391 * with nogil: CHKERR( MPI_File_iwrite_all( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":392 * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Seek(self, Offset offset, int whence=SEEK_SET): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":383 * return request * * def Iwrite_all(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking collective write using individual file pointer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":394 * return request * * def Seek(self, Offset offset, int whence=SEEK_SET): # <<<<<<<<<<<<<< * """ * Update the individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_65Seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_64Seek[] = "File.Seek(self, Offset offset, int whence=SEEK_SET)\n\n Update the individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_65Seek(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; int __pyx_v_whence; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Seek (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_whence,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_whence); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Seek") < 0)) __PYX_ERR(31, 394, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 394, __pyx_L3_error) if (values[1]) { __pyx_v_whence = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_whence == (int)-1) && PyErr_Occurred())) __PYX_ERR(31, 394, __pyx_L3_error) } else { __pyx_v_whence = __pyx_k__124; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Seek", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 394, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Seek", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_64Seek(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_whence); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_64Seek(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, int __pyx_v_whence) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Seek", 0); /* "mpi4py/MPI/File.pyx":398 * Update the individual file pointer * """ * with nogil: CHKERR( MPI_File_seek(self.ob_mpi, offset, whence) ) # <<<<<<<<<<<<<< * * def Get_position(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_seek(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_whence)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 398, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":394 * return request * * def Seek(self, Offset offset, int whence=SEEK_SET): # <<<<<<<<<<<<<< * """ * Update the individual file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Seek", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":400 * with nogil: CHKERR( MPI_File_seek(self.ob_mpi, offset, whence) ) * * def Get_position(self): # <<<<<<<<<<<<<< * """ * Return the current position of the individual file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_67Get_position(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_66Get_position[] = "File.Get_position(self)\n\n Return the current position of the individual file pointer\n in etype units relative to the current view\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_67Get_position(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_position (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_position", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_position", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_66Get_position(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_66Get_position(struct PyMPIFileObject *__pyx_v_self) { MPI_Offset __pyx_v_offset; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_position", 0); /* "mpi4py/MPI/File.pyx":405 * in etype units relative to the current view * """ * cdef MPI_Offset offset = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_get_position(self.ob_mpi, &offset) ) * return offset */ __pyx_v_offset = 0; /* "mpi4py/MPI/File.pyx":406 * """ * cdef MPI_Offset offset = 0 * with nogil: CHKERR( MPI_File_get_position(self.ob_mpi, &offset) ) # <<<<<<<<<<<<<< * return offset * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_position(__pyx_v_self->ob_mpi, (&__pyx_v_offset))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 406, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":407 * cdef MPI_Offset offset = 0 * with nogil: CHKERR( MPI_File_get_position(self.ob_mpi, &offset) ) * return offset # <<<<<<<<<<<<<< * * def Get_byte_offset(self, Offset offset): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Offset(__pyx_v_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":400 * with nogil: CHKERR( MPI_File_seek(self.ob_mpi, offset, whence) ) * * def Get_position(self): # <<<<<<<<<<<<<< * """ * Return the current position of the individual file pointer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_position", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":409 * return offset * * def Get_byte_offset(self, Offset offset): # <<<<<<<<<<<<<< * """ * Returns the absolute byte position in the file corresponding */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_69Get_byte_offset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_68Get_byte_offset[] = "File.Get_byte_offset(self, Offset offset)\n\n Returns the absolute byte position in the file corresponding\n to 'offset' etypes relative to the current view\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_69Get_byte_offset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_byte_offset (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_byte_offset") < 0)) __PYX_ERR(31, 409, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 409, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_byte_offset", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 409, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Get_byte_offset", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_68Get_byte_offset(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_68Get_byte_offset(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset) { MPI_Offset __pyx_v_disp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_byte_offset", 0); /* "mpi4py/MPI/File.pyx":414 * to 'offset' etypes relative to the current view * """ * cdef MPI_Offset disp = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_get_byte_offset( * self.ob_mpi, offset, &disp) ) */ __pyx_v_disp = 0; /* "mpi4py/MPI/File.pyx":415 * """ * cdef MPI_Offset disp = 0 * with nogil: CHKERR( MPI_File_get_byte_offset( # <<<<<<<<<<<<<< * self.ob_mpi, offset, &disp) ) * return disp */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":416 * cdef MPI_Offset disp = 0 * with nogil: CHKERR( MPI_File_get_byte_offset( * self.ob_mpi, offset, &disp) ) # <<<<<<<<<<<<<< * return disp * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_byte_offset(__pyx_v_self->ob_mpi, __pyx_v_offset, (&__pyx_v_disp))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 415, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":415 * """ * cdef MPI_Offset disp = 0 * with nogil: CHKERR( MPI_File_get_byte_offset( # <<<<<<<<<<<<<< * self.ob_mpi, offset, &disp) ) * return disp */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":417 * with nogil: CHKERR( MPI_File_get_byte_offset( * self.ob_mpi, offset, &disp) ) * return disp # <<<<<<<<<<<<<< * * # Data Access with Shared File Pointers */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Offset(__pyx_v_disp); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":409 * return offset * * def Get_byte_offset(self, Offset offset): # <<<<<<<<<<<<<< * """ * Returns the absolute byte position in the file corresponding */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_byte_offset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":422 * # ------------------------------------- * * def Read_shared(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Read using shared file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_71Read_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_70Read_shared[] = "File.Read_shared(self, buf, Status status=None)\n\n Read using shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_71Read_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_shared (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_shared") < 0)) __PYX_ERR(31, 422, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_shared", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 422, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 422, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_70Read_shared(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_70Read_shared(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_shared", 0); /* "mpi4py/MPI/File.pyx":426 * Read using shared file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_shared( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":427 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_shared( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":428 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_shared( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":429 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_shared( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Write_shared(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_shared(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 428, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":428 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_shared( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":422 * # ------------------------------------- * * def Read_shared(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Read using shared file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":431 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Write_shared(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Write using shared file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_73Write_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_72Write_shared[] = "File.Write_shared(self, buf, Status status=None)\n\n Write using shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_73Write_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_shared (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_shared") < 0)) __PYX_ERR(31, 431, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_shared", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 431, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 431, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_72Write_shared(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_72Write_shared(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_shared", 0); /* "mpi4py/MPI/File.pyx":435 * Write using shared file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_shared( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":436 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_shared( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":437 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_shared( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":438 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_shared( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Iread_shared(self, buf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_shared(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 437, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":437 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_shared( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":431 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Write_shared(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Write using shared file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":440 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Iread_shared(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking read using shared file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_75Iread_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_74Iread_shared[] = "File.Iread_shared(self, buf)\n\n Nonblocking read using shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_75Iread_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iread_shared (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iread_shared") < 0)) __PYX_ERR(31, 440, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iread_shared", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 440, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iread_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_74Iread_shared(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_74Iread_shared(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iread_shared", 0); /* "mpi4py/MPI/File.pyx":444 * Nonblocking read using shared file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_shared( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":445 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iread_shared( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 445, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":446 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_shared( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":447 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_shared( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iread_shared(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 446, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":446 * cdef _p_msg_io m = message_io_read(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iread_shared( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":448 * with nogil: CHKERR( MPI_File_iread_shared( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":449 * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Iwrite_shared(self, buf): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":440 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Iread_shared(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking read using shared file pointer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iread_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":451 * return request * * def Iwrite_shared(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking write using shared file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_77Iwrite_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_76Iwrite_shared[] = "File.Iwrite_shared(self, buf)\n\n Nonblocking write using shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_77Iwrite_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Iwrite_shared (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Iwrite_shared") < 0)) __PYX_ERR(31, 451, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Iwrite_shared", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 451, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_76Iwrite_shared(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_76Iwrite_shared(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; struct PyMPIRequestObject *__pyx_v_request = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Iwrite_shared", 0); /* "mpi4py/MPI/File.pyx":455 * Nonblocking write using shared file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_shared( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":456 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_iwrite_shared( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Request(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Request), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 456, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_request = ((struct PyMPIRequestObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":457 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_shared( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":458 * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_shared( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) # <<<<<<<<<<<<<< * request.ob_buf = m * return request */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_iwrite_shared(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, (&__pyx_v_request->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 457, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":457 * cdef _p_msg_io m = message_io_write(buf) * cdef Request request = Request.__new__(Request) * with nogil: CHKERR( MPI_File_iwrite_shared( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":459 * with nogil: CHKERR( MPI_File_iwrite_shared( * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m # <<<<<<<<<<<<<< * return request * */ __Pyx_INCREF(((PyObject *)__pyx_v_m)); __Pyx_GIVEREF(((PyObject *)__pyx_v_m)); __Pyx_GOTREF(__pyx_v_request->ob_buf); __Pyx_DECREF(__pyx_v_request->ob_buf); __pyx_v_request->ob_buf = ((PyObject *)__pyx_v_m); /* "mpi4py/MPI/File.pyx":460 * self.ob_mpi, m.buf, m.count, m.dtype, &request.ob_mpi) ) * request.ob_buf = m * return request # <<<<<<<<<<<<<< * * def Read_ordered(self, buf, Status status=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_request)); __pyx_r = ((PyObject *)__pyx_v_request); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":451 * return request * * def Iwrite_shared(self, buf): # <<<<<<<<<<<<<< * """ * Nonblocking write using shared file pointer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Iwrite_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XDECREF((PyObject *)__pyx_v_request); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":462 * return request * * def Read_ordered(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective read using shared file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_79Read_ordered(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_78Read_ordered[] = "File.Read_ordered(self, buf, Status status=None)\n\n Collective read using shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_79Read_ordered(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_ordered (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_ordered") < 0)) __PYX_ERR(31, 462, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_ordered", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 462, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_ordered", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 462, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_78Read_ordered(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_78Read_ordered(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_ordered", 0); /* "mpi4py/MPI/File.pyx":466 * Collective read using shared file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_ordered( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":467 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_ordered( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":468 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_ordered( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":469 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_ordered( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Write_ordered(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_ordered(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 468, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":468 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_ordered( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":462 * return request * * def Read_ordered(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective read using shared file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_ordered", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":471 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Write_ordered(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective write using shared file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_81Write_ordered(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_80Write_ordered[] = "File.Write_ordered(self, buf, Status status=None)\n\n Collective write using shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_81Write_ordered(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_ordered (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_ordered") < 0)) __PYX_ERR(31, 471, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_ordered", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 471, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_ordered", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 471, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_80Write_ordered(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_80Write_ordered(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_ordered", 0); /* "mpi4py/MPI/File.pyx":475 * Collective write using shared file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_ordered( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":476 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_ordered( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":477 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_ordered( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":478 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_ordered( * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) # <<<<<<<<<<<<<< * * def Seek_shared(self, Offset offset, int whence=SEEK_SET): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_ordered(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 477, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":477 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_ordered( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":471 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Write_ordered(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Collective write using shared file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_ordered", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":480 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Seek_shared(self, Offset offset, int whence=SEEK_SET): # <<<<<<<<<<<<<< * """ * Update the shared file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_83Seek_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_82Seek_shared[] = "File.Seek_shared(self, Offset offset, int whence=SEEK_SET)\n\n Update the shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_83Seek_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; int __pyx_v_whence; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Seek_shared (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_whence,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_whence); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Seek_shared") < 0)) __PYX_ERR(31, 480, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 480, __pyx_L3_error) if (values[1]) { __pyx_v_whence = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_whence == (int)-1) && PyErr_Occurred())) __PYX_ERR(31, 480, __pyx_L3_error) } else { __pyx_v_whence = __pyx_k__125; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Seek_shared", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 480, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Seek_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_82Seek_shared(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_whence); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_82Seek_shared(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, int __pyx_v_whence) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Seek_shared", 0); /* "mpi4py/MPI/File.pyx":484 * Update the shared file pointer * """ * with nogil: CHKERR( MPI_File_seek_shared( # <<<<<<<<<<<<<< * self.ob_mpi, offset, whence) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":485 * """ * with nogil: CHKERR( MPI_File_seek_shared( * self.ob_mpi, offset, whence) ) # <<<<<<<<<<<<<< * * def Get_position_shared(self): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_seek_shared(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_whence)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 484, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":484 * Update the shared file pointer * """ * with nogil: CHKERR( MPI_File_seek_shared( # <<<<<<<<<<<<<< * self.ob_mpi, offset, whence) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":480 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Seek_shared(self, Offset offset, int whence=SEEK_SET): # <<<<<<<<<<<<<< * """ * Update the shared file pointer */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Seek_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":487 * self.ob_mpi, offset, whence) ) * * def Get_position_shared(self): # <<<<<<<<<<<<<< * """ * Return the current position of the shared file pointer */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_85Get_position_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_84Get_position_shared[] = "File.Get_position_shared(self)\n\n Return the current position of the shared file pointer\n in etype units relative to the current view\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_85Get_position_shared(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_position_shared (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_position_shared", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_position_shared", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_84Get_position_shared(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_84Get_position_shared(struct PyMPIFileObject *__pyx_v_self) { MPI_Offset __pyx_v_offset; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_position_shared", 0); /* "mpi4py/MPI/File.pyx":492 * in etype units relative to the current view * """ * cdef MPI_Offset offset = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_get_position_shared( * self.ob_mpi, &offset) ) */ __pyx_v_offset = 0; /* "mpi4py/MPI/File.pyx":493 * """ * cdef MPI_Offset offset = 0 * with nogil: CHKERR( MPI_File_get_position_shared( # <<<<<<<<<<<<<< * self.ob_mpi, &offset) ) * return offset */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":494 * cdef MPI_Offset offset = 0 * with nogil: CHKERR( MPI_File_get_position_shared( * self.ob_mpi, &offset) ) # <<<<<<<<<<<<<< * return offset * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_position_shared(__pyx_v_self->ob_mpi, (&__pyx_v_offset))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 493, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":493 * """ * cdef MPI_Offset offset = 0 * with nogil: CHKERR( MPI_File_get_position_shared( # <<<<<<<<<<<<<< * self.ob_mpi, &offset) ) * return offset */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":495 * with nogil: CHKERR( MPI_File_get_position_shared( * self.ob_mpi, &offset) ) * return offset # <<<<<<<<<<<<<< * * # Split Collective Data Access Routines */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Offset(__pyx_v_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":487 * self.ob_mpi, offset, whence) ) * * def Get_position_shared(self): # <<<<<<<<<<<<<< * """ * Return the current position of the shared file pointer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_position_shared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":502 * # explicit offset * * def Read_at_all_begin(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Start a split collective read using explict offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_87Read_at_all_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_86Read_at_all_begin[] = "File.Read_at_all_begin(self, Offset offset, buf)\n\n Start a split collective read using explict offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_87Read_at_all_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_at_all_begin (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Read_at_all_begin", 1, 2, 2, 1); __PYX_ERR(31, 502, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_at_all_begin") < 0)) __PYX_ERR(31, 502, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 502, __pyx_L3_error) __pyx_v_buf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_at_all_begin", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 502, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_at_all_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_86Read_at_all_begin(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_86Read_at_all_begin(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_at_all_begin", 0); /* "mpi4py/MPI/File.pyx":506 * Start a split collective read using explict offset * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_at_all_begin( * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":507 * """ * cdef _p_msg_io m = message_io_read(buf) * with nogil: CHKERR( MPI_File_read_at_all_begin( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":508 * cdef _p_msg_io m = message_io_read(buf) * with nogil: CHKERR( MPI_File_read_at_all_begin( * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) # <<<<<<<<<<<<<< * * def Read_at_all_end(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_at_all_begin(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 507, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":507 * """ * cdef _p_msg_io m = message_io_read(buf) * with nogil: CHKERR( MPI_File_read_at_all_begin( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":502 * # explicit offset * * def Read_at_all_begin(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Start a split collective read using explict offset */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_at_all_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":510 * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) * * def Read_at_all_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective read using explict offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_89Read_at_all_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_88Read_at_all_end[] = "File.Read_at_all_end(self, buf, Status status=None)\n\n Complete a split collective read using explict offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_89Read_at_all_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_at_all_end (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_at_all_end") < 0)) __PYX_ERR(31, 510, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_at_all_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 510, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_at_all_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 510, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_88Read_at_all_end(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_88Read_at_all_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_at_all_end", 0); /* "mpi4py/MPI/File.pyx":514 * Complete a split collective read using explict offset * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at_all_end( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":515 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_at_all_end( * self.ob_mpi, m.buf, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":516 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at_all_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":517 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at_all_end( * self.ob_mpi, m.buf, statusp) ) # <<<<<<<<<<<<<< * * def Write_at_all_begin(self, Offset offset, buf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_at_all_end(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 516, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":516 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_at_all_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":510 * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) * * def Read_at_all_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective read using explict offset */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_at_all_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":519 * self.ob_mpi, m.buf, statusp) ) * * def Write_at_all_begin(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Start a split collective write using explict offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_91Write_at_all_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_90Write_at_all_begin[] = "File.Write_at_all_begin(self, Offset offset, buf)\n\n Start a split collective write using explict offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_91Write_at_all_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Offset __pyx_v_offset; PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_at_all_begin (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_buf,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Write_at_all_begin", 1, 2, 2, 1); __PYX_ERR(31, 519, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_at_all_begin") < 0)) __PYX_ERR(31, 519, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_offset = __Pyx_PyInt_As_MPI_Offset(values[0]); if (unlikely((__pyx_v_offset == ((MPI_Offset)-1)) && PyErr_Occurred())) __PYX_ERR(31, 519, __pyx_L3_error) __pyx_v_buf = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_at_all_begin", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 519, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_at_all_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_90Write_at_all_begin(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_offset, __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_90Write_at_all_begin(struct PyMPIFileObject *__pyx_v_self, MPI_Offset __pyx_v_offset, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_at_all_begin", 0); /* "mpi4py/MPI/File.pyx":523 * Start a split collective write using explict offset * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_at_all_begin( * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":524 * """ * cdef _p_msg_io m = message_io_write(buf) * with nogil: CHKERR( MPI_File_write_at_all_begin( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":525 * cdef _p_msg_io m = message_io_write(buf) * with nogil: CHKERR( MPI_File_write_at_all_begin( * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) # <<<<<<<<<<<<<< * * def Write_at_all_end(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_at_all_begin(__pyx_v_self->ob_mpi, __pyx_v_offset, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 524, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":524 * """ * cdef _p_msg_io m = message_io_write(buf) * with nogil: CHKERR( MPI_File_write_at_all_begin( # <<<<<<<<<<<<<< * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":519 * self.ob_mpi, m.buf, statusp) ) * * def Write_at_all_begin(self, Offset offset, buf): # <<<<<<<<<<<<<< * """ * Start a split collective write using explict offset */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_at_all_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":527 * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) * * def Write_at_all_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective write using explict offset */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_93Write_at_all_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_92Write_at_all_end[] = "File.Write_at_all_end(self, buf, Status status=None)\n\n Complete a split collective write using explict offset\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_93Write_at_all_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_at_all_end (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_at_all_end") < 0)) __PYX_ERR(31, 527, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_at_all_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 527, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_at_all_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 527, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_92Write_at_all_end(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_92Write_at_all_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_at_all_end", 0); /* "mpi4py/MPI/File.pyx":531 * Complete a split collective write using explict offset * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at_all_end( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":532 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_at_all_end( * self.ob_mpi, m.buf, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":533 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at_all_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":534 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at_all_end( * self.ob_mpi, m.buf, statusp) ) # <<<<<<<<<<<<<< * * # individual file pointer */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_at_all_end(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 533, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":533 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_at_all_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":527 * self.ob_mpi, offset, m.buf, m.count, m.dtype) ) * * def Write_at_all_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective write using explict offset */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_at_all_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":538 * # individual file pointer * * def Read_all_begin(self, buf): # <<<<<<<<<<<<<< * """ * Start a split collective read */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_95Read_all_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_94Read_all_begin[] = "File.Read_all_begin(self, buf)\n\n Start a split collective read\n using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_95Read_all_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_all_begin (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_all_begin") < 0)) __PYX_ERR(31, 538, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_all_begin", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 538, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_all_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_94Read_all_begin(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_94Read_all_begin(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_all_begin", 0); /* "mpi4py/MPI/File.pyx":543 * using individual file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_all_begin( * self.ob_mpi, m.buf, m.count, m.dtype) ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":544 * """ * cdef _p_msg_io m = message_io_read(buf) * with nogil: CHKERR( MPI_File_read_all_begin( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":545 * cdef _p_msg_io m = message_io_read(buf) * with nogil: CHKERR( MPI_File_read_all_begin( * self.ob_mpi, m.buf, m.count, m.dtype) ) # <<<<<<<<<<<<<< * * def Read_all_end(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_all_begin(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 544, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":544 * """ * cdef _p_msg_io m = message_io_read(buf) * with nogil: CHKERR( MPI_File_read_all_begin( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":538 * # individual file pointer * * def Read_all_begin(self, buf): # <<<<<<<<<<<<<< * """ * Start a split collective read */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_all_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":547 * self.ob_mpi, m.buf, m.count, m.dtype) ) * * def Read_all_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective read */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_97Read_all_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_96Read_all_end[] = "File.Read_all_end(self, buf, Status status=None)\n\n Complete a split collective read\n using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_97Read_all_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_all_end (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_all_end") < 0)) __PYX_ERR(31, 547, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_all_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 547, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_all_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 547, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_96Read_all_end(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_96Read_all_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_all_end", 0); /* "mpi4py/MPI/File.pyx":552 * using individual file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_all_end( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":553 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_all_end( * self.ob_mpi, m.buf, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":554 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_all_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":555 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_all_end( * self.ob_mpi, m.buf, statusp) ) # <<<<<<<<<<<<<< * * def Write_all_begin(self, buf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_all_end(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 554, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":554 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_all_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":547 * self.ob_mpi, m.buf, m.count, m.dtype) ) * * def Read_all_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective read */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_all_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":557 * self.ob_mpi, m.buf, statusp) ) * * def Write_all_begin(self, buf): # <<<<<<<<<<<<<< * """ * Start a split collective write */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_99Write_all_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_98Write_all_begin[] = "File.Write_all_begin(self, buf)\n\n Start a split collective write\n using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_99Write_all_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_all_begin (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_all_begin") < 0)) __PYX_ERR(31, 557, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_all_begin", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 557, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_all_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_98Write_all_begin(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_98Write_all_begin(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_all_begin", 0); /* "mpi4py/MPI/File.pyx":562 * using individual file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_all_begin( * self.ob_mpi, m.buf, m.count, m.dtype) ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":563 * """ * cdef _p_msg_io m = message_io_write(buf) * with nogil: CHKERR( MPI_File_write_all_begin( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":564 * cdef _p_msg_io m = message_io_write(buf) * with nogil: CHKERR( MPI_File_write_all_begin( * self.ob_mpi, m.buf, m.count, m.dtype) ) # <<<<<<<<<<<<<< * * def Write_all_end(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_all_begin(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 563, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":563 * """ * cdef _p_msg_io m = message_io_write(buf) * with nogil: CHKERR( MPI_File_write_all_begin( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":557 * self.ob_mpi, m.buf, statusp) ) * * def Write_all_begin(self, buf): # <<<<<<<<<<<<<< * """ * Start a split collective write */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_all_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":566 * self.ob_mpi, m.buf, m.count, m.dtype) ) * * def Write_all_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective write */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_101Write_all_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_100Write_all_end[] = "File.Write_all_end(self, buf, Status status=None)\n\n Complete a split collective write\n using individual file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_101Write_all_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_all_end (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_all_end") < 0)) __PYX_ERR(31, 566, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_all_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 566, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_all_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 566, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_100Write_all_end(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_100Write_all_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_all_end", 0); /* "mpi4py/MPI/File.pyx":571 * using individual file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_all_end( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":572 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_all_end( * self.ob_mpi, m.buf, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":573 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_all_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":574 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_all_end( * self.ob_mpi, m.buf, statusp) ) # <<<<<<<<<<<<<< * * # shared file pointer */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_all_end(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 573, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":573 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_all_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":566 * self.ob_mpi, m.buf, m.count, m.dtype) ) * * def Write_all_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective write */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_all_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":578 * # shared file pointer * * def Read_ordered_begin(self, buf): # <<<<<<<<<<<<<< * """ * Start a split collective read */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_103Read_ordered_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_102Read_ordered_begin[] = "File.Read_ordered_begin(self, buf)\n\n Start a split collective read\n using shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_103Read_ordered_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_ordered_begin (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_ordered_begin") < 0)) __PYX_ERR(31, 578, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_ordered_begin", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 578, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_ordered_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_102Read_ordered_begin(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_102Read_ordered_begin(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_ordered_begin", 0); /* "mpi4py/MPI/File.pyx":583 * using shared file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_ordered_begin( * self.ob_mpi, m.buf, m.count, m.dtype) ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":584 * """ * cdef _p_msg_io m = message_io_read(buf) * with nogil: CHKERR( MPI_File_read_ordered_begin( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":585 * cdef _p_msg_io m = message_io_read(buf) * with nogil: CHKERR( MPI_File_read_ordered_begin( * self.ob_mpi, m.buf, m.count, m.dtype) ) # <<<<<<<<<<<<<< * * def Read_ordered_end(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_ordered_begin(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 584, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":584 * """ * cdef _p_msg_io m = message_io_read(buf) * with nogil: CHKERR( MPI_File_read_ordered_begin( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":578 * # shared file pointer * * def Read_ordered_begin(self, buf): # <<<<<<<<<<<<<< * """ * Start a split collective read */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_ordered_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":587 * self.ob_mpi, m.buf, m.count, m.dtype) ) * * def Read_ordered_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective read */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_105Read_ordered_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_104Read_ordered_end[] = "File.Read_ordered_end(self, buf, Status status=None)\n\n Complete a split collective read\n using shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_105Read_ordered_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Read_ordered_end (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Read_ordered_end") < 0)) __PYX_ERR(31, 587, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Read_ordered_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 587, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Read_ordered_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 587, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_104Read_ordered_end(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_104Read_ordered_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Read_ordered_end", 0); /* "mpi4py/MPI/File.pyx":592 * using shared file pointer * """ * cdef _p_msg_io m = message_io_read(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_ordered_end( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_read(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":593 * """ * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_read_ordered_end( * self.ob_mpi, m.buf, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":594 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_ordered_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":595 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_ordered_end( * self.ob_mpi, m.buf, statusp) ) # <<<<<<<<<<<<<< * * def Write_ordered_begin(self, buf): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_read_ordered_end(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 594, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":594 * cdef _p_msg_io m = message_io_read(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_read_ordered_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":587 * self.ob_mpi, m.buf, m.count, m.dtype) ) * * def Read_ordered_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective read */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Read_ordered_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":597 * self.ob_mpi, m.buf, statusp) ) * * def Write_ordered_begin(self, buf): # <<<<<<<<<<<<<< * """ * Start a split collective write using */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_107Write_ordered_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_106Write_ordered_begin[] = "File.Write_ordered_begin(self, buf)\n\n Start a split collective write using\n shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_107Write_ordered_begin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_ordered_begin (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_ordered_begin") < 0)) __PYX_ERR(31, 597, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_buf = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_ordered_begin", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 597, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_ordered_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_106Write_ordered_begin(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_106Write_ordered_begin(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_ordered_begin", 0); /* "mpi4py/MPI/File.pyx":602 * shared file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_ordered_begin( * self.ob_mpi, m.buf, m.count, m.dtype) ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":603 * """ * cdef _p_msg_io m = message_io_write(buf) * with nogil: CHKERR( MPI_File_write_ordered_begin( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":604 * cdef _p_msg_io m = message_io_write(buf) * with nogil: CHKERR( MPI_File_write_ordered_begin( * self.ob_mpi, m.buf, m.count, m.dtype) ) # <<<<<<<<<<<<<< * * def Write_ordered_end(self, buf, Status status=None): */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_ordered_begin(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_m->count, __pyx_v_m->dtype)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 603, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":603 * """ * cdef _p_msg_io m = message_io_write(buf) * with nogil: CHKERR( MPI_File_write_ordered_begin( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, m.count, m.dtype) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":597 * self.ob_mpi, m.buf, statusp) ) * * def Write_ordered_begin(self, buf): # <<<<<<<<<<<<<< * """ * Start a split collective write using */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_ordered_begin", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":606 * self.ob_mpi, m.buf, m.count, m.dtype) ) * * def Write_ordered_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective write */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_109Write_ordered_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_108Write_ordered_end[] = "File.Write_ordered_end(self, buf, Status status=None)\n\n Complete a split collective write\n using shared file pointer\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_109Write_ordered_end(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buf = 0; struct PyMPIStatusObject *__pyx_v_status = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Write_ordered_end (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buf,&__pyx_n_s_status,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)((struct PyMPIStatusObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_buf)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_status); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Write_ordered_end") < 0)) __PYX_ERR(31, 606, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_buf = values[0]; __pyx_v_status = ((struct PyMPIStatusObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Write_ordered_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 606, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Write_ordered_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status), __pyx_ptype_6mpi4py_3MPI_Status, 1, "status", 0))) __PYX_ERR(31, 606, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_108Write_ordered_end(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_buf, __pyx_v_status); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_108Write_ordered_end(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_buf, struct PyMPIStatusObject *__pyx_v_status) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *__pyx_v_m = 0; MPI_Status *__pyx_v_statusp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; __Pyx_RefNannySetupContext("Write_ordered_end", 0); /* "mpi4py/MPI/File.pyx":611 * using shared file pointer * """ * cdef _p_msg_io m = message_io_write(buf) # <<<<<<<<<<<<<< * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_ordered_end( */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_message_io_write(__pyx_v_buf)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":612 * """ * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_write_ordered_end( * self.ob_mpi, m.buf, statusp) ) */ __pyx_v_statusp = __pyx_f_6mpi4py_3MPI_arg_Status(((PyObject *)__pyx_v_status)); /* "mpi4py/MPI/File.pyx":613 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_ordered_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":614 * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_ordered_end( * self.ob_mpi, m.buf, statusp) ) # <<<<<<<<<<<<<< * * # File Interoperability */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_write_ordered_end(__pyx_v_self->ob_mpi, __pyx_v_m->buf, __pyx_v_statusp)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(31, 613, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":613 * cdef _p_msg_io m = message_io_write(buf) * cdef MPI_Status *statusp = arg_Status(status) * with nogil: CHKERR( MPI_File_write_ordered_end( # <<<<<<<<<<<<<< * self.ob_mpi, m.buf, statusp) ) * */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":606 * self.ob_mpi, m.buf, m.count, m.dtype) ) * * def Write_ordered_end(self, buf, Status status=None): # <<<<<<<<<<<<<< * """ * Complete a split collective write */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.Write_ordered_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":619 * # --------------------- * * def Get_type_extent(self, Datatype datatype): # <<<<<<<<<<<<<< * """ * Return the extent of datatype in the file */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_111Get_type_extent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_110Get_type_extent[] = "File.Get_type_extent(self, Datatype datatype)\n\n Return the extent of datatype in the file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_111Get_type_extent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIDatatypeObject *__pyx_v_datatype = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_type_extent (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datatype,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datatype)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Get_type_extent") < 0)) __PYX_ERR(31, 619, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_datatype = ((struct PyMPIDatatypeObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Get_type_extent", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 619, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Get_type_extent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_datatype), __pyx_ptype_6mpi4py_3MPI_Datatype, 0, "datatype", 0))) __PYX_ERR(31, 619, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_110Get_type_extent(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_datatype); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_110Get_type_extent(struct PyMPIFileObject *__pyx_v_self, struct PyMPIDatatypeObject *__pyx_v_datatype) { MPI_Aint __pyx_v_extent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_type_extent", 0); /* "mpi4py/MPI/File.pyx":623 * Return the extent of datatype in the file * """ * cdef MPI_Aint extent = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_get_type_extent( * self.ob_mpi, datatype.ob_mpi, &extent) ) */ __pyx_v_extent = 0; /* "mpi4py/MPI/File.pyx":624 * """ * cdef MPI_Aint extent = 0 * with nogil: CHKERR( MPI_File_get_type_extent( # <<<<<<<<<<<<<< * self.ob_mpi, datatype.ob_mpi, &extent) ) * return extent */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { /* "mpi4py/MPI/File.pyx":625 * cdef MPI_Aint extent = 0 * with nogil: CHKERR( MPI_File_get_type_extent( * self.ob_mpi, datatype.ob_mpi, &extent) ) # <<<<<<<<<<<<<< * return extent * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_type_extent(__pyx_v_self->ob_mpi, __pyx_v_datatype->ob_mpi, (&__pyx_v_extent))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 624, __pyx_L4_error) } /* "mpi4py/MPI/File.pyx":624 * """ * cdef MPI_Aint extent = 0 * with nogil: CHKERR( MPI_File_get_type_extent( # <<<<<<<<<<<<<< * self.ob_mpi, datatype.ob_mpi, &extent) ) * return extent */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":626 * with nogil: CHKERR( MPI_File_get_type_extent( * self.ob_mpi, datatype.ob_mpi, &extent) ) * return extent # <<<<<<<<<<<<<< * * # Consistency and Semantics */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_MPI_Aint(__pyx_v_extent); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":619 * # --------------------- * * def Get_type_extent(self, Datatype datatype): # <<<<<<<<<<<<<< * """ * Return the extent of datatype in the file */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_type_extent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":631 * # ------------------------- * * def Set_atomicity(self, bint flag): # <<<<<<<<<<<<<< * """ * Set the atomicity mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_113Set_atomicity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_112Set_atomicity[] = "File.Set_atomicity(self, bool flag)\n\n Set the atomicity mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_113Set_atomicity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_flag; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_atomicity (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_flag,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_atomicity") < 0)) __PYX_ERR(31, 631, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_flag = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_flag == (int)-1) && PyErr_Occurred())) __PYX_ERR(31, 631, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_atomicity", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 631, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Set_atomicity", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_112Set_atomicity(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_flag); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_112Set_atomicity(struct PyMPIFileObject *__pyx_v_self, int __pyx_v_flag) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_atomicity", 0); /* "mpi4py/MPI/File.pyx":635 * Set the atomicity mode * """ * with nogil: CHKERR( MPI_File_set_atomicity(self.ob_mpi, flag) ) # <<<<<<<<<<<<<< * * def Get_atomicity(self): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_set_atomicity(__pyx_v_self->ob_mpi, __pyx_v_flag)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 635, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":631 * # ------------------------- * * def Set_atomicity(self, bint flag): # <<<<<<<<<<<<<< * """ * Set the atomicity mode */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Set_atomicity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":637 * with nogil: CHKERR( MPI_File_set_atomicity(self.ob_mpi, flag) ) * * def Get_atomicity(self): # <<<<<<<<<<<<<< * """ * Return the atomicity mode */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_115Get_atomicity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_114Get_atomicity[] = "File.Get_atomicity(self)\n\n Return the atomicity mode\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_115Get_atomicity(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_atomicity (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_atomicity", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_atomicity", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_114Get_atomicity(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_114Get_atomicity(struct PyMPIFileObject *__pyx_v_self) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_atomicity", 0); /* "mpi4py/MPI/File.pyx":641 * Return the atomicity mode * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * with nogil: CHKERR( MPI_File_get_atomicity(self.ob_mpi, &flag) ) * return flag */ __pyx_v_flag = 0; /* "mpi4py/MPI/File.pyx":642 * """ * cdef int flag = 0 * with nogil: CHKERR( MPI_File_get_atomicity(self.ob_mpi, &flag) ) # <<<<<<<<<<<<<< * return flag * */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_atomicity(__pyx_v_self->ob_mpi, (&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 642, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":643 * cdef int flag = 0 * with nogil: CHKERR( MPI_File_get_atomicity(self.ob_mpi, &flag) ) * return flag # <<<<<<<<<<<<<< * * property atomicity: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":637 * with nogil: CHKERR( MPI_File_set_atomicity(self.ob_mpi, flag) ) * * def Get_atomicity(self): # <<<<<<<<<<<<<< * """ * Return the atomicity mode */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_atomicity", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":647 * property atomicity: * """atomicity""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_atomicity() * def __set__(self, value): */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_9atomicity_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_9atomicity_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_9atomicity___get__(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_9atomicity___get__(struct PyMPIFileObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); /* "mpi4py/MPI/File.pyx":648 * """atomicity""" * def __get__(self): * return self.Get_atomicity() # <<<<<<<<<<<<<< * def __set__(self, value): * self.Set_atomicity(value) */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Get_atomicity); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":647 * property atomicity: * """atomicity""" * def __get__(self): # <<<<<<<<<<<<<< * return self.Get_atomicity() * def __set__(self, value): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.File.atomicity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":649 * def __get__(self): * return self.Get_atomicity() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_atomicity(value) * */ /* Python wrapper */ static int __pyx_pw_6mpi4py_3MPI_4File_9atomicity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_6mpi4py_3MPI_4File_9atomicity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_9atomicity_2__set__(((struct PyMPIFileObject *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_6mpi4py_3MPI_4File_9atomicity_2__set__(struct PyMPIFileObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__set__", 0); /* "mpi4py/MPI/File.pyx":650 * return self.Get_atomicity() * def __set__(self, value): * self.Set_atomicity(value) # <<<<<<<<<<<<<< * * def Sync(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Set_atomicity); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":649 * def __get__(self): * return self.Get_atomicity() * def __set__(self, value): # <<<<<<<<<<<<<< * self.Set_atomicity(value) * */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI.File.atomicity.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":652 * self.Set_atomicity(value) * * def Sync(self): # <<<<<<<<<<<<<< * """ * Causes all previous writes to be */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_117Sync(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_116Sync[] = "File.Sync(self)\n\n Causes all previous writes to be\n transferred to the storage device\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_117Sync(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Sync (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Sync", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Sync", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_116Sync(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_116Sync(struct PyMPIFileObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Sync", 0); /* "mpi4py/MPI/File.pyx":657 * transferred to the storage device * """ * with nogil: CHKERR( MPI_File_sync(self.ob_mpi) ) # <<<<<<<<<<<<<< * * # Error Handling */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS __Pyx_FastGIL_Remember(); #endif /*try:*/ { __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_sync(__pyx_v_self->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 657, __pyx_L4_error) } /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L5; } __pyx_L4_error: { #ifdef WITH_THREAD __Pyx_FastGIL_Forget(); Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L5:; } } /* "mpi4py/MPI/File.pyx":652 * self.Set_atomicity(value) * * def Sync(self): # <<<<<<<<<<<<<< * """ * Causes all previous writes to be */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Sync", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":662 * # -------------- * * def Get_errhandler(self): # <<<<<<<<<<<<<< * """ * Get the error handler for a file */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_119Get_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_118Get_errhandler[] = "File.Get_errhandler(self)\n\n Get the error handler for a file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_119Get_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_errhandler (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_errhandler", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_errhandler", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_118Get_errhandler(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_118Get_errhandler(struct PyMPIFileObject *__pyx_v_self) { struct PyMPIErrhandlerObject *__pyx_v_errhandler = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannySetupContext("Get_errhandler", 0); /* "mpi4py/MPI/File.pyx":666 * Get the error handler for a file * """ * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) # <<<<<<<<<<<<<< * CHKERR( MPI_File_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) * return errhandler */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_Errhandler(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_Errhandler), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 666, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_errhandler = ((struct PyMPIErrhandlerObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":667 * """ * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * CHKERR( MPI_File_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) # <<<<<<<<<<<<<< * return errhandler * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_get_errhandler(__pyx_v_self->ob_mpi, (&__pyx_v_errhandler->ob_mpi))); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(31, 667, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":668 * cdef Errhandler errhandler = Errhandler.__new__(Errhandler) * CHKERR( MPI_File_get_errhandler(self.ob_mpi, &errhandler.ob_mpi) ) * return errhandler # <<<<<<<<<<<<<< * * def Set_errhandler(self, Errhandler errhandler): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_errhandler)); __pyx_r = ((PyObject *)__pyx_v_errhandler); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":662 * # -------------- * * def Get_errhandler(self): # <<<<<<<<<<<<<< * """ * Get the error handler for a file */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.Get_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_errhandler); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":670 * return errhandler * * def Set_errhandler(self, Errhandler errhandler): # <<<<<<<<<<<<<< * """ * Set the error handler for a file */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_121Set_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_120Set_errhandler[] = "File.Set_errhandler(self, Errhandler errhandler)\n\n Set the error handler for a file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_121Set_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct PyMPIErrhandlerObject *__pyx_v_errhandler = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Set_errhandler (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errhandler,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errhandler)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Set_errhandler") < 0)) __PYX_ERR(31, 670, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_errhandler = ((struct PyMPIErrhandlerObject *)values[0]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Set_errhandler", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 670, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Set_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_errhandler), __pyx_ptype_6mpi4py_3MPI_Errhandler, 0, "errhandler", 0))) __PYX_ERR(31, 670, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_120Set_errhandler(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_errhandler); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_120Set_errhandler(struct PyMPIFileObject *__pyx_v_self, struct PyMPIErrhandlerObject *__pyx_v_errhandler) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Set_errhandler", 0); /* "mpi4py/MPI/File.pyx":674 * Set the error handler for a file * """ * CHKERR( MPI_File_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) # <<<<<<<<<<<<<< * * def Call_errhandler(self, int errorcode): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_set_errhandler(__pyx_v_self->ob_mpi, __pyx_v_errhandler->ob_mpi)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 674, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":670 * return errhandler * * def Set_errhandler(self, Errhandler errhandler): # <<<<<<<<<<<<<< * """ * Set the error handler for a file */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Set_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":676 * CHKERR( MPI_File_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) * * def Call_errhandler(self, int errorcode): # <<<<<<<<<<<<<< * """ * Call the error handler installed on a file */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_123Call_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_122Call_errhandler[] = "File.Call_errhandler(self, int errorcode)\n\n Call the error handler installed on a file\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_123Call_errhandler(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_errorcode; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Call_errhandler (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_errorcode,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_errorcode)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Call_errhandler") < 0)) __PYX_ERR(31, 676, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_errorcode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_errorcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(31, 676, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Call_errhandler", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 676, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Call_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_122Call_errhandler(((struct PyMPIFileObject *)__pyx_v_self), __pyx_v_errorcode); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_122Call_errhandler(struct PyMPIFileObject *__pyx_v_self, int __pyx_v_errorcode) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Call_errhandler", 0); /* "mpi4py/MPI/File.pyx":680 * Call the error handler installed on a file * """ * CHKERR( MPI_File_call_errhandler(self.ob_mpi, errorcode) ) # <<<<<<<<<<<<<< * * # Fortran Handle */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_File_call_errhandler(__pyx_v_self->ob_mpi, __pyx_v_errorcode)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(31, 680, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":676 * CHKERR( MPI_File_set_errhandler(self.ob_mpi, errhandler.ob_mpi) ) * * def Call_errhandler(self, int errorcode): # <<<<<<<<<<<<<< * """ * Call the error handler installed on a file */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.File.Call_errhandler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":685 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_125py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_124py2f[] = "File.py2f(self)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_125py2f(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("py2f (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("py2f", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "py2f", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_124py2f(((struct PyMPIFileObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_124py2f(struct PyMPIFileObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("py2f", 0); /* "mpi4py/MPI/File.pyx":688 * """ * """ * return MPI_File_c2f(self.ob_mpi) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_MPI_Fint(MPI_File_c2f(__pyx_v_self->ob_mpi)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/File.pyx":685 * # -------------- * * def py2f(self): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.File.py2f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":691 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_4File_127f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_4File_126f2py[] = "File.f2py(type cls, arg)\n\n "; static PyObject *__pyx_pw_6mpi4py_3MPI_4File_127f2py(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("f2py (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "f2py") < 0)) __PYX_ERR(31, 691, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("f2py", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 691, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.File.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_4File_126f2py(((PyTypeObject*)__pyx_v_cls), __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_4File_126f2py(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_arg) { struct PyMPIFileObject *__pyx_v_file = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; MPI_Fint __pyx_t_3; __Pyx_RefNannySetupContext("f2py", 0); /* "mpi4py/MPI/File.pyx":694 * """ * """ * cdef File file = File.__new__(File) # <<<<<<<<<<<<<< * file.ob_mpi = MPI_File_f2c(arg) * return file */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_6mpi4py_3MPI_File(((PyTypeObject *)__pyx_ptype_6mpi4py_3MPI_File), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 694, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_file = ((struct PyMPIFileObject *)__pyx_t_2); __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":695 * """ * cdef File file = File.__new__(File) * file.ob_mpi = MPI_File_f2c(arg) # <<<<<<<<<<<<<< * return file * */ __pyx_t_3 = __Pyx_PyInt_As_MPI_Fint(__pyx_v_arg); if (unlikely((__pyx_t_3 == ((MPI_Fint)-1)) && PyErr_Occurred())) __PYX_ERR(31, 695, __pyx_L1_error) __pyx_v_file->ob_mpi = MPI_File_f2c(__pyx_t_3); /* "mpi4py/MPI/File.pyx":696 * cdef File file = File.__new__(File) * file.ob_mpi = MPI_File_f2c(arg) * return file # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_file)); __pyx_r = ((PyObject *)__pyx_v_file); goto __pyx_L0; /* "mpi4py/MPI/File.pyx":691 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.File.f2py", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_file); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/File.pyx":712 * # --------------------------------- * * def Register_datarep(datarep, read_fn, write_fn, extent_fn): # <<<<<<<<<<<<<< * """ * Register user-defined data representations */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_39Register_datarep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_38Register_datarep[] = "Register_datarep(datarep, read_fn, write_fn, extent_fn)\n\n Register user-defined data representations\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_39Register_datarep = {"Register_datarep", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_39Register_datarep, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_38Register_datarep}; static PyObject *__pyx_pw_6mpi4py_3MPI_39Register_datarep(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_datarep = 0; PyObject *__pyx_v_read_fn = 0; PyObject *__pyx_v_write_fn = 0; PyObject *__pyx_v_extent_fn = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Register_datarep (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_datarep,&__pyx_n_s_read_fn,&__pyx_n_s_write_fn,&__pyx_n_s_extent_fn,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_datarep)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_read_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Register_datarep", 1, 4, 4, 1); __PYX_ERR(31, 712, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_write_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Register_datarep", 1, 4, 4, 2); __PYX_ERR(31, 712, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_extent_fn)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("Register_datarep", 1, 4, 4, 3); __PYX_ERR(31, 712, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Register_datarep") < 0)) __PYX_ERR(31, 712, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_datarep = values[0]; __pyx_v_read_fn = values[1]; __pyx_v_write_fn = values[2]; __pyx_v_extent_fn = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Register_datarep", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(31, 712, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Register_datarep", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_38Register_datarep(__pyx_self, __pyx_v_datarep, __pyx_v_read_fn, __pyx_v_write_fn, __pyx_v_extent_fn); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_38Register_datarep(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_datarep, PyObject *__pyx_v_read_fn, PyObject *__pyx_v_write_fn, PyObject *__pyx_v_extent_fn) { char *__pyx_v_cdatarep; PyObject *__pyx_v_state = 0; MPI_Datarep_conversion_function *__pyx_v_rd; MPI_Datarep_conversion_function *__pyx_v_wr; MPI_Datarep_extent_function *__pyx_v_ex; void *__pyx_v_xs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("Register_datarep", 0); __Pyx_INCREF(__pyx_v_datarep); /* "mpi4py/MPI/File.pyx":716 * Register user-defined data representations * """ * cdef char *cdatarep = NULL # <<<<<<<<<<<<<< * datarep = asmpistr(datarep, &cdatarep) * cdef object state = _p_datarep(read_fn, write_fn, extent_fn) */ __pyx_v_cdatarep = NULL; /* "mpi4py/MPI/File.pyx":717 * """ * cdef char *cdatarep = NULL * datarep = asmpistr(datarep, &cdatarep) # <<<<<<<<<<<<<< * cdef object state = _p_datarep(read_fn, write_fn, extent_fn) * cdef MPI_Datarep_conversion_function *rd = MPI_CONVERSION_FN_NULL */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_asmpistr(__pyx_v_datarep, (&__pyx_v_cdatarep)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_datarep, __pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":718 * cdef char *cdatarep = NULL * datarep = asmpistr(datarep, &cdatarep) * cdef object state = _p_datarep(read_fn, write_fn, extent_fn) # <<<<<<<<<<<<<< * cdef MPI_Datarep_conversion_function *rd = MPI_CONVERSION_FN_NULL * cdef MPI_Datarep_conversion_function *wr = MPI_CONVERSION_FN_NULL */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_read_fn); __Pyx_GIVEREF(__pyx_v_read_fn); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_read_fn); __Pyx_INCREF(__pyx_v_write_fn); __Pyx_GIVEREF(__pyx_v_write_fn); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_write_fn); __Pyx_INCREF(__pyx_v_extent_fn); __Pyx_GIVEREF(__pyx_v_extent_fn); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_extent_fn); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6mpi4py_3MPI__p_datarep), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(31, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_state = __pyx_t_2; __pyx_t_2 = 0; /* "mpi4py/MPI/File.pyx":719 * datarep = asmpistr(datarep, &cdatarep) * cdef object state = _p_datarep(read_fn, write_fn, extent_fn) * cdef MPI_Datarep_conversion_function *rd = MPI_CONVERSION_FN_NULL # <<<<<<<<<<<<<< * cdef MPI_Datarep_conversion_function *wr = MPI_CONVERSION_FN_NULL * cdef MPI_Datarep_extent_function *ex = datarep_extent_fn */ __pyx_v_rd = MPI_CONVERSION_FN_NULL; /* "mpi4py/MPI/File.pyx":720 * cdef object state = _p_datarep(read_fn, write_fn, extent_fn) * cdef MPI_Datarep_conversion_function *rd = MPI_CONVERSION_FN_NULL * cdef MPI_Datarep_conversion_function *wr = MPI_CONVERSION_FN_NULL # <<<<<<<<<<<<<< * cdef MPI_Datarep_extent_function *ex = datarep_extent_fn * cdef void* xs = state */ __pyx_v_wr = MPI_CONVERSION_FN_NULL; /* "mpi4py/MPI/File.pyx":721 * cdef MPI_Datarep_conversion_function *rd = MPI_CONVERSION_FN_NULL * cdef MPI_Datarep_conversion_function *wr = MPI_CONVERSION_FN_NULL * cdef MPI_Datarep_extent_function *ex = datarep_extent_fn # <<<<<<<<<<<<<< * cdef void* xs = state * if read_fn is not None: rd = datarep_read_fn */ __pyx_v_ex = __pyx_f_6mpi4py_3MPI_datarep_extent_fn; /* "mpi4py/MPI/File.pyx":722 * cdef MPI_Datarep_conversion_function *wr = MPI_CONVERSION_FN_NULL * cdef MPI_Datarep_extent_function *ex = datarep_extent_fn * cdef void* xs = state # <<<<<<<<<<<<<< * if read_fn is not None: rd = datarep_read_fn * if write_fn is not None: wr = datarep_write_fn */ __pyx_v_xs = ((void *)__pyx_v_state); /* "mpi4py/MPI/File.pyx":723 * cdef MPI_Datarep_extent_function *ex = datarep_extent_fn * cdef void* xs = state * if read_fn is not None: rd = datarep_read_fn # <<<<<<<<<<<<<< * if write_fn is not None: wr = datarep_write_fn * CHKERR ( MPI_Register_datarep(cdatarep, rd, wr, ex, xs) ) */ __pyx_t_3 = (__pyx_v_read_fn != Py_None); __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { __pyx_v_rd = __pyx_f_6mpi4py_3MPI_datarep_read_fn; } /* "mpi4py/MPI/File.pyx":724 * cdef void* xs = state * if read_fn is not None: rd = datarep_read_fn * if write_fn is not None: wr = datarep_write_fn # <<<<<<<<<<<<<< * CHKERR ( MPI_Register_datarep(cdatarep, rd, wr, ex, xs) ) * datarep_registry[datarep] = state */ __pyx_t_4 = (__pyx_v_write_fn != Py_None); __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { __pyx_v_wr = __pyx_f_6mpi4py_3MPI_datarep_write_fn; } /* "mpi4py/MPI/File.pyx":725 * if read_fn is not None: rd = datarep_read_fn * if write_fn is not None: wr = datarep_write_fn * CHKERR ( MPI_Register_datarep(cdatarep, rd, wr, ex, xs) ) # <<<<<<<<<<<<<< * datarep_registry[datarep] = state */ __pyx_t_5 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Register_datarep(__pyx_v_cdatarep, __pyx_v_rd, __pyx_v_wr, __pyx_v_ex, __pyx_v_xs)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(31, 725, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":726 * if write_fn is not None: wr = datarep_write_fn * CHKERR ( MPI_Register_datarep(cdatarep, rd, wr, ex, xs) ) * datarep_registry[datarep] = state # <<<<<<<<<<<<<< */ if (unlikely(__pyx_v_6mpi4py_3MPI_datarep_registry == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(31, 726, __pyx_L1_error) } if (unlikely(PyDict_SetItem(__pyx_v_6mpi4py_3MPI_datarep_registry, __pyx_v_datarep, __pyx_v_state) < 0)) __PYX_ERR(31, 726, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":712 * # --------------------------------- * * def Register_datarep(datarep, read_fn, write_fn, extent_fn): # <<<<<<<<<<<<<< * """ * Register user-defined data representations */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Register_datarep", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v_datarep); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":90 * # ----------------- * * def Alloc_mem(Aint size, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Allocate memory for message passing and RMA */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_41Alloc_mem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_40Alloc_mem[] = "Alloc_mem(Aint size, Info info=INFO_NULL)\n\n Allocate memory for message passing and RMA\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_41Alloc_mem = {"Alloc_mem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_41Alloc_mem, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_40Alloc_mem}; static PyObject *__pyx_pw_6mpi4py_3MPI_41Alloc_mem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { MPI_Aint __pyx_v_size; struct PyMPIInfoObject *__pyx_v_info = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Alloc_mem (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_info,0}; PyObject* values[2] = {0,0}; values[1] = (PyObject *)__pyx_k__126; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_info); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Alloc_mem") < 0)) __PYX_ERR(8, 90, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_size = __Pyx_PyInt_As_MPI_Aint(values[0]); if (unlikely((__pyx_v_size == ((MPI_Aint)-1)) && PyErr_Occurred())) __PYX_ERR(8, 90, __pyx_L3_error) __pyx_v_info = ((struct PyMPIInfoObject *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Alloc_mem", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(8, 90, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Alloc_mem", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_info), __pyx_ptype_6mpi4py_3MPI_Info, 0, "info", 0))) __PYX_ERR(8, 90, __pyx_L1_error) __pyx_r = __pyx_pf_6mpi4py_3MPI_40Alloc_mem(__pyx_self, __pyx_v_size, __pyx_v_info); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_40Alloc_mem(CYTHON_UNUSED PyObject *__pyx_self, MPI_Aint __pyx_v_size, struct PyMPIInfoObject *__pyx_v_info) { void *__pyx_v_base; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Alloc_mem", 0); /* "mpi4py/MPI/MPI.pyx":94 * Allocate memory for message passing and RMA * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * CHKERR( MPI_Alloc_mem(size, info.ob_mpi, &base) ) * return tomemory(base, size) */ __pyx_v_base = NULL; /* "mpi4py/MPI/MPI.pyx":95 * """ * cdef void *base = NULL * CHKERR( MPI_Alloc_mem(size, info.ob_mpi, &base) ) # <<<<<<<<<<<<<< * return tomemory(base, size) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Alloc_mem(__pyx_v_size, __pyx_v_info->ob_mpi, (&__pyx_v_base))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 95, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":96 * cdef void *base = NULL * CHKERR( MPI_Alloc_mem(size, info.ob_mpi, &base) ) * return tomemory(base, size) # <<<<<<<<<<<<<< * * def Free_mem(mem): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_f_6mpi4py_3MPI_tomemory(__pyx_v_base, __pyx_v_size)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":90 * # ----------------- * * def Alloc_mem(Aint size, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Allocate memory for message passing and RMA */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Alloc_mem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":98 * return tomemory(base, size) * * def Free_mem(mem): # <<<<<<<<<<<<<< * """ * Free memory allocated with `Alloc_mem()` */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_43Free_mem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_42Free_mem[] = "Free_mem(mem)\n\n Free memory allocated with `Alloc_mem()`\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_43Free_mem = {"Free_mem", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_43Free_mem, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_42Free_mem}; static PyObject *__pyx_pw_6mpi4py_3MPI_43Free_mem(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_mem = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Free_mem (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mem,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mem)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Free_mem") < 0)) __PYX_ERR(8, 98, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_mem = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Free_mem", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(8, 98, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Free_mem", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_42Free_mem(__pyx_self, __pyx_v_mem); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_42Free_mem(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mem) { void *__pyx_v_base; struct __pyx_obj_6mpi4py_3MPI_memory *__pyx_v_m = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Free_mem", 0); /* "mpi4py/MPI/MPI.pyx":102 * Free memory allocated with `Alloc_mem()` * """ * cdef void *base = NULL # <<<<<<<<<<<<<< * cdef memory m = asmemory(mem, &base, NULL) * CHKERR( MPI_Free_mem(base) ) */ __pyx_v_base = NULL; /* "mpi4py/MPI/MPI.pyx":103 * """ * cdef void *base = NULL * cdef memory m = asmemory(mem, &base, NULL) # <<<<<<<<<<<<<< * CHKERR( MPI_Free_mem(base) ) * m.release() */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_asmemory(__pyx_v_mem, (&__pyx_v_base), NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_m = ((struct __pyx_obj_6mpi4py_3MPI_memory *)__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":104 * cdef void *base = NULL * cdef memory m = asmemory(mem, &base, NULL) * CHKERR( MPI_Free_mem(base) ) # <<<<<<<<<<<<<< * m.release() * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Free_mem(__pyx_v_base)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(8, 104, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":105 * cdef memory m = asmemory(mem, &base, NULL) * CHKERR( MPI_Free_mem(base) ) * m.release() # <<<<<<<<<<<<<< * * # Initialization and Exit */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_m), __pyx_n_s_release); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":98 * return tomemory(base, size) * * def Free_mem(mem): # <<<<<<<<<<<<<< * """ * Free memory allocated with `Alloc_mem()` */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Free_mem", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_m); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":110 * # ----------------------- * * def Init(): # <<<<<<<<<<<<<< * """ * Initialize the MPI execution environment */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_45Init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_44Init[] = "Init()\n\n Initialize the MPI execution environment\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_45Init = {"Init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_45Init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_44Init}; static PyObject *__pyx_pw_6mpi4py_3MPI_45Init(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Init (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Init", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Init", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_44Init(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_44Init(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Init", 0); /* "mpi4py/MPI/MPI.pyx":114 * Initialize the MPI execution environment * """ * CHKERR( MPI_Init(NULL, NULL) ) # <<<<<<<<<<<<<< * initialize() * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Init(NULL, NULL)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 114, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":115 * """ * CHKERR( MPI_Init(NULL, NULL) ) * initialize() # <<<<<<<<<<<<<< * * def Finalize(): */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_initialize(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 115, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":110 * # ----------------------- * * def Init(): # <<<<<<<<<<<<<< * """ * Initialize the MPI execution environment */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Init", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":117 * initialize() * * def Finalize(): # <<<<<<<<<<<<<< * """ * Terminate the MPI execution environment */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_47Finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_46Finalize[] = "Finalize()\n\n Terminate the MPI execution environment\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_47Finalize = {"Finalize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_47Finalize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_46Finalize}; static PyObject *__pyx_pw_6mpi4py_3MPI_47Finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Finalize (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Finalize", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Finalize", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_46Finalize(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_46Finalize(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("Finalize", 0); /* "mpi4py/MPI/MPI.pyx":121 * Terminate the MPI execution environment * """ * finalize() # <<<<<<<<<<<<<< * CHKERR( MPI_Finalize() ) * */ __pyx_f_6mpi4py_3MPI_finalize(); /* "mpi4py/MPI/MPI.pyx":122 * """ * finalize() * CHKERR( MPI_Finalize() ) # <<<<<<<<<<<<<< * * # Levels of MPI threading support */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Finalize()); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 122, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":117 * initialize() * * def Finalize(): # <<<<<<<<<<<<<< * """ * Terminate the MPI execution environment */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Finalize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":139 * #: Multiple threads may call MPI * * def Init_thread(int required=THREAD_MULTIPLE): # <<<<<<<<<<<<<< * """ * Initialize the MPI execution environment */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_49Init_thread(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_48Init_thread[] = "Init_thread(int required=THREAD_MULTIPLE)\n\n Initialize the MPI execution environment\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_49Init_thread = {"Init_thread", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_49Init_thread, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_48Init_thread}; static PyObject *__pyx_pw_6mpi4py_3MPI_49Init_thread(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_required; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Init_thread (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_required,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_required); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Init_thread") < 0)) __PYX_ERR(8, 139, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_required = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_required == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 139, __pyx_L3_error) } else { __pyx_v_required = __pyx_k__127; } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Init_thread", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(8, 139, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Init_thread", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_48Init_thread(__pyx_self, __pyx_v_required); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_48Init_thread(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_required) { int __pyx_v_provided; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Init_thread", 0); /* "mpi4py/MPI/MPI.pyx":143 * Initialize the MPI execution environment * """ * cdef int provided = MPI_THREAD_SINGLE # <<<<<<<<<<<<<< * CHKERR( MPI_Init_thread(NULL, NULL, required, &provided) ) * initialize() */ __pyx_v_provided = MPI_THREAD_SINGLE; /* "mpi4py/MPI/MPI.pyx":144 * """ * cdef int provided = MPI_THREAD_SINGLE * CHKERR( MPI_Init_thread(NULL, NULL, required, &provided) ) # <<<<<<<<<<<<<< * initialize() * return provided */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Init_thread(NULL, NULL, __pyx_v_required, (&__pyx_v_provided))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 144, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":145 * cdef int provided = MPI_THREAD_SINGLE * CHKERR( MPI_Init_thread(NULL, NULL, required, &provided) ) * initialize() # <<<<<<<<<<<<<< * return provided * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_initialize(); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 145, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":146 * CHKERR( MPI_Init_thread(NULL, NULL, required, &provided) ) * initialize() * return provided # <<<<<<<<<<<<<< * * def Query_thread(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_provided); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":139 * #: Multiple threads may call MPI * * def Init_thread(int required=THREAD_MULTIPLE): # <<<<<<<<<<<<<< * """ * Initialize the MPI execution environment */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Init_thread", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":148 * return provided * * def Query_thread(): # <<<<<<<<<<<<<< * """ * Return the level of thread support */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_51Query_thread(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_50Query_thread[] = "Query_thread()\n\n Return the level of thread support\n provided by the MPI library\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_51Query_thread = {"Query_thread", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_51Query_thread, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_50Query_thread}; static PyObject *__pyx_pw_6mpi4py_3MPI_51Query_thread(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Query_thread (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Query_thread", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Query_thread", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_50Query_thread(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_50Query_thread(CYTHON_UNUSED PyObject *__pyx_self) { int __pyx_v_provided; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Query_thread", 0); /* "mpi4py/MPI/MPI.pyx":153 * provided by the MPI library * """ * cdef int provided = MPI_THREAD_SINGLE # <<<<<<<<<<<<<< * CHKERR( MPI_Query_thread(&provided) ) * return provided */ __pyx_v_provided = MPI_THREAD_SINGLE; /* "mpi4py/MPI/MPI.pyx":154 * """ * cdef int provided = MPI_THREAD_SINGLE * CHKERR( MPI_Query_thread(&provided) ) # <<<<<<<<<<<<<< * return provided * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Query_thread((&__pyx_v_provided))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 154, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":155 * cdef int provided = MPI_THREAD_SINGLE * CHKERR( MPI_Query_thread(&provided) ) * return provided # <<<<<<<<<<<<<< * * def Is_thread_main(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_provided); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":148 * return provided * * def Query_thread(): # <<<<<<<<<<<<<< * """ * Return the level of thread support */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Query_thread", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":157 * return provided * * def Is_thread_main(): # <<<<<<<<<<<<<< * """ * Indicate whether this thread called */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_53Is_thread_main(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_52Is_thread_main[] = "Is_thread_main()\n\n Indicate whether this thread called\n ``Init`` or ``Init_thread``\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_53Is_thread_main = {"Is_thread_main", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_53Is_thread_main, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_52Is_thread_main}; static PyObject *__pyx_pw_6mpi4py_3MPI_53Is_thread_main(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Is_thread_main (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Is_thread_main", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Is_thread_main", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_52Is_thread_main(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_52Is_thread_main(CYTHON_UNUSED PyObject *__pyx_self) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Is_thread_main", 0); /* "mpi4py/MPI/MPI.pyx":162 * ``Init`` or ``Init_thread`` * """ * cdef int flag = 1 # <<<<<<<<<<<<<< * CHKERR( MPI_Is_thread_main(&flag) ) * return flag */ __pyx_v_flag = 1; /* "mpi4py/MPI/MPI.pyx":163 * """ * cdef int flag = 1 * CHKERR( MPI_Is_thread_main(&flag) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Is_thread_main((&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 163, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":164 * cdef int flag = 1 * CHKERR( MPI_Is_thread_main(&flag) ) * return flag # <<<<<<<<<<<<<< * * def Is_initialized(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":157 * return provided * * def Is_thread_main(): # <<<<<<<<<<<<<< * """ * Indicate whether this thread called */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Is_thread_main", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":166 * return flag * * def Is_initialized(): # <<<<<<<<<<<<<< * """ * Indicates whether ``Init`` has been called */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_55Is_initialized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_54Is_initialized[] = "Is_initialized()\n\n Indicates whether ``Init`` has been called\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_55Is_initialized = {"Is_initialized", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_55Is_initialized, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_54Is_initialized}; static PyObject *__pyx_pw_6mpi4py_3MPI_55Is_initialized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Is_initialized (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Is_initialized", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Is_initialized", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_54Is_initialized(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_54Is_initialized(CYTHON_UNUSED PyObject *__pyx_self) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Is_initialized", 0); /* "mpi4py/MPI/MPI.pyx":170 * Indicates whether ``Init`` has been called * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Initialized(&flag) ) * return flag */ __pyx_v_flag = 0; /* "mpi4py/MPI/MPI.pyx":171 * """ * cdef int flag = 0 * CHKERR( MPI_Initialized(&flag) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Initialized((&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 171, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":172 * cdef int flag = 0 * CHKERR( MPI_Initialized(&flag) ) * return flag # <<<<<<<<<<<<<< * * def Is_finalized(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":166 * return flag * * def Is_initialized(): # <<<<<<<<<<<<<< * """ * Indicates whether ``Init`` has been called */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Is_initialized", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":174 * return flag * * def Is_finalized(): # <<<<<<<<<<<<<< * """ * Indicates whether ``Finalize`` has completed */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_57Is_finalized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_56Is_finalized[] = "Is_finalized()\n\n Indicates whether ``Finalize`` has completed\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_57Is_finalized = {"Is_finalized", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_57Is_finalized, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_56Is_finalized}; static PyObject *__pyx_pw_6mpi4py_3MPI_57Is_finalized(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Is_finalized (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Is_finalized", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Is_finalized", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_56Is_finalized(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_56Is_finalized(CYTHON_UNUSED PyObject *__pyx_self) { int __pyx_v_flag; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Is_finalized", 0); /* "mpi4py/MPI/MPI.pyx":178 * Indicates whether ``Finalize`` has completed * """ * cdef int flag = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Finalized(&flag) ) * return flag */ __pyx_v_flag = 0; /* "mpi4py/MPI/MPI.pyx":179 * """ * cdef int flag = 0 * CHKERR( MPI_Finalized(&flag) ) # <<<<<<<<<<<<<< * return flag * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Finalized((&__pyx_v_flag))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 179, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":180 * cdef int flag = 0 * CHKERR( MPI_Finalized(&flag) ) * return flag # <<<<<<<<<<<<<< * * # Implementation Information */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBool_FromLong((__pyx_v_flag != 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":174 * return flag * * def Is_finalized(): # <<<<<<<<<<<<<< * """ * Indicates whether ``Finalize`` has completed */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Is_finalized", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":191 * SUBVERSION = MPI_SUBVERSION * * def Get_version(): # <<<<<<<<<<<<<< * """ * Obtain the version number of the MPI standard supported */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_59Get_version(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_58Get_version[] = "Get_version()\n\n Obtain the version number of the MPI standard supported\n by the implementation as a tuple ``(version, subversion)``\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_59Get_version = {"Get_version", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_59Get_version, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_58Get_version}; static PyObject *__pyx_pw_6mpi4py_3MPI_59Get_version(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_version (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_version", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_version", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_58Get_version(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_58Get_version(CYTHON_UNUSED PyObject *__pyx_self) { int __pyx_v_version; int __pyx_v_subversion; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("Get_version", 0); /* "mpi4py/MPI/MPI.pyx":196 * by the implementation as a tuple ``(version, subversion)`` * """ * cdef int version = 1 # <<<<<<<<<<<<<< * cdef int subversion = 0 * CHKERR( MPI_Get_version(&version, &subversion) ) */ __pyx_v_version = 1; /* "mpi4py/MPI/MPI.pyx":197 * """ * cdef int version = 1 * cdef int subversion = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Get_version(&version, &subversion) ) * return (version, subversion) */ __pyx_v_subversion = 0; /* "mpi4py/MPI/MPI.pyx":198 * cdef int version = 1 * cdef int subversion = 0 * CHKERR( MPI_Get_version(&version, &subversion) ) # <<<<<<<<<<<<<< * return (version, subversion) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_version((&__pyx_v_version), (&__pyx_v_subversion))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 198, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":199 * cdef int subversion = 0 * CHKERR( MPI_Get_version(&version, &subversion) ) * return (version, subversion) # <<<<<<<<<<<<<< * * def Get_library_version(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_subversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":191 * SUBVERSION = MPI_SUBVERSION * * def Get_version(): # <<<<<<<<<<<<<< * """ * Obtain the version number of the MPI standard supported */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("mpi4py.MPI.Get_version", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":201 * return (version, subversion) * * def Get_library_version(): # <<<<<<<<<<<<<< * """ * Obtain the version string of the MPI library */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_61Get_library_version(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_60Get_library_version[] = "Get_library_version()\n\n Obtain the version string of the MPI library\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_61Get_library_version = {"Get_library_version", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_61Get_library_version, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_60Get_library_version}; static PyObject *__pyx_pw_6mpi4py_3MPI_61Get_library_version(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_library_version (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_library_version", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_library_version", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_60Get_library_version(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_60Get_library_version(CYTHON_UNUSED PyObject *__pyx_self) { char __pyx_v_name[(MPI_MAX_LIBRARY_VERSION_STRING + 1)]; int __pyx_v_nlen; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_library_version", 0); /* "mpi4py/MPI/MPI.pyx":206 * """ * cdef char name[MPI_MAX_LIBRARY_VERSION_STRING+1] * cdef int nlen = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Get_library_version(name, &nlen) ) * return tompistr(name, nlen) */ __pyx_v_nlen = 0; /* "mpi4py/MPI/MPI.pyx":207 * cdef char name[MPI_MAX_LIBRARY_VERSION_STRING+1] * cdef int nlen = 0 * CHKERR( MPI_Get_library_version(name, &nlen) ) # <<<<<<<<<<<<<< * return tompistr(name, nlen) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_library_version(__pyx_v_name, (&__pyx_v_nlen))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 207, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":208 * cdef int nlen = 0 * CHKERR( MPI_Get_library_version(name, &nlen) ) * return tompistr(name, nlen) # <<<<<<<<<<<<<< * * # Environmental Inquires */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_tompistr(__pyx_v_name, __pyx_v_nlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":201 * return (version, subversion) * * def Get_library_version(): # <<<<<<<<<<<<<< * """ * Obtain the version string of the MPI library */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Get_library_version", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":213 * # ---------------------- * * def Get_processor_name(): # <<<<<<<<<<<<<< * """ * Obtain the name of the calling processor */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_63Get_processor_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_62Get_processor_name[] = "Get_processor_name()\n\n Obtain the name of the calling processor\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_63Get_processor_name = {"Get_processor_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_63Get_processor_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_62Get_processor_name}; static PyObject *__pyx_pw_6mpi4py_3MPI_63Get_processor_name(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Get_processor_name (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Get_processor_name", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Get_processor_name", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_62Get_processor_name(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_62Get_processor_name(CYTHON_UNUSED PyObject *__pyx_self) { char __pyx_v_name[(MPI_MAX_PROCESSOR_NAME + 1)]; int __pyx_v_nlen; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("Get_processor_name", 0); /* "mpi4py/MPI/MPI.pyx":218 * """ * cdef char name[MPI_MAX_PROCESSOR_NAME+1] * cdef int nlen = 0 # <<<<<<<<<<<<<< * CHKERR( MPI_Get_processor_name(name, &nlen) ) * return tompistr(name, nlen) */ __pyx_v_nlen = 0; /* "mpi4py/MPI/MPI.pyx":219 * cdef char name[MPI_MAX_PROCESSOR_NAME+1] * cdef int nlen = 0 * CHKERR( MPI_Get_processor_name(name, &nlen) ) # <<<<<<<<<<<<<< * return tompistr(name, nlen) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Get_processor_name(__pyx_v_name, (&__pyx_v_nlen))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 219, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":220 * cdef int nlen = 0 * CHKERR( MPI_Get_processor_name(name, &nlen) ) * return tompistr(name, nlen) # <<<<<<<<<<<<<< * * # Timers and Synchronization */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_tompistr(__pyx_v_name, __pyx_v_nlen); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":213 * # ---------------------- * * def Get_processor_name(): # <<<<<<<<<<<<<< * """ * Obtain the name of the calling processor */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("mpi4py.MPI.Get_processor_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":225 * # -------------------------- * * def Wtime(): # <<<<<<<<<<<<<< * """ * Return an elapsed time on the calling processor */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_65Wtime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_64Wtime[] = "Wtime()\n\n Return an elapsed time on the calling processor\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_65Wtime = {"Wtime", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_65Wtime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_64Wtime}; static PyObject *__pyx_pw_6mpi4py_3MPI_65Wtime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Wtime (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Wtime", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Wtime", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_64Wtime(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_64Wtime(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("Wtime", 0); /* "mpi4py/MPI/MPI.pyx":229 * Return an elapsed time on the calling processor * """ * return MPI_Wtime() # <<<<<<<<<<<<<< * * def Wtick(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(MPI_Wtime()); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":225 * # -------------------------- * * def Wtime(): # <<<<<<<<<<<<<< * """ * Return an elapsed time on the calling processor */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Wtime", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":231 * return MPI_Wtime() * * def Wtick(): # <<<<<<<<<<<<<< * """ * Return the resolution of ``Wtime`` */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_67Wtick(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_66Wtick[] = "Wtick()\n\n Return the resolution of ``Wtime``\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_67Wtick = {"Wtick", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_67Wtick, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_66Wtick}; static PyObject *__pyx_pw_6mpi4py_3MPI_67Wtick(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Wtick (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("Wtick", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Wtick", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_66Wtick(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_66Wtick(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("Wtick", 0); /* "mpi4py/MPI/MPI.pyx":235 * Return the resolution of ``Wtime`` * """ * return MPI_Wtick() # <<<<<<<<<<<<<< * * # Control of Profiling */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyFloat_FromDouble(MPI_Wtick()); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":231 * return MPI_Wtime() * * def Wtick(): # <<<<<<<<<<<<<< * """ * Return the resolution of ``Wtime`` */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("mpi4py.MPI.Wtick", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":240 * # -------------------- * * def Pcontrol(int level): # <<<<<<<<<<<<<< * """ * Control profiling */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_69Pcontrol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_68Pcontrol[] = "Pcontrol(int level)\n\n Control profiling\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_69Pcontrol = {"Pcontrol", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_69Pcontrol, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_68Pcontrol}; static PyObject *__pyx_pw_6mpi4py_3MPI_69Pcontrol(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { int __pyx_v_level; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Pcontrol (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_level,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Pcontrol") < 0)) __PYX_ERR(8, 240, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_level = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 240, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("Pcontrol", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(8, 240, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI.Pcontrol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_68Pcontrol(__pyx_self, __pyx_v_level); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_68Pcontrol(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_level) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; __Pyx_RefNannySetupContext("Pcontrol", 0); /* "mpi4py/MPI/MPI.pyx":244 * Control profiling * """ * if level < 0 or level > 2: CHKERR( MPI_ERR_ARG ) # <<<<<<<<<<<<<< * CHKERR( MPI_Pcontrol(level) ) * */ __pyx_t_2 = ((__pyx_v_level < 0) != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = ((__pyx_v_level > 2) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_ERR_ARG); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 244, __pyx_L1_error) } /* "mpi4py/MPI/MPI.pyx":245 * """ * if level < 0 or level > 2: CHKERR( MPI_ERR_ARG ) * CHKERR( MPI_Pcontrol(level) ) # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __pyx_f_6mpi4py_3MPI_CHKERR(MPI_Pcontrol(__pyx_v_level)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 245, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":240 * # -------------------- * * def Pcontrol(int level): # <<<<<<<<<<<<<< * """ * Control profiling */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI.Pcontrol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":268 * int PyMPI_Get_vendor(const char**,int*,int*,int*) nogil * * def get_vendor(): # <<<<<<<<<<<<<< * """ * Infomation about the underlying MPI implementation */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_71get_vendor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_70get_vendor[] = "get_vendor()\n\n Infomation about the underlying MPI implementation\n\n :Returns:\n - a string with the name of the MPI implementation\n - an integer 3-tuple version ``(major, minor, micro)``\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_71get_vendor = {"get_vendor", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_71get_vendor, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_70get_vendor}; static PyObject *__pyx_pw_6mpi4py_3MPI_71get_vendor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_vendor (wrapper)", 0); if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { __Pyx_RaiseArgtupleInvalid("get_vendor", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_vendor", 0))) return NULL; __pyx_r = __pyx_pf_6mpi4py_3MPI_70get_vendor(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_70get_vendor(CYTHON_UNUSED PyObject *__pyx_self) { char const *__pyx_v_name; int __pyx_v_major; int __pyx_v_minor; int __pyx_v_micro; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_vendor", 0); /* "mpi4py/MPI/MPI.pyx":276 * - an integer 3-tuple version ``(major, minor, micro)`` * """ * cdef const char *name=NULL # <<<<<<<<<<<<<< * cdef int major=0, minor=0, micro=0 * CHKERR( PyMPI_Get_vendor(&name, &major, &minor, µ) ) */ __pyx_v_name = NULL; /* "mpi4py/MPI/MPI.pyx":277 * """ * cdef const char *name=NULL * cdef int major=0, minor=0, micro=0 # <<<<<<<<<<<<<< * CHKERR( PyMPI_Get_vendor(&name, &major, &minor, µ) ) * return (mpistr(name), (major, minor, micro)) */ __pyx_v_major = 0; __pyx_v_minor = 0; __pyx_v_micro = 0; /* "mpi4py/MPI/MPI.pyx":278 * cdef const char *name=NULL * cdef int major=0, minor=0, micro=0 * CHKERR( PyMPI_Get_vendor(&name, &major, &minor, µ) ) # <<<<<<<<<<<<<< * return (mpistr(name), (major, minor, micro)) * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI_CHKERR(PyMPI_Get_vendor((&__pyx_v_name), (&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_micro))); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 278, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":279 * cdef int major=0, minor=0, micro=0 * CHKERR( PyMPI_Get_vendor(&name, &major, &minor, µ) ) * return (mpistr(name), (major, minor, micro)) # <<<<<<<<<<<<<< * * # -------------------------------------------------------------------- */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_mpistr(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_major); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_minor); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_micro); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":268 * int PyMPI_Get_vendor(const char**,int*,int*,int*) nogil * * def get_vendor(): # <<<<<<<<<<<<<< * """ * Infomation about the underlying MPI implementation */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("mpi4py.MPI.get_vendor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":287 * ctypedef size_t Py_uintptr_t * * cdef inline int _mpi_type(object arg, type cls) except -1: # <<<<<<<<<<<<<< * if isinstance(arg, type): * if issubclass(arg, cls): return 1 */ static CYTHON_INLINE int __pyx_f_6mpi4py_3MPI__mpi_type(PyObject *__pyx_v_arg, PyTypeObject *__pyx_v_cls) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("_mpi_type", 0); /* "mpi4py/MPI/MPI.pyx":288 * * cdef inline int _mpi_type(object arg, type cls) except -1: * if isinstance(arg, type): # <<<<<<<<<<<<<< * if issubclass(arg, cls): return 1 * else: */ __pyx_t_1 = PyType_Check(__pyx_v_arg); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":289 * cdef inline int _mpi_type(object arg, type cls) except -1: * if isinstance(arg, type): * if issubclass(arg, cls): return 1 # <<<<<<<<<<<<<< * else: * if isinstance(arg, cls): return 1 */ __pyx_t_2 = PyObject_IsSubclass(__pyx_v_arg, ((PyObject *)__pyx_v_cls)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(8, 289, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { __pyx_r = 1; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":288 * * cdef inline int _mpi_type(object arg, type cls) except -1: * if isinstance(arg, type): # <<<<<<<<<<<<<< * if issubclass(arg, cls): return 1 * else: */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":291 * if issubclass(arg, cls): return 1 * else: * if isinstance(arg, cls): return 1 # <<<<<<<<<<<<<< * return 0 * */ /*else*/ { __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_cls); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __pyx_r = 1; goto __pyx_L0; } } __pyx_L3:; /* "mpi4py/MPI/MPI.pyx":292 * else: * if isinstance(arg, cls): return 1 * return 0 # <<<<<<<<<<<<<< * * def _sizeof(arg): */ __pyx_r = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":287 * ctypedef size_t Py_uintptr_t * * cdef inline int _mpi_type(object arg, type cls) except -1: # <<<<<<<<<<<<<< * if isinstance(arg, type): * if issubclass(arg, cls): return 1 */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("mpi4py.MPI._mpi_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":294 * return 0 * * def _sizeof(arg): # <<<<<<<<<<<<<< * """ * Size in bytes of the underlying MPI handle */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_73_sizeof(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_72_sizeof[] = "_sizeof(arg)\n\n Size in bytes of the underlying MPI handle\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_73_sizeof = {"_sizeof", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_73_sizeof, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_72_sizeof}; static PyObject *__pyx_pw_6mpi4py_3MPI_73_sizeof(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_sizeof (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_sizeof") < 0)) __PYX_ERR(8, 294, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_sizeof", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(8, 294, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI._sizeof", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_72_sizeof(__pyx_self, __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_72_sizeof(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_sizeof", 0); /* "mpi4py/MPI/MPI.pyx":298 * Size in bytes of the underlying MPI handle * """ * if _mpi_type(arg, Status): return sizeof(MPI_Status) # <<<<<<<<<<<<<< * if _mpi_type(arg, Datatype): return sizeof(MPI_Datatype) * if _mpi_type(arg, Request): return sizeof(MPI_Request) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Status); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 298, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Status))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":299 * """ * if _mpi_type(arg, Status): return sizeof(MPI_Status) * if _mpi_type(arg, Datatype): return sizeof(MPI_Datatype) # <<<<<<<<<<<<<< * if _mpi_type(arg, Request): return sizeof(MPI_Request) * if _mpi_type(arg, Message): return sizeof(MPI_Message) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Datatype); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 299, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Datatype))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":300 * if _mpi_type(arg, Status): return sizeof(MPI_Status) * if _mpi_type(arg, Datatype): return sizeof(MPI_Datatype) * if _mpi_type(arg, Request): return sizeof(MPI_Request) # <<<<<<<<<<<<<< * if _mpi_type(arg, Message): return sizeof(MPI_Message) * if _mpi_type(arg, Op): return sizeof(MPI_Op) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Request); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 300, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Request))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":301 * if _mpi_type(arg, Datatype): return sizeof(MPI_Datatype) * if _mpi_type(arg, Request): return sizeof(MPI_Request) * if _mpi_type(arg, Message): return sizeof(MPI_Message) # <<<<<<<<<<<<<< * if _mpi_type(arg, Op): return sizeof(MPI_Op) * if _mpi_type(arg, Group): return sizeof(MPI_Group) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Message); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 301, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Message))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":302 * if _mpi_type(arg, Request): return sizeof(MPI_Request) * if _mpi_type(arg, Message): return sizeof(MPI_Message) * if _mpi_type(arg, Op): return sizeof(MPI_Op) # <<<<<<<<<<<<<< * if _mpi_type(arg, Group): return sizeof(MPI_Group) * if _mpi_type(arg, Info): return sizeof(MPI_Info) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Op); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 302, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Op))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":303 * if _mpi_type(arg, Message): return sizeof(MPI_Message) * if _mpi_type(arg, Op): return sizeof(MPI_Op) * if _mpi_type(arg, Group): return sizeof(MPI_Group) # <<<<<<<<<<<<<< * if _mpi_type(arg, Info): return sizeof(MPI_Info) * if _mpi_type(arg, Errhandler): return sizeof(MPI_Errhandler) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Group); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 303, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Group))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":304 * if _mpi_type(arg, Op): return sizeof(MPI_Op) * if _mpi_type(arg, Group): return sizeof(MPI_Group) * if _mpi_type(arg, Info): return sizeof(MPI_Info) # <<<<<<<<<<<<<< * if _mpi_type(arg, Errhandler): return sizeof(MPI_Errhandler) * if _mpi_type(arg, Comm): return sizeof(MPI_Comm) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Info); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 304, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Info))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":305 * if _mpi_type(arg, Group): return sizeof(MPI_Group) * if _mpi_type(arg, Info): return sizeof(MPI_Info) * if _mpi_type(arg, Errhandler): return sizeof(MPI_Errhandler) # <<<<<<<<<<<<<< * if _mpi_type(arg, Comm): return sizeof(MPI_Comm) * if _mpi_type(arg, Win): return sizeof(MPI_Win) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Errhandler); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 305, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Errhandler))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":306 * if _mpi_type(arg, Info): return sizeof(MPI_Info) * if _mpi_type(arg, Errhandler): return sizeof(MPI_Errhandler) * if _mpi_type(arg, Comm): return sizeof(MPI_Comm) # <<<<<<<<<<<<<< * if _mpi_type(arg, Win): return sizeof(MPI_Win) * if _mpi_type(arg, File): return sizeof(MPI_File) */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Comm); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 306, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Comm))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":307 * if _mpi_type(arg, Errhandler): return sizeof(MPI_Errhandler) * if _mpi_type(arg, Comm): return sizeof(MPI_Comm) * if _mpi_type(arg, Win): return sizeof(MPI_Win) # <<<<<<<<<<<<<< * if _mpi_type(arg, File): return sizeof(MPI_File) * raise TypeError("expecting an MPI type or instance") */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Win); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 307, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_Win))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":308 * if _mpi_type(arg, Comm): return sizeof(MPI_Comm) * if _mpi_type(arg, Win): return sizeof(MPI_Win) * if _mpi_type(arg, File): return sizeof(MPI_File) # <<<<<<<<<<<<<< * raise TypeError("expecting an MPI type or instance") * */ __pyx_t_1 = __pyx_f_6mpi4py_3MPI__mpi_type(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_File); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(8, 308, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MPI_File))); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "mpi4py/MPI/MPI.pyx":309 * if _mpi_type(arg, Win): return sizeof(MPI_Win) * if _mpi_type(arg, File): return sizeof(MPI_File) * raise TypeError("expecting an MPI type or instance") # <<<<<<<<<<<<<< * * def _addressof(arg): */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__128, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(8, 309, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":294 * return 0 * * def _sizeof(arg): # <<<<<<<<<<<<<< * """ * Size in bytes of the underlying MPI handle */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._sizeof", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":311 * raise TypeError("expecting an MPI type or instance") * * def _addressof(arg): # <<<<<<<<<<<<<< * """ * Memory address of the underlying MPI handle */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_75_addressof(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_74_addressof[] = "_addressof(arg)\n\n Memory address of the underlying MPI handle\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_75_addressof = {"_addressof", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_75_addressof, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_74_addressof}; static PyObject *__pyx_pw_6mpi4py_3MPI_75_addressof(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_addressof (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_addressof") < 0)) __PYX_ERR(8, 311, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_addressof", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(8, 311, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI._addressof", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_74_addressof(__pyx_self, __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_74_addressof(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg) { void *__pyx_v_ptr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_addressof", 0); /* "mpi4py/MPI/MPI.pyx":315 * Memory address of the underlying MPI handle * """ * cdef void *ptr = NULL # <<<<<<<<<<<<<< * if isinstance(arg, Status): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = NULL; /* "mpi4py/MPI/MPI.pyx":316 * """ * cdef void *ptr = NULL * if isinstance(arg, Status): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Datatype): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Status); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":317 * cdef void *ptr = NULL * if isinstance(arg, Status): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, Datatype): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPIStatusObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":316 * """ * cdef void *ptr = NULL * if isinstance(arg, Status): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Datatype): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":318 * if isinstance(arg, Status): * ptr = &(arg).ob_mpi * elif isinstance(arg, Datatype): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Request): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Datatype); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":319 * ptr = &(arg).ob_mpi * elif isinstance(arg, Datatype): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, Request): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPIDatatypeObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":318 * if isinstance(arg, Status): * ptr = &(arg).ob_mpi * elif isinstance(arg, Datatype): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Request): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":320 * elif isinstance(arg, Datatype): * ptr = &(arg).ob_mpi * elif isinstance(arg, Request): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Message): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Request); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":321 * ptr = &(arg).ob_mpi * elif isinstance(arg, Request): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, Message): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPIRequestObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":320 * elif isinstance(arg, Datatype): * ptr = &(arg).ob_mpi * elif isinstance(arg, Request): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Message): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":322 * elif isinstance(arg, Request): * ptr = &(arg).ob_mpi * elif isinstance(arg, Message): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Op): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Message); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":323 * ptr = &(arg).ob_mpi * elif isinstance(arg, Message): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, Op): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPIMessageObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":322 * elif isinstance(arg, Request): * ptr = &(arg).ob_mpi * elif isinstance(arg, Message): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Op): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":324 * elif isinstance(arg, Message): * ptr = &(arg).ob_mpi * elif isinstance(arg, Op): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Group): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Op); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":325 * ptr = &(arg).ob_mpi * elif isinstance(arg, Op): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, Group): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPIOpObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":324 * elif isinstance(arg, Message): * ptr = &(arg).ob_mpi * elif isinstance(arg, Op): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Group): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":326 * elif isinstance(arg, Op): * ptr = &(arg).ob_mpi * elif isinstance(arg, Group): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Info): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Group); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":327 * ptr = &(arg).ob_mpi * elif isinstance(arg, Group): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, Info): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPIGroupObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":326 * elif isinstance(arg, Op): * ptr = &(arg).ob_mpi * elif isinstance(arg, Group): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Info): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":328 * elif isinstance(arg, Group): * ptr = &(arg).ob_mpi * elif isinstance(arg, Info): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Errhandler): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Info); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":329 * ptr = &(arg).ob_mpi * elif isinstance(arg, Info): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, Errhandler): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPIInfoObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":328 * elif isinstance(arg, Group): * ptr = &(arg).ob_mpi * elif isinstance(arg, Info): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Errhandler): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":330 * elif isinstance(arg, Info): * ptr = &(arg).ob_mpi * elif isinstance(arg, Errhandler): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Comm): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Errhandler); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":331 * ptr = &(arg).ob_mpi * elif isinstance(arg, Errhandler): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, Comm): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPIErrhandlerObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":330 * elif isinstance(arg, Info): * ptr = &(arg).ob_mpi * elif isinstance(arg, Errhandler): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Comm): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":332 * elif isinstance(arg, Errhandler): * ptr = &(arg).ob_mpi * elif isinstance(arg, Comm): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Win): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Comm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":333 * ptr = &(arg).ob_mpi * elif isinstance(arg, Comm): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, Win): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPICommObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":332 * elif isinstance(arg, Errhandler): * ptr = &(arg).ob_mpi * elif isinstance(arg, Comm): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, Win): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":334 * elif isinstance(arg, Comm): * ptr = &(arg).ob_mpi * elif isinstance(arg, Win): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, File): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Win); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":335 * ptr = &(arg).ob_mpi * elif isinstance(arg, Win): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * elif isinstance(arg, File): * ptr = &(arg).ob_mpi */ __pyx_v_ptr = ((void *)(&((struct PyMPIWinObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":334 * elif isinstance(arg, Comm): * ptr = &(arg).ob_mpi * elif isinstance(arg, Win): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * elif isinstance(arg, File): */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":336 * elif isinstance(arg, Win): * ptr = &(arg).ob_mpi * elif isinstance(arg, File): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * else: */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_File); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { /* "mpi4py/MPI/MPI.pyx":337 * ptr = &(arg).ob_mpi * elif isinstance(arg, File): * ptr = &(arg).ob_mpi # <<<<<<<<<<<<<< * else: * raise TypeError("expecting an MPI instance") */ __pyx_v_ptr = ((void *)(&((struct PyMPIFileObject *)__pyx_v_arg)->ob_mpi)); /* "mpi4py/MPI/MPI.pyx":336 * elif isinstance(arg, Win): * ptr = &(arg).ob_mpi * elif isinstance(arg, File): # <<<<<<<<<<<<<< * ptr = &(arg).ob_mpi * else: */ goto __pyx_L3; } /* "mpi4py/MPI/MPI.pyx":339 * ptr = &(arg).ob_mpi * else: * raise TypeError("expecting an MPI instance") # <<<<<<<<<<<<<< * return PyLong_FromVoidPtr(ptr) * */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(8, 339, __pyx_L1_error) } __pyx_L3:; /* "mpi4py/MPI/MPI.pyx":340 * else: * raise TypeError("expecting an MPI instance") * return PyLong_FromVoidPtr(ptr) # <<<<<<<<<<<<<< * * def _handleof(arg): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = PyLong_FromVoidPtr(__pyx_v_ptr); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":311 * raise TypeError("expecting an MPI type or instance") * * def _addressof(arg): # <<<<<<<<<<<<<< * """ * Memory address of the underlying MPI handle */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._addressof", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "mpi4py/MPI/MPI.pyx":342 * return PyLong_FromVoidPtr(ptr) * * def _handleof(arg): # <<<<<<<<<<<<<< * """ * Unsigned integer value with the underlying MPI handle */ /* Python wrapper */ static PyObject *__pyx_pw_6mpi4py_3MPI_77_handleof(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_6mpi4py_3MPI_76_handleof[] = "_handleof(arg)\n\n Unsigned integer value with the underlying MPI handle\n "; static PyMethodDef __pyx_mdef_6mpi4py_3MPI_77_handleof = {"_handleof", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_77_handleof, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_76_handleof}; static PyObject *__pyx_pw_6mpi4py_3MPI_77_handleof(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_arg = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handleof (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_handleof") < 0)) __PYX_ERR(8, 342, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_arg = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_handleof", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(8, 342, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("mpi4py.MPI._handleof", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_6mpi4py_3MPI_76_handleof(__pyx_self, __pyx_v_arg); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_6mpi4py_3MPI_76_handleof(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_handleof", 0); /* "mpi4py/MPI/MPI.pyx":346 * Unsigned integer value with the underlying MPI handle * """ * if isinstance(arg, Status): # <<<<<<<<<<<<<< * raise NotImplementedError * elif isinstance(arg, Datatype): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Status); __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { /* "mpi4py/MPI/MPI.pyx":347 * """ * if isinstance(arg, Status): * raise NotImplementedError # <<<<<<<<<<<<<< * elif isinstance(arg, Datatype): * return ((arg).ob_mpi) */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); __PYX_ERR(8, 347, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":346 * Unsigned integer value with the underlying MPI handle * """ * if isinstance(arg, Status): # <<<<<<<<<<<<<< * raise NotImplementedError * elif isinstance(arg, Datatype): */ } /* "mpi4py/MPI/MPI.pyx":348 * if isinstance(arg, Status): * raise NotImplementedError * elif isinstance(arg, Datatype): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Request): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Datatype); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":349 * raise NotImplementedError * elif isinstance(arg, Datatype): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * elif isinstance(arg, Request): * return ((arg).ob_mpi) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPIDatatypeObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":348 * if isinstance(arg, Status): * raise NotImplementedError * elif isinstance(arg, Datatype): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Request): */ } /* "mpi4py/MPI/MPI.pyx":350 * elif isinstance(arg, Datatype): * return ((arg).ob_mpi) * elif isinstance(arg, Request): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Message): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Request); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":351 * return ((arg).ob_mpi) * elif isinstance(arg, Request): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * elif isinstance(arg, Message): * return ((arg).ob_mpi) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPIRequestObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":350 * elif isinstance(arg, Datatype): * return ((arg).ob_mpi) * elif isinstance(arg, Request): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Message): */ } /* "mpi4py/MPI/MPI.pyx":352 * elif isinstance(arg, Request): * return ((arg).ob_mpi) * elif isinstance(arg, Message): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Op): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Message); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":353 * return ((arg).ob_mpi) * elif isinstance(arg, Message): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * elif isinstance(arg, Op): * return ((arg).ob_mpi) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPIMessageObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":352 * elif isinstance(arg, Request): * return ((arg).ob_mpi) * elif isinstance(arg, Message): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Op): */ } /* "mpi4py/MPI/MPI.pyx":354 * elif isinstance(arg, Message): * return ((arg).ob_mpi) * elif isinstance(arg, Op): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Group): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Op); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":355 * return ((arg).ob_mpi) * elif isinstance(arg, Op): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * elif isinstance(arg, Group): * return ((arg).ob_mpi) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPIOpObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":354 * elif isinstance(arg, Message): * return ((arg).ob_mpi) * elif isinstance(arg, Op): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Group): */ } /* "mpi4py/MPI/MPI.pyx":356 * elif isinstance(arg, Op): * return ((arg).ob_mpi) * elif isinstance(arg, Group): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Info): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Group); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":357 * return ((arg).ob_mpi) * elif isinstance(arg, Group): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * elif isinstance(arg, Info): * return ((arg).ob_mpi) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPIGroupObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":356 * elif isinstance(arg, Op): * return ((arg).ob_mpi) * elif isinstance(arg, Group): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Info): */ } /* "mpi4py/MPI/MPI.pyx":358 * elif isinstance(arg, Group): * return ((arg).ob_mpi) * elif isinstance(arg, Info): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Errhandler): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Info); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":359 * return ((arg).ob_mpi) * elif isinstance(arg, Info): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * elif isinstance(arg, Errhandler): * return ((arg).ob_mpi) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPIInfoObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":358 * elif isinstance(arg, Group): * return ((arg).ob_mpi) * elif isinstance(arg, Info): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Errhandler): */ } /* "mpi4py/MPI/MPI.pyx":360 * elif isinstance(arg, Info): * return ((arg).ob_mpi) * elif isinstance(arg, Errhandler): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Comm): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Errhandler); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":361 * return ((arg).ob_mpi) * elif isinstance(arg, Errhandler): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * elif isinstance(arg, Comm): * return ((arg).ob_mpi) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPIErrhandlerObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":360 * elif isinstance(arg, Info): * return ((arg).ob_mpi) * elif isinstance(arg, Errhandler): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Comm): */ } /* "mpi4py/MPI/MPI.pyx":362 * elif isinstance(arg, Errhandler): * return ((arg).ob_mpi) * elif isinstance(arg, Comm): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Win): */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Comm); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "mpi4py/MPI/MPI.pyx":363 * return ((arg).ob_mpi) * elif isinstance(arg, Comm): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * elif isinstance(arg, Win): * return ((arg).ob_mpi) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPICommObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":362 * elif isinstance(arg, Errhandler): * return ((arg).ob_mpi) * elif isinstance(arg, Comm): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, Win): */ } /* "mpi4py/MPI/MPI.pyx":364 * elif isinstance(arg, Comm): * return ((arg).ob_mpi) * elif isinstance(arg, Win): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, File): */ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_Win); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { /* "mpi4py/MPI/MPI.pyx":365 * return ((arg).ob_mpi) * elif isinstance(arg, Win): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * elif isinstance(arg, File): * return ((arg).ob_mpi) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPIWinObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":364 * elif isinstance(arg, Comm): * return ((arg).ob_mpi) * elif isinstance(arg, Win): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * elif isinstance(arg, File): */ } /* "mpi4py/MPI/MPI.pyx":366 * elif isinstance(arg, Win): * return ((arg).ob_mpi) * elif isinstance(arg, File): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * else: */ __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_ptype_6mpi4py_3MPI_File); __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { /* "mpi4py/MPI/MPI.pyx":367 * return ((arg).ob_mpi) * elif isinstance(arg, File): * return ((arg).ob_mpi) # <<<<<<<<<<<<<< * else: * raise TypeError("expecting an MPI instance") */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_FromSize_t(((Py_uintptr_t)((struct PyMPIFileObject *)__pyx_v_arg)->ob_mpi)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "mpi4py/MPI/MPI.pyx":366 * elif isinstance(arg, Win): * return ((arg).ob_mpi) * elif isinstance(arg, File): # <<<<<<<<<<<<<< * return ((arg).ob_mpi) * else: */ } /* "mpi4py/MPI/MPI.pyx":369 * return ((arg).ob_mpi) * else: * raise TypeError("expecting an MPI instance") # <<<<<<<<<<<<<< * * # -------------------------------------------------------------------- */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(8, 369, __pyx_L1_error) } /* "mpi4py/MPI/MPI.pyx":342 * return PyLong_FromVoidPtr(ptr) * * def _handleof(arg): # <<<<<<<<<<<<<< * """ * Unsigned integer value with the underlying MPI handle */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("mpi4py.MPI._handleof", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_6mpi4py_3MPI_Status(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_6Status_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Status(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_6Status_source(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_6Status_6source_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_6Status_source(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_6Status_6source_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6mpi4py_3MPI_6Status_tag(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_6Status_3tag_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_6Status_tag(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_6Status_3tag_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6mpi4py_3MPI_6Status_error(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_6Status_5error_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_6Status_error(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_6Status_5error_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6mpi4py_3MPI_6Status_count(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_6Status_5count_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_6Status_cancelled(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_6Status_9cancelled_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_6Status_cancelled(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_6Status_9cancelled_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Status[] = { {"Get_source", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_5Get_source, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_4Get_source}, {"Set_source", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_7Set_source, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_6Set_source}, {"Get_tag", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_9Get_tag, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_8Get_tag}, {"Set_tag", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_11Set_tag, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_10Set_tag}, {"Get_error", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_13Get_error, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_12Get_error}, {"Set_error", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_15Set_error, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_14Set_error}, {"Get_count", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_17Get_count, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_16Get_count}, {"Get_elements", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_19Get_elements, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_18Get_elements}, {"Set_elements", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_21Set_elements, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_20Set_elements}, {"Is_cancelled", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_23Is_cancelled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_22Is_cancelled}, {"Set_cancelled", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_25Set_cancelled, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_24Set_cancelled}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_27py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_26py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Status_29f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Status_28f2py}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Status[] = { {(char *)"source", __pyx_getprop_6mpi4py_3MPI_6Status_source, __pyx_setprop_6mpi4py_3MPI_6Status_source, (char *)"source", 0}, {(char *)"tag", __pyx_getprop_6mpi4py_3MPI_6Status_tag, __pyx_setprop_6mpi4py_3MPI_6Status_tag, (char *)"tag", 0}, {(char *)"error", __pyx_getprop_6mpi4py_3MPI_6Status_error, __pyx_setprop_6mpi4py_3MPI_6Status_error, (char *)"error", 0}, {(char *)"count", __pyx_getprop_6mpi4py_3MPI_6Status_count, 0, (char *)"byte count", 0}, {(char *)"cancelled", __pyx_getprop_6mpi4py_3MPI_6Status_cancelled, __pyx_setprop_6mpi4py_3MPI_6Status_cancelled, (char *)"\n cancelled state\n ", 0}, {0, 0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PyMPIStatus_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Status", /*tp_name*/ sizeof(struct PyMPIStatusObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Status, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Status\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_6Status_3__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Status, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Status, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Status, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Datatype(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_8Datatype_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Datatype(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_8Datatype_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_size(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_4size_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_extent(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_6extent_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_lb(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_2lb_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_ub(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_2ub_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_true_extent(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_11true_extent_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_true_lb(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_7true_lb_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_true_ub(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_7true_ub_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_envelope(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_8envelope_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_contents(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_8contents_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_combiner(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_8combiner_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_is_named(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_8is_named_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_is_predefined(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_13is_predefined_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Datatype_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Datatype_4name_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_8Datatype_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_8Datatype_4name_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Datatype[] = { {"Get_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_9Get_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_8Get_size}, {"Get_extent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_11Get_extent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_10Get_extent}, {"Dup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_13Dup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_12Dup}, {"Create_contiguous", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_15Create_contiguous, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_14Create_contiguous}, {"Create_vector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_17Create_vector, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_16Create_vector}, {"Create_hvector", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_19Create_hvector, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_18Create_hvector}, {"Create_indexed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_21Create_indexed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_20Create_indexed}, {"Create_hindexed", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_23Create_hindexed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_22Create_hindexed}, {"Create_indexed_block", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_25Create_indexed_block, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_24Create_indexed_block}, {"Create_hindexed_block", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_27Create_hindexed_block, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_26Create_hindexed_block}, {"Create_struct", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_29Create_struct, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_28Create_struct}, {"Create_subarray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_31Create_subarray, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_30Create_subarray}, {"Create_darray", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_33Create_darray, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_32Create_darray}, {"Create_f90_integer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_35Create_f90_integer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_34Create_f90_integer}, {"Create_f90_real", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_37Create_f90_real, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_36Create_f90_real}, {"Create_f90_complex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_39Create_f90_complex, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_38Create_f90_complex}, {"Match_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_41Match_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_40Match_size}, {"Commit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_43Commit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_42Commit}, {"Free", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_45Free, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_44Free}, {"Create_resized", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_47Create_resized, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_46Create_resized}, {"Get_true_extent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_49Get_true_extent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_48Get_true_extent}, {"Get_envelope", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_51Get_envelope, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_50Get_envelope}, {"Get_contents", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_53Get_contents, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_52Get_contents}, {"decode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_55decode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_54decode}, {"Pack", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_57Pack, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_56Pack}, {"Unpack", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_59Unpack, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_58Unpack}, {"Pack_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_61Pack_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_60Pack_size}, {"Pack_external", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_63Pack_external, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_62Pack_external}, {"Unpack_external", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_65Unpack_external, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_64Unpack_external}, {"Pack_external_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_67Pack_external_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_66Pack_external_size}, {"Get_attr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_69Get_attr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_68Get_attr}, {"Set_attr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_71Set_attr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_70Set_attr}, {"Delete_attr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_73Delete_attr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_72Delete_attr}, {"Create_keyval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_75Create_keyval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_74Create_keyval}, {"Free_keyval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_77Free_keyval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_76Free_keyval}, {"Get_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_79Get_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_78Get_name}, {"Set_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_81Set_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_80Set_name}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_83py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_82py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Datatype_85f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Datatype_84f2py}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Datatype[] = { {(char *)"size", __pyx_getprop_6mpi4py_3MPI_8Datatype_size, 0, (char *)"size (in bytes)", 0}, {(char *)"extent", __pyx_getprop_6mpi4py_3MPI_8Datatype_extent, 0, (char *)"extent", 0}, {(char *)"lb", __pyx_getprop_6mpi4py_3MPI_8Datatype_lb, 0, (char *)"lower bound", 0}, {(char *)"ub", __pyx_getprop_6mpi4py_3MPI_8Datatype_ub, 0, (char *)"upper bound", 0}, {(char *)"true_extent", __pyx_getprop_6mpi4py_3MPI_8Datatype_true_extent, 0, (char *)"true extent", 0}, {(char *)"true_lb", __pyx_getprop_6mpi4py_3MPI_8Datatype_true_lb, 0, (char *)"true lower bound", 0}, {(char *)"true_ub", __pyx_getprop_6mpi4py_3MPI_8Datatype_true_ub, 0, (char *)"true upper bound", 0}, {(char *)"envelope", __pyx_getprop_6mpi4py_3MPI_8Datatype_envelope, 0, (char *)"datatype envelope", 0}, {(char *)"contents", __pyx_getprop_6mpi4py_3MPI_8Datatype_contents, 0, (char *)"datatype contents", 0}, {(char *)"combiner", __pyx_getprop_6mpi4py_3MPI_8Datatype_combiner, 0, (char *)"datatype combiner", 0}, {(char *)"is_named", __pyx_getprop_6mpi4py_3MPI_8Datatype_is_named, 0, (char *)"is a named datatype", 0}, {(char *)"is_predefined", __pyx_getprop_6mpi4py_3MPI_8Datatype_is_predefined, 0, (char *)"is a predefined datatype", 0}, {(char *)"name", __pyx_getprop_6mpi4py_3MPI_8Datatype_name, __pyx_setprop_6mpi4py_3MPI_8Datatype_name, (char *)"datatype name", 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Datatype = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_8Datatype_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; DL_EXPORT(PyTypeObject) PyMPIDatatype_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Datatype", /*tp_name*/ sizeof(struct PyMPIDatatypeObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Datatype, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Datatype, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Datatype\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_8Datatype_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Datatype, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Datatype, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Datatype, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Request(PyTypeObject *t, PyObject *a, PyObject *k) { struct PyMPIRequestObject *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct PyMPIRequestObject *)o); p->ob_buf = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_7Request_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Request(PyObject *o) { struct PyMPIRequestObject *p = (struct PyMPIRequestObject *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_7Request_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->ob_buf); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI_Request(PyObject *o, visitproc v, void *a) { int e; struct PyMPIRequestObject *p = (struct PyMPIRequestObject *)o; if (p->ob_buf) { e = (*v)(p->ob_buf, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI_Request(PyObject *o) { PyObject* tmp; struct PyMPIRequestObject *p = (struct PyMPIRequestObject *)o; tmp = ((PyObject*)p->ob_buf); p->ob_buf = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Request[] = { {"Wait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_9Wait, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_8Wait}, {"Test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_11Test, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_10Test}, {"Free", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_13Free, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_12Free}, {"Get_status", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_15Get_status, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_14Get_status}, {"Waitany", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_17Waitany, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_16Waitany}, {"Testany", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_19Testany, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_18Testany}, {"Waitall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_21Waitall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_20Waitall}, {"Testall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_23Testall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_22Testall}, {"Waitsome", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_25Waitsome, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_24Waitsome}, {"Testsome", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_27Testsome, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_26Testsome}, {"Cancel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_29Cancel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_28Cancel}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_31py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_30py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_33f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_32f2py}, {"wait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_35wait, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_34wait}, {"test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_37test, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_36test}, {"waitany", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_39waitany, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_38waitany}, {"testany", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_41testany, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_40testany}, {"waitall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_43waitall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_42waitall}, {"testall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Request_45testall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Request_44testall}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Request = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_7Request_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; DL_EXPORT(PyTypeObject) PyMPIRequest_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Request", /*tp_name*/ sizeof(struct PyMPIRequestObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Request, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Request, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n Request\n ", /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI_Request, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI_Request, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_7Request_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Request, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Request, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Prequest(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6mpi4py_3MPI_Request(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_8Prequest_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Prequest[] = { {"Start", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Prequest_3Start, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Prequest_2Start}, {"Startall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Prequest_5Startall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Prequest_4Startall}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PyMPIPrequest_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Prequest", /*tp_name*/ sizeof(struct PyMPIPrequestObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Request, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n Persistent request\n ", /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI_Request, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI_Request, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Prequest, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Prequest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Grequest(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6mpi4py_3MPI_Request(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_8Grequest_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Grequest[] = { {"Start", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Grequest_3Start, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Grequest_2Start}, {"Complete", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Grequest_5Complete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Grequest_4Complete}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PyMPIGrequest_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Grequest", /*tp_name*/ sizeof(struct PyMPIGrequestObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Request, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n Generalized request\n ", /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI_Request, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI_Request, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Grequest, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Grequest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Message(PyTypeObject *t, PyObject *a, PyObject *k) { struct PyMPIMessageObject *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct PyMPIMessageObject *)o); p->ob_buf = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_7Message_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Message(PyObject *o) { struct PyMPIMessageObject *p = (struct PyMPIMessageObject *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_7Message_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->ob_buf); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI_Message(PyObject *o, visitproc v, void *a) { int e; struct PyMPIMessageObject *p = (struct PyMPIMessageObject *)o; if (p->ob_buf) { e = (*v)(p->ob_buf, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI_Message(PyObject *o) { PyObject* tmp; struct PyMPIMessageObject *p = (struct PyMPIMessageObject *)o; tmp = ((PyObject*)p->ob_buf); p->ob_buf = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Message[] = { {"Probe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_9Probe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_8Probe}, {"Iprobe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_11Iprobe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_10Iprobe}, {"Recv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_13Recv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_12Recv}, {"Irecv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_15Irecv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_14Irecv}, {"probe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_17probe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_16probe}, {"iprobe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_19iprobe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_18iprobe}, {"recv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_21recv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_20recv}, {"irecv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_23irecv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_22irecv}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_25py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_24py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_7Message_27f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_7Message_26f2py}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Message = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_7Message_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; DL_EXPORT(PyTypeObject) PyMPIMessage_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Message", /*tp_name*/ sizeof(struct PyMPIMessageObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Message, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Message, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n Message\n ", /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI_Message, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI_Message, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_7Message_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Message, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Message, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Op(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_2Op_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Op(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_2Op_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_2Op_is_commutative(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_2Op_14is_commutative_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_2Op_is_predefined(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_2Op_13is_predefined_1__get__(o); } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Op[] = { {"Create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_2Op_11Create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_2Op_10Create}, {"Free", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_2Op_13Free, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_2Op_12Free}, {"Is_commutative", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_2Op_15Is_commutative, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_2Op_14Is_commutative}, {"Reduce_local", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_2Op_17Reduce_local, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_2Op_16Reduce_local}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_2Op_19py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_2Op_18py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_2Op_21f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_2Op_20f2py}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Op[] = { {(char *)"is_commutative", __pyx_getprop_6mpi4py_3MPI_2Op_is_commutative, 0, (char *)"is commutative", 0}, {(char *)"is_predefined", __pyx_getprop_6mpi4py_3MPI_2Op_is_predefined, 0, (char *)"is a predefined operation", 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Op = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_2Op_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; DL_EXPORT(PyTypeObject) PyMPIOp_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Op", /*tp_name*/ sizeof(struct PyMPIOpObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Op, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Op, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ __pyx_pw_6mpi4py_3MPI_2Op_9__call__, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Op\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_2Op_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Op, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Op, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Op, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Group(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_5Group_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Group(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_5Group_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_5Group_size(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_5Group_4size_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_5Group_rank(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_5Group_4rank_1__get__(o); } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Group[] = { {"Get_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_9Get_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_8Get_size}, {"Get_rank", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_11Get_rank, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_10Get_rank}, {"Translate_ranks", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_13Translate_ranks, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_12Translate_ranks}, {"Compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_15Compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_14Compare}, {"Dup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_17Dup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_16Dup}, {"Union", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_19Union, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_18Union}, {"Intersection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_21Intersection, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_20Intersection}, {"Difference", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_23Difference, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_22Difference}, {"Incl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_25Incl, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_24Incl}, {"Excl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_27Excl, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_26Excl}, {"Range_incl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_29Range_incl, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_28Range_incl}, {"Range_excl", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_31Range_excl, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_30Range_excl}, {"Free", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_33Free, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_32Free}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_35py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_34py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_5Group_37f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_5Group_36f2py}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Group[] = { {(char *)"size", __pyx_getprop_6mpi4py_3MPI_5Group_size, 0, (char *)"number of processes in group", 0}, {(char *)"rank", __pyx_getprop_6mpi4py_3MPI_5Group_rank, 0, (char *)"rank of this process in group", 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Group = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_5Group_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; DL_EXPORT(PyTypeObject) PyMPIGroup_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Group", /*tp_name*/ sizeof(struct PyMPIGroupObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Group, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Group, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Group\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_5Group_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Group, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Group, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Group, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Info(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_4Info_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Info(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_4Info_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_sq_item_6mpi4py_3MPI_Info(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static int __pyx_mp_ass_subscript_6mpi4py_3MPI_Info(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_pw_6mpi4py_3MPI_4Info_37__setitem__(o, i, v); } else { return __pyx_pw_6mpi4py_3MPI_4Info_39__delitem__(o, i); } } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Info[] = { {"Create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_9Create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_8Create}, {"Free", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_11Free, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_10Free}, {"Dup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_13Dup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_12Dup}, {"Get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_15Get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_14Get}, {"Set", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_17Set, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_16Set}, {"Delete", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_19Delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_18Delete}, {"Get_nkeys", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_21Get_nkeys, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_20Get_nkeys}, {"Get_nthkey", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_23Get_nthkey, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_22Get_nthkey}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_25py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_24py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_27f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_26f2py}, {"get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_41get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_40get}, {"keys", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_43keys, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_42keys}, {"values", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_45values, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_44values}, {"items", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_47items, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_46items}, {"update", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_49update, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_48update}, {"copy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_51copy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_50copy}, {"clear", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Info_53clear, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Info_52clear}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Info = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_4Info_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; static PySequenceMethods __pyx_tp_as_sequence_Info = { __pyx_pw_6mpi4py_3MPI_4Info_29__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_6mpi4py_3MPI_Info, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ __pyx_pw_6mpi4py_3MPI_4Info_31__contains__, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Info = { __pyx_pw_6mpi4py_3MPI_4Info_29__len__, /*mp_length*/ __pyx_pw_6mpi4py_3MPI_4Info_35__getitem__, /*mp_subscript*/ __pyx_mp_ass_subscript_6mpi4py_3MPI_Info, /*mp_ass_subscript*/ }; DL_EXPORT(PyTypeObject) PyMPIInfo_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Info", /*tp_name*/ sizeof(struct PyMPIInfoObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Info, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Info, /*tp_as_number*/ &__pyx_tp_as_sequence_Info, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Info, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Info\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_4Info_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ __pyx_pw_6mpi4py_3MPI_4Info_33__iter__, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Info, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Info, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Errhandler(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_10Errhandler_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Errhandler(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_10Errhandler_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Errhandler[] = { {"Free", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_10Errhandler_9Free, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_10Errhandler_8Free}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_10Errhandler_11py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_10Errhandler_10py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_10Errhandler_13f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_10Errhandler_12f2py}, {0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Errhandler = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_10Errhandler_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; DL_EXPORT(PyTypeObject) PyMPIErrhandler_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Errhandler", /*tp_name*/ sizeof(struct PyMPIErrhandlerObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Errhandler, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Errhandler, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Error Handler\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_10Errhandler_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Errhandler, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Errhandler, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Comm(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_4Comm_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Comm(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_4Comm_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4Comm_group(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4Comm_5group_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4Comm_size(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4Comm_4size_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4Comm_rank(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4Comm_4rank_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4Comm_info(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4Comm_4info_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_4Comm_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_4Comm_4info_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6mpi4py_3MPI_4Comm_is_inter(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4Comm_8is_inter_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4Comm_is_intra(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4Comm_8is_intra_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4Comm_topology(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4Comm_8topology_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4Comm_is_topo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4Comm_7is_topo_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4Comm_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4Comm_4name_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_4Comm_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_4Comm_4name_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Comm[] = { {"Get_group", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_9Get_group, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_8Get_group}, {"Get_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_11Get_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_10Get_size}, {"Get_rank", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_13Get_rank, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_12Get_rank}, {"Compare", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_15Compare, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_14Compare}, {"Clone", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_17Clone, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_16Clone}, {"Dup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_19Dup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_18Dup}, {"Dup_with_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_21Dup_with_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_20Dup_with_info}, {"Idup", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_23Idup, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_22Idup}, {"Create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_25Create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_24Create}, {"Create_group", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_27Create_group, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_26Create_group}, {"Split", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_29Split, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_28Split}, {"Split_type", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_31Split_type, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_30Split_type}, {"Free", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_33Free, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_32Free}, {"Set_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_35Set_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_34Set_info}, {"Get_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_37Get_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_36Get_info}, {"Send", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_39Send, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_38Send}, {"Recv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_41Recv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_40Recv}, {"Sendrecv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_43Sendrecv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_42Sendrecv}, {"Sendrecv_replace", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_45Sendrecv_replace, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_44Sendrecv_replace}, {"Isend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_47Isend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_46Isend}, {"Irecv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_49Irecv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_48Irecv}, {"Probe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_51Probe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_50Probe}, {"Iprobe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_53Iprobe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_52Iprobe}, {"Mprobe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_55Mprobe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_54Mprobe}, {"Improbe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_57Improbe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_56Improbe}, {"Send_init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_59Send_init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_58Send_init}, {"Recv_init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_61Recv_init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_60Recv_init}, {"Bsend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_63Bsend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_62Bsend}, {"Ssend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_65Ssend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_64Ssend}, {"Rsend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_67Rsend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_66Rsend}, {"Ibsend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_69Ibsend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_68Ibsend}, {"Issend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_71Issend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_70Issend}, {"Irsend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_73Irsend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_72Irsend}, {"Bsend_init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_75Bsend_init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_74Bsend_init}, {"Ssend_init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_77Ssend_init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_76Ssend_init}, {"Rsend_init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_79Rsend_init, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_78Rsend_init}, {"Barrier", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_81Barrier, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_80Barrier}, {"Bcast", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_83Bcast, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_82Bcast}, {"Gather", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_85Gather, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_84Gather}, {"Gatherv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_87Gatherv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_86Gatherv}, {"Scatter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_89Scatter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_88Scatter}, {"Scatterv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_91Scatterv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_90Scatterv}, {"Allgather", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_93Allgather, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_92Allgather}, {"Allgatherv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_95Allgatherv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_94Allgatherv}, {"Alltoall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_97Alltoall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_96Alltoall}, {"Alltoallv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_99Alltoallv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_98Alltoallv}, {"Alltoallw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_101Alltoallw, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_100Alltoallw}, {"Reduce", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_103Reduce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_102Reduce}, {"Allreduce", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_105Allreduce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_104Allreduce}, {"Reduce_scatter_block", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_107Reduce_scatter_block, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_106Reduce_scatter_block}, {"Reduce_scatter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_109Reduce_scatter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_108Reduce_scatter}, {"Ibarrier", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_111Ibarrier, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_110Ibarrier}, {"Ibcast", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_113Ibcast, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_112Ibcast}, {"Igather", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_115Igather, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_114Igather}, {"Igatherv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_117Igatherv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_116Igatherv}, {"Iscatter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_119Iscatter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_118Iscatter}, {"Iscatterv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_121Iscatterv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_120Iscatterv}, {"Iallgather", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_123Iallgather, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_122Iallgather}, {"Iallgatherv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_125Iallgatherv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_124Iallgatherv}, {"Ialltoall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_127Ialltoall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_126Ialltoall}, {"Ialltoallv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_129Ialltoallv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_128Ialltoallv}, {"Ialltoallw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_131Ialltoallw, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_130Ialltoallw}, {"Ireduce", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_133Ireduce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_132Ireduce}, {"Iallreduce", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_135Iallreduce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_134Iallreduce}, {"Ireduce_scatter_block", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_137Ireduce_scatter_block, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_136Ireduce_scatter_block}, {"Ireduce_scatter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_139Ireduce_scatter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_138Ireduce_scatter}, {"Is_inter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_141Is_inter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_140Is_inter}, {"Is_intra", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_143Is_intra, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_142Is_intra}, {"Get_topology", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_145Get_topology, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_144Get_topology}, {"Get_parent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_147Get_parent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_146Get_parent}, {"Disconnect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_149Disconnect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_148Disconnect}, {"Join", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_151Join, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_150Join}, {"Get_attr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_153Get_attr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_152Get_attr}, {"Set_attr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_155Set_attr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_154Set_attr}, {"Delete_attr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_157Delete_attr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_156Delete_attr}, {"Create_keyval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_159Create_keyval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_158Create_keyval}, {"Free_keyval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_161Free_keyval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_160Free_keyval}, {"Get_errhandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_163Get_errhandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_162Get_errhandler}, {"Set_errhandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_165Set_errhandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_164Set_errhandler}, {"Call_errhandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_167Call_errhandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_166Call_errhandler}, {"Abort", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_169Abort, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_168Abort}, {"Get_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_171Get_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_170Get_name}, {"Set_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_173Set_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_172Set_name}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_175py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_174py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_177f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_176f2py}, {"send", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_179send, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_178send}, {"bsend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_181bsend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_180bsend}, {"ssend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_183ssend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_182ssend}, {"recv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_185recv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_184recv}, {"sendrecv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_187sendrecv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_186sendrecv}, {"isend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_189isend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_188isend}, {"ibsend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_191ibsend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_190ibsend}, {"issend", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_193issend, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_192issend}, {"irecv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_195irecv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_194irecv}, {"probe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_197probe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_196probe}, {"iprobe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_199iprobe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_198iprobe}, {"mprobe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_201mprobe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_200mprobe}, {"improbe", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_203improbe, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_202improbe}, {"barrier", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_205barrier, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_204barrier}, {"bcast", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_207bcast, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_206bcast}, {"gather", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_209gather, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_208gather}, {"scatter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_211scatter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_210scatter}, {"allgather", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_213allgather, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_212allgather}, {"alltoall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_215alltoall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_214alltoall}, {"reduce", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_217reduce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_216reduce}, {"allreduce", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4Comm_219allreduce, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4Comm_218allreduce}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Comm[] = { {(char *)"group", __pyx_getprop_6mpi4py_3MPI_4Comm_group, 0, (char *)"communicator group", 0}, {(char *)"size", __pyx_getprop_6mpi4py_3MPI_4Comm_size, 0, (char *)"number of processes in communicator", 0}, {(char *)"rank", __pyx_getprop_6mpi4py_3MPI_4Comm_rank, 0, (char *)"rank of this process in communicator", 0}, {(char *)"info", __pyx_getprop_6mpi4py_3MPI_4Comm_info, __pyx_setprop_6mpi4py_3MPI_4Comm_info, (char *)"communicator info", 0}, {(char *)"is_inter", __pyx_getprop_6mpi4py_3MPI_4Comm_is_inter, 0, (char *)"is intercommunicator", 0}, {(char *)"is_intra", __pyx_getprop_6mpi4py_3MPI_4Comm_is_intra, 0, (char *)"is intracommunicator", 0}, {(char *)"topology", __pyx_getprop_6mpi4py_3MPI_4Comm_topology, 0, (char *)"communicator topology type", 0}, {(char *)"is_topo", __pyx_getprop_6mpi4py_3MPI_4Comm_is_topo, 0, (char *)"is a topology communicator", 0}, {(char *)"name", __pyx_getprop_6mpi4py_3MPI_4Comm_name, __pyx_setprop_6mpi4py_3MPI_4Comm_name, (char *)"communicator name", 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Comm = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_4Comm_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; DL_EXPORT(PyTypeObject) PyMPIComm_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Comm", /*tp_name*/ sizeof(struct PyMPICommObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Comm, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Comm, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Communicator\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_4Comm_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Comm, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Comm, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Comm, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Intracomm(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6mpi4py_3MPI_Comm(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_9Intracomm_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Intracomm[] = { {"Create_cart", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_3Create_cart, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_2Create_cart}, {"Create_graph", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_5Create_graph, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_4Create_graph}, {"Create_dist_graph_adjacent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_7Create_dist_graph_adjacent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_6Create_dist_graph_adjacent}, {"Create_dist_graph", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_9Create_dist_graph, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_8Create_dist_graph}, {"Create_intercomm", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_11Create_intercomm, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_10Create_intercomm}, {"Cart_map", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_13Cart_map, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_12Cart_map}, {"Graph_map", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_15Graph_map, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_14Graph_map}, {"Scan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_17Scan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_16Scan}, {"Exscan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_19Exscan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_18Exscan}, {"Iscan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_21Iscan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_20Iscan}, {"Iexscan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_23Iexscan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_22Iexscan}, {"scan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_25scan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_24scan}, {"exscan", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_27exscan, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_26exscan}, {"Spawn", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_29Spawn, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_28Spawn}, {"Spawn_multiple", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_31Spawn_multiple, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_30Spawn_multiple}, {"Accept", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_33Accept, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_32Accept}, {"Connect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intracomm_35Connect, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intracomm_34Connect}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PyMPIIntracomm_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Intracomm", /*tp_name*/ sizeof(struct PyMPIIntracommObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Comm, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Intracommunicator\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Intracomm, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Intracomm, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Topocomm(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6mpi4py_3MPI_Intracomm(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_8Topocomm_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Topocomm_degrees(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Topocomm_7degrees_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Topocomm_indegree(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Topocomm_8indegree_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Topocomm_outdegree(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Topocomm_9outdegree_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Topocomm_inoutedges(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Topocomm_10inoutedges_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Topocomm_inedges(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Topocomm_7inedges_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Topocomm_outedges(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Topocomm_8outedges_1__get__(o); } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Topocomm[] = { {"Neighbor_allgather", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_3Neighbor_allgather, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_2Neighbor_allgather}, {"Neighbor_allgatherv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_5Neighbor_allgatherv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_4Neighbor_allgatherv}, {"Neighbor_alltoall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_7Neighbor_alltoall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_6Neighbor_alltoall}, {"Neighbor_alltoallv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_9Neighbor_alltoallv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_8Neighbor_alltoallv}, {"Neighbor_alltoallw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_11Neighbor_alltoallw, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_10Neighbor_alltoallw}, {"Ineighbor_allgather", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_13Ineighbor_allgather, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_12Ineighbor_allgather}, {"Ineighbor_allgatherv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_15Ineighbor_allgatherv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_14Ineighbor_allgatherv}, {"Ineighbor_alltoall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_17Ineighbor_alltoall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_16Ineighbor_alltoall}, {"Ineighbor_alltoallv", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_19Ineighbor_alltoallv, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_18Ineighbor_alltoallv}, {"Ineighbor_alltoallw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_21Ineighbor_alltoallw, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_20Ineighbor_alltoallw}, {"neighbor_allgather", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_23neighbor_allgather, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_22neighbor_allgather}, {"neighbor_alltoall", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Topocomm_25neighbor_alltoall, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Topocomm_24neighbor_alltoall}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Topocomm[] = { {(char *)"degrees", __pyx_getprop_6mpi4py_3MPI_8Topocomm_degrees, 0, (char *)"number of incoming and outgoing neighbors", 0}, {(char *)"indegree", __pyx_getprop_6mpi4py_3MPI_8Topocomm_indegree, 0, (char *)"number of incoming neighbors", 0}, {(char *)"outdegree", __pyx_getprop_6mpi4py_3MPI_8Topocomm_outdegree, 0, (char *)"number of outgoing neighbors", 0}, {(char *)"inoutedges", __pyx_getprop_6mpi4py_3MPI_8Topocomm_inoutedges, 0, (char *)"incoming and outgoing neighbors", 0}, {(char *)"inedges", __pyx_getprop_6mpi4py_3MPI_8Topocomm_inedges, 0, (char *)"incoming neighbors", 0}, {(char *)"outedges", __pyx_getprop_6mpi4py_3MPI_8Topocomm_outedges, 0, (char *)"outgoing neighbors", 0}, {0, 0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PyMPITopocomm_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Topocomm", /*tp_name*/ sizeof(struct PyMPITopocommObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Comm, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Topology intracommunicator\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Topocomm, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Topocomm, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Topocomm, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Cartcomm(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6mpi4py_3MPI_Topocomm(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_8Cartcomm_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Cartcomm_dim(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Cartcomm_3dim_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Cartcomm_ndim(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Cartcomm_4ndim_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Cartcomm_topo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Cartcomm_4topo_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Cartcomm_dims(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Cartcomm_4dims_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Cartcomm_periods(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Cartcomm_7periods_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_8Cartcomm_coords(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_8Cartcomm_6coords_1__get__(o); } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Cartcomm[] = { {"Get_dim", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Cartcomm_3Get_dim, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Cartcomm_2Get_dim}, {"Get_topo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Cartcomm_5Get_topo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Cartcomm_4Get_topo}, {"Get_cart_rank", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Cartcomm_7Get_cart_rank, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Cartcomm_6Get_cart_rank}, {"Get_coords", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Cartcomm_9Get_coords, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Cartcomm_8Get_coords}, {"Shift", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Cartcomm_11Shift, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Cartcomm_10Shift}, {"Sub", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_8Cartcomm_13Sub, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_8Cartcomm_12Sub}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Cartcomm[] = { {(char *)"dim", __pyx_getprop_6mpi4py_3MPI_8Cartcomm_dim, 0, (char *)"number of dimensions", 0}, {(char *)"ndim", __pyx_getprop_6mpi4py_3MPI_8Cartcomm_ndim, 0, (char *)"number of dimensions", 0}, {(char *)"topo", __pyx_getprop_6mpi4py_3MPI_8Cartcomm_topo, 0, (char *)"topology information", 0}, {(char *)"dims", __pyx_getprop_6mpi4py_3MPI_8Cartcomm_dims, 0, (char *)"dimensions", 0}, {(char *)"periods", __pyx_getprop_6mpi4py_3MPI_8Cartcomm_periods, 0, (char *)"periodicity", 0}, {(char *)"coords", __pyx_getprop_6mpi4py_3MPI_8Cartcomm_coords, 0, (char *)"coordinates", 0}, {0, 0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PyMPICartcomm_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Cartcomm", /*tp_name*/ sizeof(struct PyMPICartcommObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Comm, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Cartesian topology intracommunicator\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Cartcomm, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Cartcomm, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Cartcomm, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Graphcomm(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6mpi4py_3MPI_Topocomm(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_9Graphcomm_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Graphcomm_dims(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Graphcomm_4dims_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Graphcomm_nnodes(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Graphcomm_6nnodes_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Graphcomm_nedges(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Graphcomm_6nedges_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Graphcomm_topo(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Graphcomm_4topo_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Graphcomm_index(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Graphcomm_5index_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Graphcomm_edges(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Graphcomm_5edges_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Graphcomm_nneighbors(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Graphcomm_10nneighbors_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Graphcomm_neighbors(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Graphcomm_9neighbors_1__get__(o); } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Graphcomm[] = { {"Get_dims", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Graphcomm_3Get_dims, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Graphcomm_2Get_dims}, {"Get_topo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Graphcomm_5Get_topo, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Graphcomm_4Get_topo}, {"Get_neighbors_count", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Graphcomm_7Get_neighbors_count, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Graphcomm_6Get_neighbors_count}, {"Get_neighbors", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Graphcomm_9Get_neighbors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Graphcomm_8Get_neighbors}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Graphcomm[] = { {(char *)"dims", __pyx_getprop_6mpi4py_3MPI_9Graphcomm_dims, 0, (char *)"number of nodes and edges", 0}, {(char *)"nnodes", __pyx_getprop_6mpi4py_3MPI_9Graphcomm_nnodes, 0, (char *)"number of nodes", 0}, {(char *)"nedges", __pyx_getprop_6mpi4py_3MPI_9Graphcomm_nedges, 0, (char *)"number of edges", 0}, {(char *)"topo", __pyx_getprop_6mpi4py_3MPI_9Graphcomm_topo, 0, (char *)"topology information", 0}, {(char *)"index", __pyx_getprop_6mpi4py_3MPI_9Graphcomm_index, 0, (char *)"index", 0}, {(char *)"edges", __pyx_getprop_6mpi4py_3MPI_9Graphcomm_edges, 0, (char *)"edges", 0}, {(char *)"nneighbors", __pyx_getprop_6mpi4py_3MPI_9Graphcomm_nneighbors, 0, (char *)"number of neighbors", 0}, {(char *)"neighbors", __pyx_getprop_6mpi4py_3MPI_9Graphcomm_neighbors, 0, (char *)"neighbors", 0}, {0, 0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PyMPIGraphcomm_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Graphcomm", /*tp_name*/ sizeof(struct PyMPIGraphcommObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Comm, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n General graph topology intracommunicator\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Graphcomm, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Graphcomm, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Graphcomm, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Distgraphcomm(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6mpi4py_3MPI_Topocomm(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_13Distgraphcomm_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Distgraphcomm[] = { {"Get_dist_neighbors_count", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_13Distgraphcomm_3Get_dist_neighbors_count, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_13Distgraphcomm_2Get_dist_neighbors_count}, {"Get_dist_neighbors", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_13Distgraphcomm_5Get_dist_neighbors, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_13Distgraphcomm_4Get_dist_neighbors}, {0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PyMPIDistgraphcomm_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Distgraphcomm", /*tp_name*/ sizeof(struct PyMPIDistgraphcommObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Comm, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Distributed graph topology intracommunicator\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Distgraphcomm, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Distgraphcomm, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Intercomm(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = __pyx_tp_new_6mpi4py_3MPI_Comm(t, a, k); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_9Intercomm_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Intercomm_remote_group(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Intercomm_12remote_group_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_9Intercomm_remote_size(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9Intercomm_11remote_size_1__get__(o); } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Intercomm[] = { {"Get_remote_group", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intercomm_3Get_remote_group, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intercomm_2Get_remote_group}, {"Get_remote_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intercomm_5Get_remote_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intercomm_4Get_remote_size}, {"Merge", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_9Intercomm_7Merge, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_9Intercomm_6Merge}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Intercomm[] = { {(char *)"remote_group", __pyx_getprop_6mpi4py_3MPI_9Intercomm_remote_group, 0, (char *)"remote group", 0}, {(char *)"remote_size", __pyx_getprop_6mpi4py_3MPI_9Intercomm_remote_size, 0, (char *)"number of remote processes", 0}, {0, 0, 0, 0, 0} }; DL_EXPORT(PyTypeObject) PyMPIIntercomm_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Intercomm", /*tp_name*/ sizeof(struct PyMPIIntercommObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Comm, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n Intercommunicator\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Intercomm, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Intercomm, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Intercomm, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Win(PyTypeObject *t, PyObject *a, PyObject *k) { struct PyMPIWinObject *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct PyMPIWinObject *)o); p->ob_mem = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_3Win_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Win(PyObject *o) { struct PyMPIWinObject *p = (struct PyMPIWinObject *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_3Win_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->ob_mem); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI_Win(PyObject *o, visitproc v, void *a) { int e; struct PyMPIWinObject *p = (struct PyMPIWinObject *)o; if (p->ob_mem) { e = (*v)(p->ob_mem, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI_Win(PyObject *o) { PyObject* tmp; struct PyMPIWinObject *p = (struct PyMPIWinObject *)o; tmp = ((PyObject*)p->ob_mem); p->ob_mem = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6mpi4py_3MPI_3Win_info(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_3Win_4info_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_3Win_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_3Win_4info_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6mpi4py_3MPI_3Win_group(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_3Win_5group_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_3Win_attrs(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_3Win_5attrs_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_3Win_flavor(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_3Win_6flavor_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_3Win_model(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_3Win_5model_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_3Win_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_3Win_4name_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_3Win_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_3Win_4name_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Win[] = { {"Create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_9Create, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_8Create}, {"Allocate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_11Allocate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_10Allocate}, {"Allocate_shared", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_13Allocate_shared, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_12Allocate_shared}, {"Shared_query", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_15Shared_query, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_14Shared_query}, {"Create_dynamic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_17Create_dynamic, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_16Create_dynamic}, {"Attach", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_19Attach, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_18Attach}, {"Detach", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_21Detach, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_20Detach}, {"Free", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_23Free, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_22Free}, {"Set_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_25Set_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_24Set_info}, {"Get_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_27Get_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_26Get_info}, {"Get_group", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_29Get_group, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_28Get_group}, {"Get_attr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_31Get_attr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_30Get_attr}, {"Set_attr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_33Set_attr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_32Set_attr}, {"Delete_attr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_35Delete_attr, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_34Delete_attr}, {"Create_keyval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_37Create_keyval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_36Create_keyval}, {"Free_keyval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_39Free_keyval, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_38Free_keyval}, {"tomemory", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_41tomemory, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_40tomemory}, {"Put", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_51Put, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_50Put}, {"Get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_53Get, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_52Get}, {"Accumulate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_55Accumulate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_54Accumulate}, {"Get_accumulate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_57Get_accumulate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_56Get_accumulate}, {"Fetch_and_op", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_59Fetch_and_op, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_58Fetch_and_op}, {"Compare_and_swap", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_61Compare_and_swap, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_60Compare_and_swap}, {"Rput", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_63Rput, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_62Rput}, {"Rget", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_65Rget, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_64Rget}, {"Raccumulate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_67Raccumulate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_66Raccumulate}, {"Rget_accumulate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_69Rget_accumulate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_68Rget_accumulate}, {"Fence", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_71Fence, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_70Fence}, {"Start", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_73Start, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_72Start}, {"Complete", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_75Complete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_74Complete}, {"Post", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_77Post, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_76Post}, {"Wait", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_79Wait, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_78Wait}, {"Test", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_81Test, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_80Test}, {"Lock", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_83Lock, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_82Lock}, {"Unlock", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_85Unlock, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_84Unlock}, {"Lock_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_87Lock_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_86Lock_all}, {"Unlock_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_89Unlock_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_88Unlock_all}, {"Flush", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_91Flush, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_90Flush}, {"Flush_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_93Flush_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_92Flush_all}, {"Flush_local", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_95Flush_local, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_94Flush_local}, {"Flush_local_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_97Flush_local_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_96Flush_local_all}, {"Sync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_99Sync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_98Sync}, {"Get_errhandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_101Get_errhandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_100Get_errhandler}, {"Set_errhandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_103Set_errhandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_102Set_errhandler}, {"Call_errhandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_105Call_errhandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_104Call_errhandler}, {"Get_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_107Get_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_106Get_name}, {"Set_name", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_109Set_name, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_108Set_name}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_111py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_110py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_3Win_113f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_3Win_112f2py}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Win[] = { {(char *)"info", __pyx_getprop_6mpi4py_3MPI_3Win_info, __pyx_setprop_6mpi4py_3MPI_3Win_info, (char *)"window info", 0}, {(char *)"group", __pyx_getprop_6mpi4py_3MPI_3Win_group, 0, (char *)"window group", 0}, {(char *)"attrs", __pyx_getprop_6mpi4py_3MPI_3Win_attrs, 0, (char *)"window attributes", 0}, {(char *)"flavor", __pyx_getprop_6mpi4py_3MPI_3Win_flavor, 0, (char *)"window create flavor", 0}, {(char *)"model", __pyx_getprop_6mpi4py_3MPI_3Win_model, 0, (char *)"window memory model", 0}, {(char *)"name", __pyx_getprop_6mpi4py_3MPI_3Win_name, __pyx_setprop_6mpi4py_3MPI_3Win_name, (char *)"window name", 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_Win = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_3Win_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; static PyBufferProcs __pyx_tp_as_buffer_Win = { #if PY_MAJOR_VERSION < 3 __pyx_pw_6mpi4py_3MPI_3Win_47__getreadbuffer__, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 __pyx_pw_6mpi4py_3MPI_3Win_49__getwritebuffer__, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 __pyx_pw_6mpi4py_3MPI_3Win_45__getsegcount__, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_pw_6mpi4py_3MPI_3Win_43__getbuffer__, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; DL_EXPORT(PyTypeObject) PyMPIWin_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Win", /*tp_name*/ sizeof(struct PyMPIWinObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Win, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_Win, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_Win, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n Window\n ", /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI_Win, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI_Win, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_3Win_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Win, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Win, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Win, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_File(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_4File_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_File(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_4File_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4File_size(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4File_4size_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4File_amode(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4File_5amode_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4File_group(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4File_5group_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_4File_info(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4File_4info_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_4File_info(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_4File_4info_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_6mpi4py_3MPI_4File_atomicity(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_4File_9atomicity_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_4File_atomicity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_4File_9atomicity_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6mpi4py_3MPI_File[] = { {"Open", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_9Open, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_8Open}, {"Close", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_11Close, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_10Close}, {"Delete", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_13Delete, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_12Delete}, {"Set_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_15Set_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_14Set_size}, {"Preallocate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_17Preallocate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_16Preallocate}, {"Get_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_19Get_size, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_18Get_size}, {"Get_amode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_21Get_amode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_20Get_amode}, {"Get_group", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_23Get_group, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_22Get_group}, {"Set_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_25Set_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_24Set_info}, {"Get_info", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_27Get_info, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_26Get_info}, {"Set_view", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_29Set_view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_28Set_view}, {"Get_view", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_31Get_view, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_30Get_view}, {"Read_at", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_33Read_at, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_32Read_at}, {"Read_at_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_35Read_at_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_34Read_at_all}, {"Write_at", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_37Write_at, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_36Write_at}, {"Write_at_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_39Write_at_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_38Write_at_all}, {"Iread_at", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_41Iread_at, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_40Iread_at}, {"Iread_at_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_43Iread_at_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_42Iread_at_all}, {"Iwrite_at", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_45Iwrite_at, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_44Iwrite_at}, {"Iwrite_at_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_47Iwrite_at_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_46Iwrite_at_all}, {"Read", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_49Read, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_48Read}, {"Read_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_51Read_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_50Read_all}, {"Write", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_53Write, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_52Write}, {"Write_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_55Write_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_54Write_all}, {"Iread", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_57Iread, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_56Iread}, {"Iread_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_59Iread_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_58Iread_all}, {"Iwrite", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_61Iwrite, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_60Iwrite}, {"Iwrite_all", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_63Iwrite_all, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_62Iwrite_all}, {"Seek", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_65Seek, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_64Seek}, {"Get_position", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_67Get_position, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_66Get_position}, {"Get_byte_offset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_69Get_byte_offset, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_68Get_byte_offset}, {"Read_shared", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_71Read_shared, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_70Read_shared}, {"Write_shared", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_73Write_shared, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_72Write_shared}, {"Iread_shared", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_75Iread_shared, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_74Iread_shared}, {"Iwrite_shared", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_77Iwrite_shared, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_76Iwrite_shared}, {"Read_ordered", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_79Read_ordered, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_78Read_ordered}, {"Write_ordered", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_81Write_ordered, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_80Write_ordered}, {"Seek_shared", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_83Seek_shared, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_82Seek_shared}, {"Get_position_shared", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_85Get_position_shared, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_84Get_position_shared}, {"Read_at_all_begin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_87Read_at_all_begin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_86Read_at_all_begin}, {"Read_at_all_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_89Read_at_all_end, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_88Read_at_all_end}, {"Write_at_all_begin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_91Write_at_all_begin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_90Write_at_all_begin}, {"Write_at_all_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_93Write_at_all_end, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_92Write_at_all_end}, {"Read_all_begin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_95Read_all_begin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_94Read_all_begin}, {"Read_all_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_97Read_all_end, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_96Read_all_end}, {"Write_all_begin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_99Write_all_begin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_98Write_all_begin}, {"Write_all_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_101Write_all_end, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_100Write_all_end}, {"Read_ordered_begin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_103Read_ordered_begin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_102Read_ordered_begin}, {"Read_ordered_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_105Read_ordered_end, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_104Read_ordered_end}, {"Write_ordered_begin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_107Write_ordered_begin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_106Write_ordered_begin}, {"Write_ordered_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_109Write_ordered_end, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_108Write_ordered_end}, {"Get_type_extent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_111Get_type_extent, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_110Get_type_extent}, {"Set_atomicity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_113Set_atomicity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_112Set_atomicity}, {"Get_atomicity", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_115Get_atomicity, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_114Get_atomicity}, {"Sync", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_117Sync, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_116Sync}, {"Get_errhandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_119Get_errhandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_118Get_errhandler}, {"Set_errhandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_121Set_errhandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_120Set_errhandler}, {"Call_errhandler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_123Call_errhandler, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_122Call_errhandler}, {"py2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_125py2f, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_124py2f}, {"f2py", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_4File_127f2py, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_4File_126f2py}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_File[] = { {(char *)"size", __pyx_getprop_6mpi4py_3MPI_4File_size, 0, (char *)"file size", 0}, {(char *)"amode", __pyx_getprop_6mpi4py_3MPI_4File_amode, 0, (char *)"file access mode", 0}, {(char *)"group", __pyx_getprop_6mpi4py_3MPI_4File_group, 0, (char *)"file group", 0}, {(char *)"info", __pyx_getprop_6mpi4py_3MPI_4File_info, __pyx_setprop_6mpi4py_3MPI_4File_info, (char *)"file info", 0}, {(char *)"atomicity", __pyx_getprop_6mpi4py_3MPI_4File_atomicity, __pyx_setprop_6mpi4py_3MPI_4File_atomicity, (char *)"atomicity", 0}, {0, 0, 0, 0, 0} }; static PyNumberMethods __pyx_tp_as_number_File = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_divide*/ #endif 0, /*nb_remainder*/ 0, /*nb_divmod*/ 0, /*nb_power*/ 0, /*nb_negative*/ 0, /*nb_positive*/ 0, /*nb_absolute*/ __pyx_pw_6mpi4py_3MPI_4File_7__bool__, /*nb_nonzero*/ 0, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif 0, /*nb_int*/ #if PY_MAJOR_VERSION < 3 0, /*nb_long*/ #else 0, /*reserved*/ #endif 0, /*nb_float*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_oct*/ #endif #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_hex*/ #endif 0, /*nb_inplace_add*/ 0, /*nb_inplace_subtract*/ 0, /*nb_inplace_multiply*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_inplace_divide*/ #endif 0, /*nb_inplace_remainder*/ 0, /*nb_inplace_power*/ 0, /*nb_inplace_lshift*/ 0, /*nb_inplace_rshift*/ 0, /*nb_inplace_and*/ 0, /*nb_inplace_xor*/ 0, /*nb_inplace_or*/ 0, /*nb_floor_divide*/ 0, /*nb_true_divide*/ 0, /*nb_inplace_floor_divide*/ 0, /*nb_inplace_true_divide*/ 0, /*nb_index*/ #if PY_VERSION_HEX >= 0x03050000 0, /*nb_matrix_multiply*/ #endif #if PY_VERSION_HEX >= 0x03050000 0, /*nb_inplace_matrix_multiply*/ #endif }; DL_EXPORT(PyTypeObject) PyMPIFile_Type = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.File", /*tp_name*/ sizeof(struct PyMPIFileObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_File, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ &__pyx_tp_as_number_File, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ "\n File\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ __pyx_pw_6mpi4py_3MPI_4File_5__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_File, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_File, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_File, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI_memory(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6mpi4py_3MPI_memory *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI_memory *)o); p->view.obj = NULL; if (unlikely(__pyx_pw_6mpi4py_3MPI_6memory_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_memory(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_6memory_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_sq_item_6mpi4py_3MPI_memory(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static int __pyx_mp_ass_subscript_6mpi4py_3MPI_memory(PyObject *o, PyObject *i, PyObject *v) { if (v) { return __pyx_pw_6mpi4py_3MPI_6memory_25__setitem__(o, i, v); } else { PyErr_Format(PyExc_NotImplementedError, "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); return -1; } } static PyObject *__pyx_getprop_6mpi4py_3MPI_6memory_address(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_6memory_7address_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_6memory_nbytes(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_6memory_6nbytes_1__get__(o); } static PyObject *__pyx_getprop_6mpi4py_3MPI_6memory_readonly(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_6memory_8readonly_1__get__(o); } static PyMethodDef __pyx_methods_6mpi4py_3MPI_memory[] = { {"frombuffer", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6memory_5frombuffer, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6memory_4frombuffer}, {"fromaddress", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6memory_7fromaddress, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6memory_6fromaddress}, {"tobytes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6memory_9tobytes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6memory_8tobytes}, {"release", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6memory_11release, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6memory_10release}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_memory[] = { {(char *)"address", __pyx_getprop_6mpi4py_3MPI_6memory_address, 0, (char *)"Memory address", 0}, {(char *)"nbytes", __pyx_getprop_6mpi4py_3MPI_6memory_nbytes, 0, (char *)"Memory size (in bytes)", 0}, {(char *)"readonly", __pyx_getprop_6mpi4py_3MPI_6memory_readonly, 0, (char *)"Boolean indicating whether the memory is read-only", 0}, {0, 0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_memory = { __pyx_pw_6mpi4py_3MPI_6memory_21__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_6mpi4py_3MPI_memory, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_memory = { __pyx_pw_6mpi4py_3MPI_6memory_21__len__, /*mp_length*/ __pyx_pw_6mpi4py_3MPI_6memory_23__getitem__, /*mp_subscript*/ __pyx_mp_ass_subscript_6mpi4py_3MPI_memory, /*mp_ass_subscript*/ }; static PyBufferProcs __pyx_tp_as_buffer_memory = { #if PY_MAJOR_VERSION < 3 __pyx_pw_6mpi4py_3MPI_6memory_17__getreadbuffer__, /*bf_getreadbuffer*/ #endif #if PY_MAJOR_VERSION < 3 __pyx_pw_6mpi4py_3MPI_6memory_19__getwritebuffer__, /*bf_getwritebuffer*/ #endif #if PY_MAJOR_VERSION < 3 __pyx_pw_6mpi4py_3MPI_6memory_15__getsegcount__, /*bf_getsegcount*/ #endif #if PY_MAJOR_VERSION < 3 0, /*bf_getcharbuffer*/ #endif __pyx_pw_6mpi4py_3MPI_6memory_13__getbuffer__, /*bf_getbuffer*/ 0, /*bf_releasebuffer*/ }; static PyTypeObject __pyx_type_6mpi4py_3MPI_memory = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.memory", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI_memory), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_memory, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_memory, /*tp_as_sequence*/ &__pyx_tp_as_mapping_memory, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ &__pyx_tp_as_buffer_memory, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ "\n Memory\n ", /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_memory, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_memory, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_memory, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_mem(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_6mpi4py_3MPI_6_p_mem_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_mem(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_6mpi4py_3MPI_6_p_mem_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_6mpi4py_3MPI__p_mem[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI__p_mem = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_mem", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_mem), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_mem, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI__p_mem, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_mem, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_greq __pyx_vtable_6mpi4py_3MPI__p_greq; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_greq(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6mpi4py_3MPI__p_greq *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI__p_greq *)o); p->__pyx_vtab = __pyx_vtabptr_6mpi4py_3MPI__p_greq; p->query_fn = Py_None; Py_INCREF(Py_None); p->free_fn = Py_None; Py_INCREF(Py_None); p->cancel_fn = Py_None; Py_INCREF(Py_None); p->args = ((PyObject*)Py_None); Py_INCREF(Py_None); p->kargs = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_7_p_greq_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_greq(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI__p_greq *p = (struct __pyx_obj_6mpi4py_3MPI__p_greq *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->query_fn); Py_CLEAR(p->free_fn); Py_CLEAR(p->cancel_fn); Py_CLEAR(p->args); Py_CLEAR(p->kargs); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI__p_greq(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI__p_greq *p = (struct __pyx_obj_6mpi4py_3MPI__p_greq *)o; if (p->query_fn) { e = (*v)(p->query_fn, a); if (e) return e; } if (p->free_fn) { e = (*v)(p->free_fn, a); if (e) return e; } if (p->cancel_fn) { e = (*v)(p->cancel_fn, a); if (e) return e; } if (p->args) { e = (*v)(p->args, a); if (e) return e; } if (p->kargs) { e = (*v)(p->kargs, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI__p_greq(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI__p_greq *p = (struct __pyx_obj_6mpi4py_3MPI__p_greq *)o; tmp = ((PyObject*)p->query_fn); p->query_fn = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->free_fn); p->free_fn = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->cancel_fn); p->cancel_fn = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->args); p->args = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->kargs); p->kargs = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6mpi4py_3MPI__p_greq[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI__p_greq = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_greq", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_greq), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_greq, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI__p_greq, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI__p_greq, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI__p_greq, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_greq, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_datarep __pyx_vtable_6mpi4py_3MPI__p_datarep; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_datarep(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6mpi4py_3MPI__p_datarep *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI__p_datarep *)o); p->__pyx_vtab = __pyx_vtabptr_6mpi4py_3MPI__p_datarep; p->read_fn = Py_None; Py_INCREF(Py_None); p->write_fn = Py_None; Py_INCREF(Py_None); p->extent_fn = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_10_p_datarep_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_datarep(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI__p_datarep *p = (struct __pyx_obj_6mpi4py_3MPI__p_datarep *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->read_fn); Py_CLEAR(p->write_fn); Py_CLEAR(p->extent_fn); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI__p_datarep(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI__p_datarep *p = (struct __pyx_obj_6mpi4py_3MPI__p_datarep *)o; if (p->read_fn) { e = (*v)(p->read_fn, a); if (e) return e; } if (p->write_fn) { e = (*v)(p->write_fn, a); if (e) return e; } if (p->extent_fn) { e = (*v)(p->extent_fn, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI__p_datarep(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI__p_datarep *p = (struct __pyx_obj_6mpi4py_3MPI__p_datarep *)o; tmp = ((PyObject*)p->read_fn); p->read_fn = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->write_fn); p->write_fn = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->extent_fn); p->extent_fn = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6mpi4py_3MPI__p_datarep[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI__p_datarep = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_datarep", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_datarep), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_datarep, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI__p_datarep, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI__p_datarep, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI__p_datarep, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_datarep, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_keyval(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI__p_keyval *)o); p->copy_fn = Py_None; Py_INCREF(Py_None); p->delete_fn = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_9_p_keyval_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_keyval(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI__p_keyval *p = (struct __pyx_obj_6mpi4py_3MPI__p_keyval *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->copy_fn); Py_CLEAR(p->delete_fn); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI__p_keyval(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI__p_keyval *p = (struct __pyx_obj_6mpi4py_3MPI__p_keyval *)o; if (p->copy_fn) { e = (*v)(p->copy_fn, a); if (e) return e; } if (p->delete_fn) { e = (*v)(p->delete_fn, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI__p_keyval(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI__p_keyval *p = (struct __pyx_obj_6mpi4py_3MPI__p_keyval *)o; tmp = ((PyObject*)p->copy_fn); p->copy_fn = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->delete_fn); p->delete_fn = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6mpi4py_3MPI_9_p_keyval_copy_fn(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9_p_keyval_7copy_fn_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_9_p_keyval_copy_fn(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_9_p_keyval_7copy_fn_3__set__(o, v); } else { return __pyx_pw_6mpi4py_3MPI_9_p_keyval_7copy_fn_5__del__(o); } } static PyObject *__pyx_getprop_6mpi4py_3MPI_9_p_keyval_delete_fn(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9_p_keyval_9delete_fn_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_9_p_keyval_delete_fn(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_9_p_keyval_9delete_fn_3__set__(o, v); } else { return __pyx_pw_6mpi4py_3MPI_9_p_keyval_9delete_fn_5__del__(o); } } static PyObject *__pyx_getprop_6mpi4py_3MPI_9_p_keyval_nopython(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_9_p_keyval_8nopython_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_9_p_keyval_nopython(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_9_p_keyval_8nopython_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6mpi4py_3MPI__p_keyval[] = { {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI__p_keyval[] = { {(char *)"copy_fn", __pyx_getprop_6mpi4py_3MPI_9_p_keyval_copy_fn, __pyx_setprop_6mpi4py_3MPI_9_p_keyval_copy_fn, (char *)"copy_fn: object", 0}, {(char *)"delete_fn", __pyx_getprop_6mpi4py_3MPI_9_p_keyval_delete_fn, __pyx_setprop_6mpi4py_3MPI_9_p_keyval_delete_fn, (char *)"delete_fn: object", 0}, {(char *)"nopython", __pyx_getprop_6mpi4py_3MPI_9_p_keyval_nopython, __pyx_setprop_6mpi4py_3MPI_9_p_keyval_nopython, (char *)"nopython: 'bool'", 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI__p_keyval = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_keyval", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_keyval), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_keyval, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI__p_keyval, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI__p_keyval, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI__p_keyval, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI__p_keyval, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_keyval, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_message(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6mpi4py_3MPI__p_message *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI__p_message *)o); p->buf = ((struct __pyx_obj_6mpi4py_3MPI_memory *)Py_None); Py_INCREF(Py_None); p->count = Py_None; Py_INCREF(Py_None); p->displ = Py_None; Py_INCREF(Py_None); p->type = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_message(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI__p_message *p = (struct __pyx_obj_6mpi4py_3MPI__p_message *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->buf); Py_CLEAR(p->count); Py_CLEAR(p->displ); Py_CLEAR(p->type); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI__p_message(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI__p_message *p = (struct __pyx_obj_6mpi4py_3MPI__p_message *)o; if (p->buf) { e = (*v)(((PyObject *)p->buf), a); if (e) return e; } if (p->count) { e = (*v)(p->count, a); if (e) return e; } if (p->displ) { e = (*v)(p->displ, a); if (e) return e; } if (p->type) { e = (*v)(((PyObject *)p->type), a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI__p_message(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI__p_message *p = (struct __pyx_obj_6mpi4py_3MPI__p_message *)o; tmp = ((PyObject*)p->buf); p->buf = ((struct __pyx_obj_6mpi4py_3MPI_memory *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->count); p->count = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->displ); p->displ = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->type); p->type = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_6mpi4py_3MPI__p_message = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_message", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_message), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_message, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI__p_message, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI__p_message, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_message, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_p2p __pyx_vtable_6mpi4py_3MPI__p_msg_p2p; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_p2p(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)o); p->__pyx_vtab = __pyx_vtabptr_6mpi4py_3MPI__p_msg_p2p; p->_msg = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_10_p_msg_p2p_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_p2p(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->_msg); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI__p_msg_p2p(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)o; if (p->_msg) { e = (*v)(p->_msg, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI__p_msg_p2p(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *)o; tmp = ((PyObject*)p->_msg); p->_msg = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6mpi4py_3MPI__p_msg_p2p[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI__p_msg_p2p = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_msg_p2p", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_p2p, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI__p_msg_p2p, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI__p_msg_p2p, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI__p_msg_p2p, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_msg_p2p, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_cco __pyx_vtable_6mpi4py_3MPI__p_msg_cco; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_cco(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)o); p->__pyx_vtab = __pyx_vtabptr_6mpi4py_3MPI__p_msg_cco; p->_smsg = Py_None; Py_INCREF(Py_None); p->_rmsg = Py_None; Py_INCREF(Py_None); p->_rcnt = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_10_p_msg_cco_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_cco(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->_smsg); Py_CLEAR(p->_rmsg); Py_CLEAR(p->_rcnt); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI__p_msg_cco(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)o; if (p->_smsg) { e = (*v)(p->_smsg, a); if (e) return e; } if (p->_rmsg) { e = (*v)(p->_rmsg, a); if (e) return e; } if (p->_rcnt) { e = (*v)(p->_rcnt, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI__p_msg_cco(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *)o; tmp = ((PyObject*)p->_smsg); p->_smsg = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_rmsg); p->_rmsg = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_rcnt); p->_rcnt = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6mpi4py_3MPI__p_msg_cco[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI__p_msg_cco = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_msg_cco", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_cco, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI__p_msg_cco, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI__p_msg_cco, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI__p_msg_cco, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_msg_cco, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_ccow __pyx_vtable_6mpi4py_3MPI__p_msg_ccow; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_ccow(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)o); p->__pyx_vtab = __pyx_vtabptr_6mpi4py_3MPI__p_msg_ccow; p->_smsg = Py_None; Py_INCREF(Py_None); p->_rmsg = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_11_p_msg_ccow_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_ccow(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->_smsg); Py_CLEAR(p->_rmsg); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI__p_msg_ccow(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)o; if (p->_smsg) { e = (*v)(p->_smsg, a); if (e) return e; } if (p->_rmsg) { e = (*v)(p->_rmsg, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI__p_msg_ccow(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *)o; tmp = ((PyObject*)p->_smsg); p->_smsg = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_rmsg); p->_rmsg = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6mpi4py_3MPI__p_msg_ccow[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI__p_msg_ccow = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_msg_ccow", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_ccow, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI__p_msg_ccow, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI__p_msg_ccow, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI__p_msg_ccow, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_msg_ccow, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_rma __pyx_vtable_6mpi4py_3MPI__p_msg_rma; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_rma(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)o); p->__pyx_vtab = __pyx_vtabptr_6mpi4py_3MPI__p_msg_rma; p->_origin = Py_None; Py_INCREF(Py_None); p->_compare = Py_None; Py_INCREF(Py_None); p->_result = Py_None; Py_INCREF(Py_None); p->_target = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_10_p_msg_rma_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_rma(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->_origin); Py_CLEAR(p->_compare); Py_CLEAR(p->_result); Py_CLEAR(p->_target); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI__p_msg_rma(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)o; if (p->_origin) { e = (*v)(p->_origin, a); if (e) return e; } if (p->_compare) { e = (*v)(p->_compare, a); if (e) return e; } if (p->_result) { e = (*v)(p->_result, a); if (e) return e; } if (p->_target) { e = (*v)(p->_target, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI__p_msg_rma(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *)o; tmp = ((PyObject*)p->_origin); p->_origin = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_compare); p->_compare = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_result); p->_result = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->_target); p->_target = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6mpi4py_3MPI__p_msg_rma[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI__p_msg_rma = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_msg_rma", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_rma, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI__p_msg_rma, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI__p_msg_rma, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI__p_msg_rma, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_msg_rma, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_6mpi4py_3MPI__p_msg_io __pyx_vtable_6mpi4py_3MPI__p_msg_io; static PyObject *__pyx_tp_new_6mpi4py_3MPI__p_msg_io(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)o); p->__pyx_vtab = __pyx_vtabptr_6mpi4py_3MPI__p_msg_io; p->_msg = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_9_p_msg_io_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_io(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI__p_msg_io *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->_msg); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI__p_msg_io(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI__p_msg_io *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)o; if (p->_msg) { e = (*v)(p->_msg, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI__p_msg_io(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI__p_msg_io *p = (struct __pyx_obj_6mpi4py_3MPI__p_msg_io *)o; tmp = ((PyObject*)p->_msg); p->_msg = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_6mpi4py_3MPI__p_msg_io[] = { {0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI__p_msg_io = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI._p_msg_io", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI__p_msg_io), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI__p_msg_io, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI__p_msg_io, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI__p_msg_io, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI__p_msg_io, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI__p_msg_io, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static struct __pyx_vtabstruct_6mpi4py_3MPI_Pickle __pyx_vtable_6mpi4py_3MPI_Pickle; static PyObject *__pyx_tp_new_6mpi4py_3MPI_Pickle(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_6mpi4py_3MPI_Pickle *p; PyObject *o; o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6mpi4py_3MPI_Pickle *)o); p->__pyx_vtab = __pyx_vtabptr_6mpi4py_3MPI_Pickle; p->ob_dumps = Py_None; Py_INCREF(Py_None); p->ob_loads = Py_None; Py_INCREF(Py_None); p->ob_PROTO = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_6mpi4py_3MPI_6Pickle_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_6mpi4py_3MPI_Pickle(PyObject *o) { struct __pyx_obj_6mpi4py_3MPI_Pickle *p = (struct __pyx_obj_6mpi4py_3MPI_Pickle *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->ob_dumps); Py_CLEAR(p->ob_loads); Py_CLEAR(p->ob_PROTO); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_6mpi4py_3MPI_Pickle(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_6mpi4py_3MPI_Pickle *p = (struct __pyx_obj_6mpi4py_3MPI_Pickle *)o; if (p->ob_dumps) { e = (*v)(p->ob_dumps, a); if (e) return e; } if (p->ob_loads) { e = (*v)(p->ob_loads, a); if (e) return e; } if (p->ob_PROTO) { e = (*v)(p->ob_PROTO, a); if (e) return e; } return 0; } static int __pyx_tp_clear_6mpi4py_3MPI_Pickle(PyObject *o) { PyObject* tmp; struct __pyx_obj_6mpi4py_3MPI_Pickle *p = (struct __pyx_obj_6mpi4py_3MPI_Pickle *)o; tmp = ((PyObject*)p->ob_dumps); p->ob_dumps = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->ob_loads); p->ob_loads = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->ob_PROTO); p->ob_PROTO = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_6mpi4py_3MPI_6Pickle_PROTOCOL(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_6mpi4py_3MPI_6Pickle_8PROTOCOL_1__get__(o); } static int __pyx_setprop_6mpi4py_3MPI_6Pickle_PROTOCOL(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_6mpi4py_3MPI_6Pickle_8PROTOCOL_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyMethodDef __pyx_methods_6mpi4py_3MPI_Pickle[] = { {"dumps", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Pickle_5dumps, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Pickle_4dumps}, {"loads", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6mpi4py_3MPI_6Pickle_7loads, METH_VARARGS|METH_KEYWORDS, __pyx_doc_6mpi4py_3MPI_6Pickle_6loads}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_6mpi4py_3MPI_Pickle[] = { {(char *)"PROTOCOL", __pyx_getprop_6mpi4py_3MPI_6Pickle_PROTOCOL, __pyx_setprop_6mpi4py_3MPI_6Pickle_PROTOCOL, (char *)"protocol", 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_6mpi4py_3MPI_Pickle = { PyVarObject_HEAD_INIT(0, 0) "mpi4py.MPI.Pickle", /*tp_name*/ sizeof(struct __pyx_obj_6mpi4py_3MPI_Pickle), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_6mpi4py_3MPI_Pickle, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030800b4 0, /*tp_vectorcall_offset*/ #endif 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "Pickle(dumps=None, loads=None, protocol=None)\n\n Pickle/unpickle Python objects\n ", /*tp_doc*/ __pyx_tp_traverse_6mpi4py_3MPI_Pickle, /*tp_traverse*/ __pyx_tp_clear_6mpi4py_3MPI_Pickle, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_6mpi4py_3MPI_Pickle, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_6mpi4py_3MPI_Pickle, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_6mpi4py_3MPI_6Pickle_3__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_6mpi4py_3MPI_Pickle, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, /*tp_print*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_MPI(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_MPI}, {0, NULL} }; #endif static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, "MPI", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif NULL, /* m_traverse */ NULL, /* m_clear */ (freefunc)__pyx_module_cleanup /* m_free */ }; #endif #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_AINT, __pyx_k_AINT, sizeof(__pyx_k_AINT), 0, 0, 1, 1}, {&__pyx_n_s_ANY_SOURCE, __pyx_k_ANY_SOURCE, sizeof(__pyx_k_ANY_SOURCE), 0, 0, 1, 1}, {&__pyx_n_s_ANY_TAG, __pyx_k_ANY_TAG, sizeof(__pyx_k_ANY_TAG), 0, 0, 1, 1}, {&__pyx_n_s_APPNUM, __pyx_k_APPNUM, sizeof(__pyx_k_APPNUM), 0, 0, 1, 1}, {&__pyx_n_s_Add_error_class, __pyx_k_Add_error_class, sizeof(__pyx_k_Add_error_class), 0, 0, 1, 1}, {&__pyx_n_s_Add_error_code, __pyx_k_Add_error_code, sizeof(__pyx_k_Add_error_code), 0, 0, 1, 1}, {&__pyx_n_s_Add_error_string, __pyx_k_Add_error_string, sizeof(__pyx_k_Add_error_string), 0, 0, 1, 1}, {&__pyx_n_s_Aint_add, __pyx_k_Aint_add, sizeof(__pyx_k_Aint_add), 0, 0, 1, 1}, {&__pyx_n_s_Aint_diff, __pyx_k_Aint_diff, sizeof(__pyx_k_Aint_diff), 0, 0, 1, 1}, {&__pyx_n_s_Alloc_mem, __pyx_k_Alloc_mem, sizeof(__pyx_k_Alloc_mem), 0, 0, 1, 1}, {&__pyx_n_s_Allocate, __pyx_k_Allocate, sizeof(__pyx_k_Allocate), 0, 0, 1, 1}, {&__pyx_n_s_Allocate_shared, __pyx_k_Allocate_shared, sizeof(__pyx_k_Allocate_shared), 0, 0, 1, 1}, {&__pyx_n_s_Attach_buffer, __pyx_k_Attach_buffer, sizeof(__pyx_k_Attach_buffer), 0, 0, 1, 1}, {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1}, {&__pyx_n_s_BAND, __pyx_k_BAND, sizeof(__pyx_k_BAND), 0, 0, 1, 1}, {&__pyx_n_s_BOOL, __pyx_k_BOOL, sizeof(__pyx_k_BOOL), 0, 0, 1, 1}, {&__pyx_n_s_BOR, __pyx_k_BOR, sizeof(__pyx_k_BOR), 0, 0, 1, 1}, {&__pyx_n_s_BOTTOM, __pyx_k_BOTTOM, sizeof(__pyx_k_BOTTOM), 0, 0, 1, 1}, {&__pyx_n_s_BSEND_OVERHEAD, __pyx_k_BSEND_OVERHEAD, sizeof(__pyx_k_BSEND_OVERHEAD), 0, 0, 1, 1}, {&__pyx_n_s_BXOR, __pyx_k_BXOR, sizeof(__pyx_k_BXOR), 0, 0, 1, 1}, {&__pyx_n_s_BYTE, __pyx_k_BYTE, sizeof(__pyx_k_BYTE), 0, 0, 1, 1}, {&__pyx_n_s_BytesIO, __pyx_k_BytesIO, sizeof(__pyx_k_BytesIO), 0, 0, 1, 1}, {&__pyx_n_s_CART, __pyx_k_CART, sizeof(__pyx_k_CART), 0, 0, 1, 1}, {&__pyx_n_s_CHAR, __pyx_k_CHAR, sizeof(__pyx_k_CHAR), 0, 0, 1, 1}, {&__pyx_n_s_CHARACTER, __pyx_k_CHARACTER, sizeof(__pyx_k_CHARACTER), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_CONTIGUOUS, __pyx_k_COMBINER_CONTIGUOUS, sizeof(__pyx_k_COMBINER_CONTIGUOUS), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_DARRAY, __pyx_k_COMBINER_DARRAY, sizeof(__pyx_k_COMBINER_DARRAY), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_DUP, __pyx_k_COMBINER_DUP, sizeof(__pyx_k_COMBINER_DUP), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_F90_COMPLEX, __pyx_k_COMBINER_F90_COMPLEX, sizeof(__pyx_k_COMBINER_F90_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_F90_INTEGER, __pyx_k_COMBINER_F90_INTEGER, sizeof(__pyx_k_COMBINER_F90_INTEGER), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_F90_REAL, __pyx_k_COMBINER_F90_REAL, sizeof(__pyx_k_COMBINER_F90_REAL), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_HINDEXED, __pyx_k_COMBINER_HINDEXED, sizeof(__pyx_k_COMBINER_HINDEXED), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_HINDEXED_BLOCK, __pyx_k_COMBINER_HINDEXED_BLOCK, sizeof(__pyx_k_COMBINER_HINDEXED_BLOCK), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_HVECTOR, __pyx_k_COMBINER_HVECTOR, sizeof(__pyx_k_COMBINER_HVECTOR), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_INDEXED, __pyx_k_COMBINER_INDEXED, sizeof(__pyx_k_COMBINER_INDEXED), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_INDEXED_BLOCK, __pyx_k_COMBINER_INDEXED_BLOCK, sizeof(__pyx_k_COMBINER_INDEXED_BLOCK), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_NAMED, __pyx_k_COMBINER_NAMED, sizeof(__pyx_k_COMBINER_NAMED), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_RESIZED, __pyx_k_COMBINER_RESIZED, sizeof(__pyx_k_COMBINER_RESIZED), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_STRUCT, __pyx_k_COMBINER_STRUCT, sizeof(__pyx_k_COMBINER_STRUCT), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_SUBARRAY, __pyx_k_COMBINER_SUBARRAY, sizeof(__pyx_k_COMBINER_SUBARRAY), 0, 0, 1, 1}, {&__pyx_n_s_COMBINER_VECTOR, __pyx_k_COMBINER_VECTOR, sizeof(__pyx_k_COMBINER_VECTOR), 0, 0, 1, 1}, {&__pyx_n_s_COMM_NULL, __pyx_k_COMM_NULL, sizeof(__pyx_k_COMM_NULL), 0, 0, 1, 1}, {&__pyx_n_s_COMM_SELF, __pyx_k_COMM_SELF, sizeof(__pyx_k_COMM_SELF), 0, 0, 1, 1}, {&__pyx_n_s_COMM_TYPE_SHARED, __pyx_k_COMM_TYPE_SHARED, sizeof(__pyx_k_COMM_TYPE_SHARED), 0, 0, 1, 1}, {&__pyx_n_s_COMM_WORLD, __pyx_k_COMM_WORLD, sizeof(__pyx_k_COMM_WORLD), 0, 0, 1, 1}, {&__pyx_n_s_COMPLEX, __pyx_k_COMPLEX, sizeof(__pyx_k_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_COMPLEX16, __pyx_k_COMPLEX16, sizeof(__pyx_k_COMPLEX16), 0, 0, 1, 1}, {&__pyx_n_s_COMPLEX32, __pyx_k_COMPLEX32, sizeof(__pyx_k_COMPLEX32), 0, 0, 1, 1}, {&__pyx_n_s_COMPLEX4, __pyx_k_COMPLEX4, sizeof(__pyx_k_COMPLEX4), 0, 0, 1, 1}, {&__pyx_n_s_COMPLEX8, __pyx_k_COMPLEX8, sizeof(__pyx_k_COMPLEX8), 0, 0, 1, 1}, {&__pyx_n_s_CONGRUENT, __pyx_k_CONGRUENT, sizeof(__pyx_k_CONGRUENT), 0, 0, 1, 1}, {&__pyx_n_s_CONTIGUOUS, __pyx_k_CONTIGUOUS, sizeof(__pyx_k_CONTIGUOUS), 0, 0, 1, 1}, {&__pyx_n_s_COUNT, __pyx_k_COUNT, sizeof(__pyx_k_COUNT), 0, 0, 1, 1}, {&__pyx_n_s_CXX_BOOL, __pyx_k_CXX_BOOL, sizeof(__pyx_k_CXX_BOOL), 0, 0, 1, 1}, {&__pyx_n_s_CXX_DOUBLE_COMPLEX, __pyx_k_CXX_DOUBLE_COMPLEX, sizeof(__pyx_k_CXX_DOUBLE_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_CXX_FLOAT_COMPLEX, __pyx_k_CXX_FLOAT_COMPLEX, sizeof(__pyx_k_CXX_FLOAT_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_CXX_LONG_DOUBLE_COMPLEX, __pyx_k_CXX_LONG_DOUBLE_COMPLEX, sizeof(__pyx_k_CXX_LONG_DOUBLE_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_C_BOOL, __pyx_k_C_BOOL, sizeof(__pyx_k_C_BOOL), 0, 0, 1, 1}, {&__pyx_n_s_C_COMPLEX, __pyx_k_C_COMPLEX, sizeof(__pyx_k_C_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_C_DOUBLE_COMPLEX, __pyx_k_C_DOUBLE_COMPLEX, sizeof(__pyx_k_C_DOUBLE_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_C_FLOAT_COMPLEX, __pyx_k_C_FLOAT_COMPLEX, sizeof(__pyx_k_C_FLOAT_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_C_LONG_DOUBLE_COMPLEX, __pyx_k_C_LONG_DOUBLE_COMPLEX, sizeof(__pyx_k_C_LONG_DOUBLE_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_Cartcomm, __pyx_k_Cartcomm, sizeof(__pyx_k_Cartcomm), 0, 0, 1, 1}, {&__pyx_n_s_Close_port, __pyx_k_Close_port, sizeof(__pyx_k_Close_port), 0, 0, 1, 1}, {&__pyx_n_s_Comm, __pyx_k_Comm, sizeof(__pyx_k_Comm), 0, 0, 1, 1}, {&__pyx_n_s_Compare, __pyx_k_Compare, sizeof(__pyx_k_Compare), 0, 0, 1, 1}, {&__pyx_n_s_Compute_dims, __pyx_k_Compute_dims, sizeof(__pyx_k_Compute_dims), 0, 0, 1, 1}, {&__pyx_n_s_Create, __pyx_k_Create, sizeof(__pyx_k_Create), 0, 0, 1, 1}, {&__pyx_n_s_Create_dup, __pyx_k_Create_dup, sizeof(__pyx_k_Create_dup), 0, 0, 1, 1}, {&__pyx_n_s_Create_dynamic, __pyx_k_Create_dynamic, sizeof(__pyx_k_Create_dynamic), 0, 0, 1, 1}, {&__pyx_n_s_Create_f90_complex, __pyx_k_Create_f90_complex, sizeof(__pyx_k_Create_f90_complex), 0, 0, 1, 1}, {&__pyx_n_s_Create_f90_integer, __pyx_k_Create_f90_integer, sizeof(__pyx_k_Create_f90_integer), 0, 0, 1, 1}, {&__pyx_n_s_Create_f90_real, __pyx_k_Create_f90_real, sizeof(__pyx_k_Create_f90_real), 0, 0, 1, 1}, {&__pyx_n_s_Create_keyval, __pyx_k_Create_keyval, sizeof(__pyx_k_Create_keyval), 0, 0, 1, 1}, {&__pyx_n_s_Create_resized, __pyx_k_Create_resized, sizeof(__pyx_k_Create_resized), 0, 0, 1, 1}, {&__pyx_n_s_Create_struct, __pyx_k_Create_struct, sizeof(__pyx_k_Create_struct), 0, 0, 1, 1}, {&__pyx_n_s_DARRAY, __pyx_k_DARRAY, sizeof(__pyx_k_DARRAY), 0, 0, 1, 1}, {&__pyx_n_s_DATATYPE_NULL, __pyx_k_DATATYPE_NULL, sizeof(__pyx_k_DATATYPE_NULL), 0, 0, 1, 1}, {&__pyx_n_s_DEFAULT_PROTOCOL, __pyx_k_DEFAULT_PROTOCOL, sizeof(__pyx_k_DEFAULT_PROTOCOL), 0, 0, 1, 1}, {&__pyx_n_s_DISPLACEMENT_CURRENT, __pyx_k_DISPLACEMENT_CURRENT, sizeof(__pyx_k_DISPLACEMENT_CURRENT), 0, 0, 1, 1}, {&__pyx_n_s_DISP_CUR, __pyx_k_DISP_CUR, sizeof(__pyx_k_DISP_CUR), 0, 0, 1, 1}, {&__pyx_n_s_DISTRIBUTE_BLOCK, __pyx_k_DISTRIBUTE_BLOCK, sizeof(__pyx_k_DISTRIBUTE_BLOCK), 0, 0, 1, 1}, {&__pyx_n_s_DISTRIBUTE_CYCLIC, __pyx_k_DISTRIBUTE_CYCLIC, sizeof(__pyx_k_DISTRIBUTE_CYCLIC), 0, 0, 1, 1}, {&__pyx_n_s_DISTRIBUTE_DFLT_DARG, __pyx_k_DISTRIBUTE_DFLT_DARG, sizeof(__pyx_k_DISTRIBUTE_DFLT_DARG), 0, 0, 1, 1}, {&__pyx_n_s_DISTRIBUTE_NONE, __pyx_k_DISTRIBUTE_NONE, sizeof(__pyx_k_DISTRIBUTE_NONE), 0, 0, 1, 1}, {&__pyx_n_s_DIST_GRAPH, __pyx_k_DIST_GRAPH, sizeof(__pyx_k_DIST_GRAPH), 0, 0, 1, 1}, {&__pyx_n_s_DOUBLE, __pyx_k_DOUBLE, sizeof(__pyx_k_DOUBLE), 0, 0, 1, 1}, {&__pyx_n_s_DOUBLE_COMPLEX, __pyx_k_DOUBLE_COMPLEX, sizeof(__pyx_k_DOUBLE_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_DOUBLE_INT, __pyx_k_DOUBLE_INT, sizeof(__pyx_k_DOUBLE_INT), 0, 0, 1, 1}, {&__pyx_n_s_DOUBLE_PRECISION, __pyx_k_DOUBLE_PRECISION, sizeof(__pyx_k_DOUBLE_PRECISION), 0, 0, 1, 1}, {&__pyx_n_s_DUP, __pyx_k_DUP, sizeof(__pyx_k_DUP), 0, 0, 1, 1}, {&__pyx_n_s_Datatype, __pyx_k_Datatype, sizeof(__pyx_k_Datatype), 0, 0, 1, 1}, {&__pyx_n_s_Delete, __pyx_k_Delete, sizeof(__pyx_k_Delete), 0, 0, 1, 1}, {&__pyx_n_s_Detach_buffer, __pyx_k_Detach_buffer, sizeof(__pyx_k_Detach_buffer), 0, 0, 1, 1}, {&__pyx_n_s_Difference, __pyx_k_Difference, sizeof(__pyx_k_Difference), 0, 0, 1, 1}, {&__pyx_n_s_Distgraphcomm, __pyx_k_Distgraphcomm, sizeof(__pyx_k_Distgraphcomm), 0, 0, 1, 1}, {&__pyx_n_s_Dup, __pyx_k_Dup, sizeof(__pyx_k_Dup), 0, 0, 1, 1}, {&__pyx_n_s_ERRHANDLER_NULL, __pyx_k_ERRHANDLER_NULL, sizeof(__pyx_k_ERRHANDLER_NULL), 0, 0, 1, 1}, {&__pyx_n_s_ERRORS_ARE_FATAL, __pyx_k_ERRORS_ARE_FATAL, sizeof(__pyx_k_ERRORS_ARE_FATAL), 0, 0, 1, 1}, {&__pyx_n_s_ERRORS_RETURN, __pyx_k_ERRORS_RETURN, sizeof(__pyx_k_ERRORS_RETURN), 0, 0, 1, 1}, {&__pyx_n_s_ERR_ACCESS, __pyx_k_ERR_ACCESS, sizeof(__pyx_k_ERR_ACCESS), 0, 0, 1, 1}, {&__pyx_n_s_ERR_AMODE, __pyx_k_ERR_AMODE, sizeof(__pyx_k_ERR_AMODE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_ARG, __pyx_k_ERR_ARG, sizeof(__pyx_k_ERR_ARG), 0, 0, 1, 1}, {&__pyx_n_s_ERR_ASSERT, __pyx_k_ERR_ASSERT, sizeof(__pyx_k_ERR_ASSERT), 0, 0, 1, 1}, {&__pyx_n_s_ERR_BAD_FILE, __pyx_k_ERR_BAD_FILE, sizeof(__pyx_k_ERR_BAD_FILE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_BASE, __pyx_k_ERR_BASE, sizeof(__pyx_k_ERR_BASE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_BUFFER, __pyx_k_ERR_BUFFER, sizeof(__pyx_k_ERR_BUFFER), 0, 0, 1, 1}, {&__pyx_n_s_ERR_COMM, __pyx_k_ERR_COMM, sizeof(__pyx_k_ERR_COMM), 0, 0, 1, 1}, {&__pyx_n_s_ERR_CONVERSION, __pyx_k_ERR_CONVERSION, sizeof(__pyx_k_ERR_CONVERSION), 0, 0, 1, 1}, {&__pyx_n_s_ERR_COUNT, __pyx_k_ERR_COUNT, sizeof(__pyx_k_ERR_COUNT), 0, 0, 1, 1}, {&__pyx_n_s_ERR_DIMS, __pyx_k_ERR_DIMS, sizeof(__pyx_k_ERR_DIMS), 0, 0, 1, 1}, {&__pyx_n_s_ERR_DISP, __pyx_k_ERR_DISP, sizeof(__pyx_k_ERR_DISP), 0, 0, 1, 1}, {&__pyx_n_s_ERR_DUP_DATAREP, __pyx_k_ERR_DUP_DATAREP, sizeof(__pyx_k_ERR_DUP_DATAREP), 0, 0, 1, 1}, {&__pyx_n_s_ERR_FILE, __pyx_k_ERR_FILE, sizeof(__pyx_k_ERR_FILE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_FILE_EXISTS, __pyx_k_ERR_FILE_EXISTS, sizeof(__pyx_k_ERR_FILE_EXISTS), 0, 0, 1, 1}, {&__pyx_n_s_ERR_FILE_IN_USE, __pyx_k_ERR_FILE_IN_USE, sizeof(__pyx_k_ERR_FILE_IN_USE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_GROUP, __pyx_k_ERR_GROUP, sizeof(__pyx_k_ERR_GROUP), 0, 0, 1, 1}, {&__pyx_n_s_ERR_INFO, __pyx_k_ERR_INFO, sizeof(__pyx_k_ERR_INFO), 0, 0, 1, 1}, {&__pyx_n_s_ERR_INFO_KEY, __pyx_k_ERR_INFO_KEY, sizeof(__pyx_k_ERR_INFO_KEY), 0, 0, 1, 1}, {&__pyx_n_s_ERR_INFO_NOKEY, __pyx_k_ERR_INFO_NOKEY, sizeof(__pyx_k_ERR_INFO_NOKEY), 0, 0, 1, 1}, {&__pyx_n_s_ERR_INFO_VALUE, __pyx_k_ERR_INFO_VALUE, sizeof(__pyx_k_ERR_INFO_VALUE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_INTERN, __pyx_k_ERR_INTERN, sizeof(__pyx_k_ERR_INTERN), 0, 0, 1, 1}, {&__pyx_n_s_ERR_IN_STATUS, __pyx_k_ERR_IN_STATUS, sizeof(__pyx_k_ERR_IN_STATUS), 0, 0, 1, 1}, {&__pyx_n_s_ERR_IO, __pyx_k_ERR_IO, sizeof(__pyx_k_ERR_IO), 0, 0, 1, 1}, {&__pyx_n_s_ERR_KEYVAL, __pyx_k_ERR_KEYVAL, sizeof(__pyx_k_ERR_KEYVAL), 0, 0, 1, 1}, {&__pyx_n_s_ERR_LASTCODE, __pyx_k_ERR_LASTCODE, sizeof(__pyx_k_ERR_LASTCODE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_LOCKTYPE, __pyx_k_ERR_LOCKTYPE, sizeof(__pyx_k_ERR_LOCKTYPE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_NAME, __pyx_k_ERR_NAME, sizeof(__pyx_k_ERR_NAME), 0, 0, 1, 1}, {&__pyx_n_s_ERR_NOT_SAME, __pyx_k_ERR_NOT_SAME, sizeof(__pyx_k_ERR_NOT_SAME), 0, 0, 1, 1}, {&__pyx_n_s_ERR_NO_MEM, __pyx_k_ERR_NO_MEM, sizeof(__pyx_k_ERR_NO_MEM), 0, 0, 1, 1}, {&__pyx_n_s_ERR_NO_SPACE, __pyx_k_ERR_NO_SPACE, sizeof(__pyx_k_ERR_NO_SPACE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_NO_SUCH_FILE, __pyx_k_ERR_NO_SUCH_FILE, sizeof(__pyx_k_ERR_NO_SUCH_FILE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_OP, __pyx_k_ERR_OP, sizeof(__pyx_k_ERR_OP), 0, 0, 1, 1}, {&__pyx_n_s_ERR_OTHER, __pyx_k_ERR_OTHER, sizeof(__pyx_k_ERR_OTHER), 0, 0, 1, 1}, {&__pyx_n_s_ERR_PENDING, __pyx_k_ERR_PENDING, sizeof(__pyx_k_ERR_PENDING), 0, 0, 1, 1}, {&__pyx_n_s_ERR_PORT, __pyx_k_ERR_PORT, sizeof(__pyx_k_ERR_PORT), 0, 0, 1, 1}, {&__pyx_n_s_ERR_QUOTA, __pyx_k_ERR_QUOTA, sizeof(__pyx_k_ERR_QUOTA), 0, 0, 1, 1}, {&__pyx_n_s_ERR_RANK, __pyx_k_ERR_RANK, sizeof(__pyx_k_ERR_RANK), 0, 0, 1, 1}, {&__pyx_n_s_ERR_READ_ONLY, __pyx_k_ERR_READ_ONLY, sizeof(__pyx_k_ERR_READ_ONLY), 0, 0, 1, 1}, {&__pyx_n_s_ERR_REQUEST, __pyx_k_ERR_REQUEST, sizeof(__pyx_k_ERR_REQUEST), 0, 0, 1, 1}, {&__pyx_n_s_ERR_RMA_ATTACH, __pyx_k_ERR_RMA_ATTACH, sizeof(__pyx_k_ERR_RMA_ATTACH), 0, 0, 1, 1}, {&__pyx_n_s_ERR_RMA_CONFLICT, __pyx_k_ERR_RMA_CONFLICT, sizeof(__pyx_k_ERR_RMA_CONFLICT), 0, 0, 1, 1}, {&__pyx_n_s_ERR_RMA_FLAVOR, __pyx_k_ERR_RMA_FLAVOR, sizeof(__pyx_k_ERR_RMA_FLAVOR), 0, 0, 1, 1}, {&__pyx_n_s_ERR_RMA_RANGE, __pyx_k_ERR_RMA_RANGE, sizeof(__pyx_k_ERR_RMA_RANGE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_RMA_SHARED, __pyx_k_ERR_RMA_SHARED, sizeof(__pyx_k_ERR_RMA_SHARED), 0, 0, 1, 1}, {&__pyx_n_s_ERR_RMA_SYNC, __pyx_k_ERR_RMA_SYNC, sizeof(__pyx_k_ERR_RMA_SYNC), 0, 0, 1, 1}, {&__pyx_n_s_ERR_ROOT, __pyx_k_ERR_ROOT, sizeof(__pyx_k_ERR_ROOT), 0, 0, 1, 1}, {&__pyx_n_s_ERR_SERVICE, __pyx_k_ERR_SERVICE, sizeof(__pyx_k_ERR_SERVICE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_SIZE, __pyx_k_ERR_SIZE, sizeof(__pyx_k_ERR_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_SPAWN, __pyx_k_ERR_SPAWN, sizeof(__pyx_k_ERR_SPAWN), 0, 0, 1, 1}, {&__pyx_n_s_ERR_TAG, __pyx_k_ERR_TAG, sizeof(__pyx_k_ERR_TAG), 0, 0, 1, 1}, {&__pyx_n_s_ERR_TOPOLOGY, __pyx_k_ERR_TOPOLOGY, sizeof(__pyx_k_ERR_TOPOLOGY), 0, 0, 1, 1}, {&__pyx_n_s_ERR_TRUNCATE, __pyx_k_ERR_TRUNCATE, sizeof(__pyx_k_ERR_TRUNCATE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_TYPE, __pyx_k_ERR_TYPE, sizeof(__pyx_k_ERR_TYPE), 0, 0, 1, 1}, {&__pyx_n_s_ERR_UNKNOWN, __pyx_k_ERR_UNKNOWN, sizeof(__pyx_k_ERR_UNKNOWN), 0, 0, 1, 1}, {&__pyx_n_s_ERR_UNSUPPORTED_DATAREP, __pyx_k_ERR_UNSUPPORTED_DATAREP, sizeof(__pyx_k_ERR_UNSUPPORTED_DATAREP), 0, 0, 1, 1}, {&__pyx_n_s_ERR_UNSUPPORTED_OPERATION, __pyx_k_ERR_UNSUPPORTED_OPERATION, sizeof(__pyx_k_ERR_UNSUPPORTED_OPERATION), 0, 0, 1, 1}, {&__pyx_n_s_ERR_WIN, __pyx_k_ERR_WIN, sizeof(__pyx_k_ERR_WIN), 0, 0, 1, 1}, {&__pyx_n_s_Errhandler, __pyx_k_Errhandler, sizeof(__pyx_k_Errhandler), 0, 0, 1, 1}, {&__pyx_kp_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 0}, {&__pyx_n_s_Exception_2, __pyx_k_Exception_2, sizeof(__pyx_k_Exception_2), 0, 0, 1, 1}, {&__pyx_n_s_Exception_Get_error_class, __pyx_k_Exception_Get_error_class, sizeof(__pyx_k_Exception_Get_error_class), 0, 0, 1, 1}, {&__pyx_n_s_Exception_Get_error_code, __pyx_k_Exception_Get_error_code, sizeof(__pyx_k_Exception_Get_error_code), 0, 0, 1, 1}, {&__pyx_n_s_Exception_Get_error_string, __pyx_k_Exception_Get_error_string, sizeof(__pyx_k_Exception_Get_error_string), 0, 0, 1, 1}, {&__pyx_n_s_Exception___bool, __pyx_k_Exception___bool, sizeof(__pyx_k_Exception___bool), 0, 0, 1, 1}, {&__pyx_n_s_Exception___eq, __pyx_k_Exception___eq, sizeof(__pyx_k_Exception___eq), 0, 0, 1, 1}, {&__pyx_n_s_Exception___ge, __pyx_k_Exception___ge, sizeof(__pyx_k_Exception___ge), 0, 0, 1, 1}, {&__pyx_n_s_Exception___gt, __pyx_k_Exception___gt, sizeof(__pyx_k_Exception___gt), 0, 0, 1, 1}, {&__pyx_n_s_Exception___hash, __pyx_k_Exception___hash, sizeof(__pyx_k_Exception___hash), 0, 0, 1, 1}, {&__pyx_n_s_Exception___init, __pyx_k_Exception___init, sizeof(__pyx_k_Exception___init), 0, 0, 1, 1}, {&__pyx_n_s_Exception___int, __pyx_k_Exception___int, sizeof(__pyx_k_Exception___int), 0, 0, 1, 1}, {&__pyx_n_s_Exception___le, __pyx_k_Exception___le, sizeof(__pyx_k_Exception___le), 0, 0, 1, 1}, {&__pyx_n_s_Exception___lt, __pyx_k_Exception___lt, sizeof(__pyx_k_Exception___lt), 0, 0, 1, 1}, {&__pyx_n_s_Exception___ne, __pyx_k_Exception___ne, sizeof(__pyx_k_Exception___ne), 0, 0, 1, 1}, {&__pyx_n_s_Exception___repr, __pyx_k_Exception___repr, sizeof(__pyx_k_Exception___repr), 0, 0, 1, 1}, {&__pyx_n_s_Exception___str, __pyx_k_Exception___str, sizeof(__pyx_k_Exception___str), 0, 0, 1, 1}, {&__pyx_n_s_F90_COMPLEX, __pyx_k_F90_COMPLEX, sizeof(__pyx_k_F90_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_F90_INTEGER, __pyx_k_F90_INTEGER, sizeof(__pyx_k_F90_INTEGER), 0, 0, 1, 1}, {&__pyx_n_s_F90_REAL, __pyx_k_F90_REAL, sizeof(__pyx_k_F90_REAL), 0, 0, 1, 1}, {&__pyx_n_s_FILE_NULL, __pyx_k_FILE_NULL, sizeof(__pyx_k_FILE_NULL), 0, 0, 1, 1}, {&__pyx_n_s_FLOAT, __pyx_k_FLOAT, sizeof(__pyx_k_FLOAT), 0, 0, 1, 1}, {&__pyx_n_s_FLOAT_INT, __pyx_k_FLOAT_INT, sizeof(__pyx_k_FLOAT_INT), 0, 0, 1, 1}, {&__pyx_n_s_F_BOOL, __pyx_k_F_BOOL, sizeof(__pyx_k_F_BOOL), 0, 0, 1, 1}, {&__pyx_n_s_F_COMPLEX, __pyx_k_F_COMPLEX, sizeof(__pyx_k_F_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_F_DOUBLE, __pyx_k_F_DOUBLE, sizeof(__pyx_k_F_DOUBLE), 0, 0, 1, 1}, {&__pyx_n_s_F_DOUBLE_COMPLEX, __pyx_k_F_DOUBLE_COMPLEX, sizeof(__pyx_k_F_DOUBLE_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_F_FLOAT, __pyx_k_F_FLOAT, sizeof(__pyx_k_F_FLOAT), 0, 0, 1, 1}, {&__pyx_n_s_F_FLOAT_COMPLEX, __pyx_k_F_FLOAT_COMPLEX, sizeof(__pyx_k_F_FLOAT_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_F_INT, __pyx_k_F_INT, sizeof(__pyx_k_F_INT), 0, 0, 1, 1}, {&__pyx_n_s_File, __pyx_k_File, sizeof(__pyx_k_File), 0, 0, 1, 1}, {&__pyx_n_s_Finalize, __pyx_k_Finalize, sizeof(__pyx_k_Finalize), 0, 0, 1, 1}, {&__pyx_n_s_Free_keyval, __pyx_k_Free_keyval, sizeof(__pyx_k_Free_keyval), 0, 0, 1, 1}, {&__pyx_n_s_Free_mem, __pyx_k_Free_mem, sizeof(__pyx_k_Free_mem), 0, 0, 1, 1}, {&__pyx_n_s_GRAPH, __pyx_k_GRAPH, sizeof(__pyx_k_GRAPH), 0, 0, 1, 1}, {&__pyx_n_s_GROUP_EMPTY, __pyx_k_GROUP_EMPTY, sizeof(__pyx_k_GROUP_EMPTY), 0, 0, 1, 1}, {&__pyx_n_s_GROUP_NULL, __pyx_k_GROUP_NULL, sizeof(__pyx_k_GROUP_NULL), 0, 0, 1, 1}, {&__pyx_n_s_Get, __pyx_k_Get, sizeof(__pyx_k_Get), 0, 0, 1, 1}, {&__pyx_n_s_Get_address, __pyx_k_Get_address, sizeof(__pyx_k_Get_address), 0, 0, 1, 1}, {&__pyx_n_s_Get_amode, __pyx_k_Get_amode, sizeof(__pyx_k_Get_amode), 0, 0, 1, 1}, {&__pyx_n_s_Get_atomicity, __pyx_k_Get_atomicity, sizeof(__pyx_k_Get_atomicity), 0, 0, 1, 1}, {&__pyx_n_s_Get_contents, __pyx_k_Get_contents, sizeof(__pyx_k_Get_contents), 0, 0, 1, 1}, {&__pyx_n_s_Get_count, __pyx_k_Get_count, sizeof(__pyx_k_Get_count), 0, 0, 1, 1}, {&__pyx_n_s_Get_dim, __pyx_k_Get_dim, sizeof(__pyx_k_Get_dim), 0, 0, 1, 1}, {&__pyx_n_s_Get_dims, __pyx_k_Get_dims, sizeof(__pyx_k_Get_dims), 0, 0, 1, 1}, {&__pyx_n_s_Get_dist_neighbors, __pyx_k_Get_dist_neighbors, sizeof(__pyx_k_Get_dist_neighbors), 0, 0, 1, 1}, {&__pyx_n_s_Get_dist_neighbors_count, __pyx_k_Get_dist_neighbors_count, sizeof(__pyx_k_Get_dist_neighbors_count), 0, 0, 1, 1}, {&__pyx_n_s_Get_envelope, __pyx_k_Get_envelope, sizeof(__pyx_k_Get_envelope), 0, 0, 1, 1}, {&__pyx_n_s_Get_error, __pyx_k_Get_error, sizeof(__pyx_k_Get_error), 0, 0, 1, 1}, {&__pyx_n_s_Get_error_class, __pyx_k_Get_error_class, sizeof(__pyx_k_Get_error_class), 0, 0, 1, 1}, {&__pyx_n_s_Get_error_code, __pyx_k_Get_error_code, sizeof(__pyx_k_Get_error_code), 0, 0, 1, 1}, {&__pyx_n_s_Get_error_string, __pyx_k_Get_error_string, sizeof(__pyx_k_Get_error_string), 0, 0, 1, 1}, {&__pyx_n_s_Get_group, __pyx_k_Get_group, sizeof(__pyx_k_Get_group), 0, 0, 1, 1}, {&__pyx_n_s_Get_info, __pyx_k_Get_info, sizeof(__pyx_k_Get_info), 0, 0, 1, 1}, {&__pyx_n_s_Get_library_version, __pyx_k_Get_library_version, sizeof(__pyx_k_Get_library_version), 0, 0, 1, 1}, {&__pyx_n_s_Get_name, __pyx_k_Get_name, sizeof(__pyx_k_Get_name), 0, 0, 1, 1}, {&__pyx_n_s_Get_neighbors, __pyx_k_Get_neighbors, sizeof(__pyx_k_Get_neighbors), 0, 0, 1, 1}, {&__pyx_n_s_Get_neighbors_count, __pyx_k_Get_neighbors_count, sizeof(__pyx_k_Get_neighbors_count), 0, 0, 1, 1}, {&__pyx_n_s_Get_nkeys, __pyx_k_Get_nkeys, sizeof(__pyx_k_Get_nkeys), 0, 0, 1, 1}, {&__pyx_n_s_Get_nthkey, __pyx_k_Get_nthkey, sizeof(__pyx_k_Get_nthkey), 0, 0, 1, 1}, {&__pyx_n_s_Get_parent, __pyx_k_Get_parent, sizeof(__pyx_k_Get_parent), 0, 0, 1, 1}, {&__pyx_n_s_Get_processor_name, __pyx_k_Get_processor_name, sizeof(__pyx_k_Get_processor_name), 0, 0, 1, 1}, {&__pyx_n_s_Get_rank, __pyx_k_Get_rank, sizeof(__pyx_k_Get_rank), 0, 0, 1, 1}, {&__pyx_n_s_Get_remote_group, __pyx_k_Get_remote_group, sizeof(__pyx_k_Get_remote_group), 0, 0, 1, 1}, {&__pyx_n_s_Get_remote_size, __pyx_k_Get_remote_size, sizeof(__pyx_k_Get_remote_size), 0, 0, 1, 1}, {&__pyx_n_s_Get_size, __pyx_k_Get_size, sizeof(__pyx_k_Get_size), 0, 0, 1, 1}, {&__pyx_n_s_Get_source, __pyx_k_Get_source, sizeof(__pyx_k_Get_source), 0, 0, 1, 1}, {&__pyx_n_s_Get_tag, __pyx_k_Get_tag, sizeof(__pyx_k_Get_tag), 0, 0, 1, 1}, {&__pyx_n_s_Get_topo, __pyx_k_Get_topo, sizeof(__pyx_k_Get_topo), 0, 0, 1, 1}, {&__pyx_n_s_Get_topology, __pyx_k_Get_topology, sizeof(__pyx_k_Get_topology), 0, 0, 1, 1}, {&__pyx_n_s_Get_version, __pyx_k_Get_version, sizeof(__pyx_k_Get_version), 0, 0, 1, 1}, {&__pyx_n_s_Graphcomm, __pyx_k_Graphcomm, sizeof(__pyx_k_Graphcomm), 0, 0, 1, 1}, {&__pyx_n_s_Grequest, __pyx_k_Grequest, sizeof(__pyx_k_Grequest), 0, 0, 1, 1}, {&__pyx_n_s_Group, __pyx_k_Group, sizeof(__pyx_k_Group), 0, 0, 1, 1}, {&__pyx_n_s_HIGHEST_PROTOCOL, __pyx_k_HIGHEST_PROTOCOL, sizeof(__pyx_k_HIGHEST_PROTOCOL), 0, 0, 1, 1}, {&__pyx_n_s_HINDEXED, __pyx_k_HINDEXED, sizeof(__pyx_k_HINDEXED), 0, 0, 1, 1}, {&__pyx_n_s_HINDEXED_BLOCK, __pyx_k_HINDEXED_BLOCK, sizeof(__pyx_k_HINDEXED_BLOCK), 0, 0, 1, 1}, {&__pyx_n_s_HOST, __pyx_k_HOST, sizeof(__pyx_k_HOST), 0, 0, 1, 1}, {&__pyx_n_s_HVECTOR, __pyx_k_HVECTOR, sizeof(__pyx_k_HVECTOR), 0, 0, 1, 1}, {&__pyx_n_s_IDENT, __pyx_k_IDENT, sizeof(__pyx_k_IDENT), 0, 0, 1, 1}, {&__pyx_n_s_INDEXED, __pyx_k_INDEXED, sizeof(__pyx_k_INDEXED), 0, 0, 1, 1}, {&__pyx_n_s_INDEXED_BLOCK, __pyx_k_INDEXED_BLOCK, sizeof(__pyx_k_INDEXED_BLOCK), 0, 0, 1, 1}, {&__pyx_n_s_INFO_ENV, __pyx_k_INFO_ENV, sizeof(__pyx_k_INFO_ENV), 0, 0, 1, 1}, {&__pyx_n_s_INFO_NULL, __pyx_k_INFO_NULL, sizeof(__pyx_k_INFO_NULL), 0, 0, 1, 1}, {&__pyx_n_s_INT, __pyx_k_INT, sizeof(__pyx_k_INT), 0, 0, 1, 1}, {&__pyx_n_s_INT16_T, __pyx_k_INT16_T, sizeof(__pyx_k_INT16_T), 0, 0, 1, 1}, {&__pyx_n_s_INT32_T, __pyx_k_INT32_T, sizeof(__pyx_k_INT32_T), 0, 0, 1, 1}, {&__pyx_n_s_INT64_T, __pyx_k_INT64_T, sizeof(__pyx_k_INT64_T), 0, 0, 1, 1}, {&__pyx_n_s_INT8_T, __pyx_k_INT8_T, sizeof(__pyx_k_INT8_T), 0, 0, 1, 1}, {&__pyx_n_s_INTEGER, __pyx_k_INTEGER, sizeof(__pyx_k_INTEGER), 0, 0, 1, 1}, {&__pyx_n_s_INTEGER1, __pyx_k_INTEGER1, sizeof(__pyx_k_INTEGER1), 0, 0, 1, 1}, {&__pyx_n_s_INTEGER16, __pyx_k_INTEGER16, sizeof(__pyx_k_INTEGER16), 0, 0, 1, 1}, {&__pyx_n_s_INTEGER2, __pyx_k_INTEGER2, sizeof(__pyx_k_INTEGER2), 0, 0, 1, 1}, {&__pyx_n_s_INTEGER4, __pyx_k_INTEGER4, sizeof(__pyx_k_INTEGER4), 0, 0, 1, 1}, {&__pyx_n_s_INTEGER8, __pyx_k_INTEGER8, sizeof(__pyx_k_INTEGER8), 0, 0, 1, 1}, {&__pyx_n_s_INT_INT, __pyx_k_INT_INT, sizeof(__pyx_k_INT_INT), 0, 0, 1, 1}, {&__pyx_n_s_IN_PLACE, __pyx_k_IN_PLACE, sizeof(__pyx_k_IN_PLACE), 0, 0, 1, 1}, {&__pyx_n_s_IO, __pyx_k_IO, sizeof(__pyx_k_IO), 0, 0, 1, 1}, {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, {&__pyx_n_s_Info, __pyx_k_Info, sizeof(__pyx_k_Info), 0, 0, 1, 1}, {&__pyx_n_s_Init, __pyx_k_Init, sizeof(__pyx_k_Init), 0, 0, 1, 1}, {&__pyx_n_s_Init_thread, __pyx_k_Init_thread, sizeof(__pyx_k_Init_thread), 0, 0, 1, 1}, {&__pyx_n_s_Intercomm, __pyx_k_Intercomm, sizeof(__pyx_k_Intercomm), 0, 0, 1, 1}, {&__pyx_n_s_Intersect, __pyx_k_Intersect, sizeof(__pyx_k_Intersect), 0, 0, 1, 1}, {&__pyx_n_s_Intersection, __pyx_k_Intersection, sizeof(__pyx_k_Intersection), 0, 0, 1, 1}, {&__pyx_n_s_Intracomm, __pyx_k_Intracomm, sizeof(__pyx_k_Intracomm), 0, 0, 1, 1}, {&__pyx_n_s_Iprobe, __pyx_k_Iprobe, sizeof(__pyx_k_Iprobe), 0, 0, 1, 1}, {&__pyx_n_s_Is_cancelled, __pyx_k_Is_cancelled, sizeof(__pyx_k_Is_cancelled), 0, 0, 1, 1}, {&__pyx_n_s_Is_commutative, __pyx_k_Is_commutative, sizeof(__pyx_k_Is_commutative), 0, 0, 1, 1}, {&__pyx_n_s_Is_finalized, __pyx_k_Is_finalized, sizeof(__pyx_k_Is_finalized), 0, 0, 1, 1}, {&__pyx_n_s_Is_initialized, __pyx_k_Is_initialized, sizeof(__pyx_k_Is_initialized), 0, 0, 1, 1}, {&__pyx_n_s_Is_inter, __pyx_k_Is_inter, sizeof(__pyx_k_Is_inter), 0, 0, 1, 1}, {&__pyx_n_s_Is_intra, __pyx_k_Is_intra, sizeof(__pyx_k_Is_intra), 0, 0, 1, 1}, {&__pyx_n_s_Is_thread_main, __pyx_k_Is_thread_main, sizeof(__pyx_k_Is_thread_main), 0, 0, 1, 1}, {&__pyx_n_s_Join, __pyx_k_Join, sizeof(__pyx_k_Join), 0, 0, 1, 1}, {&__pyx_n_s_KEYVAL_INVALID, __pyx_k_KEYVAL_INVALID, sizeof(__pyx_k_KEYVAL_INVALID), 0, 0, 1, 1}, {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, {&__pyx_n_s_LAND, __pyx_k_LAND, sizeof(__pyx_k_LAND), 0, 0, 1, 1}, {&__pyx_n_s_LASTUSEDCODE, __pyx_k_LASTUSEDCODE, sizeof(__pyx_k_LASTUSEDCODE), 0, 0, 1, 1}, {&__pyx_n_s_LB, __pyx_k_LB, sizeof(__pyx_k_LB), 0, 0, 1, 1}, {&__pyx_n_s_LOCK_EXCLUSIVE, __pyx_k_LOCK_EXCLUSIVE, sizeof(__pyx_k_LOCK_EXCLUSIVE), 0, 0, 1, 1}, {&__pyx_n_s_LOCK_SHARED, __pyx_k_LOCK_SHARED, sizeof(__pyx_k_LOCK_SHARED), 0, 0, 1, 1}, {&__pyx_n_s_LOGICAL, __pyx_k_LOGICAL, sizeof(__pyx_k_LOGICAL), 0, 0, 1, 1}, {&__pyx_n_s_LOGICAL1, __pyx_k_LOGICAL1, sizeof(__pyx_k_LOGICAL1), 0, 0, 1, 1}, {&__pyx_n_s_LOGICAL2, __pyx_k_LOGICAL2, sizeof(__pyx_k_LOGICAL2), 0, 0, 1, 1}, {&__pyx_n_s_LOGICAL4, __pyx_k_LOGICAL4, sizeof(__pyx_k_LOGICAL4), 0, 0, 1, 1}, {&__pyx_n_s_LOGICAL8, __pyx_k_LOGICAL8, sizeof(__pyx_k_LOGICAL8), 0, 0, 1, 1}, {&__pyx_n_s_LONG, __pyx_k_LONG, sizeof(__pyx_k_LONG), 0, 0, 1, 1}, {&__pyx_n_s_LONG_DOUBLE, __pyx_k_LONG_DOUBLE, sizeof(__pyx_k_LONG_DOUBLE), 0, 0, 1, 1}, {&__pyx_n_s_LONG_DOUBLE_INT, __pyx_k_LONG_DOUBLE_INT, sizeof(__pyx_k_LONG_DOUBLE_INT), 0, 0, 1, 1}, {&__pyx_n_s_LONG_INT, __pyx_k_LONG_INT, sizeof(__pyx_k_LONG_INT), 0, 0, 1, 1}, {&__pyx_n_s_LONG_LONG, __pyx_k_LONG_LONG, sizeof(__pyx_k_LONG_LONG), 0, 0, 1, 1}, {&__pyx_n_s_LOR, __pyx_k_LOR, sizeof(__pyx_k_LOR), 0, 0, 1, 1}, {&__pyx_n_s_LXOR, __pyx_k_LXOR, sizeof(__pyx_k_LXOR), 0, 0, 1, 1}, {&__pyx_n_s_Lookup_name, __pyx_k_Lookup_name, sizeof(__pyx_k_Lookup_name), 0, 0, 1, 1}, {&__pyx_n_s_MAX, __pyx_k_MAX, sizeof(__pyx_k_MAX), 0, 0, 1, 1}, {&__pyx_n_s_MAXLOC, __pyx_k_MAXLOC, sizeof(__pyx_k_MAXLOC), 0, 0, 1, 1}, {&__pyx_n_s_MAX_DATAREP_STRING, __pyx_k_MAX_DATAREP_STRING, sizeof(__pyx_k_MAX_DATAREP_STRING), 0, 0, 1, 1}, {&__pyx_n_s_MAX_ERROR_STRING, __pyx_k_MAX_ERROR_STRING, sizeof(__pyx_k_MAX_ERROR_STRING), 0, 0, 1, 1}, {&__pyx_n_s_MAX_INFO_KEY, __pyx_k_MAX_INFO_KEY, sizeof(__pyx_k_MAX_INFO_KEY), 0, 0, 1, 1}, {&__pyx_n_s_MAX_INFO_VAL, __pyx_k_MAX_INFO_VAL, sizeof(__pyx_k_MAX_INFO_VAL), 0, 0, 1, 1}, {&__pyx_n_s_MAX_LIBRARY_VERSION_STRING, __pyx_k_MAX_LIBRARY_VERSION_STRING, sizeof(__pyx_k_MAX_LIBRARY_VERSION_STRING), 0, 0, 1, 1}, {&__pyx_n_s_MAX_OBJECT_NAME, __pyx_k_MAX_OBJECT_NAME, sizeof(__pyx_k_MAX_OBJECT_NAME), 0, 0, 1, 1}, {&__pyx_n_s_MAX_PORT_NAME, __pyx_k_MAX_PORT_NAME, sizeof(__pyx_k_MAX_PORT_NAME), 0, 0, 1, 1}, {&__pyx_n_s_MAX_PROCESSOR_NAME, __pyx_k_MAX_PROCESSOR_NAME, sizeof(__pyx_k_MAX_PROCESSOR_NAME), 0, 0, 1, 1}, {&__pyx_n_s_MESSAGE_NO_PROC, __pyx_k_MESSAGE_NO_PROC, sizeof(__pyx_k_MESSAGE_NO_PROC), 0, 0, 1, 1}, {&__pyx_n_s_MESSAGE_NULL, __pyx_k_MESSAGE_NULL, sizeof(__pyx_k_MESSAGE_NULL), 0, 0, 1, 1}, {&__pyx_n_s_MIN, __pyx_k_MIN, sizeof(__pyx_k_MIN), 0, 0, 1, 1}, {&__pyx_n_s_MINLOC, __pyx_k_MINLOC, sizeof(__pyx_k_MINLOC), 0, 0, 1, 1}, {&__pyx_n_s_MODE_APPEND, __pyx_k_MODE_APPEND, sizeof(__pyx_k_MODE_APPEND), 0, 0, 1, 1}, {&__pyx_n_s_MODE_CREATE, __pyx_k_MODE_CREATE, sizeof(__pyx_k_MODE_CREATE), 0, 0, 1, 1}, {&__pyx_n_s_MODE_DELETE_ON_CLOSE, __pyx_k_MODE_DELETE_ON_CLOSE, sizeof(__pyx_k_MODE_DELETE_ON_CLOSE), 0, 0, 1, 1}, {&__pyx_n_s_MODE_EXCL, __pyx_k_MODE_EXCL, sizeof(__pyx_k_MODE_EXCL), 0, 0, 1, 1}, {&__pyx_n_s_MODE_NOCHECK, __pyx_k_MODE_NOCHECK, sizeof(__pyx_k_MODE_NOCHECK), 0, 0, 1, 1}, {&__pyx_n_s_MODE_NOPRECEDE, __pyx_k_MODE_NOPRECEDE, sizeof(__pyx_k_MODE_NOPRECEDE), 0, 0, 1, 1}, {&__pyx_n_s_MODE_NOPUT, __pyx_k_MODE_NOPUT, sizeof(__pyx_k_MODE_NOPUT), 0, 0, 1, 1}, {&__pyx_n_s_MODE_NOSTORE, __pyx_k_MODE_NOSTORE, sizeof(__pyx_k_MODE_NOSTORE), 0, 0, 1, 1}, {&__pyx_n_s_MODE_NOSUCCEED, __pyx_k_MODE_NOSUCCEED, sizeof(__pyx_k_MODE_NOSUCCEED), 0, 0, 1, 1}, {&__pyx_n_s_MODE_RDONLY, __pyx_k_MODE_RDONLY, sizeof(__pyx_k_MODE_RDONLY), 0, 0, 1, 1}, {&__pyx_n_s_MODE_RDWR, __pyx_k_MODE_RDWR, sizeof(__pyx_k_MODE_RDWR), 0, 0, 1, 1}, {&__pyx_n_s_MODE_SEQUENTIAL, __pyx_k_MODE_SEQUENTIAL, sizeof(__pyx_k_MODE_SEQUENTIAL), 0, 0, 1, 1}, {&__pyx_n_s_MODE_UNIQUE_OPEN, __pyx_k_MODE_UNIQUE_OPEN, sizeof(__pyx_k_MODE_UNIQUE_OPEN), 0, 0, 1, 1}, {&__pyx_n_s_MODE_WRONLY, __pyx_k_MODE_WRONLY, sizeof(__pyx_k_MODE_WRONLY), 0, 0, 1, 1}, {&__pyx_kp_s_MPI_Exception_d, __pyx_k_MPI_Exception_d, sizeof(__pyx_k_MPI_Exception_d), 0, 0, 1, 0}, {&__pyx_kp_s_MPI_Init_failed_error_code_d, __pyx_k_MPI_Init_failed_error_code_d, sizeof(__pyx_k_MPI_Init_failed_error_code_d), 0, 0, 1, 0}, {&__pyx_kp_s_MPI_Init_thread_failed_error_cod, __pyx_k_MPI_Init_thread_failed_error_cod, sizeof(__pyx_k_MPI_Init_thread_failed_error_cod), 0, 0, 1, 0}, {&__pyx_n_s_Match_size, __pyx_k_Match_size, sizeof(__pyx_k_Match_size), 0, 0, 1, 1}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_n_s_Message, __pyx_k_Message, sizeof(__pyx_k_Message), 0, 0, 1, 1}, {&__pyx_kp_s_Message_Passing_Interface, __pyx_k_Message_Passing_Interface, sizeof(__pyx_k_Message_Passing_Interface), 0, 0, 1, 0}, {&__pyx_n_s_NO_OP, __pyx_k_NO_OP, sizeof(__pyx_k_NO_OP), 0, 0, 1, 1}, {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1}, {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, {&__pyx_kp_s_Not_a_topology_communicator, __pyx_k_Not_a_topology_communicator, sizeof(__pyx_k_Not_a_topology_communicator), 0, 0, 1, 0}, {&__pyx_n_s_OFFSET, __pyx_k_OFFSET, sizeof(__pyx_k_OFFSET), 0, 0, 1, 1}, {&__pyx_n_s_OP_NULL, __pyx_k_OP_NULL, sizeof(__pyx_k_OP_NULL), 0, 0, 1, 1}, {&__pyx_n_s_ORDER_C, __pyx_k_ORDER_C, sizeof(__pyx_k_ORDER_C), 0, 0, 1, 1}, {&__pyx_n_s_ORDER_F, __pyx_k_ORDER_F, sizeof(__pyx_k_ORDER_F), 0, 0, 1, 1}, {&__pyx_n_s_ORDER_FORTRAN, __pyx_k_ORDER_FORTRAN, sizeof(__pyx_k_ORDER_FORTRAN), 0, 0, 1, 1}, {&__pyx_n_s_Op, __pyx_k_Op, sizeof(__pyx_k_Op), 0, 0, 1, 1}, {&__pyx_n_s_Open, __pyx_k_Open, sizeof(__pyx_k_Open), 0, 0, 1, 1}, {&__pyx_n_s_Open_port, __pyx_k_Open_port, sizeof(__pyx_k_Open_port), 0, 0, 1, 1}, {&__pyx_n_s_OverflowError, __pyx_k_OverflowError, sizeof(__pyx_k_OverflowError), 0, 0, 1, 1}, {&__pyx_n_s_PACKED, __pyx_k_PACKED, sizeof(__pyx_k_PACKED), 0, 0, 1, 1}, {&__pyx_n_s_PROC_NULL, __pyx_k_PROC_NULL, sizeof(__pyx_k_PROC_NULL), 0, 0, 1, 1}, {&__pyx_n_s_PROD, __pyx_k_PROD, sizeof(__pyx_k_PROD), 0, 0, 1, 1}, {&__pyx_n_s_Pcontrol, __pyx_k_Pcontrol, sizeof(__pyx_k_Pcontrol), 0, 0, 1, 1}, {&__pyx_n_s_Prequest, __pyx_k_Prequest, sizeof(__pyx_k_Prequest), 0, 0, 1, 1}, {&__pyx_n_s_Probe, __pyx_k_Probe, sizeof(__pyx_k_Probe), 0, 0, 1, 1}, {&__pyx_n_s_Publish_name, __pyx_k_Publish_name, sizeof(__pyx_k_Publish_name), 0, 0, 1, 1}, {&__pyx_n_s_Query_thread, __pyx_k_Query_thread, sizeof(__pyx_k_Query_thread), 0, 0, 1, 1}, {&__pyx_n_s_REAL, __pyx_k_REAL, sizeof(__pyx_k_REAL), 0, 0, 1, 1}, {&__pyx_n_s_REAL16, __pyx_k_REAL16, sizeof(__pyx_k_REAL16), 0, 0, 1, 1}, {&__pyx_n_s_REAL2, __pyx_k_REAL2, sizeof(__pyx_k_REAL2), 0, 0, 1, 1}, {&__pyx_n_s_REAL4, __pyx_k_REAL4, sizeof(__pyx_k_REAL4), 0, 0, 1, 1}, {&__pyx_n_s_REAL8, __pyx_k_REAL8, sizeof(__pyx_k_REAL8), 0, 0, 1, 1}, {&__pyx_n_s_REPLACE, __pyx_k_REPLACE, sizeof(__pyx_k_REPLACE), 0, 0, 1, 1}, {&__pyx_n_s_REQUEST_NULL, __pyx_k_REQUEST_NULL, sizeof(__pyx_k_REQUEST_NULL), 0, 0, 1, 1}, {&__pyx_n_s_RESIZED, __pyx_k_RESIZED, sizeof(__pyx_k_RESIZED), 0, 0, 1, 1}, {&__pyx_n_s_ROOT, __pyx_k_ROOT, sizeof(__pyx_k_ROOT), 0, 0, 1, 1}, {&__pyx_n_s_Register_datarep, __pyx_k_Register_datarep, sizeof(__pyx_k_Register_datarep), 0, 0, 1, 1}, {&__pyx_n_s_Request, __pyx_k_Request, sizeof(__pyx_k_Request), 0, 0, 1, 1}, {&__pyx_n_s_Resized, __pyx_k_Resized, sizeof(__pyx_k_Resized), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_SEEK_CUR, __pyx_k_SEEK_CUR, sizeof(__pyx_k_SEEK_CUR), 0, 0, 1, 1}, {&__pyx_n_s_SEEK_END, __pyx_k_SEEK_END, sizeof(__pyx_k_SEEK_END), 0, 0, 1, 1}, {&__pyx_n_s_SEEK_SET, __pyx_k_SEEK_SET, sizeof(__pyx_k_SEEK_SET), 0, 0, 1, 1}, {&__pyx_n_s_SHORT, __pyx_k_SHORT, sizeof(__pyx_k_SHORT), 0, 0, 1, 1}, {&__pyx_n_s_SHORT_INT, __pyx_k_SHORT_INT, sizeof(__pyx_k_SHORT_INT), 0, 0, 1, 1}, {&__pyx_n_s_SIGNED_CHAR, __pyx_k_SIGNED_CHAR, sizeof(__pyx_k_SIGNED_CHAR), 0, 0, 1, 1}, {&__pyx_n_s_SIGNED_INT, __pyx_k_SIGNED_INT, sizeof(__pyx_k_SIGNED_INT), 0, 0, 1, 1}, {&__pyx_n_s_SIGNED_LONG, __pyx_k_SIGNED_LONG, sizeof(__pyx_k_SIGNED_LONG), 0, 0, 1, 1}, {&__pyx_n_s_SIGNED_LONG_LONG, __pyx_k_SIGNED_LONG_LONG, sizeof(__pyx_k_SIGNED_LONG_LONG), 0, 0, 1, 1}, {&__pyx_n_s_SIGNED_SHORT, __pyx_k_SIGNED_SHORT, sizeof(__pyx_k_SIGNED_SHORT), 0, 0, 1, 1}, {&__pyx_n_s_SIMILAR, __pyx_k_SIMILAR, sizeof(__pyx_k_SIMILAR), 0, 0, 1, 1}, {&__pyx_n_s_SINT16_T, __pyx_k_SINT16_T, sizeof(__pyx_k_SINT16_T), 0, 0, 1, 1}, {&__pyx_n_s_SINT32_T, __pyx_k_SINT32_T, sizeof(__pyx_k_SINT32_T), 0, 0, 1, 1}, {&__pyx_n_s_SINT64_T, __pyx_k_SINT64_T, sizeof(__pyx_k_SINT64_T), 0, 0, 1, 1}, {&__pyx_n_s_SINT8_T, __pyx_k_SINT8_T, sizeof(__pyx_k_SINT8_T), 0, 0, 1, 1}, {&__pyx_n_s_STRUCT, __pyx_k_STRUCT, sizeof(__pyx_k_STRUCT), 0, 0, 1, 1}, {&__pyx_n_s_SUBARRAY, __pyx_k_SUBARRAY, sizeof(__pyx_k_SUBARRAY), 0, 0, 1, 1}, {&__pyx_n_s_SUBVERSION, __pyx_k_SUBVERSION, sizeof(__pyx_k_SUBVERSION), 0, 0, 1, 1}, {&__pyx_n_s_SUCCESS, __pyx_k_SUCCESS, sizeof(__pyx_k_SUCCESS), 0, 0, 1, 1}, {&__pyx_n_s_SUM, __pyx_k_SUM, sizeof(__pyx_k_SUM), 0, 0, 1, 1}, {&__pyx_n_s_Set, __pyx_k_Set, sizeof(__pyx_k_Set), 0, 0, 1, 1}, {&__pyx_n_s_Set_atomicity, __pyx_k_Set_atomicity, sizeof(__pyx_k_Set_atomicity), 0, 0, 1, 1}, {&__pyx_n_s_Set_cancelled, __pyx_k_Set_cancelled, sizeof(__pyx_k_Set_cancelled), 0, 0, 1, 1}, {&__pyx_n_s_Set_error, __pyx_k_Set_error, sizeof(__pyx_k_Set_error), 0, 0, 1, 1}, {&__pyx_n_s_Set_info, __pyx_k_Set_info, sizeof(__pyx_k_Set_info), 0, 0, 1, 1}, {&__pyx_n_s_Set_name, __pyx_k_Set_name, sizeof(__pyx_k_Set_name), 0, 0, 1, 1}, {&__pyx_n_s_Set_source, __pyx_k_Set_source, sizeof(__pyx_k_Set_source), 0, 0, 1, 1}, {&__pyx_n_s_Set_tag, __pyx_k_Set_tag, sizeof(__pyx_k_Set_tag), 0, 0, 1, 1}, {&__pyx_n_s_Shift, __pyx_k_Shift, sizeof(__pyx_k_Shift), 0, 0, 1, 1}, {&__pyx_n_s_Start, __pyx_k_Start, sizeof(__pyx_k_Start), 0, 0, 1, 1}, {&__pyx_n_s_Startall, __pyx_k_Startall, sizeof(__pyx_k_Startall), 0, 0, 1, 1}, {&__pyx_n_s_Status, __pyx_k_Status, sizeof(__pyx_k_Status), 0, 0, 1, 1}, {&__pyx_n_s_StringIO, __pyx_k_StringIO, sizeof(__pyx_k_StringIO), 0, 0, 1, 1}, {&__pyx_n_s_SystemError, __pyx_k_SystemError, sizeof(__pyx_k_SystemError), 0, 0, 1, 1}, {&__pyx_n_s_TAG_UB, __pyx_k_TAG_UB, sizeof(__pyx_k_TAG_UB), 0, 0, 1, 1}, {&__pyx_n_s_THREAD_FUNNELED, __pyx_k_THREAD_FUNNELED, sizeof(__pyx_k_THREAD_FUNNELED), 0, 0, 1, 1}, {&__pyx_n_s_THREAD_MULTIPLE, __pyx_k_THREAD_MULTIPLE, sizeof(__pyx_k_THREAD_MULTIPLE), 0, 0, 1, 1}, {&__pyx_n_s_THREAD_SERIALIZED, __pyx_k_THREAD_SERIALIZED, sizeof(__pyx_k_THREAD_SERIALIZED), 0, 0, 1, 1}, {&__pyx_n_s_THREAD_SINGLE, __pyx_k_THREAD_SINGLE, sizeof(__pyx_k_THREAD_SINGLE), 0, 0, 1, 1}, {&__pyx_n_s_TWOINT, __pyx_k_TWOINT, sizeof(__pyx_k_TWOINT), 0, 0, 1, 1}, {&__pyx_n_s_TYPECLASS_COMPLEX, __pyx_k_TYPECLASS_COMPLEX, sizeof(__pyx_k_TYPECLASS_COMPLEX), 0, 0, 1, 1}, {&__pyx_n_s_TYPECLASS_INTEGER, __pyx_k_TYPECLASS_INTEGER, sizeof(__pyx_k_TYPECLASS_INTEGER), 0, 0, 1, 1}, {&__pyx_n_s_TYPECLASS_REAL, __pyx_k_TYPECLASS_REAL, sizeof(__pyx_k_TYPECLASS_REAL), 0, 0, 1, 1}, {&__pyx_n_s_Testall, __pyx_k_Testall, sizeof(__pyx_k_Testall), 0, 0, 1, 1}, {&__pyx_n_s_Testany, __pyx_k_Testany, sizeof(__pyx_k_Testany), 0, 0, 1, 1}, {&__pyx_n_s_Testsome, __pyx_k_Testsome, sizeof(__pyx_k_Testsome), 0, 0, 1, 1}, {&__pyx_n_s_Topocomm, __pyx_k_Topocomm, sizeof(__pyx_k_Topocomm), 0, 0, 1, 1}, {&__pyx_n_s_Translate_ranks, __pyx_k_Translate_ranks, sizeof(__pyx_k_Translate_ranks), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_UB, __pyx_k_UB, sizeof(__pyx_k_UB), 0, 0, 1, 1}, {&__pyx_n_s_UINT16_T, __pyx_k_UINT16_T, sizeof(__pyx_k_UINT16_T), 0, 0, 1, 1}, {&__pyx_n_s_UINT32_T, __pyx_k_UINT32_T, sizeof(__pyx_k_UINT32_T), 0, 0, 1, 1}, {&__pyx_n_s_UINT64_T, __pyx_k_UINT64_T, sizeof(__pyx_k_UINT64_T), 0, 0, 1, 1}, {&__pyx_n_s_UINT8_T, __pyx_k_UINT8_T, sizeof(__pyx_k_UINT8_T), 0, 0, 1, 1}, {&__pyx_n_s_UNDEFINED, __pyx_k_UNDEFINED, sizeof(__pyx_k_UNDEFINED), 0, 0, 1, 1}, {&__pyx_n_s_UNEQUAL, __pyx_k_UNEQUAL, sizeof(__pyx_k_UNEQUAL), 0, 0, 1, 1}, {&__pyx_n_s_UNIVERSE_SIZE, __pyx_k_UNIVERSE_SIZE, sizeof(__pyx_k_UNIVERSE_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_UNSIGNED, __pyx_k_UNSIGNED, sizeof(__pyx_k_UNSIGNED), 0, 0, 1, 1}, {&__pyx_n_s_UNSIGNED_CHAR, __pyx_k_UNSIGNED_CHAR, sizeof(__pyx_k_UNSIGNED_CHAR), 0, 0, 1, 1}, {&__pyx_n_s_UNSIGNED_INT, __pyx_k_UNSIGNED_INT, sizeof(__pyx_k_UNSIGNED_INT), 0, 0, 1, 1}, {&__pyx_n_s_UNSIGNED_LONG, __pyx_k_UNSIGNED_LONG, sizeof(__pyx_k_UNSIGNED_LONG), 0, 0, 1, 1}, {&__pyx_n_s_UNSIGNED_LONG_LONG, __pyx_k_UNSIGNED_LONG_LONG, sizeof(__pyx_k_UNSIGNED_LONG_LONG), 0, 0, 1, 1}, {&__pyx_n_s_UNSIGNED_SHORT, __pyx_k_UNSIGNED_SHORT, sizeof(__pyx_k_UNSIGNED_SHORT), 0, 0, 1, 1}, {&__pyx_n_s_UNWEIGHTED, __pyx_k_UNWEIGHTED, sizeof(__pyx_k_UNWEIGHTED), 0, 0, 1, 1}, {&__pyx_n_s_Union, __pyx_k_Union, sizeof(__pyx_k_Union), 0, 0, 1, 1}, {&__pyx_n_s_Unpublish_name, __pyx_k_Unpublish_name, sizeof(__pyx_k_Unpublish_name), 0, 0, 1, 1}, {&__pyx_n_s_UserWarning, __pyx_k_UserWarning, sizeof(__pyx_k_UserWarning), 0, 0, 1, 1}, {&__pyx_n_s_VECTOR, __pyx_k_VECTOR, sizeof(__pyx_k_VECTOR), 0, 0, 1, 1}, {&__pyx_n_s_VERSION, __pyx_k_VERSION, sizeof(__pyx_k_VERSION), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_WCHAR, __pyx_k_WCHAR, sizeof(__pyx_k_WCHAR), 0, 0, 1, 1}, {&__pyx_n_s_WEIGHTS_EMPTY, __pyx_k_WEIGHTS_EMPTY, sizeof(__pyx_k_WEIGHTS_EMPTY), 0, 0, 1, 1}, {&__pyx_n_s_WIN_BASE, __pyx_k_WIN_BASE, sizeof(__pyx_k_WIN_BASE), 0, 0, 1, 1}, {&__pyx_n_s_WIN_CREATE_FLAVOR, __pyx_k_WIN_CREATE_FLAVOR, sizeof(__pyx_k_WIN_CREATE_FLAVOR), 0, 0, 1, 1}, {&__pyx_n_s_WIN_DISP_UNIT, __pyx_k_WIN_DISP_UNIT, sizeof(__pyx_k_WIN_DISP_UNIT), 0, 0, 1, 1}, {&__pyx_n_s_WIN_FLAVOR, __pyx_k_WIN_FLAVOR, sizeof(__pyx_k_WIN_FLAVOR), 0, 0, 1, 1}, {&__pyx_n_s_WIN_FLAVOR_ALLOCATE, __pyx_k_WIN_FLAVOR_ALLOCATE, sizeof(__pyx_k_WIN_FLAVOR_ALLOCATE), 0, 0, 1, 1}, {&__pyx_n_s_WIN_FLAVOR_CREATE, __pyx_k_WIN_FLAVOR_CREATE, sizeof(__pyx_k_WIN_FLAVOR_CREATE), 0, 0, 1, 1}, {&__pyx_n_s_WIN_FLAVOR_DYNAMIC, __pyx_k_WIN_FLAVOR_DYNAMIC, sizeof(__pyx_k_WIN_FLAVOR_DYNAMIC), 0, 0, 1, 1}, {&__pyx_n_s_WIN_FLAVOR_SHARED, __pyx_k_WIN_FLAVOR_SHARED, sizeof(__pyx_k_WIN_FLAVOR_SHARED), 0, 0, 1, 1}, {&__pyx_n_s_WIN_MODEL, __pyx_k_WIN_MODEL, sizeof(__pyx_k_WIN_MODEL), 0, 0, 1, 1}, {&__pyx_n_s_WIN_NULL, __pyx_k_WIN_NULL, sizeof(__pyx_k_WIN_NULL), 0, 0, 1, 1}, {&__pyx_n_s_WIN_SEPARATE, __pyx_k_WIN_SEPARATE, sizeof(__pyx_k_WIN_SEPARATE), 0, 0, 1, 1}, {&__pyx_n_s_WIN_SIZE, __pyx_k_WIN_SIZE, sizeof(__pyx_k_WIN_SIZE), 0, 0, 1, 1}, {&__pyx_n_s_WIN_UNIFIED, __pyx_k_WIN_UNIFIED, sizeof(__pyx_k_WIN_UNIFIED), 0, 0, 1, 1}, {&__pyx_n_s_WTIME_IS_GLOBAL, __pyx_k_WTIME_IS_GLOBAL, sizeof(__pyx_k_WTIME_IS_GLOBAL), 0, 0, 1, 1}, {&__pyx_n_s_Waitall, __pyx_k_Waitall, sizeof(__pyx_k_Waitall), 0, 0, 1, 1}, {&__pyx_n_s_Waitany, __pyx_k_Waitany, sizeof(__pyx_k_Waitany), 0, 0, 1, 1}, {&__pyx_n_s_Waitsome, __pyx_k_Waitsome, sizeof(__pyx_k_Waitsome), 0, 0, 1, 1}, {&__pyx_n_s_Win, __pyx_k_Win, sizeof(__pyx_k_Win), 0, 0, 1, 1}, {&__pyx_n_s_Wtick, __pyx_k_Wtick, sizeof(__pyx_k_Wtick), 0, 0, 1, 1}, {&__pyx_n_s_Wtime, __pyx_k_Wtime, sizeof(__pyx_k_Wtime), 0, 0, 1, 1}, {&__pyx_kp_b__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 0, 0}, {&__pyx_kp_s_accessing_non_existent_buffer_se, __pyx_k_accessing_non_existent_buffer_se, sizeof(__pyx_k_accessing_non_existent_buffer_se), 0, 0, 1, 0}, {&__pyx_n_s_addr1, __pyx_k_addr1, sizeof(__pyx_k_addr1), 0, 0, 1, 1}, {&__pyx_n_s_addr2, __pyx_k_addr2, sizeof(__pyx_k_addr2), 0, 0, 1, 1}, {&__pyx_n_s_address, __pyx_k_address, sizeof(__pyx_k_address), 0, 0, 1, 1}, {&__pyx_n_s_addressof, __pyx_k_addressof, sizeof(__pyx_k_addressof), 0, 0, 1, 1}, {&__pyx_n_s_allgather, __pyx_k_allgather, sizeof(__pyx_k_allgather), 0, 0, 1, 1}, {&__pyx_n_s_allocate_lock, __pyx_k_allocate_lock, sizeof(__pyx_k_allocate_lock), 0, 0, 1, 1}, {&__pyx_n_s_alltoall, __pyx_k_alltoall, sizeof(__pyx_k_alltoall), 0, 0, 1, 1}, {&__pyx_n_s_amode, __pyx_k_amode, sizeof(__pyx_k_amode), 0, 0, 1, 1}, {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1}, {&__pyx_n_s_array_interface, __pyx_k_array_interface, sizeof(__pyx_k_array_interface), 0, 0, 1, 1}, {&__pyx_n_s_assertion, __pyx_k_assertion, sizeof(__pyx_k_assertion), 0, 0, 1, 1}, {&__pyx_n_s_attrval, __pyx_k_attrval, sizeof(__pyx_k_attrval), 0, 0, 1, 1}, {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, {&__pyx_n_s_baseptr, __pyx_k_baseptr, sizeof(__pyx_k_baseptr), 0, 0, 1, 1}, {&__pyx_n_s_bcast, __pyx_k_bcast, sizeof(__pyx_k_bcast), 0, 0, 1, 1}, {&__pyx_kp_s_bcast_p2p, __pyx_k_bcast_p2p, sizeof(__pyx_k_bcast_p2p), 0, 0, 1, 0}, {&__pyx_n_s_blocklength, __pyx_k_blocklength, sizeof(__pyx_k_blocklength), 0, 0, 1, 1}, {&__pyx_n_s_blocklengths, __pyx_k_blocklengths, sizeof(__pyx_k_blocklengths), 0, 0, 1, 1}, {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1}, {&__pyx_n_s_buf, __pyx_k_buf, sizeof(__pyx_k_buf), 0, 0, 1, 1}, {&__pyx_n_s_buffer_info, __pyx_k_buffer_info, sizeof(__pyx_k_buffer_info), 0, 0, 1, 1}, {&__pyx_n_s_cPickle, __pyx_k_cPickle, sizeof(__pyx_k_cPickle), 0, 0, 1, 1}, {&__pyx_n_s_cStringIO, __pyx_k_cStringIO, sizeof(__pyx_k_cStringIO), 0, 0, 1, 1}, {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, {&__pyx_n_s_cancel_fn, __pyx_k_cancel_fn, sizeof(__pyx_k_cancel_fn), 0, 0, 1, 1}, {&__pyx_kp_s_cannot_create_too_many_user_defi, __pyx_k_cannot_create_too_many_user_defi, sizeof(__pyx_k_cannot_create_too_many_user_defi), 0, 0, 1, 0}, {&__pyx_n_s_cdatarep, __pyx_k_cdatarep, sizeof(__pyx_k_cdatarep), 0, 0, 1, 1}, {&__pyx_n_s_char, __pyx_k_char, sizeof(__pyx_k_char), 0, 0, 1, 1}, {&__pyx_n_s_cinfo, __pyx_k_cinfo, sizeof(__pyx_k_cinfo), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 0, 1, 1}, {&__pyx_n_s_comm, __pyx_k_comm, sizeof(__pyx_k_comm), 0, 0, 1, 1}, {&__pyx_n_s_comm1, __pyx_k_comm1, sizeof(__pyx_k_comm1), 0, 0, 1, 1}, {&__pyx_n_s_comm2, __pyx_k_comm2, sizeof(__pyx_k_comm2), 0, 0, 1, 1}, {&__pyx_n_s_command, __pyx_k_command, sizeof(__pyx_k_command), 0, 0, 1, 1}, {&__pyx_kp_s_commctx_inter, __pyx_k_commctx_inter, sizeof(__pyx_k_commctx_inter), 0, 0, 1, 0}, {&__pyx_kp_s_commctx_intra, __pyx_k_commctx_intra, sizeof(__pyx_k_commctx_intra), 0, 0, 1, 0}, {&__pyx_n_s_commute, __pyx_k_commute, sizeof(__pyx_k_commute), 0, 0, 1, 1}, {&__pyx_n_s_compare, __pyx_k_compare, sizeof(__pyx_k_compare), 0, 0, 1, 1}, {&__pyx_kp_s_compare_expecting_a_single_eleme, __pyx_k_compare_expecting_a_single_eleme, sizeof(__pyx_k_compare_expecting_a_single_eleme), 0, 0, 1, 0}, {&__pyx_n_s_coords, __pyx_k_coords, sizeof(__pyx_k_coords), 0, 0, 1, 1}, {&__pyx_n_s_copy_fn, __pyx_k_copy_fn, sizeof(__pyx_k_copy_fn), 0, 0, 1, 1}, {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1}, {&__pyx_n_s_cportname, __pyx_k_cportname, sizeof(__pyx_k_cportname), 0, 0, 1, 1}, {&__pyx_n_s_csrvcname, __pyx_k_csrvcname, sizeof(__pyx_k_csrvcname), 0, 0, 1, 1}, {&__pyx_n_s_cstring, __pyx_k_cstring, sizeof(__pyx_k_cstring), 0, 0, 1, 1}, {&__pyx_n_s_dargs, __pyx_k_dargs, sizeof(__pyx_k_dargs), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_datarep, __pyx_k_datarep, sizeof(__pyx_k_datarep), 0, 0, 1, 1}, {&__pyx_n_s_datatype, __pyx_k_datatype, sizeof(__pyx_k_datatype), 0, 0, 1, 1}, {&__pyx_n_s_datatypes, __pyx_k_datatypes, sizeof(__pyx_k_datatypes), 0, 0, 1, 1}, {&__pyx_n_s_default, __pyx_k_default, sizeof(__pyx_k_default), 0, 0, 1, 1}, {&__pyx_n_s_degrees, __pyx_k_degrees, sizeof(__pyx_k_degrees), 0, 0, 1, 1}, {&__pyx_n_s_delete_fn, __pyx_k_delete_fn, sizeof(__pyx_k_delete_fn), 0, 0, 1, 1}, {&__pyx_n_s_dest, __pyx_k_dest, sizeof(__pyx_k_dest), 0, 0, 1, 1}, {&__pyx_n_s_destinations, __pyx_k_destinations, sizeof(__pyx_k_destinations), 0, 0, 1, 1}, {&__pyx_n_s_destweights, __pyx_k_destweights, sizeof(__pyx_k_destweights), 0, 0, 1, 1}, {&__pyx_n_s_dims, __pyx_k_dims, sizeof(__pyx_k_dims), 0, 0, 1, 1}, {&__pyx_n_s_direction, __pyx_k_direction, sizeof(__pyx_k_direction), 0, 0, 1, 1}, {&__pyx_n_s_disp, __pyx_k_disp, sizeof(__pyx_k_disp), 0, 0, 1, 1}, {&__pyx_n_s_disp_unit, __pyx_k_disp_unit, sizeof(__pyx_k_disp_unit), 0, 0, 1, 1}, {&__pyx_n_s_displacements, __pyx_k_displacements, sizeof(__pyx_k_displacements), 0, 0, 1, 1}, {&__pyx_n_s_distribs, __pyx_k_distribs, sizeof(__pyx_k_distribs), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_doc_2, __pyx_k_doc_2, sizeof(__pyx_k_doc_2), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_dummy_thread, __pyx_k_dummy_thread, sizeof(__pyx_k_dummy_thread), 0, 0, 1, 1}, {&__pyx_n_s_dummy_thread_2, __pyx_k_dummy_thread_2, sizeof(__pyx_k_dummy_thread_2), 0, 0, 1, 1}, {&__pyx_n_s_dumps, __pyx_k_dumps, sizeof(__pyx_k_dumps), 0, 0, 1, 1}, {&__pyx_n_s_edges, __pyx_k_edges, sizeof(__pyx_k_edges), 0, 0, 1, 1}, {&__pyx_kp_s_empty_weights_but_nonzero_degree, __pyx_k_empty_weights_but_nonzero_degree, sizeof(__pyx_k_empty_weights_but_nonzero_degree), 0, 0, 1, 0}, {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, {&__pyx_n_s_eq, __pyx_k_eq, sizeof(__pyx_k_eq), 0, 0, 1, 1}, {&__pyx_n_s_errcodes, __pyx_k_errcodes, sizeof(__pyx_k_errcodes), 0, 0, 1, 1}, {&__pyx_n_s_errhandler, __pyx_k_errhandler, sizeof(__pyx_k_errhandler), 0, 0, 1, 1}, {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1}, {&__pyx_kp_s_error_class, __pyx_k_error_class, sizeof(__pyx_k_error_class), 0, 0, 1, 0}, {&__pyx_n_s_error_class_2, __pyx_k_error_class_2, sizeof(__pyx_k_error_class_2), 0, 0, 1, 1}, {&__pyx_kp_s_error_code, __pyx_k_error_code, sizeof(__pyx_k_error_code), 0, 0, 1, 0}, {&__pyx_n_s_error_code_2, __pyx_k_error_code_2, sizeof(__pyx_k_error_code_2), 0, 0, 1, 1}, {&__pyx_kp_s_error_code_d, __pyx_k_error_code_d, sizeof(__pyx_k_error_code_d), 0, 0, 1, 0}, {&__pyx_kp_s_error_string, __pyx_k_error_string, sizeof(__pyx_k_error_string), 0, 0, 1, 0}, {&__pyx_n_s_error_string_2, __pyx_k_error_string_2, sizeof(__pyx_k_error_string_2), 0, 0, 1, 1}, {&__pyx_n_s_errorclass, __pyx_k_errorclass, sizeof(__pyx_k_errorclass), 0, 0, 1, 1}, {&__pyx_n_s_errorcode, __pyx_k_errorcode, sizeof(__pyx_k_errorcode), 0, 0, 1, 1}, {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1}, {&__pyx_n_s_etype, __pyx_k_etype, sizeof(__pyx_k_etype), 0, 0, 1, 1}, {&__pyx_n_s_ex, __pyx_k_ex, sizeof(__pyx_k_ex), 0, 0, 1, 1}, {&__pyx_n_s_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 0, 1, 1}, {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_kp_s_expecting_a_Cartesian_communicat, __pyx_k_expecting_a_Cartesian_communicat, sizeof(__pyx_k_expecting_a_Cartesian_communicat), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_a_distributed_graph_co, __pyx_k_expecting_a_distributed_graph_co, sizeof(__pyx_k_expecting_a_distributed_graph_co), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_a_general_graph_commun, __pyx_k_expecting_a_general_graph_commun, sizeof(__pyx_k_expecting_a_general_graph_commun), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_a_sequence_of_strings, __pyx_k_expecting_a_sequence_of_strings, sizeof(__pyx_k_expecting_a_sequence_of_strings), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_a_topology_communicato, __pyx_k_expecting_a_topology_communicato, sizeof(__pyx_k_expecting_a_topology_communicato), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_an_MPI_instance, __pyx_k_expecting_an_MPI_instance, sizeof(__pyx_k_expecting_an_MPI_instance), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_an_MPI_type_or_instanc, __pyx_k_expecting_an_MPI_type_or_instanc, sizeof(__pyx_k_expecting_an_MPI_type_or_instanc), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_an_intercommunicator, __pyx_k_expecting_an_intercommunicator, sizeof(__pyx_k_expecting_an_intercommunicator), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_an_intracommunicator, __pyx_k_expecting_an_intracommunicator, sizeof(__pyx_k_expecting_an_intracommunicator), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_d_items_got_d, __pyx_k_expecting_d_items_got_d, sizeof(__pyx_k_expecting_d_items_got_d), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_non_NULL_address, __pyx_k_expecting_non_NULL_address, sizeof(__pyx_k_expecting_non_NULL_address), 0, 0, 1, 0}, {&__pyx_kp_s_expecting_non_negative_buffer_le, __pyx_k_expecting_non_negative_buffer_le, sizeof(__pyx_k_expecting_non_negative_buffer_le), 0, 0, 1, 0}, {&__pyx_n_s_extent, __pyx_k_extent, sizeof(__pyx_k_extent), 0, 0, 1, 1}, {&__pyx_n_s_extent_fn, __pyx_k_extent_fn, sizeof(__pyx_k_extent_fn), 0, 0, 1, 1}, {&__pyx_n_s_f2py, __pyx_k_f2py, sizeof(__pyx_k_f2py), 0, 0, 1, 1}, {&__pyx_n_s_fast_reduce, __pyx_k_fast_reduce, sizeof(__pyx_k_fast_reduce), 0, 0, 1, 1}, {&__pyx_n_s_fatal, __pyx_k_fatal, sizeof(__pyx_k_fatal), 0, 0, 1, 1}, {&__pyx_n_s_fd, __pyx_k_fd, sizeof(__pyx_k_fd), 0, 0, 1, 1}, {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1}, {&__pyx_n_s_filetype, __pyx_k_filetype, sizeof(__pyx_k_filetype), 0, 0, 1, 1}, {&__pyx_n_s_finalize, __pyx_k_finalize, sizeof(__pyx_k_finalize), 0, 0, 1, 1}, {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1}, {&__pyx_n_s_free_fn, __pyx_k_free_fn, sizeof(__pyx_k_free_fn), 0, 0, 1, 1}, {&__pyx_n_s_fromaddress, __pyx_k_fromaddress, sizeof(__pyx_k_fromaddress), 0, 0, 1, 1}, {&__pyx_n_s_frombuffer, __pyx_k_frombuffer, sizeof(__pyx_k_frombuffer), 0, 0, 1, 1}, {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1}, {&__pyx_n_s_funneled, __pyx_k_funneled, sizeof(__pyx_k_funneled), 0, 0, 1, 1}, {&__pyx_n_s_gather, __pyx_k_gather, sizeof(__pyx_k_gather), 0, 0, 1, 1}, {&__pyx_n_s_ge, __pyx_k_ge, sizeof(__pyx_k_ge), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_vendor, __pyx_k_get_vendor, sizeof(__pyx_k_get_vendor), 0, 0, 1, 1}, {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1}, {&__pyx_n_s_group1, __pyx_k_group1, sizeof(__pyx_k_group1), 0, 0, 1, 1}, {&__pyx_n_s_group2, __pyx_k_group2, sizeof(__pyx_k_group2), 0, 0, 1, 1}, {&__pyx_n_s_gsizes, __pyx_k_gsizes, sizeof(__pyx_k_gsizes), 0, 0, 1, 1}, {&__pyx_n_s_gt, __pyx_k_gt, sizeof(__pyx_k_gt), 0, 0, 1, 1}, {&__pyx_n_s_handleof, __pyx_k_handleof, sizeof(__pyx_k_handleof), 0, 0, 1, 1}, {&__pyx_n_s_hash, __pyx_k_hash, sizeof(__pyx_k_hash), 0, 0, 1, 1}, {&__pyx_n_s_high, __pyx_k_high, sizeof(__pyx_k_high), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_idims, __pyx_k_idims, sizeof(__pyx_k_idims), 0, 0, 1, 1}, {&__pyx_n_s_ierr, __pyx_k_ierr, sizeof(__pyx_k_ierr), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_inbuf, __pyx_k_inbuf, sizeof(__pyx_k_inbuf), 0, 0, 1, 1}, {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1}, {&__pyx_kp_s_index_must_be_integer_or_slice, __pyx_k_index_must_be_integer_or_slice, sizeof(__pyx_k_index_must_be_integer_or_slice), 0, 0, 1, 0}, {&__pyx_kp_s_index_out_of_range, __pyx_k_index_out_of_range, sizeof(__pyx_k_index_out_of_range), 0, 0, 1, 0}, {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_initialize, __pyx_k_initialize, sizeof(__pyx_k_initialize), 0, 0, 1, 1}, {&__pyx_n_s_inoutbuf, __pyx_k_inoutbuf, sizeof(__pyx_k_inoutbuf), 0, 0, 1, 1}, {&__pyx_n_s_inoutedges, __pyx_k_inoutedges, sizeof(__pyx_k_inoutedges), 0, 0, 1, 1}, {&__pyx_n_s_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 0, 0, 1, 1}, {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1}, {&__pyx_kp_s_integer_d_does_not_fit_in_int, __pyx_k_integer_d_does_not_fit_in_int, sizeof(__pyx_k_integer_d_does_not_fit_in_int), 0, 0, 1, 0}, {&__pyx_n_s_io, __pyx_k_io, sizeof(__pyx_k_io), 0, 0, 1, 1}, {&__pyx_n_s_iprobe, __pyx_k_iprobe, sizeof(__pyx_k_iprobe), 0, 0, 1, 1}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1}, {&__pyx_n_s_kargs, __pyx_k_kargs, sizeof(__pyx_k_kargs), 0, 0, 1, 1}, {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, {&__pyx_n_s_keyval, __pyx_k_keyval, sizeof(__pyx_k_keyval), 0, 0, 1, 1}, {&__pyx_n_s_keyval_registry, __pyx_k_keyval_registry, sizeof(__pyx_k_keyval_registry), 0, 0, 1, 1}, {&__pyx_n_s_lb, __pyx_k_lb, sizeof(__pyx_k_lb), 0, 0, 1, 1}, {&__pyx_n_s_le, __pyx_k_le, sizeof(__pyx_k_le), 0, 0, 1, 1}, {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1}, {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1}, {&__pyx_n_s_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1}, {&__pyx_n_s_local_leader, __pyx_k_local_leader, sizeof(__pyx_k_local_leader), 0, 0, 1, 1}, {&__pyx_n_s_location, __pyx_k_location, sizeof(__pyx_k_location), 0, 0, 1, 1}, {&__pyx_n_s_lock_table, __pyx_k_lock_table, sizeof(__pyx_k_lock_table), 0, 0, 1, 1}, {&__pyx_n_s_lock_type, __pyx_k_lock_type, sizeof(__pyx_k_lock_type), 0, 0, 1, 1}, {&__pyx_n_s_lt, __pyx_k_lt, sizeof(__pyx_k_lt), 0, 0, 1, 1}, {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1}, {&__pyx_n_s_maxlen, __pyx_k_maxlen, sizeof(__pyx_k_maxlen), 0, 0, 1, 1}, {&__pyx_n_s_maxprocs, __pyx_k_maxprocs, sizeof(__pyx_k_maxprocs), 0, 0, 1, 1}, {&__pyx_n_s_mem, __pyx_k_mem, sizeof(__pyx_k_mem), 0, 0, 1, 1}, {&__pyx_n_s_memory, __pyx_k_memory, sizeof(__pyx_k_memory), 0, 0, 1, 1}, {&__pyx_kp_s_memory_allocation_size_too_large, __pyx_k_memory_allocation_size_too_large, sizeof(__pyx_k_memory_allocation_size_too_large), 0, 0, 1, 0}, {&__pyx_kp_s_memory_allocation_with_negative, __pyx_k_memory_allocation_with_negative, sizeof(__pyx_k_memory_allocation_with_negative), 0, 0, 1, 0}, {&__pyx_kp_s_memory_buffer_is_read_only, __pyx_k_memory_buffer_is_read_only, sizeof(__pyx_k_memory_buffer_is_read_only), 0, 0, 1, 0}, {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1}, {&__pyx_kp_s_message_buffer_is_None_but_count, __pyx_k_message_buffer_is_None_but_count, sizeof(__pyx_k_message_buffer_is_None_but_count), 0, 0, 1, 0}, {&__pyx_kp_s_message_cannot_handle_diplacemen, __pyx_k_message_cannot_handle_diplacemen, sizeof(__pyx_k_message_cannot_handle_diplacemen), 0, 0, 1, 0}, {&__pyx_kp_s_message_cannot_handle_diplacemen_2, __pyx_k_message_cannot_handle_diplacemen_2, sizeof(__pyx_k_message_cannot_handle_diplacemen_2), 0, 0, 1, 0}, {&__pyx_kp_s_message_cannot_infer_count_buffe, __pyx_k_message_cannot_infer_count_buffe, sizeof(__pyx_k_message_cannot_infer_count_buffe), 0, 0, 1, 0}, {&__pyx_kp_s_message_cannot_infer_count_datat, __pyx_k_message_cannot_infer_count_datat, sizeof(__pyx_k_message_cannot_infer_count_datat), 0, 0, 1, 0}, {&__pyx_kp_s_message_cannot_infer_count_datat_2, __pyx_k_message_cannot_infer_count_datat_2, sizeof(__pyx_k_message_cannot_infer_count_datat_2), 0, 0, 1, 0}, {&__pyx_kp_s_message_cannot_infer_count_numbe, __pyx_k_message_cannot_infer_count_numbe, sizeof(__pyx_k_message_cannot_infer_count_numbe), 0, 0, 1, 0}, {&__pyx_kp_s_message_displacement_d_out_of_bo, __pyx_k_message_displacement_d_out_of_bo, sizeof(__pyx_k_message_displacement_d_out_of_bo), 0, 0, 1, 0}, {&__pyx_kp_s_message_expecting_2_to_4_items, __pyx_k_message_expecting_2_to_4_items, sizeof(__pyx_k_message_expecting_2_to_4_items), 0, 0, 1, 0}, {&__pyx_kp_s_message_expecting_buffer_or_list, __pyx_k_message_expecting_buffer_or_list, sizeof(__pyx_k_message_expecting_buffer_or_list), 0, 0, 1, 0}, {&__pyx_kp_s_message_negative_count_d, __pyx_k_message_negative_count_d, sizeof(__pyx_k_message_negative_count_d), 0, 0, 1, 0}, {&__pyx_kp_s_message_negative_diplacement_d, __pyx_k_message_negative_diplacement_d, sizeof(__pyx_k_message_negative_diplacement_d), 0, 0, 1, 0}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_micro, __pyx_k_micro, sizeof(__pyx_k_micro), 0, 0, 1, 1}, {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1}, {&__pyx_kp_s_mismatch_in_inbuf_and_inoutbuf_M, __pyx_k_mismatch_in_inbuf_and_inoutbuf_M, sizeof(__pyx_k_mismatch_in_inbuf_and_inoutbuf_M), 0, 0, 1, 0}, {&__pyx_kp_s_mismatch_in_inbuf_count_d_and_in, __pyx_k_mismatch_in_inbuf_count_d_and_in, sizeof(__pyx_k_mismatch_in_inbuf_count_d_and_in), 0, 0, 1, 0}, {&__pyx_kp_s_mismatch_in_origin_and_compare_M, __pyx_k_mismatch_in_origin_and_compare_M, sizeof(__pyx_k_mismatch_in_origin_and_compare_M), 0, 0, 1, 0}, {&__pyx_kp_s_mismatch_in_origin_and_result_MP, __pyx_k_mismatch_in_origin_and_result_MP, sizeof(__pyx_k_mismatch_in_origin_and_result_MP), 0, 0, 1, 0}, {&__pyx_kp_s_mismatch_in_receive_count_d_and, __pyx_k_mismatch_in_receive_count_d_and, sizeof(__pyx_k_mismatch_in_receive_count_d_and), 0, 0, 1, 0}, {&__pyx_kp_s_mismatch_in_receive_count_d_and_2, __pyx_k_mismatch_in_receive_count_d_and_2, sizeof(__pyx_k_mismatch_in_receive_count_d_and_2), 0, 0, 1, 0}, {&__pyx_kp_s_mismatch_in_send_and_receive_MPI, __pyx_k_mismatch_in_send_and_receive_MPI, sizeof(__pyx_k_mismatch_in_send_and_receive_MPI), 0, 0, 1, 0}, {&__pyx_kp_s_mismatch_in_send_count_d_and_rec, __pyx_k_mismatch_in_send_count_d_and_rec, sizeof(__pyx_k_mismatch_in_send_count_d_and_rec), 0, 0, 1, 0}, {&__pyx_kp_s_mismatch_in_send_count_d_and_sum, __pyx_k_mismatch_in_send_count_d_and_sum, sizeof(__pyx_k_mismatch_in_send_count_d_and_sum), 0, 0, 1, 0}, {&__pyx_kp_s_mismatch_in_send_count_d_receive, __pyx_k_mismatch_in_send_count_d_receive, sizeof(__pyx_k_mismatch_in_send_count_d_receive), 0, 0, 1, 0}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_mpi4py, __pyx_k_mpi4py, sizeof(__pyx_k_mpi4py), 0, 0, 1, 1}, {&__pyx_n_s_mpi4py_MPI, __pyx_k_mpi4py_MPI, sizeof(__pyx_k_mpi4py_MPI), 0, 0, 1, 1}, {&__pyx_kp_s_mpi4py_MPI_Comm_pyx, __pyx_k_mpi4py_MPI_Comm_pyx, sizeof(__pyx_k_mpi4py_MPI_Comm_pyx), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_MPI_Datatype_pyx, __pyx_k_mpi4py_MPI_Datatype_pyx, sizeof(__pyx_k_mpi4py_MPI_Datatype_pyx), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_k_mpi4py_MPI_ExceptionP_pyx, sizeof(__pyx_k_mpi4py_MPI_ExceptionP_pyx), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_MPI_Exception_pyx, __pyx_k_mpi4py_MPI_Exception_pyx, sizeof(__pyx_k_mpi4py_MPI_Exception_pyx), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_MPI_File_pyx, __pyx_k_mpi4py_MPI_File_pyx, sizeof(__pyx_k_mpi4py_MPI_File_pyx), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_k_mpi4py_MPI_MPI_pyx, sizeof(__pyx_k_mpi4py_MPI_MPI_pyx), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_MPI_asbuffer_pxi, __pyx_k_mpi4py_MPI_asbuffer_pxi, sizeof(__pyx_k_mpi4py_MPI_asbuffer_pxi), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_MPI_atimport_pxi, __pyx_k_mpi4py_MPI_atimport_pxi, sizeof(__pyx_k_mpi4py_MPI_atimport_pxi), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_MPI_commimpl_pxi, __pyx_k_mpi4py_MPI_commimpl_pxi, sizeof(__pyx_k_mpi4py_MPI_commimpl_pxi), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_MPI_typestr_pxi, __pyx_k_mpi4py_MPI_typestr_pxi, sizeof(__pyx_k_mpi4py_MPI_typestr_pxi), 0, 0, 1, 0}, {&__pyx_kp_s_mpi4py_rc_s_unexpected_value_r, __pyx_k_mpi4py_rc_s_unexpected_value_r, sizeof(__pyx_k_mpi4py_rc_s_unexpected_value_r), 0, 0, 1, 0}, {&__pyx_n_s_multiple, __pyx_k_multiple, sizeof(__pyx_k_multiple), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_s_nbytes, __pyx_k_nbytes, sizeof(__pyx_k_nbytes), 0, 0, 1, 1}, {&__pyx_n_s_ndarray, __pyx_k_ndarray, sizeof(__pyx_k_ndarray), 0, 0, 1, 1}, {&__pyx_n_s_ndims, __pyx_k_ndims, sizeof(__pyx_k_ndims), 0, 0, 1, 1}, {&__pyx_n_s_ne, __pyx_k_ne, sizeof(__pyx_k_ne), 0, 0, 1, 1}, {&__pyx_n_s_neighbor_allgather, __pyx_k_neighbor_allgather, sizeof(__pyx_k_neighbor_allgather), 0, 0, 1, 1}, {&__pyx_n_s_neighbor_alltoall, __pyx_k_neighbor_alltoall, sizeof(__pyx_k_neighbor_alltoall), 0, 0, 1, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, {&__pyx_n_s_nlen, __pyx_k_nlen, sizeof(__pyx_k_nlen), 0, 0, 1, 1}, {&__pyx_n_s_nnodes, __pyx_k_nnodes, sizeof(__pyx_k_nnodes), 0, 0, 1, 1}, {&__pyx_n_s_no, __pyx_k_no, sizeof(__pyx_k_no), 0, 0, 1, 1}, {&__pyx_n_s_nonzero, __pyx_k_nonzero, sizeof(__pyx_k_nonzero), 0, 0, 1, 1}, {&__pyx_n_s_nopython, __pyx_k_nopython, sizeof(__pyx_k_nopython), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_n_s_numpypy, __pyx_k_numpypy, sizeof(__pyx_k_numpypy), 0, 0, 1, 1}, {&__pyx_n_s_numpypy_multiarray, __pyx_k_numpypy_multiarray, sizeof(__pyx_k_numpypy_multiarray), 0, 0, 1, 1}, {&__pyx_n_s_ob_mpi, __pyx_k_ob_mpi, sizeof(__pyx_k_ob_mpi), 0, 0, 1, 1}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1}, {&__pyx_n_s_op, __pyx_k_op, sizeof(__pyx_k_op), 0, 0, 1, 1}, {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1}, {&__pyx_n_s_origin, __pyx_k_origin, sizeof(__pyx_k_origin), 0, 0, 1, 1}, {&__pyx_kp_s_origin_expecting_a_single_elemen, __pyx_k_origin_expecting_a_single_elemen, sizeof(__pyx_k_origin_expecting_a_single_elemen), 0, 0, 1, 0}, {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1}, {&__pyx_n_s_outbuf, __pyx_k_outbuf, sizeof(__pyx_k_outbuf), 0, 0, 1, 1}, {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1}, {&__pyx_n_s_peer_comm, __pyx_k_peer_comm, sizeof(__pyx_k_peer_comm), 0, 0, 1, 1}, {&__pyx_n_s_periods, __pyx_k_periods, sizeof(__pyx_k_periods), 0, 0, 1, 1}, {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1}, {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1}, {&__pyx_n_s_port_name, __pyx_k_port_name, sizeof(__pyx_k_port_name), 0, 0, 1, 1}, {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_print_exc, __pyx_k_print_exc, sizeof(__pyx_k_print_exc), 0, 0, 1, 1}, {&__pyx_n_s_probe, __pyx_k_probe, sizeof(__pyx_k_probe), 0, 0, 1, 1}, {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1}, {&__pyx_n_s_protocol, __pyx_k_protocol, sizeof(__pyx_k_protocol), 0, 0, 1, 1}, {&__pyx_n_s_provided, __pyx_k_provided, sizeof(__pyx_k_provided), 0, 0, 1, 1}, {&__pyx_n_s_psizes, __pyx_k_psizes, sizeof(__pyx_k_psizes), 0, 0, 1, 1}, {&__pyx_n_s_ptr, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_query_fn, __pyx_k_query_fn, sizeof(__pyx_k_query_fn), 0, 0, 1, 1}, {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_rank, __pyx_k_rank, sizeof(__pyx_k_rank), 0, 0, 1, 1}, {&__pyx_n_s_ranks, __pyx_k_ranks, sizeof(__pyx_k_ranks), 0, 0, 1, 1}, {&__pyx_n_s_ranks1, __pyx_k_ranks1, sizeof(__pyx_k_ranks1), 0, 0, 1, 1}, {&__pyx_n_s_rc, __pyx_k_rc, sizeof(__pyx_k_rc), 0, 0, 1, 1}, {&__pyx_n_s_rd, __pyx_k_rd, sizeof(__pyx_k_rd), 0, 0, 1, 1}, {&__pyx_n_s_read_fn, __pyx_k_read_fn, sizeof(__pyx_k_read_fn), 0, 0, 1, 1}, {&__pyx_n_s_readonly, __pyx_k_readonly, sizeof(__pyx_k_readonly), 0, 0, 1, 1}, {&__pyx_n_s_recv, __pyx_k_recv, sizeof(__pyx_k_recv), 0, 0, 1, 1}, {&__pyx_n_s_recv_mprobe, __pyx_k_recv_mprobe, sizeof(__pyx_k_recv_mprobe), 0, 0, 1, 1}, {&__pyx_n_s_recvbuf, __pyx_k_recvbuf, sizeof(__pyx_k_recvbuf), 0, 0, 1, 1}, {&__pyx_n_s_recvcounts, __pyx_k_recvcounts, sizeof(__pyx_k_recvcounts), 0, 0, 1, 1}, {&__pyx_n_s_recvtag, __pyx_k_recvtag, sizeof(__pyx_k_recvtag), 0, 0, 1, 1}, {&__pyx_n_s_release, __pyx_k_release, sizeof(__pyx_k_release), 0, 0, 1, 1}, {&__pyx_n_s_remain_dims, __pyx_k_remain_dims, sizeof(__pyx_k_remain_dims), 0, 0, 1, 1}, {&__pyx_n_s_remote_leader, __pyx_k_remote_leader, sizeof(__pyx_k_remote_leader), 0, 0, 1, 1}, {&__pyx_n_s_reorder, __pyx_k_reorder, sizeof(__pyx_k_reorder), 0, 0, 1, 1}, {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, {&__pyx_n_s_request, __pyx_k_request, sizeof(__pyx_k_request), 0, 0, 1, 1}, {&__pyx_n_s_requests, __pyx_k_requests, sizeof(__pyx_k_requests), 0, 0, 1, 1}, {&__pyx_n_s_required, __pyx_k_required, sizeof(__pyx_k_required), 0, 0, 1, 1}, {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1}, {&__pyx_kp_s_result_expecting_a_single_elemen, __pyx_k_result_expecting_a_single_elemen, sizeof(__pyx_k_result_expecting_a_single_elemen), 0, 0, 1, 0}, {&__pyx_n_s_resultlen, __pyx_k_resultlen, sizeof(__pyx_k_resultlen), 0, 0, 1, 1}, {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1}, {&__pyx_n_s_scatter, __pyx_k_scatter, sizeof(__pyx_k_scatter), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_sendbuf, __pyx_k_sendbuf, sizeof(__pyx_k_sendbuf), 0, 0, 1, 1}, {&__pyx_n_s_sendobj, __pyx_k_sendobj, sizeof(__pyx_k_sendobj), 0, 0, 1, 1}, {&__pyx_n_s_sendtag, __pyx_k_sendtag, sizeof(__pyx_k_sendtag), 0, 0, 1, 1}, {&__pyx_n_s_serialized, __pyx_k_serialized, sizeof(__pyx_k_serialized), 0, 0, 1, 1}, {&__pyx_n_s_service_name, __pyx_k_service_name, sizeof(__pyx_k_service_name), 0, 0, 1, 1}, {&__pyx_n_s_set_abort_status, __pyx_k_set_abort_status, sizeof(__pyx_k_set_abort_status), 0, 0, 1, 1}, {&__pyx_n_s_single, __pyx_k_single, sizeof(__pyx_k_single), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_sizeof, __pyx_k_sizeof, sizeof(__pyx_k_sizeof), 0, 0, 1, 1}, {&__pyx_n_s_sizes, __pyx_k_sizes, sizeof(__pyx_k_sizes), 0, 0, 1, 1}, {&__pyx_kp_s_slice_length_does_not_match_buff, __pyx_k_slice_length_does_not_match_buff, sizeof(__pyx_k_slice_length_does_not_match_buff), 0, 0, 1, 0}, {&__pyx_kp_s_slice_with_step_not_supported, __pyx_k_slice_with_step_not_supported, sizeof(__pyx_k_slice_with_step_not_supported), 0, 0, 1, 0}, {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, {&__pyx_n_s_sources, __pyx_k_sources, sizeof(__pyx_k_sources), 0, 0, 1, 1}, {&__pyx_n_s_sourceweights, __pyx_k_sourceweights, sizeof(__pyx_k_sourceweights), 0, 0, 1, 1}, {&__pyx_n_s_split_type, __pyx_k_split_type, sizeof(__pyx_k_split_type), 0, 0, 1, 1}, {&__pyx_n_s_starts, __pyx_k_starts, sizeof(__pyx_k_starts), 0, 0, 1, 1}, {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1}, {&__pyx_n_s_status, __pyx_k_status, sizeof(__pyx_k_status), 0, 0, 1, 1}, {&__pyx_n_s_statuses, __pyx_k_statuses, sizeof(__pyx_k_statuses), 0, 0, 1, 1}, {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1}, {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, {&__pyx_n_s_stride, __pyx_k_stride, sizeof(__pyx_k_stride), 0, 0, 1, 1}, {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 0, 0, 1, 1}, {&__pyx_n_s_subsizes, __pyx_k_subsizes, sizeof(__pyx_k_subsizes), 0, 0, 1, 1}, {&__pyx_n_s_subversion, __pyx_k_subversion, sizeof(__pyx_k_subversion), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_tag, __pyx_k_tag, sizeof(__pyx_k_tag), 0, 0, 1, 1}, {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1}, {&__pyx_n_s_target_disp, __pyx_k_target_disp, sizeof(__pyx_k_target_disp), 0, 0, 1, 1}, {&__pyx_kp_s_target_expecting_3_items_at_most, __pyx_k_target_expecting_3_items_at_most, sizeof(__pyx_k_target_expecting_3_items_at_most), 0, 0, 1, 0}, {&__pyx_kp_s_target_expecting_integral_or_lis, __pyx_k_target_expecting_integral_or_lis, sizeof(__pyx_k_target_expecting_integral_or_lis), 0, 0, 1, 0}, {&__pyx_n_s_target_rank, __pyx_k_target_rank, sizeof(__pyx_k_target_rank), 0, 0, 1, 1}, {&__pyx_n_s_tc, __pyx_k_tc, sizeof(__pyx_k_tc), 0, 0, 1, 1}, {&__pyx_n_s_testall, __pyx_k_testall, sizeof(__pyx_k_testall), 0, 0, 1, 1}, {&__pyx_n_s_testany, __pyx_k_testany, sizeof(__pyx_k_testany), 0, 0, 1, 1}, {&__pyx_n_s_thread, __pyx_k_thread, sizeof(__pyx_k_thread), 0, 0, 1, 1}, {&__pyx_n_s_thread_2, __pyx_k_thread_2, sizeof(__pyx_k_thread_2), 0, 0, 1, 1}, {&__pyx_n_s_thread_level, __pyx_k_thread_level, sizeof(__pyx_k_thread_level), 0, 0, 1, 1}, {&__pyx_n_s_threaded, __pyx_k_threaded, sizeof(__pyx_k_threaded), 0, 0, 1, 1}, {&__pyx_n_s_threads, __pyx_k_threads, sizeof(__pyx_k_threads), 0, 0, 1, 1}, {&__pyx_n_s_tmp, __pyx_k_tmp, sizeof(__pyx_k_tmp), 0, 0, 1, 1}, {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, {&__pyx_n_s_typeclass, __pyx_k_typeclass, sizeof(__pyx_k_typeclass), 0, 0, 1, 1}, {&__pyx_n_s_typecode, __pyx_k_typecode, sizeof(__pyx_k_typecode), 0, 0, 1, 1}, {&__pyx_n_s_typecode_2, __pyx_k_typecode_2, sizeof(__pyx_k_typecode_2), 0, 0, 1, 1}, {&__pyx_n_s_typedict, __pyx_k_typedict, sizeof(__pyx_k_typedict), 0, 0, 1, 1}, {&__pyx_n_s_typedict_c, __pyx_k_typedict_c, sizeof(__pyx_k_typedict_c), 0, 0, 1, 1}, {&__pyx_n_s_typedict_f, __pyx_k_typedict_f, sizeof(__pyx_k_typedict_f), 0, 0, 1, 1}, {&__pyx_kp_s_unorderable_type_s_s, __pyx_k_unorderable_type_s_s, sizeof(__pyx_k_unorderable_type_s_s), 0, 0, 1, 0}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1}, {&__pyx_n_s_waitall, __pyx_k_waitall, sizeof(__pyx_k_waitall), 0, 0, 1, 1}, {&__pyx_n_s_waitany, __pyx_k_waitany, sizeof(__pyx_k_waitany), 0, 0, 1, 1}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, {&__pyx_n_s_warnings, __pyx_k_warnings, sizeof(__pyx_k_warnings), 0, 0, 1, 1}, {&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1}, {&__pyx_n_s_whence, __pyx_k_whence, sizeof(__pyx_k_whence), 0, 0, 1, 1}, {&__pyx_n_s_win, __pyx_k_win, sizeof(__pyx_k_win), 0, 0, 1, 1}, {&__pyx_n_s_wr, __pyx_k_wr, sizeof(__pyx_k_wr), 0, 0, 1, 1}, {&__pyx_n_s_write_fn, __pyx_k_write_fn, sizeof(__pyx_k_write_fn), 0, 0, 1, 1}, {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, {&__pyx_n_s_xs, __pyx_k_xs, sizeof(__pyx_k_xs), 0, 0, 1, 1}, {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {&__pyx_n_s_yes, __pyx_k_yes, sizeof(__pyx_k_yes), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 70, __pyx_L1_error) __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 158, __pyx_L1_error) __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 1, __pyx_L1_error) __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(1, 64, __pyx_L1_error) __pyx_builtin_SystemError = __Pyx_GetBuiltinName(__pyx_n_s_SystemError); if (!__pyx_builtin_SystemError) __PYX_ERR(0, 90, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 92, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 174, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 250, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 320, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(2, 22, __pyx_L1_error) __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(3, 95, __pyx_L1_error) __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(4, 75, __pyx_L1_error) __pyx_builtin_OverflowError = __Pyx_GetBuiltinName(__pyx_n_s_OverflowError); if (!__pyx_builtin_OverflowError) __PYX_ERR(5, 44, __pyx_L1_error) __pyx_builtin_UserWarning = __Pyx_GetBuiltinName(__pyx_n_s_UserWarning); if (!__pyx_builtin_UserWarning) __PYX_ERR(6, 226, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(7, 1673, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(8, 347, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "mpi4py/MPI/asbuffer.pxi":174 * cdef Py_ssize_t size = nbytes * if size < 0: * raise ValueError("expecting non-negative buffer length") # <<<<<<<<<<<<<< * elif size > 0 and buf == NULL: * raise ValueError("expecting non-NULL address") */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_expecting_non_negative_buffer_le); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "mpi4py/MPI/asbuffer.pxi":176 * raise ValueError("expecting non-negative buffer length") * elif size > 0 and buf == NULL: * raise ValueError("expecting non-NULL address") # <<<<<<<<<<<<<< * cdef memory mem = memory.__new__(memory) * PyBuffer_FillInfo(&mem.view, NULL, */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_expecting_non_NULL_address); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "mpi4py/MPI/asbuffer.pxi":228 * def __getreadbuffer__(self, Py_ssize_t idx, void **p): * if idx != 0: * raise SystemError("accessing non-existent buffer segment") # <<<<<<<<<<<<<< * p[0] = self.view.buf * return self.view.len */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_accessing_non_existent_buffer_se); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "mpi4py/MPI/asbuffer.pxi":234 * def __getwritebuffer__(self, Py_ssize_t idx, void **p): * if self.view.readonly: * raise TypeError("memory buffer is read-only") # <<<<<<<<<<<<<< * if idx != 0: * raise SystemError("accessing non-existent buffer segment") */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_memory_buffer_is_read_only); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "mpi4py/MPI/asbuffer.pxi":253 * if start < 0: start += blen * if start < 0 or start >= blen: * raise IndexError("index out of range") # <<<<<<<<<<<<<< * return buf[start] * elif PySlice_Check(item): */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_index_out_of_range); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "mpi4py/MPI/asbuffer.pxi":257 * elif PySlice_Check(item): * PySlice_GetIndicesEx(item, blen, &start, &stop, &step, &slen) * if step != 1: raise IndexError("slice with step not supported") # <<<<<<<<<<<<<< * return asbuffer(self, buf+start, slen, self.view.readonly) * else: */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_slice_with_step_not_supported); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "mpi4py/MPI/asbuffer.pxi":260 * return asbuffer(self, buf+start, slen, self.view.readonly) * else: * raise TypeError("index must be integer or slice") # <<<<<<<<<<<<<< * * def __setitem__(self, object item, object value): */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_index_must_be_integer_or_slice); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "mpi4py/MPI/asbuffer.pxi":283 * inmem = getbuffer(value, 1, 0) * if inmem.view.len != slen: * raise ValueError("slice length does not match buffer") # <<<<<<<<<<<<<< * memmove(buf+start, inmem.view.buf, slen) * else: */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_slice_length_does_not_match_buff); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "mpi4py/MPI/asmemory.pxi":22 * cdef inline _p_mem allocate(Py_ssize_t m, size_t b, void *buf): * if m > PY_SSIZE_T_MAX/b: * raise MemoryError("memory allocation size too large") # <<<<<<<<<<<<<< * if m < 0: * raise RuntimeError("memory allocation with negative size") */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_memory_allocation_size_too_large); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "mpi4py/MPI/asmemory.pxi":24 * raise MemoryError("memory allocation size too large") * if m < 0: * raise RuntimeError("memory allocation with negative size") # <<<<<<<<<<<<<< * cdef size_t n = m * b * cdef _p_mem ob = <_p_mem>_p_mem.__new__(_p_mem) */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_memory_allocation_with_negative); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "mpi4py/MPI/asarray.pxi":101 * cdef inline object asarray_cmds(object sequence, int *count, char ***p): * if is_string(sequence): * raise ValueError("expecting a sequence of strings") # <<<<<<<<<<<<<< * sequence = list(sequence) * count[0] = len(sequence) */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_expecting_a_sequence_of_strings); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(11, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "mpi4py/MPI/opimpl.pxi":261 * index = op_user_registry.index(None, 1) * except ValueError: * raise RuntimeError("cannot create too many " # <<<<<<<<<<<<<< * "user-defined reduction operations") * # the line below will fail */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_cannot_create_too_many_user_defi); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(14, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "mpi4py/MPI/commimpl.pxi":42 * return None * if weights is __WEIGHTS_EMPTY__: * if nweight > 0: raise ValueError("empty weights but nonzero degree") # <<<<<<<<<<<<<< * iweight[0] = MPI_WEIGHTS_EMPTY * return None */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_empty_weights_but_nonzero_degree); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(3, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "mpi4py/MPI/msgbuffer.pxi":145 * (o_buf, o_count, o_displ, o_type) = msg * else: * raise ValueError("message: expecting 2 to 4 items") # <<<<<<<<<<<<<< * elif PYPY: * o_buf = msg */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_message_expecting_2_to_4_items); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(5, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "mpi4py/MPI/msgbuffer.pxi":149 * o_buf = msg * else: * raise TypeError("message: expecting buffer or list/tuple") # <<<<<<<<<<<<<< * # buffer: address, length, and datatype * cdef void *baddr = NULL */ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_message_expecting_buffer_or_list); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(5, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); /* "mpi4py/MPI/msgbuffer.pxi":167 * "message: negative diplacement %d" % displ) * if displ > 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( # <<<<<<<<<<<<<< * "message: cannot handle diplacement, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_message_cannot_handle_diplacemen); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(5, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); /* "mpi4py/MPI/msgbuffer.pxi":188 * elif length > 0: * if extent == 0: * if btype == MPI_DATATYPE_NULL: raise ValueError( # <<<<<<<<<<<<<< * "message: cannot infer count, datatype is null") * CHKERR( MPI_Type_get_extent(btype, &lb, &extent) ) */ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_message_cannot_infer_count_datat); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(5, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); /* "mpi4py/MPI/msgbuffer.pxi":699 * if self.sbuf != MPI_IN_PLACE: * if self.stype != self.rtype: * raise ValueError( # <<<<<<<<<<<<<< * "mismatch in send and receive MPI datatypes") * if self.scount != self.rcount: */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_mismatch_in_send_and_receive_MPI); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(5, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "mpi4py/MPI/msgbuffer.pxi":973 * self.ttype = (target[2]).ob_mpi * if nargs >= 4: * raise ValueError("target: expecting 3 items at most") # <<<<<<<<<<<<<< * else: * raise ValueError("target: expecting integral or list/tuple") */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_target_expecting_3_items_at_most); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(5, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "mpi4py/MPI/msgbuffer.pxi":975 * raise ValueError("target: expecting 3 items at most") * else: * raise ValueError("target: expecting integral or list/tuple") # <<<<<<<<<<<<<< * self._target = target * return 0 */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_target_expecting_integral_or_lis); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(5, 975, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "mpi4py/MPI/msgbuffer.pxi":1026 * if self.rcount != 1: raise ValueError( * "result: expecting a single element, got %d" % self.rcount) * if self.otype != self.rtype: raise ValueError( # <<<<<<<<<<<<<< * "mismatch in origin and result MPI datatypes") * return 0 */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_mismatch_in_origin_and_result_MP); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(5, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "mpi4py/MPI/msgbuffer.pxi":1044 * if self.rcount != 1: raise ValueError( * "result: expecting a single element, got %d" % self.rcount) * if self.otype != self.ctype: raise ValueError( # <<<<<<<<<<<<<< * "mismatch in origin and compare MPI datatypes") * if self.otype != self.rtype: raise ValueError( */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_mismatch_in_origin_and_compare_M); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(5, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "mpi4py/MPI/msgpickle.pxi":283 * obj # unused * # * with PyMPI_Lock(comm, "recv"): # <<<<<<<<<<<<<< * with nogil: * CHKERR( MPI_Probe(source, tag, comm, &rsts) ) */ __pyx_tuple__24 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(6, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "mpi4py/MPI/msgpickle.pxi":922 * seq = _py_scan(seq, op) * seq.pop(-1) * seq.insert(0, None) # <<<<<<<<<<<<<< * return seq * */ __pyx_tuple__25 = PyTuple_Pack(2, __pyx_int_0, Py_None); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(6, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "mpi4py/MPI/Op.pyx":97 * "mismatch in inbuf count %d and inoutbuf count %d" % * (m.scount, m.rcount)) * if (m.stype != m.rtype): raise ValueError( # <<<<<<<<<<<<<< * "mismatch in inbuf and inoutbuf MPI datatypes") * # do local reduction */ __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_mismatch_in_inbuf_and_inoutbuf_M); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(28, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); /* "mpi4py/MPI/Comm.pyx":1302 * cdef int inter = 1 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) * if inter: raise TypeError( # <<<<<<<<<<<<<< * "expecting an intracommunicator") * */ __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_expecting_an_intracommunicator); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(7, 1302, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); /* "mpi4py/MPI/Comm.pyx":1540 * cdef int i=0 * if errcodes is not None: * errcodes[:] = [ierrcodes[i] for i from 0 <= i < maxprocs] # <<<<<<<<<<<<<< * # * comm_set_eh(comm.ob_mpi) */ __pyx_slice__91 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__91)) __PYX_ERR(7, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__91); __Pyx_GIVEREF(__pyx_slice__91); /* "mpi4py/MPI/Comm.pyx":1636 * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo == MPI_UNDEFINED: raise TypeError( # <<<<<<<<<<<<<< * "expecting a topology communicator") * */ __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_expecting_a_topology_communicato); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(7, 1636, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); /* "mpi4py/MPI/Comm.pyx":1652 * return (nneighbors, nneighbors) * if isinstance(self, Distgraphcomm): * nneighbors = self.Get_dist_neighbors_count()[:2] # <<<<<<<<<<<<<< * return nneighbors * raise TypeError("Not a topology communicator") */ __pyx_slice__96 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__96)) __PYX_ERR(7, 1652, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__96); __Pyx_GIVEREF(__pyx_slice__96); /* "mpi4py/MPI/Comm.pyx":1654 * nneighbors = self.Get_dist_neighbors_count()[:2] * return nneighbors * raise TypeError("Not a topology communicator") # <<<<<<<<<<<<<< * * property indegree: */ __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_Not_a_topology_communicator); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(7, 1654, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__97); __Pyx_GIVEREF(__pyx_tuple__97); /* "mpi4py/MPI/Comm.pyx":1851 * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo != MPI_CART: raise TypeError( # <<<<<<<<<<<<<< * "expecting a Cartesian communicator") * */ __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_s_expecting_a_Cartesian_communicat); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(7, 1851, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__98); __Pyx_GIVEREF(__pyx_tuple__98); /* "mpi4py/MPI/Comm.pyx":1998 * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo != MPI_GRAPH: raise TypeError( # <<<<<<<<<<<<<< * "expecting a general graph communicator") * */ __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_s_expecting_a_general_graph_commun); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(7, 1998, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__99); __Pyx_GIVEREF(__pyx_tuple__99); /* "mpi4py/MPI/Comm.pyx":2105 * cdef int topo = MPI_UNDEFINED * CHKERR( MPI_Topo_test(self.ob_mpi, &topo) ) * if topo != MPI_DIST_GRAPH: raise TypeError( # <<<<<<<<<<<<<< * "expecting a distributed graph communicator") * */ __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_expecting_a_distributed_graph_co); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(7, 2105, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); /* "mpi4py/MPI/Comm.pyx":2167 * cdef int inter = 0 * CHKERR( MPI_Comm_test_inter(self.ob_mpi, &inter) ) * if not inter: raise TypeError( # <<<<<<<<<<<<<< * "expecting an intercommunicator") * */ __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_expecting_an_intercommunicator); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(7, 2167, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__101); __Pyx_GIVEREF(__pyx_tuple__101); /* "mpi4py/MPI/MPI.pyx":309 * if _mpi_type(arg, Win): return sizeof(MPI_Win) * if _mpi_type(arg, File): return sizeof(MPI_File) * raise TypeError("expecting an MPI type or instance") # <<<<<<<<<<<<<< * * def _addressof(arg): */ __pyx_tuple__128 = PyTuple_Pack(1, __pyx_kp_s_expecting_an_MPI_type_or_instanc); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(8, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__128); __Pyx_GIVEREF(__pyx_tuple__128); /* "mpi4py/MPI/MPI.pyx":339 * ptr = &(arg).ob_mpi * else: * raise TypeError("expecting an MPI instance") # <<<<<<<<<<<<<< * return PyLong_FromVoidPtr(ptr) * */ __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_s_expecting_an_MPI_instance); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(8, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__129); __Pyx_GIVEREF(__pyx_tuple__129); /* "mpi4py/MPI/atimport.pxi":213 * MPI_Finalize() * * def _set_abort_status(object status): # <<<<<<<<<<<<<< * "Helper for ``python -m mpi4py.run ...``" * global abort_status */ __pyx_tuple__130 = PyTuple_Pack(1, __pyx_n_s_status); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(9, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__130); __Pyx_GIVEREF(__pyx_tuple__130); __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_atimport_pxi, __pyx_n_s_set_abort_status, 213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(9, 213, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":159 * * @staticmethod * def frombuffer(obj, bint readonly=False): # <<<<<<<<<<<<<< * """Memory from buffer-like object""" * cdef int flags = PyBUF_SIMPLE */ __pyx_tuple__132 = PyTuple_Pack(4, __pyx_n_s_obj, __pyx_n_s_readonly, __pyx_n_s_flags, __pyx_n_s_mem); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__132); __Pyx_GIVEREF(__pyx_tuple__132); __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_asbuffer_pxi, __pyx_n_s_frombuffer, 159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 159, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":169 * * @staticmethod * def fromaddress(address, nbytes, bint readonly=False): # <<<<<<<<<<<<<< * """Memory from address and size in bytes""" * cdef void *buf = PyLong_AsVoidPtr(address) */ __pyx_tuple__134 = PyTuple_Pack(6, __pyx_n_s_address, __pyx_n_s_nbytes, __pyx_n_s_readonly, __pyx_n_s_buf, __pyx_n_s_size, __pyx_n_s_mem); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__134); __Pyx_GIVEREF(__pyx_tuple__134); __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_asbuffer_pxi, __pyx_n_s_fromaddress, 169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 169, __pyx_L1_error) /* "mpi4py/MPI/commimpl.pxi":136 * return lock * * def _lock_table(Comm comm): # <<<<<<<<<<<<<< * "Internal communicator lock table" * return PyMPI_Lock_table(comm.ob_mpi) */ __pyx_tuple__136 = PyTuple_Pack(1, __pyx_n_s_comm); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(3, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__136); __Pyx_GIVEREF(__pyx_tuple__136); __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_commimpl_pxi, __pyx_n_s_lock_table, 136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(3, 136, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":1 * class Exception(RuntimeError): # <<<<<<<<<<<<<< * * """ */ __pyx_tuple__138 = PyTuple_Pack(1, __pyx_builtin_RuntimeError); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__138); __Pyx_GIVEREF(__pyx_tuple__138); /* "mpi4py/MPI/ExceptionP.pyx":7 * """ * * def __init__(self, int ierr=0): # <<<<<<<<<<<<<< * if ierr < MPI_SUCCESS: ierr = MPI_ERR_UNKNOWN * self.ob_mpi = ierr */ __pyx_tuple__139 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ierr); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__139); __Pyx_GIVEREF(__pyx_tuple__139); __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_init, 7, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(1, 7, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":12 * RuntimeError.__init__(self, self.ob_mpi) * * def __eq__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr == error) */ __pyx_tuple__141 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_error, __pyx_n_s_ierr); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__141); __Pyx_GIVEREF(__pyx_tuple__141); __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_eq, 12, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(1, 12, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":16 * return (ierr == error) * * def __ne__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr != error) */ __pyx_tuple__143 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_error, __pyx_n_s_ierr); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(1, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__143); __Pyx_GIVEREF(__pyx_tuple__143); __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_ne, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(1, 16, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":20 * return (ierr != error) * * def __lt__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr < error) */ __pyx_tuple__145 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_error, __pyx_n_s_ierr); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(1, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__145); __Pyx_GIVEREF(__pyx_tuple__145); __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_lt, 20, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(1, 20, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":24 * return (ierr < error) * * def __le__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr <= error) */ __pyx_tuple__147 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_error, __pyx_n_s_ierr); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(1, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__147); __Pyx_GIVEREF(__pyx_tuple__147); __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_le, 24, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(1, 24, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":28 * return (ierr <= error) * * def __gt__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr > error) */ __pyx_tuple__149 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_error, __pyx_n_s_ierr); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(1, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__149); __Pyx_GIVEREF(__pyx_tuple__149); __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_gt, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(1, 28, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":32 * return (ierr > error) * * def __ge__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr >= error) */ __pyx_tuple__151 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_error, __pyx_n_s_ierr); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(1, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__151); __Pyx_GIVEREF(__pyx_tuple__151); __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_ge, 32, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(1, 32, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":36 * return (ierr >= error) * * def __hash__(self): # <<<<<<<<<<<<<< * return hash(self.ob_mpi) * */ __pyx_tuple__153 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(1, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__153); __Pyx_GIVEREF(__pyx_tuple__153); __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_hash, 36, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(1, 36, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":39 * return hash(self.ob_mpi) * * def __bool__(self): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return ierr != MPI_SUCCESS */ __pyx_tuple__155 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ierr); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(1, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__155); __Pyx_GIVEREF(__pyx_tuple__155); __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_bool, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(1, 39, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":45 * __nonzero__ = __bool__ * * def __int__(self): # <<<<<<<<<<<<<< * return self.ob_mpi * */ __pyx_tuple__157 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(1, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__157); __Pyx_GIVEREF(__pyx_tuple__157); __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_int, 45, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(1, 45, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":48 * return self.ob_mpi * * def __repr__(self): # <<<<<<<<<<<<<< * return "MPI.Exception(%d)" % self.ob_mpi * */ __pyx_tuple__159 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(1, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__159); __Pyx_GIVEREF(__pyx_tuple__159); __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_repr, 48, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(1, 48, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":51 * return "MPI.Exception(%d)" % self.ob_mpi * * def __str__(self): # <<<<<<<<<<<<<< * if not mpi_active(): * return "error code: %d" % self.ob_mpi */ __pyx_tuple__161 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(1, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__161); __Pyx_GIVEREF(__pyx_tuple__161); __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_str, 51, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(1, 51, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":56 * return self.Get_error_string() * * def Get_error_code(self): # <<<<<<<<<<<<<< * """ * Error code */ __pyx_tuple__163 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_errorcode); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(1, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__163); __Pyx_GIVEREF(__pyx_tuple__163); __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_Get_error_code, 56, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(1, 56, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":66 * error_code = property(Get_error_code, doc="error code") * * def Get_error_class(self): # <<<<<<<<<<<<<< * """ * Error class */ __pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_errorclass); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__165); __Pyx_GIVEREF(__pyx_tuple__165); __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_Get_error_class, 66, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(1, 66, __pyx_L1_error) /* "mpi4py/MPI/ExceptionP.pyx":76 * error_class = property(Get_error_class, doc="error class") * * def Get_error_string(self): # <<<<<<<<<<<<<< * """ * Error string */ __pyx_tuple__167 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_string, __pyx_n_s_resultlen); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(1, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__167); __Pyx_GIVEREF(__pyx_tuple__167); __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_ExceptionP_pyx, __pyx_n_s_Get_error_string, 76, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(1, 76, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":87 * * * def Get_error_class(int errorcode): # <<<<<<<<<<<<<< * """ * Convert an *error code* into an *error class* */ __pyx_tuple__169 = PyTuple_Pack(2, __pyx_n_s_errorcode, __pyx_n_s_errorclass); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(19, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__169); __Pyx_GIVEREF(__pyx_tuple__169); __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Exception_pyx, __pyx_n_s_Get_error_class, 87, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(19, 87, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":95 * return errorclass * * def Get_error_string(int errorcode): # <<<<<<<<<<<<<< * """ * Return the *error string* for a given */ __pyx_tuple__171 = PyTuple_Pack(3, __pyx_n_s_errorcode, __pyx_n_s_string, __pyx_n_s_resultlen); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(19, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__171); __Pyx_GIVEREF(__pyx_tuple__171); __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Exception_pyx, __pyx_n_s_Get_error_string, 95, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(19, 95, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":106 * * * def Add_error_class(): # <<<<<<<<<<<<<< * """ * Add an *error class* to the known error classes */ __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_s_errorclass); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(19, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__173); __Pyx_GIVEREF(__pyx_tuple__173); __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Exception_pyx, __pyx_n_s_Add_error_class, 106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(19, 106, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":114 * return errorclass * * def Add_error_code(int errorclass): # <<<<<<<<<<<<<< * """ * Add an *error code* to an *error class* */ __pyx_tuple__175 = PyTuple_Pack(2, __pyx_n_s_errorclass, __pyx_n_s_errorcode); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(19, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__175); __Pyx_GIVEREF(__pyx_tuple__175); __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Exception_pyx, __pyx_n_s_Add_error_code, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(19, 114, __pyx_L1_error) /* "mpi4py/MPI/Exception.pyx":122 * return errorcode * * def Add_error_string(int errorcode, string): # <<<<<<<<<<<<<< * """ * Associate an *error string* with an */ __pyx_tuple__177 = PyTuple_Pack(3, __pyx_n_s_errorcode, __pyx_n_s_string, __pyx_n_s_cstring); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(19, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__177); __Pyx_GIVEREF(__pyx_tuple__177); __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Exception_pyx, __pyx_n_s_Add_error_string, 122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(19, 122, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":836 * # ----------------- * * def Get_address(location): # <<<<<<<<<<<<<< * """ * Get the address of a location in memory */ __pyx_tuple__179 = PyTuple_Pack(3, __pyx_n_s_location, __pyx_n_s_baseptr, __pyx_n_s_address); if (unlikely(!__pyx_tuple__179)) __PYX_ERR(21, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__179); __Pyx_GIVEREF(__pyx_tuple__179); __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__179, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Datatype_pyx, __pyx_n_s_Get_address, 836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(21, 836, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":847 * return address * * def Aint_add(Aint base, Aint disp): # <<<<<<<<<<<<<< * """ * Return the sum of base address and displacement */ __pyx_tuple__181 = PyTuple_Pack(2, __pyx_n_s_base, __pyx_n_s_disp); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(21, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__181); __Pyx_GIVEREF(__pyx_tuple__181); __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Datatype_pyx, __pyx_n_s_Aint_add, 847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(21, 847, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":853 * return MPI_Aint_add(base, disp) * * def Aint_diff(Aint addr1, Aint addr2): # <<<<<<<<<<<<<< * """ * Return the difference between absolute addresses */ __pyx_tuple__183 = PyTuple_Pack(2, __pyx_n_s_addr1, __pyx_n_s_addr2); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(21, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__183); __Pyx_GIVEREF(__pyx_tuple__183); __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Datatype_pyx, __pyx_n_s_Aint_diff, 853, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(21, 853, __pyx_L1_error) /* "mpi4py/MPI/typestr.pxi":3 * # ----------------------------------------------------------------------------- * * def _typecode(Datatype datatype): # <<<<<<<<<<<<<< * """ * Map MPI datatype to typecode string */ __pyx_tuple__185 = PyTuple_Pack(2, __pyx_n_s_datatype, __pyx_n_s_tc); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(23, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__185); __Pyx_GIVEREF(__pyx_tuple__185); __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_typestr_pxi, __pyx_n_s_typecode_2, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(23, 3, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":1971 * # Cartesian Convenience Function * * def Compute_dims(int nnodes, dims): # <<<<<<<<<<<<<< * """ * Return a balanced distribution of */ __pyx_tuple__187 = PyTuple_Pack(6, __pyx_n_s_nnodes, __pyx_n_s_dims, __pyx_n_s_i, __pyx_n_s_ndims, __pyx_n_s_idims, __pyx_n_s_tmp); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(7, 1971, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__187); __Pyx_GIVEREF(__pyx_tuple__187); __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Comm_pyx, __pyx_n_s_Compute_dims, 1971, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(7, 1971, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2236 * #: Upper bound of memory overhead for sending in buffered mode * * def Attach_buffer(buf): # <<<<<<<<<<<<<< * """ * Attach a user-provided buffer for */ __pyx_tuple__189 = PyTuple_Pack(3, __pyx_n_s_buf, __pyx_n_s_base, __pyx_n_s_size); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(7, 2236, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__189); __Pyx_GIVEREF(__pyx_tuple__189); __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Comm_pyx, __pyx_n_s_Attach_buffer, 2236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(7, 2236, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2246 * with nogil: CHKERR( MPI_Buffer_attach(base, size) ) * * def Detach_buffer(): # <<<<<<<<<<<<<< * """ * Remove an existing attached buffer */ __pyx_tuple__191 = PyTuple_Pack(2, __pyx_n_s_base, __pyx_n_s_size); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(7, 2246, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__191); __Pyx_GIVEREF(__pyx_tuple__191); __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Comm_pyx, __pyx_n_s_Detach_buffer, 2246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(7, 2246, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2263 * # --------------- * * def Open_port(Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Return an address that can be used to establish */ __pyx_tuple__193 = PyTuple_Pack(2, __pyx_n_s_info, __pyx_n_s_cportname); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(7, 2263, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__193); __Pyx_GIVEREF(__pyx_tuple__193); __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Comm_pyx, __pyx_n_s_Open_port, 2263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(7, 2263, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2273 * return mpistr(cportname) * * def Close_port(port_name): # <<<<<<<<<<<<<< * """ * Close a port */ __pyx_tuple__195 = PyTuple_Pack(2, __pyx_n_s_port_name, __pyx_n_s_cportname); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(7, 2273, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__195); __Pyx_GIVEREF(__pyx_tuple__195); __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Comm_pyx, __pyx_n_s_Close_port, 2273, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(7, 2273, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2284 * # --------------- * * def Publish_name(service_name, port_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Publish a service name */ __pyx_tuple__197 = PyTuple_Pack(6, __pyx_n_s_service_name, __pyx_n_s_port_name, __pyx_n_s_info, __pyx_n_s_csrvcname, __pyx_n_s_cportname, __pyx_n_s_cinfo); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(7, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__197); __Pyx_GIVEREF(__pyx_tuple__197); __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Comm_pyx, __pyx_n_s_Publish_name, 2284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(7, 2284, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2297 * with nogil: CHKERR( MPI_Publish_name(csrvcname, cinfo, cportname) ) * * def Unpublish_name(service_name, port_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Unpublish a service name */ __pyx_tuple__199 = PyTuple_Pack(6, __pyx_n_s_service_name, __pyx_n_s_port_name, __pyx_n_s_info, __pyx_n_s_csrvcname, __pyx_n_s_cportname, __pyx_n_s_cinfo); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(7, 2297, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__199); __Pyx_GIVEREF(__pyx_tuple__199); __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Comm_pyx, __pyx_n_s_Unpublish_name, 2297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(7, 2297, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2310 * with nogil: CHKERR( MPI_Unpublish_name(csrvcname, cinfo, cportname) ) * * def Lookup_name(service_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Lookup a port name given a service name */ __pyx_tuple__201 = PyTuple_Pack(5, __pyx_n_s_service_name, __pyx_n_s_info, __pyx_n_s_csrvcname, __pyx_n_s_cinfo, __pyx_n_s_cportname); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(7, 2310, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__201); __Pyx_GIVEREF(__pyx_tuple__201); __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_Comm_pyx, __pyx_n_s_Lookup_name, 2310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(7, 2310, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":712 * # --------------------------------- * * def Register_datarep(datarep, read_fn, write_fn, extent_fn): # <<<<<<<<<<<<<< * """ * Register user-defined data representations */ __pyx_tuple__203 = PyTuple_Pack(10, __pyx_n_s_datarep, __pyx_n_s_read_fn, __pyx_n_s_write_fn, __pyx_n_s_extent_fn, __pyx_n_s_cdatarep, __pyx_n_s_state, __pyx_n_s_rd, __pyx_n_s_wr, __pyx_n_s_ex, __pyx_n_s_xs); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(31, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__203); __Pyx_GIVEREF(__pyx_tuple__203); __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(4, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_File_pyx, __pyx_n_s_Register_datarep, 712, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(31, 712, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":90 * # ----------------- * * def Alloc_mem(Aint size, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Allocate memory for message passing and RMA */ __pyx_tuple__205 = PyTuple_Pack(3, __pyx_n_s_size, __pyx_n_s_info, __pyx_n_s_base); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(8, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__205); __Pyx_GIVEREF(__pyx_tuple__205); __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Alloc_mem, 90, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(8, 90, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":98 * return tomemory(base, size) * * def Free_mem(mem): # <<<<<<<<<<<<<< * """ * Free memory allocated with `Alloc_mem()` */ __pyx_tuple__207 = PyTuple_Pack(3, __pyx_n_s_mem, __pyx_n_s_base, __pyx_n_s_m); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(8, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__207); __Pyx_GIVEREF(__pyx_tuple__207); __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Free_mem, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(8, 98, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":110 * # ----------------------- * * def Init(): # <<<<<<<<<<<<<< * """ * Initialize the MPI execution environment */ __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Init, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(8, 110, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":117 * initialize() * * def Finalize(): # <<<<<<<<<<<<<< * """ * Terminate the MPI execution environment */ __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Finalize, 117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(8, 117, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":139 * #: Multiple threads may call MPI * * def Init_thread(int required=THREAD_MULTIPLE): # <<<<<<<<<<<<<< * """ * Initialize the MPI execution environment */ __pyx_tuple__211 = PyTuple_Pack(2, __pyx_n_s_required, __pyx_n_s_provided); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(8, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__211); __Pyx_GIVEREF(__pyx_tuple__211); __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Init_thread, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(8, 139, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":148 * return provided * * def Query_thread(): # <<<<<<<<<<<<<< * """ * Return the level of thread support */ __pyx_tuple__213 = PyTuple_Pack(1, __pyx_n_s_provided); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(8, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__213); __Pyx_GIVEREF(__pyx_tuple__213); __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Query_thread, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(8, 148, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":157 * return provided * * def Is_thread_main(): # <<<<<<<<<<<<<< * """ * Indicate whether this thread called */ __pyx_tuple__215 = PyTuple_Pack(1, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(8, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__215); __Pyx_GIVEREF(__pyx_tuple__215); __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Is_thread_main, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(8, 157, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":166 * return flag * * def Is_initialized(): # <<<<<<<<<<<<<< * """ * Indicates whether ``Init`` has been called */ __pyx_tuple__217 = PyTuple_Pack(1, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(8, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__217); __Pyx_GIVEREF(__pyx_tuple__217); __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Is_initialized, 166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(8, 166, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":174 * return flag * * def Is_finalized(): # <<<<<<<<<<<<<< * """ * Indicates whether ``Finalize`` has completed */ __pyx_tuple__219 = PyTuple_Pack(1, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(8, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__219); __Pyx_GIVEREF(__pyx_tuple__219); __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Is_finalized, 174, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(8, 174, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":191 * SUBVERSION = MPI_SUBVERSION * * def Get_version(): # <<<<<<<<<<<<<< * """ * Obtain the version number of the MPI standard supported */ __pyx_tuple__221 = PyTuple_Pack(2, __pyx_n_s_version, __pyx_n_s_subversion); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(8, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__221); __Pyx_GIVEREF(__pyx_tuple__221); __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Get_version, 191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(8, 191, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":201 * return (version, subversion) * * def Get_library_version(): # <<<<<<<<<<<<<< * """ * Obtain the version string of the MPI library */ __pyx_tuple__223 = PyTuple_Pack(2, __pyx_n_s_name_2, __pyx_n_s_nlen); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(8, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__223); __Pyx_GIVEREF(__pyx_tuple__223); __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Get_library_version, 201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(8, 201, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":213 * # ---------------------- * * def Get_processor_name(): # <<<<<<<<<<<<<< * """ * Obtain the name of the calling processor */ __pyx_tuple__225 = PyTuple_Pack(2, __pyx_n_s_name_2, __pyx_n_s_nlen); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(8, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__225); __Pyx_GIVEREF(__pyx_tuple__225); __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Get_processor_name, 213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(8, 213, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":225 * # -------------------------- * * def Wtime(): # <<<<<<<<<<<<<< * """ * Return an elapsed time on the calling processor */ __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Wtime, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(8, 225, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":231 * return MPI_Wtime() * * def Wtick(): # <<<<<<<<<<<<<< * """ * Return the resolution of ``Wtime`` */ __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Wtick, 231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(8, 231, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":240 * # -------------------- * * def Pcontrol(int level): # <<<<<<<<<<<<<< * """ * Control profiling */ __pyx_tuple__229 = PyTuple_Pack(1, __pyx_n_s_level); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(8, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__229); __Pyx_GIVEREF(__pyx_tuple__229); __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_Pcontrol, 240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(8, 240, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":268 * int PyMPI_Get_vendor(const char**,int*,int*,int*) nogil * * def get_vendor(): # <<<<<<<<<<<<<< * """ * Infomation about the underlying MPI implementation */ __pyx_tuple__231 = PyTuple_Pack(4, __pyx_n_s_name_2, __pyx_n_s_major, __pyx_n_s_minor, __pyx_n_s_micro); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(8, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__231); __Pyx_GIVEREF(__pyx_tuple__231); __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_get_vendor, 268, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(8, 268, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":294 * return 0 * * def _sizeof(arg): # <<<<<<<<<<<<<< * """ * Size in bytes of the underlying MPI handle */ __pyx_tuple__233 = PyTuple_Pack(1, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(8, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__233); __Pyx_GIVEREF(__pyx_tuple__233); __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_sizeof, 294, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(8, 294, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":311 * raise TypeError("expecting an MPI type or instance") * * def _addressof(arg): # <<<<<<<<<<<<<< * """ * Memory address of the underlying MPI handle */ __pyx_tuple__235 = PyTuple_Pack(2, __pyx_n_s_arg, __pyx_n_s_ptr); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(8, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__235); __Pyx_GIVEREF(__pyx_tuple__235); __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_addressof, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(8, 311, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":342 * return PyLong_FromVoidPtr(ptr) * * def _handleof(arg): # <<<<<<<<<<<<<< * """ * Unsigned integer value with the underlying MPI handle */ __pyx_tuple__237 = PyTuple_Pack(1, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(8, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__237); __Pyx_GIVEREF(__pyx_tuple__237); __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_mpi4py_MPI_MPI_pyx, __pyx_n_s_handleof, 342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(8, 342, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; __pyx_umethod_PyList_Type_index.type = (PyObject*)&PyList_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(32, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(32, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(32, 1, __pyx_L1_error) __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(32, 1, __pyx_L1_error) __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(32, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __pyx_v_6mpi4py_3MPI_MPIException = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI__pypy_sentinel = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_array_array = ((PyTypeObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_numpy_array = ((PyTypeObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_op_user_registry = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI__buffer = ((struct __pyx_obj_6mpi4py_3MPI_memory *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UNWEIGHTED__ = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___WEIGHTS_EMPTY__ = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_allocate_lock = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_lock_registry = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_datarep_registry = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_type_keyval = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_comm_keyval = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_win_keyval = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___BOTTOM__ = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___IN_PLACE__ = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_PyPickle_dumps = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_PyPickle_loads = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_PyBytesIO_New = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_PyPickle_loadf = Py_None; Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_PyMPI_PICKLE = ((struct __pyx_obj_6mpi4py_3MPI_Pickle *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___ERRHANDLER_NULL__ = ((struct PyMPIErrhandlerObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___ERRORS_RETURN__ = ((struct PyMPIErrhandlerObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___ERRORS_ARE_FATAL__ = ((struct PyMPIErrhandlerObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___DATATYPE_NULL__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UB__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LB__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___PACKED__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___BYTE__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___AINT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___OFFSET__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COUNT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___CHAR__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___WCHAR__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___SIGNED_CHAR__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___SHORT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LONG__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LONG_LONG__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UNSIGNED_CHAR__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UNSIGNED__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UNSIGNED_LONG_LONG__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___FLOAT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___DOUBLE__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LONG_DOUBLE__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___C_BOOL__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INT8_T__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INT16_T__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INT32_T__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INT64_T__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UINT8_T__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UINT16_T__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UINT32_T__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___UINT64_T__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___C_COMPLEX__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___CXX_BOOL__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___CXX_FLOAT_COMPLEX__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___CXX_DOUBLE_COMPLEX__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___CXX_LONG_DOUBLE_COMPLEX__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___SHORT_INT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___TWOINT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LONG_INT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___FLOAT_INT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___DOUBLE_INT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LONG_DOUBLE_INT__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___CHARACTER__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LOGICAL__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INTEGER__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___REAL__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___DOUBLE_PRECISION__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COMPLEX__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LOGICAL1__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LOGICAL2__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LOGICAL4__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LOGICAL8__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INTEGER1__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INTEGER2__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INTEGER4__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INTEGER8__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INTEGER16__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___REAL2__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___REAL4__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___REAL8__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___REAL16__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COMPLEX4__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COMPLEX8__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COMPLEX16__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COMPLEX32__ = ((struct PyMPIDatatypeObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_TypeDict = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_CTypeDict = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI_FTypeDict = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___REQUEST_NULL__ = ((struct PyMPIRequestObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___MESSAGE_NULL__ = ((struct PyMPIMessageObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___MESSAGE_NO_PROC__ = ((struct PyMPIMessageObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INFO_NULL__ = ((struct PyMPIInfoObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___INFO_ENV__ = ((struct PyMPIInfoObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___OP_NULL__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___MAX__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___MIN__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___SUM__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___PROD__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LAND__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___BAND__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LOR__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___BOR__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___LXOR__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___BXOR__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___MAXLOC__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___MINLOC__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___REPLACE__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___NO_OP__ = ((struct PyMPIOpObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___GROUP_NULL__ = ((struct PyMPIGroupObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___GROUP_EMPTY__ = ((struct PyMPIGroupObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COMM_NULL__ = ((struct PyMPICommObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COMM_SELF__ = ((struct PyMPIIntracommObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COMM_WORLD__ = ((struct PyMPIIntracommObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___COMM_PARENT__ = ((struct PyMPIIntercommObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___WIN_NULL__ = ((struct PyMPIWinObject *)Py_None); Py_INCREF(Py_None); __pyx_v_6mpi4py_3MPI___FILE_NULL__ = ((struct PyMPIFileObject *)Py_None); Py_INCREF(Py_None); __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ if (__Pyx_ExportFunction("PyMPIDatatype_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIDatatype_New, "PyObject *(MPI_Datatype)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIDatatype_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIDatatype_Get, "MPI_Datatype *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIStatus_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIStatus_New, "PyObject *(MPI_Status *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIStatus_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIStatus_Get, "MPI_Status *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIRequest_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIRequest_New, "PyObject *(MPI_Request)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIRequest_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIRequest_Get, "MPI_Request *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIMessage_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIMessage_New, "PyObject *(MPI_Message)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIMessage_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIMessage_Get, "MPI_Message *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIOp_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIOp_New, "PyObject *(MPI_Op)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIOp_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIOp_Get, "MPI_Op *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIInfo_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIInfo_New, "PyObject *(MPI_Info)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIInfo_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIInfo_Get, "MPI_Info *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIGroup_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIGroup_New, "PyObject *(MPI_Group)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIGroup_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIGroup_Get, "MPI_Group *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIComm_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIComm_New, "PyObject *(MPI_Comm)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIComm_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIComm_Get, "MPI_Comm *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIWin_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIWin_New, "PyObject *(MPI_Win)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIWin_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIWin_Get, "MPI_Win *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIFile_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIFile_New, "PyObject *(MPI_File)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIFile_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIFile_Get, "MPI_File *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIErrhandler_New", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIErrhandler_New, "PyObject *(MPI_Errhandler)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) if (__Pyx_ExportFunction("PyMPIErrhandler_Get", (void (*)(void))__pyx_f_6mpi4py_3MPI_PyMPIErrhandler_Get, "MPI_Errhandler *(PyObject *)") < 0) __PYX_ERR(32, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ if (PyType_Ready(&PyMPIStatus_Type) < 0) __PYX_ERR(24, 1, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIStatus_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIStatus_Type.tp_dictoffset && PyMPIStatus_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIStatus_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Status, (PyObject *)&PyMPIStatus_Type) < 0) __PYX_ERR(24, 1, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Status = &PyMPIStatus_Type; if (PyType_Ready(&PyMPIDatatype_Type) < 0) __PYX_ERR(21, 43, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIDatatype_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIDatatype_Type.tp_dictoffset && PyMPIDatatype_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIDatatype_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Datatype, (PyObject *)&PyMPIDatatype_Type) < 0) __PYX_ERR(21, 43, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Datatype = &PyMPIDatatype_Type; if (PyType_Ready(&PyMPIRequest_Type) < 0) __PYX_ERR(25, 1, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIRequest_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIRequest_Type.tp_dictoffset && PyMPIRequest_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIRequest_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Request, (PyObject *)&PyMPIRequest_Type) < 0) __PYX_ERR(25, 1, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Request = &PyMPIRequest_Type; PyMPIPrequest_Type.tp_base = __pyx_ptype_6mpi4py_3MPI_Request; if (PyType_Ready(&PyMPIPrequest_Type) < 0) __PYX_ERR(25, 283, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIPrequest_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIPrequest_Type.tp_dictoffset && PyMPIPrequest_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIPrequest_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Prequest, (PyObject *)&PyMPIPrequest_Type) < 0) __PYX_ERR(25, 283, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Prequest = &PyMPIPrequest_Type; PyMPIGrequest_Type.tp_base = __pyx_ptype_6mpi4py_3MPI_Request; if (PyType_Ready(&PyMPIGrequest_Type) < 0) __PYX_ERR(25, 315, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIGrequest_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIGrequest_Type.tp_dictoffset && PyMPIGrequest_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIGrequest_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Grequest, (PyObject *)&PyMPIGrequest_Type) < 0) __PYX_ERR(25, 315, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Grequest = &PyMPIGrequest_Type; if (PyType_Ready(&PyMPIMessage_Type) < 0) __PYX_ERR(26, 1, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIMessage_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIMessage_Type.tp_dictoffset && PyMPIMessage_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIMessage_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Message, (PyObject *)&PyMPIMessage_Type) < 0) __PYX_ERR(26, 1, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Message = &PyMPIMessage_Type; if (PyType_Ready(&PyMPIOp_Type) < 0) __PYX_ERR(28, 1, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIOp_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIOp_Type.tp_dictoffset && PyMPIOp_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIOp_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Op, (PyObject *)&PyMPIOp_Type) < 0) __PYX_ERR(28, 1, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Op = &PyMPIOp_Type; if (PyType_Ready(&PyMPIGroup_Type) < 0) __PYX_ERR(29, 1, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIGroup_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIGroup_Type.tp_dictoffset && PyMPIGroup_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIGroup_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Group, (PyObject *)&PyMPIGroup_Type) < 0) __PYX_ERR(29, 1, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Group = &PyMPIGroup_Type; if (PyType_Ready(&PyMPIInfo_Type) < 0) __PYX_ERR(27, 1, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIInfo_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIInfo_Type.tp_dictoffset && PyMPIInfo_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIInfo_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Info, (PyObject *)&PyMPIInfo_Type) < 0) __PYX_ERR(27, 1, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Info = &PyMPIInfo_Type; if (PyType_Ready(&PyMPIErrhandler_Type) < 0) __PYX_ERR(20, 1, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIErrhandler_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIErrhandler_Type.tp_dictoffset && PyMPIErrhandler_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIErrhandler_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Errhandler, (PyObject *)&PyMPIErrhandler_Type) < 0) __PYX_ERR(20, 1, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Errhandler = &PyMPIErrhandler_Type; if (PyType_Ready(&PyMPIComm_Type) < 0) __PYX_ERR(7, 31, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIComm_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIComm_Type.tp_dictoffset && PyMPIComm_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIComm_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Comm, (PyObject *)&PyMPIComm_Type) < 0) __PYX_ERR(7, 31, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Comm = &PyMPIComm_Type; PyMPIIntracomm_Type.tp_base = __pyx_ptype_6mpi4py_3MPI_Comm; if (PyType_Ready(&PyMPIIntracomm_Type) < 0) __PYX_ERR(7, 1292, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIIntracomm_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIIntracomm_Type.tp_dictoffset && PyMPIIntracomm_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIIntracomm_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Intracomm, (PyObject *)&PyMPIIntracomm_Type) < 0) __PYX_ERR(7, 1292, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Intracomm = &PyMPIIntracomm_Type; PyMPITopocomm_Type.tp_base = __pyx_ptype_6mpi4py_3MPI_Intracomm; if (PyType_Ready(&PyMPITopocomm_Type) < 0) __PYX_ERR(7, 1626, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPITopocomm_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPITopocomm_Type.tp_dictoffset && PyMPITopocomm_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPITopocomm_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Topocomm, (PyObject *)&PyMPITopocomm_Type) < 0) __PYX_ERR(7, 1626, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Topocomm = &PyMPITopocomm_Type; PyMPICartcomm_Type.tp_base = __pyx_ptype_6mpi4py_3MPI_Topocomm; if (PyType_Ready(&PyMPICartcomm_Type) < 0) __PYX_ERR(7, 1841, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPICartcomm_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPICartcomm_Type.tp_dictoffset && PyMPICartcomm_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPICartcomm_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Cartcomm, (PyObject *)&PyMPICartcomm_Type) < 0) __PYX_ERR(7, 1841, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Cartcomm = &PyMPICartcomm_Type; PyMPIGraphcomm_Type.tp_base = __pyx_ptype_6mpi4py_3MPI_Topocomm; if (PyType_Ready(&PyMPIGraphcomm_Type) < 0) __PYX_ERR(7, 1988, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIGraphcomm_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIGraphcomm_Type.tp_dictoffset && PyMPIGraphcomm_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIGraphcomm_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Graphcomm, (PyObject *)&PyMPIGraphcomm_Type) < 0) __PYX_ERR(7, 1988, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Graphcomm = &PyMPIGraphcomm_Type; PyMPIDistgraphcomm_Type.tp_base = __pyx_ptype_6mpi4py_3MPI_Topocomm; if (PyType_Ready(&PyMPIDistgraphcomm_Type) < 0) __PYX_ERR(7, 2095, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIDistgraphcomm_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIDistgraphcomm_Type.tp_dictoffset && PyMPIDistgraphcomm_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIDistgraphcomm_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Distgraphcomm, (PyObject *)&PyMPIDistgraphcomm_Type) < 0) __PYX_ERR(7, 2095, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Distgraphcomm = &PyMPIDistgraphcomm_Type; PyMPIIntercomm_Type.tp_base = __pyx_ptype_6mpi4py_3MPI_Comm; if (PyType_Ready(&PyMPIIntercomm_Type) < 0) __PYX_ERR(7, 2157, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIIntercomm_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIIntercomm_Type.tp_dictoffset && PyMPIIntercomm_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIIntercomm_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Intercomm, (PyObject *)&PyMPIIntercomm_Type) < 0) __PYX_ERR(7, 2157, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Intercomm = &PyMPIIntercomm_Type; if (PyType_Ready(&PyMPIWin_Type) < 0) __PYX_ERR(30, 27, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIWin_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIWin_Type.tp_dictoffset && PyMPIWin_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIWin_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Win, (PyObject *)&PyMPIWin_Type) < 0) __PYX_ERR(30, 27, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Win = &PyMPIWin_Type; if (PyType_Ready(&PyMPIFile_Type) < 0) __PYX_ERR(31, 51, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 PyMPIFile_Type.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!PyMPIFile_Type.tp_dictoffset && PyMPIFile_Type.tp_getattro == PyObject_GenericGetAttr)) { PyMPIFile_Type.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_File, (PyObject *)&PyMPIFile_Type) < 0) __PYX_ERR(31, 51, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_File = &PyMPIFile_Type; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI_memory) < 0) __PYX_ERR(0, 143, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI_memory.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI_memory.tp_dictoffset && __pyx_type_6mpi4py_3MPI_memory.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI_memory.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_memory, (PyObject *)&__pyx_type_6mpi4py_3MPI_memory) < 0) __PYX_ERR(0, 143, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_memory = &__pyx_type_6mpi4py_3MPI_memory; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_mem) < 0) __PYX_ERR(2, 13, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_mem.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_mem.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_mem.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_mem.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6mpi4py_3MPI__p_mem = &__pyx_type_6mpi4py_3MPI__p_mem; __pyx_vtabptr_6mpi4py_3MPI__p_greq = &__pyx_vtable_6mpi4py_3MPI__p_greq; __pyx_vtable_6mpi4py_3MPI__p_greq.query = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_greq *, MPI_Status *))__pyx_f_6mpi4py_3MPI_7_p_greq_query; __pyx_vtable_6mpi4py_3MPI__p_greq.free = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_greq *))__pyx_f_6mpi4py_3MPI_7_p_greq_free; __pyx_vtable_6mpi4py_3MPI__p_greq.cancel = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_greq *, int))__pyx_f_6mpi4py_3MPI_7_p_greq_cancel; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_greq) < 0) __PYX_ERR(13, 56, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_greq.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_greq.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_greq.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_greq.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_6mpi4py_3MPI__p_greq.tp_dict, __pyx_vtabptr_6mpi4py_3MPI__p_greq) < 0) __PYX_ERR(13, 56, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI__p_greq = &__pyx_type_6mpi4py_3MPI__p_greq; __pyx_vtabptr_6mpi4py_3MPI__p_datarep = &__pyx_vtable_6mpi4py_3MPI__p_datarep; __pyx_vtable_6mpi4py_3MPI__p_datarep.read = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_datarep *, void *, MPI_Datatype, int, void *, MPI_Offset))__pyx_f_6mpi4py_3MPI_10_p_datarep_read; __pyx_vtable_6mpi4py_3MPI__p_datarep.write = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_datarep *, void *, MPI_Datatype, int, void *, MPI_Offset))__pyx_f_6mpi4py_3MPI_10_p_datarep_write; __pyx_vtable_6mpi4py_3MPI__p_datarep.extent = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_datarep *, MPI_Datatype, MPI_Aint *))__pyx_f_6mpi4py_3MPI_10_p_datarep_extent; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_datarep) < 0) __PYX_ERR(16, 7, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_datarep.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_datarep.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_datarep.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_datarep.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_6mpi4py_3MPI__p_datarep.tp_dict, __pyx_vtabptr_6mpi4py_3MPI__p_datarep) < 0) __PYX_ERR(16, 7, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI__p_datarep = &__pyx_type_6mpi4py_3MPI__p_datarep; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_keyval) < 0) __PYX_ERR(4, 5, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_keyval.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_keyval.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_keyval.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_keyval.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6mpi4py_3MPI__p_keyval = &__pyx_type_6mpi4py_3MPI__p_keyval; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_message) < 0) __PYX_ERR(5, 64, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_message.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_message.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_message.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_message.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6mpi4py_3MPI__p_message = &__pyx_type_6mpi4py_3MPI__p_message; __pyx_vtabptr_6mpi4py_3MPI__p_msg_p2p = &__pyx_vtable_6mpi4py_3MPI__p_msg_p2p; __pyx_vtable_6mpi4py_3MPI__p_msg_p2p.for_send = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *, PyObject *, int))__pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_send; __pyx_vtable_6mpi4py_3MPI__p_msg_p2p.for_recv = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_p2p *, PyObject *, int))__pyx_f_6mpi4py_3MPI_10_p_msg_p2p_for_recv; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_msg_p2p) < 0) __PYX_ERR(5, 364, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_msg_p2p.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_msg_p2p.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_msg_p2p.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_msg_p2p.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_6mpi4py_3MPI__p_msg_p2p.tp_dict, __pyx_vtabptr_6mpi4py_3MPI__p_msg_p2p) < 0) __PYX_ERR(5, 364, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI__p_msg_p2p = &__pyx_type_6mpi4py_3MPI__p_msg_p2p; __pyx_vtabptr_6mpi4py_3MPI__p_msg_cco = &__pyx_vtable_6mpi4py_3MPI__p_msg_cco; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_cco_send = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, int, int))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_send; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_cco_recv = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, int, int))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cco_recv; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_bcast = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, int, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_bcast; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_gather = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, int, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_gather; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_scatter = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, int, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scatter; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_allgather = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allgather; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_alltoall = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_alltoall; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_neighbor_allgather = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_allgather; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_neighbor_alltoall = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, int, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_neighbor_alltoall; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_cro_send = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, int))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_send; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_cro_recv = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, int))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_cro_recv; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_reduce = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, int, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_allreduce = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_allreduce; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_reduce_scatter_block = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter_block; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_reduce_scatter = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_reduce_scatter; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_scan = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_scan; __pyx_vtable_6mpi4py_3MPI__p_msg_cco.for_exscan = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_cco *, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_10_p_msg_cco_for_exscan; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_msg_cco) < 0) __PYX_ERR(5, 408, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_msg_cco.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_msg_cco.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_msg_cco.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_msg_cco.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_6mpi4py_3MPI__p_msg_cco.tp_dict, __pyx_vtabptr_6mpi4py_3MPI__p_msg_cco) < 0) __PYX_ERR(5, 408, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI__p_msg_cco = &__pyx_type_6mpi4py_3MPI__p_msg_cco; __pyx_vtabptr_6mpi4py_3MPI__p_msg_ccow = &__pyx_vtable_6mpi4py_3MPI__p_msg_ccow; __pyx_vtable_6mpi4py_3MPI__p_msg_ccow.for_alltoallw = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_alltoallw; __pyx_vtable_6mpi4py_3MPI__p_msg_ccow.for_neighbor_alltoallw = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_ccow *, PyObject *, PyObject *, MPI_Comm))__pyx_f_6mpi4py_3MPI_11_p_msg_ccow_for_neighbor_alltoallw; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_msg_ccow) < 0) __PYX_ERR(5, 832, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_msg_ccow.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_msg_ccow.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_msg_ccow.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_msg_ccow.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_6mpi4py_3MPI__p_msg_ccow.tp_dict, __pyx_vtabptr_6mpi4py_3MPI__p_msg_ccow) < 0) __PYX_ERR(5, 832, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI__p_msg_ccow = &__pyx_type_6mpi4py_3MPI__p_msg_ccow; __pyx_vtabptr_6mpi4py_3MPI__p_msg_rma = &__pyx_vtable_6mpi4py_3MPI__p_msg_rma; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.for_rma = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, int, PyObject *, int, PyObject *))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_rma; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.for_put = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int, PyObject *))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_put; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.for_get = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int, PyObject *))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.for_acc = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int, PyObject *))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_acc; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.set_origin = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_origin; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.set_compare = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_compare; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.set_result = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, int))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_set_result; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.for_get_acc = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, PyObject *, int, PyObject *))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_get_acc; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.for_fetch_op = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, PyObject *, int, MPI_Aint))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_fetch_op; __pyx_vtable_6mpi4py_3MPI__p_msg_rma.for_cmp_swap = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_rma *, PyObject *, PyObject *, PyObject *, int, MPI_Aint))__pyx_f_6mpi4py_3MPI_10_p_msg_rma_for_cmp_swap; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_msg_rma) < 0) __PYX_ERR(5, 904, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_msg_rma.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_msg_rma.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_msg_rma.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_msg_rma.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_6mpi4py_3MPI__p_msg_rma.tp_dict, __pyx_vtabptr_6mpi4py_3MPI__p_msg_rma) < 0) __PYX_ERR(5, 904, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI__p_msg_rma = &__pyx_type_6mpi4py_3MPI__p_msg_rma; __pyx_vtabptr_6mpi4py_3MPI__p_msg_io = &__pyx_vtable_6mpi4py_3MPI__p_msg_io; __pyx_vtable_6mpi4py_3MPI__p_msg_io.for_read = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *, PyObject *))__pyx_f_6mpi4py_3MPI_9_p_msg_io_for_read; __pyx_vtable_6mpi4py_3MPI__p_msg_io.for_write = (int (*)(struct __pyx_obj_6mpi4py_3MPI__p_msg_io *, PyObject *))__pyx_f_6mpi4py_3MPI_9_p_msg_io_for_write; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI__p_msg_io) < 0) __PYX_ERR(5, 1058, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI__p_msg_io.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI__p_msg_io.tp_dictoffset && __pyx_type_6mpi4py_3MPI__p_msg_io.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI__p_msg_io.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_6mpi4py_3MPI__p_msg_io.tp_dict, __pyx_vtabptr_6mpi4py_3MPI__p_msg_io) < 0) __PYX_ERR(5, 1058, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI__p_msg_io = &__pyx_type_6mpi4py_3MPI__p_msg_io; __pyx_vtabptr_6mpi4py_3MPI_Pickle = &__pyx_vtable_6mpi4py_3MPI_Pickle; __pyx_vtable_6mpi4py_3MPI_Pickle.cdumps = (PyObject *(*)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *))__pyx_f_6mpi4py_3MPI_6Pickle_cdumps; __pyx_vtable_6mpi4py_3MPI_Pickle.cloads = (PyObject *(*)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *))__pyx_f_6mpi4py_3MPI_6Pickle_cloads; __pyx_vtable_6mpi4py_3MPI_Pickle.dump = (PyObject *(*)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *, void **, int *))__pyx_f_6mpi4py_3MPI_6Pickle_dump; __pyx_vtable_6mpi4py_3MPI_Pickle.load = (PyObject *(*)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void *, int))__pyx_f_6mpi4py_3MPI_6Pickle_load; __pyx_vtable_6mpi4py_3MPI_Pickle.dumpv = (PyObject *(*)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, PyObject *, void **, int, int *, int *))__pyx_f_6mpi4py_3MPI_6Pickle_dumpv; __pyx_vtable_6mpi4py_3MPI_Pickle.loadv = (PyObject *(*)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void *, int, int *, int *))__pyx_f_6mpi4py_3MPI_6Pickle_loadv; __pyx_vtable_6mpi4py_3MPI_Pickle.alloc = (PyObject *(*)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void **, int))__pyx_f_6mpi4py_3MPI_6Pickle_alloc; __pyx_vtable_6mpi4py_3MPI_Pickle.allocv = (PyObject *(*)(struct __pyx_obj_6mpi4py_3MPI_Pickle *, void **, int, int *, int *))__pyx_f_6mpi4py_3MPI_6Pickle_allocv; if (PyType_Ready(&__pyx_type_6mpi4py_3MPI_Pickle) < 0) __PYX_ERR(6, 44, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6mpi4py_3MPI_Pickle.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6mpi4py_3MPI_Pickle.tp_dictoffset && __pyx_type_6mpi4py_3MPI_Pickle.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6mpi4py_3MPI_Pickle.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } if (__Pyx_SetVtable(__pyx_type_6mpi4py_3MPI_Pickle.tp_dict, __pyx_vtabptr_6mpi4py_3MPI_Pickle) < 0) __PYX_ERR(6, 44, __pyx_L1_error) __pyx_ptype_6mpi4py_3MPI_Pickle = &__pyx_type_6mpi4py_3MPI_Pickle; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION < 3 #ifdef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC void #else #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #else #ifdef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyObject * #else #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC initMPI(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC initMPI(void) #else __Pyx_PyMODINIT_FUNC PyInit_MPI(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_MPI(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { result = PyDict_SetItemString(moddict, to_name, value); } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_MPI(PyObject *__pyx_pyinit_module) #endif #endif { PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; int __pyx_t_23; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'MPI' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_MPI(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(32, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(32, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(32, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("MPI", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) __PYX_ERR(32, 1, __pyx_L1_error) #endif __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(32, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(32, 1, __pyx_L1_error) Py_INCREF(__pyx_b); __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(32, 1, __pyx_L1_error) Py_INCREF(__pyx_cython_runtime); if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(32, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_mpi4py__MPI) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(32, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(32, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "mpi4py.MPI")) { if (unlikely(PyDict_SetItemString(modules, "mpi4py.MPI", __pyx_m) < 0)) __PYX_ERR(32, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); if (unlikely(__Pyx_modinit_function_export_code() != 0)) goto __pyx_L1_error; if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; (void)__Pyx_modinit_type_import_code(); (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(32, 1, __pyx_L1_error) #endif /* "mpi4py/MPI/MPI.pyx":1 * __doc__ = """ # <<<<<<<<<<<<<< * Message Passing Interface * """ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_doc, __pyx_kp_s_Message_Passing_Interface) < 0) __PYX_ERR(8, 1, __pyx_L1_error) /* "mpi4py/MPI/atimport.pxi":37 * * cdef Options options * options.initialize = 1 # <<<<<<<<<<<<<< * options.threads = 1 * options.thread_level = MPI_THREAD_MULTIPLE */ __pyx_v_6mpi4py_3MPI_options.initialize = 1; /* "mpi4py/MPI/atimport.pxi":38 * cdef Options options * options.initialize = 1 * options.threads = 1 # <<<<<<<<<<<<<< * options.thread_level = MPI_THREAD_MULTIPLE * options.finalize = 1 */ __pyx_v_6mpi4py_3MPI_options.threads = 1; /* "mpi4py/MPI/atimport.pxi":39 * options.initialize = 1 * options.threads = 1 * options.thread_level = MPI_THREAD_MULTIPLE # <<<<<<<<<<<<<< * options.finalize = 1 * options.fast_reduce = 1 */ __pyx_v_6mpi4py_3MPI_options.thread_level = MPI_THREAD_MULTIPLE; /* "mpi4py/MPI/atimport.pxi":40 * options.threads = 1 * options.thread_level = MPI_THREAD_MULTIPLE * options.finalize = 1 # <<<<<<<<<<<<<< * options.fast_reduce = 1 * options.recv_mprobe = 1 */ __pyx_v_6mpi4py_3MPI_options.finalize = 1; /* "mpi4py/MPI/atimport.pxi":41 * options.thread_level = MPI_THREAD_MULTIPLE * options.finalize = 1 * options.fast_reduce = 1 # <<<<<<<<<<<<<< * options.recv_mprobe = 1 * options.errors = 1 */ __pyx_v_6mpi4py_3MPI_options.fast_reduce = 1; /* "mpi4py/MPI/atimport.pxi":42 * options.finalize = 1 * options.fast_reduce = 1 * options.recv_mprobe = 1 # <<<<<<<<<<<<<< * options.errors = 1 * */ __pyx_v_6mpi4py_3MPI_options.recv_mprobe = 1; /* "mpi4py/MPI/atimport.pxi":43 * options.fast_reduce = 1 * options.recv_mprobe = 1 * options.errors = 1 # <<<<<<<<<<<<<< * * cdef int warnOpt(object name, object value) except -1: */ __pyx_v_6mpi4py_3MPI_options.errors = 1; /* "mpi4py/MPI/atimport.pxi":203 * PyMPI_Commctx_finalize() * * cdef int abort_status = 0 # <<<<<<<<<<<<<< * * cdef void atexit() nogil: */ __pyx_v_6mpi4py_3MPI_abort_status = 0; /* "mpi4py/MPI/atimport.pxi":213 * MPI_Finalize() * * def _set_abort_status(object status): # <<<<<<<<<<<<<< * "Helper for ``python -m mpi4py.run ...``" * global abort_status */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_1_set_abort_status, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_abort_status, __pyx_t_1) < 0) __PYX_ERR(9, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/atimport.pxi":233 * void *PyExc_NotImplementedError * * cdef object MPIException = PyExc_RuntimeError # <<<<<<<<<<<<<< * * cdef int PyMPI_Raise(int ierr) except -1 with gil: */ __pyx_t_1 = ((PyObject *)PyExc_RuntimeError); __Pyx_INCREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_MPIException); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_MPIException, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/atimport.pxi":264 * int _Py_IsInitialized"Py_IsInitialized"() nogil * * cdef object _pypy_sentinel = None # <<<<<<<<<<<<<< * * cdef inline int Py_IsInitialized() nogil: */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI__pypy_sentinel); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI__pypy_sentinel, Py_None); __Pyx_GIVEREF(Py_None); /* "mpi4py/MPI/MPI.pyx":10 * include "atimport.pxi" * * bootstrap() # <<<<<<<<<<<<<< * initialize() * */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_bootstrap(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(8, 10, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":11 * * bootstrap() * initialize() # <<<<<<<<<<<<<< * * include "asstring.pxi" */ __pyx_t_2 = __pyx_f_6mpi4py_3MPI_initialize(); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(8, 11, __pyx_L1_error) /* "mpi4py/MPI/asbuffer.pxi":53 * * cdef char BYTE_FMT[2] * BYTE_FMT[0] = c'B' # <<<<<<<<<<<<<< * BYTE_FMT[1] = 0 * */ (__pyx_v_6mpi4py_3MPI_BYTE_FMT[0]) = 'B'; /* "mpi4py/MPI/asbuffer.pxi":54 * cdef char BYTE_FMT[2] * BYTE_FMT[0] = c'B' * BYTE_FMT[1] = 0 # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ (__pyx_v_6mpi4py_3MPI_BYTE_FMT[1]) = 0; /* "mpi4py/MPI/asbuffer.pxi":64 * cdef type array_array * cdef type numpy_array * cdef int pypy_have_numpy = 0 # <<<<<<<<<<<<<< * if PYPY: * from array import array as array_array */ __pyx_v_6mpi4py_3MPI_pypy_have_numpy = 0; /* "mpi4py/MPI/asbuffer.pxi":65 * cdef type numpy_array * cdef int pypy_have_numpy = 0 * if PYPY: # <<<<<<<<<<<<<< * from array import array as array_array * try: */ if (PyMPI_RUNTIME_PYPY) { /* "mpi4py/MPI/asbuffer.pxi":66 * cdef int pypy_have_numpy = 0 * if PYPY: * from array import array as array_array # <<<<<<<<<<<<<< * try: * from _numpypy.multiarray import ndarray as numpy_array */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_array); __Pyx_GIVEREF(__pyx_n_s_array); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_array); __pyx_t_3 = __Pyx_Import(__pyx_n_s_array, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_INCREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI_array_array)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_array_array, ((PyTypeObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/asbuffer.pxi":67 * if PYPY: * from array import array as array_array * try: # <<<<<<<<<<<<<< * from _numpypy.multiarray import ndarray as numpy_array * pypy_have_numpy = 1 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "mpi4py/MPI/asbuffer.pxi":68 * from array import array as array_array * try: * from _numpypy.multiarray import ndarray as numpy_array # <<<<<<<<<<<<<< * pypy_have_numpy = 1 * except ImportError: */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_ndarray); __Pyx_GIVEREF(__pyx_n_s_ndarray); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ndarray); __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpypy_multiarray, __pyx_t_3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyType_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 68, __pyx_L3_error) __Pyx_INCREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI_numpy_array)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_numpy_array, ((PyTypeObject*)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/asbuffer.pxi":69 * try: * from _numpypy.multiarray import ndarray as numpy_array * pypy_have_numpy = 1 # <<<<<<<<<<<<<< * except ImportError: * try: */ __pyx_v_6mpi4py_3MPI_pypy_have_numpy = 1; /* "mpi4py/MPI/asbuffer.pxi":67 * if PYPY: * from array import array as array_array * try: # <<<<<<<<<<<<<< * from _numpypy.multiarray import ndarray as numpy_array * pypy_have_numpy = 1 */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/asbuffer.pxi":70 * from _numpypy.multiarray import ndarray as numpy_array * pypy_have_numpy = 1 * except ImportError: # <<<<<<<<<<<<<< * try: * from numpypy import ndarray as numpy_array */ __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_2) { __Pyx_AddTraceback("mpi4py.MPI", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(0, 70, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_9); /* "mpi4py/MPI/asbuffer.pxi":71 * pypy_have_numpy = 1 * except ImportError: * try: # <<<<<<<<<<<<<< * from numpypy import ndarray as numpy_array * pypy_have_numpy = 1 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { /* "mpi4py/MPI/asbuffer.pxi":72 * except ImportError: * try: * from numpypy import ndarray as numpy_array # <<<<<<<<<<<<<< * pypy_have_numpy = 1 * except ImportError: */ __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 72, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_n_s_ndarray); __Pyx_GIVEREF(__pyx_n_s_ndarray); PyList_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_ndarray); __pyx_t_14 = __Pyx_Import(__pyx_n_s_numpypy, __pyx_t_13, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 72, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_ImportFrom(__pyx_t_14, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 72, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_13); if (!(likely(PyType_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_13)->tp_name), 0))) __PYX_ERR(0, 72, __pyx_L11_error) __Pyx_INCREF(__pyx_t_13); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI_numpy_array)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_numpy_array, ((PyTypeObject*)__pyx_t_13)); __Pyx_GIVEREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "mpi4py/MPI/asbuffer.pxi":73 * try: * from numpypy import ndarray as numpy_array * pypy_have_numpy = 1 # <<<<<<<<<<<<<< * except ImportError: * try: */ __pyx_v_6mpi4py_3MPI_pypy_have_numpy = 1; /* "mpi4py/MPI/asbuffer.pxi":71 * pypy_have_numpy = 1 * except ImportError: * try: # <<<<<<<<<<<<<< * from numpypy import ndarray as numpy_array * pypy_have_numpy = 1 */ } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L18_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; /* "mpi4py/MPI/asbuffer.pxi":74 * from numpypy import ndarray as numpy_array * pypy_have_numpy = 1 * except ImportError: # <<<<<<<<<<<<<< * try: * from numpy import ndarray as numpy_array */ __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_2) { __Pyx_AddTraceback("mpi4py.MPI", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_16) < 0) __PYX_ERR(0, 74, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_16); /* "mpi4py/MPI/asbuffer.pxi":75 * pypy_have_numpy = 1 * except ImportError: * try: # <<<<<<<<<<<<<< * from numpy import ndarray as numpy_array * pypy_have_numpy = 1 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); /*try:*/ { /* "mpi4py/MPI/asbuffer.pxi":76 * except ImportError: * try: * from numpy import ndarray as numpy_array # <<<<<<<<<<<<<< * pypy_have_numpy = 1 * except ImportError: */ __pyx_t_20 = PyList_New(1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 76, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_20); __Pyx_INCREF(__pyx_n_s_ndarray); __Pyx_GIVEREF(__pyx_n_s_ndarray); PyList_SET_ITEM(__pyx_t_20, 0, __pyx_n_s_ndarray); __pyx_t_21 = __Pyx_Import(__pyx_n_s_numpy, __pyx_t_20, 0); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 76, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = __Pyx_ImportFrom(__pyx_t_21, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 76, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_20); if (!(likely(PyType_CheckExact(__pyx_t_20))||((__pyx_t_20) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_20)->tp_name), 0))) __PYX_ERR(0, 76, __pyx_L21_error) __Pyx_INCREF(__pyx_t_20); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI_numpy_array)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_numpy_array, ((PyTypeObject*)__pyx_t_20)); __Pyx_GIVEREF(__pyx_t_20); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; /* "mpi4py/MPI/asbuffer.pxi":77 * try: * from numpy import ndarray as numpy_array * pypy_have_numpy = 1 # <<<<<<<<<<<<<< * except ImportError: * pass */ __pyx_v_6mpi4py_3MPI_pypy_have_numpy = 1; /* "mpi4py/MPI/asbuffer.pxi":75 * pypy_have_numpy = 1 * except ImportError: * try: # <<<<<<<<<<<<<< * from numpy import ndarray as numpy_array * pypy_have_numpy = 1 */ } __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; goto __pyx_L28_try_end; __pyx_L21_error:; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; /* "mpi4py/MPI/asbuffer.pxi":78 * from numpy import ndarray as numpy_array * pypy_have_numpy = 1 * except ImportError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_2) { __Pyx_ErrRestore(0,0,0); goto __pyx_L22_exception_handled; } goto __pyx_L23_except_error; __pyx_L23_except_error:; /* "mpi4py/MPI/asbuffer.pxi":75 * pypy_have_numpy = 1 * except ImportError: * try: # <<<<<<<<<<<<<< * from numpy import ndarray as numpy_array * pypy_have_numpy = 1 */ __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); goto __pyx_L13_except_error; __pyx_L22_exception_handled:; __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19); __pyx_L28_try_end:; } __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L12_exception_handled; } goto __pyx_L13_except_error; __pyx_L13_except_error:; /* "mpi4py/MPI/asbuffer.pxi":71 * pypy_have_numpy = 1 * except ImportError: * try: # <<<<<<<<<<<<<< * from numpypy import ndarray as numpy_array * pypy_have_numpy = 1 */ __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); goto __pyx_L5_except_error; __pyx_L12_exception_handled:; __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); __pyx_L18_try_end:; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "mpi4py/MPI/asbuffer.pxi":67 * if PYPY: * from array import array as array_array * try: # <<<<<<<<<<<<<< * from _numpypy.multiarray import ndarray as numpy_array * pypy_have_numpy = 1 */ __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L8_try_end:; } /* "mpi4py/MPI/asbuffer.pxi":65 * cdef type numpy_array * cdef int pypy_have_numpy = 0 * if PYPY: # <<<<<<<<<<<<<< * from array import array as array_array * try: */ } /* "mpi4py/MPI/asbuffer.pxi":159 * * @staticmethod * def frombuffer(obj, bint readonly=False): # <<<<<<<<<<<<<< * """Memory from buffer-like object""" * cdef int flags = PyBUF_SIMPLE */ __pyx_t_9 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_6memory_5frombuffer, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_memory->tp_dict, __pyx_n_s_frombuffer, __pyx_t_9) < 0) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_memory); /* "mpi4py/MPI/asbuffer.pxi":158 * PyBuffer_Release(&self.view) * * @staticmethod # <<<<<<<<<<<<<< * def frombuffer(obj, bint readonly=False): * """Memory from buffer-like object""" */ __Pyx_GetNameInClass(__pyx_t_9, (PyObject *)__pyx_ptype_6mpi4py_3MPI_memory, __pyx_n_s_frombuffer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_memory->tp_dict, __pyx_n_s_frombuffer, __pyx_t_3) < 0) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_memory); /* "mpi4py/MPI/asbuffer.pxi":169 * * @staticmethod * def fromaddress(address, nbytes, bint readonly=False): # <<<<<<<<<<<<<< * """Memory from address and size in bytes""" * cdef void *buf = PyLong_AsVoidPtr(address) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_6memory_7fromaddress, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_memory->tp_dict, __pyx_n_s_fromaddress, __pyx_t_3) < 0) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_memory); /* "mpi4py/MPI/asbuffer.pxi":168 * return mem * * @staticmethod # <<<<<<<<<<<<<< * def fromaddress(address, nbytes, bint readonly=False): * """Memory from address and size in bytes""" */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_memory, __pyx_n_s_fromaddress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_memory->tp_dict, __pyx_n_s_fromaddress, __pyx_t_9) < 0) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_memory); /* "mpi4py/MPI/reqimpl.pxi":4 * * cdef MPI_Status empty_status * empty_status.MPI_SOURCE = MPI_ANY_SOURCE # <<<<<<<<<<<<<< * empty_status.MPI_TAG = MPI_ANY_TAG * empty_status.MPI_ERROR = MPI_SUCCESS */ __pyx_v_6mpi4py_3MPI_empty_status.MPI_SOURCE = MPI_ANY_SOURCE; /* "mpi4py/MPI/reqimpl.pxi":5 * cdef MPI_Status empty_status * empty_status.MPI_SOURCE = MPI_ANY_SOURCE * empty_status.MPI_TAG = MPI_ANY_TAG # <<<<<<<<<<<<<< * empty_status.MPI_ERROR = MPI_SUCCESS * */ __pyx_v_6mpi4py_3MPI_empty_status.MPI_TAG = MPI_ANY_TAG; /* "mpi4py/MPI/reqimpl.pxi":6 * empty_status.MPI_SOURCE = MPI_ANY_SOURCE * empty_status.MPI_TAG = MPI_ANY_TAG * empty_status.MPI_ERROR = MPI_SUCCESS # <<<<<<<<<<<<<< * * cdef object acquire_rs(object requests, */ __pyx_v_6mpi4py_3MPI_empty_status.MPI_ERROR = MPI_SUCCESS; /* "mpi4py/MPI/opimpl.pxi":87 * # ----------------------------------------------------------------------------- * * cdef list op_user_registry = [None]*(1+32) # <<<<<<<<<<<<<< * * cdef inline object op_user_py(int index, object x, object y, object dt): */ __pyx_t_9 = PyList_New(1 * 33); if (unlikely(!__pyx_t_9)) __PYX_ERR(14, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < 33; __pyx_temp++) { __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_9, __pyx_temp, Py_None); } } __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_op_user_registry); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_op_user_registry, ((PyObject*)__pyx_t_9)); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/commimpl.pxi":3 * # ----------------------------------------------------------------------------- * * cdef memory _buffer = None # <<<<<<<<<<<<<< * * cdef inline int attach_buffer(ob, void **p, int *n) except -1: */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI__buffer)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI__buffer, ((struct __pyx_obj_6mpi4py_3MPI_memory *)Py_None)); __Pyx_GIVEREF(Py_None); /* "mpi4py/MPI/commimpl.pxi":30 * # ----------------------------------------------------------------------------- * * cdef object __UNWEIGHTED__ = MPI_UNWEIGHTED # <<<<<<<<<<<<<< * * cdef object __WEIGHTS_EMPTY__ = MPI_WEIGHTS_EMPTY */ __pyx_t_9 = __Pyx_PyInt_From_MPI_Aint(((MPI_Aint)MPI_UNWEIGHTED)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI___UNWEIGHTED__); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UNWEIGHTED__, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/commimpl.pxi":32 * cdef object __UNWEIGHTED__ = MPI_UNWEIGHTED * * cdef object __WEIGHTS_EMPTY__ = MPI_WEIGHTS_EMPTY # <<<<<<<<<<<<<< * * cdef object asarray_weights(object weights, int nweight, int **iweight): */ __pyx_t_9 = __Pyx_PyInt_From_MPI_Aint(((MPI_Aint)MPI_WEIGHTS_EMPTY)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI___WEIGHTS_EMPTY__); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___WEIGHTS_EMPTY__, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/commimpl.pxi":77 * # ----------------------------------------------------------------------------- * * cdef object allocate_lock = None # <<<<<<<<<<<<<< * if PY3: * try: */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_allocate_lock); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_allocate_lock, Py_None); __Pyx_GIVEREF(Py_None); /* "mpi4py/MPI/commimpl.pxi":78 * * cdef object allocate_lock = None * if PY3: # <<<<<<<<<<<<<< * try: * from _thread import allocate_lock */ if ((PY_MAJOR_VERSION>=3)) { /* "mpi4py/MPI/commimpl.pxi":79 * cdef object allocate_lock = None * if PY3: * try: # <<<<<<<<<<<<<< * from _thread import allocate_lock * except ImportError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "mpi4py/MPI/commimpl.pxi":80 * if PY3: * try: * from _thread import allocate_lock # <<<<<<<<<<<<<< * except ImportError: * from _dummy_thread import allocate_lock */ __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 80, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_n_s_allocate_lock); __Pyx_GIVEREF(__pyx_n_s_allocate_lock); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_allocate_lock); __pyx_t_3 = __Pyx_Import(__pyx_n_s_thread, __pyx_t_9, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 80, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_allocate_lock); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 80, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_allocate_lock); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_allocate_lock, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/commimpl.pxi":79 * cdef object allocate_lock = None * if PY3: * try: # <<<<<<<<<<<<<< * from _thread import allocate_lock * except ImportError: */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L35_try_end; __pyx_L30_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/commimpl.pxi":81 * try: * from _thread import allocate_lock * except ImportError: # <<<<<<<<<<<<<< * from _dummy_thread import allocate_lock * else: */ __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_2) { __Pyx_AddTraceback("mpi4py.MPI", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(3, 81, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/commimpl.pxi":82 * from _thread import allocate_lock * except ImportError: * from _dummy_thread import allocate_lock # <<<<<<<<<<<<<< * else: * try: */ __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 82, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_n_s_allocate_lock); __Pyx_GIVEREF(__pyx_n_s_allocate_lock); PyList_SET_ITEM(__pyx_t_16, 0, __pyx_n_s_allocate_lock); __pyx_t_13 = __Pyx_Import(__pyx_n_s_dummy_thread, __pyx_t_16, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 82, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_ImportFrom(__pyx_t_13, __pyx_n_s_allocate_lock); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 82, __pyx_L32_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_allocate_lock); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_allocate_lock, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L31_exception_handled; } goto __pyx_L32_except_error; __pyx_L32_except_error:; /* "mpi4py/MPI/commimpl.pxi":79 * cdef object allocate_lock = None * if PY3: * try: # <<<<<<<<<<<<<< * from _thread import allocate_lock * except ImportError: */ __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); goto __pyx_L1_error; __pyx_L31_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); __pyx_L35_try_end:; } /* "mpi4py/MPI/commimpl.pxi":78 * * cdef object allocate_lock = None * if PY3: # <<<<<<<<<<<<<< * try: * from _thread import allocate_lock */ goto __pyx_L29; } /* "mpi4py/MPI/commimpl.pxi":84 * from _dummy_thread import allocate_lock * else: * try: # <<<<<<<<<<<<<< * from thread import allocate_lock * except ImportError: */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "mpi4py/MPI/commimpl.pxi":85 * else: * try: * from thread import allocate_lock # <<<<<<<<<<<<<< * except ImportError: * from dummy_thread import allocate_lock */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 85, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_allocate_lock); __Pyx_GIVEREF(__pyx_n_s_allocate_lock); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_allocate_lock); __pyx_t_9 = __Pyx_Import(__pyx_n_s_thread_2, __pyx_t_1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 85, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_allocate_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 85, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_allocate_lock); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_allocate_lock, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/commimpl.pxi":84 * from _dummy_thread import allocate_lock * else: * try: # <<<<<<<<<<<<<< * from thread import allocate_lock * except ImportError: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L43_try_end; __pyx_L38_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/commimpl.pxi":86 * try: * from thread import allocate_lock * except ImportError: # <<<<<<<<<<<<<< * from dummy_thread import allocate_lock * */ __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_2) { __Pyx_AddTraceback("mpi4py.MPI", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(3, 86, __pyx_L40_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/commimpl.pxi":87 * from thread import allocate_lock * except ImportError: * from dummy_thread import allocate_lock # <<<<<<<<<<<<<< * * cdef int lock_keyval = MPI_KEYVAL_INVALID */ __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 87, __pyx_L40_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_n_s_allocate_lock); __Pyx_GIVEREF(__pyx_n_s_allocate_lock); PyList_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_allocate_lock); __pyx_t_16 = __Pyx_Import(__pyx_n_s_dummy_thread_2, __pyx_t_13, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 87, __pyx_L40_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_ImportFrom(__pyx_t_16, __pyx_n_s_allocate_lock); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 87, __pyx_L40_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_allocate_lock); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_allocate_lock, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L39_exception_handled; } goto __pyx_L40_except_error; __pyx_L40_except_error:; /* "mpi4py/MPI/commimpl.pxi":84 * from _dummy_thread import allocate_lock * else: * try: # <<<<<<<<<<<<<< * from thread import allocate_lock * except ImportError: */ __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L39_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L43_try_end:; } } __pyx_L29:; /* "mpi4py/MPI/commimpl.pxi":89 * from dummy_thread import allocate_lock * * cdef int lock_keyval = MPI_KEYVAL_INVALID # <<<<<<<<<<<<<< * cdef dict lock_registry = {} * */ __pyx_v_6mpi4py_3MPI_lock_keyval = MPI_KEYVAL_INVALID; /* "mpi4py/MPI/commimpl.pxi":90 * * cdef int lock_keyval = MPI_KEYVAL_INVALID * cdef dict lock_registry = {} # <<<<<<<<<<<<<< * * cdef inline int lock_free_cb(MPI_Comm comm) \ */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_lock_registry); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_lock_registry, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/commimpl.pxi":136 * return lock * * def _lock_table(Comm comm): # <<<<<<<<<<<<<< * "Internal communicator lock table" * return PyMPI_Lock_table(comm.ob_mpi) */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_3_lock_table, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_lock_table, __pyx_t_3) < 0) __PYX_ERR(3, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/drepimpl.pxi":3 * # ----------------------------------------------------------------------------- * * cdef dict datarep_registry = {} # <<<<<<<<<<<<<< * * @cython.final */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(16, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_datarep_registry); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_datarep_registry, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/attrimpl.pxi":17 * self.nopython = nopython * * cdef dict type_keyval = {} # <<<<<<<<<<<<<< * cdef dict comm_keyval = {} * cdef dict win_keyval = {} */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_type_keyval); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_type_keyval, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/attrimpl.pxi":18 * * cdef dict type_keyval = {} * cdef dict comm_keyval = {} # <<<<<<<<<<<<<< * cdef dict win_keyval = {} * */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_comm_keyval); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_comm_keyval, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/attrimpl.pxi":19 * cdef dict type_keyval = {} * cdef dict comm_keyval = {} * cdef dict win_keyval = {} # <<<<<<<<<<<<<< * * _keyval_registry = { */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_win_keyval); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_win_keyval, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/attrimpl.pxi":22 * * _keyval_registry = { * 'Datatype' : type_keyval, # <<<<<<<<<<<<<< * 'Comm' : comm_keyval, * 'Win' : win_keyval, */ __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_Datatype, __pyx_v_6mpi4py_3MPI_type_keyval) < 0) __PYX_ERR(4, 22, __pyx_L1_error) /* "mpi4py/MPI/attrimpl.pxi":23 * _keyval_registry = { * 'Datatype' : type_keyval, * 'Comm' : comm_keyval, # <<<<<<<<<<<<<< * 'Win' : win_keyval, * } */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_Comm, __pyx_v_6mpi4py_3MPI_comm_keyval) < 0) __PYX_ERR(4, 22, __pyx_L1_error) /* "mpi4py/MPI/attrimpl.pxi":24 * 'Datatype' : type_keyval, * 'Comm' : comm_keyval, * 'Win' : win_keyval, # <<<<<<<<<<<<<< * } * */ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_Win, __pyx_v_6mpi4py_3MPI_win_keyval) < 0) __PYX_ERR(4, 22, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_keyval_registry, __pyx_t_3) < 0) __PYX_ERR(4, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":56 * #------------------------------------------------------------------------------ * * cdef object __BOTTOM__ = MPI_BOTTOM # <<<<<<<<<<<<<< * * cdef object __IN_PLACE__ = MPI_IN_PLACE */ __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint(((MPI_Aint)MPI_BOTTOM)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI___BOTTOM__); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___BOTTOM__, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgbuffer.pxi":58 * cdef object __BOTTOM__ = MPI_BOTTOM * * cdef object __IN_PLACE__ = MPI_IN_PLACE # <<<<<<<<<<<<<< * * #------------------------------------------------------------------------------ */ __pyx_t_3 = __Pyx_PyInt_From_MPI_Aint(((MPI_Aint)MPI_IN_PLACE)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI___IN_PLACE__); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___IN_PLACE__, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":12 * # ----------------------------------------------------------------------------- * * cdef object PyPickle_dumps = None # <<<<<<<<<<<<<< * cdef object PyPickle_loads = None * cdef object PyPickle_PROTOCOL = None */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_dumps); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_dumps, Py_None); __Pyx_GIVEREF(Py_None); /* "mpi4py/MPI/msgpickle.pxi":13 * * cdef object PyPickle_dumps = None * cdef object PyPickle_loads = None # <<<<<<<<<<<<<< * cdef object PyPickle_PROTOCOL = None * if PY3: */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_loads); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_loads, Py_None); __Pyx_GIVEREF(Py_None); /* "mpi4py/MPI/msgpickle.pxi":14 * cdef object PyPickle_dumps = None * cdef object PyPickle_loads = None * cdef object PyPickle_PROTOCOL = None # <<<<<<<<<<<<<< * if PY3: * from pickle import dumps as PyPickle_dumps */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL, Py_None); __Pyx_GIVEREF(Py_None); /* "mpi4py/MPI/msgpickle.pxi":15 * cdef object PyPickle_loads = None * cdef object PyPickle_PROTOCOL = None * if PY3: # <<<<<<<<<<<<<< * from pickle import dumps as PyPickle_dumps * from pickle import loads as PyPickle_loads */ if ((PY_MAJOR_VERSION>=3)) { /* "mpi4py/MPI/msgpickle.pxi":16 * cdef object PyPickle_PROTOCOL = None * if PY3: * from pickle import dumps as PyPickle_dumps # <<<<<<<<<<<<<< * from pickle import loads as PyPickle_loads * from pickle import DEFAULT_PROTOCOL as PyPickle_PROTOCOL */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_dumps); __Pyx_GIVEREF(__pyx_n_s_dumps); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_dumps); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_dumps); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_dumps, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":17 * if PY3: * from pickle import dumps as PyPickle_dumps * from pickle import loads as PyPickle_loads # <<<<<<<<<<<<<< * from pickle import DEFAULT_PROTOCOL as PyPickle_PROTOCOL * else: */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_loads); __Pyx_GIVEREF(__pyx_n_s_loads); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_loads); __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_loads); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_loads); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_loads, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":18 * from pickle import dumps as PyPickle_dumps * from pickle import loads as PyPickle_loads * from pickle import DEFAULT_PROTOCOL as PyPickle_PROTOCOL # <<<<<<<<<<<<<< * else: * try: */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_DEFAULT_PROTOCOL); __Pyx_GIVEREF(__pyx_n_s_DEFAULT_PROTOCOL); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_DEFAULT_PROTOCOL); __pyx_t_1 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DEFAULT_PROTOCOL); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":15 * cdef object PyPickle_loads = None * cdef object PyPickle_PROTOCOL = None * if PY3: # <<<<<<<<<<<<<< * from pickle import dumps as PyPickle_dumps * from pickle import loads as PyPickle_loads */ goto __pyx_L46; } /* "mpi4py/MPI/msgpickle.pxi":20 * from pickle import DEFAULT_PROTOCOL as PyPickle_PROTOCOL * else: * try: # <<<<<<<<<<<<<< * from cPickle import dumps as PyPickle_dumps * from cPickle import loads as PyPickle_loads */ /*else*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":21 * else: * try: * from cPickle import dumps as PyPickle_dumps # <<<<<<<<<<<<<< * from cPickle import loads as PyPickle_loads * from cPickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 21, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_dumps); __Pyx_GIVEREF(__pyx_n_s_dumps); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_dumps); __pyx_t_3 = __Pyx_Import(__pyx_n_s_cPickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 21, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_dumps); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 21, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_dumps); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_dumps, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":22 * try: * from cPickle import dumps as PyPickle_dumps * from cPickle import loads as PyPickle_loads # <<<<<<<<<<<<<< * from cPickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL * except ImportError: */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 22, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_loads); __Pyx_GIVEREF(__pyx_n_s_loads); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_loads); __pyx_t_1 = __Pyx_Import(__pyx_n_s_cPickle, __pyx_t_3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 22, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 22, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_loads); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_loads, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":23 * from cPickle import dumps as PyPickle_dumps * from cPickle import loads as PyPickle_loads * from cPickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL # <<<<<<<<<<<<<< * except ImportError: * from pickle import dumps as PyPickle_dumps */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 23, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_HIGHEST_PROTOCOL); __Pyx_GIVEREF(__pyx_n_s_HIGHEST_PROTOCOL); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_HIGHEST_PROTOCOL); __pyx_t_3 = __Pyx_Import(__pyx_n_s_cPickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 23, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_HIGHEST_PROTOCOL); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 23, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/msgpickle.pxi":20 * from pickle import DEFAULT_PROTOCOL as PyPickle_PROTOCOL * else: * try: # <<<<<<<<<<<<<< * from cPickle import dumps as PyPickle_dumps * from cPickle import loads as PyPickle_loads */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L52_try_end; __pyx_L47_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgpickle.pxi":24 * from cPickle import loads as PyPickle_loads * from cPickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL * except ImportError: # <<<<<<<<<<<<<< * from pickle import dumps as PyPickle_dumps * from pickle import loads as PyPickle_loads */ __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_2) { __Pyx_AddTraceback("mpi4py.MPI", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_9) < 0) __PYX_ERR(6, 24, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_9); /* "mpi4py/MPI/msgpickle.pxi":25 * from cPickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL * except ImportError: * from pickle import dumps as PyPickle_dumps # <<<<<<<<<<<<<< * from pickle import loads as PyPickle_loads * from pickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL */ __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 25, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_n_s_dumps); __Pyx_GIVEREF(__pyx_n_s_dumps); PyList_SET_ITEM(__pyx_t_16, 0, __pyx_n_s_dumps); __pyx_t_13 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_16, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 25, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_ImportFrom(__pyx_t_13, __pyx_n_s_dumps); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 25, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_dumps); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_dumps, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "mpi4py/MPI/msgpickle.pxi":26 * except ImportError: * from pickle import dumps as PyPickle_dumps * from pickle import loads as PyPickle_loads # <<<<<<<<<<<<<< * from pickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL * */ __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 26, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_n_s_loads); __Pyx_GIVEREF(__pyx_n_s_loads); PyList_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_loads); __pyx_t_16 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_13, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 26, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_ImportFrom(__pyx_t_16, __pyx_n_s_loads); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 26, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_loads); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_loads, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "mpi4py/MPI/msgpickle.pxi":27 * from pickle import dumps as PyPickle_dumps * from pickle import loads as PyPickle_loads * from pickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL # <<<<<<<<<<<<<< * * cdef object PyBytesIO_New = None */ __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 27, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_n_s_HIGHEST_PROTOCOL); __Pyx_GIVEREF(__pyx_n_s_HIGHEST_PROTOCOL); PyList_SET_ITEM(__pyx_t_16, 0, __pyx_n_s_HIGHEST_PROTOCOL); __pyx_t_13 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_16, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 27, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_ImportFrom(__pyx_t_13, __pyx_n_s_HIGHEST_PROTOCOL); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 27, __pyx_L49_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_PROTOCOL, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L48_exception_handled; } goto __pyx_L49_except_error; __pyx_L49_except_error:; /* "mpi4py/MPI/msgpickle.pxi":20 * from pickle import DEFAULT_PROTOCOL as PyPickle_PROTOCOL * else: * try: # <<<<<<<<<<<<<< * from cPickle import dumps as PyPickle_dumps * from cPickle import loads as PyPickle_loads */ __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); goto __pyx_L1_error; __pyx_L48_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); __pyx_L52_try_end:; } } __pyx_L46:; /* "mpi4py/MPI/msgpickle.pxi":29 * from pickle import HIGHEST_PROTOCOL as PyPickle_PROTOCOL * * cdef object PyBytesIO_New = None # <<<<<<<<<<<<<< * cdef object PyPickle_loadf = None * if PY2: */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyBytesIO_New); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyBytesIO_New, Py_None); __Pyx_GIVEREF(Py_None); /* "mpi4py/MPI/msgpickle.pxi":30 * * cdef object PyBytesIO_New = None * cdef object PyPickle_loadf = None # <<<<<<<<<<<<<< * if PY2: * try: */ __Pyx_INCREF(Py_None); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_loadf); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_loadf, Py_None); __Pyx_GIVEREF(Py_None); /* "mpi4py/MPI/msgpickle.pxi":31 * cdef object PyBytesIO_New = None * cdef object PyPickle_loadf = None * if PY2: # <<<<<<<<<<<<<< * try: * from cStringIO import StringIO as PyBytesIO_New */ if ((PY_MAJOR_VERSION==2)) { /* "mpi4py/MPI/msgpickle.pxi":32 * cdef object PyPickle_loadf = None * if PY2: * try: # <<<<<<<<<<<<<< * from cStringIO import StringIO as PyBytesIO_New * except ImportError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":33 * if PY2: * try: * from cStringIO import StringIO as PyBytesIO_New # <<<<<<<<<<<<<< * except ImportError: * from io import BytesIO as PyBytesIO_New */ __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 33, __pyx_L56_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_n_s_StringIO); __Pyx_GIVEREF(__pyx_n_s_StringIO); PyList_SET_ITEM(__pyx_t_9, 0, __pyx_n_s_StringIO); __pyx_t_1 = __Pyx_Import(__pyx_n_s_cStringIO, __pyx_t_9, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 33, __pyx_L56_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 33, __pyx_L56_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyBytesIO_New); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyBytesIO_New, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":32 * cdef object PyPickle_loadf = None * if PY2: * try: # <<<<<<<<<<<<<< * from cStringIO import StringIO as PyBytesIO_New * except ImportError: */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L61_try_end; __pyx_L56_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgpickle.pxi":34 * try: * from cStringIO import StringIO as PyBytesIO_New * except ImportError: # <<<<<<<<<<<<<< * from io import BytesIO as PyBytesIO_New * try: */ __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_2) { __Pyx_AddTraceback("mpi4py.MPI", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(6, 34, __pyx_L58_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/msgpickle.pxi":35 * from cStringIO import StringIO as PyBytesIO_New * except ImportError: * from io import BytesIO as PyBytesIO_New # <<<<<<<<<<<<<< * try: * from cPickle import load as PyPickle_loadf */ __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 35, __pyx_L58_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_n_s_BytesIO); __Pyx_GIVEREF(__pyx_n_s_BytesIO); PyList_SET_ITEM(__pyx_t_13, 0, __pyx_n_s_BytesIO); __pyx_t_16 = __Pyx_Import(__pyx_n_s_io, __pyx_t_13, 0); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 35, __pyx_L58_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_ImportFrom(__pyx_t_16, __pyx_n_s_BytesIO); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 35, __pyx_L58_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyBytesIO_New); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyBytesIO_New, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L57_exception_handled; } goto __pyx_L58_except_error; __pyx_L58_except_error:; /* "mpi4py/MPI/msgpickle.pxi":32 * cdef object PyPickle_loadf = None * if PY2: * try: # <<<<<<<<<<<<<< * from cStringIO import StringIO as PyBytesIO_New * except ImportError: */ __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); goto __pyx_L1_error; __pyx_L57_exception_handled:; __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); __pyx_L61_try_end:; } /* "mpi4py/MPI/msgpickle.pxi":36 * except ImportError: * from io import BytesIO as PyBytesIO_New * try: # <<<<<<<<<<<<<< * from cPickle import load as PyPickle_loadf * except ImportError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "mpi4py/MPI/msgpickle.pxi":37 * from io import BytesIO as PyBytesIO_New * try: * from cPickle import load as PyPickle_loadf # <<<<<<<<<<<<<< * except ImportError: * from pickle import load as PyPickle_loadf */ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 37, __pyx_L64_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_load); __Pyx_GIVEREF(__pyx_n_s_load); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_load); __pyx_t_9 = __Pyx_Import(__pyx_n_s_cPickle, __pyx_t_3, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(6, 37, __pyx_L64_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_9, __pyx_n_s_load); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 37, __pyx_L64_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_loadf); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_loadf, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgpickle.pxi":36 * except ImportError: * from io import BytesIO as PyBytesIO_New * try: # <<<<<<<<<<<<<< * from cPickle import load as PyPickle_loadf * except ImportError: */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L69_try_end; __pyx_L64_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/msgpickle.pxi":38 * try: * from cPickle import load as PyPickle_loadf * except ImportError: # <<<<<<<<<<<<<< * from pickle import load as PyPickle_loadf * */ __pyx_t_2 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_2) { __Pyx_AddTraceback("mpi4py.MPI", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(6, 38, __pyx_L66_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/msgpickle.pxi":39 * from cPickle import load as PyPickle_loadf * except ImportError: * from pickle import load as PyPickle_loadf # <<<<<<<<<<<<<< * * */ __pyx_t_16 = PyList_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 39, __pyx_L66_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_n_s_load); __Pyx_GIVEREF(__pyx_n_s_load); PyList_SET_ITEM(__pyx_t_16, 0, __pyx_n_s_load); __pyx_t_13 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_16, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(6, 39, __pyx_L66_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_ImportFrom(__pyx_t_13, __pyx_n_s_load); if (unlikely(!__pyx_t_16)) __PYX_ERR(6, 39, __pyx_L66_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_PyPickle_loadf); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyPickle_loadf, __pyx_t_16); __Pyx_GIVEREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L65_exception_handled; } goto __pyx_L66_except_error; __pyx_L66_except_error:; /* "mpi4py/MPI/msgpickle.pxi":36 * except ImportError: * from io import BytesIO as PyBytesIO_New * try: # <<<<<<<<<<<<<< * from cPickle import load as PyPickle_loadf * except ImportError: */ __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); goto __pyx_L1_error; __pyx_L65_exception_handled:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); __pyx_L69_try_end:; } /* "mpi4py/MPI/msgpickle.pxi":31 * cdef object PyBytesIO_New = None * cdef object PyPickle_loadf = None * if PY2: # <<<<<<<<<<<<<< * try: * from cStringIO import StringIO as PyBytesIO_New */ } /* "mpi4py/MPI/msgpickle.pxi":151 * * * cdef Pickle PyMPI_PICKLE = Pickle() # <<<<<<<<<<<<<< * pickle = PyMPI_PICKLE * */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6mpi4py_3MPI_Pickle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE, ((struct __pyx_obj_6mpi4py_3MPI_Pickle *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/msgpickle.pxi":152 * * cdef Pickle PyMPI_PICKLE = Pickle() * pickle = PyMPI_PICKLE # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pickle, ((PyObject *)__pyx_v_6mpi4py_3MPI_PyMPI_PICKLE)) < 0) __PYX_ERR(6, 152, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":28 * # ------------------ * * UNDEFINED = MPI_UNDEFINED # <<<<<<<<<<<<<< * #: Undefined integer value * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_UNDEFINED); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNDEFINED, __pyx_t_1) < 0) __PYX_ERR(8, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":31 * #: Undefined integer value * * ANY_SOURCE = MPI_ANY_SOURCE # <<<<<<<<<<<<<< * #: Wildcard source value for receives * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ANY_SOURCE, __pyx_t_1) < 0) __PYX_ERR(8, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":34 * #: Wildcard source value for receives * * ANY_TAG = MPI_ANY_TAG # <<<<<<<<<<<<<< * #: Wildcard tag value for receives * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ANY_TAG, __pyx_t_1) < 0) __PYX_ERR(8, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":37 * #: Wildcard tag value for receives * * PROC_NULL = MPI_PROC_NULL # <<<<<<<<<<<<<< * #: Special process rank for send/receive * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_PROC_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_PROC_NULL, __pyx_t_1) < 0) __PYX_ERR(8, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":40 * #: Special process rank for send/receive * * ROOT = MPI_ROOT # <<<<<<<<<<<<<< * #: Root process for collective inter-communications * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ROOT); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ROOT, __pyx_t_1) < 0) __PYX_ERR(8, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":43 * #: Root process for collective inter-communications * * BOTTOM = __BOTTOM__ # <<<<<<<<<<<<<< * #: Special address for buffers * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_BOTTOM, __pyx_v_6mpi4py_3MPI___BOTTOM__) < 0) __PYX_ERR(8, 43, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":46 * #: Special address for buffers * * IN_PLACE = __IN_PLACE__ # <<<<<<<<<<<<<< * #: *In-place* option for collective communications * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_IN_PLACE, __pyx_v_6mpi4py_3MPI___IN_PLACE__) < 0) __PYX_ERR(8, 46, __pyx_L1_error) /* "mpi4py/MPI/MPI.pyx":53 * # ---------------------------- * * KEYVAL_INVALID = MPI_KEYVAL_INVALID # <<<<<<<<<<<<<< * * TAG_UB = MPI_TAG_UB */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_KEYVAL_INVALID); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEYVAL_INVALID, __pyx_t_1) < 0) __PYX_ERR(8, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":55 * KEYVAL_INVALID = MPI_KEYVAL_INVALID * * TAG_UB = MPI_TAG_UB # <<<<<<<<<<<<<< * HOST = MPI_HOST * IO = MPI_IO */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_TAG_UB); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_TAG_UB, __pyx_t_1) < 0) __PYX_ERR(8, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":56 * * TAG_UB = MPI_TAG_UB * HOST = MPI_HOST # <<<<<<<<<<<<<< * IO = MPI_IO * WTIME_IS_GLOBAL = MPI_WTIME_IS_GLOBAL */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_HOST); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_HOST, __pyx_t_1) < 0) __PYX_ERR(8, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":57 * TAG_UB = MPI_TAG_UB * HOST = MPI_HOST * IO = MPI_IO # <<<<<<<<<<<<<< * WTIME_IS_GLOBAL = MPI_WTIME_IS_GLOBAL * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_IO); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_IO, __pyx_t_1) < 0) __PYX_ERR(8, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":58 * HOST = MPI_HOST * IO = MPI_IO * WTIME_IS_GLOBAL = MPI_WTIME_IS_GLOBAL # <<<<<<<<<<<<<< * * UNIVERSE_SIZE = MPI_UNIVERSE_SIZE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WTIME_IS_GLOBAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WTIME_IS_GLOBAL, __pyx_t_1) < 0) __PYX_ERR(8, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":60 * WTIME_IS_GLOBAL = MPI_WTIME_IS_GLOBAL * * UNIVERSE_SIZE = MPI_UNIVERSE_SIZE # <<<<<<<<<<<<<< * APPNUM = MPI_APPNUM * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_UNIVERSE_SIZE); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNIVERSE_SIZE, __pyx_t_1) < 0) __PYX_ERR(8, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":61 * * UNIVERSE_SIZE = MPI_UNIVERSE_SIZE * APPNUM = MPI_APPNUM # <<<<<<<<<<<<<< * * LASTUSEDCODE = MPI_LASTUSEDCODE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_APPNUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_APPNUM, __pyx_t_1) < 0) __PYX_ERR(8, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":63 * APPNUM = MPI_APPNUM * * LASTUSEDCODE = MPI_LASTUSEDCODE # <<<<<<<<<<<<<< * * WIN_BASE = MPI_WIN_BASE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_LASTUSEDCODE); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LASTUSEDCODE, __pyx_t_1) < 0) __PYX_ERR(8, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":65 * LASTUSEDCODE = MPI_LASTUSEDCODE * * WIN_BASE = MPI_WIN_BASE # <<<<<<<<<<<<<< * WIN_SIZE = MPI_WIN_SIZE * WIN_DISP_UNIT = MPI_WIN_DISP_UNIT */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_BASE); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_BASE, __pyx_t_1) < 0) __PYX_ERR(8, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":66 * * WIN_BASE = MPI_WIN_BASE * WIN_SIZE = MPI_WIN_SIZE # <<<<<<<<<<<<<< * WIN_DISP_UNIT = MPI_WIN_DISP_UNIT * WIN_CREATE_FLAVOR = MPI_WIN_CREATE_FLAVOR */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_SIZE); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_SIZE, __pyx_t_1) < 0) __PYX_ERR(8, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":67 * WIN_BASE = MPI_WIN_BASE * WIN_SIZE = MPI_WIN_SIZE * WIN_DISP_UNIT = MPI_WIN_DISP_UNIT # <<<<<<<<<<<<<< * WIN_CREATE_FLAVOR = MPI_WIN_CREATE_FLAVOR * WIN_FLAVOR = MPI_WIN_CREATE_FLAVOR */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_DISP_UNIT); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_DISP_UNIT, __pyx_t_1) < 0) __PYX_ERR(8, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":68 * WIN_SIZE = MPI_WIN_SIZE * WIN_DISP_UNIT = MPI_WIN_DISP_UNIT * WIN_CREATE_FLAVOR = MPI_WIN_CREATE_FLAVOR # <<<<<<<<<<<<<< * WIN_FLAVOR = MPI_WIN_CREATE_FLAVOR * WIN_MODEL = MPI_WIN_MODEL */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_CREATE_FLAVOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_CREATE_FLAVOR, __pyx_t_1) < 0) __PYX_ERR(8, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":69 * WIN_DISP_UNIT = MPI_WIN_DISP_UNIT * WIN_CREATE_FLAVOR = MPI_WIN_CREATE_FLAVOR * WIN_FLAVOR = MPI_WIN_CREATE_FLAVOR # <<<<<<<<<<<<<< * WIN_MODEL = MPI_WIN_MODEL * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_CREATE_FLAVOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_FLAVOR, __pyx_t_1) < 0) __PYX_ERR(8, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":70 * WIN_CREATE_FLAVOR = MPI_WIN_CREATE_FLAVOR * WIN_FLAVOR = MPI_WIN_CREATE_FLAVOR * WIN_MODEL = MPI_WIN_MODEL # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_MODEL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_MODEL, __pyx_t_1) < 0) __PYX_ERR(8, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/ExceptionP.pyx":1 * class Exception(RuntimeError): # <<<<<<<<<<<<<< * * """ */ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__138); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__138, __pyx_n_s_Exception_2, __pyx_n_s_Exception_2, (PyObject *) NULL, __pyx_n_s_mpi4py_MPI, __pyx_kp_s_Exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/ExceptionP.pyx":7 * """ * * def __init__(self, int ierr=0): # <<<<<<<<<<<<<< * if ierr < MPI_SUCCESS: ierr = MPI_ERR_UNKNOWN * self.ob_mpi = ierr */ __pyx_t_9 = __Pyx_PyInt_From_int(((int)0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_1__init__, 0, __pyx_n_s_Exception___init, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_9, __pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_9) < 0) __PYX_ERR(1, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":12 * RuntimeError.__init__(self, self.ob_mpi) * * def __eq__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr == error) */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_3__eq__, 0, __pyx_n_s_Exception___eq, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_eq, __pyx_t_9) < 0) __PYX_ERR(1, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":16 * return (ierr == error) * * def __ne__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr != error) */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_5__ne__, 0, __pyx_n_s_Exception___ne, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ne, __pyx_t_9) < 0) __PYX_ERR(1, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":20 * return (ierr != error) * * def __lt__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr < error) */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_7__lt__, 0, __pyx_n_s_Exception___lt, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_lt, __pyx_t_9) < 0) __PYX_ERR(1, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":24 * return (ierr < error) * * def __le__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr <= error) */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_9__le__, 0, __pyx_n_s_Exception___le, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_le, __pyx_t_9) < 0) __PYX_ERR(1, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":28 * return (ierr <= error) * * def __gt__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr > error) */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_11__gt__, 0, __pyx_n_s_Exception___gt, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_gt, __pyx_t_9) < 0) __PYX_ERR(1, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":32 * return (ierr > error) * * def __ge__(self, object error): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return (ierr >= error) */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_13__ge__, 0, __pyx_n_s_Exception___ge, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_ge, __pyx_t_9) < 0) __PYX_ERR(1, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":36 * return (ierr >= error) * * def __hash__(self): # <<<<<<<<<<<<<< * return hash(self.ob_mpi) * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_15__hash__, 0, __pyx_n_s_Exception___hash, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_hash, __pyx_t_9) < 0) __PYX_ERR(1, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":39 * return hash(self.ob_mpi) * * def __bool__(self): # <<<<<<<<<<<<<< * cdef int ierr = self.ob_mpi * return ierr != MPI_SUCCESS */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_17__bool__, 0, __pyx_n_s_Exception___bool, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__156)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_bool, __pyx_t_9) < 0) __PYX_ERR(1, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":43 * return ierr != MPI_SUCCESS * * __nonzero__ = __bool__ # <<<<<<<<<<<<<< * * def __int__(self): */ __pyx_t_9 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_bool); if (unlikely(!__pyx_t_9)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_bool); } if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_nonzero, __pyx_t_9) < 0) __PYX_ERR(1, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":45 * __nonzero__ = __bool__ * * def __int__(self): # <<<<<<<<<<<<<< * return self.ob_mpi * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_19__int__, 0, __pyx_n_s_Exception___int, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_int, __pyx_t_9) < 0) __PYX_ERR(1, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":48 * return self.ob_mpi * * def __repr__(self): # <<<<<<<<<<<<<< * return "MPI.Exception(%d)" % self.ob_mpi * */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_21__repr__, 0, __pyx_n_s_Exception___repr, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_repr, __pyx_t_9) < 0) __PYX_ERR(1, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":51 * return "MPI.Exception(%d)" % self.ob_mpi * * def __str__(self): # <<<<<<<<<<<<<< * if not mpi_active(): * return "error code: %d" % self.ob_mpi */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_23__str__, 0, __pyx_n_s_Exception___str, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_str, __pyx_t_9) < 0) __PYX_ERR(1, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":56 * return self.Get_error_string() * * def Get_error_code(self): # <<<<<<<<<<<<<< * """ * Error code */ __pyx_t_9 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_25Get_error_code, 0, __pyx_n_s_Exception_Get_error_code, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_Get_error_code, __pyx_t_9) < 0) __PYX_ERR(1, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":64 * return errorcode * * error_code = property(Get_error_code, doc="error code") # <<<<<<<<<<<<<< * * def Get_error_class(self): */ __pyx_t_9 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_Get_error_code); if (unlikely(!__pyx_t_9)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Get_error_code); } if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_doc_2, __pyx_kp_s_error_code) < 0) __PYX_ERR(1, 64, __pyx_L1_error) __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_13, __pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_error_code_2, __pyx_t_16) < 0) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "mpi4py/MPI/ExceptionP.pyx":66 * error_code = property(Get_error_code, doc="error code") * * def Get_error_class(self): # <<<<<<<<<<<<<< * """ * Error class */ __pyx_t_16 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_27Get_error_class, 0, __pyx_n_s_Exception_Get_error_class, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_Get_error_class, __pyx_t_16) < 0) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; /* "mpi4py/MPI/ExceptionP.pyx":74 * return errorclass * * error_class = property(Get_error_class, doc="error class") # <<<<<<<<<<<<<< * * def Get_error_string(self): */ __pyx_t_16 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_Get_error_class); if (unlikely(!__pyx_t_16)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_Get_error_class); } if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_doc_2, __pyx_kp_s_error_class) < 0) __PYX_ERR(1, 74, __pyx_L1_error) __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_9, __pyx_t_16); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_error_class_2, __pyx_t_13) < 0) __PYX_ERR(1, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "mpi4py/MPI/ExceptionP.pyx":76 * error_class = property(Get_error_class, doc="error class") * * def Get_error_string(self): # <<<<<<<<<<<<<< * """ * Error string */ __pyx_t_13 = __Pyx_CyFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Exception_29Get_error_string, 0, __pyx_n_s_Exception_Get_error_string, NULL, __pyx_n_s_mpi4py_MPI, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_Get_error_string, __pyx_t_13) < 0) __PYX_ERR(1, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "mpi4py/MPI/ExceptionP.pyx":85 * return tompistr(string, resultlen) * * error_string = property(Get_error_string, doc="error string") # <<<<<<<<<<<<<< */ __pyx_t_13 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_Get_error_string); if (unlikely(!__pyx_t_13)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_Get_error_string); } if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_doc_2, __pyx_kp_s_error_string) < 0) __PYX_ERR(1, 85, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_16, __pyx_t_13); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_error_string_2, __pyx_t_9) < 0) __PYX_ERR(1, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "mpi4py/MPI/ExceptionP.pyx":1 * class Exception(RuntimeError): # <<<<<<<<<<<<<< * * """ */ __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Exception_2, __pyx_tuple__138, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Exception_2, __pyx_t_9) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":3 * include "ExceptionP.pyx" * #include "ExceptionC.pyx" * MPIException = Exception # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Exception_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_MPIException); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_MPIException, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":7 * * # Actually no errors * SUCCESS = MPI_SUCCESS # <<<<<<<<<<<<<< * ERR_LASTCODE = MPI_ERR_LASTCODE * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_SUCCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SUCCESS, __pyx_t_1) < 0) __PYX_ERR(19, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":8 * # Actually no errors * SUCCESS = MPI_SUCCESS * ERR_LASTCODE = MPI_ERR_LASTCODE # <<<<<<<<<<<<<< * * # MPI-1 Error classes */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_LASTCODE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_LASTCODE, __pyx_t_1) < 0) __PYX_ERR(19, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":13 * # ------------------- * # MPI-1 Objects * ERR_COMM = MPI_ERR_COMM # <<<<<<<<<<<<<< * ERR_GROUP = MPI_ERR_GROUP * ERR_TYPE = MPI_ERR_TYPE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_COMM); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_COMM, __pyx_t_1) < 0) __PYX_ERR(19, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":14 * # MPI-1 Objects * ERR_COMM = MPI_ERR_COMM * ERR_GROUP = MPI_ERR_GROUP # <<<<<<<<<<<<<< * ERR_TYPE = MPI_ERR_TYPE * ERR_REQUEST = MPI_ERR_REQUEST */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_GROUP); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_GROUP, __pyx_t_1) < 0) __PYX_ERR(19, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":15 * ERR_COMM = MPI_ERR_COMM * ERR_GROUP = MPI_ERR_GROUP * ERR_TYPE = MPI_ERR_TYPE # <<<<<<<<<<<<<< * ERR_REQUEST = MPI_ERR_REQUEST * ERR_OP = MPI_ERR_OP */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_TYPE, __pyx_t_1) < 0) __PYX_ERR(19, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":16 * ERR_GROUP = MPI_ERR_GROUP * ERR_TYPE = MPI_ERR_TYPE * ERR_REQUEST = MPI_ERR_REQUEST # <<<<<<<<<<<<<< * ERR_OP = MPI_ERR_OP * # Communication argument parameters */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_REQUEST); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_REQUEST, __pyx_t_1) < 0) __PYX_ERR(19, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":17 * ERR_TYPE = MPI_ERR_TYPE * ERR_REQUEST = MPI_ERR_REQUEST * ERR_OP = MPI_ERR_OP # <<<<<<<<<<<<<< * # Communication argument parameters * ERR_BUFFER = MPI_ERR_BUFFER */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_OP); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_OP, __pyx_t_1) < 0) __PYX_ERR(19, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":19 * ERR_OP = MPI_ERR_OP * # Communication argument parameters * ERR_BUFFER = MPI_ERR_BUFFER # <<<<<<<<<<<<<< * ERR_COUNT = MPI_ERR_COUNT * ERR_TAG = MPI_ERR_TAG */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_BUFFER); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_BUFFER, __pyx_t_1) < 0) __PYX_ERR(19, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":20 * # Communication argument parameters * ERR_BUFFER = MPI_ERR_BUFFER * ERR_COUNT = MPI_ERR_COUNT # <<<<<<<<<<<<<< * ERR_TAG = MPI_ERR_TAG * ERR_RANK = MPI_ERR_RANK */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_COUNT); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_COUNT, __pyx_t_1) < 0) __PYX_ERR(19, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":21 * ERR_BUFFER = MPI_ERR_BUFFER * ERR_COUNT = MPI_ERR_COUNT * ERR_TAG = MPI_ERR_TAG # <<<<<<<<<<<<<< * ERR_RANK = MPI_ERR_RANK * ERR_ROOT = MPI_ERR_ROOT */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_TAG, __pyx_t_1) < 0) __PYX_ERR(19, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":22 * ERR_COUNT = MPI_ERR_COUNT * ERR_TAG = MPI_ERR_TAG * ERR_RANK = MPI_ERR_RANK # <<<<<<<<<<<<<< * ERR_ROOT = MPI_ERR_ROOT * ERR_TRUNCATE = MPI_ERR_TRUNCATE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_RANK); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_RANK, __pyx_t_1) < 0) __PYX_ERR(19, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":23 * ERR_TAG = MPI_ERR_TAG * ERR_RANK = MPI_ERR_RANK * ERR_ROOT = MPI_ERR_ROOT # <<<<<<<<<<<<<< * ERR_TRUNCATE = MPI_ERR_TRUNCATE * # Multiple completion */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_ROOT); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_ROOT, __pyx_t_1) < 0) __PYX_ERR(19, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":24 * ERR_RANK = MPI_ERR_RANK * ERR_ROOT = MPI_ERR_ROOT * ERR_TRUNCATE = MPI_ERR_TRUNCATE # <<<<<<<<<<<<<< * # Multiple completion * ERR_IN_STATUS = MPI_ERR_IN_STATUS */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_TRUNCATE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_TRUNCATE, __pyx_t_1) < 0) __PYX_ERR(19, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":26 * ERR_TRUNCATE = MPI_ERR_TRUNCATE * # Multiple completion * ERR_IN_STATUS = MPI_ERR_IN_STATUS # <<<<<<<<<<<<<< * ERR_PENDING = MPI_ERR_PENDING * # Topology argument parameters */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_IN_STATUS); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_IN_STATUS, __pyx_t_1) < 0) __PYX_ERR(19, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":27 * # Multiple completion * ERR_IN_STATUS = MPI_ERR_IN_STATUS * ERR_PENDING = MPI_ERR_PENDING # <<<<<<<<<<<<<< * # Topology argument parameters * ERR_TOPOLOGY = MPI_ERR_TOPOLOGY */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_PENDING); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_PENDING, __pyx_t_1) < 0) __PYX_ERR(19, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":29 * ERR_PENDING = MPI_ERR_PENDING * # Topology argument parameters * ERR_TOPOLOGY = MPI_ERR_TOPOLOGY # <<<<<<<<<<<<<< * ERR_DIMS = MPI_ERR_DIMS * # Other arguments parameters */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_TOPOLOGY); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_TOPOLOGY, __pyx_t_1) < 0) __PYX_ERR(19, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":30 * # Topology argument parameters * ERR_TOPOLOGY = MPI_ERR_TOPOLOGY * ERR_DIMS = MPI_ERR_DIMS # <<<<<<<<<<<<<< * # Other arguments parameters * ERR_ARG = MPI_ERR_ARG */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_DIMS); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_DIMS, __pyx_t_1) < 0) __PYX_ERR(19, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":32 * ERR_DIMS = MPI_ERR_DIMS * # Other arguments parameters * ERR_ARG = MPI_ERR_ARG # <<<<<<<<<<<<<< * # Other errors * ERR_OTHER = MPI_ERR_OTHER */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_ARG); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_ARG, __pyx_t_1) < 0) __PYX_ERR(19, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":34 * ERR_ARG = MPI_ERR_ARG * # Other errors * ERR_OTHER = MPI_ERR_OTHER # <<<<<<<<<<<<<< * ERR_UNKNOWN = MPI_ERR_UNKNOWN * ERR_INTERN = MPI_ERR_INTERN */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_OTHER); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_OTHER, __pyx_t_1) < 0) __PYX_ERR(19, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":35 * # Other errors * ERR_OTHER = MPI_ERR_OTHER * ERR_UNKNOWN = MPI_ERR_UNKNOWN # <<<<<<<<<<<<<< * ERR_INTERN = MPI_ERR_INTERN * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_UNKNOWN); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_UNKNOWN, __pyx_t_1) < 0) __PYX_ERR(19, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":36 * ERR_OTHER = MPI_ERR_OTHER * ERR_UNKNOWN = MPI_ERR_UNKNOWN * ERR_INTERN = MPI_ERR_INTERN # <<<<<<<<<<<<<< * * # MPI-2 Error classes */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_INTERN); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_INTERN, __pyx_t_1) < 0) __PYX_ERR(19, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":41 * # ------------------- * # MPI-2 Objects * ERR_INFO = MPI_ERR_INFO # <<<<<<<<<<<<<< * ERR_FILE = MPI_ERR_FILE * ERR_WIN = MPI_ERR_WIN */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_INFO); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_INFO, __pyx_t_1) < 0) __PYX_ERR(19, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":42 * # MPI-2 Objects * ERR_INFO = MPI_ERR_INFO * ERR_FILE = MPI_ERR_FILE # <<<<<<<<<<<<<< * ERR_WIN = MPI_ERR_WIN * # Object attributes */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_FILE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_FILE, __pyx_t_1) < 0) __PYX_ERR(19, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":43 * ERR_INFO = MPI_ERR_INFO * ERR_FILE = MPI_ERR_FILE * ERR_WIN = MPI_ERR_WIN # <<<<<<<<<<<<<< * # Object attributes * ERR_KEYVAL = MPI_ERR_KEYVAL */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_WIN); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_WIN, __pyx_t_1) < 0) __PYX_ERR(19, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":45 * ERR_WIN = MPI_ERR_WIN * # Object attributes * ERR_KEYVAL = MPI_ERR_KEYVAL # <<<<<<<<<<<<<< * # Info Object * ERR_INFO_KEY = MPI_ERR_INFO_KEY */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_KEYVAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_KEYVAL, __pyx_t_1) < 0) __PYX_ERR(19, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":47 * ERR_KEYVAL = MPI_ERR_KEYVAL * # Info Object * ERR_INFO_KEY = MPI_ERR_INFO_KEY # <<<<<<<<<<<<<< * ERR_INFO_VALUE = MPI_ERR_INFO_VALUE * ERR_INFO_NOKEY = MPI_ERR_INFO_NOKEY */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_INFO_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_INFO_KEY, __pyx_t_1) < 0) __PYX_ERR(19, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":48 * # Info Object * ERR_INFO_KEY = MPI_ERR_INFO_KEY * ERR_INFO_VALUE = MPI_ERR_INFO_VALUE # <<<<<<<<<<<<<< * ERR_INFO_NOKEY = MPI_ERR_INFO_NOKEY * # Input/Ouput */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_INFO_VALUE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_INFO_VALUE, __pyx_t_1) < 0) __PYX_ERR(19, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":49 * ERR_INFO_KEY = MPI_ERR_INFO_KEY * ERR_INFO_VALUE = MPI_ERR_INFO_VALUE * ERR_INFO_NOKEY = MPI_ERR_INFO_NOKEY # <<<<<<<<<<<<<< * # Input/Ouput * ERR_ACCESS = MPI_ERR_ACCESS */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_INFO_NOKEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_INFO_NOKEY, __pyx_t_1) < 0) __PYX_ERR(19, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":51 * ERR_INFO_NOKEY = MPI_ERR_INFO_NOKEY * # Input/Ouput * ERR_ACCESS = MPI_ERR_ACCESS # <<<<<<<<<<<<<< * ERR_AMODE = MPI_ERR_AMODE * ERR_BAD_FILE = MPI_ERR_BAD_FILE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_ACCESS); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_ACCESS, __pyx_t_1) < 0) __PYX_ERR(19, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":52 * # Input/Ouput * ERR_ACCESS = MPI_ERR_ACCESS * ERR_AMODE = MPI_ERR_AMODE # <<<<<<<<<<<<<< * ERR_BAD_FILE = MPI_ERR_BAD_FILE * ERR_FILE_EXISTS = MPI_ERR_FILE_EXISTS */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_AMODE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_AMODE, __pyx_t_1) < 0) __PYX_ERR(19, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":53 * ERR_ACCESS = MPI_ERR_ACCESS * ERR_AMODE = MPI_ERR_AMODE * ERR_BAD_FILE = MPI_ERR_BAD_FILE # <<<<<<<<<<<<<< * ERR_FILE_EXISTS = MPI_ERR_FILE_EXISTS * ERR_FILE_IN_USE = MPI_ERR_FILE_IN_USE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_BAD_FILE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_BAD_FILE, __pyx_t_1) < 0) __PYX_ERR(19, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":54 * ERR_AMODE = MPI_ERR_AMODE * ERR_BAD_FILE = MPI_ERR_BAD_FILE * ERR_FILE_EXISTS = MPI_ERR_FILE_EXISTS # <<<<<<<<<<<<<< * ERR_FILE_IN_USE = MPI_ERR_FILE_IN_USE * ERR_NO_SPACE = MPI_ERR_NO_SPACE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_FILE_EXISTS); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_FILE_EXISTS, __pyx_t_1) < 0) __PYX_ERR(19, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":55 * ERR_BAD_FILE = MPI_ERR_BAD_FILE * ERR_FILE_EXISTS = MPI_ERR_FILE_EXISTS * ERR_FILE_IN_USE = MPI_ERR_FILE_IN_USE # <<<<<<<<<<<<<< * ERR_NO_SPACE = MPI_ERR_NO_SPACE * ERR_NO_SUCH_FILE = MPI_ERR_NO_SUCH_FILE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_FILE_IN_USE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_FILE_IN_USE, __pyx_t_1) < 0) __PYX_ERR(19, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":56 * ERR_FILE_EXISTS = MPI_ERR_FILE_EXISTS * ERR_FILE_IN_USE = MPI_ERR_FILE_IN_USE * ERR_NO_SPACE = MPI_ERR_NO_SPACE # <<<<<<<<<<<<<< * ERR_NO_SUCH_FILE = MPI_ERR_NO_SUCH_FILE * ERR_IO = MPI_ERR_IO */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_NO_SPACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_NO_SPACE, __pyx_t_1) < 0) __PYX_ERR(19, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":57 * ERR_FILE_IN_USE = MPI_ERR_FILE_IN_USE * ERR_NO_SPACE = MPI_ERR_NO_SPACE * ERR_NO_SUCH_FILE = MPI_ERR_NO_SUCH_FILE # <<<<<<<<<<<<<< * ERR_IO = MPI_ERR_IO * ERR_READ_ONLY = MPI_ERR_READ_ONLY */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_NO_SUCH_FILE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_NO_SUCH_FILE, __pyx_t_1) < 0) __PYX_ERR(19, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":58 * ERR_NO_SPACE = MPI_ERR_NO_SPACE * ERR_NO_SUCH_FILE = MPI_ERR_NO_SUCH_FILE * ERR_IO = MPI_ERR_IO # <<<<<<<<<<<<<< * ERR_READ_ONLY = MPI_ERR_READ_ONLY * ERR_CONVERSION = MPI_ERR_CONVERSION */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_IO); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_IO, __pyx_t_1) < 0) __PYX_ERR(19, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":59 * ERR_NO_SUCH_FILE = MPI_ERR_NO_SUCH_FILE * ERR_IO = MPI_ERR_IO * ERR_READ_ONLY = MPI_ERR_READ_ONLY # <<<<<<<<<<<<<< * ERR_CONVERSION = MPI_ERR_CONVERSION * ERR_DUP_DATAREP = MPI_ERR_DUP_DATAREP */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_READ_ONLY); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_READ_ONLY, __pyx_t_1) < 0) __PYX_ERR(19, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":60 * ERR_IO = MPI_ERR_IO * ERR_READ_ONLY = MPI_ERR_READ_ONLY * ERR_CONVERSION = MPI_ERR_CONVERSION # <<<<<<<<<<<<<< * ERR_DUP_DATAREP = MPI_ERR_DUP_DATAREP * ERR_UNSUPPORTED_DATAREP = MPI_ERR_UNSUPPORTED_DATAREP */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_CONVERSION); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_CONVERSION, __pyx_t_1) < 0) __PYX_ERR(19, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":61 * ERR_READ_ONLY = MPI_ERR_READ_ONLY * ERR_CONVERSION = MPI_ERR_CONVERSION * ERR_DUP_DATAREP = MPI_ERR_DUP_DATAREP # <<<<<<<<<<<<<< * ERR_UNSUPPORTED_DATAREP = MPI_ERR_UNSUPPORTED_DATAREP * ERR_UNSUPPORTED_OPERATION = MPI_ERR_UNSUPPORTED_OPERATION */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_DUP_DATAREP); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_DUP_DATAREP, __pyx_t_1) < 0) __PYX_ERR(19, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":62 * ERR_CONVERSION = MPI_ERR_CONVERSION * ERR_DUP_DATAREP = MPI_ERR_DUP_DATAREP * ERR_UNSUPPORTED_DATAREP = MPI_ERR_UNSUPPORTED_DATAREP # <<<<<<<<<<<<<< * ERR_UNSUPPORTED_OPERATION = MPI_ERR_UNSUPPORTED_OPERATION * # Dynamic Process Management */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_UNSUPPORTED_DATAREP); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_UNSUPPORTED_DATAREP, __pyx_t_1) < 0) __PYX_ERR(19, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":63 * ERR_DUP_DATAREP = MPI_ERR_DUP_DATAREP * ERR_UNSUPPORTED_DATAREP = MPI_ERR_UNSUPPORTED_DATAREP * ERR_UNSUPPORTED_OPERATION = MPI_ERR_UNSUPPORTED_OPERATION # <<<<<<<<<<<<<< * # Dynamic Process Management * ERR_NAME = MPI_ERR_NAME */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_UNSUPPORTED_OPERATION); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_UNSUPPORTED_OPERATION, __pyx_t_1) < 0) __PYX_ERR(19, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":65 * ERR_UNSUPPORTED_OPERATION = MPI_ERR_UNSUPPORTED_OPERATION * # Dynamic Process Management * ERR_NAME = MPI_ERR_NAME # <<<<<<<<<<<<<< * ERR_NO_MEM = MPI_ERR_NO_MEM * ERR_NOT_SAME = MPI_ERR_NOT_SAME */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_NAME, __pyx_t_1) < 0) __PYX_ERR(19, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":66 * # Dynamic Process Management * ERR_NAME = MPI_ERR_NAME * ERR_NO_MEM = MPI_ERR_NO_MEM # <<<<<<<<<<<<<< * ERR_NOT_SAME = MPI_ERR_NOT_SAME * ERR_PORT = MPI_ERR_PORT */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_NO_MEM); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_NO_MEM, __pyx_t_1) < 0) __PYX_ERR(19, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":67 * ERR_NAME = MPI_ERR_NAME * ERR_NO_MEM = MPI_ERR_NO_MEM * ERR_NOT_SAME = MPI_ERR_NOT_SAME # <<<<<<<<<<<<<< * ERR_PORT = MPI_ERR_PORT * ERR_QUOTA = MPI_ERR_QUOTA */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_NOT_SAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_NOT_SAME, __pyx_t_1) < 0) __PYX_ERR(19, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":68 * ERR_NO_MEM = MPI_ERR_NO_MEM * ERR_NOT_SAME = MPI_ERR_NOT_SAME * ERR_PORT = MPI_ERR_PORT # <<<<<<<<<<<<<< * ERR_QUOTA = MPI_ERR_QUOTA * ERR_SERVICE = MPI_ERR_SERVICE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_PORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_PORT, __pyx_t_1) < 0) __PYX_ERR(19, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":69 * ERR_NOT_SAME = MPI_ERR_NOT_SAME * ERR_PORT = MPI_ERR_PORT * ERR_QUOTA = MPI_ERR_QUOTA # <<<<<<<<<<<<<< * ERR_SERVICE = MPI_ERR_SERVICE * ERR_SPAWN = MPI_ERR_SPAWN */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_QUOTA); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_QUOTA, __pyx_t_1) < 0) __PYX_ERR(19, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":70 * ERR_PORT = MPI_ERR_PORT * ERR_QUOTA = MPI_ERR_QUOTA * ERR_SERVICE = MPI_ERR_SERVICE # <<<<<<<<<<<<<< * ERR_SPAWN = MPI_ERR_SPAWN * # Windows */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_SERVICE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_SERVICE, __pyx_t_1) < 0) __PYX_ERR(19, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":71 * ERR_QUOTA = MPI_ERR_QUOTA * ERR_SERVICE = MPI_ERR_SERVICE * ERR_SPAWN = MPI_ERR_SPAWN # <<<<<<<<<<<<<< * # Windows * ERR_BASE = MPI_ERR_BASE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_SPAWN); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_SPAWN, __pyx_t_1) < 0) __PYX_ERR(19, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":73 * ERR_SPAWN = MPI_ERR_SPAWN * # Windows * ERR_BASE = MPI_ERR_BASE # <<<<<<<<<<<<<< * ERR_SIZE = MPI_ERR_SIZE * ERR_DISP = MPI_ERR_DISP */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_BASE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_BASE, __pyx_t_1) < 0) __PYX_ERR(19, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":74 * # Windows * ERR_BASE = MPI_ERR_BASE * ERR_SIZE = MPI_ERR_SIZE # <<<<<<<<<<<<<< * ERR_DISP = MPI_ERR_DISP * ERR_ASSERT = MPI_ERR_ASSERT */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_SIZE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_SIZE, __pyx_t_1) < 0) __PYX_ERR(19, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":75 * ERR_BASE = MPI_ERR_BASE * ERR_SIZE = MPI_ERR_SIZE * ERR_DISP = MPI_ERR_DISP # <<<<<<<<<<<<<< * ERR_ASSERT = MPI_ERR_ASSERT * ERR_LOCKTYPE = MPI_ERR_LOCKTYPE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_DISP); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_DISP, __pyx_t_1) < 0) __PYX_ERR(19, 75, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":76 * ERR_SIZE = MPI_ERR_SIZE * ERR_DISP = MPI_ERR_DISP * ERR_ASSERT = MPI_ERR_ASSERT # <<<<<<<<<<<<<< * ERR_LOCKTYPE = MPI_ERR_LOCKTYPE * ERR_RMA_CONFLICT = MPI_ERR_RMA_CONFLICT */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_ASSERT); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_ASSERT, __pyx_t_1) < 0) __PYX_ERR(19, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":77 * ERR_DISP = MPI_ERR_DISP * ERR_ASSERT = MPI_ERR_ASSERT * ERR_LOCKTYPE = MPI_ERR_LOCKTYPE # <<<<<<<<<<<<<< * ERR_RMA_CONFLICT = MPI_ERR_RMA_CONFLICT * ERR_RMA_SYNC = MPI_ERR_RMA_SYNC */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_LOCKTYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_LOCKTYPE, __pyx_t_1) < 0) __PYX_ERR(19, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":78 * ERR_ASSERT = MPI_ERR_ASSERT * ERR_LOCKTYPE = MPI_ERR_LOCKTYPE * ERR_RMA_CONFLICT = MPI_ERR_RMA_CONFLICT # <<<<<<<<<<<<<< * ERR_RMA_SYNC = MPI_ERR_RMA_SYNC * ERR_RMA_RANGE = MPI_ERR_RMA_RANGE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_RMA_CONFLICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_RMA_CONFLICT, __pyx_t_1) < 0) __PYX_ERR(19, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":79 * ERR_LOCKTYPE = MPI_ERR_LOCKTYPE * ERR_RMA_CONFLICT = MPI_ERR_RMA_CONFLICT * ERR_RMA_SYNC = MPI_ERR_RMA_SYNC # <<<<<<<<<<<<<< * ERR_RMA_RANGE = MPI_ERR_RMA_RANGE * ERR_RMA_ATTACH = MPI_ERR_RMA_ATTACH */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_RMA_SYNC); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_RMA_SYNC, __pyx_t_1) < 0) __PYX_ERR(19, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":80 * ERR_RMA_CONFLICT = MPI_ERR_RMA_CONFLICT * ERR_RMA_SYNC = MPI_ERR_RMA_SYNC * ERR_RMA_RANGE = MPI_ERR_RMA_RANGE # <<<<<<<<<<<<<< * ERR_RMA_ATTACH = MPI_ERR_RMA_ATTACH * ERR_RMA_SHARED = MPI_ERR_RMA_SHARED */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_RMA_RANGE); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_RMA_RANGE, __pyx_t_1) < 0) __PYX_ERR(19, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":81 * ERR_RMA_SYNC = MPI_ERR_RMA_SYNC * ERR_RMA_RANGE = MPI_ERR_RMA_RANGE * ERR_RMA_ATTACH = MPI_ERR_RMA_ATTACH # <<<<<<<<<<<<<< * ERR_RMA_SHARED = MPI_ERR_RMA_SHARED * ERR_RMA_FLAVOR = MPI_ERR_RMA_FLAVOR */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_RMA_ATTACH); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_RMA_ATTACH, __pyx_t_1) < 0) __PYX_ERR(19, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":82 * ERR_RMA_RANGE = MPI_ERR_RMA_RANGE * ERR_RMA_ATTACH = MPI_ERR_RMA_ATTACH * ERR_RMA_SHARED = MPI_ERR_RMA_SHARED # <<<<<<<<<<<<<< * ERR_RMA_FLAVOR = MPI_ERR_RMA_FLAVOR * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_RMA_SHARED); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_RMA_SHARED, __pyx_t_1) < 0) __PYX_ERR(19, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":83 * ERR_RMA_ATTACH = MPI_ERR_RMA_ATTACH * ERR_RMA_SHARED = MPI_ERR_RMA_SHARED * ERR_RMA_FLAVOR = MPI_ERR_RMA_FLAVOR # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_ERR_RMA_FLAVOR); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERR_RMA_FLAVOR, __pyx_t_1) < 0) __PYX_ERR(19, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":87 * * * def Get_error_class(int errorcode): # <<<<<<<<<<<<<< * """ * Convert an *error code* into an *error class* */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_5Get_error_class, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Get_error_class, __pyx_t_1) < 0) __PYX_ERR(19, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":95 * return errorclass * * def Get_error_string(int errorcode): # <<<<<<<<<<<<<< * """ * Return the *error string* for a given */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_7Get_error_string, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Get_error_string, __pyx_t_1) < 0) __PYX_ERR(19, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":106 * * * def Add_error_class(): # <<<<<<<<<<<<<< * """ * Add an *error class* to the known error classes */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_9Add_error_class, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Add_error_class, __pyx_t_1) < 0) __PYX_ERR(19, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":114 * return errorclass * * def Add_error_code(int errorclass): # <<<<<<<<<<<<<< * """ * Add an *error code* to an *error class* */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_11Add_error_code, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Add_error_code, __pyx_t_1) < 0) __PYX_ERR(19, 114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Exception.pyx":122 * return errorcode * * def Add_error_string(int errorcode, string): # <<<<<<<<<<<<<< * """ * Associate an *error string* with an */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_13Add_error_string, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(19, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Add_error_string, __pyx_t_1) < 0) __PYX_ERR(19, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Errhandler.pyx":45 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Errhandler, __pyx_n_s_f2py); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Errhandler.pyx":44 * return MPI_Errhandler_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Errhandler->tp_dict, __pyx_n_s_f2py, __pyx_t_3) < 0) __PYX_ERR(20, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Errhandler); /* "mpi4py/MPI/Errhandler.pyx":54 * * * cdef Errhandler __ERRHANDLER_NULL__ = new_Errhandler(MPI_ERRHANDLER_NULL) # <<<<<<<<<<<<<< * cdef Errhandler __ERRORS_RETURN__ = new_Errhandler(MPI_ERRORS_RETURN) * cdef Errhandler __ERRORS_ARE_FATAL__ = new_Errhandler(MPI_ERRORS_ARE_FATAL) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Errhandler(MPI_ERRHANDLER_NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___ERRHANDLER_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___ERRHANDLER_NULL__, ((struct PyMPIErrhandlerObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Errhandler.pyx":55 * * cdef Errhandler __ERRHANDLER_NULL__ = new_Errhandler(MPI_ERRHANDLER_NULL) * cdef Errhandler __ERRORS_RETURN__ = new_Errhandler(MPI_ERRORS_RETURN) # <<<<<<<<<<<<<< * cdef Errhandler __ERRORS_ARE_FATAL__ = new_Errhandler(MPI_ERRORS_ARE_FATAL) * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Errhandler(MPI_ERRORS_RETURN)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___ERRORS_RETURN__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___ERRORS_RETURN__, ((struct PyMPIErrhandlerObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Errhandler.pyx":56 * cdef Errhandler __ERRHANDLER_NULL__ = new_Errhandler(MPI_ERRHANDLER_NULL) * cdef Errhandler __ERRORS_RETURN__ = new_Errhandler(MPI_ERRORS_RETURN) * cdef Errhandler __ERRORS_ARE_FATAL__ = new_Errhandler(MPI_ERRORS_ARE_FATAL) # <<<<<<<<<<<<<< * * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Errhandler(MPI_ERRORS_ARE_FATAL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(20, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___ERRORS_ARE_FATAL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___ERRORS_ARE_FATAL__, ((struct PyMPIErrhandlerObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Errhandler.pyx":62 * # ----------------------------- * * ERRHANDLER_NULL = __ERRHANDLER_NULL__ #: Null error handler # <<<<<<<<<<<<<< * ERRORS_RETURN = __ERRORS_RETURN__ #: Errors return error handler * ERRORS_ARE_FATAL = __ERRORS_ARE_FATAL__ #: Errors are fatal error handler */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERRHANDLER_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___ERRHANDLER_NULL__)) < 0) __PYX_ERR(20, 62, __pyx_L1_error) /* "mpi4py/MPI/Errhandler.pyx":63 * * ERRHANDLER_NULL = __ERRHANDLER_NULL__ #: Null error handler * ERRORS_RETURN = __ERRORS_RETURN__ #: Errors return error handler # <<<<<<<<<<<<<< * ERRORS_ARE_FATAL = __ERRORS_ARE_FATAL__ #: Errors are fatal error handler */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERRORS_RETURN, ((PyObject *)__pyx_v_6mpi4py_3MPI___ERRORS_RETURN__)) < 0) __PYX_ERR(20, 63, __pyx_L1_error) /* "mpi4py/MPI/Errhandler.pyx":64 * ERRHANDLER_NULL = __ERRHANDLER_NULL__ #: Null error handler * ERRORS_RETURN = __ERRORS_RETURN__ #: Errors return error handler * ERRORS_ARE_FATAL = __ERRORS_ARE_FATAL__ #: Errors are fatal error handler # <<<<<<<<<<<<<< */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ERRORS_ARE_FATAL, ((PyObject *)__pyx_v_6mpi4py_3MPI___ERRORS_ARE_FATAL__)) < 0) __PYX_ERR(20, 64, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":3 * # Storage order for arrays * # ------------------------ * ORDER_C = MPI_ORDER_C #: C order (a.k.a. row major) # <<<<<<<<<<<<<< * ORDER_FORTRAN = MPI_ORDER_FORTRAN #: Fortran order (a.k.a. column major) * ORDER_F = MPI_ORDER_FORTRAN #: Convenience alias for ORDER_FORTRAN */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_ORDER_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ORDER_C, __pyx_t_3) < 0) __PYX_ERR(21, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":4 * # ------------------------ * ORDER_C = MPI_ORDER_C #: C order (a.k.a. row major) * ORDER_FORTRAN = MPI_ORDER_FORTRAN #: Fortran order (a.k.a. column major) # <<<<<<<<<<<<<< * ORDER_F = MPI_ORDER_FORTRAN #: Convenience alias for ORDER_FORTRAN * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_ORDER_FORTRAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ORDER_FORTRAN, __pyx_t_3) < 0) __PYX_ERR(21, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":5 * ORDER_C = MPI_ORDER_C #: C order (a.k.a. row major) * ORDER_FORTRAN = MPI_ORDER_FORTRAN #: Fortran order (a.k.a. column major) * ORDER_F = MPI_ORDER_FORTRAN #: Convenience alias for ORDER_FORTRAN # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_ORDER_FORTRAN); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ORDER_F, __pyx_t_3) < 0) __PYX_ERR(21, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":10 * # Type classes for Fortran datatype matching * # ------------------------------------------ * TYPECLASS_INTEGER = MPI_TYPECLASS_INTEGER # <<<<<<<<<<<<<< * TYPECLASS_REAL = MPI_TYPECLASS_REAL * TYPECLASS_COMPLEX = MPI_TYPECLASS_COMPLEX */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_TYPECLASS_INTEGER); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_TYPECLASS_INTEGER, __pyx_t_3) < 0) __PYX_ERR(21, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":11 * # ------------------------------------------ * TYPECLASS_INTEGER = MPI_TYPECLASS_INTEGER * TYPECLASS_REAL = MPI_TYPECLASS_REAL # <<<<<<<<<<<<<< * TYPECLASS_COMPLEX = MPI_TYPECLASS_COMPLEX * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_TYPECLASS_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_TYPECLASS_REAL, __pyx_t_3) < 0) __PYX_ERR(21, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":12 * TYPECLASS_INTEGER = MPI_TYPECLASS_INTEGER * TYPECLASS_REAL = MPI_TYPECLASS_REAL * TYPECLASS_COMPLEX = MPI_TYPECLASS_COMPLEX # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_TYPECLASS_COMPLEX); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_TYPECLASS_COMPLEX, __pyx_t_3) < 0) __PYX_ERR(21, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":17 * # Type of distributions (HPF-like arrays) * # --------------------------------------- * DISTRIBUTE_NONE = MPI_DISTRIBUTE_NONE #: Dimension not distributed # <<<<<<<<<<<<<< * DISTRIBUTE_BLOCK = MPI_DISTRIBUTE_BLOCK #: Block distribution * DISTRIBUTE_CYCLIC = MPI_DISTRIBUTE_CYCLIC #: Cyclic distribution */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_DISTRIBUTE_NONE); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DISTRIBUTE_NONE, __pyx_t_3) < 0) __PYX_ERR(21, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":18 * # --------------------------------------- * DISTRIBUTE_NONE = MPI_DISTRIBUTE_NONE #: Dimension not distributed * DISTRIBUTE_BLOCK = MPI_DISTRIBUTE_BLOCK #: Block distribution # <<<<<<<<<<<<<< * DISTRIBUTE_CYCLIC = MPI_DISTRIBUTE_CYCLIC #: Cyclic distribution * DISTRIBUTE_DFLT_DARG = MPI_DISTRIBUTE_DFLT_DARG #: Default distribution */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_DISTRIBUTE_BLOCK); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DISTRIBUTE_BLOCK, __pyx_t_3) < 0) __PYX_ERR(21, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":19 * DISTRIBUTE_NONE = MPI_DISTRIBUTE_NONE #: Dimension not distributed * DISTRIBUTE_BLOCK = MPI_DISTRIBUTE_BLOCK #: Block distribution * DISTRIBUTE_CYCLIC = MPI_DISTRIBUTE_CYCLIC #: Cyclic distribution # <<<<<<<<<<<<<< * DISTRIBUTE_DFLT_DARG = MPI_DISTRIBUTE_DFLT_DARG #: Default distribution * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_DISTRIBUTE_CYCLIC); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DISTRIBUTE_CYCLIC, __pyx_t_3) < 0) __PYX_ERR(21, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":20 * DISTRIBUTE_BLOCK = MPI_DISTRIBUTE_BLOCK #: Block distribution * DISTRIBUTE_CYCLIC = MPI_DISTRIBUTE_CYCLIC #: Cyclic distribution * DISTRIBUTE_DFLT_DARG = MPI_DISTRIBUTE_DFLT_DARG #: Default distribution # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_DISTRIBUTE_DFLT_DARG); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DISTRIBUTE_DFLT_DARG, __pyx_t_3) < 0) __PYX_ERR(21, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":25 * # Combiner values for datatype decoding * # ------------------------------------- * COMBINER_NAMED = MPI_COMBINER_NAMED # <<<<<<<<<<<<<< * COMBINER_DUP = MPI_COMBINER_DUP * COMBINER_CONTIGUOUS = MPI_COMBINER_CONTIGUOUS */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_NAMED); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_NAMED, __pyx_t_3) < 0) __PYX_ERR(21, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":26 * # ------------------------------------- * COMBINER_NAMED = MPI_COMBINER_NAMED * COMBINER_DUP = MPI_COMBINER_DUP # <<<<<<<<<<<<<< * COMBINER_CONTIGUOUS = MPI_COMBINER_CONTIGUOUS * COMBINER_VECTOR = MPI_COMBINER_VECTOR */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_DUP); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_DUP, __pyx_t_3) < 0) __PYX_ERR(21, 26, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":27 * COMBINER_NAMED = MPI_COMBINER_NAMED * COMBINER_DUP = MPI_COMBINER_DUP * COMBINER_CONTIGUOUS = MPI_COMBINER_CONTIGUOUS # <<<<<<<<<<<<<< * COMBINER_VECTOR = MPI_COMBINER_VECTOR * COMBINER_HVECTOR = MPI_COMBINER_HVECTOR */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_CONTIGUOUS); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_CONTIGUOUS, __pyx_t_3) < 0) __PYX_ERR(21, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":28 * COMBINER_DUP = MPI_COMBINER_DUP * COMBINER_CONTIGUOUS = MPI_COMBINER_CONTIGUOUS * COMBINER_VECTOR = MPI_COMBINER_VECTOR # <<<<<<<<<<<<<< * COMBINER_HVECTOR = MPI_COMBINER_HVECTOR * COMBINER_INDEXED = MPI_COMBINER_INDEXED */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_VECTOR); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_VECTOR, __pyx_t_3) < 0) __PYX_ERR(21, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":29 * COMBINER_CONTIGUOUS = MPI_COMBINER_CONTIGUOUS * COMBINER_VECTOR = MPI_COMBINER_VECTOR * COMBINER_HVECTOR = MPI_COMBINER_HVECTOR # <<<<<<<<<<<<<< * COMBINER_INDEXED = MPI_COMBINER_INDEXED * COMBINER_HINDEXED = MPI_COMBINER_HINDEXED */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_HVECTOR); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_HVECTOR, __pyx_t_3) < 0) __PYX_ERR(21, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":30 * COMBINER_VECTOR = MPI_COMBINER_VECTOR * COMBINER_HVECTOR = MPI_COMBINER_HVECTOR * COMBINER_INDEXED = MPI_COMBINER_INDEXED # <<<<<<<<<<<<<< * COMBINER_HINDEXED = MPI_COMBINER_HINDEXED * COMBINER_INDEXED_BLOCK = MPI_COMBINER_INDEXED_BLOCK */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_INDEXED); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_INDEXED, __pyx_t_3) < 0) __PYX_ERR(21, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":31 * COMBINER_HVECTOR = MPI_COMBINER_HVECTOR * COMBINER_INDEXED = MPI_COMBINER_INDEXED * COMBINER_HINDEXED = MPI_COMBINER_HINDEXED # <<<<<<<<<<<<<< * COMBINER_INDEXED_BLOCK = MPI_COMBINER_INDEXED_BLOCK * COMBINER_HINDEXED_BLOCK = MPI_COMBINER_HINDEXED_BLOCK */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_HINDEXED); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_HINDEXED, __pyx_t_3) < 0) __PYX_ERR(21, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":32 * COMBINER_INDEXED = MPI_COMBINER_INDEXED * COMBINER_HINDEXED = MPI_COMBINER_HINDEXED * COMBINER_INDEXED_BLOCK = MPI_COMBINER_INDEXED_BLOCK # <<<<<<<<<<<<<< * COMBINER_HINDEXED_BLOCK = MPI_COMBINER_HINDEXED_BLOCK * COMBINER_STRUCT = MPI_COMBINER_STRUCT */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_INDEXED_BLOCK); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_INDEXED_BLOCK, __pyx_t_3) < 0) __PYX_ERR(21, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":33 * COMBINER_HINDEXED = MPI_COMBINER_HINDEXED * COMBINER_INDEXED_BLOCK = MPI_COMBINER_INDEXED_BLOCK * COMBINER_HINDEXED_BLOCK = MPI_COMBINER_HINDEXED_BLOCK # <<<<<<<<<<<<<< * COMBINER_STRUCT = MPI_COMBINER_STRUCT * COMBINER_SUBARRAY = MPI_COMBINER_SUBARRAY */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_HINDEXED_BLOCK); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_HINDEXED_BLOCK, __pyx_t_3) < 0) __PYX_ERR(21, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":34 * COMBINER_INDEXED_BLOCK = MPI_COMBINER_INDEXED_BLOCK * COMBINER_HINDEXED_BLOCK = MPI_COMBINER_HINDEXED_BLOCK * COMBINER_STRUCT = MPI_COMBINER_STRUCT # <<<<<<<<<<<<<< * COMBINER_SUBARRAY = MPI_COMBINER_SUBARRAY * COMBINER_DARRAY = MPI_COMBINER_DARRAY */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_STRUCT); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_STRUCT, __pyx_t_3) < 0) __PYX_ERR(21, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":35 * COMBINER_HINDEXED_BLOCK = MPI_COMBINER_HINDEXED_BLOCK * COMBINER_STRUCT = MPI_COMBINER_STRUCT * COMBINER_SUBARRAY = MPI_COMBINER_SUBARRAY # <<<<<<<<<<<<<< * COMBINER_DARRAY = MPI_COMBINER_DARRAY * COMBINER_RESIZED = MPI_COMBINER_RESIZED */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_SUBARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_SUBARRAY, __pyx_t_3) < 0) __PYX_ERR(21, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":36 * COMBINER_STRUCT = MPI_COMBINER_STRUCT * COMBINER_SUBARRAY = MPI_COMBINER_SUBARRAY * COMBINER_DARRAY = MPI_COMBINER_DARRAY # <<<<<<<<<<<<<< * COMBINER_RESIZED = MPI_COMBINER_RESIZED * COMBINER_F90_REAL = MPI_COMBINER_F90_REAL */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_DARRAY); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_DARRAY, __pyx_t_3) < 0) __PYX_ERR(21, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":37 * COMBINER_SUBARRAY = MPI_COMBINER_SUBARRAY * COMBINER_DARRAY = MPI_COMBINER_DARRAY * COMBINER_RESIZED = MPI_COMBINER_RESIZED # <<<<<<<<<<<<<< * COMBINER_F90_REAL = MPI_COMBINER_F90_REAL * COMBINER_F90_COMPLEX = MPI_COMBINER_F90_COMPLEX */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_RESIZED); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_RESIZED, __pyx_t_3) < 0) __PYX_ERR(21, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":38 * COMBINER_DARRAY = MPI_COMBINER_DARRAY * COMBINER_RESIZED = MPI_COMBINER_RESIZED * COMBINER_F90_REAL = MPI_COMBINER_F90_REAL # <<<<<<<<<<<<<< * COMBINER_F90_COMPLEX = MPI_COMBINER_F90_COMPLEX * COMBINER_F90_INTEGER = MPI_COMBINER_F90_INTEGER */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_F90_REAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_F90_REAL, __pyx_t_3) < 0) __PYX_ERR(21, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":39 * COMBINER_RESIZED = MPI_COMBINER_RESIZED * COMBINER_F90_REAL = MPI_COMBINER_F90_REAL * COMBINER_F90_COMPLEX = MPI_COMBINER_F90_COMPLEX # <<<<<<<<<<<<<< * COMBINER_F90_INTEGER = MPI_COMBINER_F90_INTEGER * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_F90_COMPLEX); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_F90_COMPLEX, __pyx_t_3) < 0) __PYX_ERR(21, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":40 * COMBINER_F90_REAL = MPI_COMBINER_F90_REAL * COMBINER_F90_COMPLEX = MPI_COMBINER_F90_COMPLEX * COMBINER_F90_INTEGER = MPI_COMBINER_F90_INTEGER # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_COMBINER_F90_INTEGER); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMBINER_F90_INTEGER, __pyx_t_3) < 0) __PYX_ERR(21, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":129 * return datatype * * Create_dup = Dup #: convenience alias # <<<<<<<<<<<<<< * * def Create_contiguous(self, int count): */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_Dup); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_Create_dup, __pyx_t_3) < 0) __PYX_ERR(21, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":219 * * @classmethod * def Create_struct(cls, blocklengths, displacements, datatypes): # <<<<<<<<<<<<<< * """ * Create an datatype from a general set of */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_Create_struct); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Datatype.pyx":218 * return datatype * * @classmethod # <<<<<<<<<<<<<< * def Create_struct(cls, blocklengths, displacements, datatypes): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_Create_struct, __pyx_t_1) < 0) __PYX_ERR(21, 219, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":240 * * def Create_subarray(self, sizes, subsizes, starts, * int order=ORDER_C): # <<<<<<<<<<<<<< * """ * Create a datatype for a subarray of */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ORDER_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 240, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__26 = __pyx_t_2; /* "mpi4py/MPI/Datatype.pyx":263 * def Create_darray(self, int size, int rank, * gsizes, distribs, dargs, psizes, * int order=ORDER_C): # <<<<<<<<<<<<<< * """ * Create a datatype representing an HPF-like */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ORDER_C); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(21, 263, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__27 = __pyx_t_2; /* "mpi4py/MPI/Datatype.pyx":286 * * @classmethod * def Create_f90_integer(cls, int r): # <<<<<<<<<<<<<< * """ * Return a bounded integer datatype */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_Create_f90_integer); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Datatype.pyx":285 * # ------------------------------------------------ * * @classmethod # <<<<<<<<<<<<<< * def Create_f90_integer(cls, int r): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_Create_f90_integer, __pyx_t_3) < 0) __PYX_ERR(21, 286, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":295 * * @classmethod * def Create_f90_real(cls, int p, int r): # <<<<<<<<<<<<<< * """ * Return a bounded real datatype */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_Create_f90_real); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Datatype.pyx":294 * return datatype * * @classmethod # <<<<<<<<<<<<<< * def Create_f90_real(cls, int p, int r): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_Create_f90_real, __pyx_t_1) < 0) __PYX_ERR(21, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":304 * * @classmethod * def Create_f90_complex(cls, int p, int r): # <<<<<<<<<<<<<< * """ * Return a bounded complex datatype */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_Create_f90_complex); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Datatype.pyx":303 * return datatype * * @classmethod # <<<<<<<<<<<<<< * def Create_f90_complex(cls, int p, int r): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_Create_f90_complex, __pyx_t_3) < 0) __PYX_ERR(21, 304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":313 * * @classmethod * def Match_size(cls, int typeclass, int size): # <<<<<<<<<<<<<< * """ * Find a datatype matching a specified size in bytes */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_Match_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Datatype.pyx":312 * return datatype * * @classmethod # <<<<<<<<<<<<<< * def Match_size(cls, int typeclass, int size): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_Match_size, __pyx_t_1) < 0) __PYX_ERR(21, 313, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":422 * return datatype * * Resized = Create_resized #: compatibility alias # <<<<<<<<<<<<<< * * def Get_true_extent(self): */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_Create_resized); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_Resized, __pyx_t_1) < 0) __PYX_ERR(21, 422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":765 * * @classmethod * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): # <<<<<<<<<<<<<< * """ * Create a new attribute key for datatypes */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_Create_keyval); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Datatype.pyx":764 * CHKERR( MPI_Type_delete_attr(self.ob_mpi, keyval) ) * * @classmethod # <<<<<<<<<<<<<< * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_Create_keyval, __pyx_t_3) < 0) __PYX_ERR(21, 765, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":779 * * @classmethod * def Free_keyval(cls, int keyval): # <<<<<<<<<<<<<< * """ * Free and attribute key for datatypes */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_Free_keyval); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Datatype.pyx":778 * return keyval * * @classmethod # <<<<<<<<<<<<<< * def Free_keyval(cls, int keyval): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_Free_keyval, __pyx_t_1) < 0) __PYX_ERR(21, 779, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":825 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype, __pyx_n_s_f2py); if (unlikely(!__pyx_t_1)) __PYX_ERR(21, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Datatype.pyx":824 * return MPI_Type_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Datatype->tp_dict, __pyx_n_s_f2py, __pyx_t_3) < 0) __PYX_ERR(21, 825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Datatype); /* "mpi4py/MPI/Datatype.pyx":836 * # ----------------- * * def Get_address(location): # <<<<<<<<<<<<<< * """ * Get the address of a location in memory */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_15Get_address, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Get_address, __pyx_t_3) < 0) __PYX_ERR(21, 836, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":847 * return address * * def Aint_add(Aint base, Aint disp): # <<<<<<<<<<<<<< * """ * Return the sum of base address and displacement */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_17Aint_add, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Aint_add, __pyx_t_3) < 0) __PYX_ERR(21, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":853 * return MPI_Aint_add(base, disp) * * def Aint_diff(Aint addr1, Aint addr2): # <<<<<<<<<<<<<< * """ * Return the difference between absolute addresses */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_19Aint_diff, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Aint_diff, __pyx_t_3) < 0) __PYX_ERR(21, 853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":860 * * * cdef Datatype __DATATYPE_NULL__ = new_Datatype( MPI_DATATYPE_NULL ) # <<<<<<<<<<<<<< * * cdef Datatype __UB__ = new_Datatype( MPI_UB ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_DATATYPE_NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___DATATYPE_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___DATATYPE_NULL__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":862 * cdef Datatype __DATATYPE_NULL__ = new_Datatype( MPI_DATATYPE_NULL ) * * cdef Datatype __UB__ = new_Datatype( MPI_UB ) # <<<<<<<<<<<<<< * cdef Datatype __LB__ = new_Datatype( MPI_LB ) * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UB)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UB__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UB__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":863 * * cdef Datatype __UB__ = new_Datatype( MPI_UB ) * cdef Datatype __LB__ = new_Datatype( MPI_LB ) # <<<<<<<<<<<<<< * * cdef Datatype __PACKED__ = new_Datatype( MPI_PACKED ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LB)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LB__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LB__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":865 * cdef Datatype __LB__ = new_Datatype( MPI_LB ) * * cdef Datatype __PACKED__ = new_Datatype( MPI_PACKED ) # <<<<<<<<<<<<<< * cdef Datatype __BYTE__ = new_Datatype( MPI_BYTE ) * cdef Datatype __AINT__ = new_Datatype( MPI_AINT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_PACKED)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___PACKED__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___PACKED__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":866 * * cdef Datatype __PACKED__ = new_Datatype( MPI_PACKED ) * cdef Datatype __BYTE__ = new_Datatype( MPI_BYTE ) # <<<<<<<<<<<<<< * cdef Datatype __AINT__ = new_Datatype( MPI_AINT ) * cdef Datatype __OFFSET__ = new_Datatype( MPI_OFFSET ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_BYTE)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___BYTE__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___BYTE__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":867 * cdef Datatype __PACKED__ = new_Datatype( MPI_PACKED ) * cdef Datatype __BYTE__ = new_Datatype( MPI_BYTE ) * cdef Datatype __AINT__ = new_Datatype( MPI_AINT ) # <<<<<<<<<<<<<< * cdef Datatype __OFFSET__ = new_Datatype( MPI_OFFSET ) * cdef Datatype __COUNT__ = new_Datatype( MPI_COUNT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_AINT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___AINT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___AINT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":868 * cdef Datatype __BYTE__ = new_Datatype( MPI_BYTE ) * cdef Datatype __AINT__ = new_Datatype( MPI_AINT ) * cdef Datatype __OFFSET__ = new_Datatype( MPI_OFFSET ) # <<<<<<<<<<<<<< * cdef Datatype __COUNT__ = new_Datatype( MPI_COUNT ) * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_OFFSET)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___OFFSET__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___OFFSET__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":869 * cdef Datatype __AINT__ = new_Datatype( MPI_AINT ) * cdef Datatype __OFFSET__ = new_Datatype( MPI_OFFSET ) * cdef Datatype __COUNT__ = new_Datatype( MPI_COUNT ) # <<<<<<<<<<<<<< * * cdef Datatype __CHAR__ = new_Datatype( MPI_CHAR ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_COUNT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COUNT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COUNT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":871 * cdef Datatype __COUNT__ = new_Datatype( MPI_COUNT ) * * cdef Datatype __CHAR__ = new_Datatype( MPI_CHAR ) # <<<<<<<<<<<<<< * cdef Datatype __WCHAR__ = new_Datatype( MPI_WCHAR ) * cdef Datatype __SIGNED_CHAR__ = new_Datatype( MPI_SIGNED_CHAR ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_CHAR)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___CHAR__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___CHAR__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":872 * * cdef Datatype __CHAR__ = new_Datatype( MPI_CHAR ) * cdef Datatype __WCHAR__ = new_Datatype( MPI_WCHAR ) # <<<<<<<<<<<<<< * cdef Datatype __SIGNED_CHAR__ = new_Datatype( MPI_SIGNED_CHAR ) * cdef Datatype __SHORT__ = new_Datatype( MPI_SHORT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_WCHAR)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___WCHAR__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___WCHAR__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":873 * cdef Datatype __CHAR__ = new_Datatype( MPI_CHAR ) * cdef Datatype __WCHAR__ = new_Datatype( MPI_WCHAR ) * cdef Datatype __SIGNED_CHAR__ = new_Datatype( MPI_SIGNED_CHAR ) # <<<<<<<<<<<<<< * cdef Datatype __SHORT__ = new_Datatype( MPI_SHORT ) * cdef Datatype __INT__ = new_Datatype( MPI_INT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_SIGNED_CHAR)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___SIGNED_CHAR__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___SIGNED_CHAR__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":874 * cdef Datatype __WCHAR__ = new_Datatype( MPI_WCHAR ) * cdef Datatype __SIGNED_CHAR__ = new_Datatype( MPI_SIGNED_CHAR ) * cdef Datatype __SHORT__ = new_Datatype( MPI_SHORT ) # <<<<<<<<<<<<<< * cdef Datatype __INT__ = new_Datatype( MPI_INT ) * cdef Datatype __LONG__ = new_Datatype( MPI_LONG ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_SHORT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___SHORT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___SHORT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":875 * cdef Datatype __SIGNED_CHAR__ = new_Datatype( MPI_SIGNED_CHAR ) * cdef Datatype __SHORT__ = new_Datatype( MPI_SHORT ) * cdef Datatype __INT__ = new_Datatype( MPI_INT ) # <<<<<<<<<<<<<< * cdef Datatype __LONG__ = new_Datatype( MPI_LONG ) * cdef Datatype __LONG_LONG__ = new_Datatype( MPI_LONG_LONG ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":876 * cdef Datatype __SHORT__ = new_Datatype( MPI_SHORT ) * cdef Datatype __INT__ = new_Datatype( MPI_INT ) * cdef Datatype __LONG__ = new_Datatype( MPI_LONG ) # <<<<<<<<<<<<<< * cdef Datatype __LONG_LONG__ = new_Datatype( MPI_LONG_LONG ) * cdef Datatype __UNSIGNED_CHAR__ = new_Datatype( MPI_UNSIGNED_CHAR ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LONG)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LONG__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LONG__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":877 * cdef Datatype __INT__ = new_Datatype( MPI_INT ) * cdef Datatype __LONG__ = new_Datatype( MPI_LONG ) * cdef Datatype __LONG_LONG__ = new_Datatype( MPI_LONG_LONG ) # <<<<<<<<<<<<<< * cdef Datatype __UNSIGNED_CHAR__ = new_Datatype( MPI_UNSIGNED_CHAR ) * cdef Datatype __UNSIGNED_SHORT__ = new_Datatype( MPI_UNSIGNED_SHORT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LONG_LONG)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_LONG__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LONG_LONG__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":878 * cdef Datatype __LONG__ = new_Datatype( MPI_LONG ) * cdef Datatype __LONG_LONG__ = new_Datatype( MPI_LONG_LONG ) * cdef Datatype __UNSIGNED_CHAR__ = new_Datatype( MPI_UNSIGNED_CHAR ) # <<<<<<<<<<<<<< * cdef Datatype __UNSIGNED_SHORT__ = new_Datatype( MPI_UNSIGNED_SHORT ) * cdef Datatype __UNSIGNED__ = new_Datatype( MPI_UNSIGNED ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UNSIGNED_CHAR)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_CHAR__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UNSIGNED_CHAR__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":879 * cdef Datatype __LONG_LONG__ = new_Datatype( MPI_LONG_LONG ) * cdef Datatype __UNSIGNED_CHAR__ = new_Datatype( MPI_UNSIGNED_CHAR ) * cdef Datatype __UNSIGNED_SHORT__ = new_Datatype( MPI_UNSIGNED_SHORT ) # <<<<<<<<<<<<<< * cdef Datatype __UNSIGNED__ = new_Datatype( MPI_UNSIGNED ) * cdef Datatype __UNSIGNED_LONG__ = new_Datatype( MPI_UNSIGNED_LONG ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UNSIGNED_SHORT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":880 * cdef Datatype __UNSIGNED_CHAR__ = new_Datatype( MPI_UNSIGNED_CHAR ) * cdef Datatype __UNSIGNED_SHORT__ = new_Datatype( MPI_UNSIGNED_SHORT ) * cdef Datatype __UNSIGNED__ = new_Datatype( MPI_UNSIGNED ) # <<<<<<<<<<<<<< * cdef Datatype __UNSIGNED_LONG__ = new_Datatype( MPI_UNSIGNED_LONG ) * cdef Datatype __UNSIGNED_LONG_LONG__ = new_Datatype( MPI_UNSIGNED_LONG_LONG ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UNSIGNED)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UNSIGNED__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":881 * cdef Datatype __UNSIGNED_SHORT__ = new_Datatype( MPI_UNSIGNED_SHORT ) * cdef Datatype __UNSIGNED__ = new_Datatype( MPI_UNSIGNED ) * cdef Datatype __UNSIGNED_LONG__ = new_Datatype( MPI_UNSIGNED_LONG ) # <<<<<<<<<<<<<< * cdef Datatype __UNSIGNED_LONG_LONG__ = new_Datatype( MPI_UNSIGNED_LONG_LONG ) * cdef Datatype __FLOAT__ = new_Datatype( MPI_FLOAT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UNSIGNED_LONG)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":882 * cdef Datatype __UNSIGNED__ = new_Datatype( MPI_UNSIGNED ) * cdef Datatype __UNSIGNED_LONG__ = new_Datatype( MPI_UNSIGNED_LONG ) * cdef Datatype __UNSIGNED_LONG_LONG__ = new_Datatype( MPI_UNSIGNED_LONG_LONG ) # <<<<<<<<<<<<<< * cdef Datatype __FLOAT__ = new_Datatype( MPI_FLOAT ) * cdef Datatype __DOUBLE__ = new_Datatype( MPI_DOUBLE ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UNSIGNED_LONG_LONG)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG_LONG__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG_LONG__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":883 * cdef Datatype __UNSIGNED_LONG__ = new_Datatype( MPI_UNSIGNED_LONG ) * cdef Datatype __UNSIGNED_LONG_LONG__ = new_Datatype( MPI_UNSIGNED_LONG_LONG ) * cdef Datatype __FLOAT__ = new_Datatype( MPI_FLOAT ) # <<<<<<<<<<<<<< * cdef Datatype __DOUBLE__ = new_Datatype( MPI_DOUBLE ) * cdef Datatype __LONG_DOUBLE__ = new_Datatype( MPI_LONG_DOUBLE ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_FLOAT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___FLOAT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___FLOAT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":884 * cdef Datatype __UNSIGNED_LONG_LONG__ = new_Datatype( MPI_UNSIGNED_LONG_LONG ) * cdef Datatype __FLOAT__ = new_Datatype( MPI_FLOAT ) * cdef Datatype __DOUBLE__ = new_Datatype( MPI_DOUBLE ) # <<<<<<<<<<<<<< * cdef Datatype __LONG_DOUBLE__ = new_Datatype( MPI_LONG_DOUBLE ) * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_DOUBLE)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___DOUBLE__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":885 * cdef Datatype __FLOAT__ = new_Datatype( MPI_FLOAT ) * cdef Datatype __DOUBLE__ = new_Datatype( MPI_DOUBLE ) * cdef Datatype __LONG_DOUBLE__ = new_Datatype( MPI_LONG_DOUBLE ) # <<<<<<<<<<<<<< * * cdef Datatype __C_BOOL__ = new_Datatype( MPI_C_BOOL ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LONG_DOUBLE)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_DOUBLE__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LONG_DOUBLE__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":887 * cdef Datatype __LONG_DOUBLE__ = new_Datatype( MPI_LONG_DOUBLE ) * * cdef Datatype __C_BOOL__ = new_Datatype( MPI_C_BOOL ) # <<<<<<<<<<<<<< * cdef Datatype __INT8_T__ = new_Datatype( MPI_INT8_T ) * cdef Datatype __INT16_T__ = new_Datatype( MPI_INT16_T ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_C_BOOL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___C_BOOL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___C_BOOL__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":888 * * cdef Datatype __C_BOOL__ = new_Datatype( MPI_C_BOOL ) * cdef Datatype __INT8_T__ = new_Datatype( MPI_INT8_T ) # <<<<<<<<<<<<<< * cdef Datatype __INT16_T__ = new_Datatype( MPI_INT16_T ) * cdef Datatype __INT32_T__ = new_Datatype( MPI_INT32_T ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INT8_T)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INT8_T__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INT8_T__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":889 * cdef Datatype __C_BOOL__ = new_Datatype( MPI_C_BOOL ) * cdef Datatype __INT8_T__ = new_Datatype( MPI_INT8_T ) * cdef Datatype __INT16_T__ = new_Datatype( MPI_INT16_T ) # <<<<<<<<<<<<<< * cdef Datatype __INT32_T__ = new_Datatype( MPI_INT32_T ) * cdef Datatype __INT64_T__ = new_Datatype( MPI_INT64_T ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INT16_T)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INT16_T__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INT16_T__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":890 * cdef Datatype __INT8_T__ = new_Datatype( MPI_INT8_T ) * cdef Datatype __INT16_T__ = new_Datatype( MPI_INT16_T ) * cdef Datatype __INT32_T__ = new_Datatype( MPI_INT32_T ) # <<<<<<<<<<<<<< * cdef Datatype __INT64_T__ = new_Datatype( MPI_INT64_T ) * cdef Datatype __UINT8_T__ = new_Datatype( MPI_UINT8_T ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INT32_T)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INT32_T__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INT32_T__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":891 * cdef Datatype __INT16_T__ = new_Datatype( MPI_INT16_T ) * cdef Datatype __INT32_T__ = new_Datatype( MPI_INT32_T ) * cdef Datatype __INT64_T__ = new_Datatype( MPI_INT64_T ) # <<<<<<<<<<<<<< * cdef Datatype __UINT8_T__ = new_Datatype( MPI_UINT8_T ) * cdef Datatype __UINT16_T__ = new_Datatype( MPI_UINT16_T ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INT64_T)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INT64_T__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INT64_T__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":892 * cdef Datatype __INT32_T__ = new_Datatype( MPI_INT32_T ) * cdef Datatype __INT64_T__ = new_Datatype( MPI_INT64_T ) * cdef Datatype __UINT8_T__ = new_Datatype( MPI_UINT8_T ) # <<<<<<<<<<<<<< * cdef Datatype __UINT16_T__ = new_Datatype( MPI_UINT16_T ) * cdef Datatype __UINT32_T__ = new_Datatype( MPI_UINT32_T ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UINT8_T)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UINT8_T__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UINT8_T__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":893 * cdef Datatype __INT64_T__ = new_Datatype( MPI_INT64_T ) * cdef Datatype __UINT8_T__ = new_Datatype( MPI_UINT8_T ) * cdef Datatype __UINT16_T__ = new_Datatype( MPI_UINT16_T ) # <<<<<<<<<<<<<< * cdef Datatype __UINT32_T__ = new_Datatype( MPI_UINT32_T ) * cdef Datatype __UINT64_T__ = new_Datatype( MPI_UINT64_T ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UINT16_T)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UINT16_T__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UINT16_T__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":894 * cdef Datatype __UINT8_T__ = new_Datatype( MPI_UINT8_T ) * cdef Datatype __UINT16_T__ = new_Datatype( MPI_UINT16_T ) * cdef Datatype __UINT32_T__ = new_Datatype( MPI_UINT32_T ) # <<<<<<<<<<<<<< * cdef Datatype __UINT64_T__ = new_Datatype( MPI_UINT64_T ) * cdef Datatype __C_COMPLEX__ = new_Datatype( */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UINT32_T)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UINT32_T__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UINT32_T__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":895 * cdef Datatype __UINT16_T__ = new_Datatype( MPI_UINT16_T ) * cdef Datatype __UINT32_T__ = new_Datatype( MPI_UINT32_T ) * cdef Datatype __UINT64_T__ = new_Datatype( MPI_UINT64_T ) # <<<<<<<<<<<<<< * cdef Datatype __C_COMPLEX__ = new_Datatype( * MPI_C_COMPLEX ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_UINT64_T)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___UINT64_T__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___UINT64_T__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":896 * cdef Datatype __UINT32_T__ = new_Datatype( MPI_UINT32_T ) * cdef Datatype __UINT64_T__ = new_Datatype( MPI_UINT64_T ) * cdef Datatype __C_COMPLEX__ = new_Datatype( # <<<<<<<<<<<<<< * MPI_C_COMPLEX ) * cdef Datatype __C_FLOAT_COMPLEX__ = new_Datatype( */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_C_COMPLEX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___C_COMPLEX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___C_COMPLEX__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":898 * cdef Datatype __C_COMPLEX__ = new_Datatype( * MPI_C_COMPLEX ) * cdef Datatype __C_FLOAT_COMPLEX__ = new_Datatype( # <<<<<<<<<<<<<< * MPI_C_FLOAT_COMPLEX ) * cdef Datatype __C_DOUBLE_COMPLEX__ = new_Datatype( */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_C_FLOAT_COMPLEX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":900 * cdef Datatype __C_FLOAT_COMPLEX__ = new_Datatype( * MPI_C_FLOAT_COMPLEX ) * cdef Datatype __C_DOUBLE_COMPLEX__ = new_Datatype( # <<<<<<<<<<<<<< * MPI_C_DOUBLE_COMPLEX ) * cdef Datatype __C_LONG_DOUBLE_COMPLEX__ = new_Datatype( */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_C_DOUBLE_COMPLEX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":902 * cdef Datatype __C_DOUBLE_COMPLEX__ = new_Datatype( * MPI_C_DOUBLE_COMPLEX ) * cdef Datatype __C_LONG_DOUBLE_COMPLEX__ = new_Datatype( # <<<<<<<<<<<<<< * MPI_C_LONG_DOUBLE_COMPLEX ) * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_C_LONG_DOUBLE_COMPLEX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":905 * MPI_C_LONG_DOUBLE_COMPLEX ) * * cdef Datatype __CXX_BOOL__ = new_Datatype( MPI_CXX_BOOL ) # <<<<<<<<<<<<<< * cdef Datatype __CXX_FLOAT_COMPLEX__ = new_Datatype( * MPI_CXX_FLOAT_COMPLEX ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_CXX_BOOL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_BOOL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___CXX_BOOL__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":906 * * cdef Datatype __CXX_BOOL__ = new_Datatype( MPI_CXX_BOOL ) * cdef Datatype __CXX_FLOAT_COMPLEX__ = new_Datatype( # <<<<<<<<<<<<<< * MPI_CXX_FLOAT_COMPLEX ) * cdef Datatype __CXX_DOUBLE_COMPLEX__ = new_Datatype( */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_CXX_FLOAT_COMPLEX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_FLOAT_COMPLEX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___CXX_FLOAT_COMPLEX__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":908 * cdef Datatype __CXX_FLOAT_COMPLEX__ = new_Datatype( * MPI_CXX_FLOAT_COMPLEX ) * cdef Datatype __CXX_DOUBLE_COMPLEX__ = new_Datatype( # <<<<<<<<<<<<<< * MPI_CXX_DOUBLE_COMPLEX ) * cdef Datatype __CXX_LONG_DOUBLE_COMPLEX__ = new_Datatype( */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_CXX_DOUBLE_COMPLEX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_DOUBLE_COMPLEX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___CXX_DOUBLE_COMPLEX__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":910 * cdef Datatype __CXX_DOUBLE_COMPLEX__ = new_Datatype( * MPI_CXX_DOUBLE_COMPLEX ) * cdef Datatype __CXX_LONG_DOUBLE_COMPLEX__ = new_Datatype( # <<<<<<<<<<<<<< * MPI_CXX_LONG_DOUBLE_COMPLEX ) * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_CXX_LONG_DOUBLE_COMPLEX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_LONG_DOUBLE_COMPLEX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___CXX_LONG_DOUBLE_COMPLEX__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":913 * MPI_CXX_LONG_DOUBLE_COMPLEX ) * * cdef Datatype __SHORT_INT__ = new_Datatype( MPI_SHORT_INT ) # <<<<<<<<<<<<<< * cdef Datatype __TWOINT__ = new_Datatype( MPI_2INT ) * cdef Datatype __LONG_INT__ = new_Datatype( MPI_LONG_INT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_SHORT_INT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 913, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___SHORT_INT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___SHORT_INT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":914 * * cdef Datatype __SHORT_INT__ = new_Datatype( MPI_SHORT_INT ) * cdef Datatype __TWOINT__ = new_Datatype( MPI_2INT ) # <<<<<<<<<<<<<< * cdef Datatype __LONG_INT__ = new_Datatype( MPI_LONG_INT ) * cdef Datatype __FLOAT_INT__ = new_Datatype( MPI_FLOAT_INT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_2INT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___TWOINT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___TWOINT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":915 * cdef Datatype __SHORT_INT__ = new_Datatype( MPI_SHORT_INT ) * cdef Datatype __TWOINT__ = new_Datatype( MPI_2INT ) * cdef Datatype __LONG_INT__ = new_Datatype( MPI_LONG_INT ) # <<<<<<<<<<<<<< * cdef Datatype __FLOAT_INT__ = new_Datatype( MPI_FLOAT_INT ) * cdef Datatype __DOUBLE_INT__ = new_Datatype( MPI_DOUBLE_INT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LONG_INT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_INT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LONG_INT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":916 * cdef Datatype __TWOINT__ = new_Datatype( MPI_2INT ) * cdef Datatype __LONG_INT__ = new_Datatype( MPI_LONG_INT ) * cdef Datatype __FLOAT_INT__ = new_Datatype( MPI_FLOAT_INT ) # <<<<<<<<<<<<<< * cdef Datatype __DOUBLE_INT__ = new_Datatype( MPI_DOUBLE_INT ) * cdef Datatype __LONG_DOUBLE_INT__ = new_Datatype( MPI_LONG_DOUBLE_INT ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_FLOAT_INT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___FLOAT_INT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___FLOAT_INT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":917 * cdef Datatype __LONG_INT__ = new_Datatype( MPI_LONG_INT ) * cdef Datatype __FLOAT_INT__ = new_Datatype( MPI_FLOAT_INT ) * cdef Datatype __DOUBLE_INT__ = new_Datatype( MPI_DOUBLE_INT ) # <<<<<<<<<<<<<< * cdef Datatype __LONG_DOUBLE_INT__ = new_Datatype( MPI_LONG_DOUBLE_INT ) * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_DOUBLE_INT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_INT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___DOUBLE_INT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":918 * cdef Datatype __FLOAT_INT__ = new_Datatype( MPI_FLOAT_INT ) * cdef Datatype __DOUBLE_INT__ = new_Datatype( MPI_DOUBLE_INT ) * cdef Datatype __LONG_DOUBLE_INT__ = new_Datatype( MPI_LONG_DOUBLE_INT ) # <<<<<<<<<<<<<< * * cdef Datatype __CHARACTER__ = new_Datatype( MPI_CHARACTER ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LONG_DOUBLE_INT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_DOUBLE_INT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LONG_DOUBLE_INT__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":920 * cdef Datatype __LONG_DOUBLE_INT__ = new_Datatype( MPI_LONG_DOUBLE_INT ) * * cdef Datatype __CHARACTER__ = new_Datatype( MPI_CHARACTER ) # <<<<<<<<<<<<<< * cdef Datatype __LOGICAL__ = new_Datatype( MPI_LOGICAL ) * cdef Datatype __INTEGER__ = new_Datatype( MPI_INTEGER ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_CHARACTER)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___CHARACTER__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___CHARACTER__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":921 * * cdef Datatype __CHARACTER__ = new_Datatype( MPI_CHARACTER ) * cdef Datatype __LOGICAL__ = new_Datatype( MPI_LOGICAL ) # <<<<<<<<<<<<<< * cdef Datatype __INTEGER__ = new_Datatype( MPI_INTEGER ) * cdef Datatype __REAL__ = new_Datatype( MPI_REAL ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LOGICAL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LOGICAL__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":922 * cdef Datatype __CHARACTER__ = new_Datatype( MPI_CHARACTER ) * cdef Datatype __LOGICAL__ = new_Datatype( MPI_LOGICAL ) * cdef Datatype __INTEGER__ = new_Datatype( MPI_INTEGER ) # <<<<<<<<<<<<<< * cdef Datatype __REAL__ = new_Datatype( MPI_REAL ) * cdef Datatype __DOUBLE_PRECISION__ = new_Datatype( MPI_DOUBLE_PRECISION ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INTEGER)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INTEGER__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":923 * cdef Datatype __LOGICAL__ = new_Datatype( MPI_LOGICAL ) * cdef Datatype __INTEGER__ = new_Datatype( MPI_INTEGER ) * cdef Datatype __REAL__ = new_Datatype( MPI_REAL ) # <<<<<<<<<<<<<< * cdef Datatype __DOUBLE_PRECISION__ = new_Datatype( MPI_DOUBLE_PRECISION ) * cdef Datatype __COMPLEX__ = new_Datatype( MPI_COMPLEX ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_REAL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___REAL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___REAL__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":924 * cdef Datatype __INTEGER__ = new_Datatype( MPI_INTEGER ) * cdef Datatype __REAL__ = new_Datatype( MPI_REAL ) * cdef Datatype __DOUBLE_PRECISION__ = new_Datatype( MPI_DOUBLE_PRECISION ) # <<<<<<<<<<<<<< * cdef Datatype __COMPLEX__ = new_Datatype( MPI_COMPLEX ) * cdef Datatype __DOUBLE_COMPLEX__ = new_Datatype( MPI_DOUBLE_COMPLEX ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_DOUBLE_PRECISION)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_PRECISION__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___DOUBLE_PRECISION__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":925 * cdef Datatype __REAL__ = new_Datatype( MPI_REAL ) * cdef Datatype __DOUBLE_PRECISION__ = new_Datatype( MPI_DOUBLE_PRECISION ) * cdef Datatype __COMPLEX__ = new_Datatype( MPI_COMPLEX ) # <<<<<<<<<<<<<< * cdef Datatype __DOUBLE_COMPLEX__ = new_Datatype( MPI_DOUBLE_COMPLEX ) * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_COMPLEX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COMPLEX__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":926 * cdef Datatype __DOUBLE_PRECISION__ = new_Datatype( MPI_DOUBLE_PRECISION ) * cdef Datatype __COMPLEX__ = new_Datatype( MPI_COMPLEX ) * cdef Datatype __DOUBLE_COMPLEX__ = new_Datatype( MPI_DOUBLE_COMPLEX ) # <<<<<<<<<<<<<< * * cdef Datatype __LOGICAL1__ = new_Datatype( MPI_LOGICAL1 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_DOUBLE_COMPLEX)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":928 * cdef Datatype __DOUBLE_COMPLEX__ = new_Datatype( MPI_DOUBLE_COMPLEX ) * * cdef Datatype __LOGICAL1__ = new_Datatype( MPI_LOGICAL1 ) # <<<<<<<<<<<<<< * cdef Datatype __LOGICAL2__ = new_Datatype( MPI_LOGICAL2 ) * cdef Datatype __LOGICAL4__ = new_Datatype( MPI_LOGICAL4 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LOGICAL1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL1__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LOGICAL1__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":929 * * cdef Datatype __LOGICAL1__ = new_Datatype( MPI_LOGICAL1 ) * cdef Datatype __LOGICAL2__ = new_Datatype( MPI_LOGICAL2 ) # <<<<<<<<<<<<<< * cdef Datatype __LOGICAL4__ = new_Datatype( MPI_LOGICAL4 ) * cdef Datatype __LOGICAL8__ = new_Datatype( MPI_LOGICAL8 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LOGICAL2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL2__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LOGICAL2__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":930 * cdef Datatype __LOGICAL1__ = new_Datatype( MPI_LOGICAL1 ) * cdef Datatype __LOGICAL2__ = new_Datatype( MPI_LOGICAL2 ) * cdef Datatype __LOGICAL4__ = new_Datatype( MPI_LOGICAL4 ) # <<<<<<<<<<<<<< * cdef Datatype __LOGICAL8__ = new_Datatype( MPI_LOGICAL8 ) * cdef Datatype __INTEGER1__ = new_Datatype( MPI_INTEGER1 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LOGICAL4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL4__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LOGICAL4__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":931 * cdef Datatype __LOGICAL2__ = new_Datatype( MPI_LOGICAL2 ) * cdef Datatype __LOGICAL4__ = new_Datatype( MPI_LOGICAL4 ) * cdef Datatype __LOGICAL8__ = new_Datatype( MPI_LOGICAL8 ) # <<<<<<<<<<<<<< * cdef Datatype __INTEGER1__ = new_Datatype( MPI_INTEGER1 ) * cdef Datatype __INTEGER2__ = new_Datatype( MPI_INTEGER2 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_LOGICAL8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL8__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LOGICAL8__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":932 * cdef Datatype __LOGICAL4__ = new_Datatype( MPI_LOGICAL4 ) * cdef Datatype __LOGICAL8__ = new_Datatype( MPI_LOGICAL8 ) * cdef Datatype __INTEGER1__ = new_Datatype( MPI_INTEGER1 ) # <<<<<<<<<<<<<< * cdef Datatype __INTEGER2__ = new_Datatype( MPI_INTEGER2 ) * cdef Datatype __INTEGER4__ = new_Datatype( MPI_INTEGER4 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INTEGER1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER1__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INTEGER1__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":933 * cdef Datatype __LOGICAL8__ = new_Datatype( MPI_LOGICAL8 ) * cdef Datatype __INTEGER1__ = new_Datatype( MPI_INTEGER1 ) * cdef Datatype __INTEGER2__ = new_Datatype( MPI_INTEGER2 ) # <<<<<<<<<<<<<< * cdef Datatype __INTEGER4__ = new_Datatype( MPI_INTEGER4 ) * cdef Datatype __INTEGER8__ = new_Datatype( MPI_INTEGER8 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INTEGER2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 933, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER2__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INTEGER2__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":934 * cdef Datatype __INTEGER1__ = new_Datatype( MPI_INTEGER1 ) * cdef Datatype __INTEGER2__ = new_Datatype( MPI_INTEGER2 ) * cdef Datatype __INTEGER4__ = new_Datatype( MPI_INTEGER4 ) # <<<<<<<<<<<<<< * cdef Datatype __INTEGER8__ = new_Datatype( MPI_INTEGER8 ) * cdef Datatype __INTEGER16__ = new_Datatype( MPI_INTEGER16 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INTEGER4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER4__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INTEGER4__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":935 * cdef Datatype __INTEGER2__ = new_Datatype( MPI_INTEGER2 ) * cdef Datatype __INTEGER4__ = new_Datatype( MPI_INTEGER4 ) * cdef Datatype __INTEGER8__ = new_Datatype( MPI_INTEGER8 ) # <<<<<<<<<<<<<< * cdef Datatype __INTEGER16__ = new_Datatype( MPI_INTEGER16 ) * cdef Datatype __REAL2__ = new_Datatype( MPI_REAL2 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INTEGER8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER8__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INTEGER8__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":936 * cdef Datatype __INTEGER4__ = new_Datatype( MPI_INTEGER4 ) * cdef Datatype __INTEGER8__ = new_Datatype( MPI_INTEGER8 ) * cdef Datatype __INTEGER16__ = new_Datatype( MPI_INTEGER16 ) # <<<<<<<<<<<<<< * cdef Datatype __REAL2__ = new_Datatype( MPI_REAL2 ) * cdef Datatype __REAL4__ = new_Datatype( MPI_REAL4 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_INTEGER16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER16__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INTEGER16__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":937 * cdef Datatype __INTEGER8__ = new_Datatype( MPI_INTEGER8 ) * cdef Datatype __INTEGER16__ = new_Datatype( MPI_INTEGER16 ) * cdef Datatype __REAL2__ = new_Datatype( MPI_REAL2 ) # <<<<<<<<<<<<<< * cdef Datatype __REAL4__ = new_Datatype( MPI_REAL4 ) * cdef Datatype __REAL8__ = new_Datatype( MPI_REAL8 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_REAL2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___REAL2__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___REAL2__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":938 * cdef Datatype __INTEGER16__ = new_Datatype( MPI_INTEGER16 ) * cdef Datatype __REAL2__ = new_Datatype( MPI_REAL2 ) * cdef Datatype __REAL4__ = new_Datatype( MPI_REAL4 ) # <<<<<<<<<<<<<< * cdef Datatype __REAL8__ = new_Datatype( MPI_REAL8 ) * cdef Datatype __REAL16__ = new_Datatype( MPI_REAL16 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_REAL4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___REAL4__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___REAL4__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":939 * cdef Datatype __REAL2__ = new_Datatype( MPI_REAL2 ) * cdef Datatype __REAL4__ = new_Datatype( MPI_REAL4 ) * cdef Datatype __REAL8__ = new_Datatype( MPI_REAL8 ) # <<<<<<<<<<<<<< * cdef Datatype __REAL16__ = new_Datatype( MPI_REAL16 ) * cdef Datatype __COMPLEX4__ = new_Datatype( MPI_COMPLEX4 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_REAL8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___REAL8__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___REAL8__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":940 * cdef Datatype __REAL4__ = new_Datatype( MPI_REAL4 ) * cdef Datatype __REAL8__ = new_Datatype( MPI_REAL8 ) * cdef Datatype __REAL16__ = new_Datatype( MPI_REAL16 ) # <<<<<<<<<<<<<< * cdef Datatype __COMPLEX4__ = new_Datatype( MPI_COMPLEX4 ) * cdef Datatype __COMPLEX8__ = new_Datatype( MPI_COMPLEX8 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_REAL16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 940, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___REAL16__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___REAL16__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":941 * cdef Datatype __REAL8__ = new_Datatype( MPI_REAL8 ) * cdef Datatype __REAL16__ = new_Datatype( MPI_REAL16 ) * cdef Datatype __COMPLEX4__ = new_Datatype( MPI_COMPLEX4 ) # <<<<<<<<<<<<<< * cdef Datatype __COMPLEX8__ = new_Datatype( MPI_COMPLEX8 ) * cdef Datatype __COMPLEX16__ = new_Datatype( MPI_COMPLEX16 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_COMPLEX4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX4__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COMPLEX4__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":942 * cdef Datatype __REAL16__ = new_Datatype( MPI_REAL16 ) * cdef Datatype __COMPLEX4__ = new_Datatype( MPI_COMPLEX4 ) * cdef Datatype __COMPLEX8__ = new_Datatype( MPI_COMPLEX8 ) # <<<<<<<<<<<<<< * cdef Datatype __COMPLEX16__ = new_Datatype( MPI_COMPLEX16 ) * cdef Datatype __COMPLEX32__ = new_Datatype( MPI_COMPLEX32 ) */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_COMPLEX8)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX8__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COMPLEX8__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":943 * cdef Datatype __COMPLEX4__ = new_Datatype( MPI_COMPLEX4 ) * cdef Datatype __COMPLEX8__ = new_Datatype( MPI_COMPLEX8 ) * cdef Datatype __COMPLEX16__ = new_Datatype( MPI_COMPLEX16 ) # <<<<<<<<<<<<<< * cdef Datatype __COMPLEX32__ = new_Datatype( MPI_COMPLEX32 ) * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_COMPLEX16)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX16__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COMPLEX16__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":944 * cdef Datatype __COMPLEX8__ = new_Datatype( MPI_COMPLEX8 ) * cdef Datatype __COMPLEX16__ = new_Datatype( MPI_COMPLEX16 ) * cdef Datatype __COMPLEX32__ = new_Datatype( MPI_COMPLEX32 ) # <<<<<<<<<<<<<< * * include "typemap.pxi" */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Datatype(MPI_COMPLEX32)); if (unlikely(!__pyx_t_3)) __PYX_ERR(21, 944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX32__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COMPLEX32__, ((struct PyMPIDatatypeObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":11 * # ----------------------------------------------------------------------------- * * cdef dict TypeDict = { } # <<<<<<<<<<<<<< * _typedict = TypeDict * */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_TypeDict); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_TypeDict, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":12 * * cdef dict TypeDict = { } * _typedict = TypeDict # <<<<<<<<<<<<<< * * # boolean (C++) */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_typedict, __pyx_v_6mpi4py_3MPI_TypeDict) < 0) __PYX_ERR(22, 12, __pyx_L1_error) /* "mpi4py/MPI/typemap.pxi":15 * * # boolean (C++) * AddTypeMap(TypeDict, "?" , __CXX_BOOL__ ) # PEP-3118 & NumPy # <<<<<<<<<<<<<< * # boolean (C99) * AddTypeMap(TypeDict, "?" , __C_BOOL__ ) # PEP-3118 & NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_BOOL__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"?"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":17 * AddTypeMap(TypeDict, "?" , __CXX_BOOL__ ) # PEP-3118 & NumPy * # boolean (C99) * AddTypeMap(TypeDict, "?" , __C_BOOL__ ) # PEP-3118 & NumPy # <<<<<<<<<<<<<< * # character * AddTypeMap(TypeDict, "c" , __CHAR__ ) # PEP-3118 & NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_BOOL__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"?"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":19 * AddTypeMap(TypeDict, "?" , __C_BOOL__ ) # PEP-3118 & NumPy * # character * AddTypeMap(TypeDict, "c" , __CHAR__ ) # PEP-3118 & NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "S" , __CHAR__ ) # NumPy * # UCS-2|4 */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CHAR__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"c"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":20 * # character * AddTypeMap(TypeDict, "c" , __CHAR__ ) # PEP-3118 & NumPy * AddTypeMap(TypeDict, "S" , __CHAR__ ) # NumPy # <<<<<<<<<<<<<< * # UCS-2|4 * AddTypeMap(TypeDict, "u" , __UNSIGNED_SHORT__ ) # PEP-3118 */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CHAR__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"S"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":22 * AddTypeMap(TypeDict, "S" , __CHAR__ ) # NumPy * # UCS-2|4 * AddTypeMap(TypeDict, "u" , __UNSIGNED_SHORT__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u" , __UINT16_T__ ) # PEP-3118 * AddTypeMap(TypeDict, "w" , __UNSIGNED__ ) # PEP-3118 */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"u"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":23 * # UCS-2|4 * AddTypeMap(TypeDict, "u" , __UNSIGNED_SHORT__ ) # PEP-3118 * AddTypeMap(TypeDict, "u" , __UINT16_T__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "w" , __UNSIGNED__ ) # PEP-3118 * AddTypeMap(TypeDict, "w" , __UINT32_T__ ) # PEP-3118 */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT16_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":24 * AddTypeMap(TypeDict, "u" , __UNSIGNED_SHORT__ ) # PEP-3118 * AddTypeMap(TypeDict, "u" , __UINT16_T__ ) # PEP-3118 * AddTypeMap(TypeDict, "w" , __UNSIGNED__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "w" , __UINT32_T__ ) # PEP-3118 * # (signed) integer */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"w"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":25 * AddTypeMap(TypeDict, "u" , __UINT16_T__ ) # PEP-3118 * AddTypeMap(TypeDict, "w" , __UNSIGNED__ ) # PEP-3118 * AddTypeMap(TypeDict, "w" , __UINT32_T__ ) # PEP-3118 # <<<<<<<<<<<<<< * # (signed) integer * AddTypeMap(TypeDict, "b" , __SIGNED_CHAR__ ) # MPI-2 */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT32_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"w"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":27 * AddTypeMap(TypeDict, "w" , __UINT32_T__ ) # PEP-3118 * # (signed) integer * AddTypeMap(TypeDict, "b" , __SIGNED_CHAR__ ) # MPI-2 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "h" , __SHORT__ ) * AddTypeMap(TypeDict, "i" , __INT__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___SIGNED_CHAR__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"b"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":28 * # (signed) integer * AddTypeMap(TypeDict, "b" , __SIGNED_CHAR__ ) # MPI-2 * AddTypeMap(TypeDict, "h" , __SHORT__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i" , __INT__ ) * AddTypeMap(TypeDict, "l" , __LONG__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___SHORT__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"h"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":29 * AddTypeMap(TypeDict, "b" , __SIGNED_CHAR__ ) # MPI-2 * AddTypeMap(TypeDict, "h" , __SHORT__ ) * AddTypeMap(TypeDict, "i" , __INT__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "l" , __LONG__ ) * AddTypeMap(TypeDict, "q" , __LONG_LONG__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":30 * AddTypeMap(TypeDict, "h" , __SHORT__ ) * AddTypeMap(TypeDict, "i" , __INT__ ) * AddTypeMap(TypeDict, "l" , __LONG__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "q" , __LONG_LONG__ ) * AddTypeMap(TypeDict, "p" , __AINT__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"l"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":31 * AddTypeMap(TypeDict, "i" , __INT__ ) * AddTypeMap(TypeDict, "l" , __LONG__ ) * AddTypeMap(TypeDict, "q" , __LONG_LONG__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "p" , __AINT__ ) # NumPy * # unsigned integer */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_LONG__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"q"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":32 * AddTypeMap(TypeDict, "l" , __LONG__ ) * AddTypeMap(TypeDict, "q" , __LONG_LONG__ ) * AddTypeMap(TypeDict, "p" , __AINT__ ) # NumPy # <<<<<<<<<<<<<< * # unsigned integer * AddTypeMap(TypeDict, "B" , __UNSIGNED_CHAR__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___AINT__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"p"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":34 * AddTypeMap(TypeDict, "p" , __AINT__ ) # NumPy * # unsigned integer * AddTypeMap(TypeDict, "B" , __UNSIGNED_CHAR__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "H" , __UNSIGNED_SHORT__ ) * AddTypeMap(TypeDict, "I" , __UNSIGNED__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_CHAR__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"B"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":35 * # unsigned integer * AddTypeMap(TypeDict, "B" , __UNSIGNED_CHAR__ ) * AddTypeMap(TypeDict, "H" , __UNSIGNED_SHORT__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "I" , __UNSIGNED__ ) * AddTypeMap(TypeDict, "L" , __UNSIGNED_LONG__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"H"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":36 * AddTypeMap(TypeDict, "B" , __UNSIGNED_CHAR__ ) * AddTypeMap(TypeDict, "H" , __UNSIGNED_SHORT__ ) * AddTypeMap(TypeDict, "I" , __UNSIGNED__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "L" , __UNSIGNED_LONG__ ) * AddTypeMap(TypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"I"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":37 * AddTypeMap(TypeDict, "H" , __UNSIGNED_SHORT__ ) * AddTypeMap(TypeDict, "I" , __UNSIGNED__ ) * AddTypeMap(TypeDict, "L" , __UNSIGNED_LONG__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) * # (real) floating */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"L"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":38 * AddTypeMap(TypeDict, "I" , __UNSIGNED__ ) * AddTypeMap(TypeDict, "L" , __UNSIGNED_LONG__ ) * AddTypeMap(TypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) # <<<<<<<<<<<<<< * # (real) floating * AddTypeMap(TypeDict, "f" , __FLOAT__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG_LONG__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"Q"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":40 * AddTypeMap(TypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) * # (real) floating * AddTypeMap(TypeDict, "f" , __FLOAT__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "d" , __DOUBLE__ ) * AddTypeMap(TypeDict, "g" , __LONG_DOUBLE__ ) # PEP-3118 & NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___FLOAT__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"f"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":41 * # (real) floating * AddTypeMap(TypeDict, "f" , __FLOAT__ ) * AddTypeMap(TypeDict, "d" , __DOUBLE__ ) # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "g" , __LONG_DOUBLE__ ) # PEP-3118 & NumPy * # complex floating (F77) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"d"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":42 * AddTypeMap(TypeDict, "f" , __FLOAT__ ) * AddTypeMap(TypeDict, "d" , __DOUBLE__ ) * AddTypeMap(TypeDict, "g" , __LONG_DOUBLE__ ) # PEP-3118 & NumPy # <<<<<<<<<<<<<< * # complex floating (F77) * AddTypeMap(TypeDict, "Zf" , __COMPLEX__ ) # PEP-3118 */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_DOUBLE__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"g"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":44 * AddTypeMap(TypeDict, "g" , __LONG_DOUBLE__ ) # PEP-3118 & NumPy * # complex floating (F77) * AddTypeMap(TypeDict, "Zf" , __COMPLEX__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "Zd" , __DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __COMPLEX__ ) # NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"Zf"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":45 * # complex floating (F77) * AddTypeMap(TypeDict, "Zf" , __COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zd" , __DOUBLE_COMPLEX__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "F" , __COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "D" , __DOUBLE_COMPLEX__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"Zd"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":46 * AddTypeMap(TypeDict, "Zf" , __COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zd" , __DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "D" , __DOUBLE_COMPLEX__ ) # NumPy * # complex floating (F90) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"F"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 46, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":47 * AddTypeMap(TypeDict, "Zd" , __DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "D" , __DOUBLE_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * # complex floating (F90) * AddTypeMap(TypeDict, "Zf" , __COMPLEX8__ ) # PEP-3118 */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"D"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":49 * AddTypeMap(TypeDict, "D" , __DOUBLE_COMPLEX__ ) # NumPy * # complex floating (F90) * AddTypeMap(TypeDict, "Zf" , __COMPLEX8__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "Zd" , __COMPLEX16__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __COMPLEX8__ ) # NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX8__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"Zf"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":50 * # complex floating (F90) * AddTypeMap(TypeDict, "Zf" , __COMPLEX8__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zd" , __COMPLEX16__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "F" , __COMPLEX8__ ) # NumPy * AddTypeMap(TypeDict, "D" , __COMPLEX16__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX16__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"Zd"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":51 * AddTypeMap(TypeDict, "Zf" , __COMPLEX8__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zd" , __COMPLEX16__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __COMPLEX8__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "D" , __COMPLEX16__ ) # NumPy * # complex floating (C++) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX8__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"F"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 51, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":52 * AddTypeMap(TypeDict, "Zd" , __COMPLEX16__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __COMPLEX8__ ) # NumPy * AddTypeMap(TypeDict, "D" , __COMPLEX16__ ) # NumPy # <<<<<<<<<<<<<< * # complex floating (C++) * AddTypeMap(TypeDict, "Zf" , __CXX_FLOAT_COMPLEX__ ) # PEP-3118 */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX16__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"D"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":54 * AddTypeMap(TypeDict, "D" , __COMPLEX16__ ) # NumPy * # complex floating (C++) * AddTypeMap(TypeDict, "Zf" , __CXX_FLOAT_COMPLEX__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "Zd" , __CXX_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zg" , __CXX_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_FLOAT_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"Zf"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":55 * # complex floating (C++) * AddTypeMap(TypeDict, "Zf" , __CXX_FLOAT_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zd" , __CXX_DOUBLE_COMPLEX__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "Zg" , __CXX_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __CXX_FLOAT_COMPLEX__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"Zd"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":56 * AddTypeMap(TypeDict, "Zf" , __CXX_FLOAT_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zd" , __CXX_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zg" , __CXX_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "F" , __CXX_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "D" , __CXX_DOUBLE_COMPLEX__ ) # NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_LONG_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"Zg"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":57 * AddTypeMap(TypeDict, "Zd" , __CXX_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zg" , __CXX_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __CXX_FLOAT_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "D" , __CXX_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "G" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_FLOAT_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"F"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 57, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":58 * AddTypeMap(TypeDict, "Zg" , __CXX_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __CXX_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "D" , __CXX_DOUBLE_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "G" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy * # complex floating (C99) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"D"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":59 * AddTypeMap(TypeDict, "F" , __CXX_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "D" , __CXX_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "G" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * # complex floating (C99) * AddTypeMap(TypeDict, "Zf" , __C_FLOAT_COMPLEX__ ) # PEP-3118 */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_LONG_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"G"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":61 * AddTypeMap(TypeDict, "G" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy * # complex floating (C99) * AddTypeMap(TypeDict, "Zf" , __C_FLOAT_COMPLEX__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "Zd" , __C_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zg" , __C_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"Zf"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 61, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":62 * # complex floating (C99) * AddTypeMap(TypeDict, "Zf" , __C_FLOAT_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zd" , __C_DOUBLE_COMPLEX__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "Zg" , __C_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __C_FLOAT_COMPLEX__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"Zd"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":63 * AddTypeMap(TypeDict, "Zf" , __C_FLOAT_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zd" , __C_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zg" , __C_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "F" , __C_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "D" , __C_DOUBLE_COMPLEX__ ) # NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"Zg"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 63, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":64 * AddTypeMap(TypeDict, "Zd" , __C_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "Zg" , __C_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __C_FLOAT_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "D" , __C_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "G" , __C_LONG_DOUBLE_COMPLEX__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"F"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 64, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":65 * AddTypeMap(TypeDict, "Zg" , __C_LONG_DOUBLE_COMPLEX__ ) # PEP-3118 * AddTypeMap(TypeDict, "F" , __C_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "D" , __C_DOUBLE_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "G" , __C_LONG_DOUBLE_COMPLEX__ ) # NumPy * */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"D"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":66 * AddTypeMap(TypeDict, "F" , __C_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "D" , __C_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "G" , __C_LONG_DOUBLE_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * * # signed and unsigned integer (C) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"G"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":69 * * # signed and unsigned integer (C) * if sizeof(char) == 1: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i1" , __SIGNED_CHAR__ ) # NumPy * AddTypeMap(TypeDict, "u1" , __UNSIGNED_CHAR__ ) # NumPy */ __pyx_t_23 = (((sizeof(char)) == 1) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":70 * # signed and unsigned integer (C) * if sizeof(char) == 1: * AddTypeMap(TypeDict, "i1" , __SIGNED_CHAR__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u1" , __UNSIGNED_CHAR__ ) # NumPy * if sizeof(short) == 2: */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___SIGNED_CHAR__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i1"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":71 * if sizeof(char) == 1: * AddTypeMap(TypeDict, "i1" , __SIGNED_CHAR__ ) # NumPy * AddTypeMap(TypeDict, "u1" , __UNSIGNED_CHAR__ ) # NumPy # <<<<<<<<<<<<<< * if sizeof(short) == 2: * AddTypeMap(TypeDict, "i2" , __SHORT__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_CHAR__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u1"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":69 * * # signed and unsigned integer (C) * if sizeof(char) == 1: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i1" , __SIGNED_CHAR__ ) # NumPy * AddTypeMap(TypeDict, "u1" , __UNSIGNED_CHAR__ ) # NumPy */ } /* "mpi4py/MPI/typemap.pxi":72 * AddTypeMap(TypeDict, "i1" , __SIGNED_CHAR__ ) # NumPy * AddTypeMap(TypeDict, "u1" , __UNSIGNED_CHAR__ ) # NumPy * if sizeof(short) == 2: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i2" , __SHORT__ ) # NumPy * AddTypeMap(TypeDict, "u2" , __UNSIGNED_SHORT__ ) # NumPy */ __pyx_t_23 = (((sizeof(short)) == 2) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":73 * AddTypeMap(TypeDict, "u1" , __UNSIGNED_CHAR__ ) # NumPy * if sizeof(short) == 2: * AddTypeMap(TypeDict, "i2" , __SHORT__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u2" , __UNSIGNED_SHORT__ ) # NumPy * if sizeof(int) == 4: */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___SHORT__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i2"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 73, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":74 * if sizeof(short) == 2: * AddTypeMap(TypeDict, "i2" , __SHORT__ ) # NumPy * AddTypeMap(TypeDict, "u2" , __UNSIGNED_SHORT__ ) # NumPy # <<<<<<<<<<<<<< * if sizeof(int) == 4: * AddTypeMap(TypeDict, "i4" , __INT__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u2"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":72 * AddTypeMap(TypeDict, "i1" , __SIGNED_CHAR__ ) # NumPy * AddTypeMap(TypeDict, "u1" , __UNSIGNED_CHAR__ ) # NumPy * if sizeof(short) == 2: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i2" , __SHORT__ ) # NumPy * AddTypeMap(TypeDict, "u2" , __UNSIGNED_SHORT__ ) # NumPy */ } /* "mpi4py/MPI/typemap.pxi":75 * AddTypeMap(TypeDict, "i2" , __SHORT__ ) # NumPy * AddTypeMap(TypeDict, "u2" , __UNSIGNED_SHORT__ ) # NumPy * if sizeof(int) == 4: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i4" , __INT__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED__ ) # NumPy */ __pyx_t_23 = (((sizeof(int)) == 4) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":76 * AddTypeMap(TypeDict, "u2" , __UNSIGNED_SHORT__ ) # NumPy * if sizeof(int) == 4: * AddTypeMap(TypeDict, "i4" , __INT__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u4" , __UNSIGNED__ ) # NumPy * elif sizeof(long) == 4: */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i4"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 76, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":77 * if sizeof(int) == 4: * AddTypeMap(TypeDict, "i4" , __INT__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED__ ) # NumPy # <<<<<<<<<<<<<< * elif sizeof(long) == 4: * AddTypeMap(TypeDict, "i4" , __LONG__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u4"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 77, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":75 * AddTypeMap(TypeDict, "i2" , __SHORT__ ) # NumPy * AddTypeMap(TypeDict, "u2" , __UNSIGNED_SHORT__ ) # NumPy * if sizeof(int) == 4: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i4" , __INT__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED__ ) # NumPy */ goto __pyx_L74; } /* "mpi4py/MPI/typemap.pxi":78 * AddTypeMap(TypeDict, "i4" , __INT__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED__ ) # NumPy * elif sizeof(long) == 4: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i4" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED_LONG__ ) # NumPy */ __pyx_t_23 = (((sizeof(long)) == 4) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":79 * AddTypeMap(TypeDict, "u4" , __UNSIGNED__ ) # NumPy * elif sizeof(long) == 4: * AddTypeMap(TypeDict, "i4" , __LONG__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u4" , __UNSIGNED_LONG__ ) # NumPy * if sizeof(long) == 8: */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i4"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 79, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":80 * elif sizeof(long) == 4: * AddTypeMap(TypeDict, "i4" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED_LONG__ ) # NumPy # <<<<<<<<<<<<<< * if sizeof(long) == 8: * AddTypeMap(TypeDict, "i8" , __LONG__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u4"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":78 * AddTypeMap(TypeDict, "i4" , __INT__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED__ ) # NumPy * elif sizeof(long) == 4: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i4" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED_LONG__ ) # NumPy */ } __pyx_L74:; /* "mpi4py/MPI/typemap.pxi":81 * AddTypeMap(TypeDict, "i4" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED_LONG__ ) # NumPy * if sizeof(long) == 8: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i8" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG__ ) # NumPy */ __pyx_t_23 = (((sizeof(long)) == 8) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":82 * AddTypeMap(TypeDict, "u4" , __UNSIGNED_LONG__ ) # NumPy * if sizeof(long) == 8: * AddTypeMap(TypeDict, "i8" , __LONG__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG__ ) # NumPy * elif sizeof(long long) == 8: */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i8"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":83 * if sizeof(long) == 8: * AddTypeMap(TypeDict, "i8" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG__ ) # NumPy # <<<<<<<<<<<<<< * elif sizeof(long long) == 8: * AddTypeMap(TypeDict, "i8" , __LONG_LONG__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":81 * AddTypeMap(TypeDict, "i4" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UNSIGNED_LONG__ ) # NumPy * if sizeof(long) == 8: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i8" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG__ ) # NumPy */ goto __pyx_L75; } /* "mpi4py/MPI/typemap.pxi":84 * AddTypeMap(TypeDict, "i8" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG__ ) # NumPy * elif sizeof(long long) == 8: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i8" , __LONG_LONG__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG_LONG__ ) # NumPy */ __pyx_t_23 = (((sizeof(PY_LONG_LONG)) == 8) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":85 * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG__ ) # NumPy * elif sizeof(long long) == 8: * AddTypeMap(TypeDict, "i8" , __LONG_LONG__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG_LONG__ ) # NumPy * # signed integer (C99) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_LONG__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i8"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":86 * elif sizeof(long long) == 8: * AddTypeMap(TypeDict, "i8" , __LONG_LONG__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG_LONG__ ) # NumPy # <<<<<<<<<<<<<< * # signed integer (C99) * AddTypeMap(TypeDict, "i1" , __INT8_T__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG_LONG__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":84 * AddTypeMap(TypeDict, "i8" , __LONG__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG__ ) # NumPy * elif sizeof(long long) == 8: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i8" , __LONG_LONG__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG_LONG__ ) # NumPy */ } __pyx_L75:; /* "mpi4py/MPI/typemap.pxi":88 * AddTypeMap(TypeDict, "u8" , __UNSIGNED_LONG_LONG__ ) # NumPy * # signed integer (C99) * AddTypeMap(TypeDict, "i1" , __INT8_T__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i2" , __INT16_T__ ) # NumPy * AddTypeMap(TypeDict, "i4" , __INT32_T__ ) # NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT8_T__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i1"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":89 * # signed integer (C99) * AddTypeMap(TypeDict, "i1" , __INT8_T__ ) # NumPy * AddTypeMap(TypeDict, "i2" , __INT16_T__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i4" , __INT32_T__ ) # NumPy * AddTypeMap(TypeDict, "i8" , __INT64_T__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT16_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"i2"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":90 * AddTypeMap(TypeDict, "i1" , __INT8_T__ ) # NumPy * AddTypeMap(TypeDict, "i2" , __INT16_T__ ) # NumPy * AddTypeMap(TypeDict, "i4" , __INT32_T__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "i8" , __INT64_T__ ) # NumPy * # unsigned integer (C99) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT32_T__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i4"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":91 * AddTypeMap(TypeDict, "i2" , __INT16_T__ ) # NumPy * AddTypeMap(TypeDict, "i4" , __INT32_T__ ) # NumPy * AddTypeMap(TypeDict, "i8" , __INT64_T__ ) # NumPy # <<<<<<<<<<<<<< * # unsigned integer (C99) * AddTypeMap(TypeDict, "u1" , __UINT8_T__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT64_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"i8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":93 * AddTypeMap(TypeDict, "i8" , __INT64_T__ ) # NumPy * # unsigned integer (C99) * AddTypeMap(TypeDict, "u1" , __UINT8_T__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u2" , __UINT16_T__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UINT32_T__ ) # NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT8_T__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"u1"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":94 * # unsigned integer (C99) * AddTypeMap(TypeDict, "u1" , __UINT8_T__ ) # NumPy * AddTypeMap(TypeDict, "u2" , __UINT16_T__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u4" , __UINT32_T__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UINT64_T__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT16_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u2"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":95 * AddTypeMap(TypeDict, "u1" , __UINT8_T__ ) # NumPy * AddTypeMap(TypeDict, "u2" , __UINT16_T__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UINT32_T__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "u8" , __UINT64_T__ ) # NumPy * # real (C) and complex (C99) floating */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT32_T__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"u4"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":96 * AddTypeMap(TypeDict, "u2" , __UINT16_T__ ) # NumPy * AddTypeMap(TypeDict, "u4" , __UINT32_T__ ) # NumPy * AddTypeMap(TypeDict, "u8" , __UINT64_T__ ) # NumPy # <<<<<<<<<<<<<< * # real (C) and complex (C99) floating * if sizeof(float) == 4: */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT64_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 96, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":98 * AddTypeMap(TypeDict, "u8" , __UINT64_T__ ) # NumPy * # real (C) and complex (C99) floating * if sizeof(float) == 4: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "f4" , __FLOAT__ ) # NumPy * AddTypeMap(TypeDict, "c8" , __CXX_FLOAT_COMPLEX__ ) # NumPy */ __pyx_t_23 = (((sizeof(float)) == 4) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":99 * # real (C) and complex (C99) floating * if sizeof(float) == 4: * AddTypeMap(TypeDict, "f4" , __FLOAT__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "c8" , __CXX_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c8" , __C_FLOAT_COMPLEX__ ) # NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___FLOAT__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"f4"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":100 * if sizeof(float) == 4: * AddTypeMap(TypeDict, "f4" , __FLOAT__ ) # NumPy * AddTypeMap(TypeDict, "c8" , __CXX_FLOAT_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "c8" , __C_FLOAT_COMPLEX__ ) # NumPy * if sizeof(double) == 8: */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_FLOAT_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"c8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":101 * AddTypeMap(TypeDict, "f4" , __FLOAT__ ) # NumPy * AddTypeMap(TypeDict, "c8" , __CXX_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c8" , __C_FLOAT_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * if sizeof(double) == 8: * AddTypeMap(TypeDict, "f8" , __DOUBLE__ ) # NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"c8"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 101, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":98 * AddTypeMap(TypeDict, "u8" , __UINT64_T__ ) # NumPy * # real (C) and complex (C99) floating * if sizeof(float) == 4: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "f4" , __FLOAT__ ) # NumPy * AddTypeMap(TypeDict, "c8" , __CXX_FLOAT_COMPLEX__ ) # NumPy */ } /* "mpi4py/MPI/typemap.pxi":102 * AddTypeMap(TypeDict, "c8" , __CXX_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c8" , __C_FLOAT_COMPLEX__ ) # NumPy * if sizeof(double) == 8: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "f8" , __DOUBLE__ ) # NumPy * AddTypeMap(TypeDict, "c16" , __CXX_DOUBLE_COMPLEX__ ) # NumPy */ __pyx_t_23 = (((sizeof(double)) == 8) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":103 * AddTypeMap(TypeDict, "c8" , __C_FLOAT_COMPLEX__ ) # NumPy * if sizeof(double) == 8: * AddTypeMap(TypeDict, "f8" , __DOUBLE__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "c16" , __CXX_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"f8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":104 * if sizeof(double) == 8: * AddTypeMap(TypeDict, "f8" , __DOUBLE__ ) # NumPy * AddTypeMap(TypeDict, "c16" , __CXX_DOUBLE_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) # NumPy * if sizeof(long double) == 16: */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"c16"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":105 * AddTypeMap(TypeDict, "f8" , __DOUBLE__ ) # NumPy * AddTypeMap(TypeDict, "c16" , __CXX_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * if sizeof(long double) == 16: * AddTypeMap(TypeDict, "f16" , __LONG_DOUBLE__ ) # NumPy */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"c16"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":102 * AddTypeMap(TypeDict, "c8" , __CXX_FLOAT_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c8" , __C_FLOAT_COMPLEX__ ) # NumPy * if sizeof(double) == 8: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "f8" , __DOUBLE__ ) # NumPy * AddTypeMap(TypeDict, "c16" , __CXX_DOUBLE_COMPLEX__ ) # NumPy */ } /* "mpi4py/MPI/typemap.pxi":106 * AddTypeMap(TypeDict, "c16" , __CXX_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) # NumPy * if sizeof(long double) == 16: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "f16" , __LONG_DOUBLE__ ) # NumPy * AddTypeMap(TypeDict, "c32" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy */ __pyx_t_23 = (((sizeof(long double)) == 16) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":107 * AddTypeMap(TypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) # NumPy * if sizeof(long double) == 16: * AddTypeMap(TypeDict, "f16" , __LONG_DOUBLE__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "c32" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c32" , __C_LONG_DOUBLE_COMPLEX__ ) # NumPy */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_DOUBLE__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"f16"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":108 * if sizeof(long double) == 16: * AddTypeMap(TypeDict, "f16" , __LONG_DOUBLE__ ) # NumPy * AddTypeMap(TypeDict, "c32" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "c32" , __C_LONG_DOUBLE_COMPLEX__ ) # NumPy * */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_LONG_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"c32"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 108, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":109 * AddTypeMap(TypeDict, "f16" , __LONG_DOUBLE__ ) # NumPy * AddTypeMap(TypeDict, "c32" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c32" , __C_LONG_DOUBLE_COMPLEX__ ) # NumPy # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_TypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"c32"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":106 * AddTypeMap(TypeDict, "c16" , __CXX_DOUBLE_COMPLEX__ ) # NumPy * AddTypeMap(TypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) # NumPy * if sizeof(long double) == 16: # <<<<<<<<<<<<<< * AddTypeMap(TypeDict, "f16" , __LONG_DOUBLE__ ) # NumPy * AddTypeMap(TypeDict, "c32" , __CXX_LONG_DOUBLE_COMPLEX__ ) # NumPy */ } /* "mpi4py/MPI/typemap.pxi":113 * # ----------------------------------------------------------------------------- * * cdef dict CTypeDict = { } # <<<<<<<<<<<<<< * _typedict_c = CTypeDict * */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(22, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_CTypeDict); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_CTypeDict, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":114 * * cdef dict CTypeDict = { } * _typedict_c = CTypeDict # <<<<<<<<<<<<<< * * AddTypeMap(CTypeDict, "?" , __C_BOOL__ ) */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_typedict_c, __pyx_v_6mpi4py_3MPI_CTypeDict) < 0) __PYX_ERR(22, 114, __pyx_L1_error) /* "mpi4py/MPI/typemap.pxi":116 * _typedict_c = CTypeDict * * AddTypeMap(CTypeDict, "?" , __C_BOOL__ ) # <<<<<<<<<<<<<< * * AddTypeMap(CTypeDict, "b" , __SIGNED_CHAR__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_BOOL__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"?"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":118 * AddTypeMap(CTypeDict, "?" , __C_BOOL__ ) * * AddTypeMap(CTypeDict, "b" , __SIGNED_CHAR__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "h" , __SHORT__ ) * AddTypeMap(CTypeDict, "i" , __INT__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___SIGNED_CHAR__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"b"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 118, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":119 * * AddTypeMap(CTypeDict, "b" , __SIGNED_CHAR__ ) * AddTypeMap(CTypeDict, "h" , __SHORT__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "i" , __INT__ ) * AddTypeMap(CTypeDict, "l" , __LONG__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___SHORT__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"h"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":120 * AddTypeMap(CTypeDict, "b" , __SIGNED_CHAR__ ) * AddTypeMap(CTypeDict, "h" , __SHORT__ ) * AddTypeMap(CTypeDict, "i" , __INT__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "l" , __LONG__ ) * AddTypeMap(CTypeDict, "q" , __LONG_LONG__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":121 * AddTypeMap(CTypeDict, "h" , __SHORT__ ) * AddTypeMap(CTypeDict, "i" , __INT__ ) * AddTypeMap(CTypeDict, "l" , __LONG__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "q" , __LONG_LONG__ ) * */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"l"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":122 * AddTypeMap(CTypeDict, "i" , __INT__ ) * AddTypeMap(CTypeDict, "l" , __LONG__ ) * AddTypeMap(CTypeDict, "q" , __LONG_LONG__ ) # <<<<<<<<<<<<<< * * AddTypeMap(CTypeDict, "B" , __UNSIGNED_CHAR__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_LONG__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"q"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":124 * AddTypeMap(CTypeDict, "q" , __LONG_LONG__ ) * * AddTypeMap(CTypeDict, "B" , __UNSIGNED_CHAR__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "H" , __UNSIGNED_SHORT__ ) * AddTypeMap(CTypeDict, "I" , __UNSIGNED__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_CHAR__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"B"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":125 * * AddTypeMap(CTypeDict, "B" , __UNSIGNED_CHAR__ ) * AddTypeMap(CTypeDict, "H" , __UNSIGNED_SHORT__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "I" , __UNSIGNED__ ) * AddTypeMap(CTypeDict, "L" , __UNSIGNED_LONG__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"H"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":126 * AddTypeMap(CTypeDict, "B" , __UNSIGNED_CHAR__ ) * AddTypeMap(CTypeDict, "H" , __UNSIGNED_SHORT__ ) * AddTypeMap(CTypeDict, "I" , __UNSIGNED__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "L" , __UNSIGNED_LONG__ ) * AddTypeMap(CTypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"I"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":127 * AddTypeMap(CTypeDict, "H" , __UNSIGNED_SHORT__ ) * AddTypeMap(CTypeDict, "I" , __UNSIGNED__ ) * AddTypeMap(CTypeDict, "L" , __UNSIGNED_LONG__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) * */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"L"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":128 * AddTypeMap(CTypeDict, "I" , __UNSIGNED__ ) * AddTypeMap(CTypeDict, "L" , __UNSIGNED_LONG__ ) * AddTypeMap(CTypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) # <<<<<<<<<<<<<< * * AddTypeMap(CTypeDict, "f" , __FLOAT__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG_LONG__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"Q"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":130 * AddTypeMap(CTypeDict, "Q" , __UNSIGNED_LONG_LONG__ ) * * AddTypeMap(CTypeDict, "f" , __FLOAT__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "d" , __DOUBLE__ ) * AddTypeMap(CTypeDict, "g" , __LONG_DOUBLE__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___FLOAT__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"f"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":131 * * AddTypeMap(CTypeDict, "f" , __FLOAT__ ) * AddTypeMap(CTypeDict, "d" , __DOUBLE__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "g" , __LONG_DOUBLE__ ) * */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"d"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":132 * AddTypeMap(CTypeDict, "f" , __FLOAT__ ) * AddTypeMap(CTypeDict, "d" , __DOUBLE__ ) * AddTypeMap(CTypeDict, "g" , __LONG_DOUBLE__ ) # <<<<<<<<<<<<<< * * AddTypeMap(CTypeDict, "F" , __C_FLOAT_COMPLEX__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_DOUBLE__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"g"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":134 * AddTypeMap(CTypeDict, "g" , __LONG_DOUBLE__ ) * * AddTypeMap(CTypeDict, "F" , __C_FLOAT_COMPLEX__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "D" , __C_DOUBLE_COMPLEX__ ) * AddTypeMap(CTypeDict, "G" , __C_LONG_DOUBLE_COMPLEX__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"F"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":135 * * AddTypeMap(CTypeDict, "F" , __C_FLOAT_COMPLEX__ ) * AddTypeMap(CTypeDict, "D" , __C_DOUBLE_COMPLEX__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "G" , __C_LONG_DOUBLE_COMPLEX__ ) * */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"D"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 135, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":136 * AddTypeMap(CTypeDict, "F" , __C_FLOAT_COMPLEX__ ) * AddTypeMap(CTypeDict, "D" , __C_DOUBLE_COMPLEX__ ) * AddTypeMap(CTypeDict, "G" , __C_LONG_DOUBLE_COMPLEX__ ) # <<<<<<<<<<<<<< * * AddTypeMap(CTypeDict, "i1" , __INT8_T__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"G"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":138 * AddTypeMap(CTypeDict, "G" , __C_LONG_DOUBLE_COMPLEX__ ) * * AddTypeMap(CTypeDict, "i1" , __INT8_T__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "i2" , __INT16_T__ ) * AddTypeMap(CTypeDict, "i4" , __INT32_T__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT8_T__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i1"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":139 * * AddTypeMap(CTypeDict, "i1" , __INT8_T__ ) * AddTypeMap(CTypeDict, "i2" , __INT16_T__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "i4" , __INT32_T__ ) * AddTypeMap(CTypeDict, "i8" , __INT64_T__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT16_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"i2"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":140 * AddTypeMap(CTypeDict, "i1" , __INT8_T__ ) * AddTypeMap(CTypeDict, "i2" , __INT16_T__ ) * AddTypeMap(CTypeDict, "i4" , __INT32_T__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "i8" , __INT64_T__ ) * */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT32_T__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i4"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 140, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":141 * AddTypeMap(CTypeDict, "i2" , __INT16_T__ ) * AddTypeMap(CTypeDict, "i4" , __INT32_T__ ) * AddTypeMap(CTypeDict, "i8" , __INT64_T__ ) # <<<<<<<<<<<<<< * * AddTypeMap(CTypeDict, "u1" , __UINT8_T__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INT64_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"i8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":143 * AddTypeMap(CTypeDict, "i8" , __INT64_T__ ) * * AddTypeMap(CTypeDict, "u1" , __UINT8_T__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "u2" , __UINT16_T__ ) * AddTypeMap(CTypeDict, "u4" , __UINT32_T__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT8_T__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"u1"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":144 * * AddTypeMap(CTypeDict, "u1" , __UINT8_T__ ) * AddTypeMap(CTypeDict, "u2" , __UINT16_T__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "u4" , __UINT32_T__ ) * AddTypeMap(CTypeDict, "u8" , __UINT64_T__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT16_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u2"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":145 * AddTypeMap(CTypeDict, "u1" , __UINT8_T__ ) * AddTypeMap(CTypeDict, "u2" , __UINT16_T__ ) * AddTypeMap(CTypeDict, "u4" , __UINT32_T__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "u8" , __UINT64_T__ ) * */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT32_T__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"u4"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":146 * AddTypeMap(CTypeDict, "u2" , __UINT16_T__ ) * AddTypeMap(CTypeDict, "u4" , __UINT32_T__ ) * AddTypeMap(CTypeDict, "u8" , __UINT64_T__ ) # <<<<<<<<<<<<<< * * if sizeof(float) == 4: */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT64_T__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"u8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":148 * AddTypeMap(CTypeDict, "u8" , __UINT64_T__ ) * * if sizeof(float) == 4: # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "f4" , __FLOAT__ ) * AddTypeMap(CTypeDict, "c8" , __C_FLOAT_COMPLEX__ ) */ __pyx_t_23 = (((sizeof(float)) == 4) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":149 * * if sizeof(float) == 4: * AddTypeMap(CTypeDict, "f4" , __FLOAT__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "c8" , __C_FLOAT_COMPLEX__ ) * if sizeof(double) == 8: */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___FLOAT__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"f4"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":150 * if sizeof(float) == 4: * AddTypeMap(CTypeDict, "f4" , __FLOAT__ ) * AddTypeMap(CTypeDict, "c8" , __C_FLOAT_COMPLEX__ ) # <<<<<<<<<<<<<< * if sizeof(double) == 8: * AddTypeMap(CTypeDict, "f8" , __DOUBLE__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"c8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":148 * AddTypeMap(CTypeDict, "u8" , __UINT64_T__ ) * * if sizeof(float) == 4: # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "f4" , __FLOAT__ ) * AddTypeMap(CTypeDict, "c8" , __C_FLOAT_COMPLEX__ ) */ } /* "mpi4py/MPI/typemap.pxi":151 * AddTypeMap(CTypeDict, "f4" , __FLOAT__ ) * AddTypeMap(CTypeDict, "c8" , __C_FLOAT_COMPLEX__ ) * if sizeof(double) == 8: # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "f8" , __DOUBLE__ ) * AddTypeMap(CTypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) */ __pyx_t_23 = (((sizeof(double)) == 8) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":152 * AddTypeMap(CTypeDict, "c8" , __C_FLOAT_COMPLEX__ ) * if sizeof(double) == 8: * AddTypeMap(CTypeDict, "f8" , __DOUBLE__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) * if sizeof(long double) == 16: */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"f8"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":153 * if sizeof(double) == 8: * AddTypeMap(CTypeDict, "f8" , __DOUBLE__ ) * AddTypeMap(CTypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) # <<<<<<<<<<<<<< * if sizeof(long double) == 16: * AddTypeMap(CTypeDict, "f16" , __LONG_DOUBLE__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"c16"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":151 * AddTypeMap(CTypeDict, "f4" , __FLOAT__ ) * AddTypeMap(CTypeDict, "c8" , __C_FLOAT_COMPLEX__ ) * if sizeof(double) == 8: # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "f8" , __DOUBLE__ ) * AddTypeMap(CTypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) */ } /* "mpi4py/MPI/typemap.pxi":154 * AddTypeMap(CTypeDict, "f8" , __DOUBLE__ ) * AddTypeMap(CTypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) * if sizeof(long double) == 16: # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "f16" , __LONG_DOUBLE__ ) * AddTypeMap(CTypeDict, "c32" , __C_LONG_DOUBLE_COMPLEX__ ) */ __pyx_t_23 = (((sizeof(long double)) == 16) != 0); if (__pyx_t_23) { /* "mpi4py/MPI/typemap.pxi":155 * AddTypeMap(CTypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) * if sizeof(long double) == 16: * AddTypeMap(CTypeDict, "f16" , __LONG_DOUBLE__ ) # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "c32" , __C_LONG_DOUBLE_COMPLEX__ ) * */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_DOUBLE__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"f16"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":156 * if sizeof(long double) == 16: * AddTypeMap(CTypeDict, "f16" , __LONG_DOUBLE__ ) * AddTypeMap(CTypeDict, "c32" , __C_LONG_DOUBLE_COMPLEX__ ) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_CTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"c32"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":154 * AddTypeMap(CTypeDict, "f8" , __DOUBLE__ ) * AddTypeMap(CTypeDict, "c16" , __C_DOUBLE_COMPLEX__ ) * if sizeof(long double) == 16: # <<<<<<<<<<<<<< * AddTypeMap(CTypeDict, "f16" , __LONG_DOUBLE__ ) * AddTypeMap(CTypeDict, "c32" , __C_LONG_DOUBLE_COMPLEX__ ) */ } /* "mpi4py/MPI/typemap.pxi":160 * # ----------------------------------------------------------------------------- * * cdef dict FTypeDict = { } # <<<<<<<<<<<<<< * _typedict_f = FTypeDict * */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(22, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_v_6mpi4py_3MPI_FTypeDict); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI_FTypeDict, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":161 * * cdef dict FTypeDict = { } * _typedict_f = FTypeDict # <<<<<<<<<<<<<< * * AddTypeMap(FTypeDict, "?" , __LOGICAL__ ) */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_typedict_f, __pyx_v_6mpi4py_3MPI_FTypeDict) < 0) __PYX_ERR(22, 161, __pyx_L1_error) /* "mpi4py/MPI/typemap.pxi":163 * _typedict_f = FTypeDict * * AddTypeMap(FTypeDict, "?" , __LOGICAL__ ) # <<<<<<<<<<<<<< * * AddTypeMap(FTypeDict, "i" , __INTEGER__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"?"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":165 * AddTypeMap(FTypeDict, "?" , __LOGICAL__ ) * * AddTypeMap(FTypeDict, "i" , __INTEGER__ ) # <<<<<<<<<<<<<< * * AddTypeMap(FTypeDict, "s" , __REAL__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"i"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":167 * AddTypeMap(FTypeDict, "i" , __INTEGER__ ) * * AddTypeMap(FTypeDict, "s" , __REAL__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "r" , __REAL__ ) * AddTypeMap(FTypeDict, "d" , __DOUBLE_PRECISION__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"s"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":168 * * AddTypeMap(FTypeDict, "s" , __REAL__ ) * AddTypeMap(FTypeDict, "r" , __REAL__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "d" , __DOUBLE_PRECISION__ ) * AddTypeMap(FTypeDict, "c" , __COMPLEX__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"r"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":169 * AddTypeMap(FTypeDict, "s" , __REAL__ ) * AddTypeMap(FTypeDict, "r" , __REAL__ ) * AddTypeMap(FTypeDict, "d" , __DOUBLE_PRECISION__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "c" , __COMPLEX__ ) * AddTypeMap(FTypeDict, "z" , __DOUBLE_COMPLEX__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_PRECISION__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"d"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":170 * AddTypeMap(FTypeDict, "r" , __REAL__ ) * AddTypeMap(FTypeDict, "d" , __DOUBLE_PRECISION__ ) * AddTypeMap(FTypeDict, "c" , __COMPLEX__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "z" , __DOUBLE_COMPLEX__ ) * */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"c"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 170, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":171 * AddTypeMap(FTypeDict, "d" , __DOUBLE_PRECISION__ ) * AddTypeMap(FTypeDict, "c" , __COMPLEX__ ) * AddTypeMap(FTypeDict, "z" , __DOUBLE_COMPLEX__ ) # <<<<<<<<<<<<<< * * AddTypeMap(FTypeDict, "?1" , __LOGICAL1__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"z"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":173 * AddTypeMap(FTypeDict, "z" , __DOUBLE_COMPLEX__ ) * * AddTypeMap(FTypeDict, "?1" , __LOGICAL1__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "?2" , __LOGICAL2__ ) * AddTypeMap(FTypeDict, "?4" , __LOGICAL4__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL1__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"?1"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":174 * * AddTypeMap(FTypeDict, "?1" , __LOGICAL1__ ) * AddTypeMap(FTypeDict, "?2" , __LOGICAL2__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "?4" , __LOGICAL4__ ) * AddTypeMap(FTypeDict, "?8" , __LOGICAL8__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL2__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"?2"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":175 * AddTypeMap(FTypeDict, "?1" , __LOGICAL1__ ) * AddTypeMap(FTypeDict, "?2" , __LOGICAL2__ ) * AddTypeMap(FTypeDict, "?4" , __LOGICAL4__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "?8" , __LOGICAL8__ ) * */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL4__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"?4"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":176 * AddTypeMap(FTypeDict, "?2" , __LOGICAL2__ ) * AddTypeMap(FTypeDict, "?4" , __LOGICAL4__ ) * AddTypeMap(FTypeDict, "?8" , __LOGICAL8__ ) # <<<<<<<<<<<<<< * * AddTypeMap(FTypeDict, "i1" , __INTEGER1__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL8__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"?8"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":178 * AddTypeMap(FTypeDict, "?8" , __LOGICAL8__ ) * * AddTypeMap(FTypeDict, "i1" , __INTEGER1__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "i2" , __INTEGER2__ ) * AddTypeMap(FTypeDict, "i4" , __INTEGER4__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER1__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"i1"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":179 * * AddTypeMap(FTypeDict, "i1" , __INTEGER1__ ) * AddTypeMap(FTypeDict, "i2" , __INTEGER2__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "i4" , __INTEGER4__ ) * AddTypeMap(FTypeDict, "i8" , __INTEGER8__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER2__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i2"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":180 * AddTypeMap(FTypeDict, "i1" , __INTEGER1__ ) * AddTypeMap(FTypeDict, "i2" , __INTEGER2__ ) * AddTypeMap(FTypeDict, "i4" , __INTEGER4__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "i8" , __INTEGER8__ ) * AddTypeMap(FTypeDict, "i16" , __INTEGER16__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER4__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"i4"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":181 * AddTypeMap(FTypeDict, "i2" , __INTEGER2__ ) * AddTypeMap(FTypeDict, "i4" , __INTEGER4__ ) * AddTypeMap(FTypeDict, "i8" , __INTEGER8__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "i16" , __INTEGER16__ ) * */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER8__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"i8"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":182 * AddTypeMap(FTypeDict, "i4" , __INTEGER4__ ) * AddTypeMap(FTypeDict, "i8" , __INTEGER8__ ) * AddTypeMap(FTypeDict, "i16" , __INTEGER16__ ) # <<<<<<<<<<<<<< * * AddTypeMap(FTypeDict, "r2" , __REAL2__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER16__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"i16"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":184 * AddTypeMap(FTypeDict, "i16" , __INTEGER16__ ) * * AddTypeMap(FTypeDict, "r2" , __REAL2__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "r4" , __REAL4__ ) * AddTypeMap(FTypeDict, "r8" , __REAL8__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL2__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"r2"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":185 * * AddTypeMap(FTypeDict, "r2" , __REAL2__ ) * AddTypeMap(FTypeDict, "r4" , __REAL4__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "r8" , __REAL8__ ) * AddTypeMap(FTypeDict, "r16" , __REAL16__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL4__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"r4"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":186 * AddTypeMap(FTypeDict, "r2" , __REAL2__ ) * AddTypeMap(FTypeDict, "r4" , __REAL4__ ) * AddTypeMap(FTypeDict, "r8" , __REAL8__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "r16" , __REAL16__ ) * */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL8__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"r8"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":187 * AddTypeMap(FTypeDict, "r4" , __REAL4__ ) * AddTypeMap(FTypeDict, "r8" , __REAL8__ ) * AddTypeMap(FTypeDict, "r16" , __REAL16__ ) # <<<<<<<<<<<<<< * * AddTypeMap(FTypeDict, "c4" , __COMPLEX4__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL16__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"r16"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":189 * AddTypeMap(FTypeDict, "r16" , __REAL16__ ) * * AddTypeMap(FTypeDict, "c4" , __COMPLEX4__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "c8" , __COMPLEX8__ ) * AddTypeMap(FTypeDict, "c16" , __COMPLEX16__ ) */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX4__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"c4"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":190 * * AddTypeMap(FTypeDict, "c4" , __COMPLEX4__ ) * AddTypeMap(FTypeDict, "c8" , __COMPLEX8__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "c16" , __COMPLEX16__ ) * AddTypeMap(FTypeDict, "c32" , __COMPLEX32__ ) */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX8__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"c8"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typemap.pxi":191 * AddTypeMap(FTypeDict, "c4" , __COMPLEX4__ ) * AddTypeMap(FTypeDict, "c8" , __COMPLEX8__ ) * AddTypeMap(FTypeDict, "c16" , __COMPLEX16__ ) # <<<<<<<<<<<<<< * AddTypeMap(FTypeDict, "c32" , __COMPLEX32__ ) * */ __pyx_t_3 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX16__); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_3), ((char const *)"c16"), ((struct PyMPIDatatypeObject *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/typemap.pxi":192 * AddTypeMap(FTypeDict, "c8" , __COMPLEX8__ ) * AddTypeMap(FTypeDict, "c16" , __COMPLEX16__ ) * AddTypeMap(FTypeDict, "c32" , __COMPLEX32__ ) # <<<<<<<<<<<<<< * * # ----------------------------------------------------------------------------- */ __pyx_t_1 = __pyx_v_6mpi4py_3MPI_FTypeDict; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX32__); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_f_6mpi4py_3MPI_AddTypeMap(((PyObject*)__pyx_t_1), ((char const *)"c32"), ((struct PyMPIDatatypeObject *)__pyx_t_3)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(22, 192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/typestr.pxi":3 * # ----------------------------------------------------------------------------- * * def _typecode(Datatype datatype): # <<<<<<<<<<<<<< * """ * Map MPI datatype to typecode string */ __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_21_typecode, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_3)) __PYX_ERR(23, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_typecode_2, __pyx_t_3) < 0) __PYX_ERR(23, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Datatype.pyx":953 * # --------------------------- * * DATATYPE_NULL = __DATATYPE_NULL__ #: Null datatype handle # <<<<<<<<<<<<<< * # Deprecated datatypes (since MPI-2) * UB = __UB__ #: upper-bound marker */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DATATYPE_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___DATATYPE_NULL__)) < 0) __PYX_ERR(21, 953, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":955 * DATATYPE_NULL = __DATATYPE_NULL__ #: Null datatype handle * # Deprecated datatypes (since MPI-2) * UB = __UB__ #: upper-bound marker # <<<<<<<<<<<<<< * LB = __LB__ #: lower-bound marker * # MPI-specific datatypes */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UB, ((PyObject *)__pyx_v_6mpi4py_3MPI___UB__)) < 0) __PYX_ERR(21, 955, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":956 * # Deprecated datatypes (since MPI-2) * UB = __UB__ #: upper-bound marker * LB = __LB__ #: lower-bound marker # <<<<<<<<<<<<<< * # MPI-specific datatypes * PACKED = __PACKED__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LB, ((PyObject *)__pyx_v_6mpi4py_3MPI___LB__)) < 0) __PYX_ERR(21, 956, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":958 * LB = __LB__ #: lower-bound marker * # MPI-specific datatypes * PACKED = __PACKED__ # <<<<<<<<<<<<<< * BYTE = __BYTE__ * AINT = __AINT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PACKED, ((PyObject *)__pyx_v_6mpi4py_3MPI___PACKED__)) < 0) __PYX_ERR(21, 958, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":959 * # MPI-specific datatypes * PACKED = __PACKED__ * BYTE = __BYTE__ # <<<<<<<<<<<<<< * AINT = __AINT__ * OFFSET = __OFFSET__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_BYTE, ((PyObject *)__pyx_v_6mpi4py_3MPI___BYTE__)) < 0) __PYX_ERR(21, 959, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":960 * PACKED = __PACKED__ * BYTE = __BYTE__ * AINT = __AINT__ # <<<<<<<<<<<<<< * OFFSET = __OFFSET__ * COUNT = __COUNT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_AINT, ((PyObject *)__pyx_v_6mpi4py_3MPI___AINT__)) < 0) __PYX_ERR(21, 960, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":961 * BYTE = __BYTE__ * AINT = __AINT__ * OFFSET = __OFFSET__ # <<<<<<<<<<<<<< * COUNT = __COUNT__ * # Elementary C datatypes */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_OFFSET, ((PyObject *)__pyx_v_6mpi4py_3MPI___OFFSET__)) < 0) __PYX_ERR(21, 961, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":962 * AINT = __AINT__ * OFFSET = __OFFSET__ * COUNT = __COUNT__ # <<<<<<<<<<<<<< * # Elementary C datatypes * CHAR = __CHAR__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COUNT, ((PyObject *)__pyx_v_6mpi4py_3MPI___COUNT__)) < 0) __PYX_ERR(21, 962, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":964 * COUNT = __COUNT__ * # Elementary C datatypes * CHAR = __CHAR__ # <<<<<<<<<<<<<< * WCHAR = __WCHAR__ * SIGNED_CHAR = __SIGNED_CHAR__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CHAR, ((PyObject *)__pyx_v_6mpi4py_3MPI___CHAR__)) < 0) __PYX_ERR(21, 964, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":965 * # Elementary C datatypes * CHAR = __CHAR__ * WCHAR = __WCHAR__ # <<<<<<<<<<<<<< * SIGNED_CHAR = __SIGNED_CHAR__ * SHORT = __SHORT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_WCHAR, ((PyObject *)__pyx_v_6mpi4py_3MPI___WCHAR__)) < 0) __PYX_ERR(21, 965, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":966 * CHAR = __CHAR__ * WCHAR = __WCHAR__ * SIGNED_CHAR = __SIGNED_CHAR__ # <<<<<<<<<<<<<< * SHORT = __SHORT__ * INT = __INT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIGNED_CHAR, ((PyObject *)__pyx_v_6mpi4py_3MPI___SIGNED_CHAR__)) < 0) __PYX_ERR(21, 966, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":967 * WCHAR = __WCHAR__ * SIGNED_CHAR = __SIGNED_CHAR__ * SHORT = __SHORT__ # <<<<<<<<<<<<<< * INT = __INT__ * LONG = __LONG__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SHORT, ((PyObject *)__pyx_v_6mpi4py_3MPI___SHORT__)) < 0) __PYX_ERR(21, 967, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":968 * SIGNED_CHAR = __SIGNED_CHAR__ * SHORT = __SHORT__ * INT = __INT__ # <<<<<<<<<<<<<< * LONG = __LONG__ * LONG_LONG = __LONG_LONG__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT__)) < 0) __PYX_ERR(21, 968, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":969 * SHORT = __SHORT__ * INT = __INT__ * LONG = __LONG__ # <<<<<<<<<<<<<< * LONG_LONG = __LONG_LONG__ * UNSIGNED_CHAR = __UNSIGNED_CHAR__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LONG, ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG__)) < 0) __PYX_ERR(21, 969, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":970 * INT = __INT__ * LONG = __LONG__ * LONG_LONG = __LONG_LONG__ # <<<<<<<<<<<<<< * UNSIGNED_CHAR = __UNSIGNED_CHAR__ * UNSIGNED_SHORT = __UNSIGNED_SHORT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LONG_LONG, ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_LONG__)) < 0) __PYX_ERR(21, 970, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":971 * LONG = __LONG__ * LONG_LONG = __LONG_LONG__ * UNSIGNED_CHAR = __UNSIGNED_CHAR__ # <<<<<<<<<<<<<< * UNSIGNED_SHORT = __UNSIGNED_SHORT__ * UNSIGNED = __UNSIGNED__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNSIGNED_CHAR, ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_CHAR__)) < 0) __PYX_ERR(21, 971, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":972 * LONG_LONG = __LONG_LONG__ * UNSIGNED_CHAR = __UNSIGNED_CHAR__ * UNSIGNED_SHORT = __UNSIGNED_SHORT__ # <<<<<<<<<<<<<< * UNSIGNED = __UNSIGNED__ * UNSIGNED_LONG = __UNSIGNED_LONG__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNSIGNED_SHORT, ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_SHORT__)) < 0) __PYX_ERR(21, 972, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":973 * UNSIGNED_CHAR = __UNSIGNED_CHAR__ * UNSIGNED_SHORT = __UNSIGNED_SHORT__ * UNSIGNED = __UNSIGNED__ # <<<<<<<<<<<<<< * UNSIGNED_LONG = __UNSIGNED_LONG__ * UNSIGNED_LONG_LONG = __UNSIGNED_LONG_LONG__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNSIGNED, ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED__)) < 0) __PYX_ERR(21, 973, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":974 * UNSIGNED_SHORT = __UNSIGNED_SHORT__ * UNSIGNED = __UNSIGNED__ * UNSIGNED_LONG = __UNSIGNED_LONG__ # <<<<<<<<<<<<<< * UNSIGNED_LONG_LONG = __UNSIGNED_LONG_LONG__ * FLOAT = __FLOAT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNSIGNED_LONG, ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG__)) < 0) __PYX_ERR(21, 974, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":975 * UNSIGNED = __UNSIGNED__ * UNSIGNED_LONG = __UNSIGNED_LONG__ * UNSIGNED_LONG_LONG = __UNSIGNED_LONG_LONG__ # <<<<<<<<<<<<<< * FLOAT = __FLOAT__ * DOUBLE = __DOUBLE__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNSIGNED_LONG_LONG, ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED_LONG_LONG__)) < 0) __PYX_ERR(21, 975, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":976 * UNSIGNED_LONG = __UNSIGNED_LONG__ * UNSIGNED_LONG_LONG = __UNSIGNED_LONG_LONG__ * FLOAT = __FLOAT__ # <<<<<<<<<<<<<< * DOUBLE = __DOUBLE__ * LONG_DOUBLE = __LONG_DOUBLE__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FLOAT, ((PyObject *)__pyx_v_6mpi4py_3MPI___FLOAT__)) < 0) __PYX_ERR(21, 976, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":977 * UNSIGNED_LONG_LONG = __UNSIGNED_LONG_LONG__ * FLOAT = __FLOAT__ * DOUBLE = __DOUBLE__ # <<<<<<<<<<<<<< * LONG_DOUBLE = __LONG_DOUBLE__ * # C99 datatypes */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DOUBLE, ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE__)) < 0) __PYX_ERR(21, 977, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":978 * FLOAT = __FLOAT__ * DOUBLE = __DOUBLE__ * LONG_DOUBLE = __LONG_DOUBLE__ # <<<<<<<<<<<<<< * # C99 datatypes * C_BOOL = __C_BOOL__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LONG_DOUBLE, ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_DOUBLE__)) < 0) __PYX_ERR(21, 978, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":980 * LONG_DOUBLE = __LONG_DOUBLE__ * # C99 datatypes * C_BOOL = __C_BOOL__ # <<<<<<<<<<<<<< * INT8_T = __INT8_T__ * INT16_T = __INT16_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_C_BOOL, ((PyObject *)__pyx_v_6mpi4py_3MPI___C_BOOL__)) < 0) __PYX_ERR(21, 980, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":981 * # C99 datatypes * C_BOOL = __C_BOOL__ * INT8_T = __INT8_T__ # <<<<<<<<<<<<<< * INT16_T = __INT16_T__ * INT32_T = __INT32_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INT8_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT8_T__)) < 0) __PYX_ERR(21, 981, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":982 * C_BOOL = __C_BOOL__ * INT8_T = __INT8_T__ * INT16_T = __INT16_T__ # <<<<<<<<<<<<<< * INT32_T = __INT32_T__ * INT64_T = __INT64_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INT16_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT16_T__)) < 0) __PYX_ERR(21, 982, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":983 * INT8_T = __INT8_T__ * INT16_T = __INT16_T__ * INT32_T = __INT32_T__ # <<<<<<<<<<<<<< * INT64_T = __INT64_T__ * UINT8_T = __UINT8_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INT32_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT32_T__)) < 0) __PYX_ERR(21, 983, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":984 * INT16_T = __INT16_T__ * INT32_T = __INT32_T__ * INT64_T = __INT64_T__ # <<<<<<<<<<<<<< * UINT8_T = __UINT8_T__ * UINT16_T = __UINT16_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INT64_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT64_T__)) < 0) __PYX_ERR(21, 984, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":985 * INT32_T = __INT32_T__ * INT64_T = __INT64_T__ * UINT8_T = __UINT8_T__ # <<<<<<<<<<<<<< * UINT16_T = __UINT16_T__ * UINT32_T = __UINT32_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UINT8_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT8_T__)) < 0) __PYX_ERR(21, 985, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":986 * INT64_T = __INT64_T__ * UINT8_T = __UINT8_T__ * UINT16_T = __UINT16_T__ # <<<<<<<<<<<<<< * UINT32_T = __UINT32_T__ * UINT64_T = __UINT64_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UINT16_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT16_T__)) < 0) __PYX_ERR(21, 986, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":987 * UINT8_T = __UINT8_T__ * UINT16_T = __UINT16_T__ * UINT32_T = __UINT32_T__ # <<<<<<<<<<<<<< * UINT64_T = __UINT64_T__ * C_COMPLEX = __C_COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UINT32_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT32_T__)) < 0) __PYX_ERR(21, 987, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":988 * UINT16_T = __UINT16_T__ * UINT32_T = __UINT32_T__ * UINT64_T = __UINT64_T__ # <<<<<<<<<<<<<< * C_COMPLEX = __C_COMPLEX__ * C_FLOAT_COMPLEX = __C_FLOAT_COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UINT64_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___UINT64_T__)) < 0) __PYX_ERR(21, 988, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":989 * UINT32_T = __UINT32_T__ * UINT64_T = __UINT64_T__ * C_COMPLEX = __C_COMPLEX__ # <<<<<<<<<<<<<< * C_FLOAT_COMPLEX = __C_FLOAT_COMPLEX__ * C_DOUBLE_COMPLEX = __C_DOUBLE_COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_C_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___C_COMPLEX__)) < 0) __PYX_ERR(21, 989, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":990 * UINT64_T = __UINT64_T__ * C_COMPLEX = __C_COMPLEX__ * C_FLOAT_COMPLEX = __C_FLOAT_COMPLEX__ # <<<<<<<<<<<<<< * C_DOUBLE_COMPLEX = __C_DOUBLE_COMPLEX__ * C_LONG_DOUBLE_COMPLEX = __C_LONG_DOUBLE_COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_C_FLOAT_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___C_FLOAT_COMPLEX__)) < 0) __PYX_ERR(21, 990, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":991 * C_COMPLEX = __C_COMPLEX__ * C_FLOAT_COMPLEX = __C_FLOAT_COMPLEX__ * C_DOUBLE_COMPLEX = __C_DOUBLE_COMPLEX__ # <<<<<<<<<<<<<< * C_LONG_DOUBLE_COMPLEX = __C_LONG_DOUBLE_COMPLEX__ * # C++ datatypes */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_C_DOUBLE_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___C_DOUBLE_COMPLEX__)) < 0) __PYX_ERR(21, 991, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":992 * C_FLOAT_COMPLEX = __C_FLOAT_COMPLEX__ * C_DOUBLE_COMPLEX = __C_DOUBLE_COMPLEX__ * C_LONG_DOUBLE_COMPLEX = __C_LONG_DOUBLE_COMPLEX__ # <<<<<<<<<<<<<< * # C++ datatypes * CXX_BOOL = __CXX_BOOL__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_C_LONG_DOUBLE_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___C_LONG_DOUBLE_COMPLEX__)) < 0) __PYX_ERR(21, 992, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":994 * C_LONG_DOUBLE_COMPLEX = __C_LONG_DOUBLE_COMPLEX__ * # C++ datatypes * CXX_BOOL = __CXX_BOOL__ # <<<<<<<<<<<<<< * CXX_FLOAT_COMPLEX = __CXX_FLOAT_COMPLEX__ * CXX_DOUBLE_COMPLEX = __CXX_DOUBLE_COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CXX_BOOL, ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_BOOL__)) < 0) __PYX_ERR(21, 994, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":995 * # C++ datatypes * CXX_BOOL = __CXX_BOOL__ * CXX_FLOAT_COMPLEX = __CXX_FLOAT_COMPLEX__ # <<<<<<<<<<<<<< * CXX_DOUBLE_COMPLEX = __CXX_DOUBLE_COMPLEX__ * CXX_LONG_DOUBLE_COMPLEX = __CXX_LONG_DOUBLE_COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CXX_FLOAT_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_FLOAT_COMPLEX__)) < 0) __PYX_ERR(21, 995, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":996 * CXX_BOOL = __CXX_BOOL__ * CXX_FLOAT_COMPLEX = __CXX_FLOAT_COMPLEX__ * CXX_DOUBLE_COMPLEX = __CXX_DOUBLE_COMPLEX__ # <<<<<<<<<<<<<< * CXX_LONG_DOUBLE_COMPLEX = __CXX_LONG_DOUBLE_COMPLEX__ * # C Datatypes for reduction operations */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CXX_DOUBLE_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_DOUBLE_COMPLEX__)) < 0) __PYX_ERR(21, 996, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":997 * CXX_FLOAT_COMPLEX = __CXX_FLOAT_COMPLEX__ * CXX_DOUBLE_COMPLEX = __CXX_DOUBLE_COMPLEX__ * CXX_LONG_DOUBLE_COMPLEX = __CXX_LONG_DOUBLE_COMPLEX__ # <<<<<<<<<<<<<< * # C Datatypes for reduction operations * SHORT_INT = __SHORT_INT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CXX_LONG_DOUBLE_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___CXX_LONG_DOUBLE_COMPLEX__)) < 0) __PYX_ERR(21, 997, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":999 * CXX_LONG_DOUBLE_COMPLEX = __CXX_LONG_DOUBLE_COMPLEX__ * # C Datatypes for reduction operations * SHORT_INT = __SHORT_INT__ # <<<<<<<<<<<<<< * INT_INT = TWOINT = __TWOINT__ * LONG_INT = __LONG_INT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SHORT_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___SHORT_INT__)) < 0) __PYX_ERR(21, 999, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1000 * # C Datatypes for reduction operations * SHORT_INT = __SHORT_INT__ * INT_INT = TWOINT = __TWOINT__ # <<<<<<<<<<<<<< * LONG_INT = __LONG_INT__ * FLOAT_INT = __FLOAT_INT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INT_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___TWOINT__)) < 0) __PYX_ERR(21, 1000, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_TWOINT, ((PyObject *)__pyx_v_6mpi4py_3MPI___TWOINT__)) < 0) __PYX_ERR(21, 1000, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1001 * SHORT_INT = __SHORT_INT__ * INT_INT = TWOINT = __TWOINT__ * LONG_INT = __LONG_INT__ # <<<<<<<<<<<<<< * FLOAT_INT = __FLOAT_INT__ * DOUBLE_INT = __DOUBLE_INT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LONG_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_INT__)) < 0) __PYX_ERR(21, 1001, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1002 * INT_INT = TWOINT = __TWOINT__ * LONG_INT = __LONG_INT__ * FLOAT_INT = __FLOAT_INT__ # <<<<<<<<<<<<<< * DOUBLE_INT = __DOUBLE_INT__ * LONG_DOUBLE_INT = __LONG_DOUBLE_INT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FLOAT_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___FLOAT_INT__)) < 0) __PYX_ERR(21, 1002, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1003 * LONG_INT = __LONG_INT__ * FLOAT_INT = __FLOAT_INT__ * DOUBLE_INT = __DOUBLE_INT__ # <<<<<<<<<<<<<< * LONG_DOUBLE_INT = __LONG_DOUBLE_INT__ * # Elementary Fortran datatypes */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DOUBLE_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_INT__)) < 0) __PYX_ERR(21, 1003, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1004 * FLOAT_INT = __FLOAT_INT__ * DOUBLE_INT = __DOUBLE_INT__ * LONG_DOUBLE_INT = __LONG_DOUBLE_INT__ # <<<<<<<<<<<<<< * # Elementary Fortran datatypes * CHARACTER = __CHARACTER__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LONG_DOUBLE_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_DOUBLE_INT__)) < 0) __PYX_ERR(21, 1004, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1006 * LONG_DOUBLE_INT = __LONG_DOUBLE_INT__ * # Elementary Fortran datatypes * CHARACTER = __CHARACTER__ # <<<<<<<<<<<<<< * LOGICAL = __LOGICAL__ * INTEGER = __INTEGER__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CHARACTER, ((PyObject *)__pyx_v_6mpi4py_3MPI___CHARACTER__)) < 0) __PYX_ERR(21, 1006, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1007 * # Elementary Fortran datatypes * CHARACTER = __CHARACTER__ * LOGICAL = __LOGICAL__ # <<<<<<<<<<<<<< * INTEGER = __INTEGER__ * REAL = __REAL__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGICAL, ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL__)) < 0) __PYX_ERR(21, 1007, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1008 * CHARACTER = __CHARACTER__ * LOGICAL = __LOGICAL__ * INTEGER = __INTEGER__ # <<<<<<<<<<<<<< * REAL = __REAL__ * DOUBLE_PRECISION = __DOUBLE_PRECISION__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTEGER, ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER__)) < 0) __PYX_ERR(21, 1008, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1009 * LOGICAL = __LOGICAL__ * INTEGER = __INTEGER__ * REAL = __REAL__ # <<<<<<<<<<<<<< * DOUBLE_PRECISION = __DOUBLE_PRECISION__ * COMPLEX = __COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REAL, ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL__)) < 0) __PYX_ERR(21, 1009, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1010 * INTEGER = __INTEGER__ * REAL = __REAL__ * DOUBLE_PRECISION = __DOUBLE_PRECISION__ # <<<<<<<<<<<<<< * COMPLEX = __COMPLEX__ * DOUBLE_COMPLEX = __DOUBLE_COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DOUBLE_PRECISION, ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_PRECISION__)) < 0) __PYX_ERR(21, 1010, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1011 * REAL = __REAL__ * DOUBLE_PRECISION = __DOUBLE_PRECISION__ * COMPLEX = __COMPLEX__ # <<<<<<<<<<<<<< * DOUBLE_COMPLEX = __DOUBLE_COMPLEX__ * # Size-specific Fortran datatypes */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX__)) < 0) __PYX_ERR(21, 1011, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1012 * DOUBLE_PRECISION = __DOUBLE_PRECISION__ * COMPLEX = __COMPLEX__ * DOUBLE_COMPLEX = __DOUBLE_COMPLEX__ # <<<<<<<<<<<<<< * # Size-specific Fortran datatypes * LOGICAL1 = __LOGICAL1__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_DOUBLE_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__)) < 0) __PYX_ERR(21, 1012, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1014 * DOUBLE_COMPLEX = __DOUBLE_COMPLEX__ * # Size-specific Fortran datatypes * LOGICAL1 = __LOGICAL1__ # <<<<<<<<<<<<<< * LOGICAL2 = __LOGICAL2__ * LOGICAL4 = __LOGICAL4__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGICAL1, ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL1__)) < 0) __PYX_ERR(21, 1014, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1015 * # Size-specific Fortran datatypes * LOGICAL1 = __LOGICAL1__ * LOGICAL2 = __LOGICAL2__ # <<<<<<<<<<<<<< * LOGICAL4 = __LOGICAL4__ * LOGICAL8 = __LOGICAL8__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGICAL2, ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL2__)) < 0) __PYX_ERR(21, 1015, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1016 * LOGICAL1 = __LOGICAL1__ * LOGICAL2 = __LOGICAL2__ * LOGICAL4 = __LOGICAL4__ # <<<<<<<<<<<<<< * LOGICAL8 = __LOGICAL8__ * INTEGER1 = __INTEGER1__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGICAL4, ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL4__)) < 0) __PYX_ERR(21, 1016, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1017 * LOGICAL2 = __LOGICAL2__ * LOGICAL4 = __LOGICAL4__ * LOGICAL8 = __LOGICAL8__ # <<<<<<<<<<<<<< * INTEGER1 = __INTEGER1__ * INTEGER2 = __INTEGER2__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGICAL8, ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL8__)) < 0) __PYX_ERR(21, 1017, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1018 * LOGICAL4 = __LOGICAL4__ * LOGICAL8 = __LOGICAL8__ * INTEGER1 = __INTEGER1__ # <<<<<<<<<<<<<< * INTEGER2 = __INTEGER2__ * INTEGER4 = __INTEGER4__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTEGER1, ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER1__)) < 0) __PYX_ERR(21, 1018, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1019 * LOGICAL8 = __LOGICAL8__ * INTEGER1 = __INTEGER1__ * INTEGER2 = __INTEGER2__ # <<<<<<<<<<<<<< * INTEGER4 = __INTEGER4__ * INTEGER8 = __INTEGER8__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTEGER2, ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER2__)) < 0) __PYX_ERR(21, 1019, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1020 * INTEGER1 = __INTEGER1__ * INTEGER2 = __INTEGER2__ * INTEGER4 = __INTEGER4__ # <<<<<<<<<<<<<< * INTEGER8 = __INTEGER8__ * INTEGER16 = __INTEGER16__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTEGER4, ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER4__)) < 0) __PYX_ERR(21, 1020, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1021 * INTEGER2 = __INTEGER2__ * INTEGER4 = __INTEGER4__ * INTEGER8 = __INTEGER8__ # <<<<<<<<<<<<<< * INTEGER16 = __INTEGER16__ * REAL2 = __REAL2__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTEGER8, ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER8__)) < 0) __PYX_ERR(21, 1021, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1022 * INTEGER4 = __INTEGER4__ * INTEGER8 = __INTEGER8__ * INTEGER16 = __INTEGER16__ # <<<<<<<<<<<<<< * REAL2 = __REAL2__ * REAL4 = __REAL4__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INTEGER16, ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER16__)) < 0) __PYX_ERR(21, 1022, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1023 * INTEGER8 = __INTEGER8__ * INTEGER16 = __INTEGER16__ * REAL2 = __REAL2__ # <<<<<<<<<<<<<< * REAL4 = __REAL4__ * REAL8 = __REAL8__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REAL2, ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL2__)) < 0) __PYX_ERR(21, 1023, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1024 * INTEGER16 = __INTEGER16__ * REAL2 = __REAL2__ * REAL4 = __REAL4__ # <<<<<<<<<<<<<< * REAL8 = __REAL8__ * REAL16 = __REAL16__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REAL4, ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL4__)) < 0) __PYX_ERR(21, 1024, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1025 * REAL2 = __REAL2__ * REAL4 = __REAL4__ * REAL8 = __REAL8__ # <<<<<<<<<<<<<< * REAL16 = __REAL16__ * COMPLEX4 = __COMPLEX4__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REAL8, ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL8__)) < 0) __PYX_ERR(21, 1025, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1026 * REAL4 = __REAL4__ * REAL8 = __REAL8__ * REAL16 = __REAL16__ # <<<<<<<<<<<<<< * COMPLEX4 = __COMPLEX4__ * COMPLEX8 = __COMPLEX8__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REAL16, ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL16__)) < 0) __PYX_ERR(21, 1026, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1027 * REAL8 = __REAL8__ * REAL16 = __REAL16__ * COMPLEX4 = __COMPLEX4__ # <<<<<<<<<<<<<< * COMPLEX8 = __COMPLEX8__ * COMPLEX16 = __COMPLEX16__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMPLEX4, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX4__)) < 0) __PYX_ERR(21, 1027, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1028 * REAL16 = __REAL16__ * COMPLEX4 = __COMPLEX4__ * COMPLEX8 = __COMPLEX8__ # <<<<<<<<<<<<<< * COMPLEX16 = __COMPLEX16__ * COMPLEX32 = __COMPLEX32__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMPLEX8, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX8__)) < 0) __PYX_ERR(21, 1028, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1029 * COMPLEX4 = __COMPLEX4__ * COMPLEX8 = __COMPLEX8__ * COMPLEX16 = __COMPLEX16__ # <<<<<<<<<<<<<< * COMPLEX32 = __COMPLEX32__ * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMPLEX16, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX16__)) < 0) __PYX_ERR(21, 1029, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1030 * COMPLEX8 = __COMPLEX8__ * COMPLEX16 = __COMPLEX16__ * COMPLEX32 = __COMPLEX32__ # <<<<<<<<<<<<<< * * # Convenience aliases */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMPLEX32, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX32__)) < 0) __PYX_ERR(21, 1030, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1033 * * # Convenience aliases * UNSIGNED_INT = __UNSIGNED__ # <<<<<<<<<<<<<< * SIGNED_SHORT = __SHORT__ * SIGNED_INT = __INT__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNSIGNED_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___UNSIGNED__)) < 0) __PYX_ERR(21, 1033, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1034 * # Convenience aliases * UNSIGNED_INT = __UNSIGNED__ * SIGNED_SHORT = __SHORT__ # <<<<<<<<<<<<<< * SIGNED_INT = __INT__ * SIGNED_LONG = __LONG__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIGNED_SHORT, ((PyObject *)__pyx_v_6mpi4py_3MPI___SHORT__)) < 0) __PYX_ERR(21, 1034, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1035 * UNSIGNED_INT = __UNSIGNED__ * SIGNED_SHORT = __SHORT__ * SIGNED_INT = __INT__ # <<<<<<<<<<<<<< * SIGNED_LONG = __LONG__ * SIGNED_LONG_LONG = __LONG_LONG__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIGNED_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT__)) < 0) __PYX_ERR(21, 1035, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1036 * SIGNED_SHORT = __SHORT__ * SIGNED_INT = __INT__ * SIGNED_LONG = __LONG__ # <<<<<<<<<<<<<< * SIGNED_LONG_LONG = __LONG_LONG__ * BOOL = __C_BOOL__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIGNED_LONG, ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG__)) < 0) __PYX_ERR(21, 1036, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1037 * SIGNED_INT = __INT__ * SIGNED_LONG = __LONG__ * SIGNED_LONG_LONG = __LONG_LONG__ # <<<<<<<<<<<<<< * BOOL = __C_BOOL__ * SINT8_T = __INT8_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIGNED_LONG_LONG, ((PyObject *)__pyx_v_6mpi4py_3MPI___LONG_LONG__)) < 0) __PYX_ERR(21, 1037, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1038 * SIGNED_LONG = __LONG__ * SIGNED_LONG_LONG = __LONG_LONG__ * BOOL = __C_BOOL__ # <<<<<<<<<<<<<< * SINT8_T = __INT8_T__ * SINT16_T = __INT16_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_BOOL, ((PyObject *)__pyx_v_6mpi4py_3MPI___C_BOOL__)) < 0) __PYX_ERR(21, 1038, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1039 * SIGNED_LONG_LONG = __LONG_LONG__ * BOOL = __C_BOOL__ * SINT8_T = __INT8_T__ # <<<<<<<<<<<<<< * SINT16_T = __INT16_T__ * SINT32_T = __INT32_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SINT8_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT8_T__)) < 0) __PYX_ERR(21, 1039, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1040 * BOOL = __C_BOOL__ * SINT8_T = __INT8_T__ * SINT16_T = __INT16_T__ # <<<<<<<<<<<<<< * SINT32_T = __INT32_T__ * SINT64_T = __INT64_T__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SINT16_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT16_T__)) < 0) __PYX_ERR(21, 1040, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1041 * SINT8_T = __INT8_T__ * SINT16_T = __INT16_T__ * SINT32_T = __INT32_T__ # <<<<<<<<<<<<<< * SINT64_T = __INT64_T__ * F_BOOL = __LOGICAL__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SINT32_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT32_T__)) < 0) __PYX_ERR(21, 1041, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1042 * SINT16_T = __INT16_T__ * SINT32_T = __INT32_T__ * SINT64_T = __INT64_T__ # <<<<<<<<<<<<<< * F_BOOL = __LOGICAL__ * F_INT = __INTEGER__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SINT64_T, ((PyObject *)__pyx_v_6mpi4py_3MPI___INT64_T__)) < 0) __PYX_ERR(21, 1042, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1043 * SINT32_T = __INT32_T__ * SINT64_T = __INT64_T__ * F_BOOL = __LOGICAL__ # <<<<<<<<<<<<<< * F_INT = __INTEGER__ * F_FLOAT = __REAL__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_F_BOOL, ((PyObject *)__pyx_v_6mpi4py_3MPI___LOGICAL__)) < 0) __PYX_ERR(21, 1043, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1044 * SINT64_T = __INT64_T__ * F_BOOL = __LOGICAL__ * F_INT = __INTEGER__ # <<<<<<<<<<<<<< * F_FLOAT = __REAL__ * F_DOUBLE = __DOUBLE_PRECISION__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_F_INT, ((PyObject *)__pyx_v_6mpi4py_3MPI___INTEGER__)) < 0) __PYX_ERR(21, 1044, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1045 * F_BOOL = __LOGICAL__ * F_INT = __INTEGER__ * F_FLOAT = __REAL__ # <<<<<<<<<<<<<< * F_DOUBLE = __DOUBLE_PRECISION__ * F_COMPLEX = __COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_F_FLOAT, ((PyObject *)__pyx_v_6mpi4py_3MPI___REAL__)) < 0) __PYX_ERR(21, 1045, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1046 * F_INT = __INTEGER__ * F_FLOAT = __REAL__ * F_DOUBLE = __DOUBLE_PRECISION__ # <<<<<<<<<<<<<< * F_COMPLEX = __COMPLEX__ * F_FLOAT_COMPLEX = __COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_F_DOUBLE, ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_PRECISION__)) < 0) __PYX_ERR(21, 1046, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1047 * F_FLOAT = __REAL__ * F_DOUBLE = __DOUBLE_PRECISION__ * F_COMPLEX = __COMPLEX__ # <<<<<<<<<<<<<< * F_FLOAT_COMPLEX = __COMPLEX__ * F_DOUBLE_COMPLEX = __DOUBLE_COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_F_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX__)) < 0) __PYX_ERR(21, 1047, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1048 * F_DOUBLE = __DOUBLE_PRECISION__ * F_COMPLEX = __COMPLEX__ * F_FLOAT_COMPLEX = __COMPLEX__ # <<<<<<<<<<<<<< * F_DOUBLE_COMPLEX = __DOUBLE_COMPLEX__ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_F_FLOAT_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMPLEX__)) < 0) __PYX_ERR(21, 1048, __pyx_L1_error) /* "mpi4py/MPI/Datatype.pyx":1049 * F_COMPLEX = __COMPLEX__ * F_FLOAT_COMPLEX = __COMPLEX__ * F_DOUBLE_COMPLEX = __DOUBLE_COMPLEX__ # <<<<<<<<<<<<<< */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_F_DOUBLE_COMPLEX, ((PyObject *)__pyx_v_6mpi4py_3MPI___DOUBLE_COMPLEX__)) < 0) __PYX_ERR(21, 1049, __pyx_L1_error) /* "mpi4py/MPI/Status.pyx":81 * self.Set_error(value) * * def Get_count(self, Datatype datatype=BYTE): # <<<<<<<<<<<<<< * """ * Get the number of *top level* elements */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_BYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Datatype))))) __PYX_ERR(24, 81, __pyx_L1_error) __pyx_k__28 = ((struct PyMPIDatatypeObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Status.pyx":156 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Status, __pyx_n_s_f2py); if (unlikely(!__pyx_t_3)) __PYX_ERR(24, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Status.pyx":155 * return [f_status[i] for i from 0 <= i < n] * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(24, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Status->tp_dict, __pyx_n_s_f2py, __pyx_t_1) < 0) __PYX_ERR(24, 156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Status); /* "mpi4py/MPI/Request.pyx":75 * * @classmethod * def Waitany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for any previously initiated request to complete */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_Waitany); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Request.pyx":74 * # -------------------- * * @classmethod # <<<<<<<<<<<<<< * def Waitany(cls, requests, Status status=None): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_Waitany, __pyx_t_3) < 0) __PYX_ERR(25, 75, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":93 * * @classmethod * def Testany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Test for completion of any previously initiated request */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_Testany); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Request.pyx":92 * return index * * @classmethod # <<<<<<<<<<<<<< * def Testany(cls, requests, Status status=None): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_Testany, __pyx_t_1) < 0) __PYX_ERR(25, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":113 * * @classmethod * def Waitall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Wait for all previously initiated requests to complete */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_Waitall); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Request.pyx":112 * return (index, flag) * * @classmethod # <<<<<<<<<<<<<< * def Waitall(cls, requests, statuses=None): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_Waitall, __pyx_t_3) < 0) __PYX_ERR(25, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":131 * * @classmethod * def Testall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Test for completion of all previously initiated requests */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_Testall); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Request.pyx":130 * return True * * @classmethod # <<<<<<<<<<<<<< * def Testall(cls, requests, statuses=None): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_Testall, __pyx_t_1) < 0) __PYX_ERR(25, 131, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":150 * * @classmethod * def Waitsome(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Wait for some previously initiated requests to complete */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_Waitsome); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Request.pyx":149 * return flag * * @classmethod # <<<<<<<<<<<<<< * def Waitsome(cls, requests, statuses=None): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_Waitsome, __pyx_t_3) < 0) __PYX_ERR(25, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":175 * * @classmethod * def Testsome(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Test for completion of some previously initiated requests */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_Testsome); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Request.pyx":174 * return indices * * @classmethod # <<<<<<<<<<<<<< * def Testsome(cls, requests, statuses=None): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_Testsome, __pyx_t_1) < 0) __PYX_ERR(25, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":217 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_f2py); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Request.pyx":216 * return MPI_Request_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_f2py, __pyx_t_3) < 0) __PYX_ERR(25, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":247 * # * @classmethod * def waitany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Wait for any previously initiated request to complete */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_waitany); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Request.pyx":246 * return (flag, msg) * # * @classmethod # <<<<<<<<<<<<<< * def waitany(cls, requests, Status status=None): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_waitany, __pyx_t_1) < 0) __PYX_ERR(25, 247, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":256 * # * @classmethod * def testany(cls, requests, Status status=None): # <<<<<<<<<<<<<< * """ * Test for completion of any previously initiated request */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_testany); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Request.pyx":255 * return (index, msg) * # * @classmethod # <<<<<<<<<<<<<< * def testany(cls, requests, Status status=None): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_testany, __pyx_t_3) < 0) __PYX_ERR(25, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":266 * # * @classmethod * def waitall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Wait for all previously initiated requests to complete */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_waitall); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Request.pyx":265 * return (index, flag, msg) * # * @classmethod # <<<<<<<<<<<<<< * def waitall(cls, requests, statuses=None): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_waitall, __pyx_t_1) < 0) __PYX_ERR(25, 266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":274 * # * @classmethod * def testall(cls, requests, statuses=None): # <<<<<<<<<<<<<< * """ * Test for completion of all previously initiated requests */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Request, __pyx_n_s_testall); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Request.pyx":273 * return msg * # * @classmethod # <<<<<<<<<<<<<< * def testall(cls, requests, statuses=None): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Request->tp_dict, __pyx_n_s_testall, __pyx_t_3) < 0) __PYX_ERR(25, 274, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Request); /* "mpi4py/MPI/Request.pyx":300 * * @classmethod * def Startall(cls, requests): # <<<<<<<<<<<<<< * """ * Start a collection of persistent requests */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Prequest, __pyx_n_s_Startall); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Request.pyx":299 * with nogil: CHKERR( MPI_Start(&self.ob_mpi) ) * * @classmethod # <<<<<<<<<<<<<< * def Startall(cls, requests): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Prequest->tp_dict, __pyx_n_s_Startall, __pyx_t_1) < 0) __PYX_ERR(25, 300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Prequest); /* "mpi4py/MPI/Request.pyx":327 * * @classmethod * def Start(cls, query_fn, free_fn, cancel_fn, # <<<<<<<<<<<<<< * args=None, kargs=None): * """ */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Grequest, __pyx_n_s_Start); if (unlikely(!__pyx_t_1)) __PYX_ERR(25, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Request.pyx":326 * (request) * * @classmethod # <<<<<<<<<<<<<< * def Start(cls, query_fn, free_fn, cancel_fn, * args=None, kargs=None): */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Grequest->tp_dict, __pyx_n_s_Start, __pyx_t_3) < 0) __PYX_ERR(25, 327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Grequest); /* "mpi4py/MPI/Request.pyx":356 * * * cdef Request __REQUEST_NULL__ = new_Request(MPI_REQUEST_NULL) # <<<<<<<<<<<<<< * * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Request(MPI_REQUEST_NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(25, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___REQUEST_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___REQUEST_NULL__, ((struct PyMPIRequestObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Request.pyx":362 * # -------------------------- * * REQUEST_NULL = __REQUEST_NULL__ #: Null request handle # <<<<<<<<<<<<<< */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REQUEST_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___REQUEST_NULL__)) < 0) __PYX_ERR(25, 362, __pyx_L1_error) /* "mpi4py/MPI/Message.pyx":34 * @classmethod * def Probe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): # <<<<<<<<<<<<<< * """ * Blocking test for a matched message */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__29 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__30 = __pyx_t_2; /* "mpi4py/MPI/Message.pyx":33 * * @classmethod * def Probe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Message, __pyx_n_s_Probe); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Message.pyx":32 * # -------------- * * @classmethod # <<<<<<<<<<<<<< * def Probe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Message->tp_dict, __pyx_n_s_Probe, __pyx_t_1) < 0) __PYX_ERR(26, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Message); /* "mpi4py/MPI/Message.pyx":48 * @classmethod * def Iprobe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): # <<<<<<<<<<<<<< * """ * Nonblocking test for a matched message */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__31 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__32 = __pyx_t_2; /* "mpi4py/MPI/Message.pyx":47 * * @classmethod * def Iprobe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """ */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Message, __pyx_n_s_Iprobe); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Message.pyx":46 * return message * * @classmethod # <<<<<<<<<<<<<< * def Iprobe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Message->tp_dict, __pyx_n_s_Iprobe, __pyx_t_3) < 0) __PYX_ERR(26, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Message); /* "mpi4py/MPI/Message.pyx":104 * @classmethod * def probe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): # <<<<<<<<<<<<<< * """Blocking test for a matched message""" * cdef Message message = Message.__new__(cls) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__33 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__34 = __pyx_t_2; /* "mpi4py/MPI/Message.pyx":103 * # * @classmethod * def probe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Blocking test for a matched message""" */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Message, __pyx_n_s_probe); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Message.pyx":102 * # -------------------- * # * @classmethod # <<<<<<<<<<<<<< * def probe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Message->tp_dict, __pyx_n_s_probe, __pyx_t_1) < 0) __PYX_ERR(26, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Message); /* "mpi4py/MPI/Message.pyx":114 * @classmethod * def iprobe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): # <<<<<<<<<<<<<< * """Nonblocking test for a matched message""" * cdef int flag = 0 */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__35 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(26, 114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__36 = __pyx_t_2; /* "mpi4py/MPI/Message.pyx":113 * # * @classmethod * def iprobe(cls, Comm comm, # <<<<<<<<<<<<<< * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): * """Nonblocking test for a matched message""" */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Message, __pyx_n_s_iprobe); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Message.pyx":112 * return message * # * @classmethod # <<<<<<<<<<<<<< * def iprobe(cls, Comm comm, * int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None): */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Message->tp_dict, __pyx_n_s_iprobe, __pyx_t_3) < 0) __PYX_ERR(26, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Message); /* "mpi4py/MPI/Message.pyx":153 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Message, __pyx_n_s_f2py); if (unlikely(!__pyx_t_3)) __PYX_ERR(26, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Message.pyx":152 * return MPI_Message_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Message->tp_dict, __pyx_n_s_f2py, __pyx_t_1) < 0) __PYX_ERR(26, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Message); /* "mpi4py/MPI/Message.pyx":161 * * * cdef Message __MESSAGE_NULL__ = new_Message ( MPI_MESSAGE_NULL ) # <<<<<<<<<<<<<< * cdef Message __MESSAGE_NO_PROC__ = new_Message ( MPI_MESSAGE_NO_PROC ) * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Message(MPI_MESSAGE_NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___MESSAGE_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___MESSAGE_NULL__, ((struct PyMPIMessageObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Message.pyx":162 * * cdef Message __MESSAGE_NULL__ = new_Message ( MPI_MESSAGE_NULL ) * cdef Message __MESSAGE_NO_PROC__ = new_Message ( MPI_MESSAGE_NO_PROC ) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Message(MPI_MESSAGE_NO_PROC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(26, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___MESSAGE_NO_PROC__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___MESSAGE_NO_PROC__, ((struct PyMPIMessageObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Message.pyx":168 * # -------------------------- * * MESSAGE_NULL = __MESSAGE_NULL__ #: Null message handle # <<<<<<<<<<<<<< * MESSAGE_NO_PROC = __MESSAGE_NO_PROC__ #: No-proc message handle */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MESSAGE_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___MESSAGE_NULL__)) < 0) __PYX_ERR(26, 168, __pyx_L1_error) /* "mpi4py/MPI/Message.pyx":169 * * MESSAGE_NULL = __MESSAGE_NULL__ #: Null message handle * MESSAGE_NO_PROC = __MESSAGE_NO_PROC__ #: No-proc message handle # <<<<<<<<<<<<<< */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MESSAGE_NO_PROC, ((PyObject *)__pyx_v_6mpi4py_3MPI___MESSAGE_NO_PROC__)) < 0) __PYX_ERR(26, 169, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":29 * * @classmethod * def Create(cls): # <<<<<<<<<<<<<< * """ * Create a new, empty info object */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Info, __pyx_n_s_Create); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Info.pyx":28 * return self.ob_mpi != MPI_INFO_NULL * * @classmethod # <<<<<<<<<<<<<< * def Create(cls): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Info->tp_dict, __pyx_n_s_Create, __pyx_t_3) < 0) __PYX_ERR(27, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Info); /* "mpi4py/MPI/Info.pyx":116 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Info, __pyx_n_s_f2py); if (unlikely(!__pyx_t_3)) __PYX_ERR(27, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Info.pyx":115 * return MPI_Info_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Info->tp_dict, __pyx_n_s_f2py, __pyx_t_1) < 0) __PYX_ERR(27, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Info); /* "mpi4py/MPI/Info.pyx":229 * * * cdef Info __INFO_NULL__ = new_Info(MPI_INFO_NULL) # <<<<<<<<<<<<<< * cdef Info __INFO_ENV__ = new_Info(MPI_INFO_ENV) * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Info(MPI_INFO_NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INFO_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INFO_NULL__, ((struct PyMPIInfoObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Info.pyx":230 * * cdef Info __INFO_NULL__ = new_Info(MPI_INFO_NULL) * cdef Info __INFO_ENV__ = new_Info(MPI_INFO_ENV) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Info(MPI_INFO_ENV)); if (unlikely(!__pyx_t_1)) __PYX_ERR(27, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___INFO_ENV__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___INFO_ENV__, ((struct PyMPIInfoObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Info.pyx":236 * # ----------------------- * * INFO_NULL = __INFO_NULL__ #: Null info handle # <<<<<<<<<<<<<< * INFO_ENV = __INFO_ENV__ #: Environment info handle */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INFO_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___INFO_NULL__)) < 0) __PYX_ERR(27, 236, __pyx_L1_error) /* "mpi4py/MPI/Info.pyx":237 * * INFO_NULL = __INFO_NULL__ #: Null info handle * INFO_ENV = __INFO_ENV__ #: Environment info handle # <<<<<<<<<<<<<< */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_INFO_ENV, ((PyObject *)__pyx_v_6mpi4py_3MPI___INFO_ENV__)) < 0) __PYX_ERR(27, 237, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":38 * * @classmethod * def Create(cls, function, bint commute=False): # <<<<<<<<<<<<<< * """ * Create a user-defined operation */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Op, __pyx_n_s_Create); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Op.pyx":37 * return op_user_py(self.ob_usrid, x, y, None) * * @classmethod # <<<<<<<<<<<<<< * def Create(cls, function, bint commute=False): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(28, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Op->tp_dict, __pyx_n_s_Create, __pyx_t_3) < 0) __PYX_ERR(28, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Op); /* "mpi4py/MPI/Op.pyx":132 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Op, __pyx_n_s_f2py); if (unlikely(!__pyx_t_3)) __PYX_ERR(28, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Op.pyx":131 * return MPI_Op_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Op->tp_dict, __pyx_n_s_f2py, __pyx_t_1) < 0) __PYX_ERR(28, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Op); /* "mpi4py/MPI/Op.pyx":141 * * * cdef Op __OP_NULL__ = new_Op( MPI_OP_NULL ) # <<<<<<<<<<<<<< * cdef Op __MAX__ = new_Op( MPI_MAX ) * cdef Op __MIN__ = new_Op( MPI_MIN ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_OP_NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___OP_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___OP_NULL__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":142 * * cdef Op __OP_NULL__ = new_Op( MPI_OP_NULL ) * cdef Op __MAX__ = new_Op( MPI_MAX ) # <<<<<<<<<<<<<< * cdef Op __MIN__ = new_Op( MPI_MIN ) * cdef Op __SUM__ = new_Op( MPI_SUM ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_MAX)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___MAX__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___MAX__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":143 * cdef Op __OP_NULL__ = new_Op( MPI_OP_NULL ) * cdef Op __MAX__ = new_Op( MPI_MAX ) * cdef Op __MIN__ = new_Op( MPI_MIN ) # <<<<<<<<<<<<<< * cdef Op __SUM__ = new_Op( MPI_SUM ) * cdef Op __PROD__ = new_Op( MPI_PROD ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_MIN)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___MIN__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___MIN__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":144 * cdef Op __MAX__ = new_Op( MPI_MAX ) * cdef Op __MIN__ = new_Op( MPI_MIN ) * cdef Op __SUM__ = new_Op( MPI_SUM ) # <<<<<<<<<<<<<< * cdef Op __PROD__ = new_Op( MPI_PROD ) * cdef Op __LAND__ = new_Op( MPI_LAND ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_SUM)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___SUM__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___SUM__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":145 * cdef Op __MIN__ = new_Op( MPI_MIN ) * cdef Op __SUM__ = new_Op( MPI_SUM ) * cdef Op __PROD__ = new_Op( MPI_PROD ) # <<<<<<<<<<<<<< * cdef Op __LAND__ = new_Op( MPI_LAND ) * cdef Op __BAND__ = new_Op( MPI_BAND ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_PROD)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___PROD__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___PROD__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":146 * cdef Op __SUM__ = new_Op( MPI_SUM ) * cdef Op __PROD__ = new_Op( MPI_PROD ) * cdef Op __LAND__ = new_Op( MPI_LAND ) # <<<<<<<<<<<<<< * cdef Op __BAND__ = new_Op( MPI_BAND ) * cdef Op __LOR__ = new_Op( MPI_LOR ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_LAND)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LAND__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LAND__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":147 * cdef Op __PROD__ = new_Op( MPI_PROD ) * cdef Op __LAND__ = new_Op( MPI_LAND ) * cdef Op __BAND__ = new_Op( MPI_BAND ) # <<<<<<<<<<<<<< * cdef Op __LOR__ = new_Op( MPI_LOR ) * cdef Op __BOR__ = new_Op( MPI_BOR ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_BAND)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___BAND__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___BAND__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":148 * cdef Op __LAND__ = new_Op( MPI_LAND ) * cdef Op __BAND__ = new_Op( MPI_BAND ) * cdef Op __LOR__ = new_Op( MPI_LOR ) # <<<<<<<<<<<<<< * cdef Op __BOR__ = new_Op( MPI_BOR ) * cdef Op __LXOR__ = new_Op( MPI_LXOR ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_LOR)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LOR__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LOR__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":149 * cdef Op __BAND__ = new_Op( MPI_BAND ) * cdef Op __LOR__ = new_Op( MPI_LOR ) * cdef Op __BOR__ = new_Op( MPI_BOR ) # <<<<<<<<<<<<<< * cdef Op __LXOR__ = new_Op( MPI_LXOR ) * cdef Op __BXOR__ = new_Op( MPI_BXOR ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_BOR)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___BOR__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___BOR__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":150 * cdef Op __LOR__ = new_Op( MPI_LOR ) * cdef Op __BOR__ = new_Op( MPI_BOR ) * cdef Op __LXOR__ = new_Op( MPI_LXOR ) # <<<<<<<<<<<<<< * cdef Op __BXOR__ = new_Op( MPI_BXOR ) * cdef Op __MAXLOC__ = new_Op( MPI_MAXLOC ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_LXOR)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___LXOR__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___LXOR__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":151 * cdef Op __BOR__ = new_Op( MPI_BOR ) * cdef Op __LXOR__ = new_Op( MPI_LXOR ) * cdef Op __BXOR__ = new_Op( MPI_BXOR ) # <<<<<<<<<<<<<< * cdef Op __MAXLOC__ = new_Op( MPI_MAXLOC ) * cdef Op __MINLOC__ = new_Op( MPI_MINLOC ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_BXOR)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___BXOR__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___BXOR__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":152 * cdef Op __LXOR__ = new_Op( MPI_LXOR ) * cdef Op __BXOR__ = new_Op( MPI_BXOR ) * cdef Op __MAXLOC__ = new_Op( MPI_MAXLOC ) # <<<<<<<<<<<<<< * cdef Op __MINLOC__ = new_Op( MPI_MINLOC ) * cdef Op __REPLACE__ = new_Op( MPI_REPLACE ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_MAXLOC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___MAXLOC__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___MAXLOC__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":153 * cdef Op __BXOR__ = new_Op( MPI_BXOR ) * cdef Op __MAXLOC__ = new_Op( MPI_MAXLOC ) * cdef Op __MINLOC__ = new_Op( MPI_MINLOC ) # <<<<<<<<<<<<<< * cdef Op __REPLACE__ = new_Op( MPI_REPLACE ) * cdef Op __NO_OP__ = new_Op( MPI_NO_OP ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_MINLOC)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___MINLOC__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___MINLOC__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":154 * cdef Op __MAXLOC__ = new_Op( MPI_MAXLOC ) * cdef Op __MINLOC__ = new_Op( MPI_MINLOC ) * cdef Op __REPLACE__ = new_Op( MPI_REPLACE ) # <<<<<<<<<<<<<< * cdef Op __NO_OP__ = new_Op( MPI_NO_OP ) * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_REPLACE)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___REPLACE__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___REPLACE__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":155 * cdef Op __MINLOC__ = new_Op( MPI_MINLOC ) * cdef Op __REPLACE__ = new_Op( MPI_REPLACE ) * cdef Op __NO_OP__ = new_Op( MPI_NO_OP ) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Op(MPI_NO_OP)); if (unlikely(!__pyx_t_1)) __PYX_ERR(28, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___NO_OP__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___NO_OP__, ((struct PyMPIOpObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Op.pyx":161 * # ---------------------------- * * OP_NULL = __OP_NULL__ #: Null # <<<<<<<<<<<<<< * MAX = __MAX__ #: Maximum * MIN = __MIN__ #: Minimum */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_OP_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___OP_NULL__)) < 0) __PYX_ERR(28, 161, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":162 * * OP_NULL = __OP_NULL__ #: Null * MAX = __MAX__ #: Maximum # <<<<<<<<<<<<<< * MIN = __MIN__ #: Minimum * SUM = __SUM__ #: Sum */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX, ((PyObject *)__pyx_v_6mpi4py_3MPI___MAX__)) < 0) __PYX_ERR(28, 162, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":163 * OP_NULL = __OP_NULL__ #: Null * MAX = __MAX__ #: Maximum * MIN = __MIN__ #: Minimum # <<<<<<<<<<<<<< * SUM = __SUM__ #: Sum * PROD = __PROD__ #: Product */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MIN, ((PyObject *)__pyx_v_6mpi4py_3MPI___MIN__)) < 0) __PYX_ERR(28, 163, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":164 * MAX = __MAX__ #: Maximum * MIN = __MIN__ #: Minimum * SUM = __SUM__ #: Sum # <<<<<<<<<<<<<< * PROD = __PROD__ #: Product * LAND = __LAND__ #: Logical and */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SUM, ((PyObject *)__pyx_v_6mpi4py_3MPI___SUM__)) < 0) __PYX_ERR(28, 164, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":165 * MIN = __MIN__ #: Minimum * SUM = __SUM__ #: Sum * PROD = __PROD__ #: Product # <<<<<<<<<<<<<< * LAND = __LAND__ #: Logical and * BAND = __BAND__ #: Bit-wise and */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PROD, ((PyObject *)__pyx_v_6mpi4py_3MPI___PROD__)) < 0) __PYX_ERR(28, 165, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":166 * SUM = __SUM__ #: Sum * PROD = __PROD__ #: Product * LAND = __LAND__ #: Logical and # <<<<<<<<<<<<<< * BAND = __BAND__ #: Bit-wise and * LOR = __LOR__ #: Logical or */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LAND, ((PyObject *)__pyx_v_6mpi4py_3MPI___LAND__)) < 0) __PYX_ERR(28, 166, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":167 * PROD = __PROD__ #: Product * LAND = __LAND__ #: Logical and * BAND = __BAND__ #: Bit-wise and # <<<<<<<<<<<<<< * LOR = __LOR__ #: Logical or * BOR = __BOR__ #: Bit-wise or */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_BAND, ((PyObject *)__pyx_v_6mpi4py_3MPI___BAND__)) < 0) __PYX_ERR(28, 167, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":168 * LAND = __LAND__ #: Logical and * BAND = __BAND__ #: Bit-wise and * LOR = __LOR__ #: Logical or # <<<<<<<<<<<<<< * BOR = __BOR__ #: Bit-wise or * LXOR = __LXOR__ #: Logical xor */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOR, ((PyObject *)__pyx_v_6mpi4py_3MPI___LOR__)) < 0) __PYX_ERR(28, 168, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":169 * BAND = __BAND__ #: Bit-wise and * LOR = __LOR__ #: Logical or * BOR = __BOR__ #: Bit-wise or # <<<<<<<<<<<<<< * LXOR = __LXOR__ #: Logical xor * BXOR = __BXOR__ #: Bit-wise xor */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_BOR, ((PyObject *)__pyx_v_6mpi4py_3MPI___BOR__)) < 0) __PYX_ERR(28, 169, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":170 * LOR = __LOR__ #: Logical or * BOR = __BOR__ #: Bit-wise or * LXOR = __LXOR__ #: Logical xor # <<<<<<<<<<<<<< * BXOR = __BXOR__ #: Bit-wise xor * MAXLOC = __MAXLOC__ #: Maximum and location */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LXOR, ((PyObject *)__pyx_v_6mpi4py_3MPI___LXOR__)) < 0) __PYX_ERR(28, 170, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":171 * BOR = __BOR__ #: Bit-wise or * LXOR = __LXOR__ #: Logical xor * BXOR = __BXOR__ #: Bit-wise xor # <<<<<<<<<<<<<< * MAXLOC = __MAXLOC__ #: Maximum and location * MINLOC = __MINLOC__ #: Minimum and location */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_BXOR, ((PyObject *)__pyx_v_6mpi4py_3MPI___BXOR__)) < 0) __PYX_ERR(28, 171, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":172 * LXOR = __LXOR__ #: Logical xor * BXOR = __BXOR__ #: Bit-wise xor * MAXLOC = __MAXLOC__ #: Maximum and location # <<<<<<<<<<<<<< * MINLOC = __MINLOC__ #: Minimum and location * REPLACE = __REPLACE__ #: Replace (for RMA) */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAXLOC, ((PyObject *)__pyx_v_6mpi4py_3MPI___MAXLOC__)) < 0) __PYX_ERR(28, 172, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":173 * BXOR = __BXOR__ #: Bit-wise xor * MAXLOC = __MAXLOC__ #: Maximum and location * MINLOC = __MINLOC__ #: Minimum and location # <<<<<<<<<<<<<< * REPLACE = __REPLACE__ #: Replace (for RMA) * NO_OP = __NO_OP__ #: No-op (for RMA) */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MINLOC, ((PyObject *)__pyx_v_6mpi4py_3MPI___MINLOC__)) < 0) __PYX_ERR(28, 173, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":174 * MAXLOC = __MAXLOC__ #: Maximum and location * MINLOC = __MINLOC__ #: Minimum and location * REPLACE = __REPLACE__ #: Replace (for RMA) # <<<<<<<<<<<<<< * NO_OP = __NO_OP__ #: No-op (for RMA) */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_REPLACE, ((PyObject *)__pyx_v_6mpi4py_3MPI___REPLACE__)) < 0) __PYX_ERR(28, 174, __pyx_L1_error) /* "mpi4py/MPI/Op.pyx":175 * MINLOC = __MINLOC__ #: Minimum and location * REPLACE = __REPLACE__ #: Replace (for RMA) * NO_OP = __NO_OP__ #: No-op (for RMA) # <<<<<<<<<<<<<< */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NO_OP, ((PyObject *)__pyx_v_6mpi4py_3MPI___NO_OP__)) < 0) __PYX_ERR(28, 175, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":58 * * @classmethod * def Translate_ranks(cls, Group group1, ranks1, Group group2=None): # <<<<<<<<<<<<<< * """ * Translate the ranks of processes in */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Group, __pyx_n_s_Translate_ranks); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Group.pyx":57 * return self.Get_rank() * * @classmethod # <<<<<<<<<<<<<< * def Translate_ranks(cls, Group group1, ranks1, Group group2=None): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Group->tp_dict, __pyx_n_s_Translate_ranks, __pyx_t_3) < 0) __PYX_ERR(29, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Group); /* "mpi4py/MPI/Group.pyx":85 * * @classmethod * def Compare(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Compare two groups */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Group, __pyx_n_s_Compare); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Group.pyx":84 * return ranks2 * * @classmethod # <<<<<<<<<<<<<< * def Compare(cls, Group group1, Group group2): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Group->tp_dict, __pyx_n_s_Compare, __pyx_t_1) < 0) __PYX_ERR(29, 85, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Group); /* "mpi4py/MPI/Group.pyx":105 * * @classmethod * def Union(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Produce a group by combining */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Group, __pyx_n_s_Union); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 105, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Group.pyx":104 * return group * * @classmethod # <<<<<<<<<<<<<< * def Union(cls, Group group1, Group group2): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Group->tp_dict, __pyx_n_s_Union, __pyx_t_3) < 0) __PYX_ERR(29, 105, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Group); /* "mpi4py/MPI/Group.pyx":116 * * @classmethod * def Intersection(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Produce a group as the intersection */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Group, __pyx_n_s_Intersection); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Group.pyx":115 * return group * * @classmethod # <<<<<<<<<<<<<< * def Intersection(cls, Group group1, Group group2): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Group->tp_dict, __pyx_n_s_Intersection, __pyx_t_1) < 0) __PYX_ERR(29, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Group); /* "mpi4py/MPI/Group.pyx":126 * return group * * Intersect = Intersection # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Group, __pyx_n_s_Intersection); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Group->tp_dict, __pyx_n_s_Intersect, __pyx_t_1) < 0) __PYX_ERR(29, 126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Group); /* "mpi4py/MPI/Group.pyx":129 * * @classmethod * def Difference(cls, Group group1, Group group2): # <<<<<<<<<<<<<< * """ * Produce a group from the difference */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Group, __pyx_n_s_Difference); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Group.pyx":128 * Intersect = Intersection * * @classmethod # <<<<<<<<<<<<<< * def Difference(cls, Group group1, Group group2): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Group->tp_dict, __pyx_n_s_Difference, __pyx_t_3) < 0) __PYX_ERR(29, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Group); /* "mpi4py/MPI/Group.pyx":212 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Group, __pyx_n_s_f2py); if (unlikely(!__pyx_t_3)) __PYX_ERR(29, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Group.pyx":211 * return MPI_Group_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Group->tp_dict, __pyx_n_s_f2py, __pyx_t_1) < 0) __PYX_ERR(29, 212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Group); /* "mpi4py/MPI/Group.pyx":221 * * * cdef Group __GROUP_NULL__ = new_Group ( MPI_GROUP_NULL ) # <<<<<<<<<<<<<< * cdef Group __GROUP_EMPTY__ = new_Group ( MPI_GROUP_EMPTY ) * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Group(MPI_GROUP_NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___GROUP_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___GROUP_NULL__, ((struct PyMPIGroupObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Group.pyx":222 * * cdef Group __GROUP_NULL__ = new_Group ( MPI_GROUP_NULL ) * cdef Group __GROUP_EMPTY__ = new_Group ( MPI_GROUP_EMPTY ) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Group(MPI_GROUP_EMPTY)); if (unlikely(!__pyx_t_1)) __PYX_ERR(29, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___GROUP_EMPTY__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___GROUP_EMPTY__, ((struct PyMPIGroupObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Group.pyx":228 * # ------------------------ * * GROUP_NULL = __GROUP_NULL__ #: Null group handle # <<<<<<<<<<<<<< * GROUP_EMPTY = __GROUP_EMPTY__ #: Empty group handle */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_GROUP_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___GROUP_NULL__)) < 0) __PYX_ERR(29, 228, __pyx_L1_error) /* "mpi4py/MPI/Group.pyx":229 * * GROUP_NULL = __GROUP_NULL__ #: Null group handle * GROUP_EMPTY = __GROUP_EMPTY__ #: Empty group handle # <<<<<<<<<<<<<< */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_GROUP_EMPTY, ((PyObject *)__pyx_v_6mpi4py_3MPI___GROUP_EMPTY__)) < 0) __PYX_ERR(29, 229, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":4 * # ------------------------ * * IDENT = MPI_IDENT #: Groups are identical, contexts are the same # <<<<<<<<<<<<<< * CONGRUENT = MPI_CONGRUENT #: Groups are identical, contexts are different * SIMILAR = MPI_SIMILAR #: Groups are similar, rank order differs */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_IDENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_IDENT, __pyx_t_1) < 0) __PYX_ERR(7, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":5 * * IDENT = MPI_IDENT #: Groups are identical, contexts are the same * CONGRUENT = MPI_CONGRUENT #: Groups are identical, contexts are different # <<<<<<<<<<<<<< * SIMILAR = MPI_SIMILAR #: Groups are similar, rank order differs * UNEQUAL = MPI_UNEQUAL #: Groups are different */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_CONGRUENT); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONGRUENT, __pyx_t_1) < 0) __PYX_ERR(7, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":6 * IDENT = MPI_IDENT #: Groups are identical, contexts are the same * CONGRUENT = MPI_CONGRUENT #: Groups are identical, contexts are different * SIMILAR = MPI_SIMILAR #: Groups are similar, rank order differs # <<<<<<<<<<<<<< * UNEQUAL = MPI_UNEQUAL #: Groups are different * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_SIMILAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SIMILAR, __pyx_t_1) < 0) __PYX_ERR(7, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":7 * CONGRUENT = MPI_CONGRUENT #: Groups are identical, contexts are different * SIMILAR = MPI_SIMILAR #: Groups are similar, rank order differs * UNEQUAL = MPI_UNEQUAL #: Groups are different # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_UNEQUAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNEQUAL, __pyx_t_1) < 0) __PYX_ERR(7, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":13 * # ----------------------- * * CART = MPI_CART #: Cartesian topology # <<<<<<<<<<<<<< * GRAPH = MPI_GRAPH #: General graph topology * DIST_GRAPH = MPI_DIST_GRAPH #: Distributed graph topology */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_CART); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_CART, __pyx_t_1) < 0) __PYX_ERR(7, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":14 * * CART = MPI_CART #: Cartesian topology * GRAPH = MPI_GRAPH #: General graph topology # <<<<<<<<<<<<<< * DIST_GRAPH = MPI_DIST_GRAPH #: Distributed graph topology * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_GRAPH); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_GRAPH, __pyx_t_1) < 0) __PYX_ERR(7, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":15 * CART = MPI_CART #: Cartesian topology * GRAPH = MPI_GRAPH #: General graph topology * DIST_GRAPH = MPI_DIST_GRAPH #: Distributed graph topology # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_DIST_GRAPH); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DIST_GRAPH, __pyx_t_1) < 0) __PYX_ERR(7, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":21 * # -------------------------- * * UNWEIGHTED = __UNWEIGHTED__ #: Unweighted graph # <<<<<<<<<<<<<< * WEIGHTS_EMPTY = __WEIGHTS_EMPTY__ #: Empty graph weights * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UNWEIGHTED, __pyx_v_6mpi4py_3MPI___UNWEIGHTED__) < 0) __PYX_ERR(7, 21, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":22 * * UNWEIGHTED = __UNWEIGHTED__ #: Unweighted graph * WEIGHTS_EMPTY = __WEIGHTS_EMPTY__ #: Empty graph weights # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_WEIGHTS_EMPTY, __pyx_v_6mpi4py_3MPI___WEIGHTS_EMPTY__) < 0) __PYX_ERR(7, 22, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":28 * # ----------------------- * * COMM_TYPE_SHARED = MPI_COMM_TYPE_SHARED # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_COMM_TYPE_SHARED); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_TYPE_SHARED, __pyx_t_1) < 0) __PYX_ERR(7, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":104 * * @classmethod * def Compare(cls, Comm comm1, Comm comm2): # <<<<<<<<<<<<<< * """ * Compare two communicators */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm, __pyx_n_s_Compare); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Comm.pyx":103 * return self.Get_rank() * * @classmethod # <<<<<<<<<<<<<< * def Compare(cls, Comm comm1, Comm comm2): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm->tp_dict, __pyx_n_s_Compare, __pyx_t_3) < 0) __PYX_ERR(7, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Comm); /* "mpi4py/MPI/Comm.pyx":205 * * def Split_type(self, int split_type, int key=0, * Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Split communicator by color and key */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(7, 205, __pyx_L1_error) __pyx_k__38 = ((struct PyMPIInfoObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":276 * dest, tag, self.ob_mpi) ) * * def Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__39 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__40 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":293 * * def Sendrecv(self, sendbuf, int dest, int sendtag=0, * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__41 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__42 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":315 * * def Sendrecv_replace(self, buf, int dest, int sendtag=0, * int source=ANY_SOURCE, int recvtag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__43 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__44 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":353 * return request * * def Irecv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): # <<<<<<<<<<<<<< * """ * Nonblocking receive */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 353, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__45 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 353, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__46 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":368 * # ----- * * def Probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__47 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__48 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":380 * return True * * def Iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__49 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__50 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":394 * # -------------- * * def Mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__51 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__52 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":407 * return message * * def Improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """ */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__53 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__54 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":437 * return request * * def Recv_init(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG): # <<<<<<<<<<<<<< * """ * Create a persistent request for a receive */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 437, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__55 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 437, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__56 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":698 * # --------------------------- * * def Reduce(self, sendbuf, recvbuf, Op op=SUM, int root=0): # <<<<<<<<<<<<<< * """ * Reduce */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 698, __pyx_L1_error) __pyx_k__57 = ((struct PyMPIOpObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":708 * op.ob_mpi, root, self.ob_mpi) ) * * def Allreduce(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * All Reduce */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 708, __pyx_L1_error) __pyx_k__58 = ((struct PyMPIOpObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":718 * op.ob_mpi, self.ob_mpi) ) * * def Reduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Reduce-Scatter Block (regular, non-vector version) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 718, __pyx_L1_error) __pyx_k__59 = ((struct PyMPIOpObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":728 * op.ob_mpi, self.ob_mpi) ) * * def Reduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Reduce-Scatter (vector version) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 728, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 728, __pyx_L1_error) __pyx_k__60 = ((struct PyMPIOpObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":888 * return request * * def Ireduce(self, sendbuf, recvbuf, Op op=SUM, int root=0): # <<<<<<<<<<<<<< * """ * Nonblocking Reduce */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 888, __pyx_L1_error) __pyx_k__61 = ((struct PyMPIOpObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":900 * return request * * def Iallreduce(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Nonblocking All Reduce */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 900, __pyx_L1_error) __pyx_k__62 = ((struct PyMPIOpObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":912 * return request * * def Ireduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Nonblocking Reduce-Scatter Block (regular, non-vector version) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 912, __pyx_L1_error) __pyx_k__63 = ((struct PyMPIOpObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":924 * return request * * def Ireduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Nonblocking Reduce-Scatter (vector version) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SUM); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 924, __pyx_L1_error) __pyx_k__64 = ((struct PyMPIOpObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Comm.pyx":987 * * @classmethod * def Get_parent(cls): # <<<<<<<<<<<<<< * """ * Return the parent intercommunicator for this process */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm, __pyx_n_s_Get_parent); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Comm.pyx":986 * # ------------------------------- * * @classmethod # <<<<<<<<<<<<<< * def Get_parent(cls): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm->tp_dict, __pyx_n_s_Get_parent, __pyx_t_1) < 0) __PYX_ERR(7, 987, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Comm); /* "mpi4py/MPI/Comm.pyx":1003 * * @classmethod * def Join(cls, int fd): # <<<<<<<<<<<<<< * """ * Create a intercommunicator by joining */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm, __pyx_n_s_Join); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Comm.pyx":1002 * with nogil: CHKERR( MPI_Comm_disconnect(&self.ob_mpi) ) * * @classmethod # <<<<<<<<<<<<<< * def Join(cls, int fd): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm->tp_dict, __pyx_n_s_Join, __pyx_t_3) < 0) __PYX_ERR(7, 1003, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Comm); /* "mpi4py/MPI/Comm.pyx":1052 * * @classmethod * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): # <<<<<<<<<<<<<< * """ * Create a new attribute key for communicators */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm, __pyx_n_s_Create_keyval); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Comm.pyx":1051 * CHKERR( MPI_Comm_delete_attr(self.ob_mpi, keyval) ) * * @classmethod # <<<<<<<<<<<<<< * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm->tp_dict, __pyx_n_s_Create_keyval, __pyx_t_1) < 0) __PYX_ERR(7, 1052, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Comm); /* "mpi4py/MPI/Comm.pyx":1066 * * @classmethod * def Free_keyval(cls, int keyval): # <<<<<<<<<<<<<< * """ * Free and attribute key for communicators */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm, __pyx_n_s_Free_keyval); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Comm.pyx":1065 * return keyval * * @classmethod # <<<<<<<<<<<<<< * def Free_keyval(cls, int keyval): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm->tp_dict, __pyx_n_s_Free_keyval, __pyx_t_3) < 0) __PYX_ERR(7, 1066, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Comm); /* "mpi4py/MPI/Comm.pyx":1144 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm, __pyx_n_s_f2py); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Comm.pyx":1143 * return MPI_Comm_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Comm->tp_dict, __pyx_n_s_f2py, __pyx_t_1) < 0) __PYX_ERR(7, 1144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Comm); /* "mpi4py/MPI/Comm.pyx":1168 * return PyMPI_ssend(obj, dest, tag, comm) * # * def recv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Receive""" */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__65 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1168, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__66 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":1176 * # * def sendrecv(self, sendobj, int dest, int sendtag=0, * recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Send and Receive""" */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__67 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__68 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":1206 * return request * # * def irecv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG): # <<<<<<<<<<<<<< * """Nonblocking receive""" * cdef MPI_Comm comm = self.ob_mpi */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__69 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__70 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":1213 * return request * # * def probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Blocking test for a message""" */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__71 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__72 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":1220 * return PyMPI_probe(source, tag, comm, statusp) * # * def iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Nonblocking test for a message""" */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1220, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__73 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1220, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__74 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":1227 * return PyMPI_iprobe(source, tag, comm, statusp) * # * def mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Blocking test for a matched message""" */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__75 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__76 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":1237 * return message * # * def improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, # <<<<<<<<<<<<<< * Status status=None): * """Nonblocking test for a matched message""" */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_SOURCE); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__77 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ANY_TAG); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(7, 1237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__78 = __pyx_t_2; /* "mpi4py/MPI/Comm.pyx":1279 * return PyMPI_alltoall(sendobj, comm) * # * def reduce(self, sendobj, op=SUM, int root=0): # <<<<<<<<<<<<<< * """Reduce""" * if op is None: op = SUM */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__79 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1285 * return PyMPI_reduce(sendobj, op, root, comm) * # * def allreduce(self, sendobj, op=SUM): # <<<<<<<<<<<<<< * """Reduce to All""" * if op is None: op = SUM */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__80 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1344 * def Create_dist_graph_adjacent(self, sources, destinations, * sourceweights=None, destweights=None, * Info info=INFO_NULL, bint reorder=False): # <<<<<<<<<<<<<< * """ * Create distributed graph communicator */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(7, 1344, __pyx_L1_error) __pyx_k__82 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1372 * * def Create_dist_graph(self, sources, degrees, destinations, weights=None, * Info info=INFO_NULL, bint reorder=False): # <<<<<<<<<<<<<< * """ * Create distributed graph communicator */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(7, 1372, __pyx_L1_error) __pyx_k__83 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1448 * # Inclusive Scan * * def Scan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Inclusive Scan */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 1448, __pyx_L1_error) __pyx_k__84 = ((struct PyMPIOpObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1460 * # Exclusive Scan * * def Exscan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Exclusive Scan */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 1460, __pyx_L1_error) __pyx_k__85 = ((struct PyMPIOpObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1472 * # Nonblocking * * def Iscan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Inclusive Scan */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 1472, __pyx_L1_error) __pyx_k__86 = ((struct PyMPIOpObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1484 * return request * * def Iexscan(self, sendbuf, recvbuf, Op op=SUM): # <<<<<<<<<<<<<< * """ * Inclusive Scan */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(7, 1484, __pyx_L1_error) __pyx_k__87 = ((struct PyMPIOpObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1498 * # Python Communication * # * def scan(self, sendobj, op=SUM): # <<<<<<<<<<<<<< * """Inclusive Scan""" * if op is None: op = SUM */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__88 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1504 * return PyMPI_scan(sendobj, op, comm) * # * def exscan(self, sendobj, op=SUM): # <<<<<<<<<<<<<< * """Exclusive Scan""" * if op is None: op = SUM */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__89 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1516 * * def Spawn(self, command, args=None, int maxprocs=1, * Info info=INFO_NULL, int root=0, errcodes=None): # <<<<<<<<<<<<<< * """ * Spawn instances of a single MPI application */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(7, 1516, __pyx_L1_error) __pyx_k__90 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1546 * * def Spawn_multiple(self, command, args=None, maxprocs=None, * info=INFO_NULL, int root=0, errcodes=None): # <<<<<<<<<<<<<< * """ * Spawn instances of multiple MPI applications */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__92 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1591 * # Server Routines * * def Accept(self, port_name, Info info=INFO_NULL, int root=0): # <<<<<<<<<<<<<< * """ * Accept a request to form a new intercommunicator */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(7, 1591, __pyx_L1_error) __pyx_k__93 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1609 * # Client Routines * * def Connect(self, port_name, Info info=INFO_NULL, int root=0): # <<<<<<<<<<<<<< * """ * Make a request to form a new intercommunicator */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(7, 1609, __pyx_L1_error) __pyx_k__94 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":1971 * # Cartesian Convenience Function * * def Compute_dims(int nnodes, dims): # <<<<<<<<<<<<<< * """ * Return a balanced distribution of */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_23Compute_dims, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 1971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Compute_dims, __pyx_t_1) < 0) __PYX_ERR(7, 1971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2216 * * * cdef Comm __COMM_NULL__ = new_Comm ( MPI_COMM_NULL ) # <<<<<<<<<<<<<< * cdef Intracomm __COMM_SELF__ = new_Intracomm ( MPI_COMM_SELF ) * cdef Intracomm __COMM_WORLD__ = new_Intracomm ( MPI_COMM_WORLD ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Comm(MPI_COMM_NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COMM_NULL__, ((struct PyMPICommObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2217 * * cdef Comm __COMM_NULL__ = new_Comm ( MPI_COMM_NULL ) * cdef Intracomm __COMM_SELF__ = new_Intracomm ( MPI_COMM_SELF ) # <<<<<<<<<<<<<< * cdef Intracomm __COMM_WORLD__ = new_Intracomm ( MPI_COMM_WORLD ) * cdef Intercomm __COMM_PARENT__ = new_Intercomm ( MPI_COMM_NULL ) */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Intracomm(MPI_COMM_SELF)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_SELF__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COMM_SELF__, ((struct PyMPIIntracommObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2218 * cdef Comm __COMM_NULL__ = new_Comm ( MPI_COMM_NULL ) * cdef Intracomm __COMM_SELF__ = new_Intracomm ( MPI_COMM_SELF ) * cdef Intracomm __COMM_WORLD__ = new_Intracomm ( MPI_COMM_WORLD ) # <<<<<<<<<<<<<< * cdef Intercomm __COMM_PARENT__ = new_Intercomm ( MPI_COMM_NULL ) * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Intracomm(MPI_COMM_WORLD)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_WORLD__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COMM_WORLD__, ((struct PyMPIIntracommObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2219 * cdef Intracomm __COMM_SELF__ = new_Intracomm ( MPI_COMM_SELF ) * cdef Intracomm __COMM_WORLD__ = new_Intracomm ( MPI_COMM_WORLD ) * cdef Intercomm __COMM_PARENT__ = new_Intercomm ( MPI_COMM_NULL ) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Intercomm(MPI_COMM_NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_PARENT__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___COMM_PARENT__, ((struct PyMPIIntercommObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2225 * # ------------------------ * * COMM_NULL = __COMM_NULL__ #: Null communicator handle # <<<<<<<<<<<<<< * COMM_SELF = __COMM_SELF__ #: Self communicator handle * COMM_WORLD = __COMM_WORLD__ #: World communicator handle */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_NULL__)) < 0) __PYX_ERR(7, 2225, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2226 * * COMM_NULL = __COMM_NULL__ #: Null communicator handle * COMM_SELF = __COMM_SELF__ #: Self communicator handle # <<<<<<<<<<<<<< * COMM_WORLD = __COMM_WORLD__ #: World communicator handle * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_SELF, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_SELF__)) < 0) __PYX_ERR(7, 2226, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2227 * COMM_NULL = __COMM_NULL__ #: Null communicator handle * COMM_SELF = __COMM_SELF__ #: Self communicator handle * COMM_WORLD = __COMM_WORLD__ #: World communicator handle # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_COMM_WORLD, ((PyObject *)__pyx_v_6mpi4py_3MPI___COMM_WORLD__)) < 0) __PYX_ERR(7, 2227, __pyx_L1_error) /* "mpi4py/MPI/Comm.pyx":2233 * # --------------------------- * * BSEND_OVERHEAD = MPI_BSEND_OVERHEAD # <<<<<<<<<<<<<< * #: Upper bound of memory overhead for sending in buffered mode * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_BSEND_OVERHEAD); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_BSEND_OVERHEAD, __pyx_t_1) < 0) __PYX_ERR(7, 2233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2236 * #: Upper bound of memory overhead for sending in buffered mode * * def Attach_buffer(buf): # <<<<<<<<<<<<<< * """ * Attach a user-provided buffer for */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_25Attach_buffer, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Attach_buffer, __pyx_t_1) < 0) __PYX_ERR(7, 2236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2246 * with nogil: CHKERR( MPI_Buffer_attach(base, size) ) * * def Detach_buffer(): # <<<<<<<<<<<<<< * """ * Remove an existing attached buffer */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_27Detach_buffer, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Detach_buffer, __pyx_t_1) < 0) __PYX_ERR(7, 2246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2263 * # --------------- * * def Open_port(Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Return an address that can be used to establish */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(7, 2263, __pyx_L1_error) __pyx_k__102 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_29Open_port, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Open_port, __pyx_t_1) < 0) __PYX_ERR(7, 2263, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2273 * return mpistr(cportname) * * def Close_port(port_name): # <<<<<<<<<<<<<< * """ * Close a port */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_31Close_port, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Close_port, __pyx_t_1) < 0) __PYX_ERR(7, 2273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2284 * # --------------- * * def Publish_name(service_name, port_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Publish a service name */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__103 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_33Publish_name, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Publish_name, __pyx_t_1) < 0) __PYX_ERR(7, 2284, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2297 * with nogil: CHKERR( MPI_Publish_name(csrvcname, cinfo, cportname) ) * * def Unpublish_name(service_name, port_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Unpublish a service name */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__104 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_35Unpublish_name, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Unpublish_name, __pyx_t_1) < 0) __PYX_ERR(7, 2297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Comm.pyx":2310 * with nogil: CHKERR( MPI_Unpublish_name(csrvcname, cinfo, cportname) ) * * def Lookup_name(service_name, info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Lookup a port name given a service name */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__105 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_37Lookup_name, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 2310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Lookup_name, __pyx_t_1) < 0) __PYX_ERR(7, 2310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":3 * # Create flavors * # -------------- * WIN_FLAVOR_CREATE = MPI_WIN_FLAVOR_CREATE # <<<<<<<<<<<<<< * WIN_FLAVOR_ALLOCATE = MPI_WIN_FLAVOR_ALLOCATE * WIN_FLAVOR_DYNAMIC = MPI_WIN_FLAVOR_DYNAMIC */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_FLAVOR_CREATE); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_FLAVOR_CREATE, __pyx_t_1) < 0) __PYX_ERR(30, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":4 * # -------------- * WIN_FLAVOR_CREATE = MPI_WIN_FLAVOR_CREATE * WIN_FLAVOR_ALLOCATE = MPI_WIN_FLAVOR_ALLOCATE # <<<<<<<<<<<<<< * WIN_FLAVOR_DYNAMIC = MPI_WIN_FLAVOR_DYNAMIC * WIN_FLAVOR_SHARED = MPI_WIN_FLAVOR_SHARED */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_FLAVOR_ALLOCATE); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_FLAVOR_ALLOCATE, __pyx_t_1) < 0) __PYX_ERR(30, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":5 * WIN_FLAVOR_CREATE = MPI_WIN_FLAVOR_CREATE * WIN_FLAVOR_ALLOCATE = MPI_WIN_FLAVOR_ALLOCATE * WIN_FLAVOR_DYNAMIC = MPI_WIN_FLAVOR_DYNAMIC # <<<<<<<<<<<<<< * WIN_FLAVOR_SHARED = MPI_WIN_FLAVOR_SHARED * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_FLAVOR_DYNAMIC); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_FLAVOR_DYNAMIC, __pyx_t_1) < 0) __PYX_ERR(30, 5, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":6 * WIN_FLAVOR_ALLOCATE = MPI_WIN_FLAVOR_ALLOCATE * WIN_FLAVOR_DYNAMIC = MPI_WIN_FLAVOR_DYNAMIC * WIN_FLAVOR_SHARED = MPI_WIN_FLAVOR_SHARED # <<<<<<<<<<<<<< * * # Memory model */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_FLAVOR_SHARED); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_FLAVOR_SHARED, __pyx_t_1) < 0) __PYX_ERR(30, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":10 * # Memory model * # ------------ * WIN_SEPARATE = MPI_WIN_SEPARATE # <<<<<<<<<<<<<< * WIN_UNIFIED = MPI_WIN_UNIFIED * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_SEPARATE); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_SEPARATE, __pyx_t_1) < 0) __PYX_ERR(30, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":11 * # ------------ * WIN_SEPARATE = MPI_WIN_SEPARATE * WIN_UNIFIED = MPI_WIN_UNIFIED # <<<<<<<<<<<<<< * * # Assertion modes */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_WIN_UNIFIED); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_UNIFIED, __pyx_t_1) < 0) __PYX_ERR(30, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":15 * # Assertion modes * # --------------- * MODE_NOCHECK = MPI_MODE_NOCHECK # <<<<<<<<<<<<<< * MODE_NOSTORE = MPI_MODE_NOSTORE * MODE_NOPUT = MPI_MODE_NOPUT */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MODE_NOCHECK); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_NOCHECK, __pyx_t_1) < 0) __PYX_ERR(30, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":16 * # --------------- * MODE_NOCHECK = MPI_MODE_NOCHECK * MODE_NOSTORE = MPI_MODE_NOSTORE # <<<<<<<<<<<<<< * MODE_NOPUT = MPI_MODE_NOPUT * MODE_NOPRECEDE = MPI_MODE_NOPRECEDE */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MODE_NOSTORE); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_NOSTORE, __pyx_t_1) < 0) __PYX_ERR(30, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":17 * MODE_NOCHECK = MPI_MODE_NOCHECK * MODE_NOSTORE = MPI_MODE_NOSTORE * MODE_NOPUT = MPI_MODE_NOPUT # <<<<<<<<<<<<<< * MODE_NOPRECEDE = MPI_MODE_NOPRECEDE * MODE_NOSUCCEED = MPI_MODE_NOSUCCEED */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MODE_NOPUT); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_NOPUT, __pyx_t_1) < 0) __PYX_ERR(30, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":18 * MODE_NOSTORE = MPI_MODE_NOSTORE * MODE_NOPUT = MPI_MODE_NOPUT * MODE_NOPRECEDE = MPI_MODE_NOPRECEDE # <<<<<<<<<<<<<< * MODE_NOSUCCEED = MPI_MODE_NOSUCCEED * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MODE_NOPRECEDE); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_NOPRECEDE, __pyx_t_1) < 0) __PYX_ERR(30, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":19 * MODE_NOPUT = MPI_MODE_NOPUT * MODE_NOPRECEDE = MPI_MODE_NOPRECEDE * MODE_NOSUCCEED = MPI_MODE_NOSUCCEED # <<<<<<<<<<<<<< * * # Lock types */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MODE_NOSUCCEED); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_NOSUCCEED, __pyx_t_1) < 0) __PYX_ERR(30, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":23 * # Lock types * # ---------- * LOCK_EXCLUSIVE = MPI_LOCK_EXCLUSIVE # <<<<<<<<<<<<<< * LOCK_SHARED = MPI_LOCK_SHARED * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_LOCK_EXCLUSIVE); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOCK_EXCLUSIVE, __pyx_t_1) < 0) __PYX_ERR(30, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":24 * # ---------- * LOCK_EXCLUSIVE = MPI_LOCK_EXCLUSIVE * LOCK_SHARED = MPI_LOCK_SHARED # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_LOCK_SHARED); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOCK_SHARED, __pyx_t_1) < 0) __PYX_ERR(30, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":60 * @classmethod * def Create(cls, memory, int disp_unit=1, * Info info=INFO_NULL, Intracomm comm=COMM_SELF): # <<<<<<<<<<<<<< * """ * Create an window object for one-sided communication */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(30, 60, __pyx_L1_error) __pyx_k__106 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Intracomm))))) __PYX_ERR(30, 60, __pyx_L1_error) __pyx_k__107 = ((struct PyMPIIntracommObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":59 * * @classmethod * def Create(cls, memory, int disp_unit=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Win, __pyx_n_s_Create); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Win.pyx":58 * # --------------- * * @classmethod # <<<<<<<<<<<<<< * def Create(cls, memory, int disp_unit=1, * Info info=INFO_NULL, Intracomm comm=COMM_SELF): */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Win->tp_dict, __pyx_n_s_Create, __pyx_t_3) < 0) __PYX_ERR(30, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Win); /* "mpi4py/MPI/Win.pyx":81 * @classmethod * def Allocate(cls, Aint size, int disp_unit=1, * Info info=INFO_NULL, Intracomm comm=COMM_SELF): # <<<<<<<<<<<<<< * """ * Create an window object for one-sided communication */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(30, 81, __pyx_L1_error) __pyx_k__108 = ((struct PyMPIInfoObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Intracomm))))) __PYX_ERR(30, 81, __pyx_L1_error) __pyx_k__109 = ((struct PyMPIIntracommObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":80 * * @classmethod * def Allocate(cls, Aint size, int disp_unit=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Win, __pyx_n_s_Allocate); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Win.pyx":79 * return win * * @classmethod # <<<<<<<<<<<<<< * def Allocate(cls, Aint size, int disp_unit=1, * Info info=INFO_NULL, Intracomm comm=COMM_SELF): */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Win->tp_dict, __pyx_n_s_Allocate, __pyx_t_1) < 0) __PYX_ERR(30, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Win); /* "mpi4py/MPI/Win.pyx":95 * @classmethod * def Allocate_shared(cls, Aint size, int disp_unit=1, * Info info=INFO_NULL, Intracomm comm=COMM_SELF): # <<<<<<<<<<<<<< * """ * Create an window object for one-sided communication */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(30, 95, __pyx_L1_error) __pyx_k__110 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Intracomm))))) __PYX_ERR(30, 95, __pyx_L1_error) __pyx_k__111 = ((struct PyMPIIntracommObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":94 * * @classmethod * def Allocate_shared(cls, Aint size, int disp_unit=1, # <<<<<<<<<<<<<< * Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Win, __pyx_n_s_Allocate_shared); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Win.pyx":93 * return win * * @classmethod # <<<<<<<<<<<<<< * def Allocate_shared(cls, Aint size, int disp_unit=1, * Info info=INFO_NULL, Intracomm comm=COMM_SELF): */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Win->tp_dict, __pyx_n_s_Allocate_shared, __pyx_t_3) < 0) __PYX_ERR(30, 94, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Win); /* "mpi4py/MPI/Win.pyx":122 * * @classmethod * def Create_dynamic(cls, Info info=INFO_NULL, Intracomm comm=COMM_SELF): # <<<<<<<<<<<<<< * """ * Create an window object for one-sided communication */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(30, 122, __pyx_L1_error) __pyx_k__112 = ((struct PyMPIInfoObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_COMM_SELF); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Intracomm))))) __PYX_ERR(30, 122, __pyx_L1_error) __pyx_k__113 = ((struct PyMPIIntracommObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":121 * return (asbuffer(self, base, size, 0), disp_unit) * * @classmethod # <<<<<<<<<<<<<< * def Create_dynamic(cls, Info info=INFO_NULL, Intracomm comm=COMM_SELF): * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Win, __pyx_n_s_Create_dynamic); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Win->tp_dict, __pyx_n_s_Create_dynamic, __pyx_t_1) < 0) __PYX_ERR(30, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Win); /* "mpi4py/MPI/Win.pyx":244 * * @classmethod * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): # <<<<<<<<<<<<<< * """ * Create a new attribute key for windows */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Win, __pyx_n_s_Create_keyval); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Win.pyx":243 * CHKERR( MPI_Win_delete_attr(self.ob_mpi, keyval) ) * * @classmethod # <<<<<<<<<<<<<< * def Create_keyval(cls, copy_fn=None, delete_fn=None, nopython=False): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Win->tp_dict, __pyx_n_s_Create_keyval, __pyx_t_3) < 0) __PYX_ERR(30, 244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Win); /* "mpi4py/MPI/Win.pyx":258 * * @classmethod * def Free_keyval(cls, int keyval): # <<<<<<<<<<<<<< * """ * Free and attribute key for windows */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Win, __pyx_n_s_Free_keyval); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/Win.pyx":257 * return keyval * * @classmethod # <<<<<<<<<<<<<< * def Free_keyval(cls, int keyval): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Win->tp_dict, __pyx_n_s_Free_keyval, __pyx_t_1) < 0) __PYX_ERR(30, 258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Win); /* "mpi4py/MPI/Win.pyx":372 * * def Accumulate(self, origin, int target_rank, * target=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Accumulate data into the target process */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(30, 372, __pyx_L1_error) __pyx_k__114 = ((struct PyMPIOpObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":385 * * def Get_accumulate(self, origin, result, int target_rank, * target=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Fetch-and-accumulate data into the target process */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(30, 385, __pyx_L1_error) __pyx_k__115 = ((struct PyMPIOpObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":399 * * def Fetch_and_op(self, origin, result,int target_rank, * Aint target_disp=0, Op op=SUM): # <<<<<<<<<<<<<< * """ * Perform one-sided read-modify-write */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(30, 399, __pyx_L1_error) __pyx_k__116 = ((struct PyMPIOpObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":455 * * def Raccumulate(self, origin, int target_rank, * target=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Fetch-and-accumulate data into the target process */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(30, 455, __pyx_L1_error) __pyx_k__117 = ((struct PyMPIOpObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":471 * * def Rget_accumulate(self, origin, result, int target_rank, * target=None, Op op=SUM): # <<<<<<<<<<<<<< * """ * Accumulate data into the target process */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Op))))) __PYX_ERR(30, 471, __pyx_L1_error) __pyx_k__118 = ((struct PyMPIOpObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/Win.pyx":540 * # ---- * * def Lock(self, int rank, int lock_type=LOCK_EXCLUSIVE, int assertion=0): # <<<<<<<<<<<<<< * """ * Begin an RMA access epoch at the target process */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LOCK_EXCLUSIVE); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(30, 540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__119 = __pyx_t_2; /* "mpi4py/MPI/Win.pyx":659 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_Win, __pyx_n_s_f2py); if (unlikely(!__pyx_t_1)) __PYX_ERR(30, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "mpi4py/MPI/Win.pyx":658 * return MPI_Win_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_Win->tp_dict, __pyx_n_s_f2py, __pyx_t_3) < 0) __PYX_ERR(30, 659, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_Win); /* "mpi4py/MPI/Win.pyx":668 * * * cdef Win __WIN_NULL__ = new_Win(MPI_WIN_NULL) # <<<<<<<<<<<<<< * * */ __pyx_t_3 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_Win(MPI_WIN_NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(30, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___WIN_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___WIN_NULL__, ((struct PyMPIWinObject *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/Win.pyx":674 * # ------------------------- * * WIN_NULL = __WIN_NULL__ #: Null window handle # <<<<<<<<<<<<<< */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_WIN_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___WIN_NULL__)) < 0) __PYX_ERR(30, 674, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":4 * # ------------- * * MODE_RDONLY = MPI_MODE_RDONLY # <<<<<<<<<<<<<< * #: Read only * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_MODE_RDONLY); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_RDONLY, __pyx_t_3) < 0) __PYX_ERR(31, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":7 * #: Read only * * MODE_WRONLY = MPI_MODE_WRONLY # <<<<<<<<<<<<<< * #: Write only * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_MODE_WRONLY); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_WRONLY, __pyx_t_3) < 0) __PYX_ERR(31, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":10 * #: Write only * * MODE_RDWR = MPI_MODE_RDWR # <<<<<<<<<<<<<< * #: Reading and writing * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_MODE_RDWR); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_RDWR, __pyx_t_3) < 0) __PYX_ERR(31, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":13 * #: Reading and writing * * MODE_CREATE = MPI_MODE_CREATE # <<<<<<<<<<<<<< * #: Create the file if it does not exist * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_MODE_CREATE); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_CREATE, __pyx_t_3) < 0) __PYX_ERR(31, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":16 * #: Create the file if it does not exist * * MODE_EXCL = MPI_MODE_EXCL # <<<<<<<<<<<<<< * #: Error if creating file that already exists * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_MODE_EXCL); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_EXCL, __pyx_t_3) < 0) __PYX_ERR(31, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":19 * #: Error if creating file that already exists * * MODE_DELETE_ON_CLOSE = MPI_MODE_DELETE_ON_CLOSE # <<<<<<<<<<<<<< * #: Delete file on close * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_MODE_DELETE_ON_CLOSE); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_DELETE_ON_CLOSE, __pyx_t_3) < 0) __PYX_ERR(31, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":22 * #: Delete file on close * * MODE_UNIQUE_OPEN = MPI_MODE_UNIQUE_OPEN # <<<<<<<<<<<<<< * #: File will not be concurrently opened elsewhere * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_MODE_UNIQUE_OPEN); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_UNIQUE_OPEN, __pyx_t_3) < 0) __PYX_ERR(31, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":25 * #: File will not be concurrently opened elsewhere * * MODE_SEQUENTIAL = MPI_MODE_SEQUENTIAL # <<<<<<<<<<<<<< * #: File will only be accessed sequentially * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_MODE_SEQUENTIAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_SEQUENTIAL, __pyx_t_3) < 0) __PYX_ERR(31, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":28 * #: File will only be accessed sequentially * * MODE_APPEND = MPI_MODE_APPEND # <<<<<<<<<<<<<< * #: Set initial position of all file pointers to end of file * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_MODE_APPEND); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MODE_APPEND, __pyx_t_3) < 0) __PYX_ERR(31, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":35 * # ----------- * * SEEK_SET = MPI_SEEK_SET # <<<<<<<<<<<<<< * #: File pointer is set to offset * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_SEEK_SET); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SEEK_SET, __pyx_t_3) < 0) __PYX_ERR(31, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":38 * #: File pointer is set to offset * * SEEK_CUR = MPI_SEEK_CUR # <<<<<<<<<<<<<< * #: File pointer is set to the current position plus offset * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_SEEK_CUR); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 38, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SEEK_CUR, __pyx_t_3) < 0) __PYX_ERR(31, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":41 * #: File pointer is set to the current position plus offset * * SEEK_END = MPI_SEEK_END # <<<<<<<<<<<<<< * #: File pointer is set to the end plus offset * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_SEEK_END); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SEEK_END, __pyx_t_3) < 0) __PYX_ERR(31, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":44 * #: File pointer is set to the end plus offset * * DISPLACEMENT_CURRENT = MPI_DISPLACEMENT_CURRENT # <<<<<<<<<<<<<< * #: Special displacement value for files opened in sequential mode * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_DISPLACEMENT_CURRENT); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DISPLACEMENT_CURRENT, __pyx_t_3) < 0) __PYX_ERR(31, 44, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":47 * #: Special displacement value for files opened in sequential mode * * DISP_CUR = MPI_DISPLACEMENT_CURRENT # <<<<<<<<<<<<<< * #: Convenience alias for `DISPLACEMENT_CURRENT` * */ __pyx_t_3 = __Pyx_PyInt_From_int(MPI_DISPLACEMENT_CURRENT); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DISP_CUR, __pyx_t_3) < 0) __PYX_ERR(31, 47, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":83 * @classmethod * def Open(cls, Intracomm comm, filename, * int amode=MODE_RDONLY, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Open a file */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MODE_RDONLY); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(31, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__121 = __pyx_t_2; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(31, 83, __pyx_L1_error) __pyx_k__120 = ((struct PyMPIInfoObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":82 * * @classmethod * def Open(cls, Intracomm comm, filename, # <<<<<<<<<<<<<< * int amode=MODE_RDONLY, Info info=INFO_NULL): * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_File, __pyx_n_s_Open); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/File.pyx":81 * # ----------------- * * @classmethod # <<<<<<<<<<<<<< * def Open(cls, Intracomm comm, filename, * int amode=MODE_RDONLY, Info info=INFO_NULL): */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_File->tp_dict, __pyx_n_s_Open, __pyx_t_1) < 0) __PYX_ERR(31, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_File); /* "mpi4py/MPI/File.pyx":102 * * @classmethod * def Delete(cls, filename, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Delete a file */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(31, 102, __pyx_L1_error) __pyx_k__122 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":101 * with nogil: CHKERR( MPI_File_close(&self.ob_mpi) ) * * @classmethod # <<<<<<<<<<<<<< * def Delete(cls, filename, Info info=INFO_NULL): * """ */ __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_6mpi4py_3MPI_File, __pyx_n_s_Delete); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_File->tp_dict, __pyx_n_s_Delete, __pyx_t_3) < 0) __PYX_ERR(31, 102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_File); /* "mpi4py/MPI/File.pyx":196 * def Set_view(self, Offset disp=0, * Datatype etype=None, Datatype filetype=None, * object datarep=None, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Set the file view */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(31, 196, __pyx_L1_error) __pyx_k__123 = ((struct PyMPIInfoObject *)__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; /* "mpi4py/MPI/File.pyx":394 * return request * * def Seek(self, Offset offset, int whence=SEEK_SET): # <<<<<<<<<<<<<< * """ * Update the individual file pointer */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SEEK_SET); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(31, 394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__124 = __pyx_t_2; /* "mpi4py/MPI/File.pyx":480 * self.ob_mpi, m.buf, m.count, m.dtype, statusp) ) * * def Seek_shared(self, Offset offset, int whence=SEEK_SET): # <<<<<<<<<<<<<< * """ * Update the shared file pointer */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SEEK_SET); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(31, 480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_k__125 = __pyx_t_2; /* "mpi4py/MPI/File.pyx":691 * * @classmethod * def f2py(cls, arg): # <<<<<<<<<<<<<< * """ * """ */ __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6mpi4py_3MPI_File, __pyx_n_s_f2py); if (unlikely(!__pyx_t_3)) __PYX_ERR(31, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "mpi4py/MPI/File.pyx":690 * return MPI_File_c2f(self.ob_mpi) * * @classmethod # <<<<<<<<<<<<<< * def f2py(cls, arg): * """ */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_6mpi4py_3MPI_File->tp_dict, __pyx_n_s_f2py, __pyx_t_1) < 0) __PYX_ERR(31, 691, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_6mpi4py_3MPI_File); /* "mpi4py/MPI/File.pyx":700 * * * cdef File __FILE_NULL__ = new_File(MPI_FILE_NULL) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = ((PyObject *)__pyx_f_6mpi4py_3MPI_new_File(MPI_FILE_NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(((PyObject *)__pyx_v_6mpi4py_3MPI___FILE_NULL__)); __Pyx_DECREF_SET(__pyx_v_6mpi4py_3MPI___FILE_NULL__, ((struct PyMPIFileObject *)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/File.pyx":706 * # ----------------------- * * FILE_NULL = __FILE_NULL__ #: Null file handle # <<<<<<<<<<<<<< * * */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_FILE_NULL, ((PyObject *)__pyx_v_6mpi4py_3MPI___FILE_NULL__)) < 0) __PYX_ERR(31, 706, __pyx_L1_error) /* "mpi4py/MPI/File.pyx":712 * # --------------------------------- * * def Register_datarep(datarep, read_fn, write_fn, extent_fn): # <<<<<<<<<<<<<< * """ * Register user-defined data representations */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_39Register_datarep, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(31, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Register_datarep, __pyx_t_1) < 0) __PYX_ERR(31, 712, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":90 * # ----------------- * * def Alloc_mem(Aint size, Info info=INFO_NULL): # <<<<<<<<<<<<<< * """ * Allocate memory for message passing and RMA */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_INFO_NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6mpi4py_3MPI_Info))))) __PYX_ERR(8, 90, __pyx_L1_error) __pyx_k__126 = ((struct PyMPIInfoObject *)__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_41Alloc_mem, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Alloc_mem, __pyx_t_1) < 0) __PYX_ERR(8, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":98 * return tomemory(base, size) * * def Free_mem(mem): # <<<<<<<<<<<<<< * """ * Free memory allocated with `Alloc_mem()` */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_43Free_mem, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Free_mem, __pyx_t_1) < 0) __PYX_ERR(8, 98, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":110 * # ----------------------- * * def Init(): # <<<<<<<<<<<<<< * """ * Initialize the MPI execution environment */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_45Init, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Init, __pyx_t_1) < 0) __PYX_ERR(8, 110, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":117 * initialize() * * def Finalize(): # <<<<<<<<<<<<<< * """ * Terminate the MPI execution environment */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_47Finalize, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Finalize, __pyx_t_1) < 0) __PYX_ERR(8, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":127 * # ------------------------------- * * THREAD_SINGLE = MPI_THREAD_SINGLE # <<<<<<<<<<<<<< * #: Only one thread will execute * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_THREAD_SINGLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_THREAD_SINGLE, __pyx_t_1) < 0) __PYX_ERR(8, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":130 * #: Only one thread will execute * * THREAD_FUNNELED = MPI_THREAD_FUNNELED # <<<<<<<<<<<<<< * #: MPI calls are *funneled* to the main thread * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_THREAD_FUNNELED); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_THREAD_FUNNELED, __pyx_t_1) < 0) __PYX_ERR(8, 130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":133 * #: MPI calls are *funneled* to the main thread * * THREAD_SERIALIZED = MPI_THREAD_SERIALIZED # <<<<<<<<<<<<<< * #: MPI calls are *serialized* * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_THREAD_SERIALIZED); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_THREAD_SERIALIZED, __pyx_t_1) < 0) __PYX_ERR(8, 133, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":136 * #: MPI calls are *serialized* * * THREAD_MULTIPLE = MPI_THREAD_MULTIPLE # <<<<<<<<<<<<<< * #: Multiple threads may call MPI * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_THREAD_MULTIPLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_THREAD_MULTIPLE, __pyx_t_1) < 0) __PYX_ERR(8, 136, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":139 * #: Multiple threads may call MPI * * def Init_thread(int required=THREAD_MULTIPLE): # <<<<<<<<<<<<<< * """ * Initialize the MPI execution environment */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_THREAD_MULTIPLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_k__127 = __pyx_t_2; __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_49Init_thread, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Init_thread, __pyx_t_1) < 0) __PYX_ERR(8, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":148 * return provided * * def Query_thread(): # <<<<<<<<<<<<<< * """ * Return the level of thread support */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_51Query_thread, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Query_thread, __pyx_t_1) < 0) __PYX_ERR(8, 148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":157 * return provided * * def Is_thread_main(): # <<<<<<<<<<<<<< * """ * Indicate whether this thread called */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_53Is_thread_main, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 157, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Is_thread_main, __pyx_t_1) < 0) __PYX_ERR(8, 157, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":166 * return flag * * def Is_initialized(): # <<<<<<<<<<<<<< * """ * Indicates whether ``Init`` has been called */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_55Is_initialized, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Is_initialized, __pyx_t_1) < 0) __PYX_ERR(8, 166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":174 * return flag * * def Is_finalized(): # <<<<<<<<<<<<<< * """ * Indicates whether ``Finalize`` has completed */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_57Is_finalized, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Is_finalized, __pyx_t_1) < 0) __PYX_ERR(8, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":188 * # ----------------- * * VERSION = MPI_VERSION # <<<<<<<<<<<<<< * SUBVERSION = MPI_SUBVERSION * */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_VERSION); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_VERSION, __pyx_t_1) < 0) __PYX_ERR(8, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":189 * * VERSION = MPI_VERSION * SUBVERSION = MPI_SUBVERSION # <<<<<<<<<<<<<< * * def Get_version(): */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_SUBVERSION); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SUBVERSION, __pyx_t_1) < 0) __PYX_ERR(8, 189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":191 * SUBVERSION = MPI_SUBVERSION * * def Get_version(): # <<<<<<<<<<<<<< * """ * Obtain the version number of the MPI standard supported */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_59Get_version, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Get_version, __pyx_t_1) < 0) __PYX_ERR(8, 191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":201 * return (version, subversion) * * def Get_library_version(): # <<<<<<<<<<<<<< * """ * Obtain the version string of the MPI library */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_61Get_library_version, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Get_library_version, __pyx_t_1) < 0) __PYX_ERR(8, 201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":213 * # ---------------------- * * def Get_processor_name(): # <<<<<<<<<<<<<< * """ * Obtain the name of the calling processor */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_63Get_processor_name, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Get_processor_name, __pyx_t_1) < 0) __PYX_ERR(8, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":225 * # -------------------------- * * def Wtime(): # <<<<<<<<<<<<<< * """ * Return an elapsed time on the calling processor */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_65Wtime, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Wtime, __pyx_t_1) < 0) __PYX_ERR(8, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":231 * return MPI_Wtime() * * def Wtick(): # <<<<<<<<<<<<<< * """ * Return the resolution of ``Wtime`` */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_67Wtick, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Wtick, __pyx_t_1) < 0) __PYX_ERR(8, 231, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":240 * # -------------------- * * def Pcontrol(int level): # <<<<<<<<<<<<<< * """ * Control profiling */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_69Pcontrol, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Pcontrol, __pyx_t_1) < 0) __PYX_ERR(8, 240, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":252 * * # MPI-1 * MAX_PROCESSOR_NAME = MPI_MAX_PROCESSOR_NAME # <<<<<<<<<<<<<< * MAX_ERROR_STRING = MPI_MAX_ERROR_STRING * # MPI-2 */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MAX_PROCESSOR_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_PROCESSOR_NAME, __pyx_t_1) < 0) __PYX_ERR(8, 252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":253 * # MPI-1 * MAX_PROCESSOR_NAME = MPI_MAX_PROCESSOR_NAME * MAX_ERROR_STRING = MPI_MAX_ERROR_STRING # <<<<<<<<<<<<<< * # MPI-2 * MAX_PORT_NAME = MPI_MAX_PORT_NAME */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MAX_ERROR_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_ERROR_STRING, __pyx_t_1) < 0) __PYX_ERR(8, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":255 * MAX_ERROR_STRING = MPI_MAX_ERROR_STRING * # MPI-2 * MAX_PORT_NAME = MPI_MAX_PORT_NAME # <<<<<<<<<<<<<< * MAX_INFO_KEY = MPI_MAX_INFO_KEY * MAX_INFO_VAL = MPI_MAX_INFO_VAL */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MAX_PORT_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_PORT_NAME, __pyx_t_1) < 0) __PYX_ERR(8, 255, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":256 * # MPI-2 * MAX_PORT_NAME = MPI_MAX_PORT_NAME * MAX_INFO_KEY = MPI_MAX_INFO_KEY # <<<<<<<<<<<<<< * MAX_INFO_VAL = MPI_MAX_INFO_VAL * MAX_OBJECT_NAME = MPI_MAX_OBJECT_NAME */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MAX_INFO_KEY); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_INFO_KEY, __pyx_t_1) < 0) __PYX_ERR(8, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":257 * MAX_PORT_NAME = MPI_MAX_PORT_NAME * MAX_INFO_KEY = MPI_MAX_INFO_KEY * MAX_INFO_VAL = MPI_MAX_INFO_VAL # <<<<<<<<<<<<<< * MAX_OBJECT_NAME = MPI_MAX_OBJECT_NAME * MAX_DATAREP_STRING = MPI_MAX_DATAREP_STRING */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MAX_INFO_VAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_INFO_VAL, __pyx_t_1) < 0) __PYX_ERR(8, 257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":258 * MAX_INFO_KEY = MPI_MAX_INFO_KEY * MAX_INFO_VAL = MPI_MAX_INFO_VAL * MAX_OBJECT_NAME = MPI_MAX_OBJECT_NAME # <<<<<<<<<<<<<< * MAX_DATAREP_STRING = MPI_MAX_DATAREP_STRING * # MPI-3 */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MAX_OBJECT_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_OBJECT_NAME, __pyx_t_1) < 0) __PYX_ERR(8, 258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":259 * MAX_INFO_VAL = MPI_MAX_INFO_VAL * MAX_OBJECT_NAME = MPI_MAX_OBJECT_NAME * MAX_DATAREP_STRING = MPI_MAX_DATAREP_STRING # <<<<<<<<<<<<<< * # MPI-3 * MAX_LIBRARY_VERSION_STRING = MPI_MAX_LIBRARY_VERSION_STRING */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MAX_DATAREP_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_DATAREP_STRING, __pyx_t_1) < 0) __PYX_ERR(8, 259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":261 * MAX_DATAREP_STRING = MPI_MAX_DATAREP_STRING * # MPI-3 * MAX_LIBRARY_VERSION_STRING = MPI_MAX_LIBRARY_VERSION_STRING # <<<<<<<<<<<<<< * * # -------------------------------------------------------------------- */ __pyx_t_1 = __Pyx_PyInt_From_int(MPI_MAX_LIBRARY_VERSION_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_MAX_LIBRARY_VERSION_STRING, __pyx_t_1) < 0) __PYX_ERR(8, 261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":268 * int PyMPI_Get_vendor(const char**,int*,int*,int*) nogil * * def get_vendor(): # <<<<<<<<<<<<<< * """ * Infomation about the underlying MPI implementation */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_71get_vendor, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_vendor, __pyx_t_1) < 0) __PYX_ERR(8, 268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":294 * return 0 * * def _sizeof(arg): # <<<<<<<<<<<<<< * """ * Size in bytes of the underlying MPI handle */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_73_sizeof, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sizeof, __pyx_t_1) < 0) __PYX_ERR(8, 294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":311 * raise TypeError("expecting an MPI type or instance") * * def _addressof(arg): # <<<<<<<<<<<<<< * """ * Memory address of the underlying MPI handle */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_75_addressof, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_addressof, __pyx_t_1) < 0) __PYX_ERR(8, 311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "mpi4py/MPI/MPI.pyx":342 * return PyLong_FromVoidPtr(ptr) * * def _handleof(arg): # <<<<<<<<<<<<<< * """ * Unsigned integer value with the underlying MPI handle */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6mpi4py_3MPI_77_handleof, NULL, __pyx_n_s_mpi4py_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_handleof, __pyx_t_1) < 0) __PYX_ERR(8, 342, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Wrapped vars code ---*/ if (__Pyx_RegisterCleanup()) __PYX_ERR(32, 1, __pyx_L1_error); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_20); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init mpi4py.MPI", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init mpi4py.MPI"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(void) { Py_CLEAR(__pyx_tuple_); Py_CLEAR(__pyx_tuple__2); Py_CLEAR(__pyx_tuple__3); Py_CLEAR(__pyx_tuple__4); Py_CLEAR(__pyx_tuple__5); Py_CLEAR(__pyx_tuple__6); Py_CLEAR(__pyx_tuple__7); Py_CLEAR(__pyx_tuple__8); Py_CLEAR(__pyx_tuple__9); Py_CLEAR(__pyx_tuple__10); Py_CLEAR(__pyx_tuple__11); Py_CLEAR(__pyx_tuple__12); Py_CLEAR(__pyx_tuple__13); Py_CLEAR(__pyx_tuple__14); Py_CLEAR(__pyx_tuple__15); Py_CLEAR(__pyx_tuple__16); Py_CLEAR(__pyx_tuple__17); Py_CLEAR(__pyx_tuple__18); Py_CLEAR(__pyx_tuple__19); Py_CLEAR(__pyx_tuple__20); Py_CLEAR(__pyx_tuple__21); Py_CLEAR(__pyx_tuple__22); Py_CLEAR(__pyx_tuple__24); Py_CLEAR(__pyx_tuple__25); Py_CLEAR(__pyx_tuple__37); Py_CLEAR(__pyx_tuple__81); Py_CLEAR(__pyx_slice__91); Py_CLEAR(__pyx_tuple__95); Py_CLEAR(__pyx_slice__96); Py_CLEAR(__pyx_tuple__97); Py_CLEAR(__pyx_tuple__98); Py_CLEAR(__pyx_tuple__99); Py_CLEAR(__pyx_tuple__100); Py_CLEAR(__pyx_tuple__101); Py_CLEAR(__pyx_tuple__128); Py_CLEAR(__pyx_tuple__129); Py_CLEAR(__pyx_tuple__130); Py_CLEAR(__pyx_codeobj__131); Py_CLEAR(__pyx_tuple__132); Py_CLEAR(__pyx_codeobj__133); Py_CLEAR(__pyx_tuple__134); Py_CLEAR(__pyx_codeobj__135); Py_CLEAR(__pyx_tuple__136); Py_CLEAR(__pyx_codeobj__137); Py_CLEAR(__pyx_tuple__138); Py_CLEAR(__pyx_tuple__139); Py_CLEAR(__pyx_codeobj__140); Py_CLEAR(__pyx_tuple__141); Py_CLEAR(__pyx_codeobj__142); Py_CLEAR(__pyx_tuple__143); Py_CLEAR(__pyx_codeobj__144); Py_CLEAR(__pyx_tuple__145); Py_CLEAR(__pyx_codeobj__146); Py_CLEAR(__pyx_tuple__147); Py_CLEAR(__pyx_codeobj__148); Py_CLEAR(__pyx_tuple__149); Py_CLEAR(__pyx_codeobj__150); Py_CLEAR(__pyx_tuple__151); Py_CLEAR(__pyx_codeobj__152); Py_CLEAR(__pyx_tuple__153); Py_CLEAR(__pyx_codeobj__154); Py_CLEAR(__pyx_tuple__155); Py_CLEAR(__pyx_codeobj__156); Py_CLEAR(__pyx_tuple__157); Py_CLEAR(__pyx_codeobj__158); Py_CLEAR(__pyx_tuple__159); Py_CLEAR(__pyx_codeobj__160); Py_CLEAR(__pyx_tuple__161); Py_CLEAR(__pyx_codeobj__162); Py_CLEAR(__pyx_tuple__163); Py_CLEAR(__pyx_codeobj__164); Py_CLEAR(__pyx_tuple__165); Py_CLEAR(__pyx_codeobj__166); Py_CLEAR(__pyx_tuple__167); Py_CLEAR(__pyx_codeobj__168); Py_CLEAR(__pyx_tuple__169); Py_CLEAR(__pyx_codeobj__170); Py_CLEAR(__pyx_tuple__171); Py_CLEAR(__pyx_codeobj__172); Py_CLEAR(__pyx_tuple__173); Py_CLEAR(__pyx_codeobj__174); Py_CLEAR(__pyx_tuple__175); Py_CLEAR(__pyx_codeobj__176); Py_CLEAR(__pyx_tuple__177); Py_CLEAR(__pyx_codeobj__178); Py_CLEAR(__pyx_tuple__179); Py_CLEAR(__pyx_codeobj__180); Py_CLEAR(__pyx_tuple__181); Py_CLEAR(__pyx_codeobj__182); Py_CLEAR(__pyx_tuple__183); Py_CLEAR(__pyx_codeobj__184); Py_CLEAR(__pyx_tuple__185); Py_CLEAR(__pyx_codeobj__186); Py_CLEAR(__pyx_tuple__187); Py_CLEAR(__pyx_codeobj__188); Py_CLEAR(__pyx_tuple__189); Py_CLEAR(__pyx_codeobj__190); Py_CLEAR(__pyx_tuple__191); Py_CLEAR(__pyx_codeobj__192); Py_CLEAR(__pyx_tuple__193); Py_CLEAR(__pyx_codeobj__194); Py_CLEAR(__pyx_tuple__195); Py_CLEAR(__pyx_codeobj__196); Py_CLEAR(__pyx_tuple__197); Py_CLEAR(__pyx_codeobj__198); Py_CLEAR(__pyx_tuple__199); Py_CLEAR(__pyx_codeobj__200); Py_CLEAR(__pyx_tuple__201); Py_CLEAR(__pyx_codeobj__202); Py_CLEAR(__pyx_tuple__203); Py_CLEAR(__pyx_codeobj__204); Py_CLEAR(__pyx_tuple__205); Py_CLEAR(__pyx_codeobj__206); Py_CLEAR(__pyx_tuple__207); Py_CLEAR(__pyx_codeobj__208); Py_CLEAR(__pyx_codeobj__209); Py_CLEAR(__pyx_codeobj__210); Py_CLEAR(__pyx_tuple__211); Py_CLEAR(__pyx_codeobj__212); Py_CLEAR(__pyx_tuple__213); Py_CLEAR(__pyx_codeobj__214); Py_CLEAR(__pyx_tuple__215); Py_CLEAR(__pyx_codeobj__216); Py_CLEAR(__pyx_tuple__217); Py_CLEAR(__pyx_codeobj__218); Py_CLEAR(__pyx_tuple__219); Py_CLEAR(__pyx_codeobj__220); Py_CLEAR(__pyx_tuple__221); Py_CLEAR(__pyx_codeobj__222); Py_CLEAR(__pyx_tuple__223); Py_CLEAR(__pyx_codeobj__224); Py_CLEAR(__pyx_tuple__225); Py_CLEAR(__pyx_codeobj__226); Py_CLEAR(__pyx_codeobj__227); Py_CLEAR(__pyx_codeobj__228); Py_CLEAR(__pyx_tuple__229); Py_CLEAR(__pyx_codeobj__230); Py_CLEAR(__pyx_tuple__231); Py_CLEAR(__pyx_codeobj__232); Py_CLEAR(__pyx_tuple__233); Py_CLEAR(__pyx_codeobj__234); Py_CLEAR(__pyx_tuple__235); Py_CLEAR(__pyx_codeobj__236); Py_CLEAR(__pyx_tuple__237); Py_CLEAR(__pyx_codeobj__238); /* CodeObjectCache.cleanup */ if (__pyx_code_cache.entries) { __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; int i, count = __pyx_code_cache.count; __pyx_code_cache.count = 0; __pyx_code_cache.max_count = 0; __pyx_code_cache.entries = NULL; for (i=0; itp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } /* PyCFunctionFastCall */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); int flags = PyCFunction_GET_FLAGS(func); assert(PyCFunction_Check(func)); assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, because it may clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); } else { return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); } } #endif /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { return NULL; } if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif #endif /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCall2Args */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args, *result = NULL; #if CYTHON_FAST_PYCALL if (PyFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyFunction_FastCall(function, args, 2); } #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyCFunction_FastCall(function, args, 2); } #endif args = PyTuple_New(2); if (unlikely(!args)) goto done; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); Py_INCREF(function); result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); done: return result; } /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, &arg, 1); } #endif if (likely(PyCFunction_Check(func))) { if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; #endif Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif { PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; } #endif /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* PyObjectCallNoArg */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, NULL, 0); } #endif #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) #else if (likely(PyCFunction_Check(func))) #endif { if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int full_traceback, CYTHON_UNUSED int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare #ifdef WITH_THREAD PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); #ifdef _MSC_VER else state = (PyGILState_STATE)-1; #endif #endif __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(1); } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else ctx = PyUnicode_FromString(name); #endif __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } #ifdef WITH_THREAD if (nogil) PyGILState_Release(state); #endif } /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; icurexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; if (unlikely(PyTuple_Check(err))) return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #endif /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { if (unlikely(PyTuple_Check(key))) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) { PyErr_SetObject(PyExc_KeyError, args); Py_DECREF(args); } } else { PyErr_SetObject(PyExc_KeyError, key); } } return NULL; } Py_INCREF(value); return value; } #endif /* KeywordStringCheck */ static int __Pyx_CheckKeywordStrings( PyObject *kwdict, const char* function_name, int kw_allowed) { PyObject* key = 0; Py_ssize_t pos = 0; #if CYTHON_COMPILING_IN_PYPY if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) goto invalid_keyword; return 1; #else while (PyDict_Next(kwdict, &pos, &key, 0)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyString_Check(key))) #endif if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; } if ((!kw_allowed) && unlikely(key)) goto invalid_keyword; return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif return 0; } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } /* SetItemInt */ static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return -1; PyErr_Clear(); } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) #else if (is_list || PySequence_Check(o)) #endif { return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } /* SwapException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = *type; exc_info->exc_value = *value; exc_info->exc_traceback = *tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #endif /* UnpackUnboundCMethod */ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) return -1; target->method = method; #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION >= 3 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) #endif { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); } #endif return 0; } /* CallUnboundCMethod2 */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { if (likely(cfunc->func)) { PyObject *args[2] = {arg1, arg2}; if (cfunc->flag == METH_FASTCALL) { #if PY_VERSION_HEX >= 0x030700A0 return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); #else return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } #if PY_VERSION_HEX >= 0x030700A0 if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); #endif } return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); } #endif static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ PyObject *args, *result = NULL; if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); if (cfunc->flag & METH_KEYWORDS) result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { args = PyTuple_New(3); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg1); PyTuple_SET_ITEM(args, 1, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 2, arg2); result = __Pyx_PyObject_Call(cfunc->method, args, NULL); } #else args = PyTuple_Pack(3, self, arg1, arg2); if (unlikely(!args)) goto bad; result = __Pyx_PyObject_Call(cfunc->method, args, NULL); #endif bad: Py_XDECREF(args); return result; } /* ArgTypeTest */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } else if (exact) { #if PY_MAJOR_VERSION == 2 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(__Pyx_TypeCheck(obj, type))) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } /* CallUnboundCMethod1 */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { if (likely(cfunc->func)) { int flag = cfunc->flag; if (flag == METH_O) { return (*(cfunc->func))(self, arg); } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { if (PY_VERSION_HEX >= 0x030700A0) { return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); } else { return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } return __Pyx__CallUnboundCMethod1(cfunc, self, arg); } #endif static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ PyObject *args, *result = NULL; if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { args = PyTuple_New(1); if (unlikely(!args)) goto bad; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); if (cfunc->flag & METH_KEYWORDS) result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); result = __Pyx_PyObject_Call(cfunc->method, args, NULL); } #else args = PyTuple_Pack(2, self, arg); if (unlikely(!args)) goto bad; result = __Pyx_PyObject_Call(cfunc->method, args, NULL); #endif bad: Py_XDECREF(args); return result; } /* dict_getitem_default */ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { PyObject* value; #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (unlikely(PyErr_Occurred())) return NULL; value = default_value; } Py_INCREF(value); if ((1)); #else if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { value = PyDict_GetItem(d, key); if (unlikely(!value)) { value = default_value; } Py_INCREF(value); } #endif else { if (default_value == Py_None) value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key); else value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value); } return value; } /* PyObjectGetMethod */ static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if PY_MAJOR_VERSION >= 3 #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) #endif #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (descr != NULL) { *method = descr; return 0; } PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(name)); #endif return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } /* PyObjectCallMethod1 */ static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); } /* pop_index */ static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) { PyObject *r; if (unlikely(!py_ix)) return NULL; r = __Pyx__PyObject_PopIndex(L, py_ix); Py_DECREF(py_ix); return r; } static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) { return __Pyx_PyObject_CallMethod1(L, __pyx_n_s_pop, py_ix); } #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) { Py_ssize_t size = PyList_GET_SIZE(L); if (likely(size > (((PyListObject*)L)->allocated >> 1))) { Py_ssize_t cix = ix; if (cix < 0) { cix += size; } if (likely(__Pyx_is_valid_index(cix, size))) { PyObject* v = PyList_GET_ITEM(L, cix); Py_SIZE(L) -= 1; size -= 1; memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*)); return v; } } if (py_ix == Py_None) { return __Pyx__PyObject_PopNewIndex(L, PyInt_FromSsize_t(ix)); } else { return __Pyx__PyObject_PopIndex(L, py_ix); } } #endif /* PyObjectSetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #endif /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) #else if (likely(PyString_Check(n))) #endif return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* HasAttr */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, "hasattr(): attribute name must be string"); return -1; } r = __Pyx_GetAttr(o, n); if (unlikely(!r)) { PyErr_Clear(); return 0; } else { Py_DECREF(r); return 1; } } /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { PyObject *runerr; Py_ssize_t key_value; PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; if (unlikely(!(m && m->sq_item))) { PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); return NULL; } key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { PyErr_Clear(); PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); } return NULL; } static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; if (likely(m && m->mp_subscript)) { return m->mp_subscript(obj, key); } return __Pyx_PyObject_GetIndex(obj, key); } #endif /* CallUnboundCMethod0 */ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { PyObject *args, *result = NULL; if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_ASSUME_SAFE_MACROS args = PyTuple_New(1); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); #else args = PyTuple_Pack(1, self); if (unlikely(!args)) goto bad; #endif result = __Pyx_PyObject_Call(cfunc->method, args, NULL); Py_DECREF(args); bad: return result; } /* py_dict_items */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { if (PY_MAJOR_VERSION >= 3) return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d); else return PyDict_Items(d); } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* SliceObject */ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_ass_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_ass_slice(obj, cstart, cstop, value); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_ass_subscript)) #endif { int result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_ass_subscript(obj, py_slice, value); #else result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object does not support slice %.10s", Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion"); bad: return -1; } /* SliceObject */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) goto bad; PyErr_Clear(); } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } /* append */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, attr_name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(attr_name)); #endif return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* SetVTable */ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); #endif if (!ob) goto bad; if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* GetNameInClass */ static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { PyObject *result; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); __Pyx_GetModuleGlobalNameUncached(result, name); return result; } static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; result = __Pyx_PyObject_GetAttrStr(nmspace, name); if (!result) { result = __Pyx_GetGlobalNameAfterAttributeLookup(name); } return result; } /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } /* FetchCommonType */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } /* CythonFunction */ #include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp = op->func_doc; if (value == NULL) { value = Py_None; } Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return __Pyx_PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; Py_ssize_t size; switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 0)) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; argc = PyTuple_GET_SIZE(args); new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, 0, 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_CyFunction_descr_get, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 0, #endif }; static int __pyx_CyFunction_init(void) { __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } /* ClassMethod */ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { return PyClassMethod_New(method); } #else #if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY if (PyMethodDescr_Check(method)) #else static PyTypeObject *methoddescr_type = NULL; if (methoddescr_type == NULL) { PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append"); if (!meth) return NULL; methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } if (__Pyx_TypeCheck(method, methoddescr_type)) #endif { PyMethodDescrObject *descr = (PyMethodDescrObject *)method; #if PY_VERSION_HEX < 0x03020000 PyTypeObject *d_type = descr->d_type; #else PyTypeObject *d_type = descr->d_common.d_type; #endif return PyDescr_NewClassMethod(d_type, descr->d_method); } #endif else if (PyMethod_Check(method)) { return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); } else if (PyCFunction_Check(method)) { return PyClassMethod_New(method); } #ifdef __Pyx_CyFunction_USED else if (__Pyx_CyFunction_Check(method)) { return PyClassMethod_New(method); } #endif PyErr_SetString(PyExc_TypeError, "Class-level classmethod() can only be called on " "a method_descriptor or instance method."); return NULL; } /* RegisterModuleCleanup */ #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static PyObject* __pyx_module_cleanup_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { __pyx_module_cleanup(module); Py_INCREF(Py_None); return Py_None; } static int __Pyx_RegisterCleanup(void) { static PyMethodDef cleanup_def = { "__cleanup", (PyCFunction)__pyx_module_cleanup_atexit, METH_NOARGS, 0}; PyObject *cleanup_func = 0; PyObject *atexit = 0; PyObject *reg = 0; PyObject *args = 0; PyObject *res = 0; int ret = -1; cleanup_func = PyCFunction_New(&cleanup_def, 0); if (!cleanup_func) goto bad; atexit = PyImport_ImportModule("atexit"); if (!atexit) goto bad; reg = PyObject_GetAttrString(atexit, "_exithandlers"); if (reg && PyList_Check(reg)) { PyObject *a, *kw; a = PyTuple_New(0); kw = PyDict_New(); if (!a || !kw) { Py_XDECREF(a); Py_XDECREF(kw); goto bad; } args = PyTuple_Pack(3, cleanup_func, a, kw); Py_DECREF(a); Py_DECREF(kw); if (!args) goto bad; ret = PyList_Insert(reg, 0, args); } else { if (!reg) PyErr_Clear(); Py_XDECREF(reg); reg = PyObject_GetAttrString(atexit, "register"); if (!reg) goto bad; args = PyTuple_Pack(1, cleanup_func); if (!args) goto bad; res = PyObject_CallObject(reg, args); if (!res) goto bad; ret = 0; } bad: Py_XDECREF(cleanup_func); Py_XDECREF(atexit); Py_XDECREF(reg); Py_XDECREF(args); Py_XDECREF(res); return ret; } #endif /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MPI_Aint(MPI_Aint value) { const MPI_Aint neg_one = (MPI_Aint) ((MPI_Aint) 0 - (MPI_Aint) 1), const_zero = (MPI_Aint) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(MPI_Aint) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(MPI_Aint) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Aint) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(MPI_Aint) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Aint) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(MPI_Aint), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MPI_Offset(MPI_Offset value) { const MPI_Offset neg_one = (MPI_Offset) ((MPI_Offset) 0 - (MPI_Offset) 1), const_zero = (MPI_Offset) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(MPI_Offset) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(MPI_Offset) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Offset) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(MPI_Offset) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Offset) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(MPI_Offset), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MPI_Fint(MPI_Fint value) { const MPI_Fint neg_one = (MPI_Fint) ((MPI_Fint) 0 - (MPI_Fint) 1), const_zero = (MPI_Fint) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(MPI_Fint) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(MPI_Fint) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Fint) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(MPI_Fint) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Fint) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(MPI_Fint), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MPI_Count(MPI_Count value) { const MPI_Count neg_one = (MPI_Count) ((MPI_Count) 0 - (MPI_Count) 1), const_zero = (MPI_Count) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(MPI_Count) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(MPI_Count) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Count) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(MPI_Count) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Count) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(MPI_Count), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE MPI_Aint __Pyx_PyInt_As_MPI_Aint(PyObject *x) { const MPI_Aint neg_one = (MPI_Aint) ((MPI_Aint) 0 - (MPI_Aint) 1), const_zero = (MPI_Aint) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(MPI_Aint) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(MPI_Aint, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (MPI_Aint) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Aint) 0; case 1: __PYX_VERIFY_RETURN_INT(MPI_Aint, digit, digits[0]) case 2: if (8 * sizeof(MPI_Aint) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Aint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Aint) >= 2 * PyLong_SHIFT) { return (MPI_Aint) (((((MPI_Aint)digits[1]) << PyLong_SHIFT) | (MPI_Aint)digits[0])); } } break; case 3: if (8 * sizeof(MPI_Aint) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Aint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Aint) >= 3 * PyLong_SHIFT) { return (MPI_Aint) (((((((MPI_Aint)digits[2]) << PyLong_SHIFT) | (MPI_Aint)digits[1]) << PyLong_SHIFT) | (MPI_Aint)digits[0])); } } break; case 4: if (8 * sizeof(MPI_Aint) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Aint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Aint) >= 4 * PyLong_SHIFT) { return (MPI_Aint) (((((((((MPI_Aint)digits[3]) << PyLong_SHIFT) | (MPI_Aint)digits[2]) << PyLong_SHIFT) | (MPI_Aint)digits[1]) << PyLong_SHIFT) | (MPI_Aint)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (MPI_Aint) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(MPI_Aint) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Aint, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Aint) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Aint, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Aint) 0; case -1: __PYX_VERIFY_RETURN_INT(MPI_Aint, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(MPI_Aint, digit, +digits[0]) case -2: if (8 * sizeof(MPI_Aint) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Aint, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Aint) - 1 > 2 * PyLong_SHIFT) { return (MPI_Aint) (((MPI_Aint)-1)*(((((MPI_Aint)digits[1]) << PyLong_SHIFT) | (MPI_Aint)digits[0]))); } } break; case 2: if (8 * sizeof(MPI_Aint) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Aint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Aint) - 1 > 2 * PyLong_SHIFT) { return (MPI_Aint) ((((((MPI_Aint)digits[1]) << PyLong_SHIFT) | (MPI_Aint)digits[0]))); } } break; case -3: if (8 * sizeof(MPI_Aint) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Aint, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Aint) - 1 > 3 * PyLong_SHIFT) { return (MPI_Aint) (((MPI_Aint)-1)*(((((((MPI_Aint)digits[2]) << PyLong_SHIFT) | (MPI_Aint)digits[1]) << PyLong_SHIFT) | (MPI_Aint)digits[0]))); } } break; case 3: if (8 * sizeof(MPI_Aint) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Aint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Aint) - 1 > 3 * PyLong_SHIFT) { return (MPI_Aint) ((((((((MPI_Aint)digits[2]) << PyLong_SHIFT) | (MPI_Aint)digits[1]) << PyLong_SHIFT) | (MPI_Aint)digits[0]))); } } break; case -4: if (8 * sizeof(MPI_Aint) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Aint, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Aint) - 1 > 4 * PyLong_SHIFT) { return (MPI_Aint) (((MPI_Aint)-1)*(((((((((MPI_Aint)digits[3]) << PyLong_SHIFT) | (MPI_Aint)digits[2]) << PyLong_SHIFT) | (MPI_Aint)digits[1]) << PyLong_SHIFT) | (MPI_Aint)digits[0]))); } } break; case 4: if (8 * sizeof(MPI_Aint) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Aint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Aint) - 1 > 4 * PyLong_SHIFT) { return (MPI_Aint) ((((((((((MPI_Aint)digits[3]) << PyLong_SHIFT) | (MPI_Aint)digits[2]) << PyLong_SHIFT) | (MPI_Aint)digits[1]) << PyLong_SHIFT) | (MPI_Aint)digits[0]))); } } break; } #endif if (sizeof(MPI_Aint) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Aint, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Aint) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Aint, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else MPI_Aint val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (MPI_Aint) -1; } } else { MPI_Aint val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (MPI_Aint) -1; val = __Pyx_PyInt_As_MPI_Aint(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to MPI_Aint"); return (MPI_Aint) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to MPI_Aint"); return (MPI_Aint) -1; } /* CIntFromPy */ static CYTHON_INLINE MPI_Count __Pyx_PyInt_As_MPI_Count(PyObject *x) { const MPI_Count neg_one = (MPI_Count) ((MPI_Count) 0 - (MPI_Count) 1), const_zero = (MPI_Count) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(MPI_Count) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(MPI_Count, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (MPI_Count) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Count) 0; case 1: __PYX_VERIFY_RETURN_INT(MPI_Count, digit, digits[0]) case 2: if (8 * sizeof(MPI_Count) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Count, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Count) >= 2 * PyLong_SHIFT) { return (MPI_Count) (((((MPI_Count)digits[1]) << PyLong_SHIFT) | (MPI_Count)digits[0])); } } break; case 3: if (8 * sizeof(MPI_Count) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Count, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Count) >= 3 * PyLong_SHIFT) { return (MPI_Count) (((((((MPI_Count)digits[2]) << PyLong_SHIFT) | (MPI_Count)digits[1]) << PyLong_SHIFT) | (MPI_Count)digits[0])); } } break; case 4: if (8 * sizeof(MPI_Count) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Count, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Count) >= 4 * PyLong_SHIFT) { return (MPI_Count) (((((((((MPI_Count)digits[3]) << PyLong_SHIFT) | (MPI_Count)digits[2]) << PyLong_SHIFT) | (MPI_Count)digits[1]) << PyLong_SHIFT) | (MPI_Count)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (MPI_Count) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(MPI_Count) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Count, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Count) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Count, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Count) 0; case -1: __PYX_VERIFY_RETURN_INT(MPI_Count, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(MPI_Count, digit, +digits[0]) case -2: if (8 * sizeof(MPI_Count) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Count, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Count) - 1 > 2 * PyLong_SHIFT) { return (MPI_Count) (((MPI_Count)-1)*(((((MPI_Count)digits[1]) << PyLong_SHIFT) | (MPI_Count)digits[0]))); } } break; case 2: if (8 * sizeof(MPI_Count) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Count, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Count) - 1 > 2 * PyLong_SHIFT) { return (MPI_Count) ((((((MPI_Count)digits[1]) << PyLong_SHIFT) | (MPI_Count)digits[0]))); } } break; case -3: if (8 * sizeof(MPI_Count) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Count, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Count) - 1 > 3 * PyLong_SHIFT) { return (MPI_Count) (((MPI_Count)-1)*(((((((MPI_Count)digits[2]) << PyLong_SHIFT) | (MPI_Count)digits[1]) << PyLong_SHIFT) | (MPI_Count)digits[0]))); } } break; case 3: if (8 * sizeof(MPI_Count) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Count, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Count) - 1 > 3 * PyLong_SHIFT) { return (MPI_Count) ((((((((MPI_Count)digits[2]) << PyLong_SHIFT) | (MPI_Count)digits[1]) << PyLong_SHIFT) | (MPI_Count)digits[0]))); } } break; case -4: if (8 * sizeof(MPI_Count) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Count, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Count) - 1 > 4 * PyLong_SHIFT) { return (MPI_Count) (((MPI_Count)-1)*(((((((((MPI_Count)digits[3]) << PyLong_SHIFT) | (MPI_Count)digits[2]) << PyLong_SHIFT) | (MPI_Count)digits[1]) << PyLong_SHIFT) | (MPI_Count)digits[0]))); } } break; case 4: if (8 * sizeof(MPI_Count) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Count, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Count) - 1 > 4 * PyLong_SHIFT) { return (MPI_Count) ((((((((((MPI_Count)digits[3]) << PyLong_SHIFT) | (MPI_Count)digits[2]) << PyLong_SHIFT) | (MPI_Count)digits[1]) << PyLong_SHIFT) | (MPI_Count)digits[0]))); } } break; } #endif if (sizeof(MPI_Count) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Count, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Count) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Count, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else MPI_Count val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (MPI_Count) -1; } } else { MPI_Count val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (MPI_Count) -1; val = __Pyx_PyInt_As_MPI_Count(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to MPI_Count"); return (MPI_Count) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to MPI_Count"); return (MPI_Count) -1; } /* CIntFromPy */ static CYTHON_INLINE MPI_Offset __Pyx_PyInt_As_MPI_Offset(PyObject *x) { const MPI_Offset neg_one = (MPI_Offset) ((MPI_Offset) 0 - (MPI_Offset) 1), const_zero = (MPI_Offset) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(MPI_Offset) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(MPI_Offset, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (MPI_Offset) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Offset) 0; case 1: __PYX_VERIFY_RETURN_INT(MPI_Offset, digit, digits[0]) case 2: if (8 * sizeof(MPI_Offset) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Offset, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Offset) >= 2 * PyLong_SHIFT) { return (MPI_Offset) (((((MPI_Offset)digits[1]) << PyLong_SHIFT) | (MPI_Offset)digits[0])); } } break; case 3: if (8 * sizeof(MPI_Offset) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Offset, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Offset) >= 3 * PyLong_SHIFT) { return (MPI_Offset) (((((((MPI_Offset)digits[2]) << PyLong_SHIFT) | (MPI_Offset)digits[1]) << PyLong_SHIFT) | (MPI_Offset)digits[0])); } } break; case 4: if (8 * sizeof(MPI_Offset) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Offset, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Offset) >= 4 * PyLong_SHIFT) { return (MPI_Offset) (((((((((MPI_Offset)digits[3]) << PyLong_SHIFT) | (MPI_Offset)digits[2]) << PyLong_SHIFT) | (MPI_Offset)digits[1]) << PyLong_SHIFT) | (MPI_Offset)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (MPI_Offset) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(MPI_Offset) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Offset, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Offset) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Offset, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Offset) 0; case -1: __PYX_VERIFY_RETURN_INT(MPI_Offset, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(MPI_Offset, digit, +digits[0]) case -2: if (8 * sizeof(MPI_Offset) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Offset, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Offset) - 1 > 2 * PyLong_SHIFT) { return (MPI_Offset) (((MPI_Offset)-1)*(((((MPI_Offset)digits[1]) << PyLong_SHIFT) | (MPI_Offset)digits[0]))); } } break; case 2: if (8 * sizeof(MPI_Offset) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Offset, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Offset) - 1 > 2 * PyLong_SHIFT) { return (MPI_Offset) ((((((MPI_Offset)digits[1]) << PyLong_SHIFT) | (MPI_Offset)digits[0]))); } } break; case -3: if (8 * sizeof(MPI_Offset) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Offset, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Offset) - 1 > 3 * PyLong_SHIFT) { return (MPI_Offset) (((MPI_Offset)-1)*(((((((MPI_Offset)digits[2]) << PyLong_SHIFT) | (MPI_Offset)digits[1]) << PyLong_SHIFT) | (MPI_Offset)digits[0]))); } } break; case 3: if (8 * sizeof(MPI_Offset) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Offset, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Offset) - 1 > 3 * PyLong_SHIFT) { return (MPI_Offset) ((((((((MPI_Offset)digits[2]) << PyLong_SHIFT) | (MPI_Offset)digits[1]) << PyLong_SHIFT) | (MPI_Offset)digits[0]))); } } break; case -4: if (8 * sizeof(MPI_Offset) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Offset, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Offset) - 1 > 4 * PyLong_SHIFT) { return (MPI_Offset) (((MPI_Offset)-1)*(((((((((MPI_Offset)digits[3]) << PyLong_SHIFT) | (MPI_Offset)digits[2]) << PyLong_SHIFT) | (MPI_Offset)digits[1]) << PyLong_SHIFT) | (MPI_Offset)digits[0]))); } } break; case 4: if (8 * sizeof(MPI_Offset) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Offset, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Offset) - 1 > 4 * PyLong_SHIFT) { return (MPI_Offset) ((((((((((MPI_Offset)digits[3]) << PyLong_SHIFT) | (MPI_Offset)digits[2]) << PyLong_SHIFT) | (MPI_Offset)digits[1]) << PyLong_SHIFT) | (MPI_Offset)digits[0]))); } } break; } #endif if (sizeof(MPI_Offset) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Offset, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Offset) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Offset, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else MPI_Offset val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (MPI_Offset) -1; } } else { MPI_Offset val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (MPI_Offset) -1; val = __Pyx_PyInt_As_MPI_Offset(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to MPI_Offset"); return (MPI_Offset) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to MPI_Offset"); return (MPI_Offset) -1; } /* CIntFromPy */ static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) { const unsigned char neg_one = (unsigned char) ((unsigned char) 0 - (unsigned char) 1), const_zero = (unsigned char) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(unsigned char) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(unsigned char, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (unsigned char) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned char) 0; case 1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, digits[0]) case 2: if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT) { return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); } } break; case 3: if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT) { return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); } } break; case 4: if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) >= 4 * PyLong_SHIFT) { return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (unsigned char) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(unsigned char) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned char) 0; case -1: __PYX_VERIFY_RETURN_INT(unsigned char, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, +digits[0]) case -2: if (8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case 2: if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case -3: if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case 3: if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case -4: if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) { return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case 4: if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) { return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; } #endif if (sizeof(unsigned char) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else unsigned char val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (unsigned char) -1; } } else { unsigned char val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (unsigned char) -1; val = __Pyx_PyInt_As_unsigned_char(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned char"); return (unsigned char) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned char"); return (unsigned char) -1; } /* CIntFromPy */ static CYTHON_INLINE MPI_Fint __Pyx_PyInt_As_MPI_Fint(PyObject *x) { const MPI_Fint neg_one = (MPI_Fint) ((MPI_Fint) 0 - (MPI_Fint) 1), const_zero = (MPI_Fint) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(MPI_Fint) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(MPI_Fint, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (MPI_Fint) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Fint) 0; case 1: __PYX_VERIFY_RETURN_INT(MPI_Fint, digit, digits[0]) case 2: if (8 * sizeof(MPI_Fint) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Fint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Fint) >= 2 * PyLong_SHIFT) { return (MPI_Fint) (((((MPI_Fint)digits[1]) << PyLong_SHIFT) | (MPI_Fint)digits[0])); } } break; case 3: if (8 * sizeof(MPI_Fint) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Fint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Fint) >= 3 * PyLong_SHIFT) { return (MPI_Fint) (((((((MPI_Fint)digits[2]) << PyLong_SHIFT) | (MPI_Fint)digits[1]) << PyLong_SHIFT) | (MPI_Fint)digits[0])); } } break; case 4: if (8 * sizeof(MPI_Fint) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Fint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Fint) >= 4 * PyLong_SHIFT) { return (MPI_Fint) (((((((((MPI_Fint)digits[3]) << PyLong_SHIFT) | (MPI_Fint)digits[2]) << PyLong_SHIFT) | (MPI_Fint)digits[1]) << PyLong_SHIFT) | (MPI_Fint)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (MPI_Fint) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(MPI_Fint) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Fint, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Fint) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Fint, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (MPI_Fint) 0; case -1: __PYX_VERIFY_RETURN_INT(MPI_Fint, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(MPI_Fint, digit, +digits[0]) case -2: if (8 * sizeof(MPI_Fint) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Fint, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Fint) - 1 > 2 * PyLong_SHIFT) { return (MPI_Fint) (((MPI_Fint)-1)*(((((MPI_Fint)digits[1]) << PyLong_SHIFT) | (MPI_Fint)digits[0]))); } } break; case 2: if (8 * sizeof(MPI_Fint) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Fint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Fint) - 1 > 2 * PyLong_SHIFT) { return (MPI_Fint) ((((((MPI_Fint)digits[1]) << PyLong_SHIFT) | (MPI_Fint)digits[0]))); } } break; case -3: if (8 * sizeof(MPI_Fint) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Fint, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Fint) - 1 > 3 * PyLong_SHIFT) { return (MPI_Fint) (((MPI_Fint)-1)*(((((((MPI_Fint)digits[2]) << PyLong_SHIFT) | (MPI_Fint)digits[1]) << PyLong_SHIFT) | (MPI_Fint)digits[0]))); } } break; case 3: if (8 * sizeof(MPI_Fint) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Fint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Fint) - 1 > 3 * PyLong_SHIFT) { return (MPI_Fint) ((((((((MPI_Fint)digits[2]) << PyLong_SHIFT) | (MPI_Fint)digits[1]) << PyLong_SHIFT) | (MPI_Fint)digits[0]))); } } break; case -4: if (8 * sizeof(MPI_Fint) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Fint, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Fint) - 1 > 4 * PyLong_SHIFT) { return (MPI_Fint) (((MPI_Fint)-1)*(((((((((MPI_Fint)digits[3]) << PyLong_SHIFT) | (MPI_Fint)digits[2]) << PyLong_SHIFT) | (MPI_Fint)digits[1]) << PyLong_SHIFT) | (MPI_Fint)digits[0]))); } } break; case 4: if (8 * sizeof(MPI_Fint) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(MPI_Fint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(MPI_Fint) - 1 > 4 * PyLong_SHIFT) { return (MPI_Fint) ((((((((((MPI_Fint)digits[3]) << PyLong_SHIFT) | (MPI_Fint)digits[2]) << PyLong_SHIFT) | (MPI_Fint)digits[1]) << PyLong_SHIFT) | (MPI_Fint)digits[0]))); } } break; } #endif if (sizeof(MPI_Fint) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Fint, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(MPI_Fint) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(MPI_Fint, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else MPI_Fint val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (MPI_Fint) -1; } } else { MPI_Fint val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (MPI_Fint) -1; val = __Pyx_PyInt_As_MPI_Fint(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to MPI_Fint"); return (MPI_Fint) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to MPI_Fint"); return (MPI_Fint) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; if (!res) { res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } return res; } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; i= 0x02070000 cobj = PyCapsule_New(tmp.p, sig, 0); #else cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0); #endif if (!cobj) goto bad; if (PyDict_SetItemString(d, name, cobj) < 0) goto bad; Py_DECREF(cobj); Py_DECREF(d); return 0; bad: Py_XDECREF(cobj); Py_XDECREF(d); return -1; } /* InitStrings */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type %.200s). " "The ability to return an instance of a strict subclass of int " "is deprecated, and may be removed in a future version of Python.", Py_TYPE(result)->tp_name)) { Py_DECREF(result); return NULL; } return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", type_name, type_name, Py_TYPE(result)->tp_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ mpi4py-3.0.3/src/pycompat.h0000664000175000017500000000532213444376256016613 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin */ /* Contact: dalcinl@gmail.com */ /* ------------------------------------------------------------------------- */ #ifdef PYPY_VERSION #ifndef PyByteArray_Check #define PyByteArray_Check(self) PyObject_TypeCheck(self, &PyByteArray_Type) #endif #ifndef PyByteArray_AsString static char* PyByteArray_AsString(PyObject* o) { PyErr_SetString(PyExc_RuntimeError, "PyPy: PyByteArray_AsString() not available"); (void)o; return NULL; } #endif #ifndef PyByteArray_Size static Py_ssize_t PyByteArray_Size(PyObject* o) { PyErr_SetString(PyExc_RuntimeError, "PyPy: PyByteArray_Size() not available"); (void)o; return -1; } #endif #endif/*PYPY_VERSION*/ /* ------------------------------------------------------------------------- */ /* Legacy Python 2 buffer interface */ static int _Py2_IsBuffer(PyObject *obj) { #if PY_VERSION_HEX < 0x03000000 return PyObject_CheckReadBuffer(obj); #else (void)obj; return 0; #endif } static int _Py2_AsBuffer(PyObject *obj, int readonly, void **buf, Py_ssize_t *size) { #if defined(PYPY_VERSION) || PY_VERSION_HEX < 0x03000000 if (readonly) return PyObject_AsReadBuffer(obj, (const void**)buf, size); else return PyObject_AsWriteBuffer(obj, buf, size); #else (void)obj; (void)readonly; (void)buf; (void)size; PyErr_SetString(PyExc_SystemError, "Legacy buffer interface not available in Python 3"); return -1; #endif } /* ------------------------------------------------------------------------- */ #ifdef PYPY_VERSION #if PY_VERSION_HEX < 0x03030000 #ifdef PySlice_GetIndicesEx #undef PySlice_GetIndicesEx #define PySlice_GetIndicesEx(s, n, start, stop, step, length) \ PyPySlice_GetIndicesEx((PySliceObject *)(s), n, start, stop, step, length) #else #define PySlice_GetIndicesEx(s, n, start, stop, step, length) \ PySlice_GetIndicesEx((PySliceObject *)(s), n, start, stop, step, length) #endif #endif #else #if PY_VERSION_HEX < 0x03020000 #define PySlice_GetIndicesEx(s, n, start, stop, step, length) \ PySlice_GetIndicesEx((PySliceObject *)(s), n, start, stop, step, length) #endif #endif /* ------------------------------------------------------------------------- */ #if !defined(WITH_THREAD) #undef PyGILState_Ensure #define PyGILState_Ensure() ((PyGILState_STATE)0) #undef PyGILState_Release #define PyGILState_Release(state) (state)=((PyGILState_STATE)0) #undef Py_BLOCK_THREADS #define Py_BLOCK_THREADS (_save)=(PyThreadState*)0; #undef Py_UNBLOCK_THREADS #define Py_UNBLOCK_THREADS (_save)=(PyThreadState*)0; #endif /* ------------------------------------------------------------------------- */ /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/msvcfix.h0000664000175000017500000000027313426006675016431 0ustar dalcinldalcinl00000000000000#if defined(_MSC_VER) #if _MSC_VER <= 1600 #define _Out_writes_( x ) #endif #if _MSC_VER <= 1500 #pragma include_alias( , ) typedef __int64 int64_t; #endif #endif mpi4py-3.0.3/src/MPI.c0000644000175000017500000000017212750576064015371 0ustar dalcinldalcinl00000000000000#define MPICH_SKIP_MPICXX 1 #define OMPI_SKIP_MPICXX 1 #define OMPI_WANT_MPI_INTERFACE_WARNING 0 #include "mpi4py.MPI.c" mpi4py-3.0.3/src/dynload.h0000644000175000017500000000320212523721016016363 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin * Contact: dalcinl@gmail.com */ #ifndef PyMPI_DYNLOAD_H #define PyMPI_DYNLOAD_H #if HAVE_DLFCN_H #include #else #if defined(__linux) || defined(__linux__) #define RTLD_LAZY 0x00001 #define RTLD_NOW 0x00002 #define RTLD_LOCAL 0x00000 #define RTLD_GLOBAL 0x00100 #define RTLD_NOLOAD 0x00004 #define RTLD_NODELETE 0x01000 #define RTLD_DEEPBIND 0x00008 #elif defined(__sun) || defined(__sun__) #define RTLD_LAZY 0x00001 #define RTLD_NOW 0x00002 #define RTLD_LOCAL 0x00000 #define RTLD_GLOBAL 0x00100 #define RTLD_NOLOAD 0x00004 #define RTLD_NODELETE 0x01000 #define RTLD_FIRST 0x02000 #elif defined(__APPLE__) #define RTLD_LAZY 0x1 #define RTLD_NOW 0x2 #define RTLD_LOCAL 0x4 #define RTLD_GLOBAL 0x8 #define RTLD_NOLOAD 0x10 #define RTLD_NODELETE 0x80 #define RTLD_FIRST 0x100 #elif defined(__CYGWIN__) #define RTLD_LAZY 1 #define RTLD_NOW 2 #define RTLD_LOCAL 0 #define RTLD_GLOBAL 4 #endif #if defined(__cplusplus) extern "C" { #endif extern void *dlopen(const char *, int); extern void *dlsym(void *, const char *); extern int dlclose(void *); extern char *dlerror(void); #if defined(__cplusplus) } #endif #endif #ifndef RTLD_LAZY #define RTLD_LAZY 1 #endif #ifndef RTLD_NOW #define RTLD_NOW RTLD_LAZY #endif #ifndef RTLD_LOCAL #define RTLD_LOCAL 0 #endif #ifndef RTLD_GLOBAL #define RTLD_GLOBAL RTLD_LOCAL #endif #endif /* !PyMPI_DYNLOAD_H */ /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/src/dynload.c0000644000175000017500000000771213200562156016371 0ustar dalcinldalcinl00000000000000/* Author: Lisandro Dalcin * Contact: dalcinl@gmail.com */ #include "Python.h" #include "dynload.h" static PyObject * dl_dlopen(PyObject *self, PyObject *args) { void *handle = NULL; char *filename = NULL; int mode = 0; (void)self; /* unused */ if (!PyArg_ParseTuple(args, (char *)"zi:dlopen", &filename, &mode)) return NULL; handle = dlopen(filename, mode); return PyLong_FromVoidPtr(handle); } static PyObject * dl_dlsym(PyObject *self, PyObject *args) { PyObject *arg0 = NULL; void *handle = NULL; char *symbol = NULL; void *symval = NULL; (void)self; /* unused */ if (!PyArg_ParseTuple(args, (char *)"Os:dlsym", &arg0, &symbol)) return NULL; #ifdef RTLD_DEFAULT handle = (void *)RTLD_DEFAULT; #endif if (arg0 != Py_None) { handle = PyLong_AsVoidPtr(arg0); if (PyErr_Occurred()) return NULL; } symval = dlsym(handle, symbol); return PyLong_FromVoidPtr(symval); } static PyObject * dl_dlclose(PyObject *self, PyObject *arg0) { int err = 0; void *handle = NULL; (void)self; /* unused */ if (arg0 != Py_None) { handle = PyLong_AsVoidPtr(arg0); if (PyErr_Occurred()) return NULL; } if (handle) err = dlclose(handle); return Py_BuildValue((char *)"i", err); } static PyObject * dl_dlerror(PyObject *self, PyObject *args) { char *errmsg = NULL; (void)self; (void)args; /* unused */ errmsg = dlerror(); return Py_BuildValue((char *)"z", errmsg); } static PyMethodDef dl_methods[] = { { (char *)"dlopen", dl_dlopen, METH_VARARGS, NULL }, { (char *)"dlsym", dl_dlsym, METH_VARARGS, NULL }, { (char *)"dlclose", dl_dlclose, METH_O, NULL }, { (char *)"dlerror", dl_dlerror, METH_NOARGS, NULL }, { (char *)NULL, NULL, 0, NULL } /* sentinel */ }; PyDoc_STRVAR(dl_doc, "POSIX dynamic linking loader"); #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef dl_module = { PyModuleDef_HEAD_INIT, /* m_base */ (char *)"dl", /* m_name */ dl_doc, /* m_doc */ -1, /* m_size */ dl_methods, /* m_methods */ NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif #if !defined(PyModule_AddIntMacro) #define PyModule_AddIntMacro(m, c) \ PyModule_AddIntConstant(m, (char *)#c, c) #endif #define PyModule_AddPtrMacro(m, c) \ PyModule_AddObject(m, (char *)#c, PyLong_FromVoidPtr((void *)c)) #if PY_MAJOR_VERSION >= 3 PyMODINIT_FUNC PyInit_dl(void); PyMODINIT_FUNC PyInit_dl(void) #else PyMODINIT_FUNC initdl(void); PyMODINIT_FUNC initdl(void) #endif { PyObject *m = NULL; #if PY_MAJOR_VERSION >= 3 m = PyModule_Create(&dl_module); #else m = Py_InitModule3((char *)"dl", dl_methods, (char *)dl_doc); #endif if (!m) goto bad; if (PyModule_AddIntMacro(m, RTLD_LAZY ) < 0) goto bad; if (PyModule_AddIntMacro(m, RTLD_NOW ) < 0) goto bad; if (PyModule_AddIntMacro(m, RTLD_LOCAL ) < 0) goto bad; if (PyModule_AddIntMacro(m, RTLD_GLOBAL ) < 0) goto bad; #ifdef RTLD_NOLOAD if (PyModule_AddIntMacro(m, RTLD_NOLOAD ) < 0) goto bad; #endif #ifdef RTLD_NODELETE if (PyModule_AddIntMacro(m, RTLD_NODELETE ) < 0) goto bad; #endif #ifdef RTLD_DEEPBIND if (PyModule_AddIntMacro(m, RTLD_DEEPBIND ) < 0) goto bad; #endif #ifdef RTLD_FIRST if (PyModule_AddIntMacro(m, RTLD_FIRST ) < 0) goto bad; #endif #ifdef RTLD_DEFAULT if (PyModule_AddPtrMacro(m, RTLD_DEFAULT) < 0) goto bad; #endif #ifdef RTLD_NEXT if (PyModule_AddPtrMacro(m, RTLD_NEXT) < 0) goto bad; #endif #ifdef RTLD_SELF if (PyModule_AddPtrMacro(m, RTLD_SELF) < 0) goto bad; #endif #ifdef RTLD_MAIN_ONLY if (PyModule_AddPtrMacro(m, RTLD_MAIN_ONLY) < 0) goto bad; #endif finally: #if PY_MAJOR_VERSION >= 3 return m; #else return; #endif bad: Py_XDECREF(m); m = NULL; goto finally; } /* Local variables: c-basic-offset: 2 indent-tabs-mode: nil End: */ mpi4py-3.0.3/README.rst0000644000175000017500000000353413200562156015471 0ustar dalcinldalcinl00000000000000============== MPI for Python ============== .. image:: https://travis-ci.org/mpi4py/mpi4py.svg?branch=master :target: https://travis-ci.org/mpi4py/mpi4py .. image:: https://circleci.com/gh/mpi4py/mpi4py.svg?style=shield :target: https://circleci.com/gh/mpi4py/mpi4py .. image:: https://ci.appveyor.com/api/projects/status/whh5xovp217h0f7n?svg=true :target: https://ci.appveyor.com/project/mpi4py/mpi4py .. image:: https://scan.coverity.com/projects/mpi4py-mpi4py/badge.svg :target: https://scan.coverity.com/projects/mpi4py-mpi4py .. image:: https://codecov.io/gh/mpi4py/mpi4py/branch/master/graph/badge.svg :target: https://codecov.io/gh/mpi4py/mpi4py .. image:: https://readthedocs.org/projects/mpi4py/badge/?version=latest :target: https://mpi4py.readthedocs.org/en/latest/ Overview -------- Welcome to MPI for Python. This package provides Python bindings for the *Message Passing Interface* (`MPI `_) standard. It is implemented on top of the MPI-1/2/3 specification and exposes an API which grounds on the standard MPI-2 C++ bindings. Dependencies ------------ * `Python `_ 2.7, 3.3 or above, or `PyPy `_ 2.0 or above. * A functional MPI 1.x/2.x/3.x implementation like `MPICH `_ or `Open MPI `_ built with shared/dynamic libraries. * To work with the in-development version, you need to install `Cython `_. Testsuite --------- The testsuite is run periodically on * `Travis CI `_ * `Circle CI `_ * `AppVeyor `_ * `Bitbucket Pipelines `_ * `Fedora Jenkins `_ mpi4py-3.0.3/setup.py0000664000175000017500000004627413560002540015521 0ustar dalcinldalcinl00000000000000#!/usr/bin/env python # Author: Lisandro Dalcin # Contact: dalcinl@gmail.com __doc__ = \ """ Python bindings for MPI """ import sys import os import re try: import setuptools except ImportError: setuptools = None pyver = sys.version_info[:2] if pyver < (2, 6) or (3, 0) <= pyver < (3, 2): raise RuntimeError("Python version 2.6, 2.7 or >= 3.2 required") if pyver == (2, 6) or pyver == (3, 2): sys.stderr.write( "WARNING: Python %d.%d is not supported.\n" % pyver) if (hasattr(sys, 'pypy_version_info') and sys.pypy_version_info[:2] < (2, 0)): raise RuntimeError("PyPy version >= 2.0 required") topdir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(topdir, 'conf')) # -------------------------------------------------------------------- # Metadata # -------------------------------------------------------------------- def name(): return 'mpi4py' def version(): srcdir = os.path.join(topdir, 'src') with open(os.path.join(srcdir, 'mpi4py', '__init__.py')) as f: m = re.search(r"__version__\s*=\s*'(.*)'", f.read()) return m.groups()[0] def description(): with open(os.path.join(topdir, 'DESCRIPTION.rst')) as f: return f.read() name = name() version = version() url = 'https://bitbucket.org/mpi4py/%(name)s/' % vars() download = url + 'downloads/%(name)s-%(version)s.tar.gz' % vars() classifiers = """ Development Status :: 5 - Production/Stable Intended Audience :: Developers Intended Audience :: Science/Research License :: OSI Approved :: BSD License Operating System :: MacOS :: MacOS X Operating System :: Microsoft :: Windows Operating System :: POSIX Operating System :: POSIX :: Linux Operating System :: POSIX :: SunOS/Solaris Operating System :: Unix Programming Language :: C Programming Language :: Cython Programming Language :: Python Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Topic :: Scientific/Engineering Topic :: Software Development :: Libraries :: Python Modules Topic :: System :: Distributed Computing """ keywords = """ scientific computing parallel computing message passing interface MPI """ platforms = """ Mac OS X Linux Solaris Unix Windows """ metadata = { 'name' : name, 'version' : version, 'description' : __doc__.strip(), 'long_description' : description(), 'url' : url, 'download_url' : download, 'classifiers' : [c for c in classifiers.split('\n') if c], 'keywords' : [k for k in keywords.split('\n') if k], 'platforms' : [p for p in platforms.split('\n') if p], 'license' : 'BSD', 'author' : 'Lisandro Dalcin', 'author_email' : 'dalcinl@gmail.com', 'maintainer' : 'Lisandro Dalcin', 'maintainer_email' : 'dalcinl@gmail.com', } metadata['provides'] = ['mpi4py'] # -------------------------------------------------------------------- # Extension modules # -------------------------------------------------------------------- def run_command(exe, args): from distutils.spawn import find_executable from distutils.util import split_quoted cmd = find_executable(exe) if not cmd: return [] if not isinstance(args, str): args = ' '.join(args) try: with os.popen(cmd + ' ' + args) as f: return split_quoted(f.read()) except: return [] linux = sys.platform.startswith('linux') solaris = sys.platform.startswith('sunos') darwin = sys.platform.startswith('darwin') if linux: def whole_archive(compiler, name, library_dirs=[]): return ['-Wl,-whole-archive', '-l' + name, '-Wl,-no-whole-archive', ] elif darwin: def darwin_linker_dirs(compiler): from distutils.util import split_quoted linker_cmd = compiler.linker_so + ['-show'] linker_cmd = run_command(linker_cmd[0], linker_cmd[1:]) library_dirs = compiler.library_dirs[:] library_dirs += [flag[2:] for flag in linker_cmd if flag.startswith('-L')] library_dirs += ['/usr/lib'] library_dirs += ['/usr/local/lib'] return library_dirs def whole_archive(compiler, name, library_dirs=[]): library_dirs = library_dirs[:] library_dirs += darwin_linker_dirs(compiler) for libdir in library_dirs: libpath = os.path.join(libdir, 'lib%s.a' % name) if os.path.isfile(libpath): return ['-force_load', libpath] return ['-l%s' % name] elif solaris: def whole_archive(compiler, name, library_dirs=[]): return ['-Wl,-zallextract', '-l' + name, '-Wl,-zdefaultextract', ] else: whole_archive = None def configure_dl(ext, config_cmd): from distutils import log log.info("checking for dlopen() availability ...") ok = config_cmd.check_header('dlfcn.h') if ok : ext.define_macros += [('HAVE_DLFCN_H', 1)] ok = config_cmd.check_library('dl') if ok: ext.libraries += ['dl'] ok = config_cmd.check_function('dlopen', libraries=['dl'], decl=1, call=1) if ok: ext.define_macros += [('HAVE_DLOPEN', 1)] def configure_mpi(ext, config_cmd): from textwrap import dedent from distutils import log from distutils.errors import DistutilsPlatformError headers = ['stdlib.h', 'mpi.h'] # log.info("checking for MPI compile and link ...") ConfigTest = dedent("""\ int main(int argc, char **argv) { (void)MPI_Init(&argc, &argv); (void)MPI_Finalize(); return 0; } """) errmsg = "Cannot %s MPI programs. Check your configuration!!!" ok = config_cmd.try_compile(ConfigTest, headers=headers) if not ok: raise DistutilsPlatformError(errmsg % "compile") ok = config_cmd.try_link(ConfigTest, headers=headers) if not ok: raise DistutilsPlatformError(errmsg % "link") # log.info("checking for missing MPI functions/symbols ...") tests = ["defined(%s)" % macro for macro in ("OPEN_MPI", "MSMPI_VER",)] tests += ["(defined(MPICH_NAME)&&(MPICH_NAME==3))"] tests += ["(defined(MPICH_NAME)&&(MPICH_NAME==2))"] ConfigTest = dedent("""\ #if !(%s) #error "Unknown MPI implementation" #endif """) % "||".join(tests) ok = config_cmd.try_compile(ConfigTest, headers=headers) if not ok: from mpidistutils import ConfigureMPI configure = ConfigureMPI(config_cmd) results = configure.run() configure.dump(results) ext.define_macros += [('HAVE_CONFIG_H', 1)] else: for function, arglist in ( ('MPI_Type_create_f90_integer', '0,(MPI_Datatype*)0'), ('MPI_Type_create_f90_real', '0,0,(MPI_Datatype*)0'), ('MPI_Type_create_f90_complex', '0,0,(MPI_Datatype*)0'), ('MPI_Status_c2f', '(MPI_Status*)0,(MPI_Fint*)0'), ('MPI_Status_f2c', '(MPI_Fint*)0,(MPI_Status*)0'), ): ok = config_cmd.check_function_call( function, arglist, headers=headers) if not ok: macro = 'PyMPI_MISSING_' + function ext.define_macros += [(macro, 1)] for symbol, stype in ( ('MPI_LB', 'MPI_Datatype'), ('MPI_UB', 'MPI_Datatype'), ): ok = config_cmd.check_symbol( symbol, type=stype, headers=headers) if not ok: macro = 'PyMPI_MISSING_' + symbol ext.define_macros += [(macro, 1)] # if os.name == 'posix': configure_dl(ext, config_cmd) def configure_libmpe(lib, config_cmd): # mpecc = os.environ.get('MPECC') or 'mpecc' command = run_command(mpecc, '-mpilog -show') for arg in command: if arg.startswith('-L'): libdir = arg[2:] lib.library_dirs.append(libdir) lib.runtime_library_dirs.append(libdir) # log_lib = 'lmpe' dep_libs = ('pthread', 'mpe') ok = config_cmd.check_library(log_lib, lib.library_dirs) if not ok: return libraries = [] for libname in dep_libs: if config_cmd.check_library( libname, lib.library_dirs, other_libraries=libraries): libraries.insert(0, libname) if whole_archive: cc = config_cmd.compiler dirs = lib.library_dirs[:] lib.extra_link_args += whole_archive(cc, log_lib, dirs) lib.extra_link_args += ['-l' + libname for libname in libraries] else: lib.libraries += [log_lib] + libraries def configure_libvt(lib, config_cmd): # vtcc = os.environ.get('VTCC') or 'vtcc' command = run_command(vtcc, '-vt:showme') for arg in command: if arg.startswith('-L'): libdir = arg[2:] lib.library_dirs.append(libdir) lib.runtime_library_dirs.append(libdir) # modern VampirTrace if lib.name == 'vt': log_lib = 'vt-mpi' else: log_lib = lib.name ok = config_cmd.check_library(log_lib, lib.library_dirs) if ok: lib.libraries = [log_lib] if ok: return # older VampirTrace, Open MPI <= 1.4 if lib.name == 'vt-hyb': log_lib = 'vt.ompi' else: log_lib = 'vt.mpi' dep_libs = ('dl', 'z', 'otf',) ok = config_cmd.check_library(log_lib, lib.library_dirs) if not ok: return libraries = [] for libname in dep_libs: if config_cmd.check_library( libname, lib.library_dirs, other_libraries=libraries): libraries.insert(0, libname) if whole_archive: cc = config_cmd.compiler dirs = lib.library_dirs[:] lib.extra_link_args += whole_archive(cc, log_lib, dirs) lib.extra_link_args += ['-l' + libname for libname in libraries] else: lib.libraries += [log_lib] + libraries lib.define_macros.append(('LIBVT_LEGACY', 1)) if lib.name == 'vt-hyb': openmp_flag = '-fopenmp' # GCC, Intel lib.extra_compile_args.append(openmp_flag) lib.extra_link_args.append(openmp_flag) def configure_pyexe(exe, config_cmd): from distutils import sysconfig if sys.platform.startswith('win'): return if (sys.platform == 'darwin' and ('Anaconda' in sys.version or 'Continuum Analytics' in sys.version)): py_version = sysconfig.get_python_version() py_abiflags = getattr(sys, 'abiflags', '') exe.libraries += ['python' + py_version + py_abiflags] return # from distutils.util import split_quoted cfg_vars = sysconfig.get_config_vars() libraries = [] library_dirs = [] link_args = [] if not sysconfig.get_config_var('Py_ENABLE_SHARED'): py_version = sysconfig.get_python_version() py_abiflags = getattr(sys, 'abiflags', '') libraries = ['python' + py_version + py_abiflags] if hasattr(sys, 'pypy_version_info'): py_tag = py_version[0].replace('2', '') libraries = ['pypy%s-c' % py_tag] if sys.platform == 'darwin': fwkdir = cfg_vars.get('PYTHONFRAMEWORKDIR') if (fwkdir and fwkdir != 'no-framework' and fwkdir in cfg_vars.get('LINKFORSHARED', '')): del libraries[:] for var in ('LIBDIR', 'LIBPL'): library_dirs += split_quoted(cfg_vars.get(var, '')) for var in ('LDFLAGS', 'LIBS', 'MODLIBS', 'SYSLIBS', 'LDLAST'): link_args += split_quoted(cfg_vars.get(var, '')) exe.libraries += libraries exe.library_dirs += library_dirs exe.extra_link_args += link_args def ext_modules(): modules = [] # custom dl extension module dl = dict( name='mpi4py.dl', optional=True, sources=['src/dynload.c'], depends=['src/dynload.h'], configure=configure_dl, ) if os.name == 'posix': modules.append(dl) # MPI extension module from glob import glob MPI = dict( name='mpi4py.MPI', sources=['src/MPI.c'], depends=(['src/mpi4py.MPI.c'] + glob('src/*.h') + glob('src/lib-mpi/*.h') + glob('src/lib-mpi/config/*.h') + glob('src/lib-mpi/compat/*.h') ), configure=configure_mpi, ) modules.append(MPI) # return modules def libraries(): # MPE logging pmpi_mpe = dict( name='mpe', kind='dylib', optional=True, package='mpi4py', dest_dir='lib-pmpi', sources=['src/lib-pmpi/mpe.c'], configure=configure_libmpe, ) # VampirTrace logging pmpi_vt = dict( name='vt', kind='dylib', optional=True, package='mpi4py', dest_dir='lib-pmpi', sources=['src/lib-pmpi/vt.c'], configure=configure_libvt, ) pmpi_vt_mpi = dict( name='vt-mpi', kind='dylib', optional=True, package='mpi4py', dest_dir='lib-pmpi', sources=['src/lib-pmpi/vt-mpi.c'], configure=configure_libvt, ) pmpi_vt_hyb = dict( name='vt-hyb', kind='dylib', optional=True, package='mpi4py', dest_dir='lib-pmpi', sources=['src/lib-pmpi/vt-hyb.c'], configure=configure_libvt, ) # return [ pmpi_mpe, pmpi_vt, pmpi_vt_mpi, pmpi_vt_hyb, ] def executables(): # MPI-enabled Python interpreter pyexe = dict(name='python-mpi', optional=True, package='mpi4py', dest_dir='bin', sources=['src/python.c'], configure=configure_pyexe, ) # if hasattr(sys, 'pypy_version_info'): return [] return [pyexe] # -------------------------------------------------------------------- # Setup # -------------------------------------------------------------------- from mpidistutils import setup from mpidistutils import Extension as Ext from mpidistutils import Library as Lib from mpidistutils import Executable as Exe CYTHON = '0.22' def run_setup(): """ Call setup(*args, **kargs) """ setup_args = metadata.copy() if setuptools: setup_args['zip_safe'] = False if setuptools and not os.getenv('CONDA_BUILD'): src = os.path.join('src', 'mpi4py.MPI.c') has_src = os.path.exists(os.path.join(topdir, src)) has_git = os.path.isdir(os.path.join(topdir, '.git')) has_hg = os.path.isdir(os.path.join(topdir, '.hg')) if not has_src or has_git or has_hg: setup_args['setup_requires'] = ['Cython>='+CYTHON] # setup(packages = ['mpi4py', 'mpi4py.futures'], package_dir = {'mpi4py' : 'src/mpi4py'}, package_data = {'mpi4py' : ['*.pxd', 'include/mpi4py/*.h', 'include/mpi4py/*.i', 'include/mpi4py/*.pxi',]}, ext_modules = [Ext(**ext) for ext in ext_modules()], libraries = [Lib(**lib) for lib in libraries() ], executables = [Exe(**exe) for exe in executables()], **setup_args) def chk_cython(VERSION): from distutils import log from distutils.version import LooseVersion from distutils.version import StrictVersion warn = lambda msg='': sys.stderr.write(msg+'\n') # try: import Cython except ImportError: warn("*"*80) warn() warn(" You need to generate C source files with Cython!!") warn(" Download and install Cython ") warn() warn("*"*80) return False # try: CYTHON_VERSION = Cython.__version__ except AttributeError: from Cython.Compiler.Version import version as CYTHON_VERSION REQUIRED = VERSION m = re.match(r"(\d+\.\d+(?:\.\d+)?).*", CYTHON_VERSION) if m: Version = StrictVersion AVAILABLE = m.groups()[0] else: Version = LooseVersion AVAILABLE = CYTHON_VERSION if (REQUIRED is not None and Version(AVAILABLE) < Version(REQUIRED)): warn("*"*80) warn() warn(" You need to install Cython %s (you have version %s)" % (REQUIRED, CYTHON_VERSION)) warn(" Download and install Cython ") warn() warn("*"*80) return False # return True def run_cython(source, depends=(), includes=(), destdir_c=None, destdir_h=None, wdir=None, force=False, VERSION=None): from glob import glob from distutils import log from distutils import dep_util from distutils.errors import DistutilsError target = os.path.splitext(source)[0]+'.c' cwd = os.getcwd() try: if wdir: os.chdir(wdir) alldeps = [source] for dep in depends: alldeps += glob(dep) if not (force or dep_util.newer_group(alldeps, target)): log.debug("skipping '%s' -> '%s' (up-to-date)", source, target) return finally: os.chdir(cwd) if not chk_cython(VERSION): raise DistutilsError("requires Cython>=%s" % VERSION) log.info("cythonizing '%s' -> '%s'", source, target) from cythonize import cythonize err = cythonize(source, includes=includes, destdir_c=destdir_c, destdir_h=destdir_h, wdir=wdir) if err: raise DistutilsError( "Cython failure: '%s' -> '%s'" % (source, target)) def build_sources(cmd): from distutils.errors import DistutilsError has_src = os.path.exists(os.path.join( topdir, 'src', 'mpi4py.MPI.c')) has_vcs = (os.path.isdir(os.path.join(topdir, '.git')) or os.path.isdir(os.path.join(topdir, '.hg' ))) if (has_src and not has_vcs and not cmd.force): return # mpi4py.MPI source = 'mpi4py.MPI.pyx' depends = ['mpi4py/MPI/*.pyx', 'mpi4py/MPI/*.pxd', 'mpi4py/MPI/*.pxi',] destdir_h = os.path.join('mpi4py', 'include', 'mpi4py') run_cython(source, depends, destdir_h=destdir_h, wdir='src', force=cmd.force, VERSION=CYTHON) from mpidistutils import build_src build_src.run = build_sources def run_testsuite(cmd): from distutils.errors import DistutilsError sys.path.insert(0, 'test') try: from runtests import main finally: del sys.path[0] if cmd.dry_run: return args = cmd.args[:] or [] if cmd.verbose < 1: args.insert(0,'-q') if cmd.verbose > 1: args.insert(0,'-v') err = main(args) if err: raise DistutilsError("test") from mpidistutils import test test.run = run_testsuite def main(): run_setup() if __name__ == '__main__': main() # -------------------------------------------------------------------- mpi4py-3.0.3/MANIFEST.in0000644000175000017500000000105013200562156015527 0ustar dalcinldalcinl00000000000000include setup*.py *.cfg *.rst recursive-include demo *.py *.txt *.pyx *.i *.h *.c *.cxx *.f90 *.f08 recursive-include demo [M,m]akefile *.sh *.bat python-config recursive-include conf *.py *.txt *.cfg *.sh *.bat recursive-include src *.py *.pyx *.px[di] *.h *.c *.i recursive-include test *.py include docs/*.html include docs/*.pdf include docs/*.info include docs/*.[137] include docs/*.rst include docs/*.bib recursive-include docs/usrman * recursive-include docs/apiref * recursive-include docs/source * prune conf/ci prune conf/conda-recipes mpi4py-3.0.3/CHANGES.rst0000664000175000017500000003314313560002540015600 0ustar dalcinldalcinl00000000000000======================= CHANGES: MPI for Python ======================= :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com Release 3.0.3 [2019-11-04] ========================== * Regenerate Cython wrappers to support Python 3.8. Release 3.0.2 [2019-06-11] ========================== * Bug fixes: + Fix handling of readonly buffers in support for Python 2 legacy buffer interface. The issue triggers only when using a buffer-like object that is readonly and does not export the new Python 3 buffer interface. + Fix build issues with Open MPI 4.0.x series related to removal of many MPI-1 symbols deprecated in MPI-2 and removed in MPI-3. + Minor documentation fixes. Release 3.0.1 [2019-02-15] ========================== * Bug fixes: + Fix ``Comm.scatter()`` and other collectives corrupting input send list. Add safety measures to prevent related issues in global reduction operations. + Fix error-checking code for counts in ``Op.Reduce_local()``. * Enhancements: + Map size-specific Python/NumPy typecodes to MPI datatypes. + Allow partial specification of target list/tuple arguments in the various ``Win`` RMA methods. + Workaround for removal of ``MPI_{LB|UB}`` in Open MPI 4.0. + Support for Microsoft MPI v10.0. Release 3.0.0 [2017-11-08] ========================== * New features: + `mpi4py.futures`: Execute computations asynchronously using a pool of MPI processes. This package is based on ``concurrent.futures`` from the Python standard library. + `mpi4py.run`: Run Python code and abort execution in case of unhandled exceptions to prevent deadlocks. + `mpi4py.bench`: Run basic MPI benchmarks and tests. * Enhancements: + Lowercase, pickle-based collective communication calls are now thread-safe through the use of fine-grained locking. + The ``MPI`` module now exposes a ``memory`` type which is a lightweight variant of the builtin ``memoryview`` type, but exposes both the legacy Python 2 and the modern Python 3 buffer interface under a Python 2 runtime. + The ``MPI.Comm.Alltoallw()`` method now uses ``count=1`` and ``displ=0`` as defaults, assuming that messages are specified through user-defined datatypes. + The ``Request.Wait[all]()`` methods now return ``True`` to match the interface of ``Request.Test[all]()``. + The ``Win`` class now implements the Python buffer interface. * Backward-incompatible changes: + The ``buf`` argument of the ``MPI.Comm.recv()`` method is deprecated, passing anything but ``None`` emits a warning. + The ``MPI.Win.memory`` property was removed, use the ``MPI.Win.tomemory()`` method instead. + Executing ``python -m mpi4py`` in the command line is now equivalent to ``python -m mpi4py.run``. For the former behavior, use ``python -m mpi4py.bench``. + Python 2.6 and 3.2 are no longer supported. The ``mpi4py.MPI`` module may still build and partially work, but other pure-Python modules under the ``mpi4py`` namespace will not. + Windows: Remove support for legacy MPICH2, Open MPI, and DeinoMPI. Release 2.0.0 [2015-10-18] ========================== * Support for MPI-3 features. + Matched probes and receives. + Nonblocking collectives. + Neighborhood collectives. + New communicator constructors. + Request-based RMA operations. + New RMA communication and synchronisation calls. + New window constructors. + New datatype constructor. + New C++ boolean and floating complex datatypes. * Support for MPI-2 features not included in previous releases. + Generalized All-to-All collective (``Comm.Alltoallw()``) + User-defined data representations (``Register_datarep()``) * New scalable implementation of reduction operations for Python objects. This code is based on binomial tree algorithms using point-to-point communication and duplicated communicator contexts. To disable this feature, use ``mpi4py.rc.fast_reduce = False``. * Backward-incompatible changes: + Python 2.4, 2.5, 3.0 and 3.1 are no longer supported. + Default MPI error handling policies are overriden. After import, mpi4py sets the ``ERRORS_RETURN`` error handler in ``COMM_SELF`` and ``COMM_WORLD``, as well as any new ``Comm``, ``Win``, or ``File`` instance created through mpi4py, thus effectively ignoring the MPI rules about error handler inheritance. This way, MPI errors translate to Python exceptions. To disable this behavior and use the standard MPI error handling rules, use ``mpi4py.rc.errors = 'default'``. + Change signature of all send methods, ``dest`` is a required argument. + Change signature of all receive and probe methods, ``source`` defaults to ``ANY_SOURCE``, ``tag`` defaults to ``ANY_TAG``. + Change signature of send lowercase-spelling methods, ``obj`` arguments are not mandatory. + Change signature of recv lowercase-spelling methods, renamed 'obj' arguments to 'buf'. + Change ``Request.Waitsome()`` and ``Request.Testsome()`` to return ``None`` or ``list``. + Change signature of all lowercase-spelling collectives, ``sendobj`` arguments are now mandatory, ``recvobj`` arguments were removed. + Reduction operations ``MAXLOC`` and ``MINLOC`` are no longer special-cased in lowercase-spelling methods ``Comm.[all]reduce()`` and ``Comm.[ex]scan()``, the input object must be specified as a tuple ``(obj, location)``. + Change signature of name publishing functions. The new signatures are ``Publish_name(service_name, port_name, info=INFO_NULL)`` and ``Unpublish_name(service_name, port_name, info=INFO_NULL)```. + ``Win`` instances now cache Python objects exposing memory by keeping references instead of using MPI attribute caching. + Change signature of ``Win.Lock()``. The new signature is ``Win.Lock(rank, lock_type=LOCK_EXCLUSIVE, assertion=0)``. + Move ``Cartcomm.Map()`` to ``Intracomm.Cart_map()``. + Move ``Graphcomm.Map()`` to ``Intracomm.Graph_map()``. + Remove the ``mpi4py.MPE`` module. + Rename the Cython definition file for use with ``cimport`` statement from ``mpi_c.pxd`` to ``libmpi.pxd``. Release 1.3.1 [2013-08-07] ========================== * Regenerate C wrappers with Cython 0.19.1 to support Python 3.3. * Install ``*.pxd`` files in ``/mpi4py`` to ease the support for Cython's ``cimport`` statement in code requiring to access mpi4py internals. * As a side-effect of using Cython 0.19.1, ancient Python 2.3 is no longer supported. If you really need it, you can install an older Cython and run ``python setup.py build_src --force``. Release 1.3 [2012-01-20] ======================== * Now ``Comm.recv()`` accept a buffer to receive the message. * Add ``Comm.irecv()`` and ``Request.{wait|test}[any|all]()``. * Add ``Intracomm.Spawn_multiple()``. * Better buffer handling for PEP 3118 and legacy buffer interfaces. * Add support for attribute attribute caching on communicators, datatypes and windows. * Install MPI-enabled Python interpreter as ``/mpi4py/bin/python-mpi``. * Windows: Support for building with Open MPI. Release 1.2.2 [2010-09-13] ========================== * Add ``mpi4py.get_config()`` to retrieve information (compiler wrappers, includes, libraries, etc) about the MPI implementation employed to build mpi4py. * Workaround Python libraries with missing GILState-related API calls in case of non-threaded Python builds. * Windows: look for MPICH2, DeinoMPI, Microsoft HPC Pack at their default install locations under %ProgramFiles. * MPE: fix hacks related to old API's, these hacks are broken when MPE is built with a MPI implementations other than MPICH2. * HP-MPI: fix for missing Fortran datatypes, use dlopen() to load the MPI shared library before MPI_Init() * Many distutils-related fixes, cleanup, and enhancements, better logics to find MPI compiler wrappers. * Support for ``pip install mpi4py``. Release 1.2.1 [2010-02-26] ========================== * Fix declaration in Cython include file. This declaration, while valid for Cython, broke the simple-minded parsing used in conf/mpidistutils.py to implement configure-tests for availability of MPI symbols. * Update SWIG support and make it compatible with Python 3. Also generate an warning for SWIG < 1.3.28. * Fix distutils-related issues in Mac OS X. Now ARCHFLAGS environment variable is honored of all Python's ``config/Makefile`` variables. * Fix issues with Open MPI < 1.4.2 releated to error checking and ``MPI_XXX_NULL`` handles. Release 1.2 [2009-12-29] ======================== * Automatic MPI datatype discovery for NumPy arrays and PEP-3118 buffers. Now buffer-like objects can be messaged directly, it is no longer required to explicitly pass a 2/3-list/tuple like ``[data, MPI.DOUBLE]``, or ``[data, count, MPI.DOUBLE]``. Only basic types are supported, i.e., all C/C99-native signed/unsigned integral types and single/double precision real/complex floating types. Many thanks to Eilif Muller for the initial feedback. * Nonblocking send of pickled Python objects. Many thanks to Andreas Kloeckner for the initial patch and enlightening discussion about this enhancement. * ``Request`` instances now hold a reference to the Python object exposing the buffer involved in point-to-point communication or parallel I/O. Many thanks to Andreas Kloeckner for the initial feedback. * Support for logging of user-defined states and events using `MPE `_. Runtime (i.e., without requiring a recompile!) activation of logging of all MPI calls is supported in POSIX platforms implementing ``dlopen()``. * Support for all the new features in MPI-2.2 (new C99 and F90 datatypes, distributed graph topology, local reduction operation, and other minor enhancements). * Fix the annoying issues related to Open MPI and Python dynamic loading of extension modules in platforms supporting ``dlopen()``. * Fix SLURM dynamic loading issues on SiCortex. Many thanks to Ian Langmore for providing me shell access. Release 1.1.0 [2009-06-06] ========================== * Fix bug in ``Comm.Iprobe()`` that caused segfaults as Python C-API calls were issued with the GIL released (issue #2). * Add ``Comm.bsend()`` and ``Comm.ssend()`` for buffered and synchronous send semantics when communicating general Python objects. * Now the call ``Info.Get(key)`` return a *single* value (i.e, instead of a 2-tuple); this value is ``None`` if ``key`` is not in the ``Info`` object, or a string otherwise. Previously, the call redundantly returned ``(None, False)`` for missing key-value pairs; ``None`` is enough to signal a missing entry. * Add support for parametrized Fortran datatypes. * Add support for decoding user-defined datatypes. * Add support for user-defined reduction operations on memory buffers. However, at most 16 user-defined reduction operations can be created. Ask the author for more room if you need it. Release 1.0.0 [2009-03-20] ========================== This is the fist release of the all-new, Cython-based, implementation of *MPI for Python*. Unfortunately, this implementation is not backward-compatible with the previous one. The list below summarizes the more important changes that can impact user codes. * Some communication calls had *overloaded* functionality. Now there is a clear distinction between communication of general Python object with *pickle*, and (fast, near C-speed) communication of buffer-like objects (e.g., NumPy arrays). - for communicating general Python objects, you have to use all-lowercase methods, like ``send()``, ``recv()``, ``bcast()``, etc. - for communicating array data, you have to use ``Send()``, ``Recv()``, ``Bcast()``, etc. methods. Buffer arguments to these calls must be explicitly specified by using a 2/3-list/tuple like ``[data, MPI.DOUBLE]``, or ``[data, count, MPI.DOUBLE]`` (the former one uses the byte-size of ``data`` and the extent of the MPI datatype to define the ``count``). * Indexing a communicator with an integer returned a special object associating the communication with a target rank, alleviating you from specifying source/destination/root arguments in point-to-point and collective communications. This functionality is no longer available, expressions like:: MPI.COMM_WORLD[0].Send(...) MPI.COMM_WORLD[0].Recv(...) MPI.COMM_WORLD[0].Bcast(...) have to be replaced by:: MPI.COMM_WORLD.Send(..., dest=0) MPI.COMM_WORLD.Recv(..., source=0) MPI.COMM_WORLD.Bcast(..., root=0) * Automatic MPI initialization (i.e., at import time) requests the maximum level of MPI thread support (i.e., it is done by calling ``MPI_Init_thread()`` and passing ``MPI_THREAD_MULTIPLE``). In case you need to change this behavior, you can tweak the contents of the ``mpi4py.rc`` module. * In order to obtain the values of predefined attributes attached to the world communicator, now you have to use the ``Get_attr()`` method on the ``MPI.COMM_WORLD`` instance:: tag_ub = MPI.COMM_WORLD.Get_attr(MPI.TAG_UB) * In the previous implementation, ``MPI.COMM_WORLD`` and ``MPI.COMM_SELF`` were associated to **duplicates** of the (C-level) ``MPI_COMM_WORLD`` and ``MPI_COMM_SELF`` predefined communicator handles. Now this is no longer the case, ``MPI.COMM_WORLD`` and ``MPI.COMM_SELF`` proxies the **actual** ``MPI_COMM_WORLD`` and ``MPI_COMM_SELF`` handles. * Convenience aliases ``MPI.WORLD`` and ``MPI.SELF`` were removed. Use instead ``MPI.COMM_WORLD`` and ``MPI.COMM_SELF``. * Convenience constants ``MPI.WORLD_SIZE`` and ``MPI.WORLD_RANK`` were removed. Use instead ``MPI.COMM_WORLD.Get_size()`` and ``MPI.COMM_WORLD.Get_rank()``. mpi4py-3.0.3/docs/0000775000175000017500000000000013560002767014735 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/docs/usrman/0000775000175000017500000000000013560002767016242 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/docs/usrman/searchindex.js0000664000175000017500000004234013557771112021103 0ustar dalcinldalcinl00000000000000Search.setIndex({docnames:["appendix","citing","index","install","intro","manual","mpi4py.futures","mpi4py.run","overview","tutorial"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.intersphinx":1,sphinx:54},filenames:["appendix.rst","citing.rst","index.rst","install.rst","intro.rst","manual.rst","mpi4py.futures.rst","mpi4py.run.rst","overview.rst","tutorial.rst"],objects:{"":{"--configure":[3,3,1,"cmdoption-configure"],"--mpi":[3,3,1,"cmdoption-mpi"],"--mpicc":[3,3,1,"cmdoption-mpicc"],"-c":[7,3,1,"cmdoption-c"],"-m":[7,3,1,"cmdoption-m"]},"mpi4py.futures":{MPICommExecutor:[6,1,1,""],MPIPoolExecutor:[6,1,1,""]},"mpi4py.futures.MPIPoolExecutor":{bootup:[6,2,1,""],map:[6,2,1,""],shutdown:[6,2,1,""],starmap:[6,2,1,""],submit:[6,2,1,""]},mpi4py:{futures:[6,0,0,"-"],run:[7,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["std","cmdoption","program option"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"std:cmdoption"},terms:{"11th":4,"2nd":4,"6th":4,"abstract":[4,6],"byte":[2,5,8,9],"case":[0,3,4,6,7,8,9],"char":0,"class":[4,6,8,9],"default":[0,3,6,7,8],"export":[0,8],"final":[6,7,8],"float":[6,9],"function":[3,4,6,7,8],"import":[0,6,7,8,9],"int":[0,6,9],"long":[6,9],"new":[3,4,6,7,8],"public":1,"return":[0,6,8,9],"static":8,"switch":6,"true":[6,8],"try":[7,9],"void":9,"while":[6,8],Ewing:4,For:[4,6,9],Its:[4,8],ODE:4,One:[2,5],The:[0,3,4,6,7,8,9],There:[4,8],These:[0,6,7,8],Used:6,Using:[2,4,5],With:6,__main__:[6,7],__name__:6,__next__:6,__worker__:6,_xoption:6,abc:9,abl:[0,8],abort:[6,7],about:[3,6],abov:[0,3],abs:6,academ:1,accept:[6,8],access:[6,8],accommod:9,accumul:8,achiev:[4,8],acknowledg:1,across:[0,8],activ:8,actual:[0,3,6,8],add:3,added:[0,6,8],adding:4,addit:[3,6,8],addition:[4,6,7,8],additon:6,address:8,advanc:1,advantag:[4,6,8],advic:6,advwatr:1,afford:4,after:[0,3,4,6,8],afterward:6,against:[3,6],algorithm:[4,8],all:[0,3,4,6,8,9],allclos:9,allevi:[0,3,6,7,8],allgath:[8,9],allgatherv:8,alloc:[6,7,9],allow:[2,4,5,6,7,8],allreduc:8,alltoal:[8,9],alltoallv:8,alltoallw:8,almost:8,alreadi:[3,6,8],also:[0,3,4,6,7,8],altern:[3,6,7,8],although:[6,8],alwai:8,amod:9,among:[4,8],amount:8,ancient:3,andrew:4,angskun:4,ani:[2,4,5,6,7,8,9],anoth:8,answer:6,anthoni:4,anymor:0,api:[7,8],append:6,appendix:[2,3,5],appli:[0,8],applic:[4,6,8],approach:[4,6,8],appropri:8,approxim:6,arang:9,architectur:[4,8],area:4,arg:[6,7,9],argc:0,argument:[0,3,6,8,9],argv:0,around:8,arrai:[2,4,5,9],arriv:7,as_complet:6,ascii:8,assert:[6,7,9],assign:[6,8],associ:[4,6,8],assum:[0,6,7],asynchron:[6,8],atexit:7,attach:8,attempt:6,attitud:6,attribut:[4,8],author:2,automat:[6,7,8,9],autonom:8,avail:[3,4,6,8,9],avoid:[0,6,8,9],awar:6,back:[6,8],backend:6,backport:6,bandwidth:4,barrett:4,barrier:8,base:[0,3,6,7,8,9],bashrc:0,basic:[0,4,8,9],batch:6,batteri:7,bcast:[8,9],beazlei:4,beazley97:4,becaus:[0,4],becom:4,been:[1,6,8],befor:[4,6,7],begin:8,behavior:[6,7,8],being:8,below:0,bench:3,beowulf:4,besid:6,between:[4,8],bin:[0,9],binari:[0,4,6,8],bind:[2,4,5,8],bitbucket:[2,3],block:[7,9],bootup:6,borrow:4,bosilca:4,both:[6,8],bound:6,brian:4,broadcast:[2,5,8,9],bsp:4,budapest:4,buffer:[2,5,8,9],build:[2,3,5,8],build_ex:0,built:[0,3,4,8],builtin:[2,5],bulk:4,bundl:6,burn:7,bytearrai:6,c99:9,call:[0,3,4,6,7,8,9],callabl:6,caller:8,can:[0,3,4,6,7,8,9],cancel:8,candid:4,cannot:[6,8],capabl:[4,8],care:8,cartcomm:8,cartesian:8,castain:4,caus:8,certainli:8,cfg:3,chang:[4,6],charg:4,chdir:6,check:[3,6],child:[6,8,9],children:6,chop:6,chunk:6,chunksiz:6,citat:[2,5],cite:1,clash:8,classic:6,claus:7,clean:7,client:[8,9],clone:8,close:[4,8,9],close_port:8,cluster:4,cmd:[6,7],code:[0,4,6,7,8],collect:[2,4,5,6],com:2,combin:8,come:8,comm:[6,8,9],comm_self:[6,8,9],comm_world:[6,7,8,9],command:[0,2,3,5,7,9],commit:9,commod:4,common:[7,8],commonli:8,commun:[2,4,5,6,7],compar:[6,8],compat:4,compil:[0,3,4,8,9],complet:[0,4,6,8,9],complex:[6,8,9],complic:[6,8],comput:[1,4,6,8,9],concept:4,concret:6,concurr:[2,5],confer:4,configur:[0,3],conjunct:[4,8],connect:[4,6,8],consid:7,consist:8,constant:[3,6],construct:[2,5,8,9],consum:4,contact:[2,8],contain:[0,6,7,8],content:7,context:[6,8],contig:9,contigu:[8,9],continu:6,contribut:9,control:[6,8],controversi:7,conveni:[7,8,9],convers:8,cooper:8,coordin:8,copi:6,copyright:0,core:[4,6],correspond:6,cosimo:1,count:9,cpi:9,cpu:6,creat:[6,8],create_cart:8,create_graph:8,create_group:8,create_intercomm:8,create_vector:9,creation:8,credit:0,critic:4,cross:6,curl:3,current:[6,8],custom:[3,8],customiz:4,cython:4,dai:0,dalcin:[1,2],dalcinl:2,daniel:4,data:[2,4,5,6,9],datafil:9,datatyp:[8,9],date:2,david:4,deadlock:[6,7],dealt:7,debug:4,decid:6,declar:4,dedic:8,def:[6,9],defin:[4,6,8,9],definit:[4,6],degre:4,delet:8,demand:4,demo:3,departur:7,depend:[0,8],deprec:3,deriv:6,describ:[2,5,8],design:[4,8],desir:6,dest:[7,9],detail:0,detect:6,determin:[6,8],develop:4,devic:8,dict:6,dictionari:9,did:8,differ:[0,3,6,8],difficult:0,dir:0,direct:[8,9],directli:[4,8,9],directori:[0,6,7],disconnect:[8,9],discov:8,discoveri:9,discuss:8,disjoint:[6,8],disk:[6,8],dispatch:8,displ:9,displac:9,distgraphcomm:8,distribut:[0,1,3,4],distutil:[0,2,5],document:[2,5,6,7],doe:4,doi:1,doing:8,domin:4,done:6,dongarra:4,doss:4,dot:9,doubl:9,download:3,drain:7,drive:4,dtype:9,dump:6,dup:8,dure:6,dynam:[0,2,3,4,5,6,7],each:[6,8],eagerli:6,easi:4,easiest:[3,6],easili:[4,6],easy_instal:[2,5],edgar:4,edit:[3,4],effect:[4,7,8],effici:[4,8],either:[3,6,7],elabor:8,eleg:4,element:9,elementari:8,elia:1,elif:[7,9],els:9,emit:6,empti:9,enabl:[2,3,4,5,8],encapsul:4,encourag:4,end:[8,9],engin:4,enough:4,enrich:4,ensur:[6,7,8],enter:[0,7],entir:6,env:[3,6,9],environ:[0,3,6,7,8],environment:[2,5],equal:6,equival:6,error:[0,4,7],errors_are_fat:[7,8],errors_return:[7,8],especi:8,establish:8,etc:[0,8],european:4,even:[6,7,8],eventu:6,ever:[4,6,8],evolv:4,exampl:[0,2,3,5,9],excel:4,except:[6,7,8],execut:[0,3,4,6,7,8,9],executor:6,exhaust:3,exist:[6,8],exit:[6,7],expect:[8,9],explain:6,explicit:8,explicitli:[6,9],exploit:[2,4,5],expos:[2,5,8],express:8,exscan:8,extend:[4,6],extens:[1,4,8],extent:9,extern:[4,8],extra:8,extrem:7,f2py:[2,5],f90:9,f90exec:9,face:4,facil:[6,7,8],facilit:8,fact:1,factori:8,fagg:4,fairli:8,fals:6,fast:[4,8,9],favor:7,favourit:3,fcomm:9,featur:[6,7,8],feed:4,feel:4,fenc:8,file:[3,4,6,7,8,9],filesystem:7,filetyp:9,find:8,finger:6,finit:8,first:[6,8],five:3,flag:[0,6,7],flexibl:[4,8],float64:9,focu:8,follow:[0,3,6,7,8],footprint:8,forc:[6,7],form:4,format:[6,8],former:9,forth:6,fortran:[4,8,9],fortun:[4,8],forum:4,found:4,fourier:8,framework:3,free:[6,8,9],freed:6,freeli:4,from:[2,3,4,5,6,7,8,9],full:[3,4],fulli:8,func:6,fundament:8,further:8,furthermor:[6,8],futur:[2,5],gabriel:4,gain:8,gather:[2,4,5,8,9],gatherv:[8,9],gcc:0,gener:[3,4,8,9],genet:4,georg:4,get:[0,3,6,8],get_attr:8,get_errhandl:8,get_group:8,get_par:[8,9],get_processor_nam:8,get_rank:[7,8,9],get_siz:[7,8,9],get_vers:8,get_view:8,gil:6,given:6,global:[6,8],gmail:2,gnu:3,goal:4,good:4,govern:8,gracefulli:6,graham:4,graphcomm:8,graphic:4,grid:8,gropp:4,ground:8,group:[4,6,8],half:8,handl:[4,7],handler:[7,8],happen:6,hardwar:[4,8],harm:6,has:[3,4,6,8],hat:0,have:[0,3,6,8,9],header:4,hello:[3,9],helloworld:[3,9],help:[0,7],henc:9,heterogen:8,hierarchi:4,high:[4,6,8],higher:4,highli:[7,8],hinsen97:4,hinsen:4,home:0,honor:6,hood:9,hook:7,hope:6,host:3,hour:7,how:[0,6],howev:[0,3,4,6,7,8],http:[1,2,3],hungari:4,huss:4,hydra:6,idea:4,ideal:4,identifi:8,idiom:6,idl:[4,6],ierr:9,imag:[4,6,8],immedi:6,implement:[0,3,4,6,7,9],impli:8,implicit:9,implicitli:8,impolit:7,impos:8,improv:[1,6],inc:4,includ:[0,3,4,9],include_dir:3,inclus:8,incom:6,incompat:4,incomplet:4,increas:8,inde:8,independ:8,individu:8,infer:9,infinit:6,influenc:4,info:6,inform:[0,3],inherit:8,init:8,init_thread:8,initi:[6,7],inner:8,input:[2,4,5,6,7],inspect:6,instac:6,instal:[0,2,5,6,7],install_ex:0,instanc:[6,8,9],instead:[6,8],instruct:[0,3],integ:[6,8,9],integr:[4,8,9],intellig:8,intend:8,inter:6,interact:[0,4,6],intercomm:8,intercommun:[6,8],interfac:[2,4,5,6,8,9],intern:[4,9],internet:4,interplai:7,interpret:[2,3,4,5,6,7,8],intersect:8,intra:6,intracomm:[6,8],intracommun:8,introduc:6,introduct:[2,5],intuit:[4,8],invoc:6,invok:[6,7],involv:8,irecv:[8,9],irremedi:7,is_fin:8,is_initi:8,is_int:8,is_intra:8,isend:[8,9],isn:6,issu:[3,4,6,7,8],item:8,item_count:9,iter:6,itertool:6,its:[3,4,6,7,8],itself:4,jack:4,jeffrei:4,job:6,jose:4,journal:[1,4],jpdc:1,julia:6,julia_lin:6,just:[3,7,8],kambadur:4,kei:6,key1:9,key2:9,keyword:6,kind:[4,8],kler:1,know:0,known:[4,8],konrad:4,kwarg:6,lack:6,languag:[2,4,5,8],laptop:7,larg:[4,6,8,9],larger:8,last:4,latenc:8,launch:[3,6],layer:4,layout:8,ld_library_path:0,lead:[1,4,6,7],learn:[4,8],least:9,lederman:4,legaci:6,length:8,lenient:8,less:6,let:3,letter:9,level:[0,4,6,8],lib:[0,3],librari:[0,3,4,6,7,8],library_dir:3,licens:0,like:[3,4,6,8,9],limit:[4,6,8,9],line:[0,2,3,4,5,7],link:[0,3],linker:0,linux2:0,linux:3,lisandro:2,list:[0,6,8,9],load:8,local:[0,3,8,9],localhost:3,locat:[3,7],lock:[6,8],log:3,login:0,lomdahl:4,longer:[0,8],look:[4,9],lookup_nam:8,loop:8,low:[0,8],lower:[6,8],lowercas:9,lumsdain:4,lusk:4,machin:8,made:[6,8],mai:[6,7,9],main:[0,4,6],maintain:4,major:4,make:[0,4,6],manag:[2,4,5,6],mandatori:6,mani:[4,6,8],manipul:4,map:6,mark:4,marshal:8,master:[6,9],match:[8,9],mathwork:4,matlab:4,matrix:9,matvec:9,max:8,max_work:6,maximum:8,maxproc:9,mean:6,meanwhil:[6,7],mechan:[6,7,8],meet:4,member:8,memori:[4,8,9],mention:4,merg:8,messag:[2,4,5,7,8,9],method:[6,8,9],mind:6,minim:4,minimum:8,miss:3,mit:4,mod:[6,7],mode:8,mode_cr:9,mode_wronli:9,model:[4,8],modern:4,modifi:4,modul:[4,6,7,8,9],modular:4,molecular:4,more:[0,4,6,7,8],moreov:6,most:[0,4,6,9],motiv:8,mpi4pi:[0,2,3,5,8,9],mpi4py_max_work:6,mpi4py_typemap:9,mpi:[1,3,6,7,8],mpi_abort:7,mpi_comm:9,mpi_comm_rank:9,mpi_comm_s:9,mpi_comm_spawn:6,mpi_comm_world:7,mpi_dir:0,mpi_fin:[0,7,8],mpi_info:6,mpi_init:[0,3,8],mpi_init_thread:[7,8],mpicc:[0,3],mpich1:0,mpich:[0,3,4,6],mpich_use_shlib:0,mpicommexecutor:[2,5],mpiexec:[3,6,7,9],mpiexec_universe_s:6,mpif90:9,mpipoolexecutor:[2,5],mpirun:3,much:8,multicor:6,multidimension:8,multipl:[2,4,5,6,8],must:[6,7,8,9],name:[0,3,6,7,8,9],namespac:6,nativ:9,natur:4,nbyte:9,necessarili:8,need:[0,3,6,8],neglig:8,network:8,never:7,next:[4,6,8],nightmar:4,non:[7,8,9],noncollect:8,noncontig:9,none:[6,7,9],nor:6,nose:3,nosetest:3,notabl:0,notic:6,nov:[0,2],now:4,number:[4,6,8],numer:[4,8],numpi:[2,4,5,9],numproc:[6,7],object:[2,4,5,6,9],obtain:8,occupi:8,occur:8,octav:4,octob:4,offer:7,offset:[8,9],often:8,old:3,ompi_universe_s:6,onc:[6,7],one:[4,6,8,9],onli:[4,6,8],oompi:4,open:[0,3,4,6,7,8,9],open_port:8,openmpi:[0,4],oper:[8,9],opt:3,optim:[2,4,5,8],option:[2,3,4,5,6],order:[0,3,6,8],org:[1,2,3],orient:[2,4,5,8],origin:[6,8],other:[4,6,7,8],other_mpi:3,otherwis:[6,8],otto:4,out:[0,6],output:[2,4,5],over:[4,8],overhead:8,overlap:8,overrid:[7,8],overview:[2,5],own:3,pack:8,packag:[2,3,4,5,6,8],page:4,pair:[6,8],paradigm:[4,8],parallel:[1,2,4,5,9],parament:9,paramet:6,parent:[6,8,9],part:[4,8],parti:7,partial:6,particular:[6,8],particularli:8,partit:[6,8],pass:[0,2,3,4,5,6,7,8,9],passiv:8,past:4,path:[0,3,6,7],pattern:[6,8],paz:1,pend:6,pep:9,per:8,perform:[1,4,6,7,8],perhap:[0,3],perl:4,permit:4,peter:4,pgm:6,phase:[6,8],physic:[4,8],pickl:[6,8,9],picklabl:[2,4,5,6],pip:[2,5],platform:[0,4],pleas:1,plot:4,point:[0,2,3,5],pointer:8,pool:6,popular:[4,6],port:[4,8],portabl:[4,8],pose:6,posit:[6,8],posix:[0,8],possibl:[3,4,8],post:8,pow:6,power:4,prabhanjan:4,practic:[4,9],pre:[3,6],preciou:7,precis:[6,9],preclud:8,predefin:8,prefer:3,prefix:[0,3],prequest:8,present:4,press:4,prevent:6,previou:3,previous:[6,8],primari:8,primit:8,print:[6,7,9],printf:9,priori:8,privat:3,privileg:3,problem:[0,7],proce:[6,7],proceed:4,process:[2,3,4,5,6,7],processor:[2,4,5,6,8,9],prod:8,product:9,profil:0,program:[0,2,4,5,6,7,8,9],progress:6,project:[1,2,3,5],prompt:9,prone:4,proper:6,properli:3,protect:[6,8],proven:4,provid:[0,2,3,4,5,6,7,8,9],publish:8,publish_nam:8,pure:0,purpos:4,put:8,pvm:4,pwd:3,py2f:9,py_atexit:[7,8],py_main:0,pyfil:[6,7],pympi:4,pypar:4,pypi:6,python2:0,python:[1,3,6,7],python_arg:6,python_ex:6,qualiti:[4,6],queri:[6,8],quickli:[3,4],quit:[6,7],rais:[6,7,8],ralph:4,random:[6,8],rang:[6,8,9],rank:[6,7,8,9],rapid:4,rather:[4,6,8],reach:7,read:[6,7,8],readi:[3,6],real:9,realli:[0,4,8],realloc:8,rebuild:4,rebuilt:3,recal:6,receiv:[2,5,6,8,9],recommend:[6,8],recompil:4,recov:7,recurs:6,recv:[7,8,9],recv_init:8,recvbuf:9,red:0,reduc:[8,9],reduce_scatt:8,reduct:8,ref:4,refactor:6,refer:[4,7],regard:8,regardless:6,region:8,regist:[4,7,8],rel:8,relat:[2,5,6],releas:[3,4,8],relev:[3,8],reli:8,reliabl:0,remain:6,remot:8,repeatedli:[8,9],repres:6,represent:8,req:9,request:[8,9],requir:[0,2,4,5,6,8],research:4,resembl:[2,4,5,7],resourc:[1,4,6,7,8],respect:8,rest:4,restor:8,result:6,retriev:[6,8],reus:[4,8],revolv:8,richard:4,rma:8,root:[3,6,9],routin:[4,6,8],row:9,rubi:4,rule:8,run:[0,2,3,4,5,6,8],runpi:[6,7],runtest:3,runtim:[0,6],runtime_library_dir:3,runtimeerror:[6,8],runtimewarn:6,safe:8,sahai:4,same:8,san:4,sayhello:9,scalabl:8,scale:4,scan:8,scanlin:6,scatter:[2,5,8,9],scatterv:[8,9],scenario:8,schedul:6,scheme:8,scienc:4,scientif:4,scilab:4,scipi:4,script:[0,2,3,4,5,6,7],search:[3,6,7],second:6,section:3,see:[0,3],segment:[2,5,8],seldom:6,select:8,semant:[4,8],send:[2,5,6,7,8,9],send_init:8,sendbuf:9,sendrecv:8,sent:9,separ:6,septemb:4,sequenc:9,sequenti:8,serial:[6,8],serv:6,server:[8,9],servic:[6,8],set:[0,6,8],set_errhandl:8,set_view:[8,9],setenv:0,setup:[0,3],setuptool:3,sever:6,shape:9,share:[0,3,6,8],sharedlib:0,shell:0,should:[0,3,6,7,8],shown:0,shutdown:6,side:[2,4,5,6,9],sign:9,signal:[4,6],signific:1,significantli:[6,8],silent:8,similar:[4,6],simpl:[4,6,7,8],simplest:4,simpli:[3,9],simplifi:4,simul:4,simultan:8,sinc:4,singl:[2,4,5,6,8,9],site:[2,3],situat:4,size:[6,9],skjellum:4,sleep:6,small:4,smp:4,snippet:7,snir:4,softwar:[3,4,8],solver:4,some:[0,3,4,6,8],somewher:3,soon:6,sourc:[2,3,4,5,7,9],spawn:[6,8,9],special:[0,3,4,8],specif:[2,4,5,8],specifi:[3,6,8,9],speed:[4,9],split:[6,8],spmd:6,squyr:4,standard:[2,3,4,5,6,7,8],starmap:6,start:[3,4,6,8,9],starv:6,state:7,statement:6,statu:[0,7],std1:4,std2:4,stdin:[6,7],step:[0,3,6],steve:4,steven:4,still:[0,6],storag:8,store:[7,8],storti:1,straightforward:0,stream:8,stride:8,string:[2,5,6,7,8],strongli:4,structur:[4,8],studi:4,style:8,subclass:[6,8],sublcass:8,submiss:6,submit:6,subroutin:9,subset:3,subvers:8,success:6,sudo:[0,3],suffici:9,suggest:6,suit:4,suitabl:4,sum:[8,9],summar:6,supercomput:[4,6,7],supplement:8,support:[0,2,3,4,5,6,8,9],swig:[2,4,5],synchron:[4,8],syntax:[4,8],sys:[0,6,7,9],system:[0,3,4,6,8],tag:[7,8,9],take:[6,8],tar:[0,3],tarbal:3,target:[0,6,8],task:[3,4,6],tcl:4,team:6,tediou:7,tell:6,termin:[6,7],test:[2,5,8,9],than:[4,6],thara:4,thei:[6,8,9],them:[6,8],theori:6,therefor:[0,8],thi:[0,2,3,4,5,6,7,8,9],third:7,thirti:8,those:4,thread:6,thread_funnel:6,thread_multipl:6,thread_seri:6,thread_singl:6,threadpoolexecutor:6,three:8,through:[6,8],thu:[6,7,8],time:[0,4,6,7],timeout:6,timeouterror:6,timothi:4,todai:4,togeth:4,too:0,tool:4,toolkit:4,top:[2,4,5,8],topolog:[4,8],total:8,traceback:7,trademark:4,tradit:[6,8],tradition:4,transfer:8,transform:8,translat:[7,8],transmiss:8,transmit:9,transmitt:8,transpar:0,tricki:0,tupl:[6,8,9],turn:8,tutori:[2,5],two:[6,7,8],type:[0,3,4,8,9],typic:[4,8],unaccept:8,unattend:7,unavoid:8,uncondition:6,under:[6,9],underli:[8,9],unfortun:7,unhandl:[6,7],union:8,uniqu:8,unit:3,unittest:3,univers:6,unlock:8,unord:6,unpack:[3,8],unpickl:[6,8],unpublish_nam:8,unsign:9,until:[6,8],updat:[6,8],upon:6,upper:9,usag:[6,8],use:[0,3,6,7,8,9],used:[3,4,6,8,9],useful:[4,6,8],user:[0,3,4,6,8],uses:[3,6,9],using:[0,1,3,4,6,7,8,9],usiz:6,usr:[0,3,9],usual:[4,6],valu:[6,8,9],valueerror:6,variabl:[0,3,4,6],variant:8,varieti:4,vector:[8,9],vendor:[4,6],veri:[4,6,9],version:[6,7,8],via:8,view:8,virtual:8,vishal:4,visibl:8,volum:4,wai:[3,6,7,9],wait:[6,7,8,9],walker:4,want:3,warn:6,warnopt:6,water:1,wdir:6,web:2,websit:3,welcom:9,well:[2,4,5,6,8,9],were:[4,6],wget:3,what:[0,2,5],when:[0,6,7,8],where:[3,6,8,9],whether:8,which:[2,4,5,6,7,8],whole:[4,6,7],wide:[4,8],widespread:4,william:4,willing:6,win:8,window:8,within:[3,6,7,8],without:[4,7,8],woodal:4,work:[3,4,6,8],worker:[6,9],workstat:4,world:[3,8,9],would:[4,6],wrap:[2,4,5],wrapper:[0,3],write:[3,4,6,8],write_al:9,write_at_al:9,written:[4,8],wtick:8,wtime:8,xyz:9,year:4,yes:0,yet:6,yield:6,you:[0,3,6,8,9],your:[0,3,6,7],zero:[7,9],zerodivisionerror:7,zip:6,zipfil:[6,7],zxf:[0,3]},titles:["Appendix","Citation","MPI for Python","Installation","Introduction","MPI for Python","mpi4py.futures","mpi4py.run","Overview","Tutorial"],titleterms:{"abstract":[2,5],One:8,Using:3,appendix:0,arrai:8,block:8,build:0,citat:1,collect:[8,9],command:6,commun:[8,9],concurr:6,content:2,data:8,distutil:3,dynam:[8,9],easy_instal:3,enabl:0,environment:8,error:8,exampl:6,exit:8,f2py:9,from:0,futur:6,handl:8,implement:8,inform:8,initi:8,input:8,instal:3,interfac:7,interpret:0,introduct:4,line:6,manag:[8,9],mpi4pi:[6,7],mpi:[0,2,4,5,9],mpicommexecutor:6,mpipoolexecutor:6,nonblock:8,object:8,option:7,output:8,overview:8,parallel:8,persist:8,pip:3,point:[8,9],process:[8,9],project:4,python:[0,2,4,5,8,9],relat:4,requir:3,run:[7,9],script:9,side:8,sourc:0,swig:9,test:3,timer:8,tutori:9,what:4,wrap:9}})mpi4py-3.0.3/docs/usrman/tutorial.html0000664000175000017500000015375413557771112021015 0ustar dalcinldalcinl00000000000000 Tutorial — MPI for Python 3.0.3 documentation

Tutorial¶

Warning

Under construction. Contributions very welcome!

MPI for Python supports convenient, pickle-based communication of generic Python object as well as fast, near C-speed, direct array data communication of buffer-provider objects (e.g., NumPy arrays).

  • Communication of generic Python objects

    You have to use all-lowercase methods (of the Comm class), like send(), recv(), bcast(). An object to be sent is passed as a paramenter to the communication call, and the received object is simply the return value.

    The isend() and irecv() methods return Request instances; completion of these methods can be managed using the test() and wait() methods of the Request class.

    The recv() and irecv() methods may be passed a buffer object that can be repeatedly used to receive messages avoiding internal memory allocation. This buffer must be sufficiently large to accommodate the transmitted messages; hence, any buffer passed to recv() or irecv() must be at least as long as the pickled data transmitted to the receiver.

    Collective calls like scatter(), gather(), allgather(), alltoall() expect a single value or a sequence of Comm.size elements at the root or all process. They return a single value, a list of Comm.size elements, or None.

  • Communication of buffer-like objects

    You have to use method names starting with an upper-case letter (of the Comm class), like Send(), Recv(), Bcast(), Scatter(), Gather().

    In general, buffer arguments to these calls must be explicitly specified by using a 2/3-list/tuple like [data, MPI.DOUBLE], or [data, count, MPI.DOUBLE] (the former one uses the byte-size of data and the extent of the MPI datatype to define count).

    For vector collectives communication operations like Scatterv() and Gatherv(), buffer arguments are specified as [data, count, displ, datatype], where count and displ are sequences of integral values.

    Automatic MPI datatype discovery for NumPy arrays and PEP-3118 buffers is supported, but limited to basic C types (all C/C99-native signed/unsigned integral types and single/double precision real/complex floating types) and availability of matching datatypes in the underlying MPI implementation. In this case, the buffer-provider object can be passed directly as a buffer argument, the count and MPI datatype will be inferred.

Running Python scripts with MPI¶

Most MPI programs can be run with the command mpiexec. In practice, running Python programs looks like:

$ mpiexec -n 4 python script.py

to run the program with 4 processors.

Point-to-Point Communication¶

  • Python objects (pickle under the hood):

    from mpi4py import MPI
    
    comm = MPI.COMM_WORLD
    rank = comm.Get_rank()
    
    if rank == 0:
        data = {'a': 7, 'b': 3.14}
        comm.send(data, dest=1, tag=11)
    elif rank == 1:
        data = comm.recv(source=0, tag=11)
    
  • Python objects with non-blocking communication:

    from mpi4py import MPI
    
    comm = MPI.COMM_WORLD
    rank = comm.Get_rank()
    
    if rank == 0:
        data = {'a': 7, 'b': 3.14}
        req = comm.isend(data, dest=1, tag=11)
        req.wait()
    elif rank == 1:
        req = comm.irecv(source=0, tag=11)
        data = req.wait()
    
  • NumPy arrays (the fast way!):

    from mpi4py import MPI
    import numpy
    
    comm = MPI.COMM_WORLD
    rank = comm.Get_rank()
    
    # passing MPI datatypes explicitly
    if rank == 0:
        data = numpy.arange(1000, dtype='i')
        comm.Send([data, MPI.INT], dest=1, tag=77)
    elif rank == 1:
        data = numpy.empty(1000, dtype='i')
        comm.Recv([data, MPI.INT], source=0, tag=77)
    
    # automatic MPI datatype discovery
    if rank == 0:
        data = numpy.arange(100, dtype=numpy.float64)
        comm.Send(data, dest=1, tag=13)
    elif rank == 1:
        data = numpy.empty(100, dtype=numpy.float64)
        comm.Recv(data, source=0, tag=13)
    

Collective Communication¶

  • Broadcasting a Python dictionary:

    from mpi4py import MPI
    
    comm = MPI.COMM_WORLD
    rank = comm.Get_rank()
    
    if rank == 0:
        data = {'key1' : [7, 2.72, 2+3j],
                'key2' : ( 'abc', 'xyz')}
    else:
        data = None
    data = comm.bcast(data, root=0)
    
  • Scattering Python objects:

    from mpi4py import MPI
    
    comm = MPI.COMM_WORLD
    size = comm.Get_size()
    rank = comm.Get_rank()
    
    if rank == 0:
        data = [(i+1)**2 for i in range(size)]
    else:
        data = None
    data = comm.scatter(data, root=0)
    assert data == (rank+1)**2
    
  • Gathering Python objects:

    from mpi4py import MPI
    
    comm = MPI.COMM_WORLD
    size = comm.Get_size()
    rank = comm.Get_rank()
    
    data = (rank+1)**2
    data = comm.gather(data, root=0)
    if rank == 0:
        for i in range(size):
            assert data[i] == (i+1)**2
    else:
        assert data is None
    
  • Broadcasting a NumPy array:

    from mpi4py import MPI
    import numpy as np
    
    comm = MPI.COMM_WORLD
    rank = comm.Get_rank()
    
    if rank == 0:
        data = np.arange(100, dtype='i')
    else:
        data = np.empty(100, dtype='i')
    comm.Bcast(data, root=0)
    for i in range(100):
        assert data[i] == i
    
  • Scattering NumPy arrays:

    from mpi4py import MPI
    import numpy as np
    
    comm = MPI.COMM_WORLD
    size = comm.Get_size()
    rank = comm.Get_rank()
    
    sendbuf = None
    if rank == 0:
        sendbuf = np.empty([size, 100], dtype='i')
        sendbuf.T[:,:] = range(size)
    recvbuf = np.empty(100, dtype='i')
    comm.Scatter(sendbuf, recvbuf, root=0)
    assert np.allclose(recvbuf, rank)
    
  • Gathering NumPy arrays:

    from mpi4py import MPI
    import numpy as np
    
    comm = MPI.COMM_WORLD
    size = comm.Get_size()
    rank = comm.Get_rank()
    
    sendbuf = np.zeros(100, dtype='i') + rank
    recvbuf = None
    if rank == 0:
        recvbuf = np.empty([size, 100], dtype='i')
    comm.Gather(sendbuf, recvbuf, root=0)
    if rank == 0:
        for i in range(size):
            assert np.allclose(recvbuf[i,:], i)
    
  • Parallel matrix-vector product:

    from mpi4py import MPI
    import numpy
    
    def matvec(comm, A, x):
        m = A.shape[0] # local rows
        p = comm.Get_size()
        xg = numpy.zeros(m*p, dtype='d')
        comm.Allgather([x,  MPI.DOUBLE],
                       [xg, MPI.DOUBLE])
        y = numpy.dot(A, xg)
        return y
    

MPI-IO¶

  • Collective I/O with NumPy arrays:

    from mpi4py import MPI
    import numpy as np
    
    amode = MPI.MODE_WRONLY|MPI.MODE_CREATE
    comm = MPI.COMM_WORLD
    fh = MPI.File.Open(comm, "./datafile.contig", amode)
    
    buffer = np.empty(10, dtype=np.int)
    buffer[:] = comm.Get_rank()
    
    offset = comm.Get_rank()*buffer.nbytes
    fh.Write_at_all(offset, buffer)
    
    fh.Close()
    
  • Non-contiguous Collective I/O with NumPy arrays and datatypes:

    from mpi4py import MPI
    import numpy as np
    
    comm = MPI.COMM_WORLD
    rank = comm.Get_rank()
    size = comm.Get_size()
    
    amode = MPI.MODE_WRONLY|MPI.MODE_CREATE
    fh = MPI.File.Open(comm, "./datafile.noncontig", amode)
    
    item_count = 10
    
    buffer = np.empty(item_count, dtype='i')
    buffer[:] = rank
    
    filetype = MPI.INT.Create_vector(item_count, 1, size)
    filetype.Commit()
    
    displacement = MPI.INT.Get_size()*rank
    fh.Set_view(displacement, filetype=filetype)
    
    fh.Write_all(buffer)
    filetype.Free()
    fh.Close()
    

Dynamic Process Management¶

  • Compute Pi - Master (or parent, or client) side:

    #!/usr/bin/env python
    from mpi4py import MPI
    import numpy
    import sys
    
    comm = MPI.COMM_SELF.Spawn(sys.executable,
                               args=['cpi.py'],
                               maxprocs=5)
    
    N = numpy.array(100, 'i')
    comm.Bcast([N, MPI.INT], root=MPI.ROOT)
    PI = numpy.array(0.0, 'd')
    comm.Reduce(None, [PI, MPI.DOUBLE],
                op=MPI.SUM, root=MPI.ROOT)
    print(PI)
    
    comm.Disconnect()
    
  • Compute Pi - Worker (or child, or server) side:

    #!/usr/bin/env python
    from mpi4py import MPI
    import numpy
    
    comm = MPI.Comm.Get_parent()
    size = comm.Get_size()
    rank = comm.Get_rank()
    
    N = numpy.array(0, dtype='i')
    comm.Bcast([N, MPI.INT], root=0)
    h = 1.0 / N; s = 0.0
    for i in range(rank, N, size):
        x = h * (i + 0.5)
        s += 4.0 / (1.0 + x**2)
    PI = numpy.array(s * h, dtype='d')
    comm.Reduce([PI, MPI.DOUBLE], None,
                op=MPI.SUM, root=0)
    
    comm.Disconnect()
    

Wrapping with SWIG¶

  • C source:

    /* file: helloworld.c */
    void sayhello(MPI_Comm comm)
    {
      int size, rank;
      MPI_Comm_size(comm, &size);
      MPI_Comm_rank(comm, &rank);
      printf("Hello, World! "
             "I am process %d of %d.\n",
             rank, size);
    }
    
  • SWIG interface file:

    // file: helloworld.i
    %module helloworld
    %{
    #include <mpi.h>
    #include "helloworld.c"
    }%
    
    %include mpi4py/mpi4py.i
    %mpi4py_typemap(Comm, MPI_Comm);
    void sayhello(MPI_Comm comm);
    
  • Try it in the Python prompt:

    >>> from mpi4py import MPI
    >>> import helloworld
    >>> helloworld.sayhello(MPI.COMM_WORLD)
    Hello, World! I am process 0 of 1.
    

Wrapping with F2Py¶

  • Fortran 90 source:

    ! file: helloworld.f90
    subroutine sayhello(comm)
      use mpi
      implicit none
      integer :: comm, rank, size, ierr
      call MPI_Comm_size(comm, size, ierr)
      call MPI_Comm_rank(comm, rank, ierr)
      print *, 'Hello, World! I am process ',rank,' of ',size,'.'
    end subroutine sayhello
    
  • Compiling example using f2py

    $ f2py -c --f90exec=mpif90 helloworld.f90 -m helloworld
    
  • Try it in the Python prompt:

    >>> from mpi4py import MPI
    >>> import helloworld
    >>> fcomm = MPI.COMM_WORLD.py2f()
    >>> helloworld.sayhello(fcomm)
    Hello, World! I am process 0 of 1.
    
mpi4py-3.0.3/docs/usrman/_static/0000775000175000017500000000000013560002767017670 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/docs/usrman/_static/default.css0000664000175000017500000000003413413061004022005 0ustar dalcinldalcinl00000000000000@import url("classic.css"); mpi4py-3.0.3/docs/usrman/_static/language_data.js0000664000175000017500000002513713557771112023015 0ustar dalcinldalcinl00000000000000/* * language_data.js * ~~~~~~~~~~~~~~~~ * * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]; /* Non-minified version JS is _stemmer.js if file is provided */ /** * Porter Stemmer */ var Stemmer = function() { var step2list = { ational: 'ate', tional: 'tion', enci: 'ence', anci: 'ance', izer: 'ize', bli: 'ble', alli: 'al', entli: 'ent', eli: 'e', ousli: 'ous', ization: 'ize', ation: 'ate', ator: 'ate', alism: 'al', iveness: 'ive', fulness: 'ful', ousness: 'ous', aliti: 'al', iviti: 'ive', biliti: 'ble', logi: 'log' }; var step3list = { icate: 'ic', ative: '', alize: 'al', iciti: 'ic', ical: 'ic', ful: '', ness: '' }; var c = "[^aeiou]"; // consonant var v = "[aeiouy]"; // vowel var C = c + "[^aeiouy]*"; // consonant sequence var V = v + "[aeiou]*"; // vowel sequence var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 var s_v = "^(" + C + ")?" + v; // vowel in stem this.stemWord = function (w) { var stem; var suffix; var firstch; var origword = w; if (w.length < 3) return w; var re; var re2; var re3; var re4; firstch = w.substr(0,1); if (firstch == "y") w = firstch.toUpperCase() + w.substr(1); // Step 1a re = /^(.+?)(ss|i)es$/; re2 = /^(.+?)([^s])s$/; if (re.test(w)) w = w.replace(re,"$1$2"); else if (re2.test(w)) w = w.replace(re2,"$1$2"); // Step 1b re = /^(.+?)eed$/; re2 = /^(.+?)(ed|ing)$/; if (re.test(w)) { var fp = re.exec(w); re = new RegExp(mgr0); if (re.test(fp[1])) { re = /.$/; w = w.replace(re,""); } } else if (re2.test(w)) { var fp = re2.exec(w); stem = fp[1]; re2 = new RegExp(s_v); if (re2.test(stem)) { w = stem; re2 = /(at|bl|iz)$/; re3 = new RegExp("([^aeiouylsz])\\1$"); re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); if (re2.test(w)) w = w + "e"; else if (re3.test(w)) { re = /.$/; w = w.replace(re,""); } else if (re4.test(w)) w = w + "e"; } } // Step 1c re = /^(.+?)y$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(s_v); if (re.test(stem)) w = stem + "i"; } // Step 2 re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; suffix = fp[2]; re = new RegExp(mgr0); if (re.test(stem)) w = stem + step2list[suffix]; } // Step 3 re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; suffix = fp[2]; re = new RegExp(mgr0); if (re.test(stem)) w = stem + step3list[suffix]; } // Step 4 re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; re2 = /^(.+?)(s|t)(ion)$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(mgr1); if (re.test(stem)) w = stem; } else if (re2.test(w)) { var fp = re2.exec(w); stem = fp[1] + fp[2]; re2 = new RegExp(mgr1); if (re2.test(stem)) w = stem; } // Step 5 re = /^(.+?)e$/; if (re.test(w)) { var fp = re.exec(w); stem = fp[1]; re = new RegExp(mgr1); re2 = new RegExp(meq1); re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) w = stem; } re = /ll$/; re2 = new RegExp(mgr1); if (re.test(w) && re2.test(w)) { re = /.$/; w = w.replace(re,""); } // and turn initial Y back to y if (firstch == "y") w = firstch.toLowerCase() + w.substr(1); return w; } } var splitChars = (function() { var result = {}; var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; var i, j, start, end; for (i = 0; i < singles.length; i++) { result[singles[i]] = true; } var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; for (i = 0; i < ranges.length; i++) { start = ranges[i][0]; end = ranges[i][1]; for (j = start; j <= end; j++) { result[j] = true; } } return result; })(); function splitQuery(query) { var result = []; var start = -1; for (var i = 0; i < query.length; i++) { if (splitChars[query.charCodeAt(i)]) { if (start !== -1) { result.push(query.slice(start, i)); start = -1; } } else if (start === -1) { start = i; } } if (start !== -1) { result.push(query.slice(start)); } return result; } mpi4py-3.0.3/docs/usrman/_static/documentation_options.js0000664000175000017500000000046513557771112024662 0ustar dalcinldalcinl00000000000000var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), VERSION: '3.0.3', LANGUAGE: 'None', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', NAVIGATION_WITH_KEYS: false, };mpi4py-3.0.3/docs/usrman/_static/doctools.js0000664000175000017500000002214113425573275022063 0ustar dalcinldalcinl00000000000000/* * doctools.js * ~~~~~~~~~~~ * * Sphinx JavaScript utilities for all documentation. * * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /** * select a different prefix for underscore */ $u = _.noConflict(); /** * make the code below compatible with browsers without * an installed firebug like debugger if (!window.console || !console.firebug) { var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; window.console = {}; for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {}; } */ /** * small helper function to urldecode strings */ jQuery.urldecode = function(x) { return decodeURIComponent(x).replace(/\+/g, ' '); }; /** * small helper function to urlencode strings */ jQuery.urlencode = encodeURIComponent; /** * This function returns the parsed url parameters of the * current request. Multiple values per key are supported, * it will always return arrays of strings for the value parts. */ jQuery.getQueryParameters = function(s) { if (typeof s === 'undefined') s = document.location.search; var parts = s.substr(s.indexOf('?') + 1).split('&'); var result = {}; for (var i = 0; i < parts.length; i++) { var tmp = parts[i].split('=', 2); var key = jQuery.urldecode(tmp[0]); var value = jQuery.urldecode(tmp[1]); if (key in result) result[key].push(value); else result[key] = [value]; } return result; }; /** * highlight a given string on a jquery object by wrapping it in * span elements with the given class name. */ jQuery.fn.highlightText = function(text, className) { function highlight(node, addItems) { if (node.nodeType === 3) { var val = node.nodeValue; var pos = val.toLowerCase().indexOf(text); if (pos >= 0 && !jQuery(node.parentNode).hasClass(className) && !jQuery(node.parentNode).hasClass("nohighlight")) { var span; var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); if (isInSVG) { span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); } else { span = document.createElement("span"); span.className = className; } span.appendChild(document.createTextNode(val.substr(pos, text.length))); node.parentNode.insertBefore(span, node.parentNode.insertBefore( document.createTextNode(val.substr(pos + text.length)), node.nextSibling)); node.nodeValue = val.substr(0, pos); if (isInSVG) { var bbox = span.getBBox(); var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); rect.x.baseVal.value = bbox.x; rect.y.baseVal.value = bbox.y; rect.width.baseVal.value = bbox.width; rect.height.baseVal.value = bbox.height; rect.setAttribute('class', className); var parentOfText = node.parentNode.parentNode; addItems.push({ "parent": node.parentNode, "target": rect}); } } } else if (!jQuery(node).is("button, select, textarea")) { jQuery.each(node.childNodes, function() { highlight(this, addItems); }); } } var addItems = []; var result = this.each(function() { highlight(this, addItems); }); for (var i = 0; i < addItems.length; ++i) { jQuery(addItems[i].parent).before(addItems[i].target); } return result; }; /* * backward compatibility for jQuery.browser * This will be supported until firefox bug is fixed. */ if (!jQuery.browser) { jQuery.uaMatch = function(ua) { ua = ua.toLowerCase(); var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || /(webkit)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || []; return { browser: match[ 1 ] || "", version: match[ 2 ] || "0" }; }; jQuery.browser = {}; jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; } /** * Small JavaScript module for the documentation. */ var Documentation = { init : function() { this.fixFirefoxAnchorBug(); this.highlightSearchWords(); this.initIndexTable(); if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { this.initOnKeyListeners(); } }, /** * i18n support */ TRANSLATIONS : {}, PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, LOCALE : 'unknown', // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) gettext : function(string) { var translated = Documentation.TRANSLATIONS[string]; if (typeof translated === 'undefined') return string; return (typeof translated === 'string') ? translated : translated[0]; }, ngettext : function(singular, plural, n) { var translated = Documentation.TRANSLATIONS[singular]; if (typeof translated === 'undefined') return (n == 1) ? singular : plural; return translated[Documentation.PLURALEXPR(n)]; }, addTranslations : function(catalog) { for (var key in catalog.messages) this.TRANSLATIONS[key] = catalog.messages[key]; this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); this.LOCALE = catalog.locale; }, /** * add context elements like header anchor links */ addContextElements : function() { $('div[id] > :header:first').each(function() { $('\u00B6'). attr('href', '#' + this.id). attr('title', _('Permalink to this headline')). appendTo(this); }); $('dt[id]').each(function() { $('\u00B6'). attr('href', '#' + this.id). attr('title', _('Permalink to this definition')). appendTo(this); }); }, /** * workaround a firefox stupidity * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 */ fixFirefoxAnchorBug : function() { if (document.location.hash && $.browser.mozilla) window.setTimeout(function() { document.location.href += ''; }, 10); }, /** * highlight the search words provided in the url in the text */ highlightSearchWords : function() { var params = $.getQueryParameters(); var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; if (terms.length) { var body = $('div.body'); if (!body.length) { body = $('body'); } window.setTimeout(function() { $.each(terms, function() { body.highlightText(this.toLowerCase(), 'highlighted'); }); }, 10); $('') .appendTo($('#searchbox')); } }, /** * init the domain index toggle buttons */ initIndexTable : function() { var togglers = $('img.toggler').click(function() { var src = $(this).attr('src'); var idnum = $(this).attr('id').substr(7); $('tr.cg-' + idnum).toggle(); if (src.substr(-9) === 'minus.png') $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); else $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); }).css('display', ''); if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { togglers.click(); } }, /** * helper function to hide the search marks again */ hideSearchWords : function() { $('#searchbox .highlight-link').fadeOut(300); $('span.highlighted').removeClass('highlighted'); }, /** * make the url absolute */ makeURL : function(relativeURL) { return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; }, /** * get the current relative url */ getCurrentURL : function() { var path = document.location.pathname; var parts = path.split(/\//); $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { if (this === '..') parts.pop(); }); var url = parts.join('/'); return path.substring(url.lastIndexOf('/') + 1, path.length - 1); }, initOnKeyListeners: function() { $(document).keyup(function(event) { var activeElementType = document.activeElement.tagName; // don't navigate when in search box or textarea if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { switch (event.keyCode) { case 37: // left var prevHref = $('link[rel="prev"]').prop('href'); if (prevHref) { window.location.href = prevHref; return false; } case 39: // right var nextHref = $('link[rel="next"]').prop('href'); if (nextHref) { window.location.href = nextHref; return false; } } } }); } }; // quick alias for translations _ = Documentation.gettext; $(document).ready(function() { Documentation.init(); }); mpi4py-3.0.3/docs/usrman/_static/up.png0000664000175000017500000000031313425573275021026 0ustar dalcinldalcinl00000000000000‰PNG  IHDRµú7ê’IDATx­µ¡„@„Ÿeï´z $£‹ó&¨ ª8ý:Ø& :Kpw‹n}™¯Oþø‘Ç<ÆÜ:!!ú{‰G@€Ç²?À"̧ÕçÖ óSëÒ{gî<äÝ¢‹ lMQw«yá|æ?µ 0 pq8q`Ç —³pÖL-'¬ÉSBNAúâwTúßÓÅ„¯|U VIEND®B`‚mpi4py-3.0.3/docs/usrman/_static/basic.css0000664000175000017500000002524013557771112021471 0ustar dalcinldalcinl00000000000000/* * basic.css * ~~~~~~~~~ * * Sphinx stylesheet -- basic theme. * * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ /* -- main layout ----------------------------------------------------------- */ div.clearer { clear: both; } /* -- relbar ---------------------------------------------------------------- */ div.related { width: 100%; font-size: 90%; } div.related h3 { display: none; } div.related ul { margin: 0; padding: 0 0 0 10px; list-style: none; } div.related li { display: inline; } div.related li.right { float: right; margin-right: 5px; } /* -- sidebar --------------------------------------------------------------- */ div.sphinxsidebarwrapper { padding: 10px 5px 0 10px; } div.sphinxsidebar { float: left; width: 230px; margin-left: -100%; font-size: 90%; word-wrap: break-word; overflow-wrap : break-word; } div.sphinxsidebar ul { list-style: none; } div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points { margin-left: 20px; list-style: square; } div.sphinxsidebar ul ul { margin-top: 0; margin-bottom: 0; } div.sphinxsidebar form { margin-top: 10px; } div.sphinxsidebar input { border: 1px solid #98dbcc; font-family: sans-serif; font-size: 1em; } div.sphinxsidebar #searchbox form.search { overflow: hidden; } div.sphinxsidebar #searchbox input[type="text"] { float: left; width: 80%; padding: 0.25em; box-sizing: border-box; } div.sphinxsidebar #searchbox input[type="submit"] { float: left; width: 20%; border-left: none; padding: 0.25em; box-sizing: border-box; } img { border: 0; max-width: 100%; } /* -- search page ----------------------------------------------------------- */ ul.search { margin: 10px 0 0 20px; padding: 0; } ul.search li { padding: 5px 0 5px 20px; background-image: url(file.png); background-repeat: no-repeat; background-position: 0 7px; } ul.search li a { font-weight: bold; } ul.search li div.context { color: #888; margin: 2px 0 0 30px; text-align: left; } ul.keywordmatches li.goodmatch a { font-weight: bold; } /* -- index page ------------------------------------------------------------ */ table.contentstable { width: 90%; margin-left: auto; margin-right: auto; } table.contentstable p.biglink { line-height: 150%; } a.biglink { font-size: 1.3em; } span.linkdescr { font-style: italic; padding-top: 5px; font-size: 90%; } /* -- general index --------------------------------------------------------- */ table.indextable { width: 100%; } table.indextable td { text-align: left; vertical-align: top; } table.indextable ul { margin-top: 0; margin-bottom: 0; list-style-type: none; } table.indextable > tbody > tr > td > ul { padding-left: 0em; } table.indextable tr.pcap { height: 10px; } table.indextable tr.cap { margin-top: 10px; background-color: #f2f2f2; } img.toggler { margin-right: 3px; margin-top: 3px; cursor: pointer; } div.modindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } div.genindex-jumpbox { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; margin: 1em 0 1em 0; padding: 0.4em; } /* -- domain module index --------------------------------------------------- */ table.modindextable td { padding: 2px; border-collapse: collapse; } /* -- general body styles --------------------------------------------------- */ div.body { min-width: 450px; max-width: 800px; } div.body p, div.body dd, div.body li, div.body blockquote { -moz-hyphens: auto; -ms-hyphens: auto; -webkit-hyphens: auto; hyphens: auto; } a.headerlink { visibility: hidden; } h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink, caption:hover > a.headerlink, p.caption:hover > a.headerlink, div.code-block-caption:hover > a.headerlink { visibility: visible; } div.body p.caption { text-align: inherit; } div.body td { text-align: left; } .first { margin-top: 0 !important; } p.rubric { margin-top: 30px; font-weight: bold; } img.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } img.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } img.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } .align-left { text-align: left; } .align-center { text-align: center; } .align-right { text-align: right; } /* -- sidebars -------------------------------------------------------------- */ div.sidebar { margin: 0 0 0.5em 1em; border: 1px solid #ddb; padding: 7px 7px 0 7px; background-color: #ffe; width: 40%; float: right; } p.sidebar-title { font-weight: bold; } /* -- topics ---------------------------------------------------------------- */ div.topic { border: 1px solid #ccc; padding: 7px 7px 0 7px; margin: 10px 0 10px 0; } p.topic-title { font-size: 1.1em; font-weight: bold; margin-top: 10px; } /* -- admonitions ----------------------------------------------------------- */ div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 7px; } div.admonition dt { font-weight: bold; } div.admonition dl { margin-bottom: 0; } p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; } div.body p.centered { text-align: center; margin-top: 25px; } /* -- tables ---------------------------------------------------------------- */ table.docutils { border: 0; border-collapse: collapse; } table.align-center { margin-left: auto; margin-right: auto; } table caption span.caption-number { font-style: italic; } table caption span.caption-text { } table.docutils td, table.docutils th { padding: 1px 8px 1px 5px; border-top: 0; border-left: 0; border-right: 0; border-bottom: 1px solid #aaa; } table.footnote td, table.footnote th { border: 0 !important; } th { text-align: left; padding-right: 5px; } table.citation { border-left: solid 1px gray; margin-left: 1px; } table.citation td { border-bottom: none; } /* -- figures --------------------------------------------------------------- */ div.figure { margin: 0.5em; padding: 0.5em; } div.figure p.caption { padding: 0.3em; } div.figure p.caption span.caption-number { font-style: italic; } div.figure p.caption span.caption-text { } /* -- field list styles ----------------------------------------------------- */ table.field-list td, table.field-list th { border: 0 !important; } .field-list ul { margin: 0; padding-left: 1em; } .field-list p { margin: 0; } .field-name { -moz-hyphens: manual; -ms-hyphens: manual; -webkit-hyphens: manual; hyphens: manual; } /* -- hlist styles ---------------------------------------------------------- */ table.hlist td { vertical-align: top; } /* -- other body styles ----------------------------------------------------- */ ol.arabic { list-style: decimal; } ol.loweralpha { list-style: lower-alpha; } ol.upperalpha { list-style: upper-alpha; } ol.lowerroman { list-style: lower-roman; } ol.upperroman { list-style: upper-roman; } dl { margin-bottom: 15px; } dd p { margin-top: 0px; } dd ul, dd table { margin-bottom: 10px; } dd { margin-top: 3px; margin-bottom: 10px; margin-left: 30px; } dt:target, span.highlighted { background-color: #fbe54e; } rect.highlighted { fill: #fbe54e; } dl.glossary dt { font-weight: bold; font-size: 1.1em; } .optional { font-size: 1.3em; } .sig-paren { font-size: larger; } .versionmodified { font-style: italic; } .system-message { background-color: #fda; padding: 5px; border: 3px solid red; } .footnote:target { background-color: #ffa; } .line-block { display: block; margin-top: 1em; margin-bottom: 1em; } .line-block .line-block { margin-top: 0; margin-bottom: 0; margin-left: 1.5em; } .guilabel, .menuselection { font-family: sans-serif; } .accelerator { text-decoration: underline; } .classifier { font-style: oblique; } abbr, acronym { border-bottom: dotted 1px; cursor: help; } /* -- code displays --------------------------------------------------------- */ pre { overflow: auto; overflow-y: hidden; /* fixes display issues on Chrome browsers */ } span.pre { -moz-hyphens: none; -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; } td.linenos pre { padding: 5px 0px; border: 0; background-color: transparent; color: #aaa; } table.highlighttable { margin-left: 0.5em; } table.highlighttable td { padding: 0 0.5em 0 0.5em; } div.code-block-caption { padding: 2px 5px; font-size: small; } div.code-block-caption code { background-color: transparent; } div.code-block-caption + div > div.highlight > pre { margin-top: 0; } div.code-block-caption span.caption-number { padding: 0.1em 0.3em; font-style: italic; } div.code-block-caption span.caption-text { } div.literal-block-wrapper { padding: 1em 1em 0; } div.literal-block-wrapper div.highlight { margin: 0; } code.descname { background-color: transparent; font-weight: bold; font-size: 1.2em; } code.descclassname { background-color: transparent; } code.xref, a code { background-color: transparent; font-weight: bold; } h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { background-color: transparent; } .viewcode-link { float: right; } .viewcode-back { float: right; font-family: sans-serif; } div.viewcode-block:target { margin: -1px -10px; padding: 0 10px; } /* -- math display ---------------------------------------------------------- */ img.math { vertical-align: middle; } div.body div.math p { text-align: center; } span.eqno { float: right; } span.eqno a.headerlink { position: relative; left: 0px; z-index: 1; } div.math:hover a.headerlink { visibility: visible; } /* -- printout stylesheet --------------------------------------------------- */ @media print { div.document, div.documentwrapper, div.bodywrapper { margin: 0 !important; width: 100%; } div.sphinxsidebar, div.related, div.footer, #top-link { display: none; } }mpi4py-3.0.3/docs/usrman/_static/jquery-3.2.1.js0000664000175000017500000101340713425201454022204 0ustar dalcinldalcinl00000000000000/*! * jQuery JavaScript Library v3.2.1 * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * * Date: 2017-03-20T18:59Z */ ( function( global, factory ) { "use strict"; if ( typeof module === "object" && typeof module.exports === "object" ) { // For CommonJS and CommonJS-like environments where a proper `window` // is present, execute the factory and get jQuery. // For environments that do not have a `window` with a `document` // (such as Node.js), expose a factory as module.exports. // This accentuates the need for the creation of a real `window`. // e.g. var jQuery = require("jquery")(window); // See ticket #14549 for more info. module.exports = global.document ? factory( global, true ) : function( w ) { if ( !w.document ) { throw new Error( "jQuery requires a window with a document" ); } return factory( w ); }; } else { factory( global ); } // Pass this if window is not defined yet } )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 // throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode // arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common // enough that all such attempts are guarded in a try block. "use strict"; var arr = []; var document = window.document; var getProto = Object.getPrototypeOf; var slice = arr.slice; var concat = arr.concat; var push = arr.push; var indexOf = arr.indexOf; var class2type = {}; var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; var fnToString = hasOwn.toString; var ObjectFunctionString = fnToString.call( Object ); var support = {}; function DOMEval( code, doc ) { doc = doc || document; var script = doc.createElement( "script" ); script.text = code; doc.head.appendChild( script ).parentNode.removeChild( script ); } /* global Symbol */ // Defining this global in .eslintrc.json would create a danger of using the global // unguarded in another place, it seems safer to define global only for this module var version = "3.2.1", // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); }, // Support: Android <=4.0 only // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // Matches dashed string for camelizing rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return letter.toUpperCase(); }; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, constructor: jQuery, // The default length of a jQuery object is 0 length: 0, toArray: function() { return slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { // Return all the elements in a clean array if ( num == null ) { return slice.call( this ); } // Return just the one element from the set return num < 0 ? this[ num + this.length ] : this[ num ]; }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. each: function( callback ) { return jQuery.each( this, callback ); }, map: function( callback ) { return this.pushStack( jQuery.map( this, function( elem, i ) { return callback.call( elem, i, elem ); } ) ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); }, end: function() { return this.prevObject || this.constructor(); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: arr.sort, splice: arr.splice }; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[ 0 ] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; // Skip the boolean and the target target = arguments[ i ] || {}; i++; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { target = {}; } // Extend jQuery itself if only one argument is passed if ( i === length ) { target = this; i--; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( ( options = arguments[ i ] ) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject( copy ) || ( copyIsArray = Array.isArray( copy ) ) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && Array.isArray( src ) ? src : []; } else { clone = src && jQuery.isPlainObject( src ) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend( { // Unique for each copy of jQuery on the page expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // Assume jQuery is ready without the ready module isReady: true, error: function( msg ) { throw new Error( msg ); }, noop: function() {}, isFunction: function( obj ) { return jQuery.type( obj ) === "function"; }, isWindow: function( obj ) { return obj != null && obj === obj.window; }, isNumeric: function( obj ) { // As of jQuery 3.0, isNumeric is limited to // strings and numbers (primitives or objects) // that can be coerced to finite numbers (gh-2662) var type = jQuery.type( obj ); return ( type === "number" || type === "string" ) && // parseFloat NaNs numeric-cast false positives ("") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN !isNaN( obj - parseFloat( obj ) ); }, isPlainObject: function( obj ) { var proto, Ctor; // Detect obvious negatives // Use toString instead of jQuery.type to catch host objects if ( !obj || toString.call( obj ) !== "[object Object]" ) { return false; } proto = getProto( obj ); // Objects with no prototype (e.g., `Object.create( null )`) are plain if ( !proto ) { return true; } // Objects with prototype are plain iff they were constructed by a global Object function Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; }, isEmptyObject: function( obj ) { /* eslint-disable no-unused-vars */ // See https://github.com/eslint/eslint/issues/6125 var name; for ( name in obj ) { return false; } return true; }, type: function( obj ) { if ( obj == null ) { return obj + ""; } // Support: Android <=2.3 only (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call( obj ) ] || "object" : typeof obj; }, // Evaluates a script in a global context globalEval: function( code ) { DOMEval( code ); }, // Convert dashed to camelCase; used by the css and data modules // Support: IE <=9 - 11, Edge 12 - 13 // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, each: function( obj, callback ) { var length, i = 0; if ( isArrayLike( obj ) ) { length = obj.length; for ( ; i < length; i++ ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } else { for ( i in obj ) { if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { break; } } } return obj; }, // Support: Android <=4.0 only trim: function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArrayLike( Object( arr ) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { push.call( ret, arr ); } } return ret; }, inArray: function( elem, arr, i ) { return arr == null ? -1 : indexOf.call( arr, elem, i ); }, // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit merge: function( first, second ) { var len = +second.length, j = 0, i = first.length; for ( ; j < len; j++ ) { first[ i++ ] = second[ j ]; } first.length = i; return first; }, grep: function( elems, callback, invert ) { var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { callbackInverse = !callback( elems[ i ], i ); if ( callbackInverse !== callbackExpect ) { matches.push( elems[ i ] ); } } return matches; }, // arg is for internal usage only map: function( elems, callback, arg ) { var length, value, i = 0, ret = []; // Go through the array, translating each of the items to their new values if ( isArrayLike( elems ) ) { length = elems.length; for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } } // Flatten any nested arrays return concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { var tmp, args, proxy; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind args = slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }, now: Date.now, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support } ); if ( typeof Symbol === "function" ) { jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; } // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), function( i, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); } ); function isArrayLike( obj ) { // Support: real iOS 8.2 only (not reproducible in simulator) // `in` check used to prevent JIT error (gh-2145) // hasOwn isn't used here due to false negatives // regarding Nodelist length in IE var length = !!obj && "length" in obj && obj.length, type = jQuery.type( obj ); if ( type === "function" || jQuery.isWindow( obj ) ) { return false; } return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } var Sizzle = /*! * Sizzle CSS Selector Engine v2.3.3 * https://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-08-08 */ (function( window ) { var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; } return 0; }, // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf as it's faster than native // https://jsperf.com/thor-indexof-vs-for/5 indexOf = function( list, elem ) { var i = 0, len = list.length; for ( ; i < len; i++ ) { if ( list[i] === elem ) { return i; } } return -1; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2) ".*" + ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rwhitespace = new RegExp( whitespace + "+", "g" ), rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + identifier + ")" ), "CLASS": new RegExp( "^\\.(" + identifier + ")" ), "TAG": new RegExp( "^(" + identifier + "|[*])" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, // CSS escapes // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), funescape = function( _, escaped, escapedWhitespace ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint // Support: Firefox<24 // Workaround erroneous numeric interpretation of +"0x" return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, // CSS string/identifier serialization // https://drafts.csswg.org/cssom/#common-serializing-idioms rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, fcssescape = function( ch, asCodePoint ) { if ( asCodePoint ) { // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER if ( ch === "\0" ) { return "\uFFFD"; } // Control characters and (dependent upon position) numbers get escaped as code points return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; } // Other potentially-special ASCII characters get backslash-escaped return "\\" + ch; }, // Used for iframes // See setDocument() // Removing the function wrapper causes a "Permission Denied" // error in IE unloadHandler = function() { setDocument(); }, disabledAncestor = addCombinator( function( elem ) { return elem.disabled === true && ("form" in elem || "label" in elem); }, { dir: "parentNode", next: "legend" } ); // Optimize for push.apply( _, NodeList ) try { push.apply( (arr = slice.call( preferredDoc.childNodes )), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { push_native.apply( target, slice.call(els) ); } : // Support: IE<9 // Otherwise append directly function( target, els ) { var j = target.length, i = 0; // Can't trust NodeList.length while ( (target[j++] = els[i++]) ) {} target.length = j - 1; } }; } function Sizzle( selector, context, results, seed ) { var m, i, elem, nid, match, groups, newSelector, newContext = context && context.ownerDocument, // nodeType defaults to 9, since context defaults to document nodeType = context ? context.nodeType : 9; results = results || []; // Return early from calls with invalid selector or context if ( typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { return results; } // Try to shortcut find operations (as opposed to filters) in HTML documents if ( !seed ) { if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { setDocument( context ); } context = context || document; if ( documentIsHTML ) { // If the selector is sufficiently simple, try using a "get*By*" DOM method // (excepting DocumentFragment context, where the methods don't exist) if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { // ID selector if ( (m = match[1]) ) { // Document context if ( nodeType === 9 ) { if ( (elem = context.getElementById( m )) ) { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } // Element context } else { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID if ( newContext && (elem = newContext.getElementById( m )) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Type selector } else if ( match[2] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Class selector } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // Take advantage of querySelectorAll if ( support.qsa && !compilerCache[ selector + " " ] && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { if ( nodeType !== 1 ) { newContext = context; newSelector = selector; // qSA looks outside Element context, which is not what we want // Thanks to Andrew Dupont for this workaround technique // Support: IE <=8 // Exclude object elements } else if ( context.nodeName.toLowerCase() !== "object" ) { // Capture the context ID, setting it first if necessary if ( (nid = context.getAttribute( "id" )) ) { nid = nid.replace( rcssescape, fcssescape ); } else { context.setAttribute( "id", (nid = expando) ); } // Prefix every selector in the list groups = tokenize( selector ); i = groups.length; while ( i-- ) { groups[i] = "#" + nid + " " + toSelector( groups[i] ); } newSelector = groups.join( "," ); // Expand context for sibling selectors newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; } if ( newSelector ) { try { push.apply( results, newContext.querySelectorAll( newSelector ) ); return results; } catch ( qsaError ) { } finally { if ( nid === expando ) { context.removeAttribute( "id" ); } } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Create key-value caches of limited size * @returns {function(string, object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var keys = []; function cache( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return (cache[ key + " " ] = value); } return cache; } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created element and returns a boolean result */ function assert( fn ) { var el = document.createElement("fieldset"); try { return !!fn( el ); } catch (e) { return false; } finally { // Remove from its parent by default if ( el.parentNode ) { el.parentNode.removeChild( el ); } // release memory in IE el = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { var arr = attrs.split("|"), i = arr.length; while ( i-- ) { Expr.attrHandle[ arr[i] ] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex; // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } /** * Returns a function to use in pseudos for buttons * @param {String} type */ function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } /** * Returns a function to use in pseudos for :enabled/:disabled * @param {Boolean} disabled true for :disabled; false for :enabled */ function createDisabledPseudo( disabled ) { // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable return function( elem ) { // Only certain elements can match :enabled or :disabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled if ( "form" in elem ) { // Check for inherited disabledness on relevant non-disabled elements: // * listed form-associated elements in a disabled fieldset // https://html.spec.whatwg.org/multipage/forms.html#category-listed // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled // * option elements in a disabled optgroup // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled // All such elements have a "form" property. if ( elem.parentNode && elem.disabled === false ) { // Option elements defer to a parent optgroup if present if ( "label" in elem ) { if ( "label" in elem.parentNode ) { return elem.parentNode.disabled === disabled; } else { return elem.disabled === disabled; } } // Support: IE 6 - 11 // Use the isDisabled shortcut property to check for disabled fieldset ancestors return elem.isDisabled === disabled || // Where there is no isDisabled, check manually /* jshint -W018 */ elem.isDisabled !== !disabled && disabledAncestor( elem ) === disabled; } return elem.disabled === disabled; // Try to winnow out elements that can't be disabled before trusting the disabled property. // Some victims get caught in our net (label, legend, menu, track), but it shouldn't // even exist on them, let alone have a boolean value. } else if ( "label" in elem ) { return elem.disabled === disabled; } // Remaining elements are neither :enabled nor :disabled return false; }; } /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ function createPositionalPseudo( fn ) { return markFunction(function( argument ) { argument = +argument; return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ (j = matchIndexes[i]) ] ) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { return context && typeof context.getElementsByTagName !== "undefined" && context; } // Expose support vars for convenience support = Sizzle.support = {}; /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var hasCompare, subWindow, doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Update global variables document = doc; docElem = document.documentElement; documentIsHTML = !isXML( document ); // Support: IE 9-11, Edge // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) if ( preferredDoc !== document && (subWindow = document.defaultView) && subWindow.top !== subWindow ) { // Support: IE 11, Edge if ( subWindow.addEventListener ) { subWindow.addEventListener( "unload", unloadHandler, false ); // Support: IE 9 - 10 only } else if ( subWindow.attachEvent ) { subWindow.attachEvent( "onunload", unloadHandler ); } } /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) support.attributes = assert(function( el ) { el.className = "i"; return !el.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert(function( el ) { el.appendChild( document.createComment("") ); return !el.getElementsByTagName("*").length; }); // Support: IE<9 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programmatically-set names, // so use a roundabout getElementsByName test support.getById = assert(function( el ) { docElem.appendChild( el ).id = expando; return !document.getElementsByName || !document.getElementsByName( expando ).length; }); // ID filter and find if ( support.getById ) { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var elem = context.getElementById( id ); return elem ? [ elem ] : []; } }; } else { Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; // Support: IE 6 - 7 only // getElementById is not reliable as a find shortcut Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var node, i, elems, elem = context.getElementById( id ); if ( elem ) { // Verify the id attribute node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } // Fall back on getElementsByName elems = context.getElementsByName( id ); i = 0; while ( (elem = elems[i++]) ) { node = elem.getAttributeNode("id"); if ( node && node.value === id ) { return [ elem ]; } } } return []; } }; } // Tag Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( tag ); // DocumentFragment nodes don't have gEBTN } else if ( support.qsa ) { return context.querySelectorAll( tag ); } } : function( tag, context ) { var elem, tmp = [], i = 0, // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See https://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function( el ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough // https://bugs.jquery.com/ticket/12359 docElem.appendChild( el ).innerHTML = "" + ""; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section if ( el.querySelectorAll("[msallowcapture^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !el.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { rbuggyQSA.push("~="); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !el.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 // In-page `selector#id sibling-combinator selector` fails if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { rbuggyQSA.push(".#.+[+~]"); } }); assert(function( el ) { el.innerHTML = "" + ""; // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = document.createElement("input"); input.setAttribute( "type", "hidden" ); el.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute if ( el.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( el.querySelectorAll(":enabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Support: IE9-11+ // IE's :disabled selector does not pick up the children of disabled fieldsets docElem.appendChild( el ).disabled = true; if ( el.querySelectorAll(":disabled").length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos el.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( el ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( el, "*" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( el, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another // Purposefully self-exclusive // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if ( compare ) { return compare; } // Calculate position if both inputs belong to the same document compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected 1; // Disconnected nodes if ( compare & 1 || (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } // Maintain original order return sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } : function( a, b ) { // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { return a === document ? -1 : b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; return document; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); if ( support.matchesSelector && documentIsHTML && !compilerCache[ expr + " " ] && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch (e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.escape = function( sel ) { return (sel + "").replace( rcssescape, fcssescape ); }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array while ( (node = elem[i++]) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[6] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[3] ) { match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index // ...in a gzip-friendly way node = parent; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex && cache[ 2 ]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } } else { // Use previously-cached element index if available if ( useCache ) { // ...in a gzip-friendly way node = elem; outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex; } // xml :nth-child(...) // or :nth-last-child(...) or :nth(-last)?-of-type(...) if ( diff === false ) { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { outerCache = node[ expando ] || (node[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || (outerCache[ node.uniqueID ] = {}); uniqueCache[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); // Don't keep the element (issue #299) input[0] = null; return !results.pop(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifier if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": createDisabledPseudo( false ), "disabled": createDisabledPseudo( true ), "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeType < 6 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); tokenize = Sizzle.tokenize = function( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( (tokens = []) ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push({ value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) }); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push({ value: matched, type: type, matches: match }); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, skip = combinator.next, key = skip || dir, checkNonElements = base && key === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } return false; } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var oldCache, uniqueCache, outerCache, newCache = [ dirruns, doneName ]; // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); if ( skip && skip === elem.nodeName.toLowerCase() ) { elem = elem[ dir ] || elem; } else if ( (oldCache = uniqueCache[ key ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return (newCache[ 2 ] = oldCache[ 2 ]); } else { // Reuse newcache so results back-propagate to previous elements uniqueCache[ key ] = newCache; // A match means we're done; a fail means we have to keep checking if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { return true; } } } } } return false; }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); // Avoid hanging onto element (issue #299) checkContext = null; return ret; } ]; for ( ; i < len; i++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, outermost ) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if ( outermost ) { outermostContext = context === document || context || outermost; } // Add elements passing elementMatchers directly to results // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; if ( !context && elem.ownerDocument !== document ) { setDocument( elem ); xml = !documentIsHTML; } while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context || document, xml) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // `i` is now the count of elements visited above, and adding it to `matchedCount` // makes the latter nonnegative. matchedCount += i; // Apply set filters to unmatched elements // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` // equals `i`), unless we didn't visit _any_ elements in the above loop because we have // no element matchers and no seed. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that // case, which will result in a "00" `matchedCount` that differs from `i` but is also // numerically zero. if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { cached = matcherFromTokens( match[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // Save selector and tokenization cached.selector = selector; } return cached; }; /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled * selector function built with Sizzle.compile * @param {Element} context * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize( (selector = compiled.selector || selector) ); results = results || []; // Try to minimize operations if there is only one selector in the list and no seed // (the latter of which guarantees us context) if ( match.length === 1 ) { // Reduce context if the leading compound selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { return results; // Precompiled matchers will still verify ancestry, so step up a level } else if ( compiled ) { context = context.parentNode; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, seed ); return results; } break; } } } } // Compile and execute a filtering function if one is not provided // Provide `match` to avoid retokenization if we modified the selector above ( compiled || compile( selector, match ) )( seed, context, !documentIsHTML, results, !context || rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; }; // One-time assignments // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function( el ) { // Should return 1, but returns 4 (following) return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert(function( el ) { el.innerHTML = ""; return el.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert(function( el ) { el.innerHTML = ""; el.firstChild.setAttribute( "value", "" ); return el.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert(function( el ) { return el.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : (val = elem.getAttributeNode( name )) && val.specified ? val.value : null; } }); } return Sizzle; })( window ); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; // Deprecated jQuery.expr[ ":" ] = jQuery.expr.pseudos; jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; jQuery.escapeSelector = Sizzle.escape; var dir = function( elem, dir, until ) { var matched = [], truncate = until !== undefined; while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { if ( elem.nodeType === 1 ) { if ( truncate && jQuery( elem ).is( until ) ) { break; } matched.push( elem ); } } return matched; }; var siblings = function( n, elem ) { var matched = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { matched.push( n ); } } return matched; }; var rneedsContext = jQuery.expr.match.needsContext; function nodeName( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }; var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); var risSimple = /^.[^:#\[\.,]*$/; // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); } // Single element if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; } ); } // Arraylike of elements (jQuery, arguments, Array) if ( typeof qualifier !== "string" ) { return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not; } ); } // Simple selector that can be filtered directly, removing non-Elements if ( risSimple.test( qualifier ) ) { return jQuery.filter( qualifier, elements, not ); } // Complex selector, compare the two sets, removing non-Elements qualifier = jQuery.filter( qualifier, elements ); return jQuery.grep( elements, function( elem ) { return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; } ); } jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } if ( elems.length === 1 && elem.nodeType === 1 ) { return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; } return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; } ) ); }; jQuery.fn.extend( { find: function( selector ) { var i, ret, len = this.length, self = this; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter( function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } } ) ); } ret = this.pushStack( [] ); for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } return len > 1 ? jQuery.uniqueSort( ret ) : ret; }, filter: function( selector ) { return this.pushStack( winnow( this, selector || [], false ) ); }, not: function( selector ) { return this.pushStack( winnow( this, selector || [], true ) ); }, is: function( selector ) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; } } ); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // A simple way to check for HTML strings // Prioritize #id over to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) // Shortcut simple #id case for speed rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function( selector, context, root ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Method init() accepts an alternate rootjQuery // so migrate can support jQuery.sub (gh-2101) root = root || rootjQuery; // Handle HTML strings if ( typeof selector === "string" ) { if ( selector[ 0 ] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && ( match[ 1 ] || !context ) ) { // HANDLE: $(html) -> $(array) if ( match[ 1 ] ) { context = context instanceof jQuery ? context[ 0 ] : context; // Option to run scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[ 1 ], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( jQuery.isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[ 2 ] ); if ( elem ) { // Inject the element directly into the jQuery object this[ 0 ] = elem; this.length = 1; } return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || root ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this[ 0 ] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return root.ready !== undefined ? root.ready( selector ) : // Execute immediately if ready is not present selector( jQuery ); } return jQuery.makeArray( selector, this ); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // Methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend( { has: function( target ) { var targets = jQuery( target, this ), l = targets.length; return this.filter( function() { var i = 0; for ( ; i < l; i++ ) { if ( jQuery.contains( this, targets[ i ] ) ) { return true; } } } ); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, matched = [], targets = typeof selectors !== "string" && jQuery( selectors ); // Positional selectors never match, since there's no _selection_ context if ( !rneedsContext.test( selectors ) ) { for ( ; i < l; i++ ) { for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && ( targets ? targets.index( cur ) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector( cur, selectors ) ) ) { matched.push( cur ); break; } } } } return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); }, // Determine the position of an element within the set index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; } // Index in selector if ( typeof elem === "string" ) { return indexOf.call( jQuery( elem ), this[ 0 ] ); } // Locate the position of the desired element return indexOf.call( this, // If it receives a jQuery object, the first element is used elem.jquery ? elem[ 0 ] : elem ); }, add: function( selector, context ) { return this.pushStack( jQuery.uniqueSort( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter( selector ) ); } } ); function sibling( cur, dir ) { while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} return cur; } jQuery.each( { parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return siblings( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return siblings( elem.firstChild ); }, contents: function( elem ) { if ( nodeName( elem, "iframe" ) ) { return elem.contentDocument; } // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only // Treat the template element as a regular one in browsers that // don't support it. if ( nodeName( elem, "template" ) ) { elem = elem.content || elem; } return jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var matched = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { matched = jQuery.filter( selector, matched ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { jQuery.uniqueSort( matched ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { matched.reverse(); } } return this.pushStack( matched ); }; } ); var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); // Convert String-formatted options into Object-formatted ones function createOptions( options ) { var object = {}; jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { object[ flag ] = true; } ); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? createOptions( options ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, // Last fire value for non-forgettable lists memory, // Flag to know if list was already fired fired, // Flag to prevent firing locked, // Actual callback list list = [], // Queue of execution data for repeatable lists queue = [], // Index of currently firing callback (modified by add/remove as needed) firingIndex = -1, // Fire callbacks fire = function() { // Enforce single-firing locked = locked || options.once; // Execute callbacks for all pending executions, // respecting firingIndex overrides and runtime changes fired = firing = true; for ( ; queue.length; firingIndex = -1 ) { memory = queue.shift(); while ( ++firingIndex < list.length ) { // Run callback and check for early termination if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && options.stopOnFalse ) { // Jump to end and forget the data so .add doesn't re-fire firingIndex = list.length; memory = false; } } } // Forget the data if we're done with it if ( !options.memory ) { memory = false; } firing = false; // Clean up if we're done firing for good if ( locked ) { // Keep an empty list if we have data for future add calls if ( memory ) { list = []; // Otherwise, this object is spent } else { list = ""; } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // If we have memory from a past run, we should fire after adding if ( memory && !firing ) { firingIndex = list.length - 1; queue.push( memory ); } ( function add( args ) { jQuery.each( args, function( _, arg ) { if ( jQuery.isFunction( arg ) ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { // Inspect recursively add( arg ); } } ); } )( arguments ); if ( memory && !firing ) { fire(); } } return this; }, // Remove a callback from the list remove: function() { jQuery.each( arguments, function( _, arg ) { var index; while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( index <= firingIndex ) { firingIndex--; } } } ); return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : list.length > 0; }, // Remove all callbacks from the list empty: function() { if ( list ) { list = []; } return this; }, // Disable .fire and .add // Abort any current/pending executions // Clear all callbacks and values disable: function() { locked = queue = []; list = memory = ""; return this; }, disabled: function() { return !list; }, // Disable .fire // Also disable .add unless we have memory (since it would have no effect) // Abort any pending executions lock: function() { locked = queue = []; if ( !memory && !firing ) { list = memory = ""; } return this; }, locked: function() { return !!locked; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( !locked ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; queue.push( args ); if ( !firing ) { fire(); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; function Identity( v ) { return v; } function Thrower( ex ) { throw ex; } function adoptValue( value, resolve, reject, noValue ) { var method; try { // Check for promise aspect first to privilege synchronous behavior if ( value && jQuery.isFunction( ( method = value.promise ) ) ) { method.call( value ).done( resolve ).fail( reject ); // Other thenables } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) { method.call( value, resolve, reject ); // Other non-thenables } else { // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: // * false: [ value ].slice( 0 ) => resolve( value ) // * true: [ value ].slice( 1 ) => resolve() resolve.apply( undefined, [ value ].slice( noValue ) ); } // For Promises/A+, convert exceptions into rejections // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in // Deferred#then to conditionally suppress rejection. } catch ( value ) { // Support: Android 4.0 only // Strict mode functions invoked without .call/.apply get global-object context reject.apply( undefined, [ value ] ); } } jQuery.extend( { Deferred: function( func ) { var tuples = [ // action, add listener, callbacks, // ... .then handlers, argument index, [final state] [ "notify", "progress", jQuery.Callbacks( "memory" ), jQuery.Callbacks( "memory" ), 2 ], [ "resolve", "done", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 0, "resolved" ], [ "reject", "fail", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), 1, "rejected" ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, "catch": function( fn ) { return promise.then( null, fn ); }, // Keep pipe for back-compat pipe: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred( function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { // Map tuples (progress, done, fail) to arguments (done, fail, progress) var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; // deferred.progress(function() { bind to newDefer or newDefer.notify }) // deferred.done(function() { bind to newDefer or newDefer.resolve }) // deferred.fail(function() { bind to newDefer or newDefer.reject }) deferred[ tuple[ 1 ] ]( function() { var returned = fn && fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise() .progress( newDefer.notify ) .done( newDefer.resolve ) .fail( newDefer.reject ); } else { newDefer[ tuple[ 0 ] + "With" ]( this, fn ? [ returned ] : arguments ); } } ); } ); fns = null; } ).promise(); }, then: function( onFulfilled, onRejected, onProgress ) { var maxDepth = 0; function resolve( depth, deferred, handler, special ) { return function() { var that = this, args = arguments, mightThrow = function() { var returned, then; // Support: Promises/A+ section 2.3.3.3.3 // https://promisesaplus.com/#point-59 // Ignore double-resolution attempts if ( depth < maxDepth ) { return; } returned = handler.apply( that, args ); // Support: Promises/A+ section 2.3.1 // https://promisesaplus.com/#point-48 if ( returned === deferred.promise() ) { throw new TypeError( "Thenable self-resolution" ); } // Support: Promises/A+ sections 2.3.3.1, 3.5 // https://promisesaplus.com/#point-54 // https://promisesaplus.com/#point-75 // Retrieve `then` only once then = returned && // Support: Promises/A+ section 2.3.4 // https://promisesaplus.com/#point-64 // Only check objects and functions for thenability ( typeof returned === "object" || typeof returned === "function" ) && returned.then; // Handle a returned thenable if ( jQuery.isFunction( then ) ) { // Special processors (notify) just wait for resolution if ( special ) { then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ) ); // Normal processors (resolve) also hook into progress } else { // ...and disregard older resolution values maxDepth++; then.call( returned, resolve( maxDepth, deferred, Identity, special ), resolve( maxDepth, deferred, Thrower, special ), resolve( maxDepth, deferred, Identity, deferred.notifyWith ) ); } // Handle all other returned values } else { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Identity ) { that = undefined; args = [ returned ]; } // Process the value(s) // Default process is resolve ( special || deferred.resolveWith )( that, args ); } }, // Only normal processors (resolve) catch and reject exceptions process = special ? mightThrow : function() { try { mightThrow(); } catch ( e ) { if ( jQuery.Deferred.exceptionHook ) { jQuery.Deferred.exceptionHook( e, process.stackTrace ); } // Support: Promises/A+ section 2.3.3.3.4.1 // https://promisesaplus.com/#point-61 // Ignore post-resolution exceptions if ( depth + 1 >= maxDepth ) { // Only substitute handlers pass on context // and multiple values (non-spec behavior) if ( handler !== Thrower ) { that = undefined; args = [ e ]; } deferred.rejectWith( that, args ); } } }; // Support: Promises/A+ section 2.3.3.3.1 // https://promisesaplus.com/#point-57 // Re-resolve promises immediately to dodge false rejection from // subsequent errors if ( depth ) { process(); } else { // Call an optional hook to record the stack, in case of exception // since it's otherwise lost when execution goes async if ( jQuery.Deferred.getStackHook ) { process.stackTrace = jQuery.Deferred.getStackHook(); } window.setTimeout( process ); } }; } return jQuery.Deferred( function( newDefer ) { // progress_handlers.add( ... ) tuples[ 0 ][ 3 ].add( resolve( 0, newDefer, jQuery.isFunction( onProgress ) ? onProgress : Identity, newDefer.notifyWith ) ); // fulfilled_handlers.add( ... ) tuples[ 1 ][ 3 ].add( resolve( 0, newDefer, jQuery.isFunction( onFulfilled ) ? onFulfilled : Identity ) ); // rejected_handlers.add( ... ) tuples[ 2 ][ 3 ].add( resolve( 0, newDefer, jQuery.isFunction( onRejected ) ? onRejected : Thrower ) ); } ).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 5 ]; // promise.progress = list.add // promise.done = list.add // promise.fail = list.add promise[ tuple[ 1 ] ] = list.add; // Handle state if ( stateString ) { list.add( function() { // state = "resolved" (i.e., fulfilled) // state = "rejected" state = stateString; }, // rejected_callbacks.disable // fulfilled_callbacks.disable tuples[ 3 - i ][ 2 ].disable, // progress_callbacks.lock tuples[ 0 ][ 2 ].lock ); } // progress_handlers.fire // fulfilled_handlers.fire // rejected_handlers.fire list.add( tuple[ 3 ].fire ); // deferred.notify = function() { deferred.notifyWith(...) } // deferred.resolve = function() { deferred.resolveWith(...) } // deferred.reject = function() { deferred.rejectWith(...) } deferred[ tuple[ 0 ] ] = function() { deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); return this; }; // deferred.notifyWith = list.fireWith // deferred.resolveWith = list.fireWith // deferred.rejectWith = list.fireWith deferred[ tuple[ 0 ] + "With" ] = list.fireWith; } ); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( singleValue ) { var // count of uncompleted subordinates remaining = arguments.length, // count of unprocessed arguments i = remaining, // subordinate fulfillment data resolveContexts = Array( i ), resolveValues = slice.call( arguments ), // the master Deferred master = jQuery.Deferred(), // subordinate callback factory updateFunc = function( i ) { return function( value ) { resolveContexts[ i ] = this; resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( !( --remaining ) ) { master.resolveWith( resolveContexts, resolveValues ); } }; }; // Single- and empty arguments are adopted like Promise.resolve if ( remaining <= 1 ) { adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, !remaining ); // Use .then() to unwrap secondary thenables (cf. gh-3000) if ( master.state() === "pending" || jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { return master.then(); } } // Multiple arguments are aggregated like Promise.all array elements while ( i-- ) { adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); } return master.promise(); } } ); // These usually indicate a programmer mistake during development, // warn about them ASAP rather than swallowing them by default. var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; jQuery.Deferred.exceptionHook = function( error, stack ) { // Support: IE 8 - 9 only // Console exists when dev tools are open, which can happen at any time if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); } }; jQuery.readyException = function( error ) { window.setTimeout( function() { throw error; } ); }; // The deferred used on DOM ready var readyList = jQuery.Deferred(); jQuery.fn.ready = function( fn ) { readyList .then( fn ) // Wrap jQuery.readyException in a function so that the lookup // happens at the time of error handling instead of callback // registration. .catch( function( error ) { jQuery.readyException( error ); } ); return this; }; jQuery.extend( { // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); } } ); jQuery.ready.then = readyList.then; // The ready event handler and self cleanup method function completed() { document.removeEventListener( "DOMContentLoaded", completed ); window.removeEventListener( "load", completed ); jQuery.ready(); } // Catch cases where $(document).ready() is called // after the browser event has already occurred. // Support: IE <=9 - 10 only // Older IE sometimes signals "interactive" too soon if ( document.readyState === "complete" || ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { // Handle it asynchronously to allow scripts the opportunity to delay ready window.setTimeout( jQuery.ready ); } else { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed ); } // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, len = elems.length, bulk = key == null; // Sets many values if ( jQuery.type( key ) === "object" ) { chainable = true; for ( i in key ) { access( elems, fn, i, key[ i ], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !jQuery.isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < len; i++ ) { fn( elems[ i ], key, raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) ) ); } } } if ( chainable ) { return elems; } // Gets if ( bulk ) { return fn.call( elems ); } return len ? fn( elems[ 0 ], key ) : emptyGet; }; var acceptData = function( owner ) { // Accepts only: // - Node // - Node.ELEMENT_NODE // - Node.DOCUMENT_NODE // - Object // - Any return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); }; function Data() { this.expando = jQuery.expando + Data.uid++; } Data.uid = 1; Data.prototype = { cache: function( owner ) { // Check if the owner object already has a cache var value = owner[ this.expando ]; // If not, create one if ( !value ) { value = {}; // We can accept data for non-element nodes in modern browsers, // but we should not, see #8335. // Always return an empty object. if ( acceptData( owner ) ) { // If it is a node unlikely to be stringify-ed or looped over // use plain assignment if ( owner.nodeType ) { owner[ this.expando ] = value; // Otherwise secure it in a non-enumerable property // configurable must be true to allow the property to be // deleted when data is removed } else { Object.defineProperty( owner, this.expando, { value: value, configurable: true } ); } } } return value; }, set: function( owner, data, value ) { var prop, cache = this.cache( owner ); // Handle: [ owner, key, value ] args // Always use camelCase key (gh-2257) if ( typeof data === "string" ) { cache[ jQuery.camelCase( data ) ] = value; // Handle: [ owner, { properties } ] args } else { // Copy the properties one-by-one to the cache object for ( prop in data ) { cache[ jQuery.camelCase( prop ) ] = data[ prop ]; } } return cache; }, get: function( owner, key ) { return key === undefined ? this.cache( owner ) : // Always use camelCase key (gh-2257) owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ]; }, access: function( owner, key, value ) { // In cases where either: // // 1. No key was specified // 2. A string key was specified, but no value provided // // Take the "read" path and allow the get method to determine // which value to return, respectively either: // // 1. The entire cache object // 2. The data stored at the key // if ( key === undefined || ( ( key && typeof key === "string" ) && value === undefined ) ) { return this.get( owner, key ); } // When the key is not a string, or both a key and value // are specified, set or extend (existing objects) with either: // // 1. An object of properties // 2. A key and value // this.set( owner, key, value ); // Since the "set" path can have two possible entry points // return the expected data based on which path was taken[*] return value !== undefined ? value : key; }, remove: function( owner, key ) { var i, cache = owner[ this.expando ]; if ( cache === undefined ) { return; } if ( key !== undefined ) { // Support array or space separated string of keys if ( Array.isArray( key ) ) { // If key is an array of keys... // We always set camelCase keys, so remove that. key = key.map( jQuery.camelCase ); } else { key = jQuery.camelCase( key ); // If a key with the spaces exists, use it. // Otherwise, create an array by matching non-whitespace key = key in cache ? [ key ] : ( key.match( rnothtmlwhite ) || [] ); } i = key.length; while ( i-- ) { delete cache[ key[ i ] ]; } } // Remove the expando if there's no more data if ( key === undefined || jQuery.isEmptyObject( cache ) ) { // Support: Chrome <=35 - 45 // Webkit & Blink performance suffers when deleting properties // from DOM nodes, so set to undefined instead // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) if ( owner.nodeType ) { owner[ this.expando ] = undefined; } else { delete owner[ this.expando ]; } } }, hasData: function( owner ) { var cache = owner[ this.expando ]; return cache !== undefined && !jQuery.isEmptyObject( cache ); } }; var dataPriv = new Data(); var dataUser = new Data(); // Implementation Summary // // 1. Enforce API surface and semantic compatibility with 1.9.x branch // 2. Improve the module's maintainability by reducing the storage // paths to a single mechanism. // 3. Use the same single mechanism to support "private" and "user" data. // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) // 5. Avoid exposing implementation details on user objects (eg. expando properties) // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g; function getData( data ) { if ( data === "true" ) { return true; } if ( data === "false" ) { return false; } if ( data === "null" ) { return null; } // Only convert to a number if it doesn't change the string if ( data === +data + "" ) { return +data; } if ( rbrace.test( data ) ) { return JSON.parse( data ); } return data; } function dataAttr( elem, key, data ) { var name; // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = getData( data ); } catch ( e ) {} // Make sure we set the data so it isn't changed later dataUser.set( elem, key, data ); } else { data = undefined; } } return data; } jQuery.extend( { hasData: function( elem ) { return dataUser.hasData( elem ) || dataPriv.hasData( elem ); }, data: function( elem, name, data ) { return dataUser.access( elem, name, data ); }, removeData: function( elem, name ) { dataUser.remove( elem, name ); }, // TODO: Now that all calls to _data and _removeData have been replaced // with direct calls to dataPriv methods, these can be deprecated. _data: function( elem, name, data ) { return dataPriv.access( elem, name, data ); }, _removeData: function( elem, name ) { dataPriv.remove( elem, name ); } } ); jQuery.fn.extend( { data: function( key, value ) { var i, name, data, elem = this[ 0 ], attrs = elem && elem.attributes; // Gets all values if ( key === undefined ) { if ( this.length ) { data = dataUser.get( elem ); if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { i = attrs.length; while ( i-- ) { // Support: IE 11 only // The attrs elements can be null (#14894) if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { name = jQuery.camelCase( name.slice( 5 ) ); dataAttr( elem, name, data[ name ] ); } } } dataPriv.set( elem, "hasDataAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each( function() { dataUser.set( this, key ); } ); } return access( this, function( value ) { var data; // The calling jQuery object (element matches) is not empty // (and therefore has an element appears at this[ 0 ]) and the // `value` parameter was not undefined. An empty jQuery object // will result in `undefined` for elem = this[ 0 ] which will // throw an exception if an attempt to read a data cache is made. if ( elem && value === undefined ) { // Attempt to get data from the cache // The key will always be camelCased in Data data = dataUser.get( elem, key ); if ( data !== undefined ) { return data; } // Attempt to "discover" the data in // HTML5 custom data-* attrs data = dataAttr( elem, key ); if ( data !== undefined ) { return data; } // We tried really hard, but the data doesn't exist. return; } // Set the data... this.each( function() { // We always store the camelCased key dataUser.set( this, key, value ); } ); }, null, value, arguments.length > 1, null, true ); }, removeData: function( key ) { return this.each( function() { dataUser.remove( this, key ); } ); } } ); jQuery.extend( { queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = dataPriv.get( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || Array.isArray( data ) ) { queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // Clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // Not public - generate a queueHooks object, or return the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { empty: jQuery.Callbacks( "once memory" ).add( function() { dataPriv.remove( elem, [ type + "queue", key ] ); } ) } ); } } ); jQuery.fn.extend( { queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[ 0 ], type ); } return data === undefined ? this : this.each( function() { var queue = jQuery.queue( this, type, data ); // Ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { jQuery.dequeue( this, type ); } } ); }, dequeue: function( type ) { return this.each( function() { jQuery.dequeue( this, type ); } ); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while ( i-- ) { tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } } ); var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; var isHiddenWithinTree = function( elem, el ) { // isHiddenWithinTree might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; // Inline style trumps all return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. jQuery.contains( elem.ownerDocument, elem ) && jQuery.css( elem, "display" ) === "none"; }; var swap = function( elem, options, callback, args ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.apply( elem, args || [] ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; }; function adjustCSS( elem, prop, valueParts, tween ) { var adjusted, scale = 1, maxIterations = 20, currentValue = tween ? function() { return tween.cur(); } : function() { return jQuery.css( elem, prop, "" ); }, initial = currentValue(), unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && rcssNum.exec( jQuery.css( elem, prop ) ); if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { // Trust units reported by jQuery.css unit = unit || initialInUnit[ 3 ]; // Make sure we update the tween properties later on valueParts = valueParts || []; // Iteratively approximate from a nonzero starting point initialInUnit = +initial || 1; do { // If previous iteration zeroed out, double until we get *something*. // Use string for doubling so we don't accidentally see scale as unchanged below scale = scale || ".5"; // Adjust and apply initialInUnit = initialInUnit / scale; jQuery.style( elem, prop, initialInUnit + unit ); // Update scale, tolerating zero or NaN from tween.cur() // Break the loop if scale is unchanged or perfect, or if we've just had enough. } while ( scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations ); } if ( valueParts ) { initialInUnit = +initialInUnit || +initial || 0; // Apply relative offset (+=/-=) if specified adjusted = valueParts[ 1 ] ? initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : +valueParts[ 2 ]; if ( tween ) { tween.unit = unit; tween.start = initialInUnit; tween.end = adjusted; } } return adjusted; } var defaultDisplayMap = {}; function getDefaultDisplay( elem ) { var temp, doc = elem.ownerDocument, nodeName = elem.nodeName, display = defaultDisplayMap[ nodeName ]; if ( display ) { return display; } temp = doc.body.appendChild( doc.createElement( nodeName ) ); display = jQuery.css( temp, "display" ); temp.parentNode.removeChild( temp ); if ( display === "none" ) { display = "block"; } defaultDisplayMap[ nodeName ] = display; return display; } function showHide( elements, show ) { var display, elem, values = [], index = 0, length = elements.length; // Determine new display value for elements that need to change for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } display = elem.style.display; if ( show ) { // Since we force visibility upon cascade-hidden elements, an immediate (and slow) // check is required in this first loop unless we have a nonempty display value (either // inline or about-to-be-restored) if ( display === "none" ) { values[ index ] = dataPriv.get( elem, "display" ) || null; if ( !values[ index ] ) { elem.style.display = ""; } } if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { values[ index ] = getDefaultDisplay( elem ); } } else { if ( display !== "none" ) { values[ index ] = "none"; // Remember what we're overwriting dataPriv.set( elem, "display", display ); } } } // Set the display of the elements in a second loop to avoid constant reflow for ( index = 0; index < length; index++ ) { if ( values[ index ] != null ) { elements[ index ].style.display = values[ index ]; } } return elements; } jQuery.fn.extend( { show: function() { return showHide( this, true ); }, hide: function() { return showHide( this ); }, toggle: function( state ) { if ( typeof state === "boolean" ) { return state ? this.show() : this.hide(); } return this.each( function() { if ( isHiddenWithinTree( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); } } ); } } ); var rcheckableType = ( /^(?:checkbox|radio)$/i ); var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); var rscriptType = ( /^$|\/(?:java|ecma)script/i ); // We have to close these tags to support XHTML (#13200) var wrapMap = { // Support: IE <=9 only option: [ 1, "" ], // XHTML parsers do not magically insert elements in the // same way that tag soup parsers do. So we cannot shorten // this by omitting or other required elements. thead: [ 1, "", "
" ], col: [ 2, "", "
" ], tr: [ 2, "", "
" ], td: [ 3, "", "
" ], _default: [ 0, "", "" ] }; // Support: IE <=9 only wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; function getAll( context, tag ) { // Support: IE <=9 - 11 only // Use typeof to avoid zero-argument method invocation on host objects (#15151) var ret; if ( typeof context.getElementsByTagName !== "undefined" ) { ret = context.getElementsByTagName( tag || "*" ); } else if ( typeof context.querySelectorAll !== "undefined" ) { ret = context.querySelectorAll( tag || "*" ); } else { ret = []; } if ( tag === undefined || tag && nodeName( context, tag ) ) { return jQuery.merge( [ context ], ret ); } return ret; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var i = 0, l = elems.length; for ( ; i < l; i++ ) { dataPriv.set( elems[ i ], "globalEval", !refElements || dataPriv.get( refElements[ i ], "globalEval" ) ); } } var rhtml = /<|&#?\w+;/; function buildFragment( elems, context, scripts, selection, ignored ) { var elem, tmp, tag, wrap, contains, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l = elems.length; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( jQuery.type( elem ) === "object" ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); // Deserialize a standard representation tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; // Descend through wrappers to the right content j = wrap[ 0 ]; while ( j-- ) { tmp = tmp.lastChild; } // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( nodes, tmp.childNodes ); // Remember the top-level container tmp = fragment.firstChild; // Ensure the created nodes are orphaned (#12392) tmp.textContent = ""; } } } // Remove wrapper from fragment fragment.textContent = ""; i = 0; while ( ( elem = nodes[ i++ ] ) ) { // Skip elements already in the context collection (trac-4087) if ( selection && jQuery.inArray( elem, selection ) > -1 ) { if ( ignored ) { ignored.push( elem ); } continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( fragment.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( ( elem = tmp[ j++ ] ) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } return fragment; } ( function() { var fragment = document.createDocumentFragment(), div = fragment.appendChild( document.createElement( "div" ) ), input = document.createElement( "input" ); // Support: Android 4.0 - 4.3 only // Check state lost if the name is set (#11217) // Support: Windows Web Apps (WWA) // `name` and `type` must use .setAttribute for WWA (#14901) input.setAttribute( "type", "radio" ); input.setAttribute( "checked", "checked" ); input.setAttribute( "name", "t" ); div.appendChild( input ); // Support: Android <=4.1 only // Older WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE <=11 only // Make sure textarea (and checkbox) defaultValue is properly cloned div.innerHTML = ""; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; } )(); var documentElement = document.documentElement; var rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, rtypenamespace = /^([^.]*)(?:\.(.+)|)/; function returnTrue() { return true; } function returnFalse() { return false; } // Support: IE <=9 only // See #13393 for more info function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } function on( elem, types, selector, data, fn, one ) { var origFn, type; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { on( elem, type, selector, data, types[ type ], one ); } return elem; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return elem; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return elem.each( function() { jQuery.event.add( this, types, fn, data, selector ); } ); } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var handleObjIn, eventHandle, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Ensure that invalid selectors throw exceptions at attach time // Evaluate against documentElement in case elem is a non-element node (e.g., document) if ( selector ) { jQuery.find.matchesSelector( documentElement, selector ); } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !( events = elemData.events ) ) { events = elemData.events = {}; } if ( !( eventHandle = elemData.handle ) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply( elem, arguments ) : undefined; }; } // Handle multiple events separated by a space types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend( { type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join( "." ) }, handleObjIn ); // Init the event handler queue if we're the first if ( !( handlers = events[ type ] ) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, origCount, tmp, events, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); if ( !elemData || !( events = elemData.events ) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[ t ] ) || []; type = origType = tmp[ 1 ]; namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[ 2 ] && new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove data and the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { dataPriv.remove( elem, "handle events" ); } }, dispatch: function( nativeEvent ) { // Make a writable jQuery.Event from the native event object var event = jQuery.event.fix( nativeEvent ); var i, j, ret, matched, handleObj, handlerQueue, args = new Array( arguments.length ), handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[ 0 ] = event; for ( i = 1; i < arguments.length; i++ ) { args[ i ] = arguments[ i ]; } event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( ( handleObj = matched.handlers[ j++ ] ) && !event.isImmediatePropagationStopped() ) { // Triggered event must either 1) have no namespace, or 2) have namespace(s) // a subset or equal to those in the bound event (both can have no namespace). if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || handleObj.handler ).apply( matched.elem, args ); if ( ret !== undefined ) { if ( ( event.result = ret ) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers if ( delegateCount && // Support: IE <=9 // Black-hole SVG instance trees (trac-13180) cur.nodeType && // Support: Firefox <=42 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click // Support: IE 11 only // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) !( event.type === "click" && event.button >= 1 ) ) { for ( ; cur !== this; cur = cur.parentNode || this ) { // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { matchedHandlers = []; matchedSelectors = {}; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matchedSelectors[ sel ] === undefined ) { matchedSelectors[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) > -1 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matchedSelectors[ sel ] ) { matchedHandlers.push( handleObj ); } } if ( matchedHandlers.length ) { handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); } } } } // Add the remaining (directly-bound) handlers cur = this; if ( delegateCount < handlers.length ) { handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); } return handlerQueue; }, addProp: function( name, hook ) { Object.defineProperty( jQuery.Event.prototype, name, { enumerable: true, configurable: true, get: jQuery.isFunction( hook ) ? function() { if ( this.originalEvent ) { return hook( this.originalEvent ); } } : function() { if ( this.originalEvent ) { return this.originalEvent[ name ]; } }, set: function( value ) { Object.defineProperty( this, name, { enumerable: true, configurable: true, writable: true, value: value } ); } } ); }, fix: function( originalEvent ) { return originalEvent[ jQuery.expando ] ? originalEvent : new jQuery.Event( originalEvent ); }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== safeActiveElement() && this.focus ) { this.focus(); return false; } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === safeActiveElement() && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { this.click(); return false; } }, // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { return nodeName( event.target, "a" ); } }, beforeunload: { postDispatch: function( event ) { // Support: Firefox 20+ // Firefox doesn't alert if the returnValue field is not set. if ( event.result !== undefined && event.originalEvent ) { event.originalEvent.returnValue = event.result; } } } } }; jQuery.removeEvent = function( elem, type, handle ) { // This "if" is needed for plain objects if ( elem.removeEventListener ) { elem.removeEventListener( type, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !( this instanceof jQuery.Event ) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: Android <=2.3 only src.returnValue === false ? returnTrue : returnFalse; // Create target properties // Support: Safari <=6 - 7 only // Target should not be a text node (#504, #13143) this.target = ( src.target && src.target.nodeType === 3 ) ? src.target.parentNode : src.target; this.currentTarget = src.currentTarget; this.relatedTarget = src.relatedTarget; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { constructor: jQuery.Event, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, isSimulated: false, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( e && !this.isSimulated ) { e.preventDefault(); } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopPropagation(); } }, stopImmediatePropagation: function() { var e = this.originalEvent; this.isImmediatePropagationStopped = returnTrue; if ( e && !this.isSimulated ) { e.stopImmediatePropagation(); } this.stopPropagation(); } }; // Includes all common event props including KeyEvent and MouseEvent specific props jQuery.each( { altKey: true, bubbles: true, cancelable: true, changedTouches: true, ctrlKey: true, detail: true, eventPhase: true, metaKey: true, pageX: true, pageY: true, shiftKey: true, view: true, "char": true, charCode: true, key: true, keyCode: true, button: true, buttons: true, clientX: true, clientY: true, offsetX: true, offsetY: true, pointerId: true, pointerType: true, screenX: true, screenY: true, targetTouches: true, toElement: true, touches: true, which: function( event ) { var button = event.button; // Add which for key events if ( event.which == null && rkeyEvent.test( event.type ) ) { return event.charCode != null ? event.charCode : event.keyCode; } // Add which for click: 1 === left; 2 === middle; 3 === right if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { if ( button & 1 ) { return 1; } if ( button & 2 ) { return 3; } if ( button & 4 ) { return 2; } return 0; } return event.which; } }, jQuery.event.addProp ); // Create mouseenter/leave events using mouseover/out and event-time checks // so that event delegation works in jQuery. // Do the same for pointerenter/pointerleave and pointerover/pointerout // // Support: Safari 7 only // Safari sends mouseenter too often; see: // https://bugs.chromium.org/p/chromium/issues/detail?id=470258 // for the description of the bug (it existed in older Chrome versions as well). jQuery.each( { mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mouseenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; } ); jQuery.fn.extend( { on: function( types, selector, data, fn ) { return on( this, types, selector, data, fn ); }, one: function( types, selector, data, fn ) { return on( this, types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each( function() { jQuery.event.remove( this, types, fn, selector ); } ); } } ); var /* eslint-disable max-len */ // See https://github.com/eslint/eslint/issues/3229 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, /* eslint-enable */ // Support: IE <=10 - 11, Edge 12 - 13 // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ rnoInnerhtml = /\s*$/g; // Prefer a tbody over its parent table for containing new rows function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { return jQuery( ">tbody", elem )[ 0 ] || elem; } return elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; return elem; } function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); if ( match ) { elem.type = match[ 1 ]; } else { elem.removeAttribute( "type" ); } return elem; } function cloneCopyEvent( src, dest ) { var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; if ( dest.nodeType !== 1 ) { return; } // 1. Copy private data: events, handlers, etc. if ( dataPriv.hasData( src ) ) { pdataOld = dataPriv.access( src ); pdataCur = dataPriv.set( dest, pdataOld ); events = pdataOld.events; if ( events ) { delete pdataCur.handle; pdataCur.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } } // 2. Copy user data if ( dataUser.hasData( src ) ) { udataOld = dataUser.access( src ); udataCur = jQuery.extend( {}, udataOld ); dataUser.set( dest, udataCur ); } } // Fix IE bugs, see support tests function fixInput( src, dest ) { var nodeName = dest.nodeName.toLowerCase(); // Fails to persist the checked state of a cloned checkbox or radio button. if ( nodeName === "input" && rcheckableType.test( src.type ) ) { dest.checked = src.checked; // Fails to return the selected option to the default selected state when cloning options } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } function domManip( collection, args, callback, ignored ) { // Flatten any nested arrays args = concat.apply( [], args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, l = collection.length, iNoClone = l - 1, value = args[ 0 ], isFunction = jQuery.isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( isFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return collection.each( function( index ) { var self = collection.eq( index ); if ( isFunction ) { args[ 0 ] = value.call( this, index, self.html() ); } domManip( self, args, callback, ignored ); } ); } if ( l ) { fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } // Require either new content or an interest in ignored elements to invoke the callback if ( first || ignored ) { scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item // instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( collection[ i ], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !dataPriv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src ) { // Optional AJAX dependency, but won't run scripts if not present if ( jQuery._evalUrl ) { jQuery._evalUrl( node.src ); } } else { DOMEval( node.textContent.replace( rcleanScript, "" ), doc ); } } } } } } return collection; } function remove( elem, selector, keepData ) { var node, nodes = selector ? jQuery.filter( selector, elem ) : elem, i = 0; for ( ; ( node = nodes[ i ] ) != null; i++ ) { if ( !keepData && node.nodeType === 1 ) { jQuery.cleanData( getAll( node ) ); } if ( node.parentNode ) { if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { setGlobalEval( getAll( node, "script" ) ); } node.parentNode.removeChild( node ); } } return elem; } jQuery.extend( { htmlPrefilter: function( html ) { return html.replace( rxhtmlTag, "<$1>" ); }, clone: function( elem, dataAndEvents, deepDataAndEvents ) { var i, l, srcElements, destElements, clone = elem.cloneNode( true ), inPage = jQuery.contains( elem.ownerDocument, elem ); // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); for ( i = 0, l = srcElements.length; i < l; i++ ) { fixInput( srcElements[ i ], destElements[ i ] ); } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0, l = srcElements.length; i < l; i++ ) { cloneCopyEvent( srcElements[ i ], destElements[ i ] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } // Return the cloned set return clone; }, cleanData: function( elems ) { var data, elem, type, special = jQuery.event.special, i = 0; for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { if ( acceptData( elem ) ) { if ( ( data = elem[ dataPriv.expando ] ) ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataPriv.expando ] = undefined; } if ( elem[ dataUser.expando ] ) { // Support: Chrome <=35 - 45+ // Assign undefined instead of using delete, see Data#remove elem[ dataUser.expando ] = undefined; } } } } } ); jQuery.fn.extend( { detach: function( selector ) { return remove( this, selector, true ); }, remove: function( selector ) { return remove( this, selector ); }, text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().each( function() { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { this.textContent = value; } } ); }, null, value, arguments.length ); }, append: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } } ); }, prepend: function() { return domManip( this, arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } } ); }, before: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } } ); }, after: function() { return domManip( this, arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } } ); }, empty: function() { var elem, i = 0; for ( ; ( elem = this[ i ] ) != null; i++ ) { if ( elem.nodeType === 1 ) { // Prevent memory leaks jQuery.cleanData( getAll( elem, false ) ); // Remove any remaining nodes elem.textContent = ""; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); } ); }, html: function( value ) { return access( this, function( value ) { var elem = this[ 0 ] || {}, i = 0, l = this.length; if ( value === undefined && elem.nodeType === 1 ) { return elem.innerHTML; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { value = jQuery.htmlPrefilter( value ); try { for ( ; i < l; i++ ) { elem = this[ i ] || {}; // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch ( e ) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function() { var ignored = []; // Make the changes, replacing each non-ignored context element with the new content return domManip( this, arguments, function( elem ) { var parent = this.parentNode; if ( jQuery.inArray( this, ignored ) < 0 ) { jQuery.cleanData( getAll( this ) ); if ( parent ) { parent.replaceChild( elem, this ); } } // Force callback invocation }, ignored ); } } ); jQuery.each( { appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, ret = [], insert = jQuery( selector ), last = insert.length - 1, i = 0; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone( true ); jQuery( insert[ i ] )[ original ]( elems ); // Support: Android <=4.0 only, PhantomJS 1 only // .get() because push.apply(_, arraylike) throws on ancient WebKit push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; } ); var rmargin = ( /^margin/ ); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var getStyles = function( elem ) { // Support: IE <=11 only, Firefox <=30 (#15098, #14150) // IE throws on elements created in popups // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" var view = elem.ownerDocument.defaultView; if ( !view || !view.opener ) { view = window; } return view.getComputedStyle( elem ); }; ( function() { // Executing both pixelPosition & boxSizingReliable tests require only one layout // so they're executed at the same time to save the second computation. function computeStyleTests() { // This is a singleton, we need to execute it only once if ( !div ) { return; } div.style.cssText = "box-sizing:border-box;" + "position:relative;display:block;" + "margin:auto;border:1px;padding:1px;" + "top:1%;width:50%"; div.innerHTML = ""; documentElement.appendChild( container ); var divStyle = window.getComputedStyle( div ); pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 reliableMarginLeftVal = divStyle.marginLeft === "2px"; boxSizingReliableVal = divStyle.width === "4px"; // Support: Android 4.0 - 4.3 only // Some styles come back with percentage values, even though they shouldn't div.style.marginRight = "50%"; pixelMarginRightVal = divStyle.marginRight === "4px"; documentElement.removeChild( container ); // Nullify the div so it wouldn't be stored in the memory and // it will also be a sign that checks already performed div = null; } var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); // Finish early in limited (non-browser) environments if ( !div.style ) { return; } // Support: IE <=9 - 11 only // Style of cloned element affects source element cloned (#8908) div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + "padding:0;margin-top:1px;position:absolute"; container.appendChild( div ); jQuery.extend( support, { pixelPosition: function() { computeStyleTests(); return pixelPositionVal; }, boxSizingReliable: function() { computeStyleTests(); return boxSizingReliableVal; }, pixelMarginRight: function() { computeStyleTests(); return pixelMarginRightVal; }, reliableMarginLeft: function() { computeStyleTests(); return reliableMarginLeftVal; } } ); } )(); function curCSS( elem, name, computed ) { var width, minWidth, maxWidth, ret, // Support: Firefox 51+ // Retrieving style before computed somehow // fixes an issue with getting wrong values // on detached elements style = elem.style; computed = computed || getStyles( elem ); // getPropertyValue is needed for: // .css('filter') (IE 9 only, #12537) // .css('--customProperty) (#3144) if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } // A tribute to the "awesome hack by Dean Edwards" // Android Browser returns percentage for some values, // but width seems to be reliably pixels. // This is against the CSSOM draft spec: // https://drafts.csswg.org/cssom/#resolved-values if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { // Remember the original values width = style.width; minWidth = style.minWidth; maxWidth = style.maxWidth; // Put in the new values to get a computed value out style.minWidth = style.maxWidth = style.width = ret; ret = computed.width; // Revert the changed values style.width = width; style.minWidth = minWidth; style.maxWidth = maxWidth; } } return ret !== undefined ? // Support: IE <=9 - 11 only // IE returns zIndex value as an integer. ret + "" : ret; } function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. return { get: function() { if ( conditionFn() ) { // Hook not needed (or it's not possible to use it due // to missing dependency), remove it. delete this.get; return; } // Hook needed; redefine it so that the support test is not executed again. return ( this.get = hookFn ).apply( this, arguments ); } }; } var // Swappable if display is none or starts with table // except "table", "table-cell", or "table-caption" // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rcustomProp = /^--/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { letterSpacing: "0", fontWeight: "400" }, cssPrefixes = [ "Webkit", "Moz", "ms" ], emptyStyle = document.createElement( "div" ).style; // Return a css property mapped to a potentially vendor prefixed property function vendorPropName( name ) { // Shortcut for names that are not vendor prefixed if ( name in emptyStyle ) { return name; } // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in emptyStyle ) { return name; } } } // Return a property mapped along what jQuery.cssProps suggests or to // a vendor prefixed property. function finalPropName( name ) { var ret = jQuery.cssProps[ name ]; if ( !ret ) { ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; } return ret; } function setPositiveNumber( elem, value, subtract ) { // Any relative (+/-) values have already been // normalized at this point var matches = rcssNum.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : value; } function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { var i, val = 0; // If we already have the right measurement, avoid augmentation if ( extra === ( isBorderBox ? "border" : "content" ) ) { i = 4; // Otherwise initialize for horizontal or vertical properties } else { i = name === "width" ? 1 : 0; } for ( ; i < 4; i += 2 ) { // Both box models exclude margin, so add it if we want it if ( extra === "margin" ) { val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); } if ( isBorderBox ) { // border-box includes padding, so remove it if we want content if ( extra === "content" ) { val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } // At this point, extra isn't border nor margin, so remove border if ( extra !== "margin" ) { val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } else { // At this point, extra isn't content, so add padding val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // At this point, extra isn't content nor padding, so add border if ( extra !== "padding" ) { val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } return val; } function getWidthOrHeight( elem, name, extra ) { // Start with computed style var valueIsBorderBox, styles = getStyles( elem ), val = curCSS( elem, name, styles ), isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; // Computed unit is not pixels. Stop here and return. if ( rnumnonpx.test( val ) ) { return val; } // Check for style in case a browser which returns unreliable values // for getComputedStyle silently falls back to the reliable elem.style valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] ); // Fall back to offsetWidth/Height when value is "auto" // This happens for inline elements with no explicit setting (gh-3571) if ( val === "auto" ) { val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ]; } // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; // Use the active box-sizing model to add/subtract irrelevant styles return ( val + augmentWidthOrHeight( elem, name, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, styles ) ) + "px"; } jQuery.extend( { // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; } } } }, // Don't automatically add "px" to these possibly-unitless properties cssNumber: { "animationIterationCount": true, "columnCount": true, "fillOpacity": true, "flexGrow": true, "flexShrink": true, "fontWeight": true, "lineHeight": true, "opacity": true, "order": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { "float": "cssFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, hooks, origName = jQuery.camelCase( name ), isCustomProp = rcustomProp.test( name ), style = elem.style; // Make sure that we're working with the right name. We don't // want to query the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Gets hook for the prefixed version, then unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // Convert "+=" or "-=" to relative numbers (#7345) if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { value = adjustCSS( elem, name, ret ); // Fixes bug #9237 type = "number"; } // Make sure that null and NaN values aren't set (#7116) if ( value == null || value !== value ) { return; } // If a number was passed in, add the unit (except for certain CSS properties) if ( type === "number" ) { value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); } // background-* props affect original clone's values if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !( "set" in hooks ) || ( value = hooks.set( elem, value, extra ) ) !== undefined ) { if ( isCustomProp ) { style.setProperty( name, value ); } else { style[ name ] = value; } } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra, styles ) { var val, num, hooks, origName = jQuery.camelCase( name ), isCustomProp = rcustomProp.test( name ); // Make sure that we're working with the right name. We don't // want to modify the value if it is a CSS custom property // since they are user-defined. if ( !isCustomProp ) { name = finalPropName( origName ); } // Try prefixed name followed by the unprefixed name hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there if ( hooks && "get" in hooks ) { val = hooks.get( elem, true, extra ); } // Otherwise, if a way to get the computed value exists, use that if ( val === undefined ) { val = curCSS( elem, name, styles ); } // Convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } // Make numeric if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || isFinite( num ) ? num || 0 : val; } return val; } } ); jQuery.each( [ "height", "width" ], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { if ( computed ) { // Certain elements can have dimension info if we invisibly show them // but it must have a current display style that would benefit return rdisplayswap.test( jQuery.css( elem, "display" ) ) && // Support: Safari 8+ // Table columns in Safari have non-zero offsetWidth & zero // getBoundingClientRect().width unless display is changed. // Support: IE <=11 only // Running getBoundingClientRect on a disconnected node // in IE throws an error. ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); } ) : getWidthOrHeight( elem, name, extra ); } }, set: function( elem, value, extra ) { var matches, styles = extra && getStyles( elem ), subtract = extra && augmentWidthOrHeight( elem, name, extra, jQuery.css( elem, "boxSizing", false, styles ) === "border-box", styles ); // Convert to pixels if value adjustment is needed if ( subtract && ( matches = rcssNum.exec( value ) ) && ( matches[ 3 ] || "px" ) !== "px" ) { elem.style[ name ] = value; value = jQuery.css( elem, name ); } return setPositiveNumber( elem, value, subtract ); } }; } ); jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, function( elem, computed ) { if ( computed ) { return ( parseFloat( curCSS( elem, "marginLeft" ) ) || elem.getBoundingClientRect().left - swap( elem, { marginLeft: 0 }, function() { return elem.getBoundingClientRect().left; } ) ) + "px"; } } ); // These hooks are used by animate to expand properties jQuery.each( { margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i = 0, expanded = {}, // Assumes a single number if not a string parts = typeof value === "string" ? value.split( " " ) : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; if ( !rmargin.test( prefix ) ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } } ); jQuery.fn.extend( { css: function( name, value ) { return access( this, function( elem, name, value ) { var styles, len, map = {}, i = 0; if ( Array.isArray( name ) ) { styles = getStyles( elem ); len = name.length; for ( ; i < len; i++ ) { map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } return map; } return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); } } ); function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; // Use a property on the element directly when it is not a DOM element, // or when there is no matching style property that exists. if ( tween.elem.nodeType !== 1 || tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { return tween.elem[ tween.prop ]; } // Passing an empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails. // Simple values such as "10px" are parsed to Float; // complex values such as "rotate(1rad)" are returned as-is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // Use step hook for back compat. // Use cssHook if its there. // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.nodeType === 1 && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Support: IE <=9 only // Panic based approach to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; }, _default: "swing" }; jQuery.fx = Tween.prototype.init; // Back compat <1.8 extension point jQuery.fx.step = {}; var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/; function schedule() { if ( inProgress ) { if ( document.hidden === false && window.requestAnimationFrame ) { window.requestAnimationFrame( schedule ); } else { window.setTimeout( schedule, jQuery.fx.interval ); } jQuery.fx.tick(); } } // Animations created synchronously will run synchronously function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); return ( fxNow = jQuery.now() ); } // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, i = 0, attrs = { height: type }; // If we include width, step value is 1 to do all cssExpand values, // otherwise step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; } function createTween( value, prop, animation ) { var tween, collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { // We're done with this property return tween; } } } function defaultPrefilter( elem, props, opts ) { var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree( elem ), dataShow = dataPriv.get( elem, "fxshow" ); // Queue-skipping animations hijack the fx hooks if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { hooks.unqueued = 0; oldfire = hooks.empty.fire; hooks.empty.fire = function() { if ( !hooks.unqueued ) { oldfire(); } }; } hooks.unqueued++; anim.always( function() { // Ensure the complete handler is called before this completes anim.always( function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } } ); } ); } // Detect show/hide animations for ( prop in props ) { value = props[ prop ]; if ( rfxtypes.test( value ) ) { delete props[ prop ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { // Pretend to be hidden if this is a "show" and // there is still data from a stopped show/hide if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { hidden = true; // Ignore all other no-op show/hide data } else { continue; } } orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); } } // Bail out if this is a no-op like .hide().hide() propTween = !jQuery.isEmptyObject( props ); if ( !propTween && jQuery.isEmptyObject( orig ) ) { return; } // Restrict "overflow" and "display" styles during box animations if ( isBox && elem.nodeType === 1 ) { // Support: IE <=9 - 11, Edge 12 - 13 // Record all 3 overflow attributes because IE does not infer the shorthand // from identically-valued overflowX and overflowY opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Identify a display type, preferring old show/hide data over the CSS cascade restoreDisplay = dataShow && dataShow.display; if ( restoreDisplay == null ) { restoreDisplay = dataPriv.get( elem, "display" ); } display = jQuery.css( elem, "display" ); if ( display === "none" ) { if ( restoreDisplay ) { display = restoreDisplay; } else { // Get nonempty value(s) by temporarily forcing visibility showHide( [ elem ], true ); restoreDisplay = elem.style.display || restoreDisplay; display = jQuery.css( elem, "display" ); showHide( [ elem ] ); } } // Animate inline elements as inline-block if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { if ( jQuery.css( elem, "float" ) === "none" ) { // Restore the original display value at the end of pure show/hide animations if ( !propTween ) { anim.done( function() { style.display = restoreDisplay; } ); if ( restoreDisplay == null ) { display = style.display; restoreDisplay = display === "none" ? "" : display; } } style.display = "inline-block"; } } } if ( opts.overflow ) { style.overflow = "hidden"; anim.always( function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; } ); } // Implement show/hide animations propTween = false; for ( prop in orig ) { // General show/hide setup for this element animation if ( !propTween ) { if ( dataShow ) { if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } } else { dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); } // Store hidden/visible for toggle so `.stop().toggle()` "reverses" if ( toggle ) { dataShow.hidden = !hidden; } // Show elements before animating them if ( hidden ) { showHide( [ elem ], true ); } /* eslint-disable no-loop-func */ anim.done( function() { /* eslint-enable no-loop-func */ // The final step of a "hide" animation is actually hiding the element if ( !hidden ) { showHide( [ elem ] ); } dataPriv.remove( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } } ); } // Per-property setup propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); if ( !( prop in dataShow ) ) { dataShow[ prop ] = propTween.start; if ( hidden ) { propTween.end = propTween.start; propTween.start = 0; } } } } function propFilter( props, specialEasing ) { var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = jQuery.camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( Array.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } if ( index !== name ) { props[ name ] = value; delete props[ index ]; } hooks = jQuery.cssHooks[ name ]; if ( hooks && "expand" in hooks ) { value = hooks.expand( value ); delete props[ name ]; // Not quite $.extend, this won't overwrite existing keys. // Reusing 'index' because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; specialEasing[ index ] = easing; } } } else { specialEasing[ name ] = easing; } } } function Animation( elem, properties, options ) { var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always( function() { // Don't match elem in the :animated selector delete tick.elem; } ), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // Support: Android 2.3 only // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = animation.tweens.length; for ( ; index < length; index++ ) { animation.tweens[ index ].run( percent ); } deferred.notifyWith( elem, [ animation, percent, remaining ] ); // If there's more to do, yield if ( percent < 1 && length ) { return remaining; } // If this was an empty animation, synthesize a final progress notification if ( !length ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); } // Resolve the animation and report its conclusion deferred.resolveWith( elem, [ animation ] ); return false; }, animation = deferred.promise( { elem: elem, props: jQuery.extend( {}, properties ), opts: jQuery.extend( true, { specialEasing: {}, easing: jQuery.easing._default }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), duration: options.duration, tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, stop: function( gotoEnd ) { var index = 0, // If we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { return this; } stopped = true; for ( ; index < length; index++ ) { animation.tweens[ index ].run( 1 ); } // Resolve when we played the last frame; otherwise, reject if ( gotoEnd ) { deferred.notifyWith( elem, [ animation, 1, 0 ] ); deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } } ), props = animation.props; propFilter( props, animation.opts.specialEasing ); for ( ; index < length; index++ ) { result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { if ( jQuery.isFunction( result.stop ) ) { jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = jQuery.proxy( result.stop, result ); } return result; } } jQuery.map( props, createTween, animation ); if ( jQuery.isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } // Attach callbacks from options animation .progress( animation.opts.progress ) .done( animation.opts.done, animation.opts.complete ) .fail( animation.opts.fail ) .always( animation.opts.always ); jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue } ) ); return animation; } jQuery.Animation = jQuery.extend( Animation, { tweeners: { "*": [ function( prop, value ) { var tween = this.createTween( prop, value ); adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); return tween; } ] }, tweener: function( props, callback ) { if ( jQuery.isFunction( props ) ) { callback = props; props = [ "*" ]; } else { props = props.match( rnothtmlwhite ); } var prop, index = 0, length = props.length; for ( ; index < length; index++ ) { prop = props[ index ]; Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; Animation.tweeners[ prop ].unshift( callback ); } }, prefilters: [ defaultPrefilter ], prefilter: function( callback, prepend ) { if ( prepend ) { Animation.prefilters.unshift( callback ); } else { Animation.prefilters.push( callback ); } } } ); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing }; // Go to the end state if fx are off if ( jQuery.fx.off ) { opt.duration = 0; } else { if ( typeof opt.duration !== "number" ) { if ( opt.duration in jQuery.fx.speeds ) { opt.duration = jQuery.fx.speeds[ opt.duration ]; } else { opt.duration = jQuery.fx.speeds._default; } } } // Normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function() { if ( jQuery.isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } }; return opt; }; jQuery.fn.extend( { fadeTo: function( speed, to, easing, callback ) { // Show any hidden elements after setting opacity to 0 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() // Animate to the value specified .end().animate( { opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately if ( empty || dataPriv.get( this, "finish" ) ) { anim.stop( true ); } }; doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { var stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }; if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each( function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { stopQueue( data[ index ] ); } } else { for ( index in data ) { if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { stopQueue( data[ index ] ); } } } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && ( type == null || timers[ index ].queue === type ) ) { timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); } } // Start the next in the queue if the last step wasn't forced. // Timers currently will call their complete callbacks, which // will dequeue but only if they were gotoEnd. if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } } ); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } return this.each( function() { var index, data = dataPriv.get( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; // Enable finishing flag on private data data.finish = true; // Empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.stop ) { hooks.stop.call( this, true ); } // Look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); timers.splice( index, 1 ); } } // Look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } // Turn off finishing flag delete data.finish; } ); } } ); jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; } ); // Generate shortcuts for custom animations jQuery.each( { slideDown: genFx( "show" ), slideUp: genFx( "hide" ), slideToggle: genFx( "toggle" ), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; } ); jQuery.timers = []; jQuery.fx.tick = function() { var timer, i = 0, timers = jQuery.timers; fxNow = jQuery.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Run the timer and safely remove it when done (allowing for external removal) if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } fxNow = undefined; }; jQuery.fx.timer = function( timer ) { jQuery.timers.push( timer ); jQuery.fx.start(); }; jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( inProgress ) { return; } inProgress = true; schedule(); }; jQuery.fx.stop = function() { inProgress = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; // Based off of the plugin by Clint Helfers, with permission. // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ jQuery.fn.delay = function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = window.setTimeout( next, time ); hooks.stop = function() { window.clearTimeout( timeout ); }; } ); }; ( function() { var input = document.createElement( "input" ), select = document.createElement( "select" ), opt = select.appendChild( document.createElement( "option" ) ); input.type = "checkbox"; // Support: Android <=4.3 only // Default value for a checkbox should be "on" support.checkOn = input.value !== ""; // Support: IE <=11 only // Must access selectedIndex to make default options select support.optSelected = opt.selected; // Support: IE <=11 only // An input loses its value after becoming a radio input = document.createElement( "input" ); input.value = "t"; input.type = "radio"; support.radioValue = input.value === "t"; } )(); var boolHook, attrHandle = jQuery.expr.attrHandle; jQuery.fn.extend( { attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each( function() { jQuery.removeAttr( this, name ); } ); } } ); jQuery.extend( { attr: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set attributes on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === "undefined" ) { return jQuery.prop( elem, name, value ); } // Attribute hooks are determined by the lowercase version // Grab necessary hook if one is defined if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { hooks = jQuery.attrHooks[ name.toLowerCase() ] || ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return; } if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } elem.setAttribute( name, value + "" ); return value; } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } ret = jQuery.find.attr( elem, name ); // Non-existent attributes return null, we normalize to undefined return ret == null ? undefined : ret; }, attrHooks: { type: { set: function( elem, value ) { if ( !support.radioValue && value === "radio" && nodeName( elem, "input" ) ) { var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } } }, removeAttr: function( elem, value ) { var name, i = 0, // Attribute names can contain non-HTML whitespace characters // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 attrNames = value && value.match( rnothtmlwhite ); if ( attrNames && elem.nodeType === 1 ) { while ( ( name = attrNames[ i++ ] ) ) { elem.removeAttribute( name ); } } } } ); // Hooks for boolean attributes boolHook = { set: function( elem, value, name ) { if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { elem.setAttribute( name, name ); } return name; } }; jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; attrHandle[ name ] = function( elem, name, isXML ) { var ret, handle, lowercaseName = name.toLowerCase(); if ( !isXML ) { // Avoid an infinite loop by temporarily removing this function from the getter handle = attrHandle[ lowercaseName ]; attrHandle[ lowercaseName ] = ret; ret = getter( elem, name, isXML ) != null ? lowercaseName : null; attrHandle[ lowercaseName ] = handle; } return ret; }; } ); var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i; jQuery.fn.extend( { prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { return this.each( function() { delete this[ jQuery.propFix[ name ] || name ]; } ); } } ); jQuery.extend( { prop: function( elem, name, value ) { var ret, hooks, nType = elem.nodeType; // Don't get/set properties on text, comment and attribute nodes if ( nType === 3 || nType === 8 || nType === 2 ) { return; } if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && ( ret = hooks.set( elem, value, name ) ) !== undefined ) { return ret; } return ( elem[ name ] = value ); } if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { return ret; } return elem[ name ]; }, propHooks: { tabIndex: { get: function( elem ) { // Support: IE <=9 - 11 only // elem.tabIndex doesn't always return the // correct value when it hasn't been explicitly set // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ // Use proper attribute retrieval(#12072) var tabindex = jQuery.find.attr( elem, "tabindex" ); if ( tabindex ) { return parseInt( tabindex, 10 ); } if ( rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ) { return 0; } return -1; } } }, propFix: { "for": "htmlFor", "class": "className" } } ); // Support: IE <=11 only // Accessing the selectedIndex property // forces the browser to respect setting selected // on the option // The getter ensures a default option is selected // when in an optgroup // eslint rule "no-unused-expressions" is disabled for this code // since it considers such accessions noop if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent && parent.parentNode ) { parent.parentNode.selectedIndex; } return null; }, set: function( elem ) { /* eslint no-unused-expressions: "off" */ var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } } }; } jQuery.each( [ "tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable" ], function() { jQuery.propFix[ this.toLowerCase() ] = this; } ); // Strip and collapse whitespace according to HTML spec // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); } function getClass( elem ) { return elem.getAttribute && elem.getAttribute( "class" ) || ""; } jQuery.fn.extend( { addClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( jQuery.isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); } ); } if ( typeof value === "string" && value ) { classes = value.match( rnothtmlwhite ) || []; while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, removeClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; if ( jQuery.isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); } ); } if ( !arguments.length ) { return this.attr( "class", "" ); } if ( typeof value === "string" && value ) { classes = value.match( rnothtmlwhite ) || []; while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); // This expression is here for better compressibility (see addClass) cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); if ( cur ) { j = 0; while ( ( clazz = classes[ j++ ] ) ) { // Remove *all* instances while ( cur.indexOf( " " + clazz + " " ) > -1 ) { cur = cur.replace( " " + clazz + " ", " " ); } } // Only assign if different to avoid unneeded rendering. finalValue = stripAndCollapse( cur ); if ( curValue !== finalValue ) { elem.setAttribute( "class", finalValue ); } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value; if ( typeof stateVal === "boolean" && type === "string" ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } if ( jQuery.isFunction( value ) ) { return this.each( function( i ) { jQuery( this ).toggleClass( value.call( this, i, getClass( this ), stateVal ), stateVal ); } ); } return this.each( function() { var className, i, self, classNames; if ( type === "string" ) { // Toggle individual class names i = 0; self = jQuery( this ); classNames = value.match( rnothtmlwhite ) || []; while ( ( className = classNames[ i++ ] ) ) { // Check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { self.addClass( className ); } } // Toggle whole class name } else if ( value === undefined || type === "boolean" ) { className = getClass( this ); if ( className ) { // Store className if set dataPriv.set( this, "__className__", className ); } // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. if ( this.setAttribute ) { this.setAttribute( "class", className || value === false ? "" : dataPriv.get( this, "__className__" ) || "" ); } } } ); }, hasClass: function( selector ) { var className, elem, i = 0; className = " " + selector + " "; while ( ( elem = this[ i++ ] ) ) { if ( elem.nodeType === 1 && ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { return true; } } return false; } } ); var rreturn = /\r/g; jQuery.fn.extend( { val: function( value ) { var hooks, ret, isFunction, elem = this[ 0 ]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && ( ret = hooks.get( elem, "value" ) ) !== undefined ) { return ret; } ret = elem.value; // Handle most common string cases if ( typeof ret === "string" ) { return ret.replace( rreturn, "" ); } // Handle cases where value is null/undef or number return ret == null ? "" : ret; } return; } isFunction = jQuery.isFunction( value ); return this.each( function( i ) { var val; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, jQuery( this ).val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( Array.isArray( val ) ) { val = jQuery.map( val, function( value ) { return value == null ? "" : value + ""; } ); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } } ); } } ); jQuery.extend( { valHooks: { option: { get: function( elem ) { var val = jQuery.find.attr( elem, "value" ); return val != null ? val : // Support: IE <=10 - 11 only // option.text throws exceptions (#14686, #14858) // Strip and collapse whitespace // https://html.spec.whatwg.org/#strip-and-collapse-whitespace stripAndCollapse( jQuery.text( elem ) ); } }, select: { get: function( elem ) { var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length; if ( index < 0 ) { i = max; } else { i = one ? index : 0; } // Loop through all the selected options for ( ; i < max; i++ ) { option = options[ i ]; // Support: IE <=9 only // IE8-9 doesn't update selected after form reset (#2551) if ( ( option.selected || i === index ) && // Don't return options that are disabled or in a disabled optgroup !option.disabled && ( !option.parentNode.disabled || !nodeName( option.parentNode, "optgroup" ) ) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } return values; }, set: function( elem, value ) { var optionSet, option, options = elem.options, values = jQuery.makeArray( value ), i = options.length; while ( i-- ) { option = options[ i ]; /* eslint-disable no-cond-assign */ if ( option.selected = jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) { optionSet = true; } /* eslint-enable no-cond-assign */ } // Force browsers to behave consistently when non-matching value is set if ( !optionSet ) { elem.selectedIndex = -1; } return values; } } } } ); // Radios and checkboxes getter/setter jQuery.each( [ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { set: function( elem, value ) { if ( Array.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); } } }; if ( !support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { return elem.getAttribute( "value" ) === null ? "on" : elem.value; }; } } ); // Return jQuery for attributes-only inclusion var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; jQuery.extend( jQuery.event, { trigger: function( event, data, elem, onlyHandlers ) { var i, cur, tmp, bubbleType, ontype, handle, special, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; cur = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf( "." ) > -1 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split( "." ); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf( ":" ) < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join( "." ); event.rnamespace = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === ( elem.ownerDocument || document ) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && dataPriv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && handle.apply && acceptData( cur ) ) { event.result = handle.apply( cur, data ); if ( event.result === false ) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( ( !special._default || special._default.apply( eventPath.pop(), data ) === false ) && acceptData( elem ) ) { // Call a native DOM method on the target with the same name as the event. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; elem[ type ](); jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, // Piggyback on a donor event to simulate a different one // Used only for `focus(in | out)` events simulate: function( type, elem, event ) { var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true } ); jQuery.event.trigger( e, null, elem ); } } ); jQuery.fn.extend( { trigger: function( type, data ) { return this.each( function() { jQuery.event.trigger( type, data, this ); } ); }, triggerHandler: function( type, data ) { var elem = this[ 0 ]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } } ); jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup contextmenu" ).split( " " ), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; } ); jQuery.fn.extend( { hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } } ); support.focusin = "onfocusin" in window; // Support: Firefox <=44 // Firefox doesn't have focus(in | out) events // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 // // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 // focus(in | out) events fire after focus & blur events, // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 if ( !support.focusin ) { jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); }; jQuery.event.special[ fix ] = { setup: function() { var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this, attaches = dataPriv.access( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); dataPriv.remove( doc, fix ); } else { dataPriv.access( doc, fix, attaches ); } } }; } ); } var location = window.location; var nonce = jQuery.now(); var rquery = ( /\?/ ); // Cross-browser xml parsing jQuery.parseXML = function( data ) { var xml; if ( !data || typeof data !== "string" ) { return null; } // Support: IE 9 - 11 only // IE throws on parseFromString with invalid input. try { xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); } catch ( e ) { xml = undefined; } if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }; var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; function buildParams( prefix, obj, traditional, add ) { var name; if ( Array.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scalar (array or object), encode its numeric index. buildParams( prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", v, traditional, add ); } } ); } else if ( !traditional && jQuery.type( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // Serialize an array of form elements or a set of // key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, valueOrFunction ) { // If value is a function, invoke it and use its return value var value = jQuery.isFunction( valueOrFunction ) ? valueOrFunction() : valueOrFunction; s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value == null ? "" : value ); }; // If an array was passed in, assume that it is an array of form elements. if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); } ); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ); }; jQuery.fn.extend( { serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map( function() { // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; } ) .filter( function() { var type = this.type; // Use .is( ":disabled" ) so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); } ) .map( function( i, elem ) { var val = jQuery( this ).val(); if ( val == null ) { return null; } if ( Array.isArray( val ) ) { return jQuery.map( val, function( val ) { return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ); } return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; } ).get(); } } ); var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat( "*" ), // Anchor tag for parsing the document origin originAnchor = document.createElement( "a" ); originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; if ( jQuery.isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( ( dataType = dataTypes[ i++ ] ) ) { // Prepend if requested if ( dataType[ 0 ] === "+" ) { dataType = dataType.slice( 1 ) || "*"; ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); // Otherwise append } else { ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); } } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } } ); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; } /* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var ct, type, finalDataType, firstDataType, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } /* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */ function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split( " " ); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.unshift( tmp[ 1 ] ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s.throws ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } } } return { state: "success", data: response }; } jQuery.extend( { // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {}, ajaxSettings: { url: location.href, type: "GET", isLocal: rlocalProtocol.test( location.protocol ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, throws: false, traditional: false, headers: {}, */ accepts: { "*": allTypes, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /\bxml\b/, html: /\bhtml/, json: /\bjson\b/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": JSON.parse, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { url: true, context: true } }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { return settings ? // Building a settings object ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // Extending ajaxSettings ajaxExtend( jQuery.ajaxSettings, target ); }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var transport, // URL without anti-cache param cacheURL, // Response headers responseHeadersString, responseHeaders, // timeout handle timeoutTimer, // Url cleanup var urlAnchor, // Request state (becomes false upon send and true upon completion) completed, // To know if global events are to be dispatched fireGlobals, // Loop variable i, // uncached part of the url uncached, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks( "once memory" ), // Status-dependent callbacks statusCode = s.statusCode || {}, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // Default abort message strAbort = "canceled", // Fake xhr jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( completed ) { if ( !responseHeaders ) { responseHeaders = {}; while ( ( match = rheaders.exec( responseHeadersString ) ) ) { responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match == null ? null : match; }, // Raw string getAllResponseHeaders: function() { return completed ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { if ( completed == null ) { name = requestHeadersNames[ name.toLowerCase() ] = requestHeadersNames[ name.toLowerCase() ] || name; requestHeaders[ name ] = value; } return this; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( completed == null ) { s.mimeType = type; } return this; }, // Status-dependent callbacks statusCode: function( map ) { var code; if ( map ) { if ( completed ) { // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); } else { // Lazy-add the new callbacks in a way that preserves old ones for ( code in map ) { statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } } } return this; }, // Cancel the request abort: function( statusText ) { var finalText = statusText || strAbort; if ( transport ) { transport.abort( finalText ); } done( 0, finalText ); return this; } }; // Attach deferreds deferred.promise( jqXHR ); // Add protocol if not provided (prefilters might expect it) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available s.url = ( ( url || s.url || location.href ) + "" ) .replace( rprotocol, location.protocol + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; // A cross-domain request is in order when the origin doesn't match the current origin. if ( s.crossDomain == null ) { urlAnchor = document.createElement( "a" ); // Support: IE <=8 - 11, Edge 12 - 13 // IE throws exception on accessing the href property if url is malformed, // e.g. http://example.com:80x/ try { urlAnchor.href = s.url; // Support: IE <=8 - 11 only // Anchor's host property isn't correctly set when s.url is relative urlAnchor.href = urlAnchor.href; s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host; } catch ( e ) { // If there is an error parsing the URL, assume it is crossDomain, // it can be rejected by the transport if it is invalid s.crossDomain = true; } } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( completed ) { return jqXHR; } // We can fire global events as of now if asked to // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) fireGlobals = jQuery.event && s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger( "ajaxStart" ); } // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on // Remove hash to simplify url manipulation cacheURL = s.url.replace( rhash, "" ); // More options handling for requests with no content if ( !s.hasContent ) { // Remember the hash so we can put it back uncached = s.url.slice( cacheURL.length ); // If data is available, append data to url if ( s.data ) { cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Add or update anti-cache param if needed if ( s.cache === false ) { cacheURL = cacheURL.replace( rantiCache, "$1" ); uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; } // Put hash and anti-cache on the URL that will be requested (gh-1732) s.url = cacheURL + uncached; // Change '%20' to '+' if this is encoded form body content (gh-2658) } else if ( s.data && s.processData && ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { s.data = s.data.replace( r20, "+" ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( jQuery.lastModified[ cacheURL ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); } if ( jQuery.etag[ cacheURL ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? s.accepts[ s.dataTypes[ 0 ] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { // Abort if not done already and return return jqXHR.abort(); } // Aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds completeDeferred.add( s.complete ); jqXHR.done( s.success ); jqXHR.fail( s.error ); // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // If request was aborted inside ajaxSend, stop there if ( completed ) { return jqXHR; } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = window.setTimeout( function() { jqXHR.abort( "timeout" ); }, s.timeout ); } try { completed = false; transport.send( requestHeaders, done ); } catch ( e ) { // Rethrow post-completion exceptions if ( completed ) { throw e; } // Propagate others as results done( -1, e ); } } // Callback for when everything is done function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Ignore repeat invocations if ( completed ) { return; } completed = true; // Clear timeout if it exists if ( timeoutTimer ) { window.clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader( "Last-Modified" ); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader( "etag" ); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.error; isSuccess = !error; } } else { // Extract error from statusText and normalize for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } } return jqXHR; }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); } } ); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // Shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } // The url can be an options object (which then must have .url) return jQuery.ajax( jQuery.extend( { url: url, type: method, dataType: type, data: data, success: callback }, jQuery.isPlainObject( url ) && url ) ); }; } ); jQuery._evalUrl = function( url ) { return jQuery.ajax( { url: url, // Make this explicit, since user can override this through ajaxSetup (#11264) type: "GET", dataType: "script", cache: true, async: false, global: false, "throws": true } ); }; jQuery.fn.extend( { wrapAll: function( html ) { var wrap; if ( this[ 0 ] ) { if ( jQuery.isFunction( html ) ) { html = html.call( this[ 0 ] ); } // The elements to wrap the target around wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); if ( this[ 0 ].parentNode ) { wrap.insertBefore( this[ 0 ] ); } wrap.map( function() { var elem = this; while ( elem.firstElementChild ) { elem = elem.firstElementChild; } return elem; } ).append( this ); } return this; }, wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each( function( i ) { jQuery( this ).wrapInner( html.call( this, i ) ); } ); } return this.each( function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } } ); }, wrap: function( html ) { var isFunction = jQuery.isFunction( html ); return this.each( function( i ) { jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); } ); }, unwrap: function( selector ) { this.parent( selector ).not( "body" ).each( function() { jQuery( this ).replaceWith( this.childNodes ); } ); return this; } } ); jQuery.expr.pseudos.hidden = function( elem ) { return !jQuery.expr.pseudos.visible( elem ); }; jQuery.expr.pseudos.visible = function( elem ) { return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); }; jQuery.ajaxSettings.xhr = function() { try { return new window.XMLHttpRequest(); } catch ( e ) {} }; var xhrSuccessStatus = { // File protocol always yields status code 0, assume 200 0: 200, // Support: IE <=9 only // #1450: sometimes IE returns 1223 when it should be 204 1223: 204 }, xhrSupported = jQuery.ajaxSettings.xhr(); support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); support.ajax = xhrSupported = !!xhrSupported; jQuery.ajaxTransport( function( options ) { var callback, errorCallback; // Cross domain only allowed if supported through XMLHttpRequest if ( support.cors || xhrSupported && !options.crossDomain ) { return { send: function( headers, complete ) { var i, xhr = options.xhr(); xhr.open( options.type, options.url, options.async, options.username, options.password ); // Apply custom fields if provided if ( options.xhrFields ) { for ( i in options.xhrFields ) { xhr[ i ] = options.xhrFields[ i ]; } } // Override mime type if needed if ( options.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( options.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { headers[ "X-Requested-With" ] = "XMLHttpRequest"; } // Set headers for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } // Callback callback = function( type ) { return function() { if ( callback ) { callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; if ( type === "abort" ) { xhr.abort(); } else if ( type === "error" ) { // Support: IE <=9 only // On a manual native abort, IE9 throws // errors on any property access that is not readyState if ( typeof xhr.status !== "number" ) { complete( 0, "error" ); } else { complete( // File: protocol always yields status 0; see #8605, #14207 xhr.status, xhr.statusText ); } } else { complete( xhrSuccessStatus[ xhr.status ] || xhr.status, xhr.statusText, // Support: IE <=9 only // IE9 has no XHR2 but throws on binary (trac-11426) // For XHR2 non-text, let the caller handle it (gh-2498) ( xhr.responseType || "text" ) !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText }, xhr.getAllResponseHeaders() ); } } }; }; // Listen to events xhr.onload = callback(); errorCallback = xhr.onerror = callback( "error" ); // Support: IE 9 only // Use onreadystatechange to replace onabort // to handle uncaught aborts if ( xhr.onabort !== undefined ) { xhr.onabort = errorCallback; } else { xhr.onreadystatechange = function() { // Check readyState before timeout as it changes if ( xhr.readyState === 4 ) { // Allow onerror to be called first, // but that will not handle a native abort // Also, save errorCallback to a variable // as xhr.onerror cannot be accessed window.setTimeout( function() { if ( callback ) { errorCallback(); } } ); } }; } // Create the abort callback callback = callback( "abort" ); try { // Do send the request (this may raise an exception) xhr.send( options.hasContent && options.data || null ); } catch ( e ) { // #14683: Only rethrow if this hasn't been notified as an error yet if ( callback ) { throw e; } } }, abort: function() { if ( callback ) { callback(); } } }; } } ); // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) jQuery.ajaxPrefilter( function( s ) { if ( s.crossDomain ) { s.contents.script = false; } } ); // Install script dataType jQuery.ajaxSetup( { accepts: { script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript" }, contents: { script: /\b(?:java|ecma)script\b/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } } ); // Handle cache's special case and crossDomain jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; } } ); // Bind script tag hack transport jQuery.ajaxTransport( "script", function( s ) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, callback; return { send: function( _, complete ) { script = jQuery( "

Search

Please activate JavaScript to enable the search functionality.

From here you can search these documents. Enter your search words into the box below and click "search". Note that the search function will automatically search for all of the words. Pages containing fewer words won't appear in the result list.

mpi4py-3.0.3/docs/usrman/citing.html0000664000175000017500000001260513557771111020413 0ustar dalcinldalcinl00000000000000 Citation — MPI for Python 3.0.3 documentation

Citation¶

If MPI for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project.

mpi4py-3.0.3/docs/usrman/mpi4py.run.html0000664000175000017500000004046613557771112021172 0ustar dalcinldalcinl00000000000000 mpi4py.run — MPI for Python 3.0.3 documentation

mpi4py.run¶

New in version 3.0.0.

At import time, mpi4py initializes the MPI execution environment calling MPI_Init_thread() and installs an exit hook to automatically call MPI_Finalize() just before the Python process terminates. Additionally, mpi4py overrides the default MPI.ERRORS_ARE_FATAL error handler in favor of MPI.ERRORS_RETURN, which allows translating MPI errors in Python exceptions. These departures from standard MPI behavior may be controversial, but are quite convenient within the highly dynamic Python programming environment. Third-party code using mpi4py can just from mpi4py import MPI and perform MPI calls without the tedious initialization/finalization handling. MPI errors, once translated automatically to Python exceptions, can be dealt with the common try…except…finally clauses; unhandled MPI exceptions will print a traceback which helps in locating problems in source code.

Unfortunately, the interplay of automatic MPI finalization and unhandled exceptions may lead to deadlocks. In unattended runs, these deadlocks will drain the battery of your laptop, or burn precious allocation hours in your supercomputing facility.

Consider the following snippet of Python code. Assume this code is stored in a standard Python script file and run with mpiexec in two or more processes.

from mpi4py import MPI
assert MPI.COMM_WORLD.Get_size() > 1
rank = MPI.COMM_WORLD.Get_rank()
if rank == 0:
    1/0
    MPI.COMM_WORLD.send(None, dest=1, tag=42)
elif rank == 1:
    MPI.COMM_WORLD.recv(source=0, tag=42)

Process 0 raises ZeroDivisionError exception before performing a send call to process 1. As the exception is not handled, the Python interpreter running in process 0 will proceed to exit with non-zero status. However, as mpi4py installed a finalizer hook to call MPI_Finalize() before exit, process 0 will block waiting for other processes to also enter the MPI_Finalize() call. Meanwhile, process 1 will block waiting for a message to arrive from process 0, thus never reaching to MPI_Finalize(). The whole MPI execution environment is irremediably in a deadlock state.

To alleviate this issue, mpi4py offers a simple, alternative command line execution mechanism based on using the -m flag and implemented with the runpy module. To use this features, Python code should be run passing -m mpi4py in the command line invoking the Python interpreter. In case of unhandled exceptions, the finalizer hook will call MPI_Abort() on the MPI_COMM_WORLD communicator, thus effectively aborting the MPI execution environment.

Warning

When a process is forced to abort, resources (e.g. open files) are not cleaned-up and any registered finalizers (either with the atexit module, the Python C/API function Py_AtExit(), or even the C standard library function atexit()) will not be executed. Thus, aborting execution is an extremely impolite way of ensuring process termination. However, MPI provides no other mechanism to recover from a deadlock state.

Interface options¶

The use of -m mpi4py to execute Python code on the command line resembles that of the Python interpreter.

  • mpiexec -n numprocs python -m mpi4py pyfile [arg] ...
  • mpiexec -n numprocs python -m mpi4py -m mod [arg] ...
  • mpiexec -n numprocs python -m mpi4py -c cmd [arg] ...
  • mpiexec -n numprocs python -m mpi4py - [arg] ...
<pyfile>

Execute the Python code contained in pyfile, which must be a filesystem path referring to either a Python file, a directory containing a __main__.py file, or a zipfile containing a __main__.py file.

-m <mod>¶

Search sys.path for the named module mod and execute its contents.

-c <cmd>¶

Execute the Python code in the cmd string command.

-

Read commands from standard input (sys.stdin).

See also

Command line
Documentation on Python command line interface.
mpi4py-3.0.3/docs/usrman/mpi4py.futures.html0000664000175000017500000020265113557771112022057 0ustar dalcinldalcinl00000000000000 mpi4py.futures — MPI for Python 3.0.3 documentation

mpi4py.futures¶

New in version 3.0.0.

This package provides a high-level interface for asynchronously executing callables on a pool of worker processes using MPI for inter-process communication.

concurrent.futures¶

The mpi4py.futures package is based on concurrent.futures from the Python standard library. More precisely, mpi4py.futures provides the MPIPoolExecutor class as a concrete implementation of the abstract class Executor. The submit() interface schedules a callable to be executed asynchronously and returns a Future object representing the execution of the callable. Future instances can be queried for the call result or exception. Sets of Future instances can be passed to the wait() and as_completed() functions.

Note

The concurrent.futures package was introduced in Python 3.2. A backport targeting Python 2.7 is available on PyPI. The mpi4py.futures package uses concurrent.futures if available, either from the Python 3 standard library or the Python 2.7 backport if installed. Otherwise, mpi4py.futures uses a bundled copy of core functionality backported from Python 3.5 to work with Python 2.7.

See also

Module concurrent.futures
Documentation of the concurrent.futures standard module.

MPIPoolExecutor¶

The MPIPoolExecutor class uses a pool of MPI processes to execute calls asynchronously. By performing computations in separate processes, it allows to side-step the Global Interpreter Lock but also means that only picklable objects can be executed and returned. The __main__ module must be importable by worker processes, thus MPIPoolExecutor instances may not work in the interactive interpreter.

MPIPoolExecutor takes advantage of the dynamic process management features introduced in the MPI-2 standard. In particular, the MPI.Intracomm.Spawn() method of MPI.COMM_SELF() is used in the master (or parent) process to spawn new worker (or child) processes running a Python interpreter. The master process uses a separate thread (one for each MPIPoolExecutor instance) to communicate back and forth with the workers. The worker processes serve the execution of tasks in the main (and only) thread until they are signaled for completion.

Note

The worker processes must import the main script in order to unpickle any callable defined in the __main__ module and submitted from the master process. Furthermore, the callables may need access to other global variables. At the worker processes,:mod:mpi4py.futures executes the main script code (using the runpy module) under the __worker__ namespace to define the __main__ module. The __main__ and __worker__ modules are added to sys.modules (both at the master and worker processes) to ensure proper pickling and unpickling.

Warning

During the initial import phase at the workers, the main script cannot create and use new MPIPoolExecutor instances. Otherwise, each worker would attempt to spawn a new pool of workers, leading to infinite recursion. mpi4py.futures detects such recursive attempts to spawn new workers and aborts the MPI execution environment. As the main script code is run under the __worker__ namespace, the easiest way to avoid spawn recursion is using the idiom if __name__ == '__main__': ... in the main script.

class mpi4py.futures.MPIPoolExecutor(max_workers=None, **kwargs)¶

An Executor subclass that executes calls asynchronously using a pool of at most max_workers processes. If max_workers is None or not given, its value is determined from the MPI4PY_MAX_WORKERS environment variable if set, or the MPI universe size if set, otherwise a single worker process is spawned. If max_workers is lower than or equal to 0, then a ValueError will be raised.

Other parameters:

  • python_exe: Path to the Python interpreter executable used to spawn worker processes, otherwise sys.executable is used.
  • python_args: list or iterable with additional command line flags to pass to the Python executable. Command line flags determined from inspection of sys.flags, sys.warnoptions and sys._xoptions in are passed unconditionally.
  • mpi_info: dict or iterable yielding (key, value) pairs. These (key, value) pairs are passed (through an MPI.Info object) to the MPI.Intracomm.Spawn() call used to spawn worker processes. This mechanism allows telling the MPI runtime system where and how to start the processes. Check the documentation of the backend MPI implementation about the set of keys it interprets and the corresponding format for values.
  • globals: dict or iterable yielding (name, value) pairs to initialize the main module namespace in worker processes.
  • main: If set to False, do not import the __main__ module in worker processes. Setting main to False prevents worker processes from accessing definitions in the parent __main__ namespace.
  • path: list or iterable with paths to append to sys.path in worker processes to extend the module search path.
  • wdir: Path to set the current working directory in worker processes using os.chdir(). The initial working directory is set by the MPI implementation. Quality MPI implementations should honor a wdir info key passed through mpi_info, although such feature is not mandatory.
  • env: dict or iterable yielding (name, value) pairs with environment variables to update os.environ in worker processes. The initial environment is set by the MPI implementation. MPI implementations may allow setting the initial environment through mpi_info, however such feature is not required nor recommended by the MPI standard.
submit(func, *args, **kwargs)¶

Schedule the callable, func, to be executed as func(*args, **kwargs) and returns a Future object representing the execution of the callable.

executor = MPIPoolExecutor(max_workers=1)
future = executor.submit(pow, 321, 1234)
print(future.result())
map(func, *iterables, timeout=None, chunksize=1, **kwargs)¶

Equivalent to map(func, *iterables) except func is executed asynchronously and several calls to func may be made concurrently, out-of-order, in separate processes. The returned iterator raises a TimeoutError if __next__() is called and the result isn’t available after timeout seconds from the original call to map(). timeout can be an int or a float. If timeout is not specified or None, there is no limit to the wait time. If a call raises an exception, then that exception will be raised when its value is retrieved from the iterator. This method chops iterables into a number of chunks which it submits to the pool as separate tasks. The (approximate) size of these chunks can be specified by setting chunksize to a positive integer. For very long iterables, using a large value for chunksize can significantly improve performance compared to the default size of one. By default, the returned iterator yields results in-order, waiting for successive tasks to complete . This behavior can be changed by passing the keyword argument unordered as True, then the result iterator will yield a result as soon as any of the tasks complete.

executor = MPIPoolExecutor(max_workers=3)
for result in executor.map(pow, [2]*32, range(32)):
    print(result)
starmap(func, iterable, timeout=None, chunksize=1, **kwargs)¶

Equivalent to itertools.starmap(func, iterable). Used instead of map() when argument parameters are already grouped in tuples from a single iterable (the data has been “pre-zippedâ€). map(func, *iterable) is equivalent to starmap(func, zip(*iterable)).

executor = MPIPoolExecutor(max_workers=3)
iterable = ((2, n) for n in range(32))
for result in executor.starmap(pow, iterable):
    print(result)
shutdown(wait=True)¶

Signal the executor that it should free any resources that it is using when the currently pending futures are done executing. Calls to submit() and map() made after shutdown() will raise RuntimeError.

If wait is True then this method will not return until all the pending futures are done executing and the resources associated with the executor have been freed. If wait is False then this method will return immediately and the resources associated with the executor will be freed when all pending futures are done executing. Regardless of the value of wait, the entire Python program will not exit until all pending futures are done executing.

You can avoid having to call this method explicitly if you use the with statement, which will shutdown the executor instance (waiting as if shutdown() were called with wait set to True).

import time
with MPIPoolExecutor(max_workers=1) as executor:
    future = executor.submit(time.sleep, 2)
assert future.done()
bootup(wait=True)¶

Signal the executor that it should allocate eagerly any required resources (in particular, MPI worker processes). If wait is True, then bootup() will not return until the executor resources are ready to process submissions. Resources are automatically allocated in the first call to submit(), thus calling bootup() explicitly is seldom needed.

Note

As the master process uses a separate thread to perform MPI communication with the workers, the backend MPI implementation should provide support for MPI.THREAD_MULTIPLE. However, some popular MPI implementations do not support yet concurrent MPI calls from multiple threads. Additionally, users may decide to initialize MPI with a lower level of thread support. If the level of thread support in the backend MPI is less than MPI.THREAD_MULTIPLE, mpi4py.futures will use a global lock to serialize MPI calls. If the level of thread support is less than MPI.THREAD_SERIALIZED, mpi4py.futures will emit a RuntimeWarning.

Warning

If the level of thread support in the backend MPI is less than MPI.THREAD_SERIALIZED (i.e, it is either MPI.THREAD_SINGLE or MPI.THREAD_FUNNELED), in theory mpi4py.futures cannot be used. Rather than raising an exception, mpi4py.futures emits a warning and takes a “cross-fingers†attitude to continue execution in the hope that serializing MPI calls with a global lock will actually work.

MPICommExecutor¶

Legacy MPI-1 implementations (as well as some vendor MPI-2 implementations) do not support the dynamic process management features introduced in the MPI-2 standard. Additionally, job schedulers and batch systems in supercomputing facilities may pose additional complications to applications using the MPI_Comm_spawn() routine.

With these issues in mind, mpi4py.futures supports an additonal, more traditional, SPMD-like usage pattern requiring MPI-1 calls only. Python applications are started the usual way, e.g., using the mpiexec command. Python code should make a collective call to the MPICommExecutor context manager to partition the set of MPI processes within a MPI communicator in one master processes and many workers processes. The master process gets access to an MPIPoolExecutor instance to submit tasks. Meanwhile, the worker process follow a different execution path and team-up to execute the tasks submitted from the master.

Besides alleviating the lack of dynamic process managment features in legacy MPI-1 or partial MPI-2 implementations, the MPICommExecutor context manager may be useful in classic MPI-based Python applications willing to take advantage of the simple, task-based, master/worker approach available in the mpi4py.futures package.

class mpi4py.futures.MPICommExecutor(comm=None, root=0)¶

Context manager for MPIPoolExecutor. This context manager splits a MPI (intra)communicator comm (defaults to MPI.COMM_WORLD if not provided or None) in two disjoint sets: a single master process (with rank root in comm) and the remaining worker processes. These sets are then connected through an intercommunicator. The target of the with statement is assigned either an MPIPoolExecutor instance (at the master) or None (at the workers).

from mpi4py import MPI
from mpi4py.futures import MPICommExecutor

with MPICommExecutor(MPI.COMM_WORLD, root=0) as executor:
    if executor is not None:
       future = executor.submit(abs, -42)
       assert future.result() == 42
       answer = set(executor.map(abs, [-42, 42]))
       assert answer == {42}

Warning

If MPICommExecutor is passed a communicator of size one (e.g., MPI.COMM_SELF), then the executor instace assigned to the target of the with statement will execute all submitted tasks in a single worker thread, thus ensuring that task execution still progress asynchronously. However, the GIL will prevent the main and worker threads from running concurrently in multicore processors. Moreover, the thread context switching may harm noticeably the performance of CPU-bound tasks. In case of I/O-bound tasks, the GIL is not usually an issue, however, as a single worker thread is used, it progress one task at a time. We advice against using MPICommExecutor with communicators of size one and suggest refactoring your code to use instead a ThreadPoolExecutor.

Command line¶

Recalling the issues related to the lack of support for dynamic process managment features in MPI implementations, mpi4py.futures supports an alternative usage pattern where Python code (either from scripts, modules, or zip files) is run under command line control of the mpi4py.futures package by passing -m mpi4py.futures to the python executable. The mpi4py.futures invocation should be passed a pyfile path to a script (or a zipfile/directory containing a __main__.py file). Additionally, mpi4py.futures accepts -m mod to execute a module named mod, -c cmd to execute a command string cmd, or even - to read commands from standard input (sys.stdin). Summarizing, mpi4py.futures can be invoked in the following ways:

  • $ mpiexec -n numprocs python -m mpi4py.futures pyfile [arg] ...
  • $ mpiexec -n numprocs python -m mpi4py.futures -m mod [arg] ...
  • $ mpiexec -n numprocs python -m mpi4py.futures -c cmd [arg] ...
  • $ mpiexec -n numprocs python -m mpi4py.futures - [arg] ...

Before starting the main script execution, mpi4py.futures splits MPI.COMM_WORLD in one master (the process with rank 0 in MPI.COMM_WORLD) and 16 workers and connect them through an MPI intercommunicator. Afterwards, the master process proceeds with the execution of the user script code, which eventually creates MPIPoolExecutor instances to submit tasks. Meanwhile, the worker processes follow a different execution path to serve the master. Upon successful termination of the main script at the master, the entire MPI execution environment exists gracefully. In case of any unhandled exception in the main script, the master process calls MPI.COMM_WORLD.Abort(1) to prevent deadlocks and force termination of entire MPI execution environment.

Warning

Running scripts under command line control of mpi4py.futures is quite similar to executing a single-process application that spawn additional workers as required. However, there is a very important difference users should be aware of. All MPIPoolExecutor instances created at the master will share the pool of workers. Tasks submitted at the master from many different executors will be scheduled for execution in random order as soon as a worker is idle. Any executor can easily starve all the workers (e.g., by calling MPIPoolExecutor.map() with long iterables). If that ever happens, submissions from other executors will not be serviced until free workers are available.

See also

Command line
Documentation on Python command line interface.

Examples¶

The following julia.py script computes the Julia set and dumps an image to disk in binary PGM format. The code starts by importing MPIPoolExecutor from the mpi4py.futures package. Next, some global constants and functions implement the computation of the Julia set. The computations are protected with the standard if __name__ == '__main__': ... idiom. The image is computed by whole scanlines submitting all these tasks at once using the map method. The result iterator yields scanlines in-order as the tasks complete. Finally, each scanline is dumped to disk.

julia.py¶
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from mpi4py.futures import MPIPoolExecutor

x0, x1, w = -2.0, +2.0, 640*2
y0, y1, h = -1.5, +1.5, 480*2
dx = (x1 - x0) / w
dy = (y1 - y0) / h

c = complex(0, 0.65)

def julia(x, y):
    z = complex(x, y)
    n = 255
    while abs(z) < 3 and n > 1:
        z = z**2 + c
        n -= 1
    return n

def julia_line(k):
    line = bytearray(w)
    y = y1 - k * dy
    for j in range(w):
        x = x0 + j * dx
        line[j] = julia(x, y)
    return line

if __name__ == '__main__':

    with MPIPoolExecutor() as executor:
        image = executor.map(julia_line, range(h))
        with open('julia.pgm', 'wb') as f:
            f.write(b'P5 %d %d %d\n' % (w, h, 255))
            for line in image:
                f.write(line)

The recommended way to execute the script is using the mpiexec command specifying one MPI process and (optional but recommended) the desired MPI universe size [1].

$ mpiexec -n 1 -usize 17 python julia.py

The mpiexec command launches a single MPI process (the master) running the Python interpreter and executing the main script. When required, mpi4py.futures spawns 16 additional MPI processes (the children) to dynamically allocate the pool of workers. The master submits tasks to the children and waits for the results. The children receive incoming tasks, execute them, and send back the results to the master.

Alternatively, users may decide to execute the script in a more traditional way, that is, all the MPI process are started at once. The user script is run under command line control of mpi4py.futures passing the -m flag to the python executable.

$ mpiexec -n 17 python -m mpi4py.futures julia.py

As explained previously, the 17 processes are partitioned in one master and 16 workers. The master process executes the main script while the workers execute the tasks submitted from the master.

[1]This mpiexec invocation example using the -usize flag (alternatively, setting the MPIEXEC_UNIVERSE_SIZE environment variable) assumes the backend MPI implementation is an MPICH derivative using the Hydra process manager. In the Open MPI implementation, the MPI universe size can be specified by setting the OMPI_UNIVERSE_SIZE environment variable to a positive integer. Check the documentation of your actual MPI implementation and/or batch system for the ways to specify the desired MPI universe size.
mpi4py-3.0.3/docs/usrman/manual.html0000664000175000017500000002155313557771111020415 0ustar dalcinldalcinl00000000000000 MPI for Python — MPI for Python 3.0.3 documentation

MPI for Python¶

Abstract

This document describes the MPI for Python package. MPI for Python provides bindings of the Message Passing Interface (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors.

This package is constructed on top of the MPI-1/2/3 specifications and provides an object oriented interface which resembles the MPI-2 C++ bindings. It supports point-to-point (sends, receives) and collective (broadcasts, scatters, gathers) communications of any picklable Python object, as well as optimized communications of Python object exposing the single-segment buffer interface (NumPy arrays, builtin bytes/string/array objects)

mpi4py-3.0.3/docs/usrman/index.html0000664000175000017500000002461213557771111020246 0ustar dalcinldalcinl00000000000000 MPI for Python — MPI for Python 3.0.3 documentation

MPI for Python¶

Author:Lisandro Dalcin
Contact:dalcinl@gmail.com
Web Site:https://bitbucket.org/mpi4py/mpi4py
Date:Nov 04, 2019

Abstract

This document describes the MPI for Python package. MPI for Python provides bindings of the Message Passing Interface (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors.

This package is constructed on top of the MPI-1/2/3 specifications and provides an object oriented interface which resembles the MPI-2 C++ bindings. It supports point-to-point (sends, receives) and collective (broadcasts, scatters, gathers) communications of any picklable Python object, as well as optimized communications of Python object exposing the single-segment buffer interface (NumPy arrays, builtin bytes/string/array objects)

mpi4py-3.0.3/docs/usrman/genindex.html0000664000175000017500000002052413557771112020737 0ustar dalcinldalcinl00000000000000 Index — MPI for Python 3.0.3 documentation mpi4py-3.0.3/docs/usrman/intro.html0000664000175000017500000004310113557771111020264 0ustar dalcinldalcinl00000000000000 Introduction — MPI for Python 3.0.3 documentation

Introduction¶

Over the last years, high performance computing has become an affordable resource to many more researchers in the scientific community than ever before. The conjunction of quality open source software and commodity hardware strongly influenced the now widespread popularity of Beowulf class clusters and cluster of workstations.

Among many parallel computational models, message-passing has proven to be an effective one. This paradigm is specially suited for (but not limited to) distributed memory architectures and is used in today’s most demanding scientific and engineering application related to modeling, simulation, design, and signal processing. However, portable message-passing parallel programming used to be a nightmare in the past because of the many incompatible options developers were faced to. Fortunately, this situation definitely changed after the MPI Forum released its standard specification.

High performance computing is traditionally associated with software development using compiled languages. However, in typical applications programs, only a small part of the code is time-critical enough to require the efficiency of compiled languages. The rest of the code is generally related to memory management, error handling, input/output, and user interaction, and those are usually the most error prone and time-consuming lines of code to write and debug in the whole development process. Interpreted high-level languages can be really advantageous for this kind of tasks.

For implementing general-purpose numerical computations, MATLAB [1] is the dominant interpreted programming language. In the open source side, Octave and Scilab are well known, freely distributed software packages providing compatibility with the MATLAB language. In this work, we present MPI for Python, a new package enabling applications to exploit multiple processors using standard MPI “look and feel†in Python scripts.

[1]MATLAB is a registered trademark of The MathWorks, Inc.

What is MPI?¶

MPI, [mpi-using] [mpi-ref] the Message Passing Interface, is a standardized and portable message-passing system designed to function on a wide variety of parallel computers. The standard defines the syntax and semantics of library routines and allows users to write portable programs in the main scientific programming languages (Fortran, C, or C++).

Since its release, the MPI specification [mpi-std1] [mpi-std2] has become the leading standard for message-passing libraries for parallel computers. Implementations are available from vendors of high-performance computers and from well known open source projects like MPICH [mpi-mpich] and Open MPI [mpi-openmpi].

What is Python?¶

Python is a modern, easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming with dynamic typing and dynamic binding. It supports modules and packages, which encourages program modularity and code reuse. Python’s elegant syntax, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed. It is easily extended with new functions and data types implemented in C or C++. Python is also suitable as an extension language for customizable applications.

Python is an ideal candidate for writing the higher-level parts of large-scale scientific applications [Hinsen97] and driving simulations in parallel architectures [Beazley97] like clusters of PC’s or SMP’s. Python codes are quickly developed, easily maintained, and can achieve a high degree of integration with other libraries written in compiled languages.

mpi4py-3.0.3/docs/usrman/install.html0000664000175000017500000004163313557771111020607 0ustar dalcinldalcinl00000000000000 Installation — MPI for Python 3.0.3 documentation

Installation¶

Requirements¶

You need to have the following software properly installed in order to build MPI for Python:

  • A working MPI implementation, preferably supporting MPI-3 and built with shared/dynamic libraries.

    Note

    If you want to build some MPI implementation from sources, check the instructions at Building MPI from sources in the appendix.

  • Python 2.7, 3.3 or above.

    Note

    Some MPI-1 implementations do require the actual command line arguments to be passed in MPI_Init(). In this case, you will need to use a rebuilt, MPI-enabled, Python interpreter executable. MPI for Python has some support for alleviating you from this task. Check the instructions at MPI-enabled Python interpreter in the appendix.

Using pip or easy_install¶

If you already have a working MPI (either if you installed it from sources or by using a pre-built package from your favourite GNU/Linux distribution) and the mpicc compiler wrapper is on your search path, you can use pip:

$ [sudo] pip install mpi4py

or alternatively setuptools easy_install (deprecated):

$ [sudo] easy_install mpi4py

Note

If the mpicc compiler wrapper is not on your search path (or if it has a different name) you can use env to pass the environment variable MPICC providing the full path to the MPI compiler wrapper executable:

$ [sudo] env MPICC=/path/to/mpicc pip install mpi4py

$ [sudo] env MPICC=/path/to/mpicc easy_install mpi4py

Using distutils¶

The MPI for Python package is available for download at the project website generously hosted by Bitbucket. You can use curl or wget to get a release tarball.

  • Using curl:

    $ curl -O https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-X.Y.tar.gz
    
  • Using wget:

    $ wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-X.Y.tar.gz
    

After unpacking the release tarball:

$ tar -zxf mpi4py-X.Y.tar.gz
$ cd mpi4py-X.Y

the package is ready for building.

MPI for Python uses a standard distutils-based build system. However, some distutils commands (like build) have additional options:

--mpicc=¶

Lets you specify a special location or name for the mpicc compiler wrapper.

--mpi=¶

Lets you pass a section with MPI configuration within a special configuration file.

--configure¶

Runs exhaustive tests for checking about missing MPI types, constants, and functions. This option should be passed in order to build MPI for Python against old MPI-1 or MPI-2 implementations, possibly providing a subset of MPI-3.

If you use a MPI implementation providing a mpicc compiler wrapper (e.g., MPICH, Open MPI), it will be used for compilation and linking. This is the preferred and easiest way of building MPI for Python.

If mpicc is located somewhere in your search path, simply run the build command:

$ python setup.py build

If mpicc is not in your search path or the compiler wrapper has a different name, you can run the build command specifying its location:

$ python setup.py build --mpicc=/where/you/have/mpicc

Alternatively, you can provide all the relevant information about your MPI implementation by editing the file called mpi.cfg. You can use the default section [mpi] or add a new, custom section, for example [other_mpi] (see the examples provided in the mpi.cfg file as a starting point to write your own section):

[mpi]

include_dirs         = /usr/local/mpi/include
libraries            = mpi
library_dirs         = /usr/local/mpi/lib
runtime_library_dirs = /usr/local/mpi/lib

[other_mpi]

include_dirs         = /opt/mpi/include ...
libraries            = mpi ...
library_dirs         = /opt/mpi/lib ...
runtime_library_dirs = /op/mpi/lib ...

...

and then run the build command, perhaps specifying you custom configuration section:

$ python setup.py build --mpi=other_mpi

After building, the package is ready for install.

If you have root privileges (either by log-in as the root user of by using sudo) and you want to install MPI for Python in your system for all users, just do:

$ python setup.py install

The previous steps will install the mpi4py package at standard location prefix/lib/pythonX.X/site-packages.

If you do not have root privileges or you want to install MPI for Python for your private use, just do:

$ python setup.py install --user

Testing¶

To quickly test the installation:

$ mpiexec -n 5 python -m mpi4py.bench helloworld
Hello, World! I am process 0 of 5 on localhost.
Hello, World! I am process 1 of 5 on localhost.
Hello, World! I am process 2 of 5 on localhost.
Hello, World! I am process 3 of 5 on localhost.
Hello, World! I am process 4 of 5 on localhost.

If you installed from source, issuing at the command line:

$ mpiexec -n 5 python demo/helloworld.py

or (in the case of ancient MPI-1 implementations):

$ mpirun -np 5 python `pwd`/demo/helloworld.py

will launch a five-process run of the Python interpreter and run the test script demo/helloworld.py from the source distribution.

You can also run all the unittest scripts:

$ mpiexec -n 5 python test/runtests.py

or, if you have nose unit testing framework installed:

$ mpiexec -n 5 nosetests -w test

or, if you have py.test unit testing framework installed:

$ mpiexec -n 5 py.test test/
mpi4py-3.0.3/docs/usrman/appendix.html0000664000175000017500000003037113557771111020746 0ustar dalcinldalcinl00000000000000 Appendix — MPI for Python 3.0.3 documentation

Appendix¶

MPI-enabled Python interpreter¶

Warning

These days it is no longer required to use the MPI-enabled Python interpreter in most cases, and, therefore, is not built by default anymore because it is too difficult to reliably build a Python interpreter across different distributions. If you know that you still really need it, see below on how to use the build_exe and install_exe commands.

Some MPI-1 implementations (notably, MPICH 1) do require the actual command line arguments to be passed at the time MPI_Init() is called. In this case, you will need to use a re-built, MPI-enabled, Python interpreter binary executable. A basic implementation (targeting Python 2.X) of what is required is shown below:

#include <Python.h>
#include <mpi.h>

int main(int argc, char *argv[])
{
   int status, flag;
   MPI_Init(&argc, &argv);
   status = Py_Main(argc, argv);
   MPI_Finalized(&flag);
   if (!flag) MPI_Finalize();
   return status;
}

The source code above is straightforward; compiling it should also be. However, the linking step is more tricky: special flags have to be passed to the linker depending on your platform. In order to alleviate you for such low-level details, MPI for Python provides some pure-distutils based support to build and install an MPI-enabled Python interpreter executable:

$ cd mpi4py-X.X.X
$ python setup.py build_exe [--mpi=<name>|--mpicc=/path/to/mpicc]
$ [sudo] python setup.py install_exe [--install-dir=$HOME/bin]

After the above steps you should have the MPI-enabled interpreter installed as prefix/bin/pythonX.X-mpi (or $HOME/bin/pythonX.X-mpi). Assuming that prefix/bin (or $HOME/bin) is listed on your PATH, you should be able to enter your MPI-enabled Python interactively, for example:

$ python2.7-mpi
Python 2.7.8 (default, Nov 10 2014, 08:19:18)
[GCC 4.9.2 20141101 (Red Hat 4.9.2-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.executable
'/usr/bin/python2.7-mpi'
>>>

Building MPI from sources¶

In the list below you have some executive instructions for building some of the open-source MPI implementations out there with support for shared/dynamic libraries on POSIX environments.

  • MPICH

    $ tar -zxf mpich-X.X.X.tar.gz
    $ cd mpich-X.X.X
    $ ./configure --enable-shared --prefix=/usr/local/mpich
    $ make
    $ make install
    
  • Open MPI

    $ tar -zxf openmpi-X.X.X tar.gz
    $ cd openmpi-X.X.X
    $ ./configure --prefix=/usr/local/openmpi
    $ make all
    $ make install
    
  • MPICH 1

    $ tar -zxf mpich-X.X.X.tar.gz
    $ cd mpich-X.X.X
    $ ./configure --enable-sharedlib --prefix=/usr/local/mpich1
    $ make
    $ make install
    

Perhaps you will need to set the LD_LIBRARY_PATH environment variable (using export, setenv or what applies to your system) pointing to the directory containing the MPI libraries . In case of getting runtime linking errors when running MPI programs, the following lines can be added to the user login shell script (.profile, .bashrc, etc.).

  • MPICH

    MPI_DIR=/usr/local/mpich
    export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH
    
  • Open MPI

    MPI_DIR=/usr/local/openmpi
    export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH
    
  • MPICH 1

    MPI_DIR=/usr/local/mpich1
    export LD_LIBRARY_PATH=$MPI_DIR/lib/shared:$LD_LIBRARY_PATH:
    export MPICH_USE_SHLIB=yes
    

    Warning

    MPICH 1 support for dynamic libraries is not completely transparent. Users should set the environment variable MPICH_USE_SHLIB to yes in order to avoid link problems when using the mpicc compiler wrapper.

mpi4py-3.0.3/docs/usrman/py-modindex.html0000664000175000017500000001020713557771112021370 0ustar dalcinldalcinl00000000000000 Python Module Index — MPI for Python 3.0.3 documentation

Python Module Index

m
 
m
mpi4py
    mpi4py.futures Execute computations concurrently using MPI processes.
    mpi4py.run Run Python code using ``-m mpi4py``.
mpi4py-3.0.3/docs/usrman/objects.inv0000664000175000017500000000117013557771112020413 0ustar dalcinldalcinl00000000000000# Sphinx inventory version 2 # Project: MPI for Python # Version: 3.0 # The remainder of this file is compressed using zlib. xÚ­•ÍnÛ0 Çïz ÛÕÁ2 (ÖÛVôÐC±ë ÈkÐd©÷ô£$Û±b£i†\›üñOФeÅ7ÛoöÁµý½2¨lËù~gÿŽ€øø•åꌶL¿ o%: 0Ö6áÿî׸Pmpi4py-3.0.3/docs/usrman/_sources/0000775000175000017500000000000013560002767020064 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/docs/usrman/_sources/citing.rst.txt0000664000175000017500000000137712750576064022727 0ustar dalcinldalcinl00000000000000Citation ======== If MPI for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * L. Dalcin, R. Paz, M. Storti, and J. D'Elia, *MPI for Python: performance improvements and MPI-2 extensions*, Journal of Parallel and Distributed Computing, 68(5):655-662, 2008. http://dx.doi.org/10.1016/j.jpdc.2007.09.005 * L. Dalcin, R. Paz, and M. Storti, *MPI for Python*, Journal of Parallel and Distributed Computing, 65(9):1108-1115, 2005. http://dx.doi.org/10.1016/j.jpdc.2005.03.010 mpi4py-3.0.3/docs/usrman/_sources/appendix.rst.txt0000664000175000017500000000766513200562156023254 0ustar dalcinldalcinl00000000000000Appendix ======== .. _python-mpi: MPI-enabled Python interpreter ------------------------------ .. warning:: These days it is no longer required to use the MPI-enabled Python interpreter in most cases, and, therefore, is not built by default anymore because it is too difficult to reliably build a Python interpreter across different distributions. If you know that you still **really** need it, see below on how to use the `build_exe` and `install_exe` commands. Some MPI-1 implementations (notably, MPICH 1) **do require** the actual command line arguments to be passed at the time :c:func:`MPI_Init()` is called. In this case, you will need to use a re-built, MPI-enabled, Python interpreter binary executable. A basic implementation (targeting Python 2.X) of what is required is shown below: .. sourcecode:: c #include #include int main(int argc, char *argv[]) { int status, flag; MPI_Init(&argc, &argv); status = Py_Main(argc, argv); MPI_Finalized(&flag); if (!flag) MPI_Finalize(); return status; } The source code above is straightforward; compiling it should also be. However, the linking step is more tricky: special flags have to be passed to the linker depending on your platform. In order to alleviate you for such low-level details, *MPI for Python* provides some pure-distutils based support to build and install an MPI-enabled Python interpreter executable:: $ cd mpi4py-X.X.X $ python setup.py build_exe [--mpi=|--mpicc=/path/to/mpicc] $ [sudo] python setup.py install_exe [--install-dir=$HOME/bin] After the above steps you should have the MPI-enabled interpreter installed as :file:`{prefix}/bin/python{X}.{X}-mpi` (or :file:`$HOME/bin/python{X}.{X}-mpi`). Assuming that :file:`{prefix}/bin` (or :file:`$HOME/bin`) is listed on your :envvar:`PATH`, you should be able to enter your MPI-enabled Python interactively, for example:: $ python2.7-mpi Python 2.7.8 (default, Nov 10 2014, 08:19:18) [GCC 4.9.2 20141101 (Red Hat 4.9.2-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.executable '/usr/bin/python2.7-mpi' >>> .. _building-mpi: Building MPI from sources ------------------------- In the list below you have some executive instructions for building some of the open-source MPI implementations out there with support for shared/dynamic libraries on POSIX environments. + *MPICH* :: $ tar -zxf mpich-X.X.X.tar.gz $ cd mpich-X.X.X $ ./configure --enable-shared --prefix=/usr/local/mpich $ make $ make install + *Open MPI* :: $ tar -zxf openmpi-X.X.X tar.gz $ cd openmpi-X.X.X $ ./configure --prefix=/usr/local/openmpi $ make all $ make install + *MPICH 1* :: $ tar -zxf mpich-X.X.X.tar.gz $ cd mpich-X.X.X $ ./configure --enable-sharedlib --prefix=/usr/local/mpich1 $ make $ make install Perhaps you will need to set the :envvar:`LD_LIBRARY_PATH` environment variable (using :command:`export`, :command:`setenv` or what applies to your system) pointing to the directory containing the MPI libraries . In case of getting runtime linking errors when running MPI programs, the following lines can be added to the user login shell script (:file:`.profile`, :file:`.bashrc`, etc.). - *MPICH* :: MPI_DIR=/usr/local/mpich export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH - *Open MPI* :: MPI_DIR=/usr/local/openmpi export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH - *MPICH 1* :: MPI_DIR=/usr/local/mpich1 export LD_LIBRARY_PATH=$MPI_DIR/lib/shared:$LD_LIBRARY_PATH: export MPICH_USE_SHLIB=yes .. warning:: MPICH 1 support for dynamic libraries is not completely transparent. Users should set the environment variable :envvar:`MPICH_USE_SHLIB` to ``yes`` in order to avoid link problems when using the :program:`mpicc` compiler wrapper. mpi4py-3.0.3/docs/usrman/_sources/tutorial.rst.txt0000664000175000017500000002414613200562156023300 0ustar dalcinldalcinl00000000000000.. _tutorial: Tutorial ======== .. warning:: Under construction. Contributions very welcome! *MPI for Python* supports convenient, *pickle*-based communication of generic Python object as well as fast, near C-speed, direct array data communication of buffer-provider objects (e.g., NumPy arrays). * Communication of generic Python objects You have to use **all-lowercase** methods (of the :class:`Comm` class), like :meth:`send()`, :meth:`recv()`, :meth:`bcast()`. An object to be sent is passed as a paramenter to the communication call, and the received object is simply the return value. The :meth:`isend()` and :meth:`irecv` methods return :class:`Request` instances; completion of these methods can be managed using the :meth:`test` and :meth:`wait` methods of the :class:`Request` class. The :meth:`recv` and :meth:`irecv` methods may be passed a buffer object that can be repeatedly used to receive messages avoiding internal memory allocation. This buffer must be sufficiently large to accommodate the transmitted messages; hence, any buffer passed to :meth:`recv` or :meth:`irecv` must be at least as long as the *pickled* data transmitted to the receiver. Collective calls like :meth:`scatter()`, :meth:`gather()`, :meth:`allgather()`, :meth:`alltoall()` expect a single value or a sequence of :attr:`Comm.size` elements at the root or all process. They return a single value, a list of :attr:`Comm.size` elements, or :const:`None`. * Communication of buffer-like objects You have to use method names starting with an **upper-case** letter (of the :class:`Comm` class), like :meth:`Send()`, :meth:`Recv()`, :meth:`Bcast()`, :meth:`Scatter()`, :meth:`Gather()`. In general, buffer arguments to these calls must be explicitly specified by using a 2/3-list/tuple like ``[data, MPI.DOUBLE]``, or ``[data, count, MPI.DOUBLE]`` (the former one uses the byte-size of ``data`` and the extent of the MPI datatype to define ``count``). For vector collectives communication operations like :meth:`Scatterv()` and :meth:`Gatherv()`, buffer arguments are specified as ``[data, count, displ, datatype]``, where ``count`` and ``displ`` are sequences of integral values. Automatic MPI datatype discovery for NumPy arrays and PEP-3118 buffers is supported, but limited to basic C types (all C/C99-native signed/unsigned integral types and single/double precision real/complex floating types) and availability of matching datatypes in the underlying MPI implementation. In this case, the buffer-provider object can be passed directly as a buffer argument, the count and MPI datatype will be inferred. Running Python scripts with MPI ------------------------------- Most MPI programs can be run with the command :program:`mpiexec`. In practice, running Python programs looks like:: $ mpiexec -n 4 python script.py to run the program with 4 processors. Point-to-Point Communication ---------------------------- * Python objects (:mod:`pickle` under the hood):: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = {'a': 7, 'b': 3.14} comm.send(data, dest=1, tag=11) elif rank == 1: data = comm.recv(source=0, tag=11) * Python objects with non-blocking communication:: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = {'a': 7, 'b': 3.14} req = comm.isend(data, dest=1, tag=11) req.wait() elif rank == 1: req = comm.irecv(source=0, tag=11) data = req.wait() * NumPy arrays (the fast way!):: from mpi4py import MPI import numpy comm = MPI.COMM_WORLD rank = comm.Get_rank() # passing MPI datatypes explicitly if rank == 0: data = numpy.arange(1000, dtype='i') comm.Send([data, MPI.INT], dest=1, tag=77) elif rank == 1: data = numpy.empty(1000, dtype='i') comm.Recv([data, MPI.INT], source=0, tag=77) # automatic MPI datatype discovery if rank == 0: data = numpy.arange(100, dtype=numpy.float64) comm.Send(data, dest=1, tag=13) elif rank == 1: data = numpy.empty(100, dtype=numpy.float64) comm.Recv(data, source=0, tag=13) Collective Communication ------------------------ * Broadcasting a Python dictionary:: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = {'key1' : [7, 2.72, 2+3j], 'key2' : ( 'abc', 'xyz')} else: data = None data = comm.bcast(data, root=0) * Scattering Python objects:: from mpi4py import MPI comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() if rank == 0: data = [(i+1)**2 for i in range(size)] else: data = None data = comm.scatter(data, root=0) assert data == (rank+1)**2 * Gathering Python objects:: from mpi4py import MPI comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() data = (rank+1)**2 data = comm.gather(data, root=0) if rank == 0: for i in range(size): assert data[i] == (i+1)**2 else: assert data is None * Broadcasting a NumPy array:: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = np.arange(100, dtype='i') else: data = np.empty(100, dtype='i') comm.Bcast(data, root=0) for i in range(100): assert data[i] == i * Scattering NumPy arrays:: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() sendbuf = None if rank == 0: sendbuf = np.empty([size, 100], dtype='i') sendbuf.T[:,:] = range(size) recvbuf = np.empty(100, dtype='i') comm.Scatter(sendbuf, recvbuf, root=0) assert np.allclose(recvbuf, rank) * Gathering NumPy arrays:: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() sendbuf = np.zeros(100, dtype='i') + rank recvbuf = None if rank == 0: recvbuf = np.empty([size, 100], dtype='i') comm.Gather(sendbuf, recvbuf, root=0) if rank == 0: for i in range(size): assert np.allclose(recvbuf[i,:], i) * Parallel matrix-vector product:: from mpi4py import MPI import numpy def matvec(comm, A, x): m = A.shape[0] # local rows p = comm.Get_size() xg = numpy.zeros(m*p, dtype='d') comm.Allgather([x, MPI.DOUBLE], [xg, MPI.DOUBLE]) y = numpy.dot(A, xg) return y MPI-IO ------ * Collective I/O with NumPy arrays:: from mpi4py import MPI import numpy as np amode = MPI.MODE_WRONLY|MPI.MODE_CREATE comm = MPI.COMM_WORLD fh = MPI.File.Open(comm, "./datafile.contig", amode) buffer = np.empty(10, dtype=np.int) buffer[:] = comm.Get_rank() offset = comm.Get_rank()*buffer.nbytes fh.Write_at_all(offset, buffer) fh.Close() * Non-contiguous Collective I/O with NumPy arrays and datatypes:: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD rank = comm.Get_rank() size = comm.Get_size() amode = MPI.MODE_WRONLY|MPI.MODE_CREATE fh = MPI.File.Open(comm, "./datafile.noncontig", amode) item_count = 10 buffer = np.empty(item_count, dtype='i') buffer[:] = rank filetype = MPI.INT.Create_vector(item_count, 1, size) filetype.Commit() displacement = MPI.INT.Get_size()*rank fh.Set_view(displacement, filetype=filetype) fh.Write_all(buffer) filetype.Free() fh.Close() Dynamic Process Management -------------------------- * Compute Pi - Master (or parent, or client) side:: #!/usr/bin/env python from mpi4py import MPI import numpy import sys comm = MPI.COMM_SELF.Spawn(sys.executable, args=['cpi.py'], maxprocs=5) N = numpy.array(100, 'i') comm.Bcast([N, MPI.INT], root=MPI.ROOT) PI = numpy.array(0.0, 'd') comm.Reduce(None, [PI, MPI.DOUBLE], op=MPI.SUM, root=MPI.ROOT) print(PI) comm.Disconnect() * Compute Pi - Worker (or child, or server) side:: #!/usr/bin/env python from mpi4py import MPI import numpy comm = MPI.Comm.Get_parent() size = comm.Get_size() rank = comm.Get_rank() N = numpy.array(0, dtype='i') comm.Bcast([N, MPI.INT], root=0) h = 1.0 / N; s = 0.0 for i in range(rank, N, size): x = h * (i + 0.5) s += 4.0 / (1.0 + x**2) PI = numpy.array(s * h, dtype='d') comm.Reduce([PI, MPI.DOUBLE], None, op=MPI.SUM, root=0) comm.Disconnect() Wrapping with SWIG ------------------ * C source: .. sourcecode:: c /* file: helloworld.c */ void sayhello(MPI_Comm comm) { int size, rank; MPI_Comm_size(comm, &size); MPI_Comm_rank(comm, &rank); printf("Hello, World! " "I am process %d of %d.\n", rank, size); } * SWIG interface file: .. sourcecode:: c // file: helloworld.i %module helloworld %{ #include #include "helloworld.c" }% %include mpi4py/mpi4py.i %mpi4py_typemap(Comm, MPI_Comm); void sayhello(MPI_Comm comm); * Try it in the Python prompt:: >>> from mpi4py import MPI >>> import helloworld >>> helloworld.sayhello(MPI.COMM_WORLD) Hello, World! I am process 0 of 1. Wrapping with F2Py ------------------ * Fortran 90 source: .. sourcecode:: fortran ! file: helloworld.f90 subroutine sayhello(comm) use mpi implicit none integer :: comm, rank, size, ierr call MPI_Comm_size(comm, size, ierr) call MPI_Comm_rank(comm, rank, ierr) print *, 'Hello, World! I am process ',rank,' of ',size,'.' end subroutine sayhello * Compiling example using f2py :: $ f2py -c --f90exec=mpif90 helloworld.f90 -m helloworld * Try it in the Python prompt:: >>> from mpi4py import MPI >>> import helloworld >>> fcomm = MPI.COMM_WORLD.py2f() >>> helloworld.sayhello(fcomm) Hello, World! I am process 0 of 1. mpi4py-3.0.3/docs/usrman/_sources/mpi4py.futures.rst.txt0000664000175000017500000005233413477641753024374 0ustar dalcinldalcinl00000000000000mpi4py.futures ============== .. module:: mpi4py.futures :synopsis: Execute computations concurrently using MPI processes. .. versionadded:: 3.0.0 This package provides a high-level interface for asynchronously executing callables on a pool of worker processes using MPI for inter-process communication. concurrent.futures ------------------ The :mod:`mpi4py.futures` package is based on :mod:`concurrent.futures` from the Python standard library. More precisely, :mod:`mpi4py.futures` provides the :class:`MPIPoolExecutor` class as a concrete implementation of the abstract class :class:`~concurrent.futures.Executor`. The :meth:`~concurrent.futures.Executor.submit` interface schedules a callable to be executed asynchronously and returns a :class:`~concurrent.futures.Future` object representing the execution of the callable. :class:`~concurrent.futures.Future` instances can be queried for the call result or exception. Sets of :class:`~concurrent.futures.Future` instances can be passed to the :func:`~concurrent.futures.wait` and :func:`~concurrent.futures.as_completed` functions. .. note:: The :mod:`concurrent.futures` package was introduced in Python 3.2. A `backport `_ targeting Python 2.7 is available on `PyPI `_. The :mod:`mpi4py.futures` package uses :mod:`concurrent.futures` if available, either from the Python 3 standard library or the Python 2.7 backport if installed. Otherwise, :mod:`mpi4py.futures` uses a bundled copy of core functionality backported from Python 3.5 to work with Python 2.7. .. _futures-repo: https://github.com/agronholm/pythonfutures .. _futures-pypi: https://pypi.python.org/pypi/futures .. seealso:: Module :mod:`concurrent.futures` Documentation of the :mod:`concurrent.futures` standard module. MPIPoolExecutor --------------- The :class:`MPIPoolExecutor` class uses a pool of MPI processes to execute calls asynchronously. By performing computations in separate processes, it allows to side-step the :term:`Global Interpreter Lock` but also means that only picklable objects can be executed and returned. The ``__main__`` module must be importable by worker processes, thus :class:`MPIPoolExecutor` instances may not work in the interactive interpreter. :class:`MPIPoolExecutor` takes advantage of the dynamic process management features introduced in the MPI-2 standard. In particular, the :func:`MPI.Intracomm.Spawn` method of :func:`MPI.COMM_SELF` is used in the master (or parent) process to spawn new worker (or child) processes running a Python interpreter. The master process uses a separate thread (one for each :class:`MPIPoolExecutor` instance) to communicate back and forth with the workers. The worker processes serve the execution of tasks in the main (and only) thread until they are signaled for completion. .. note:: The worker processes must import the main script in order to *unpickle* any callable defined in the :mod:`__main__` module and submitted from the master process. Furthermore, the callables may need access to other global variables. At the worker processes,:mod:`mpi4py.futures` executes the main script code (using the :mod:`runpy` module) under the :mod:`__worker__` namespace to define the :mod:`__main__` module. The :mod:`__main__` and :mod:`__worker__` modules are added to :data:`sys.modules` (both at the master and worker processes) to ensure proper *pickling* and *unpickling*. .. warning:: During the initial import phase at the workers, the main script cannot create and use new :class:`MPIPoolExecutor` instances. Otherwise, each worker would attempt to spawn a new pool of workers, leading to infinite recursion. :mod:`mpi4py.futures` detects such recursive attempts to spawn new workers and aborts the MPI execution environment. As the main script code is run under the :mod:`__worker__` namespace, the easiest way to avoid spawn recursion is using the idiom :code:`if __name__ == '__main__': ...` in the main script. .. class:: MPIPoolExecutor(max_workers=None, **kwargs) An :class:`~concurrent.futures.Executor` subclass that executes calls asynchronously using a pool of at most *max_workers* processes. If *max_workers* is ``None`` or not given, its value is determined from the :envvar:`MPI4PY_MAX_WORKERS` environment variable if set, or the MPI universe size if set, otherwise a single worker process is spawned. If *max_workers* is lower than or equal to ``0``, then a :exc:`ValueError` will be raised. Other parameters: * *python_exe*: Path to the Python interpreter executable used to spawn worker processes, otherwise :data:`sys.executable` is used. * *python_args*: :class:`list` or iterable with additional command line flags to pass to the Python executable. Command line flags determined from inspection of :data:`sys.flags`, :data:`sys.warnoptions` and :data:`sys._xoptions` in are passed unconditionally. * *mpi_info*: :class:`dict` or iterable yielding ``(key, value)`` pairs. These ``(key, value)`` pairs are passed (through an :class:`MPI.Info` object) to the :meth:`MPI.Intracomm.Spawn` call used to spawn worker processes. This mechanism allows telling the MPI runtime system where and how to start the processes. Check the documentation of the backend MPI implementation about the set of keys it interprets and the corresponding format for values. * *globals*: :class:`dict` or iterable yielding ``(name, value)`` pairs to initialize the main module namespace in worker processes. * *main*: If set to ``False``, do not import the ``__main__`` module in worker processes. Setting *main* to ``False`` prevents worker processes from accessing definitions in the parent ``__main__`` namespace. * *path*: :class:`list` or iterable with paths to append to :data:`sys.path` in worker processes to extend the :ref:`module search path `. * *wdir*: Path to set the current working directory in worker processes using :func:`os.chdir()`. The initial working directory is set by the MPI implementation. Quality MPI implementations should honor a ``wdir`` info key passed through *mpi_info*, although such feature is not mandatory. * *env*: :class:`dict` or iterable yielding ``(name, value)`` pairs with environment variables to update :data:`os.environ` in worker processes. The initial environment is set by the MPI implementation. MPI implementations may allow setting the initial environment through *mpi_info*, however such feature is not required nor recommended by the MPI standard. .. method:: submit(func, *args, **kwargs) Schedule the callable, *func*, to be executed as ``func(*args, **kwargs)`` and returns a :class:`~concurrent.futures.Future` object representing the execution of the callable. :: executor = MPIPoolExecutor(max_workers=1) future = executor.submit(pow, 321, 1234) print(future.result()) .. method:: map(func, *iterables, timeout=None, chunksize=1, **kwargs) Equivalent to :func:`map(func, *iterables) ` except *func* is executed asynchronously and several calls to *func* may be made concurrently, out-of-order, in separate processes. The returned iterator raises a :exc:`~concurrent.futures.TimeoutError` if :meth:`~iterator.__next__` is called and the result isn't available after *timeout* seconds from the original call to :meth:`~MPIPoolExecutor.map`. *timeout* can be an int or a float. If *timeout* is not specified or ``None``, there is no limit to the wait time. If a call raises an exception, then that exception will be raised when its value is retrieved from the iterator. This method chops *iterables* into a number of chunks which it submits to the pool as separate tasks. The (approximate) size of these chunks can be specified by setting *chunksize* to a positive integer. For very long iterables, using a large value for *chunksize* can significantly improve performance compared to the default size of one. By default, the returned iterator yields results in-order, waiting for successive tasks to complete . This behavior can be changed by passing the keyword argument *unordered* as ``True``, then the result iterator will yield a result as soon as any of the tasks complete. :: executor = MPIPoolExecutor(max_workers=3) for result in executor.map(pow, [2]*32, range(32)): print(result) .. method:: starmap(func, iterable, timeout=None, chunksize=1, **kwargs) Equivalent to :func:`itertools.starmap(func, iterable) `. Used instead of :meth:`~MPIPoolExecutor.map` when argument parameters are already grouped in tuples from a single iterable (the data has been "pre-zipped"). :func:`map(func, *iterable) ` is equivalent to :func:`starmap(func, zip(*iterable)) `. :: executor = MPIPoolExecutor(max_workers=3) iterable = ((2, n) for n in range(32)) for result in executor.starmap(pow, iterable): print(result) .. method:: shutdown(wait=True) Signal the executor that it should free any resources that it is using when the currently pending futures are done executing. Calls to :meth:`~MPIPoolExecutor.submit` and :meth:`~MPIPoolExecutor.map` made after :meth:`~MPIPoolExecutor.shutdown` will raise :exc:`RuntimeError`. If *wait* is ``True`` then this method will not return until all the pending futures are done executing and the resources associated with the executor have been freed. If *wait* is ``False`` then this method will return immediately and the resources associated with the executor will be freed when all pending futures are done executing. Regardless of the value of *wait*, the entire Python program will not exit until all pending futures are done executing. You can avoid having to call this method explicitly if you use the :keyword:`with` statement, which will shutdown the executor instance (waiting as if :meth:`~MPIPoolExecutor.shutdown` were called with *wait* set to ``True``). :: import time with MPIPoolExecutor(max_workers=1) as executor: future = executor.submit(time.sleep, 2) assert future.done() .. method:: bootup(wait=True) Signal the executor that it should allocate eagerly any required resources (in particular, MPI worker processes). If *wait* is ``True``, then :meth:`~MPIPoolExecutor.bootup` will not return until the executor resources are ready to process submissions. Resources are automatically allocated in the first call to :meth:`~MPIPoolExecutor.submit`, thus calling :meth:`~MPIPoolExecutor.bootup` explicitly is seldom needed. .. note:: As the master process uses a separate thread to perform MPI communication with the workers, the backend MPI implementation should provide support for :const:`MPI.THREAD_MULTIPLE`. However, some popular MPI implementations do not support yet concurrent MPI calls from multiple threads. Additionally, users may decide to initialize MPI with a lower level of thread support. If the level of thread support in the backend MPI is less than :const:`MPI.THREAD_MULTIPLE`, :mod:`mpi4py.futures` will use a global lock to serialize MPI calls. If the level of thread support is less than :const:`MPI.THREAD_SERIALIZED`, :mod:`mpi4py.futures` will emit a :exc:`RuntimeWarning`. .. warning:: If the level of thread support in the backend MPI is less than :const:`MPI.THREAD_SERIALIZED` (i.e, it is either :const:`MPI.THREAD_SINGLE` or :const:`MPI.THREAD_FUNNELED`), in theory :mod:`mpi4py.futures` cannot be used. Rather than raising an exception, :mod:`mpi4py.futures` emits a warning and takes a "cross-fingers" attitude to continue execution in the hope that serializing MPI calls with a global lock will actually work. MPICommExecutor --------------- Legacy MPI-1 implementations (as well as some vendor MPI-2 implementations) do not support the dynamic process management features introduced in the MPI-2 standard. Additionally, job schedulers and batch systems in supercomputing facilities may pose additional complications to applications using the :c:func:`MPI_Comm_spawn` routine. With these issues in mind, :mod:`mpi4py.futures` supports an additonal, more traditional, SPMD-like usage pattern requiring MPI-1 calls only. Python applications are started the usual way, e.g., using the :program:`mpiexec` command. Python code should make a collective call to the :class:`MPICommExecutor` context manager to partition the set of MPI processes within a MPI communicator in one master processes and many workers processes. The master process gets access to an :class:`MPIPoolExecutor` instance to submit tasks. Meanwhile, the worker process follow a different execution path and team-up to execute the tasks submitted from the master. Besides alleviating the lack of dynamic process managment features in legacy MPI-1 or partial MPI-2 implementations, the :class:`MPICommExecutor` context manager may be useful in classic MPI-based Python applications willing to take advantage of the simple, task-based, master/worker approach available in the :mod:`mpi4py.futures` package. .. class:: MPICommExecutor(comm=None, root=0) Context manager for :class:`MPIPoolExecutor`. This context manager splits a MPI (intra)communicator *comm* (defaults to :const:`MPI.COMM_WORLD` if not provided or ``None``) in two disjoint sets: a single master process (with rank *root* in *comm*) and the remaining worker processes. These sets are then connected through an intercommunicator. The target of the :keyword:`with` statement is assigned either an :class:`MPIPoolExecutor` instance (at the master) or ``None`` (at the workers). :: from mpi4py import MPI from mpi4py.futures import MPICommExecutor with MPICommExecutor(MPI.COMM_WORLD, root=0) as executor: if executor is not None: future = executor.submit(abs, -42) assert future.result() == 42 answer = set(executor.map(abs, [-42, 42])) assert answer == {42} .. warning:: If :class:`MPICommExecutor` is passed a communicator of size one (e.g., :const:`MPI.COMM_SELF`), then the executor instace assigned to the target of the :keyword:`with` statement will execute all submitted tasks in a single worker thread, thus ensuring that task execution still progress asynchronously. However, the :term:`GIL` will prevent the main and worker threads from running concurrently in multicore processors. Moreover, the thread context switching may harm noticeably the performance of CPU-bound tasks. In case of I/O-bound tasks, the :term:`GIL` is not usually an issue, however, as a single worker thread is used, it progress one task at a time. We advice against using :class:`MPICommExecutor` with communicators of size one and suggest refactoring your code to use instead a :class:`~concurrent.futures.ThreadPoolExecutor`. Command line ------------ Recalling the issues related to the lack of support for dynamic process managment features in MPI implementations, :mod:`mpi4py.futures` supports an alternative usage pattern where Python code (either from scripts, modules, or zip files) is run under command line control of the :mod:`mpi4py.futures` package by passing :samp:`-m mpi4py.futures` to the :program:`python` executable. The ``mpi4py.futures`` invocation should be passed a *pyfile* path to a script (or a zipfile/directory containing a :file:`__main__.py` file). Additionally, ``mpi4py.futures`` accepts :samp:`-m {mod}` to execute a module named *mod*, :samp:`-c {cmd}` to execute a command string *cmd*, or even :samp:`-` to read commands from standard input (:data:`sys.stdin`). Summarizing, :samp:`mpi4py.futures` can be invoked in the following ways: * :samp:`$ mpiexec -n {numprocs} python -m mpi4py.futures {pyfile} [arg] ...` * :samp:`$ mpiexec -n {numprocs} python -m mpi4py.futures -m {mod} [arg] ...` * :samp:`$ mpiexec -n {numprocs} python -m mpi4py.futures -c {cmd} [arg] ...` * :samp:`$ mpiexec -n {numprocs} python -m mpi4py.futures - [arg] ...` Before starting the main script execution, :mod:`mpi4py.futures` splits :const:`MPI.COMM_WORLD` in one master (the process with rank 0 in :const:`MPI.COMM_WORLD`) and 16 workers and connect them through an MPI intercommunicator. Afterwards, the master process proceeds with the execution of the user script code, which eventually creates :class:`MPIPoolExecutor` instances to submit tasks. Meanwhile, the worker processes follow a different execution path to serve the master. Upon successful termination of the main script at the master, the entire MPI execution environment exists gracefully. In case of any unhandled exception in the main script, the master process calls :code:`MPI.COMM_WORLD.Abort(1)` to prevent deadlocks and force termination of entire MPI execution environment. .. warning:: Running scripts under command line control of :mod:`mpi4py.futures` is quite similar to executing a single-process application that spawn additional workers as required. However, there is a very important difference users should be aware of. All :class:`~MPIPoolExecutor` instances created at the master will share the pool of workers. Tasks submitted at the master from many different executors will be scheduled for execution in random order as soon as a worker is idle. Any executor can easily starve all the workers (e.g., by calling :func:`MPIPoolExecutor.map` with long iterables). If that ever happens, submissions from other executors will not be serviced until free workers are available. .. seealso:: :ref:`python:using-on-cmdline` Documentation on Python command line interface. Examples -------- The following :file:`julia.py` script computes the `Julia set`_ and dumps an image to disk in binary `PGM`_ format. The code starts by importing :class:`MPIPoolExecutor` from the :mod:`mpi4py.futures` package. Next, some global constants and functions implement the computation of the Julia set. The computations are protected with the standard :code:`if __name__ == '__main__': ...` idiom. The image is computed by whole scanlines submitting all these tasks at once using the :class:`~MPIPoolExecutor.map` method. The result iterator yields scanlines in-order as the tasks complete. Finally, each scanline is dumped to disk. .. _`Julia set`: https://en.wikipedia.org/wiki/Julia_set .. _`PGM`: http://netpbm.sourceforge.net/doc/pgm.html .. code-block:: python :name: julia-py :caption: :file:`julia.py` :emphasize-lines: 1,26,28,29 :linenos: from mpi4py.futures import MPIPoolExecutor x0, x1, w = -2.0, +2.0, 640*2 y0, y1, h = -1.5, +1.5, 480*2 dx = (x1 - x0) / w dy = (y1 - y0) / h c = complex(0, 0.65) def julia(x, y): z = complex(x, y) n = 255 while abs(z) < 3 and n > 1: z = z**2 + c n -= 1 return n def julia_line(k): line = bytearray(w) y = y1 - k * dy for j in range(w): x = x0 + j * dx line[j] = julia(x, y) return line if __name__ == '__main__': with MPIPoolExecutor() as executor: image = executor.map(julia_line, range(h)) with open('julia.pgm', 'wb') as f: f.write(b'P5 %d %d %d\n' % (w, h, 255)) for line in image: f.write(line) The recommended way to execute the script is using the :program:`mpiexec` command specifying one MPI process and (optional but recommended) the desired MPI universe size [#]_. :: $ mpiexec -n 1 -usize 17 python julia.py The :program:`mpiexec` command launches a single MPI process (the master) running the Python interpreter and executing the main script. When required, :mod:`mpi4py.futures` spawns 16 additional MPI processes (the children) to dynamically allocate the pool of workers. The master submits tasks to the children and waits for the results. The children receive incoming tasks, execute them, and send back the results to the master. Alternatively, users may decide to execute the script in a more traditional way, that is, all the MPI process are started at once. The user script is run under command line control of :mod:`mpi4py.futures` passing the :ref:`-m ` flag to the :program:`python` executable. :: $ mpiexec -n 17 python -m mpi4py.futures julia.py As explained previously, the 17 processes are partitioned in one master and 16 workers. The master process executes the main script while the workers execute the tasks submitted from the master. .. [#] This :program:`mpiexec` invocation example using the ``-usize`` flag (alternatively, setting the :envvar:`MPIEXEC_UNIVERSE_SIZE` environment variable) assumes the backend MPI implementation is an MPICH derivative using the Hydra process manager. In the Open MPI implementation, the MPI universe size can be specified by setting the :envvar:`OMPI_UNIVERSE_SIZE` environment variable to a positive integer. Check the documentation of your actual MPI implementation and/or batch system for the ways to specify the desired MPI universe size. .. Local variables: .. fill-column: 79 .. End: mpi4py-3.0.3/docs/usrman/_sources/intro.rst.txt0000664000175000017500000002311313200562156022561 0ustar dalcinldalcinl00000000000000Introduction ============ Over the last years, high performance computing has become an affordable resource to many more researchers in the scientific community than ever before. The conjunction of quality open source software and commodity hardware strongly influenced the now widespread popularity of Beowulf_ class clusters and cluster of workstations. Among many parallel computational models, message-passing has proven to be an effective one. This paradigm is specially suited for (but not limited to) distributed memory architectures and is used in today's most demanding scientific and engineering application related to modeling, simulation, design, and signal processing. However, portable message-passing parallel programming used to be a nightmare in the past because of the many incompatible options developers were faced to. Fortunately, this situation definitely changed after the MPI Forum released its standard specification. High performance computing is traditionally associated with software development using compiled languages. However, in typical applications programs, only a small part of the code is time-critical enough to require the efficiency of compiled languages. The rest of the code is generally related to memory management, error handling, input/output, and user interaction, and those are usually the most error prone and time-consuming lines of code to write and debug in the whole development process. Interpreted high-level languages can be really advantageous for this kind of tasks. For implementing general-purpose numerical computations, MATLAB [#]_ is the dominant interpreted programming language. In the open source side, Octave and Scilab are well known, freely distributed software packages providing compatibility with the MATLAB language. In this work, we present MPI for Python, a new package enabling applications to exploit multiple processors using standard MPI "look and feel" in Python scripts. .. [#] MATLAB is a registered trademark of The MathWorks, Inc. What is MPI? ------------ MPI_, [mpi-using]_ [mpi-ref]_ the *Message Passing Interface*, is a standardized and portable message-passing system designed to function on a wide variety of parallel computers. The standard defines the syntax and semantics of library routines and allows users to write portable programs in the main scientific programming languages (Fortran, C, or C++). Since its release, the MPI specification [mpi-std1]_ [mpi-std2]_ has become the leading standard for message-passing libraries for parallel computers. Implementations are available from vendors of high-performance computers and from well known open source projects like MPICH_ [mpi-mpich]_ and `Open MPI`_ [mpi-openmpi]_. What is Python? --------------- Python_ is a modern, easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming with dynamic typing and dynamic binding. It supports modules and packages, which encourages program modularity and code reuse. Python's elegant syntax, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed. It is easily extended with new functions and data types implemented in C or C++. Python is also suitable as an extension language for customizable applications. Python is an ideal candidate for writing the higher-level parts of large-scale scientific applications [Hinsen97]_ and driving simulations in parallel architectures [Beazley97]_ like clusters of PC's or SMP's. Python codes are quickly developed, easily maintained, and can achieve a high degree of integration with other libraries written in compiled languages. Related Projects ---------------- As this work started and evolved, some ideas were borrowed from well known MPI and Python related open source projects from the Internet. * `OOMPI`_ + It has not relation with Python, but is an excellent object oriented approach to MPI. + It is a C++ class library specification layered on top of the C bindings that encapsulates MPI into a functional class hierarchy. + It provides a flexible and intuitive interface by adding some abstractions, like *Ports* and *Messages*, which enrich and simplify the syntax. * `Pypar`_ + Its interface is rather minimal. There is no support for communicators or process topologies. + It does not require the Python interpreter to be modified or recompiled, but does not permit interactive parallel runs. + General (*picklable*) Python objects of any type can be communicated. There is good support for numeric arrays, practically full MPI bandwidth can be achieved. * `pyMPI`_ + It rebuilds the Python interpreter providing a built-in module for message passing. It does permit interactive parallel runs, which are useful for learning and debugging. + It provides an interface suitable for basic parallel programing. There is not full support for defining new communicators or process topologies. + General (picklable) Python objects can be messaged between processors. There is not support for numeric arrays. * `Scientific Python`_ + It provides a collection of Python modules that are useful for scientific computing. + There is an interface to MPI and BSP (*Bulk Synchronous Parallel programming*). + The interface is simple but incomplete and does not resemble the MPI specification. There is support for numeric arrays. Additionally, we would like to mention some available tools for scientific computing and software development with Python. + `NumPy`_ is a package that provides array manipulation and computational capabilities similar to those found in IDL, MATLAB, or Octave. Using NumPy, it is possible to write many efficient numerical data processing applications directly in Python without using any C, C++ or Fortran code. + `SciPy`_ is an open source library of scientific tools for Python, gathering a variety of high level science and engineering modules together as a single package. It includes modules for graphics and plotting, optimization, integration, special functions, signal and image processing, genetic algorithms, ODE solvers, and others. + `Cython`_ is a language that makes writing C extensions for the Python language as easy as Python itself. The Cython language is very close to the Python language, but Cython additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code. This makes Cython the ideal language for wrapping for external C libraries, and for fast C modules that speed up the execution of Python code. + `SWIG`_ is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages like Perl, Tcl/Tk, Ruby and Python. Issuing header files to SWIG is the simplest approach to interfacing C/C++ libraries from a Python module. .. External Links .. .............. .. _MPI: http://mpi-forum.org/ .. _MPICH: https://www.mpich.org/ .. _Open MPI: https://www.open-mpi.org/ .. _Beowulf: http://www.beowulf.org/ .. _Python: https://www.python.org/ .. _NumPy: http://www.numpy.org/ .. _SciPy: https://www.scipy.org/ .. _Cython: http://cython.org/ .. _SWIG: http://www.swig.org/ .. _OOMPI: http://www.osl.iu.edu/research/oompi/overview.php .. _Pypar: https://github.com/daleroberts/pypar .. _pyMPI: https://sourceforge.net/projects/pympi/ .. _Scientific Python: http://dirac.cnrs-orleans.fr/plone/software/scientificpython/ .. References .. .......... .. [mpi-std1] MPI Forum. MPI: A Message Passing Interface Standard. International Journal of Supercomputer Applications, volume 8, number 3-4, pages 159-416, 1994. .. [mpi-std2] MPI Forum. MPI: A Message Passing Interface Standard. High Performance Computing Applications, volume 12, number 1-2, pages 1-299, 1998. .. [mpi-using] William Gropp, Ewing Lusk, and Anthony Skjellum. Using MPI: portable parallel programming with the message-passing interface. MIT Press, 1994. .. [mpi-ref] Mark Snir, Steve Otto, Steven Huss-Lederman, David Walker, and Jack Dongarra. MPI - The Complete Reference, volume 1, The MPI Core. MIT Press, 2nd. edition, 1998. .. [mpi-mpich] W. Gropp, E. Lusk, N. Doss, and A. Skjellum. A high-performance, portable implementation of the MPI message passing interface standard. Parallel Computing, 22(6):789-828, September 1996. .. [mpi-openmpi] Edgar Gabriel, Graham E. Fagg, George Bosilca, Thara Angskun, Jack J. Dongarra, Jeffrey M. Squyres, Vishal Sahay, Prabhanjan Kambadur, Brian Barrett, Andrew Lumsdaine, Ralph H. Castain, David J. Daniel, Richard L. Graham, and Timothy S. Woodall. Open MPI: Goals, Concept, and Design of a Next Generation MPI Implementation. In Proceedings, 11th European PVM/MPI Users' Group Meeting, Budapest, Hungary, September 2004. .. [Hinsen97] Konrad Hinsen. The Molecular Modelling Toolkit: a case study of a large scientific application in Python. In Proceedings of the 6th International Python Conference, pages 29-35, San Jose, Ca., October 1997. .. [Beazley97] David M. Beazley and Peter S. Lomdahl. Feeding a large-scale physics application to Python. In Proceedings of the 6th International Python Conference, pages 21-29, San Jose, Ca., October 1997. mpi4py-3.0.3/docs/usrman/_sources/manual.rst.txt0000664000175000017500000000012312523721016022676 0ustar dalcinldalcinl00000000000000MPI for Python ============== .. include:: abstract.txt .. include:: toctree.txt mpi4py-3.0.3/docs/usrman/_sources/install.rst.txt0000664000175000017500000001326313200562156023101 0ustar dalcinldalcinl00000000000000Installation ============ Requirements ------------ You need to have the following software properly installed in order to build *MPI for Python*: * A working MPI implementation, preferably supporting MPI-3 and built with shared/dynamic libraries. .. note:: If you want to build some MPI implementation from sources, check the instructions at :ref:`building-mpi` in the appendix. * Python 2.7, 3.3 or above. .. note:: Some MPI-1 implementations **do require** the actual command line arguments to be passed in :c:func:`MPI_Init()`. In this case, you will need to use a rebuilt, MPI-enabled, Python interpreter executable. *MPI for Python* has some support for alleviating you from this task. Check the instructions at :ref:`python-mpi` in the appendix. Using **pip** or **easy_install** --------------------------------- If you already have a working MPI (either if you installed it from sources or by using a pre-built package from your favourite GNU/Linux distribution) and the :program:`mpicc` compiler wrapper is on your search path, you can use :program:`pip`:: $ [sudo] pip install mpi4py or alternatively *setuptools* :program:`easy_install` (deprecated):: $ [sudo] easy_install mpi4py .. note:: If the :program:`mpicc` compiler wrapper is not on your search path (or if it has a different name) you can use :program:`env` to pass the environment variable :envvar:`MPICC` providing the full path to the MPI compiler wrapper executable:: $ [sudo] env MPICC=/path/to/mpicc pip install mpi4py $ [sudo] env MPICC=/path/to/mpicc easy_install mpi4py Using **distutils** ------------------- The *MPI for Python* package is available for download at the project website generously hosted by Bitbucket. You can use :program:`curl` or :program:`wget` to get a release tarball. * Using :program:`curl`:: $ curl -O https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-X.Y.tar.gz * Using :program:`wget`:: $ wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-X.Y.tar.gz After unpacking the release tarball:: $ tar -zxf mpi4py-X.Y.tar.gz $ cd mpi4py-X.Y the package is ready for building. *MPI for Python* uses a standard distutils-based build system. However, some distutils commands (like *build*) have additional options: .. cmdoption:: --mpicc= Lets you specify a special location or name for the :program:`mpicc` compiler wrapper. .. cmdoption:: --mpi= Lets you pass a section with MPI configuration within a special configuration file. .. cmdoption:: --configure Runs exhaustive tests for checking about missing MPI types, constants, and functions. This option should be passed in order to build *MPI for Python* against old MPI-1 or MPI-2 implementations, possibly providing a subset of MPI-3. If you use a MPI implementation providing a :program:`mpicc` compiler wrapper (e.g., MPICH, Open MPI), it will be used for compilation and linking. This is the preferred and easiest way of building *MPI for Python*. If :program:`mpicc` is located somewhere in your search path, simply run the *build* command:: $ python setup.py build If :program:`mpicc` is not in your search path or the compiler wrapper has a different name, you can run the *build* command specifying its location:: $ python setup.py build --mpicc=/where/you/have/mpicc Alternatively, you can provide all the relevant information about your MPI implementation by editing the file called :file:`mpi.cfg`. You can use the default section ``[mpi]`` or add a new, custom section, for example ``[other_mpi]`` (see the examples provided in the :file:`mpi.cfg` file as a starting point to write your own section):: [mpi] include_dirs = /usr/local/mpi/include libraries = mpi library_dirs = /usr/local/mpi/lib runtime_library_dirs = /usr/local/mpi/lib [other_mpi] include_dirs = /opt/mpi/include ... libraries = mpi ... library_dirs = /opt/mpi/lib ... runtime_library_dirs = /op/mpi/lib ... ... and then run the *build* command, perhaps specifying you custom configuration section:: $ python setup.py build --mpi=other_mpi After building, the package is ready for install. If you have root privileges (either by log-in as the root user of by using :command:`sudo`) and you want to install *MPI for Python* in your system for all users, just do:: $ python setup.py install The previous steps will install the :mod:`mpi4py` package at standard location :file:`{prefix}/lib/python{X}.{X}/site-packages`. If you do not have root privileges or you want to install *MPI for Python* for your private use, just do:: $ python setup.py install --user Testing ------- To quickly test the installation:: $ mpiexec -n 5 python -m mpi4py.bench helloworld Hello, World! I am process 0 of 5 on localhost. Hello, World! I am process 1 of 5 on localhost. Hello, World! I am process 2 of 5 on localhost. Hello, World! I am process 3 of 5 on localhost. Hello, World! I am process 4 of 5 on localhost. If you installed from source, issuing at the command line:: $ mpiexec -n 5 python demo/helloworld.py or (in the case of ancient MPI-1 implementations):: $ mpirun -np 5 python `pwd`/demo/helloworld.py will launch a five-process run of the Python interpreter and run the test script :file:`demo/helloworld.py` from the source distribution. You can also run all the *unittest* scripts:: $ mpiexec -n 5 python test/runtests.py or, if you have nose_ unit testing framework installed:: $ mpiexec -n 5 nosetests -w test .. _nose: http://nose.readthedocs.io/ or, if you have `py.test`_ unit testing framework installed:: $ mpiexec -n 5 py.test test/ .. _py.test: http://docs.pytest.org/ mpi4py-3.0.3/docs/usrman/_sources/index.rst.txt0000664000175000017500000000054013200562156022534 0ustar dalcinldalcinl00000000000000MPI for Python ============== :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com :Web Site: https://bitbucket.org/mpi4py/mpi4py :Date: |today| .. include:: abstract.txt Contents ======== .. include:: toctree.txt .. Indices and tables .. ================== .. .. * :ref:`genindex` .. * :ref:`modindex` .. * :ref:`search` mpi4py-3.0.3/docs/usrman/_sources/mpi4py.run.rst.txt0000664000175000017500000001054213444376256023473 0ustar dalcinldalcinl00000000000000mpi4py.run ========== .. module:: mpi4py.run :synopsis: Run Python code using ``-m mpi4py``. .. versionadded:: 3.0.0 At import time, :mod:`mpi4py` initializes the MPI execution environment calling :c:func:`MPI_Init_thread` and installs an exit hook to automatically call :c:func:`MPI_Finalize` just before the Python process terminates. Additionally, :mod:`mpi4py` overrides the default :const:`MPI.ERRORS_ARE_FATAL` error handler in favor of :const:`MPI.ERRORS_RETURN`, which allows translating MPI errors in Python exceptions. These departures from standard MPI behavior may be controversial, but are quite convenient within the highly dynamic Python programming environment. Third-party code using :mod:`mpi4py` can just ``from mpi4py import MPI`` and perform MPI calls without the tedious initialization/finalization handling. MPI errors, once translated automatically to Python exceptions, can be dealt with the common :keyword:`try`...\ :keyword:`except`...\ :keyword:`finally` clauses; unhandled MPI exceptions will print a traceback which helps in locating problems in source code. Unfortunately, the interplay of automatic MPI finalization and unhandled exceptions may lead to deadlocks. In unattended runs, these deadlocks will drain the battery of your laptop, or burn precious allocation hours in your supercomputing facility. Consider the following snippet of Python code. Assume this code is stored in a standard Python script file and run with :command:`mpiexec` in two or more processes. :: from mpi4py import MPI assert MPI.COMM_WORLD.Get_size() > 1 rank = MPI.COMM_WORLD.Get_rank() if rank == 0: 1/0 MPI.COMM_WORLD.send(None, dest=1, tag=42) elif rank == 1: MPI.COMM_WORLD.recv(source=0, tag=42) Process 0 raises :exc:`ZeroDivisionError` exception before performing a send call to process 1. As the exception is not handled, the Python interpreter running in process 0 will proceed to exit with non-zero status. However, as :mod:`mpi4py` installed a finalizer hook to call :c:func:`MPI_Finalize` before exit, process 0 will block waiting for other processes to also enter the :c:func:`MPI_Finalize` call. Meanwhile, process 1 will block waiting for a message to arrive from process 0, thus never reaching to :c:func:`MPI_Finalize`. The whole MPI execution environment is irremediably in a deadlock state. To alleviate this issue, :mod:`mpi4py` offers a simple, alternative command line execution mechanism based on using the :ref:`-m ` flag and implemented with the :mod:`runpy` module. To use this features, Python code should be run passing ``-m mpi4py`` in the command line invoking the Python interpreter. In case of unhandled exceptions, the finalizer hook will call :c:func:`MPI_Abort` on the :c:data:`MPI_COMM_WORLD` communicator, thus effectively aborting the MPI execution environment. .. warning:: When a process is forced to abort, resources (e.g. open files) are not cleaned-up and any registered finalizers (either with the :mod:`atexit` module, the Python C/API function :c:func:`Py_AtExit()`, or even the C standard library function :c:func:`atexit`) will not be executed. Thus, aborting execution is an extremely impolite way of ensuring process termination. However, MPI provides no other mechanism to recover from a deadlock state. Interface options ----------------- The use of ``-m mpi4py`` to execute Python code on the command line resembles that of the Python interpreter. * :samp:`mpiexec -n {numprocs} python -m mpi4py {pyfile} [arg] ...` * :samp:`mpiexec -n {numprocs} python -m mpi4py -m {mod} [arg] ...` * :samp:`mpiexec -n {numprocs} python -m mpi4py -c {cmd} [arg] ...` * :samp:`mpiexec -n {numprocs} python -m mpi4py - [arg] ...` .. describe:: Execute the Python code contained in *pyfile*, which must be a filesystem path referring to either a Python file, a directory containing a :file:`__main__.py` file, or a zipfile containing a :file:`__main__.py` file. .. cmdoption:: -m Search :data:`sys.path` for the named module *mod* and execute its contents. .. cmdoption:: -c Execute the Python code in the *cmd* string command. .. describe:: - Read commands from standard input (:data:`sys.stdin`). .. seealso:: :ref:`python:using-on-cmdline` Documentation on Python command line interface. .. Local variables: .. fill-column: 79 .. End: mpi4py-3.0.3/docs/usrman/_sources/overview.rst.txt0000664000175000017500000005232613200562156023304 0ustar dalcinldalcinl00000000000000Overview ======== MPI for Python provides an object oriented approach to message passing which grounds on the standard MPI-2 C++ bindings. The interface was designed with focus in translating MPI syntax and semantics of standard MPI-2 bindings for C++ to Python. Any user of the standard C/C++ MPI bindings should be able to use this module without need of learning a new interface. Communicating Python Objects and Array Data ------------------------------------------- The Python standard library supports different mechanisms for data persistence. Many of them rely on disk storage, but *pickling* and *marshaling* can also work with memory buffers. The :mod:`pickle` modules provide user-extensible facilities to serialize general Python objects using ASCII or binary formats. The :mod:`marshal` module provides facilities to serialize built-in Python objects using a binary format specific to Python, but independent of machine architecture issues. *MPI for Python* can communicate any built-in or user-defined Python object taking advantage of the features provided by the :mod:`pickle` module. These facilities will be routinely used to build binary representations of objects to communicate (at sending processes), and restoring them back (at receiving processes). Although simple and general, the serialization approach (i.e., *pickling* and *unpickling*) previously discussed imposes important overheads in memory as well as processor usage, especially in the scenario of objects with large memory footprints being communicated. Pickling general Python objects, ranging from primitive or container built-in types to user-defined classes, necessarily requires computer resources. Processing is also needed for dispatching the appropriate serialization method (that depends on the type of the object) and doing the actual packing. Additional memory is always needed, and if its total amount is not known *a priori*, many reallocations can occur. Indeed, in the case of large numeric arrays, this is certainly unacceptable and precludes communication of objects occupying half or more of the available memory resources. *MPI for Python* supports direct communication of any object exporting the single-segment buffer interface. This interface is a standard Python mechanism provided by some types (e.g., strings and numeric arrays), allowing access in the C side to a contiguous memory buffer (i.e., address and length) containing the relevant data. This feature, in conjunction with the capability of constructing user-defined MPI datatypes describing complicated memory layouts, enables the implementation of many algorithms involving multidimensional numeric arrays (e.g., image processing, fast Fourier transforms, finite difference schemes on structured Cartesian grids) directly in Python, with negligible overhead, and almost as fast as compiled Fortran, C, or C++ codes. Communicators ------------- In *MPI for Python*, :class:`MPI.Comm` is the base class of communicators. The :class:`MPI.Intracomm` and :class:`MPI.Intercomm` classes are sublcasses of the :class:`MPI.Comm` class. The :meth:`MPI.Comm.Is_inter` method (and :meth:`MPI.Comm.Is_intra`, provided for convenience but not part of the MPI specification) is defined for communicator objects and can be used to determine the particular communicator class. The two predefined intracommunicator instances are available: :const:`MPI.COMM_SELF` and :const:`MPI.COMM_WORLD`. From them, new communicators can be created as needed. The number of processes in a communicator and the calling process rank can be respectively obtained with methods :meth:`MPI.Comm.Get_size` and :meth:`MPI.Comm.Get_rank`. The associated process group can be retrieved from a communicator by calling the :meth:`MPI.Comm.Get_group` method, which returns an instance of the :class:`MPI.Group` class. Set operations with :class:`MPI.Group` objects like like :meth:`MPI.Group.Union`, :meth:`MPI.Group.Intersect` and :meth:`MPI.Group.Difference` are fully supported, as well as the creation of new communicators from these groups using :meth:`MPI.Comm.Create` and :meth:`MPI.Comm.Create_group`. New communicator instances can be obtained with the :meth:`MPI.Comm.Clone`, :meth:`MPI.Comm.Dup` and :meth:`MPI.Comm.Split` methods, as well methods :meth:`MPI.Intracomm.Create_intercomm` and :meth:`MPI.Intercomm.Merge`. Virtual topologies (:class:`MPI.Cartcomm`, :class:`MPI.Graphcomm` and :class:`MPI.Distgraphcomm` classes, which are specializations of the :class:`MPI.Intracomm` class) are fully supported. New instances can be obtained from intracommunicator instances with factory methods :meth:`MPI.Intracomm.Create_cart` and :meth:`MPI.Intracomm.Create_graph`. Point-to-Point Communications ----------------------------- Point to point communication is a fundamental capability of message passing systems. This mechanism enables the transmission of data between a pair of processes, one side sending, the other receiving. MPI provides a set of *send* and *receive* functions allowing the communication of *typed* data with an associated *tag*. The type information enables the conversion of data representation from one architecture to another in the case of heterogeneous computing environments; additionally, it allows the representation of non-contiguous data layouts and user-defined datatypes, thus avoiding the overhead of (otherwise unavoidable) packing/unpacking operations. The tag information allows selectivity of messages at the receiving end. Blocking Communications ^^^^^^^^^^^^^^^^^^^^^^^ MPI provides basic send and receive functions that are *blocking*. These functions block the caller until the data buffers involved in the communication can be safely reused by the application program. In *MPI for Python*, the :meth:`MPI.Comm.Send`, :meth:`MPI.Comm.Recv` and :meth:`MPI.Comm.Sendrecv` methods of communicator objects provide support for blocking point-to-point communications within :class:`MPI.Intracomm` and :class:`MPI.Intercomm` instances. These methods can communicate memory buffers. The variants :meth:`MPI.Comm.send`, :meth:`MPI.Comm.recv` and :meth:`MPI.Comm.sendrecv` can communicate general Python objects. Nonblocking Communications ^^^^^^^^^^^^^^^^^^^^^^^^^^ On many systems, performance can be significantly increased by overlapping communication and computation. This is particularly true on systems where communication can be executed autonomously by an intelligent, dedicated communication controller. MPI provides *nonblocking* send and receive functions. They allow the possible overlap of communication and computation. Non-blocking communication always come in two parts: posting functions, which begin the requested operation; and test-for-completion functions, which allow to discover whether the requested operation has completed. In *MPI for Python*, the :meth:`MPI.Comm.Isend` and :meth:`MPI.Comm.Irecv` methods initiate send and receive operations, respectively. These methods return a :class:`MPI.Request` instance, uniquely identifying the started operation. Its completion can be managed using the :meth:`MPI.Request.Test`, :meth:`MPI.Request.Wait` and :meth:`MPI.Request.Cancel` methods. The management of :class:`MPI.Request` objects and associated memory buffers involved in communication requires a careful, rather low-level coordination. Users must ensure that objects exposing their memory buffers are not accessed at the Python level while they are involved in nonblocking message-passing operations. Persistent Communications ^^^^^^^^^^^^^^^^^^^^^^^^^ Often a communication with the same argument list is repeatedly executed within an inner loop. In such cases, communication can be further optimized by using persistent communication, a particular case of nonblocking communication allowing the reduction of the overhead between processes and communication controllers. Furthermore , this kind of optimization can also alleviate the extra call overheads associated to interpreted, dynamic languages like Python. In *MPI for Python*, the :meth:`MPI.Comm.Send_init` and :meth:`MPI.Comm.Recv_init` methods create persistent requests for a send and receive operation, respectively. These methods return an instance of the :class:`MPI.Prequest` class, a subclass of the :class:`MPI.Request` class. The actual communication can be effectively started using the :meth:`MPI.Prequest.Start` method, and its completion can be managed as previously described. Collective Communications -------------------------- Collective communications allow the transmittal of data between multiple processes of a group simultaneously. The syntax and semantics of collective functions is consistent with point-to-point communication. Collective functions communicate *typed* data, but messages are not paired with an associated *tag*; selectivity of messages is implied in the calling order. Additionally, collective functions come in blocking versions only. The more commonly used collective communication operations are the following. * Barrier synchronization across all group members. * Global communication functions + Broadcast data from one member to all members of a group. + Gather data from all members to one member of a group. + Scatter data from one member to all members of a group. * Global reduction operations such as sum, maximum, minimum, etc. In *MPI for Python*, the :meth:`MPI.Comm.Bcast`, :meth:`MPI.Comm.Scatter`, :meth:`MPI.Comm.Gather`, :meth:`MPI.Comm.Allgather`, and :meth:`MPI.Comm.Alltoall` :meth:`MPI.Comm.Alltoallw` methods provide support for collective communications of memory buffers. The lower-case variants :meth:`MPI.Comm.bcast`, :meth:`MPI.Comm.scatter`, :meth:`MPI.Comm.gather`, :meth:`MPI.Comm.allgather` and :meth:`MPI.Comm.alltoall` can communicate general Python objects. The vector variants (which can communicate different amounts of data to each process) :meth:`MPI.Comm.Scatterv`, :meth:`MPI.Comm.Gatherv`, :meth:`MPI.Comm.Allgatherv`, :meth:`MPI.Comm.Alltoallv` and :meth:`MPI.Comm.Alltoallw` are also supported, they can only communicate objects exposing memory buffers. Global reduction operations on memory buffers are accessible through the :meth:`MPI.Comm.Reduce`, `MPI.Comm.Reduce_scatter`, :meth:`MPI.Comm.Allreduce`, :meth:`MPI.Intracomm.Scan` and :meth:`MPI.Intracomm.Exscan` methods. The lower-case variants :meth:`MPI.Comm.reduce`, :meth:`MPI.Comm.allreduce`, :meth:`MPI.Intracomm.scan` and :meth:`MPI.Intracomm.exscan` can communicate general Python objects; however, the actual required reduction computations are performed sequentially at some process. All the predefined (i.e., :const:`MPI.SUM`, :const:`MPI.PROD`, :const:`MPI.MAX`, etc.) reduction operations can be applied. Dynamic Process Management -------------------------- In the context of the MPI-1 specification, a parallel application is static; that is, no processes can be added to or deleted from a running application after it has been started. Fortunately, this limitation was addressed in MPI-2. The new specification added a process management model providing a basic interface between an application and external resources and process managers. This MPI-2 extension can be really useful, especially for sequential applications built on top of parallel modules, or parallel applications with a client/server model. The MPI-2 process model provides a mechanism to create new processes and establish communication between them and the existing MPI application. It also provides mechanisms to establish communication between two existing MPI applications, even when one did not *start* the other. In *MPI for Python*, new independent process groups can be created by calling the :meth:`MPI.Intracomm.Spawn` method within an intracommunicator. This call returns a new intercommunicator (i.e., an :class:`MPI.Intercomm` instance) at the parent process group. The child process group can retrieve the matching intercommunicator by calling the :meth:`MPI.Comm.Get_parent` class method. At each side, the new intercommunicator can be used to perform point to point and collective communications between the parent and child groups of processes. Alternatively, disjoint groups of processes can establish communication using a client/server approach. Any server application must first call the :func:`MPI.Open_port` function to open a *port* and the :func:`MPI.Publish_name` function to publish a provided *service*, and next call the :meth:`MPI.Intracomm.Accept` method. Any client applications can first find a published *service* by calling the :func:`MPI.Lookup_name` function, which returns the *port* where a server can be contacted; and next call the :meth:`MPI.Intracomm.Connect` method. Both :meth:`MPI.Intracomm.Accept` and :meth:`MPI.Intracomm.Connect` methods return an :class:`MPI.Intercomm` instance. When connection between client/server processes is no longer needed, all of them must cooperatively call the :meth:`MPI.Comm.Disconnect` method. Additionally, server applications should release resources by calling the :func:`MPI.Unpublish_name` and :func:`MPI.Close_port` functions. One-Sided Communications ------------------------ One-sided communications (also called *Remote Memory Access*, *RMA*) supplements the traditional two-sided, send/receive based MPI communication model with a one-sided, put/get based interface. One-sided communication that can take advantage of the capabilities of highly specialized network hardware. Additionally, this extension lowers latency and software overhead in applications written using a shared-memory-like paradigm. The MPI specification revolves around the use of objects called *windows*; they intuitively specify regions of a process's memory that have been made available for remote read and write operations. The published memory blocks can be accessed through three functions for put (remote send), get (remote write), and accumulate (remote update or reduction) data items. A much larger number of functions support different synchronization styles; the semantics of these synchronization operations are fairly complex. In *MPI for Python*, one-sided operations are available by using instances of the :class:`MPI.Win` class. New window objects are created by calling the :meth:`MPI.Win.Create` method at all processes within a communicator and specifying a memory buffer . When a window instance is no longer needed, the :meth:`MPI.Win.Free` method should be called. The three one-sided MPI operations for remote write, read and reduction are available through calling the methods :meth:`MPI.Win.Put`, :meth:`MPI.Win.Get()`, and :meth:`MPI.Win.Accumulate` respectively within a :class:`Win` instance. These methods need an integer rank identifying the target process and an integer offset relative the base address of the remote memory block being accessed. The one-sided operations read, write, and reduction are implicitly nonblocking, and must be synchronized by using two primary modes. Active target synchronization requires the origin process to call the :meth:`MPI.Win.Start` and :meth:`MPI.Win.Complete` methods at the origin process, and target process cooperates by calling the :meth:`MPI.Win.Post` and :meth:`MPI.Win.Wait` methods. There is also a collective variant provided by the :meth:`MPI.Win.Fence` method. Passive target synchronization is more lenient, only the origin process calls the :meth:`MPI.Win.Lock` and :meth:`MPI.Win.Unlock` methods. Locks are used to protect remote accesses to the locked remote window and to protect local load/store accesses to a locked local window. Parallel Input/Output --------------------- The POSIX standard provides a model of a widely portable file system. However, the optimization needed for parallel input/output cannot be achieved with this generic interface. In order to ensure efficiency and scalability, the underlying parallel input/output system must provide a high-level interface supporting partitioning of file data among processes and a collective interface supporting complete transfers of global data structures between process memories and files. Additionally, further efficiencies can be gained via support for asynchronous input/output, strided accesses to data, and control over physical file layout on storage devices. This scenario motivated the inclusion in the MPI-2 standard of a custom interface in order to support more elaborated parallel input/output operations. The MPI specification for parallel input/output revolves around the use objects called *files*. As defined by MPI, files are not just contiguous byte streams. Instead, they are regarded as ordered collections of *typed* data items. MPI supports sequential or random access to any integral set of these items. Furthermore, files are opened collectively by a group of processes. The common patterns for accessing a shared file (broadcast, scatter, gather, reduction) is expressed by using user-defined datatypes. Compared to the communication patterns of point-to-point and collective communications, this approach has the advantage of added flexibility and expressiveness. Data access operations (read and write) are defined for different kinds of positioning (using explicit offsets, individual file pointers, and shared file pointers), coordination (non-collective and collective), and synchronism (blocking, nonblocking, and split collective with begin/end phases). In *MPI for Python*, all MPI input/output operations are performed through instances of the :class:`MPI.File` class. File handles are obtained by calling the :meth:`MPI.File.Open` method at all processes within a communicator and providing a file name and the intended access mode. After use, they must be closed by calling the :meth:`MPI.File.Close` method. Files even can be deleted by calling method :meth:`MPI.File.Delete`. After creation, files are typically associated with a per-process *view*. The view defines the current set of data visible and accessible from an open file as an ordered set of elementary datatypes. This data layout can be set and queried with the :meth:`MPI.File.Set_view` and :meth:`MPI.File.Get_view` methods respectively. Actual input/output operations are achieved by many methods combining read and write calls with different behavior regarding positioning, coordination, and synchronism. Summing up, *MPI for Python* provides the thirty (30) methods defined in MPI-2 for reading from or writing to files using explicit offsets or file pointers (individual or shared), in blocking or nonblocking and collective or noncollective versions. Environmental Management ------------------------ Initialization and Exit ^^^^^^^^^^^^^^^^^^^^^^^ Module functions :func:`MPI.Init` or :func:`MPI.Init_thread` and :func:`MPI.Finalize` provide MPI initialization and finalization respectively. Module functions :func:`MPI.Is_initialized()` and :func:`MPI.Is_finalized()` provide the respective tests for initialization and finalization. .. note:: :c:func:`MPI_Init()` or :c:func:`MPI_Init_thread()` is actually called when you import the :mod:`MPI` module from the :mod:`mpi4py` package, but only if MPI is not already initialized. In such case, calling :func:`MPI.Init` or :func:`MPI.Init_thread` from Python is expected to generate an MPI error, and in turn an exception will be raised. .. note:: :c:func:`MPI_Finalize()` is registered (by using Python C/API function :c:func:`Py_AtExit()`) for being automatically called when Python processes exit, but only if :mod:`mpi4py` actually initialized MPI. Therefore, there is no need to call :func:`MPI.Finalize()` from Python to ensure MPI finalization. Implementation Information ^^^^^^^^^^^^^^^^^^^^^^^^^^ * The MPI version number can be retrieved from module function :func:`MPI.Get_version`. It returns a two-integer tuple ``(version,subversion)``. * The :func:`MPI.Get_processor_name` function can be used to access the processor name. * The values of predefined attributes attached to the world communicator can be obtained by calling the :meth:`MPI.Comm.Get_attr` method within the :const:`MPI.COMM_WORLD` instance. Timers ^^^^^^ MPI timer functionalities are available through the :func:`MPI.Wtime` and :func:`MPI.Wtick` functions. Error Handling ^^^^^^^^^^^^^^ In order facilitate handle sharing with other Python modules interfacing MPI-based parallel libraries, the predefined MPI error handlers :const:`MPI.ERRORS_RETURN` and :const:`MPI.ERRORS_ARE_FATAL` can be assigned to and retrieved from communicators, windows and files using methods :meth:`MPI.{Comm|Win|File}.Set_errhandler` and :meth:`MPI.{Comm|Win|File}.Get_errhandler`. When the predefined error handler :const:`MPI.ERRORS_RETURN` is set, errors returned from MPI calls within Python code will raise an instance of the exception class :exc:`MPI.Exception`, which is a subclass of the standard Python exception :exc:`RuntimeError`. .. note:: After import, mpi4py overrides the default MPI rules governing inheritance of error handlers. The :const:`MPI.ERRORS_RETURN` error handler is set in the predefined :const:`MPI.COMM_SELF` and :const:`MPI.COMM_WORLD` communicators, as well as any new :class:`MPI.Comm`, :class:`MPI.Win`, or :class:`MPI.File` instance created through mpi4py. If you ever pass such handles to C/C++/Fortran library code, it is recommended to set the :const:`MPI.ERRORS_ARE_FATAL` error handler on them to ensure MPI errors do not pass silently. .. warning:: Importing with ``from mpi4py.MPI import *`` will cause a name clashing with the standard Python :exc:`Exception` base class. mpi4py-3.0.3/docs/usrman/overview.html0000664000175000017500000012631713557771112021013 0ustar dalcinldalcinl00000000000000 Overview — MPI for Python 3.0.3 documentation

Overview¶

MPI for Python provides an object oriented approach to message passing which grounds on the standard MPI-2 C++ bindings. The interface was designed with focus in translating MPI syntax and semantics of standard MPI-2 bindings for C++ to Python. Any user of the standard C/C++ MPI bindings should be able to use this module without need of learning a new interface.

Communicating Python Objects and Array Data¶

The Python standard library supports different mechanisms for data persistence. Many of them rely on disk storage, but pickling and marshaling can also work with memory buffers.

The pickle modules provide user-extensible facilities to serialize general Python objects using ASCII or binary formats. The marshal module provides facilities to serialize built-in Python objects using a binary format specific to Python, but independent of machine architecture issues.

MPI for Python can communicate any built-in or user-defined Python object taking advantage of the features provided by the pickle module. These facilities will be routinely used to build binary representations of objects to communicate (at sending processes), and restoring them back (at receiving processes).

Although simple and general, the serialization approach (i.e., pickling and unpickling) previously discussed imposes important overheads in memory as well as processor usage, especially in the scenario of objects with large memory footprints being communicated. Pickling general Python objects, ranging from primitive or container built-in types to user-defined classes, necessarily requires computer resources. Processing is also needed for dispatching the appropriate serialization method (that depends on the type of the object) and doing the actual packing. Additional memory is always needed, and if its total amount is not known a priori, many reallocations can occur. Indeed, in the case of large numeric arrays, this is certainly unacceptable and precludes communication of objects occupying half or more of the available memory resources.

MPI for Python supports direct communication of any object exporting the single-segment buffer interface. This interface is a standard Python mechanism provided by some types (e.g., strings and numeric arrays), allowing access in the C side to a contiguous memory buffer (i.e., address and length) containing the relevant data. This feature, in conjunction with the capability of constructing user-defined MPI datatypes describing complicated memory layouts, enables the implementation of many algorithms involving multidimensional numeric arrays (e.g., image processing, fast Fourier transforms, finite difference schemes on structured Cartesian grids) directly in Python, with negligible overhead, and almost as fast as compiled Fortran, C, or C++ codes.

Communicators¶

In MPI for Python, MPI.Comm is the base class of communicators. The MPI.Intracomm and MPI.Intercomm classes are sublcasses of the MPI.Comm class. The MPI.Comm.Is_inter() method (and MPI.Comm.Is_intra(), provided for convenience but not part of the MPI specification) is defined for communicator objects and can be used to determine the particular communicator class.

The two predefined intracommunicator instances are available: MPI.COMM_SELF and MPI.COMM_WORLD. From them, new communicators can be created as needed.

The number of processes in a communicator and the calling process rank can be respectively obtained with methods MPI.Comm.Get_size() and MPI.Comm.Get_rank(). The associated process group can be retrieved from a communicator by calling the MPI.Comm.Get_group() method, which returns an instance of the MPI.Group class. Set operations with MPI.Group objects like like MPI.Group.Union(), MPI.Group.Intersect() and MPI.Group.Difference() are fully supported, as well as the creation of new communicators from these groups using MPI.Comm.Create() and MPI.Comm.Create_group().

New communicator instances can be obtained with the MPI.Comm.Clone(), MPI.Comm.Dup() and MPI.Comm.Split() methods, as well methods MPI.Intracomm.Create_intercomm() and MPI.Intercomm.Merge().

Virtual topologies (MPI.Cartcomm, MPI.Graphcomm and MPI.Distgraphcomm classes, which are specializations of the MPI.Intracomm class) are fully supported. New instances can be obtained from intracommunicator instances with factory methods MPI.Intracomm.Create_cart() and MPI.Intracomm.Create_graph().

Point-to-Point Communications¶

Point to point communication is a fundamental capability of message passing systems. This mechanism enables the transmission of data between a pair of processes, one side sending, the other receiving.

MPI provides a set of send and receive functions allowing the communication of typed data with an associated tag. The type information enables the conversion of data representation from one architecture to another in the case of heterogeneous computing environments; additionally, it allows the representation of non-contiguous data layouts and user-defined datatypes, thus avoiding the overhead of (otherwise unavoidable) packing/unpacking operations. The tag information allows selectivity of messages at the receiving end.

Blocking Communications¶

MPI provides basic send and receive functions that are blocking. These functions block the caller until the data buffers involved in the communication can be safely reused by the application program.

In MPI for Python, the MPI.Comm.Send(), MPI.Comm.Recv() and MPI.Comm.Sendrecv() methods of communicator objects provide support for blocking point-to-point communications within MPI.Intracomm and MPI.Intercomm instances. These methods can communicate memory buffers. The variants MPI.Comm.send(), MPI.Comm.recv() and MPI.Comm.sendrecv() can communicate general Python objects.

Nonblocking Communications¶

On many systems, performance can be significantly increased by overlapping communication and computation. This is particularly true on systems where communication can be executed autonomously by an intelligent, dedicated communication controller.

MPI provides nonblocking send and receive functions. They allow the possible overlap of communication and computation. Non-blocking communication always come in two parts: posting functions, which begin the requested operation; and test-for-completion functions, which allow to discover whether the requested operation has completed.

In MPI for Python, the MPI.Comm.Isend() and MPI.Comm.Irecv() methods initiate send and receive operations, respectively. These methods return a MPI.Request instance, uniquely identifying the started operation. Its completion can be managed using the MPI.Request.Test(), MPI.Request.Wait() and MPI.Request.Cancel() methods. The management of MPI.Request objects and associated memory buffers involved in communication requires a careful, rather low-level coordination. Users must ensure that objects exposing their memory buffers are not accessed at the Python level while they are involved in nonblocking message-passing operations.

Persistent Communications¶

Often a communication with the same argument list is repeatedly executed within an inner loop. In such cases, communication can be further optimized by using persistent communication, a particular case of nonblocking communication allowing the reduction of the overhead between processes and communication controllers. Furthermore , this kind of optimization can also alleviate the extra call overheads associated to interpreted, dynamic languages like Python.

In MPI for Python, the MPI.Comm.Send_init() and MPI.Comm.Recv_init() methods create persistent requests for a send and receive operation, respectively. These methods return an instance of the MPI.Prequest class, a subclass of the MPI.Request class. The actual communication can be effectively started using the MPI.Prequest.Start() method, and its completion can be managed as previously described.

Collective Communications¶

Collective communications allow the transmittal of data between multiple processes of a group simultaneously. The syntax and semantics of collective functions is consistent with point-to-point communication. Collective functions communicate typed data, but messages are not paired with an associated tag; selectivity of messages is implied in the calling order. Additionally, collective functions come in blocking versions only.

The more commonly used collective communication operations are the following.

  • Barrier synchronization across all group members.
  • Global communication functions
    • Broadcast data from one member to all members of a group.
    • Gather data from all members to one member of a group.
    • Scatter data from one member to all members of a group.
  • Global reduction operations such as sum, maximum, minimum, etc.

In MPI for Python, the MPI.Comm.Bcast(), MPI.Comm.Scatter(), MPI.Comm.Gather(), MPI.Comm.Allgather(), and MPI.Comm.Alltoall() MPI.Comm.Alltoallw() methods provide support for collective communications of memory buffers. The lower-case variants MPI.Comm.bcast(), MPI.Comm.scatter(), MPI.Comm.gather(), MPI.Comm.allgather() and MPI.Comm.alltoall() can communicate general Python objects. The vector variants (which can communicate different amounts of data to each process) MPI.Comm.Scatterv(), MPI.Comm.Gatherv(), MPI.Comm.Allgatherv(), MPI.Comm.Alltoallv() and MPI.Comm.Alltoallw() are also supported, they can only communicate objects exposing memory buffers.

Global reduction operations on memory buffers are accessible through the MPI.Comm.Reduce(), MPI.Comm.Reduce_scatter, MPI.Comm.Allreduce(), MPI.Intracomm.Scan() and MPI.Intracomm.Exscan() methods. The lower-case variants MPI.Comm.reduce(), MPI.Comm.allreduce(), MPI.Intracomm.scan() and MPI.Intracomm.exscan() can communicate general Python objects; however, the actual required reduction computations are performed sequentially at some process. All the predefined (i.e., MPI.SUM, MPI.PROD, MPI.MAX, etc.) reduction operations can be applied.

Dynamic Process Management¶

In the context of the MPI-1 specification, a parallel application is static; that is, no processes can be added to or deleted from a running application after it has been started. Fortunately, this limitation was addressed in MPI-2. The new specification added a process management model providing a basic interface between an application and external resources and process managers.

This MPI-2 extension can be really useful, especially for sequential applications built on top of parallel modules, or parallel applications with a client/server model. The MPI-2 process model provides a mechanism to create new processes and establish communication between them and the existing MPI application. It also provides mechanisms to establish communication between two existing MPI applications, even when one did not start the other.

In MPI for Python, new independent process groups can be created by calling the MPI.Intracomm.Spawn() method within an intracommunicator. This call returns a new intercommunicator (i.e., an MPI.Intercomm instance) at the parent process group. The child process group can retrieve the matching intercommunicator by calling the MPI.Comm.Get_parent() class method. At each side, the new intercommunicator can be used to perform point to point and collective communications between the parent and child groups of processes.

Alternatively, disjoint groups of processes can establish communication using a client/server approach. Any server application must first call the MPI.Open_port() function to open a port and the MPI.Publish_name() function to publish a provided service, and next call the MPI.Intracomm.Accept() method. Any client applications can first find a published service by calling the MPI.Lookup_name() function, which returns the port where a server can be contacted; and next call the MPI.Intracomm.Connect() method. Both MPI.Intracomm.Accept() and MPI.Intracomm.Connect() methods return an MPI.Intercomm instance. When connection between client/server processes is no longer needed, all of them must cooperatively call the MPI.Comm.Disconnect() method. Additionally, server applications should release resources by calling the MPI.Unpublish_name() and MPI.Close_port() functions.

One-Sided Communications¶

One-sided communications (also called Remote Memory Access, RMA) supplements the traditional two-sided, send/receive based MPI communication model with a one-sided, put/get based interface. One-sided communication that can take advantage of the capabilities of highly specialized network hardware. Additionally, this extension lowers latency and software overhead in applications written using a shared-memory-like paradigm.

The MPI specification revolves around the use of objects called windows; they intuitively specify regions of a process’s memory that have been made available for remote read and write operations. The published memory blocks can be accessed through three functions for put (remote send), get (remote write), and accumulate (remote update or reduction) data items. A much larger number of functions support different synchronization styles; the semantics of these synchronization operations are fairly complex.

In MPI for Python, one-sided operations are available by using instances of the MPI.Win class. New window objects are created by calling the MPI.Win.Create() method at all processes within a communicator and specifying a memory buffer . When a window instance is no longer needed, the MPI.Win.Free() method should be called.

The three one-sided MPI operations for remote write, read and reduction are available through calling the methods MPI.Win.Put(), MPI.Win.Get(), and MPI.Win.Accumulate() respectively within a Win instance. These methods need an integer rank identifying the target process and an integer offset relative the base address of the remote memory block being accessed.

The one-sided operations read, write, and reduction are implicitly nonblocking, and must be synchronized by using two primary modes. Active target synchronization requires the origin process to call the MPI.Win.Start() and MPI.Win.Complete() methods at the origin process, and target process cooperates by calling the MPI.Win.Post() and MPI.Win.Wait() methods. There is also a collective variant provided by the MPI.Win.Fence() method. Passive target synchronization is more lenient, only the origin process calls the MPI.Win.Lock() and MPI.Win.Unlock() methods. Locks are used to protect remote accesses to the locked remote window and to protect local load/store accesses to a locked local window.

Parallel Input/Output¶

The POSIX standard provides a model of a widely portable file system. However, the optimization needed for parallel input/output cannot be achieved with this generic interface. In order to ensure efficiency and scalability, the underlying parallel input/output system must provide a high-level interface supporting partitioning of file data among processes and a collective interface supporting complete transfers of global data structures between process memories and files. Additionally, further efficiencies can be gained via support for asynchronous input/output, strided accesses to data, and control over physical file layout on storage devices. This scenario motivated the inclusion in the MPI-2 standard of a custom interface in order to support more elaborated parallel input/output operations.

The MPI specification for parallel input/output revolves around the use objects called files. As defined by MPI, files are not just contiguous byte streams. Instead, they are regarded as ordered collections of typed data items. MPI supports sequential or random access to any integral set of these items. Furthermore, files are opened collectively by a group of processes.

The common patterns for accessing a shared file (broadcast, scatter, gather, reduction) is expressed by using user-defined datatypes. Compared to the communication patterns of point-to-point and collective communications, this approach has the advantage of added flexibility and expressiveness. Data access operations (read and write) are defined for different kinds of positioning (using explicit offsets, individual file pointers, and shared file pointers), coordination (non-collective and collective), and synchronism (blocking, nonblocking, and split collective with begin/end phases).

In MPI for Python, all MPI input/output operations are performed through instances of the MPI.File class. File handles are obtained by calling the MPI.File.Open() method at all processes within a communicator and providing a file name and the intended access mode. After use, they must be closed by calling the MPI.File.Close() method. Files even can be deleted by calling method MPI.File.Delete().

After creation, files are typically associated with a per-process view. The view defines the current set of data visible and accessible from an open file as an ordered set of elementary datatypes. This data layout can be set and queried with the MPI.File.Set_view() and MPI.File.Get_view() methods respectively.

Actual input/output operations are achieved by many methods combining read and write calls with different behavior regarding positioning, coordination, and synchronism. Summing up, MPI for Python provides the thirty (30) methods defined in MPI-2 for reading from or writing to files using explicit offsets or file pointers (individual or shared), in blocking or nonblocking and collective or noncollective versions.

Environmental Management¶

Initialization and Exit¶

Module functions MPI.Init() or MPI.Init_thread() and MPI.Finalize() provide MPI initialization and finalization respectively. Module functions MPI.Is_initialized() and MPI.Is_finalized() provide the respective tests for initialization and finalization.

Note

MPI_Init() or MPI_Init_thread() is actually called when you import the MPI module from the mpi4py package, but only if MPI is not already initialized. In such case, calling MPI.Init() or MPI.Init_thread() from Python is expected to generate an MPI error, and in turn an exception will be raised.

Note

MPI_Finalize() is registered (by using Python C/API function Py_AtExit()) for being automatically called when Python processes exit, but only if mpi4py actually initialized MPI. Therefore, there is no need to call MPI.Finalize() from Python to ensure MPI finalization.

Implementation Information¶

  • The MPI version number can be retrieved from module function MPI.Get_version(). It returns a two-integer tuple (version,subversion).
  • The MPI.Get_processor_name() function can be used to access the processor name.
  • The values of predefined attributes attached to the world communicator can be obtained by calling the MPI.Comm.Get_attr() method within the MPI.COMM_WORLD instance.

Timers¶

MPI timer functionalities are available through the MPI.Wtime() and MPI.Wtick() functions.

Error Handling¶

In order facilitate handle sharing with other Python modules interfacing MPI-based parallel libraries, the predefined MPI error handlers MPI.ERRORS_RETURN and MPI.ERRORS_ARE_FATAL can be assigned to and retrieved from communicators, windows and files using methods MPI.{Comm|Win|File}.Set_errhandler() and MPI.{Comm|Win|File}.Get_errhandler().

When the predefined error handler MPI.ERRORS_RETURN is set, errors returned from MPI calls within Python code will raise an instance of the exception class MPI.Exception, which is a subclass of the standard Python exception RuntimeError.

Note

After import, mpi4py overrides the default MPI rules governing inheritance of error handlers. The MPI.ERRORS_RETURN error handler is set in the predefined MPI.COMM_SELF and MPI.COMM_WORLD communicators, as well as any new MPI.Comm, MPI.Win, or MPI.File instance created through mpi4py. If you ever pass such handles to C/C++/Fortran library code, it is recommended to set the MPI.ERRORS_ARE_FATAL error handler on them to ensure MPI errors do not pass silently.

Warning

Importing with from mpi4py.MPI import * will cause a name clashing with the standard Python Exception base class.

mpi4py-3.0.3/docs/mpi4py.pdf0000664000175000017500000063462413560002765016667 0ustar dalcinldalcinl00000000000000%PDF-1.5 %ÐÔÅØ 1 0 obj << /Length 843 /Filter /FlateDecode >> stream xÚmUMoâ0½çWx•ÚÅNÈW…œ„H¶­ Zí•&¦‹Tàп~3Ú®öz¿™yóœ87?ž×Ûö¯nÝkõâNýehܤü¹=77Uß\®;?:׺vÜ==¨ç¡oÖî¬nËUµêöç;O^uÍû¥u#ëÿ¤Â½í»O ú¨Ûû=Ù˜‰a³?¿ûkLy 6FÑæ/7œö}÷ Ì½ÖÚ–][öH<Si£¦cãݾké¥^Ñ90¡j÷ÍYVôßü¬H^œÎî°êv}0Ÿ«é‹ß<‡ÒrLŸ†Ö ûîͯ_®/Çã»Ck¥ƒÅBµnç«øy·§¦Wý×øæãèTHkÃý›¾u§ã¶qö{sÁ\ë…š×õ"p]ûϞќòº¹KÏÕµÿ u”/‚¹A² )`JbD>`´öØ2ãš™$`¤TY'`”(ZqŠÇÁ¼BJÅŒ )KÒÌŒ%553<Æ,£è(‡hþl™×wBš6„‹0¦Ða™G„+L¤gıè«cŽWÀ c œrn œqœø9çÖÀ–ã°MÜ—8%Ç àŠCMq.â†5„Sâhr›ê›®®AƒáúI‚Öå皎­ú\SåþÈ©¿ÇÀ á]8 é`Y‡7ÑŒ1OÊyeäµñÖzlÃë,d mYĸ”S£SJfß-›1i‰:C&e c4ÎRÆÄÉØˆËÄ$D&™ Ë Æ&+ü¬bLõÉãaÉjÆ çÁbôÍy°üœ£‡+çÁbèÉYB¹ü‘þœõ§Ägý ñYJõYŠYrÖŸb–œõ§x(rÖÁèœõGT“õÌ›ËÁ`F+ƒÙ­L ,C9ô²â?d+þ£¯ÿ¡ÍŠÿÄÿ1£ÿ1—ÿ¡ÓŠÿðÄŠÿ˜×ŠÿT_ü‡~+þCg!þ£o!þƒ_ˆÿàâ?ôâ?åŠÿÄÿ‰/þ?ã«„°øY ñ³â?^ŒBü‡Ÿ¿\–jò‹UPñœŠ{Åð¡âxᇻLöó^U}9pQãóq½÷›Ë0øO}cèÖÇ}¿ïÜõ3tìÈ¢}¿Æ!VOuðÊñË· endstream endobj 168 0 obj << /Length 586 /Filter /FlateDecode >> stream xÚmTËŽâ0¼ç+¼$æÀà$0Š ‰Ã£­ö ‰a#A%áÀ߯«›ÀÌjDÕå²»«ífðãc;ZæÕÁŽÌ«Ÿ¶­®MfGÑÏ}í q•]/¶ìÞ­ÍmÞ¯¶o⣩²­íÄ0ZÇë²è^œx]fçkn{ÕÿE+{*ʧyÄpg6;5’PìŠîìVž¤pH8$hù—mÚ¢*ß„z•R:")󨺠ÊÖß3‰qŸûX”ysO'Hî)-ò"ëî}³‹³‹ÍÛ[ÛÙ˺s á3 4†{´¢p¿YôdšrýØëKæ‘+ˆ™ÇÞ a }ÀõàíÑ« W€‡Œ{ Fvm734…4˜‡¢´A­«»èGÞÿc Ú¤Þ_86 endstream endobj 202 0 obj << /Length 1153 /Filter /FlateDecode >> stream xÚíšMs£F†ïúsUïS*±½.m%±c«Ê×Â6)iPò®ÿý6 °’°e'‚Ëæ"¥Zót÷ô;€Ñ-Âèt„{>þ3"pĈ E‘"8L¢h1ºþŒÑ ®B80F¢/寈K Ç9ºýÙë×éèÃGŽåÒŠ é bRIÅL%šÎÐõø÷ó‰çS¥Ç7Åã4s_Îò»ÔzŸ§Ÿ`‚ Œ´˜€ƒ| ¾IãÆ¸ˆçq¸Š)Œ°Êþ—¥¥Ït@ G>çÐÔ™þ–¬B;ËÊ{;ûãp%¶ÀF¾Þ Á"HiÎ`˜Òü´°¼w–˜ÿäN(&¦`„¶8 ’Á'“e07­‹§£–³«@ÃäûŒ†WÞ¥6m¾rƒ×óP¬‹‘‡O®¥»ÉîEw¾ñ‡0 ³%•œx>Á'6Ï<¢Çél剣ÐÜ ˆƒ 1ð¥4¢Õÿü.ˆ `2u€•@¾C\y”¾<¾º s˜S8KVîñòó¶G×¾äbx¾çßÏÓõ˜;ÓJUcöc­ˆ®m¦ôI¦.Û[X3Ï×Ë“U<¡ú†y<«Pféßq´S¡àÞœ²åka¹³ø°î¸âSàKt]ØÝjpvï<޳âó>‰¿ì] x«mVƒ£t±XÛ$ óÄÞn–w~ö— ½ò ¬êîä—, Üéq˜‡­Àô„ÍcÂ;ÊvÚTïï Ò¬•åB’!Ë»Îrq(CY3¬+öyšØÜÏS¿º0Ñta›ÇÙMñ6RU›Zéòñw$­»8ëóe3YÅÙQ’?²3¹aÛžì¼¥íS*òÁÊÐæÝæM““éèÇÁV endstream endobj 3 0 obj << /Type /ObjStm /N 100 /First 829 /Length 1817 /Filter /FlateDecode >> stream xÚÕZÛn7}߯àcR ïÀHá$M A;E?Èò&QkK®d7Îß÷ÌšæŠÖ®Vuä"}0¹êÌ™3ÃYîÒŠ æ˜Ì3)$þ˜ÔŽIÉ”ÔL¦L`Ò2mp#0í-“‘™RÌÄX)ͬL9fƒeʳ ¸à$Ó’Eíñ[½b?•¸¤(E˜–…ވʽàƒ„FΖ]”Ì‚]?kÐ ³ â#ì2%zpÞ(ôÑVNƒ£× ¦”9gpÓƒ­‰žyøèÀÇÃI‡Ažè \ž)@«"b**S ¿0>ªZ? ¦•@×T€¯†i ‘"©¦‹Í€lŒÀĤ…w•Ä´#)é"E˜Ä$üÔAP H0‹[ˆ…€)*V’""@S’jRªJ"*FB‰`éÂ*gHrDÒ^2£=ÅÛ0c‰(#DƘÐk£†âAȈ’ñ\"LÆÓÄÉ &…øÁ"eyŠPYá)ž—RtÅãÀÒ•À,äCh1X›XIa Îtgˆl­2Bg- å(̈µo'(c –“ä;2Ìi2A!7È *ÎFSIDÖyMƒsÁÓ`„YH”aˆ¶WäNÀT0P ¹†”B÷^PÖi$ÍDÙGo«½=6:d£Wó÷s6zÁ-ëÉåt>ãò1{ú´zôQ{‡?ÿQñšš5—Ô,¨™SsJÍ5“|wšïί¹:Évº,} æ 5ã øQ‘—«WÞPó.3üyÀžú^{©oyà—ÖÓmÌëuóÔÔÔœ•ê¬na»Uþ<ªU~ù¸7¨®¿¥æï ³È§Ó|íëFTWŸg†ç¹¹ÊM3áq™/ÍÝÏÛk};ªqâ¤WÕ¡ãüãB×ýìü"ú¶:àEIw< ‰Ú…&óÌg9`®#©Þe„i9oŸ”øO6¾uÿžmC5äÙ$ØYnêŽ*ÓfïÆÖ®³}‘Sf–¡ÏKs=“x’ù/»kÛ¸DýœÇŸç£›ˆ °v=Ó–ašd8̬O»‹ÐƒËë{Òy\NÐ;iq¶Ê±}X]dz •Qv»½¶2d€YXgöK¶ÔÖÍEéïÝ8•ì,Ö‰eG1x_úÛ–iKe£çº«Ê”Ÿ}w_æÔiÉ]t×ñ¯y@ ر pJýÐus€¼þaJæÑŽÚ~gÍö$½Àú?V^ÝUy?”µì"7=3hSÂfÀFÃWlüòyIjg}¥êHŒóҲɧM€95ŸÊbv•©×ÃÏÓUÇ&e5𔍋Žâ½jpR´Å¥ÑÍÃæºœÖwëú€a=h¸«ìÀ°ÙnMܳB?+³±0f{Ô×e‰¸(Ëä†w'{¯\]´ut#a»Å wû‚ö);1Y+äóò¡¹ÅÊ+Qp=á™–K–-jô›> stream xÚíZK“Û6¾Ï¯àm©ÊˆCàëhom§Ö‰×™­=8©-Š„$føùðdö×ï×h€’8Ê”Ÿ'û2$@ãÑ_w ïìßùáÊ·O/ôSÇ÷D"ñW¦±Ó£á‘ðõWÏo¯n¾—Òɼ,cçvë$¡“¾ç‹Ä¹-7n²Z¾ï»/ÚaÌë:«®]ý~ûÓ<™#£Tw÷y@(¹ù½×€D' XK)·Îűa˜Ìvý`Œ¡û”¡1忇ªÝ‘Öe=‘Ô¡:˜>§0 bOˆÌöéú jã$»¨|xøoÅ(>ÛÉBq$¼ ™G}uhúŒÄŸ€ŒÏ¼(—P•²Æi¬êá)ËÐËdúÍÀŸ!Ú|Þ8±ÎB/ˆ~i p»J|W £ÂéÄaòÍ<_,Í<â/Á<Ò™y¼|õb­Ú|S«rµ!xõ0îÁ†ô{ÕŽª?ô —G•¥_;’>+v–|"ùÄó©ªK Ú"0¿lû®á·¡›úB=¢2I¿9þ{Z-ù‚ÿZmá=Aêªö‘•–¾ž~ ¯Ã»†³)O]øeWNµâ÷m©žŽ6Âÿ<+x™ÝüÛ«·W„¾P™ i§h®Þüî;%ä?a¶,‹{Ý«qdL<§v~½ú×ÑdæyªË ²ÌqæÉx©Nd鬱riž) n2ó½øI2ù÷ż¦ å'(4%©Æ¿Ÿm†±Ï‹ñB€H %w¼ÝW¬— ·ìЉ D󥆢¯6Ê4Ž{Ūâð´X/¡=sè½Ei¡_ R/"Ž=?8V+yq—ï”wa A\5þôúnD´;ÚT-…=óÕmŸÜ§pŠ™þ¾TïßÝÑe²BÆÊK¹µH3ÏÇÒÏâî ÊxÛ¼PV,R/‰¤ä7gl€&@ó¶Ìû’¿ÌøzÅúeöJ¼c»»>oŽëÔy»›pÄ×ô™¸(ç:b÷s‡¼¥óyøKUf²ŽŸŠ:ÿy¨»jdA3Õcu¨•ݺÞÉÙΡñièúA›Y'¤ÄË„8Ãa”Y0à#C0¢CÚOŨi8þdXÑÁ¶F Ï/Ä<‚›ðFpûpPEõ›ï‡…¾Ž1zq¤Ü¼ˆnâg·ùC£™¤¯à!Le2¦/[ÂTw¸ßWÅ~ÞßÉö{5¨,ˆ”K»JÉ« ùõïß}Ç/šH*Ê_Œ,¦Ã¡ëG£áÐaúõØ­õ Ë38ßpÍß½*TEv~G{Sƒ“´û–t°uíô:ªÚô]^ù0j}DpvØ2>Owów«Èͱ¯ÞL#ÂÚ›fj«ùÈEhCQ›EÜw£ ¯2ŠUè»w5‘ÈKnƒXØÎ¹4KXx¯êÚÌo$Ýa¬šêdÔó%¯×®:œWýx†|€xždç67^Ò 3½2àÄIBT«õ »ìLØ…|C[¶d JëG–|3ˆÈ:?OÍ«þÌû>°FbüѤèÍ膸æ¼Ñ]YÎËgk]È•: Q~‹£ìCòÓQGÓ¤H¶Ÿ$"O&© é©4CzålÏkäeiôh²:3Žl, ¬p‚ÌE–ÂùÞSHOH–/~E{‘µxpNô>x 0ÆHß=Yܪxtw|!§^†•èüÂNLЉ#ƒ·8FüF=¨¼×PAù¿¯v{–€°®oò¶0à‡idà¢}OÞBòB‹b¡Žôd¼v}©]T÷C¼ÓuƒYGÇÒæ˜f mºþØË*(xp“Æ.L>^FÓ¡ 8Ìá¾(ë¶ãŽ{Z½©cdëY²QXª"ÆŽ´}K'Ä Ú?¦–[ ´ÇãùvÊëYo‡’šÞB×n¤C·﵃öF¢ã«]WWÎã÷HàsÏKû‘áÁz>v(&böå"€´œ¿ùãž²êèÜô:t‡©Î{=«öô­¥ÝANÒ0(cjh÷BÈ8¤qÏÏ2ÕÛG·Gh.€ªae^§adëQf¦Uì9ôË9ékt´,#¨R§âo#|+”¹’ºt­F“†ÅhÕXfYí\ M”›Ñ¬‹ò{ÅÔ"M-½3yXGô‘m7r—YËô'd‰b¦/tAÝyUØ(x›™ˆ< C‹qê™ [>€®Rw¬jíŠzŠ2øÛ*Š\ӥ鳦RÁFæ6RTëKû=qYòmýèèwU«To¢ Z‡ÚîÑ«:7Ô/6Á$bCcŒ fCªÇ ¦U Õ®5­ód$#¨&ÃI¡ƒ¨V»?2ÞÏb†ô]£ƒØ—%!˽=Z˜VÁ!,\µàœ—Gó1KC­wôóg‹=6:®”a{J8c#ÐÀ"‡:þàzFÚ~ÑiäÕjÈqpX¯iÀ)ÚbWžGH^.@vÐjÈIÉ c‡ãŒEì~OcphS ëæ8~òË”âºvŒªq2–¦±¥"„ SÝ¡@(ßYÕùV‡a‰>uÐE!IÌtSÃr€FåƒYfÙsõWy,.F¦MҔˤ)Γ¦d_Âs¤PÀ!Jû:z%|ß`Z"‚Féy.¡¾óùKœÿŠrá‹è= ól4yU[…¶àÓEDXd_öË pÇæÈ¥ àÚeðqâš:؇sˆ4xÍ’®åhã14ôû¡~E\ùÓA`S¥ÊÒ¼qÕ‡¦ªQëyì8¿j»IŸ?5w<_Ï¿n/ÔqÀÖÆY(,úyæ §pr~Yzv~2’̨!sä7½3T.r*zÀBæèªK×fg`ÑÖ#¾–„°:Ý$&—àÅð{‘ù=¤øõ5g_Š1' ÎüÍLö1æ×¢ªóö¦ÕÜ8 ùÎöÖèÚöгz="mzÞóºs96°Âã¥Õò÷Ýå½w†HŸ,ãœU%‹kæÈA5$ÚTiè¥Q椑ÈäÄ´ºš P§ÿ0pô^ÀžB‹Ë[&XÑ— U sƒ” RÙß{Å­uð—ù¸ÿݸRqm~(¼‹õ·®Ú QÀ§Yà¬%ðšº9\ßÿ[¢HK endstream endobj 246 0 obj << /Length 2664 /Filter /FlateDecode >> stream xÚ½YI³Û6¾çWè6TÅR¸ˆ‹NS¶kìxjR~•¼ª9Ø9@$$!Û€”_ä_?½"iÚ5~cç ao Æ×_ƒþê´òW¯ð%}qÿÃO¯vñj¿Ý'a²º?®Òp•þÖÒÕ}±zçåMÕªÞLiúëz¦{ïÑôgÎõgÍ™_ž¯ƒ ðîÿõüW”ª>]ÔIo×›hŸyoj7Àt"dø^cžA1K¼G”ù^ku§ë^¤Þ½á̱±œ¹»ö禖1Šëj½cG…Vå0- Óµ:”¦>q“jÛÒlÖ¿ßÿTßÁvÇ¢#(ØÔ¸°Ø÷ú†S½bï϶lLÏÕ¥ìM[j.µ¶Éu×5V†]:ž²]¯êBÙ‚K¬dÞ‡aT6Í—  gŽZ—д㒩9eEE^nMÛw[\úprþ6€ó·aÁ”+ ŸTþúØ_±º!ž0(EÛ, Yù`Lõ«w›Ø÷½Ÿ[æñg¨úßg‹¾‹ö8<ËXæ¼’=¶JXs¸ƒù^3îéX.TMD»Ä{ÇõÛÐÏPXºCÁY"óÌ*ií^Õš ŸÞLäï(2}ªH«‹º5ÐòÓ+8‚›ŠA¸ß¢ÑlKá9áŸæwk0jÕ±¥áÒÞÔ½¶G•‹¼É–~¶ ³Ð ÄýI:¥8q¦j>ê‚E’]bSÛØ®æê ×sÒ›ö6=Œ¾v½®èFmÂ(Ûúa8½X…îÌ©FÑá.䛵‹¼ã¥Î{³<2p¨à4¤ É£)47|À›­¬Ñ=ÐÔ9m•Ue©K.!F]`':D?óî – at¡Tè÷¾Öº“åœe–îZ÷êOYB-;]©º7y7ž8òJs°Ê^—PÄ6—Þôhç»}„LY6PÔPh+}pC0}´¦×œï:ÌɪJF"6а³4WÊUu¹Ô4¨_>ZÉa"ËÜïýØ…Z…%¡÷òw¼]Ððå?°`;´¥Û}qÛo¦ÎqYA䙾ãŒÕ¥VF™¡8 ¬&DÄL×êœ×LŒ•»§^·®/‚¥ûÓ<]bø‰g%4Øž¨5èJ¼í¨ã`‚¨92¬žß§…ÝfS3d®a(>0œØ~8·}ß{S‹ªÀŸ”Õ’Y‡¾Ü*S²‘lÛTœû€&¡ë‚ýZ(†éٜΛЦ±p1r=›]ÄÓíqtzÔeÉNí¡æ[!>®iµóvÍÅæ7'û‡Î{q±¥y`0”ãü] ¸'ñÃ/ž'5<Ñ<à—ŸìÃ9÷'-òí° Ÿº¸ÿg±¸½~²ÜoÍ)"Ç)ÂïÅ)˜}cZ!Ö)¤k¶í‘³Û„TqR5…¶„™AæÄ]¹šðR€¡µe3‡‹s)¹uŠÌØýÆ•wiì½é¹šAÆßy@$@á¤!nL­xK¢¾|gEz¡zYd×ÛKÞ_¬vk'DJŒo¦PªÎTÂm÷ÞQâÒsg?jtÙÃdÜŒÚ6*?s‰‰óÞkxg7ÅÅ’ï‡Ê‰ÒX!AäŠk­*“‹k;tŠ<ëq05¢+Â]”ÑfamwiÑuvK §u)ÙëgÎÁg.RèžqññlHÈê: bWI=yíXHYÀ23’‘¼¼aÖ’ÛOpì–¿­c8‘^RdqZã‰ô\Ç DVÒ7' ¾ÄʺpŸ”"' °À_›x«¡¢Vxè( œn¥3¹oÏ©ª¥\hUrÖ!—ÄÙD{ð‘Ð@™ÄªÖH–â*çÁ±¢[eÓVÏÑR9‚¸ƒá“]œ„ªéú%¥ÛRõ耺E ´/NFÁS2ÚÔ(ŽU%Âÿ Ñ^¯ënfáÉ$”KòGö©(pÁ§ÒÄ"bðg‰G» )ذȉq«+®Å£nøÚ%^~Vv øq’¡G7|ÿ¢‘«?¨G´¿íÒ³1§…†œÎ2ÍéÑBðI†ì{…À0rõuAö›ðý‚ž¿Ð ˜¨4l]¡e¹×Ñ8.‡ŽÄùq$sG±#æàòÓÃùáàã%F*ìÁr ×Lãg#üA•ÄöÝÅôî¤0¢r^{ù“=8£Û!»›/¿t}S™#Y·Ë°l¤naÑn/ÁXFS™¯#VÁQvFs óFÈ`¨ ”>sÀžœØ7Ý'.Î#‡ŽÈæ°ªtƵérUŠ”y±ŸhßÀ?~6u§ë}º ïWšŸlaù2в:(Þa)‘„CшcIÙü ÑÔàøvOâÿ/´úÈ8}ýÌ£¥R^‚-HdÉ>GÞÝKýTk9ýí—;®c³ýÈ&"r#SEdÿçbò‡r1èœa­.vÄtOé’F‡‰=ü¸Q¶œZ0NÜè1øQ%'h\Áì¹4¸…´Œ|ÂXnqqT2P7öf(aÓP°æ^×NŠ, b Sêb‰¥ Aìw{ ‹¾ qýUƒ­v!g¥«)¡ÌXü—_¹ž#.íwîÑrîÑKZZžšN!#Lj–|štìH)TÅ‘4N¤&?¹Cc­U%a! ¸ êÆqùuó6tC^¨´Ã.@AB<ȉK\rð“€Oæ}ç«}~ñªu?=ÿUÏϦHû> ã'† rˆoßΣ°ÑÁíFÂøp'Ó‡ÃôÉ—›rîuî¼1Ÿ/ª©¡-ücÍþè% #Â>rww–à 2CIÝùÎO÷'”þöÛ°ë2ÖÃÊÌ·ÿ+õOS‰òR~ÚOÑŸs&/U'M7…O^¨‡º‚Q\p•}ÓJÅQ*øÛEFÊWt®UÉ’ Pm‡®GK›|–H÷šÉz‘å,~aÀÅ)yùpºàqmÑa­‘ '±÷Wl2 hLÁż| 1#¶Ä&ut2 ,°¦)Cæjˆm—T.U‡« - ùø2`Ö€gªœ9}È &;³Wñ(·ÑnP^À]œ7Ó5Œ¶q4ôZ1dO³Ù—„FGè¸^ŽéÙ;ÚÔarÚº¶Æ]¡á;Øæx‡~38¸(J¾5žÝ]+}5ž=ÍÔ:÷=kj#|²ÀQ.~[3µ©T)ä9;ë\Ìâü9oªêR#S¾Ç¹&ùNçð¬mÊædæüáK7í©pŽÏèE£åížð3V›cb8Œ`0X©}&)jÃrÕ„yüÉ&Z‰¢u¢×üÝÍ-|f-­¶•éG³ªé#Ï=>ã^ê3¯u Ë*>ÅþF¤Ûxï´&G­8_¸ÐÉ6 #×?g°ì¶@žÝ£`#û B÷fŒT9Ç15¢ž«l‘ƒè,ì9MÄÁUnÁÕ›E§±ûÐ{õ¥Ò" 2i´ÝÑc”µêÚ=sFŽ'‘\)ðr¼¸wöáóóèÑŽ?äŽ\ä: Š¿’Z„†ëh–?†¥`·M÷`N€ÊûlÄ”°ÿãþ‡ÿÊC… endstream endobj 266 0 obj << /Length 2956 /Filter /FlateDecode >> stream xڽ˒Û6òî¯ÐQªX4ߤŽãqìš­d=eÏÖì=@$a‡¯âÃùëÓ/P$%;ÉŽ³ìnF¿)wqX¸‹w/ÜÙóõËWoÃp±q6±/ö ÏM4ö‰ç:n,v‹OËϾ¯þóðaLŠF“h"¾ëVkoã-½]ùî²7ù®Eˆ»ìŽšQ÷§îX• 4e§›ºÑðËȺ©V^´übv¦<0H1©]¯[›’EµësYt_5LVè¶UÖªmagµöeyÛUZxªuS+*ëÌʇý‘ §†ƒ­=ÏÙD°VÊsÃ’‘»lú²}Éç£É޾¥5K|í%Î&þÇKò'ÂFø¸a c¿ò€¿L3ªíM§¶¹f> €·ª5™,w /~hTÁâƒhùpÔÌ6²]Y ' %™Ööu]5ãe¸2ýÙu}‘NÔxKO×.(«Š¢/M¦ºªiY´VòÀRêÁ/]UWyu0ºý{…ýN— Wxº ^~v#·6ÙcŽ’„ÁÑ`HRmÿ«³®å—Œ.(¶š¢Þ;~ÛêîIk!‘ÓÁ©Aà{8YÄg1”ÅŒè¾Ð \籪¦Q§™¨°¤±HǤMÈ\Ç÷â…ë„Áfôé¢Äð,øi¹îòcftÙ¼òŒ/K4Yõú}ù°¤>×8XYÆÆ¦Ê¬%?A†ÚµŸðHcvMVÓŽªû3Ž¡½86èrÝw»?°Š;{V9ÈÜáðó×û»™ {ýñž¨æ¸û«·°É(¼D¡“†©ÝöuŸ?2ýÇS™¡°Í*Œ–UYõÂÆý*E©!näuk&C®Œ+ÐÏðŽ“cz±ï„žÝ îû’ üÄñŸ)Jà1I/‡ –Ÿ­)ê\`ìóQ=’æà…ç É‚…G,±àѭ.¶v™ÎnË—kµµÎX•ª*º„M8Üô˜›ÁÀ êâã·~A”xð‹u;éÜÜnv;ƒ{ÂVq´|É=ÑÆxmJÕç;~ÍÍ#é³r´@K k`[+ÏR(”ØtÿÊä`BWUyËlP›@ƒ’µJa¢­öñÅš`Ä9çyU#?<çÉtÇk2bóŸ9H/—^èÓ3ýã?ûâþ4ÝèÓ:ˆ9®âSáìDe” !Œ½ަžèñJyN¡JS÷¹bé…„žâ«ªÕÖäpݼ”‹Ê ×ÒÈž•Ý»j…}ÕÃz(¿Ô ãÍT†˜Ùž·¼{óËKýz³òàñðËÍkàåž¿|Ÿu¢ xE˜cl‚å¿Zº[¤c!±úY/1ÏC8Éžu¹!©¾§ð|jL' .}â7½G} U2¤ » iK;Õ)Yœc±8¥‹XZ×¹a»?·3 „0qº—Õ®ê;>Fù£0‰/·’‹ÞþôÓ4óy‹D`åõëYµÓó`n/ä‡ê*Äò+ºšpJ‚OäŸU­i®«êô™ÍͶQÍIHöüœÚ5BÄúqHÖ–H$tÓåaþ¼dÃúûòƒ=Ict7ÛähGáaì „EäÀò¨¾­Ðº„l^Ë®ä׆Ā|ÖAwàÙŽZ–„¯Ó¬[F?Nˆ’”óô,ïwv½ÑâîÙ B^Cmb—¶.¯Î«=!yg–û•”òå5¥Å€†"€å˜†s 3Êf2}Iy‘-‰Zs(-nHLA.i” 8@®Ü q&?T`ÇÂ.÷þÍϲn•óm45¬^á·ÿ;½ÌIQµ}Qmp9¨bðš«òг øa€Š#_˯èzX;ê–a$ñß:]¶ì+Æ N+i†X?Àñf1)­£Ú“ðÔ^Î1]«ó=¨Vl(ƒù†6ßeJ:ÚLJI\_¤b$h¯Írrûˆ ¸ NTp.y6ÃZx™¡;ʉ7ÞS ÂJò"»ƒ#ÎÙÒp"Ãd¨µÕ™rïtAKÊ˘æn¢ewª¹0ó(dÝ&‚b݃,AÅå]M×9˜ë0L@²ÆNÉóŠ X!g©àbMNî`³Ð} ²š‘Œw—þcrò×N»o ¡Zû©w–nêIHoé[NSo¬£szfG•Cª>ÒŠÔ6 RŒªòXºc°Õ®ÏöúS F¤6Oå̺íì´ñ)c>å7j0ðXZœE_[¤8$fˆä›õ߯ðþ(€þ¸bøßwï.s=Wr=—s½y‹ˆ«,"0XÊHrBª™¨f±Çº7~ ×]x¡„PÚbaì‡ÎÆM @N·áCøWû1~Qð÷_¨ù ŠbÈþž¾Wlƒ}`!ó’rwÈvF2H.Z8‰´5àÉM67è8É' Åùf¹™dÔU¦e¹«Ì/¶í›`/kɳ,R™ƒßé@ßT#ÛãkŸ‡x½Wœô֔اfžHc!Š.;2!WÔ”;Î i»¸P¬Gû*ë[»ƒ°h±Ôc]‹lK'\¶§²S¿1Pr+j(‰:Î$ᕽb4>@íÁaOp5Ùûbå#µ¢>#o†ê&¡¦™L¢­áÝT¸ÖdÛ¤Š¾Œ£m@¸ÜZÅ›ç^ˆ•¾Õv#í7$;—d€(µÕ `îŠÅϺþü°mìËVÛó —틽}Óa“u¼c´·UQPzCv±†QVã÷C#{Üʺi*ÛOüúKæ?°wpCq> stream xÚ­Û²Û¶ñ=_¡Gjb1¼_Ú§ÔŽ=îÄ'9m’N‡Ä‘S¤JvO¾¾{EJ”ìÌäE„–Àb±÷]0Øì7ÁæÍW<ÿöðÕ7¯“tSúee›‡§Mmò0ðƒ8ß<Ô›Ÿ½o›áÐûÃv•±gÍñÔhGžjkîu«{Õ¼Øîâ ö†ƒ–¹º7ª1ÛÐû] ¦kªN§¾S•àû%HãkÿÅö?ÿæuÍ(‰’Ò„@'r2Õ6 ¼i÷<{AwœøE˜ºÉHÛ5Æ0„¡›3¶ŸA™„~ëe:2ѧ^o£ÔûhºÑ6ÏÌŒÚØj´V K€MÕ‘nvqûQnvaè—iÊèpF?¨v@®^· #þèþ UmlZ|†ÞQ»þ™aJÞ}ÒM³„g+mm×óßѪ½F©„±§íIW Žæy‰˜¤…[éVõ¦ržäùø›®·¡¼ªQý6,@ðüB¨ÃÃËS>uÝpêM‹(¢¤ð5²†¥WuÇãØšJ ºöOé½7Ë‚&ˆZñÂ÷Ï †-…¨<­Wí^ÖÞSß »Í`HPÄVYÛ»ÝÛAØ@èB=M3ìŒl2<Ÿ´å¹C·v´ôWíjýKD-‰>ͼªQ D]š{­F‰cIQÒÔëõGÓjœÜOã@TÐ;Û=,@~D¹÷žåɧƒÙFV©Æv¼¢Õºv?u‚tñ¤†ê0­c“Ä…h|À™ÝÚ@0+œáNV›Ç a`ͯÑf‡ƒøM­OºEuÅWn:oä"ƒP£rp’¢XUîÜ bì˜ðùdU #©Oªú3Gyá}[×éto¥à*cçÌäœÍ6eÆõŒ„ÇŽ(³8Jjæ8ñÌ Ó†n }`¨ŽÝˆÆKï–NÚïS»æÖ‚¼P1y*^ Béz³æ×?Í'ŸEÞQµ¨Óϼ[¯Á®»ŠÄ%”Tªåw]Uý”‚L,õÞ¶µ–ƒäèXà£Á²C2XT)«ùM'8yb4¢ îYéÍŒþŽ­ª*}Ôc£Ú¡³­š±Önáä5D7£I³&_EàÜ'ñó¤LÕ¸™½èJ×ë%T¸5Ó@Cÿˆ"U¦"Óà¬k0žÙîµÌ]î—qÌèÞ½ËÊK&‹qo×âÏ ¿ÅñÛñ„QÃò¢üH5ðø‚/"ž—Þ¤+$&ñX#üˆx„ 0@§Óè¥9û£¦8ÈØQ>!+ž´î]÷OdO•=ËÊÄ{8ˆñíäËà7_1׌˜ì}„ÆZõ¢“÷'¯ª5öÈóÁ¡Qè4ìa£(•íŽâ=œ/ç¥ý½Oš Ç 8íí…ÎÍ49MF?%ÚŒÆFÖ-š…Þ ÝôšâP˜ Å!âà%?,‹£ƒ A?0.™ý™ÿŸ?Œ¯xÎ(ˆ…§êºGR%žn÷Ã]­Û¬¥>§®× §6¤ê$s€ÖjP Ö¤,X¬|Òj{J/¢ϹrzØç·±­\ò—H#ÉÑלԣiÌðÌÿɾlèÇŠu!«àdM8@:¨KƒÚV½yœÖc¬m8ß`Àd¾%:¸çnÄœbåÉS”¸„)õ(FÃp&$’6%3ÿŒ3U³ß>Ž‚˜•;üªùÈRÀEc3˜ÚJ+ñ OºˆSXy<Óä\³9ª½PvšÒ†kñí΢p“Ð{„‚ç2¤Q ($$TÓ½wœáFÀlƒÉίS@ÝVš—Øêœ°€ÂõFaEêª<®ZçfZøItu Ÿ³’$Lü(ˆ–¼cJzu‡’´ôó<›¥ãX_ä p~Öõ2Ä0ÆÎ]QkØgâ æÿáÂ'p’<â8èJ H˜ÇŠ•<:eNö\_"dM‡ç">†Ž–h¡Û²‰¤ÌÄ9Ú2ñu“ ïï£0½òPˆOx}ì§y2S$Œœ<Àï[ÛUFdy–¿Ü÷”Æ4î%Â=l%@A¤Ï¼«,m5Ä, €$÷ëг´?p{ÏœÇM’Dà­˜2_gQ|$ÉEx ¬1ö>LuàápcßJšÊyh0¹I^ŸîÒ˜ƒ û}CÌ\ ΫÆÅÈŠÆŸ4fà1¤'Ý»ÞM笙+›¥Ÿ…_²w ²É&nœ[¸°Wc> Õ¼Óôïz7¨Úƒ ½ÚÍÿgË!ç¦(‚¨¼›Åe~_óSË-Á[Ø1û÷“<¼hèÝ2®,Ì®÷yež¤x¹wŒ8ñóøìÍ)pD`#wУÄõb¨™'17á.myŒ-á’ä_¹XŒ¤XŒÒ³›¦)K7M{’ñ "+¸0ü8—êEvb]|ž.5–YÆ”âÊÌ^’ë¿+ØÄÃÏø³l/pÞŠãÜOŠ™OãË“0òô\ž8–å§ìÛð\Âpùó `G‡ptt8„r0@øºáGiæ§ñÊÉš®½Ç´2…„7¼g P+eåUQ㿺Ë)Èûó$½/‹]‚’“!ì§Sc†»â†3½p©Øȳœ;ËœªgÙ½ʾ9[-“œfWåÜ#¨Ìýâ\¬bHY.”ÛeJ‰\´«§Òʧû½þrŸ&8t¡˜ÿÚfRz¹¬°½wêšno( ¸_·BxÙÂ…@Ö|£ðËCðMwµ ê¬ Zº>u:ÜBy”~Ö²“%ÆWÆû;XÃÔ/ÎÕ!ߊA¢"AD®9#”æwµË—Bú»LoÝG.wù “M2Jöªóà|ËBÄJ]…÷AD" Äûãpòþt¯’=¾œ9ü+—19gYHù9E¬œ\Ѻ«*†Á‘0Ê!*_pd¶ÕÔ`…‘t×îpÆÉ=ÅPYFwM´u¼g"Y J”V‰ò°¸» iÔÝ}rÈ£…)þ íµ]’¥~Š‚ºl±ë²ÅN—í=¶:înèvÓ¾XvàH»¿ ý&²/x°¡Þñóä@éÕ]Y)7•eBUX‰éL[+êa7²äF7þˆ—Ø{iÙŸ”»“†?öÙúˆImIßðŠó5 üzè¸Ë[6ê<µLnÊŸ!PkA Ê•ªÃ'­åµr Ó/çOµ§kκ¦ß»ÐH·5uÈ—ÍŠF½»Ñ«4—‘tÛ¼Rÿò=^PÌ@–!Š–’ü€ú‹×Ò2sž )ZQù(ôÓsL»ùaK’N.¼ß‚Ó@â?êµ åÐOÎuÄ“ÜÏ8²w[qànƒëÆ[‡ ³Li Ôx!³z¬Ä/Ïé9 qºL ®Ððy.fWX¸pó€¼Þ~µD„h]„ðÉêçZÈ-§Ä}»€©½iñ>Ä^o„éWà´E¯¯·Ól.*#wÈïÙN=¤òç»#x+i>Îo¡ê«ƒ4Ý¢È^?U+ŠÊä-‰äþ_±„. 퀺¿¯¡{Æ(KåC¶ê [•tÓw-ºûW¹èœ>¶€8Ó^pÓÜ ¼jÒBê¾;ÉÒ«ó"Œ;îøÑD»›ßz"LìP4 Qï¹ÃFüLA0‹|Ñ79Iz¾¤o†0Ú Þ¸N ºäZ>#J…p\Þ# ô‰Ÿ¨HŸŒ•c»Àˆj"‰¼”/W¾[!8™5ä;¨·ý ök7x }äë¬ãɹ5SŒ}ùÌ9Š/—©j¸ð€ ·Ç pLþeT æ¶ >%‚Z4!üÉUºXðÝÃWÿ5Kà endstream endobj 275 0 obj << /Length 2834 /Filter /FlateDecode >> stream xÚµYK“Û¸¾ûWèHU°$øNN±+v9UɺìIå°N¥( šAL‘ AzVùõéF7øGc{7‡áÙènôãkÐß(ƒ#™·/Œ.iÒ¨ú@ƒ5r¯U¥Ò[ ;p›¢Ùc_—Ä]Ó=µŠV!S?½Mä„dÂ"àÉò²ŸŠfWÏ8#[,¶»Ð½ûGeÖGj_¼¤,ªJµ4Ø×®h˜çsïPtï¶=¢€GÕZ‚âb)‚8Þì‚@ä1kP×ÛÈ-Àú¦"e Šbgì/‘‡F 75ÜÜØóSUu¡v«zãˆí/ bÅù\ÍHÁ >´ÅIX^ᚃTäaHL¾¯WÔRdt µ–Æ¡wlZlHïÃ¥{lê•›H"§¹Ûx«SR¢]šÎ¯XäQ:9C ¹ŠO`PŸý؇¿`å€,I\ÓM„Œó+²UùõÙ<A:0ƒ¦|Mµ¶Ên{›výl ~R »ƒ!6G²ŸHJÉ…ýŒFaõžä^³ÿ·*;Ü›úS¿¤YÓŸÏMÛQçèöXk·!ÁnjtÝíºfg´bf|†Æžt÷¨ë-„©ÃÓ¨ˆ÷u×Hdí¾fÙmÅî¢8IÍ¥gʪ}†r ÍpàCצ+êRëýÁèýѨp)Cö*…V4sR§¦½ÐäÂÇGš4ý'ŠVugÖ,;E\™ŠùËoYö.Jbûùµž,ýÌ0ǽ`â‰ÈÒt•ó<>¤Þ:¯¹šaàAÕª-*êp±m¶mA)ê›óâ")ÂýÄÂÏ“Í.„–ÄÎßšz¿ |ï÷Í?#çIæ@XpÄ õÌÅtêdîðéU žxBÓ¤iÒ 4ö<`ôC­?û¾„™®b"º.[UPˆÇµv8õÈám&i+ó$R]äÄåcš;÷ACN"0dm†\0MXè$Qè‹¶Óe_­å'м®íÍYòðËbÒôÓ£jy~ÉIä|–íyB ~µb”}g…„٢95½¡SC~Ý~ˆXªª4˜PwG#u°¶Å$àðÝš`W¹µÕØŒÇÞj^$ø“ûsøs*ãT$ñ*k0´ÛX%Æ´7¸!Ã'8¦pkøƒ‚ŒB߆"69Ü[U îx‚næ@ ²Þ£÷÷ÆÃƒGú]^Û”£A«»ÀÏEŒÎ5UîĸR€Làk»I馋ÀŸð_q1Ã2E³šWuvACÓh”æÛ]  XGä¡3èl"’hŒº|¤={«¥‡*&´:þO¯ šÍб4à³–Õ?¢Q嬇p lÙa^…ÛÝ¡WUÊy6ãûÌ6§×ƒdú=hSNïÄíƒtE`xxö2£|³]7pIÝÇÂPƒùR‡ïB{2ŽghOæ)!™'7Ð^(¢1æ#ÚóŸE{¾Hòð*³¼!)æØÛ˸,Œä5é—òáŒô@r]ëNSÆñ¦Î#Ò5MìXÓ _ ÁWòh‘¬‹ÁD2 TÌRÞ„¾$¶L–&M&ÜA§U]ßâµ§BVõ‘ ™Ï²øG²µ+-,1³. »l,†S!üAYt¼pêLFÛ„6ìkÉ2Ód´L–ã}犤()0¶¹£å.Yäœ,`rgñ`iC§7t>Ìóù+òDZe¼"¿¸‡·@ŒŸÚðvƒ“Áéú&i¨Ôã Ù’ýl:›TÅMâL*¡eoðʪGÇpr. ÝÞMÈ6XË'…5ö©0YòUJž„ßlYQ6èr¨\8ù6ŒiJÍùÌyÀàé§ÁgJjš±$Æd%#)V=0ZaTÕ->l€¿‚;ÙÁ²hÕ±¯0 AaÆl2Îp ßAN–ö–MÓtí,?ÊbïïÆ2ŽO½éhªM`‰beÁ£ceÄ ÉQŽ£ ª[ZÉ:ZI\×ÃÇ€–wÝtl?Á}_FC>%‹ÿÑR€ðç#:¾6äù ‚¬©©e•«L˜ÇnŽ2ï¡g„‘J£Éà*‹Ë}„-g…Îbc2ô¯q4®æÒ¨ò¯®k4aœ®šæ,(„ .ú’+¡æ°é)`ض §'bÉÔ•Ô El8ö-C‰Ù Ó'ý_k0g!= »@CpÍãE ½©æ—0ð Ú5&îhÃgZ +榵¤¶&Ì€Î8³9WHrú’M+Oç§èíQšÞ«îI)ÞÕƒõ6C].Ê®Í#%6:â·¤HðwEKî(Öušéœ‡¹U,kµ¿ö¬XT¦q-ös=TéC4 ëÚÂí®8,ewáfÑ‘Pã\¿Sí¹E`zG#‡K]œì32š¢~è!0•JAä?‹Hßg!îϰ&満_Ä2ÿžE0y[ÜEAôœ•ÓwÎÙkà¿=ÞB2¼¿€2d«˜ßF>¹~m à›B§¨=ñ:ÂI$’,œ›×¸=ä‚ 3›&ᇀ1ÎÔÈ®1Îj‚aÌl‘uè§ÃÛ=RÓúZ&js¨•FÑGqtýÚ€š(öCû,‚Yà-X+°q”Œ£ ‡AÓïí(õ, ð»ÎB ?K¾B¥#r³G ²H·á!EÙõ…E òªÎ†iëíØØózÅð`©{’ÃÁxìô}<'‰Ì íÆ30ÌÙQ$–¯”NÍâžq», B97_Ž<1˜tfx]‹‡µo&cñ`c“ûÂáÎ=5a4R¦lõžËæø>g1I,­ñ° `"K8\IÍÉ÷1›_v1äé7˜'࿪ßáÓ[>:-¿ Hûp3¾eä.OàÓJ[Ôæ¤»Î>íN–øÃ,ó" ŸúªÓçŠwO³äd/o|h›žŸ«ŒÆE­èê(bD2·1ÍŒËÌ¥îŠ_1$ä.Há7K0 À†ºÖ_#ó øÌ\85ù€ˆ;4ÿBÆ ö àaëê3K¸Hù6Ðe«ªÇµã+I}ú¦¾ò 1+rGw9«ÃŠ›ÁýGc†ÁKB'ƒàLE„- 2‡Ë õág®”ÈAít 6£Û˜"³ŒÓ)Xû‹Ñcȶ`$ðVšHÂ!â›\"á GµéîBçZ³¹âZ»_Ú1«™EŽløZÚ*y®h°ö±iî¹b¿ïýépÐxE°Æâ I+ÎÏLˆ#—šE󊈑•w4µ3øtïðcEþòb÷ØÞø¹ø9W>AØ¢Äàá±™ çyèÄIQ˜1Ÿ’øü,e<_EñìuѶږ ø¡ûR—mSÏpkQ¶1`åIl yÚ[ä<£¾PÓsÇ¿«š½û&µ¢‡™7Nƒj4áŒdtu^r+Û–3í×mS ¢á‚œ'ß6'gj*íbZaUð–#ÏN4&nɱ#¦~\Žwü^òœë|:)VEümBÈâÜwKŠÿ×Uø³*¢´ß2}³sþ|ÿêGìÀë endstream endobj 282 0 obj << /Length 3531 /Filter /FlateDecode >> stream xÚ­ZYoã8~Ÿ_‘·u€1[¤¨ ý”¹½Ø =ì3‹†"3±¦eÉ+ÉÉþú­K§e;™‡Ä<«ÈâǺ(ïêñÊ»z÷7ûýîî›7?Ùà*QIh«»‡«8VÖ¯"í)Ï®î6W¿®~3&¸þ÷ÝßûiW¿®Ï[½+ªû´¸^›À[ÕnsÈÚ¼*¹Zí]bµázsȶ\Jû–Ý·\Ú¥仡–—£šk3…¬¯Ö:¤…­u¤ßðÂÞ—Ø÷æ§ÐŒv ­2,“FÜ~|½’dõPÕ\øøÜn+™7Ùy˜(›˜n"ðãhÕnÆ,L¤lŽx¨ï«ÝN}—¥Mû›xð§8$ íˆÃ1áDù¾>¢ûs–¶­«ÏPÖ^¤‚$z=éw)ìð¦úœ€yŽmÆÕ‹.â^æ¤"ºp¯|=ЯQáEñ*-šŠK¢›Ýæ[¼vÀí3÷$±P•E×4'u1þYÆz*`b݈âûªÉËGqfDgcùHgw94G•hìQ%ÚN<*ìæv¿gå žHÂÀÞ4ëßRo·uuxÜv•%GÇ}ÛÖO¸4÷j%:qÓÀbçÂŒÅg1‹7ÐSZ‡ç­N/^“úâú5¨É@¿Šøû²­ÓLôGy ¬ÆÁeˆ—鋃[ÀüL—ÿøGsž9ØM/fþ êtmÑé&^t @k\r àú–ã#‘×/Ú—ØxÉ(¾ð0Í«ˆŸVyÃ1\4¨¼8 /žr¨õò)»KG©ý¬½™Z{c§š z“Ž•Î¤cYTÚ[8\­W[9ôÁ)­¯­Çò Ÿ6jµõY{ P®Ý9œJWëÕVaqûCÛ)2šZ Ppà ﺉ 7 ‡#~–‘­ôT»n ›wÀo…+òé±¹_Ö¸4P¸wNFÁ–ÐSè]ÙÕO(MpÐ%¨-¸ða@ Ž0“ËÜ"ßåíˆÏžhGvVãÎ7ÂXÆà9áqÇ>N¿Uñ9JÒxO0ÞêÑa]Máeu'8*â׉šÛv€¯G†uîª ž)v i–ô¦ÜsŸ6XhÉOõí'sÒëÚ'Îè–1‘5uȪŽ®.A/(§:Ô™“ÛÎó‚ñ6(‡Û˜;§rUï¶ŒFËBåbǶl³~:+ ³Àšu8–{8„Z³r$í¡Sò#v¤û¹>Ú¶,]ݼh™g%,ÛjϾvr¿,Ë¡pÍ·K"Þ¾Ïð½9gèÊÛ-—R’–,Û7 ^b5©— Èõ'™h¼T‰ð|=ȾÏG™¥fÄ s@Ù6-ófÇãè Csn…C‡æ…Ž”hP@ˆÇЦ÷EÞl¹}’„âC vÜ,8z`R‡¼iëÐEXÃn1:ö˜‘º‚ÃF³çéÕM)™Gœ2‹Vr½hºG^Ÿ¯v‡·äG+tUk®ÄîñO½[j/VÚN¢É ·?cfô\&µC7éáPfÃBCÀ‚IiI,Od•ѽ¶êÞÈæ—'Q:˜dŘÃrbR+¸J“û@§õ¢Àó™&,ïFô %E9Á?mmÚaä#¥Ò6ø+›…}Ç‘2Á`çá¨óÌ-Yúä3 ÞÃpp®Ê>Ò$ïŒÏø¤aŒðaÂ,ÛÅ›,sû³ @!öØ"’·–Œ`‹« ¤‹,ØKÍÓ)1ôìž_éÙ;èÚØ§ m5æ{÷¢^–i ìð}Z¦€Ïô9=2 ±?2 ÀmY€A¤&{ÿ¨ª/‡ýe\YX—ã ϼ%yýB¦ƒWŽp樺Mpù¾„Ãc-x¡˜GC¢)3i7 ßê™mcugC¶ 6 ÌFšGöëq_cÚ°C¡=e_µŸ(s*?þ}U–`HÎâ0!„Cp¾xùØLÿIÜCä*›ø3èTÎÖ3~gVà ÓGøa Ðàò¢×E*Ž^êôÅZùöÈéÃOÀmý'-È(ã%Kôô–›//lÖæ˜YˆwíÄúVsæ š)3¿EU>òP ܆^âh§ˆ$A!;ôr|‰-læ°”U’®œØyžõN˜ ñõçO?äMvñ¸f‘B8Ã#@fu³Ùä(>Jc°çá›pbØ}­ç‰pÿ›mu@Ï{kW8þLƒ*}ª«i=ŠŠ´>µWbÆpòíÀ/åþ…–ÑÚäüƒÅÚà!Î_H¦EÕ¸‹žøõî”d󗥘…>g˜M—aÿš ó‡Ò­Î9 ÅPjp}_Q!­†iÚ¹Ðö) äÌÀœÔ’=Ô‘†§7ÙŸÜ®¢Ï)`έ< #µzü]4\0_çžjÁ;0õéöf9Wa£^)ò›²Åg÷‚ò¢ ¯‰b*Ôiwox¨$eX,Ý£S’¨ žéŸÆ•›7µËÜôó©8À„*¥b+ù8˜;îØ×eÚ W’yPJ¹¯ê†¾HÀiß<º–;{úÁ4a‹ïO°¥Ñ¡N8/zô²ÏëÒùž<ÁPSúI;®¥~wËü(M¤+= ­0¨ÈÒ}zŸ9ya¤9<ÝÚæ[R—P–”kþ_Z&4”N$_‘Ñi½áÔz;³¡·¨ã(X%-ïy³4ðÂvûe ïŠgG9Ž›ê¡íØK(H>6+Ó­Ke\^'é$#WçmÛŸ‡ákŒTÀÝfÍN¬‹¼µD¨ËÇ݉8…Ù±$½£§î­%“/P/»ážâÏR2LmGìÐH"Rèé>4¡Æ“÷V«ÝëÒ§¼ÜTOK\ú8êÕú[3‡Ï_$³uÈç¶¹Óþžû}AߣÈÙKdÁ1ç¶âÎø¦ÅºÏdÀ[’£<›|Èö£P‡ëosÈS–véÆñ(„·!/Rú”p3BŠÕŽ­ *ØJØÂ"C¦ ÏŸèÅ¡äèaÞ}0óÑrï‹*ûÒð0‰pÆ ßŸ†¨àPú‘òù:šLøñî›ÿ4hL endstream endobj 287 0 obj << /Length 3700 /Filter /FlateDecode >> stream xÚ¥Û®ã¶ñ=_qm`­¥D]ѧmÒݦh»‹î)…,é+‘%W—=u¿¾s#Eɲƒ O"‡·ápî#õôò¤ž>|£äûû/ß¼}FO™—ÅAüôåù) ž_yJ'O_ʧwÇjЩ¿Ë‹¢†ªÄžÚ§¾›^N<ªbøóÔcݵ]ÇS'ë¬^$f!<|ªmuê/0‡>cŽ} v_‘¶yÝäÇFÀÇ+§¡n_¸Y·Ã˜·Àݲã3‘„SâÞ%/ÊRç6Þõòaè*2óŠ&´Šw­«W>åµnËÎéwÇŸ«bˆ¶e^.Ÿ’.¨ƒlWô0vɼ–Öð>yÓП}_Å^”«xßÒv(=$·ÊR/ ì²s&‡ç£|›†±¸ô)‹á¯õxñA¾;Ÿ§¶.ò‘4¬a†¡áRõóÕÞ"gZ1½H­ˆqAï…5øà“‘&†!Å8UÂè9T‡¾a鉴›®}1;¶U¼÷†;wX$N¼$×~JòyÓØógf7ä%‰=uS#í£ ˆï\•žaíeÊ_Jâ—ñI`µ34ÙÁ.‰"Á!Â>«mhXE mÒÀpq B¼"{ȳ³x/Ë6äP°‡kÖlØ` ^i7CáOÓø€À ¼ŠÊfmr»m’}ólª_Ý4uU”ïM6ØByYš¬·gÍ׃SüÀ÷¢ÈâÞW(#cDýŠº¸"õ¬|+i XnV8¤Ú‹C‹î¶âò¡i©`ÃCë"S 3]jć…+yä'2d$*ØJ ©Û‘lKú¼ýE†J°Fìq 8…¹/ÊÅì\2ôîk„—§@< ¶C:9ÄœvÌiåeÙÛsÈ(¸óD26líB'5]ñ‹‘\¾*!q¥6-(Ë­ÊŠ]WFUF"ˆÒèY2ƒPäQ¥ y„é,ШÁ€×E="Ë`¿íZ°“íd‹ aäÖQÏ΃Aë(Û°=Ýr=^Ñ…èpVoWŸóþÊvðÜ•¹Vॽ+–o‚“݇Çþç‚›ôÕ¿§º'K£ÑÐèúú¥–)–ah†`R°±‚ám%®cå¥Y´×Ï€Ô#}^â[AÝV‡ôuì‡ÛJì[ò°«X§üpi+ð~¡f[ _¦4,% -”ÀwŽcygœëzžÆ¢cÎ#‡!?8­ΖÓ6h¨2Ïoh(úô¡ŸdB„˜§|ê†GÔÕ©ÆÉcêúñ–šý!¯ÇÇÆ7HÓA=¾$ù”±ÏŽA ªµ:†äü):0Ç+F8Û½¾ÎÉ·‡¿Š rHcÿž/¡ã-£ô¾üà>¤žÖñ–v†kÅ*Ü}B<À)]Š]˜®¸!Ý;ÖAÕɲ¦jkPáÈ[ p]Kú%L #¦#¦.‡¥ÄIÃrÎêœê—Ó¡q(d÷u°H'±w‰[‚‡RãZç¡ôÌО3\ù¹³Kmܾñ°L¦(fa·mÀ×(hb”Hi”Ñ¢€Bö»„-|_šîÈÚ#6ØâVcníÔW2ûX¯G÷ާ‡òÃkž—ÌØ3oëŠïÊ’(i8@clê $O±â#:€3/-7ÈWÖþîe!oKÀ_ëœ6ý‡g›þ0f¶›dC—…¸¼ÚÕÄxY€"¥ÞܾıkǾk¸ÃÜ' —à}jÖÜI4s ´›üÚCãÒ–¿hò™P2ËÖyö:@’$ãÄ¢jÁBÙLÐû÷àQ1÷ —D¹,aKPÚ‹â sP-_;vú$D§nܜʩ„¯;›¼ÏŠWŸ‚)QQ'Ž•›·Ð9[“å±ëè;š RkM°H¶ÞQ8S ¡eĈãŒbV&}ª÷8•¬£@Ph '7üÔÏÍûn"®0‘NŸ9Þd"©Ãù¦Ü.8™^j]|®­˜%öTh#RÝñîì^V¸D»ä*@€7 1û Ú•É{£eË×fS“¨ÝϬdE_¿L$YØ?^Iõ$$PUNù}ø`I@ESTmØLŒDb2â zZ”^@áîÙ2â¨ìLLc€FArnGŸ·WC™ñz1t^МŠhž%úö4õ mf˜Ä2ªÉ"ƒûœ$«X`€¸3.$å:Þ±i1#S’t@›5 ·IÖ¢èxN¶ô¼ È!¥Y´hqÛÊÎ6¨‚?òdÚü]¿§Ð§GqBÂëÌyl<¯—Õ 5Ì zËô4‚ÑQ¾9^€Ã/¡-«m,ÞR7ƒ!Jw>sèƒò6‚Òh%ba`&–DÄäªQðtʉp†Q¤Ç â؃o]äÇLº¸³øe!.#Ó3ÃVÕ*ÜØc\—¹ô¦N ŽÖm¹A à=*ƒÃ–®t$Q‡ñªé+>ÕößQxˆi sµŒ­Ïì¹ù}2ºt£´C;`¢ÃبÁc’˜H7]Œ›Ý 9ÉeÜxâüœSÉð>åÃBá«”lÚ‘­˜楡Òè$ ‹fúÖâ!ò ÖŸ±K{ݶ¢ªêºïXd•#V*^–¯è¬^æåjw[ýx_­çÆ[>™^×ANplp% 78n£Ž [&‹Ì )yhWJjuxÃìÊ·¯ËÉh–9&‰øµÁÓIçû¡Ú1¹7_ ¿¸¦è@ÉÖ-3ÖÆ­ë¶kÛî©2Ž Ú`.sŠ;Ëf?qHrç„)׉Úd^ôïg"c z¸¸ƒÊ´nßVfýøµ¢ëÿ†r«ïE©^Ô[gW3ÈÔ[C‰§˜>'çIa™ÝhébàÐ"7­ÅXR!¼«®?›*å\ôÑÊ-»b—ÂÝ¢e¥¢;) ÷uSm\(åßÖ]#Ðfæ#ÏOV<›«úô@ÐøñØ# :•VÞ©´†Ê‹B½FÚû¦ìqYÅ7…@Djä£éIàÔYn«?!'&Cµª³Ò±V¨œÐó Vx±Òëp¯˜²EMé„v›Ÿ©eBèÔøî)»-kÏÔQy)§ý1ëï'»wÏ#ùØ«„²“-ü.œÍ^\*©€M7˜}2k~ŒônB? <=×Ðìc|‹Û=N¥òÂíT*–—qIˆ9{k*µí²t[Vúšzîu®çÚú¼ù†øçGÁ;«~­b |/ö÷›C_ƒc¸ª›7ÉÿaRš@ùŽ_–ùb‚`8¬+’–¡'#¥’“…{& ±8‰ëKy\¤þ<ϲÄ(—7[Ú ½,–¿ÁÑì݆ÉCw&óíÂUž=4¶*ÄP îÉ¡ÙéÕJ\í0vBÁZì~?`¢ßð›šÔ‚Øïò¹bÏQBY#à¯2Œf‡) òÓYç"ÐqÐ\:ãzñŸÃ°Ü×êüwBüi³y¤Ö;m%+Ù+¯XS¼¿`ß×äÍnœâ_u¼oVÞ›"™ÊÁ&ÏÜ2ŒZÔM}/W ÛMx¦‹øòÍÿ[¯¯ endstream endobj 293 0 obj << /Length 2566 /Filter /FlateDecode >> stream xÚ­YÝsÛ6÷_¡GiÁÄ òÞ|>;—NÒäßä!éx( ²8•HIÕu¯÷¿ß. EŠ–ä¦ãI‚Àb±¿ýP0z£·AÿɸˆF‘„ÿeÄG%|8˜¼{{ñ÷û‹Ë[Œ8gIŠÑýr¤ÅHó€RcÁâÉÏ÷?~Ç!£¯Ó0Æ7ùDã_³r"‚q‘oL^§ëÉTèxü!ÍÓ Æ“)üoðS÷̳ϲ·IXÁ'¸L0šŠ®–Ð]ÞåY¥ëì÷´ÎŠœÎNó n~˺§­°GKÁ9!ÑúP,vk3™J­ÇË]>GŠ¶ÛtÈÂ8t»>½cÈÅ· à§ s"ÉBÉý†¢ É šõª4éâi„Ljå7âՈnj«}Ú·YŽ23GÇš)Õð¼-‹ AÕ ' Bƒ¬« 4šÊH€&Åhj0jY› )Çß‚@äû*“j\šjk@à‡àIfý<‰Â1ƒCÕh·Ó &‚¨#Æê¡aÑ•¤à,ÖÑ IFLsÞ£¿tÒ<®'‹AyZ‘)©²r"sY¯ðÎa0 š¯MUW4\‚YÙAÖ÷˜#Ùà+{æœÿÐýì¸ÜÍýÅ.¸}ãˆOFóÍÅןƒÑæUI_ü«ñ6‚"µï9@ 6‹Ú þTÔæob–1xþÅ>œò0Å”ˆOyXò>Ís<,bB73·Šô8×»t Vjßæ04 ?­LN£çbGƒl³-ÊšÆõ„WfжzÃn„ì~ÍÆùÒ]–ÅÆÙW,Hä¡- Ú³ˆ›»m¶™Ú>œ*a¨›S·éü—ôѼsC9ž!øïðr\@°Q¶¤§ ;‚ãrœnmºFÉûå­‚ÏëD²Ó—j7_ÑhžVþP”w–?™\:TÉëÐ9nEú’í¨.¬8I+”tWÐçYU ±.i¸´º³úé¹^y¯ÍœkôøßŒs㺠ç£ÉM™ÖÆ{9=­ÈíÆ²„ë@ˆ~Ӄ̭¬weÞÝKgÍͶ§l½¦ÑÌÃQšU¨§óÐ#ÔÊÚì+Ñãp—j(läþ+0)T  È6Žc¬iÍñãœ(AtÞ‡%€æ(äǬªMi5ª˜Ã`öLßwš¶n̦¯/¯¬baèc i€ ŽY“’ fMqL©TÒ¦R½h ܵì}z~¸ª1eÚ¿ÏK©S2Ýæ+v5qfÃF[¡KÀ\º«‹ œ¹ÅK—!Ä,R¢ë9D%dŒ¢8ò"À1„͹©*SÑ+kVƒyKˆŒ 8$ÂU€D`š©N#_lùóIAú–p‹Y4aÁŽîW Z…q¬Õøîv9æó‚Íß^ôD9 °<²Þƒ›sÓ¹ˆq­ãG“W»Òô°äÏea³ók}ÿÕåNÇŸ•¼7Ûµ­?ö*„wùÒ–,å&mݨW õÓ€|)î ß„;{]]ty›”‘Ë’¥OÚÊÊr€_òÝffJÏÓœVÍܶÒÔefÚdoAÓ¤5\èã¾ÝžÅ¨T”ìToMýð+1r4çá ’>¿Œ:„ ã]ݰq£"VRš«Ÿ°Ú+¦­{#äw,5Ëk>Súèš`;Dí‰=l ÇoªÝ¬e~qž0¬zÆ;Ú™r»Jaf¤Y‚9©Å™‚tÒH+RLEù§›c~ȯJåYÌ}övWõ#~:ÇsÜœ/šÓéY8¸9ºD Î¿9 Q æ6˜®w¸z\,i~ qËXD 삚»“uìWÃ\:_ù„n1qŸÉbʵû>/6›]A¢Æ{Øë°ræØ)fuš5GΞé«Ïê‡JSB³( Ø {©ò5pbµŠ—:¢ËªÜ¶JÙ@Ò…O™êU“c r9Q’Äû ]üðááËÇ»÷ÿ8 ßY^Õi>÷Jþ³­„B&dþŠ¥/ѾÏ6àŸà¦Õk:'>JÔv7¤Î´!fÔ™q&›ú¸’¢©yeët¶öíª,v«c’äܲ£Ë/xì± ®©ÔÉÊ>ÖºGuþËÙT›¶Ä÷*E†šÉD;¥¸¤ô¦¤[IñëŸp_ÿœ©",§D’‰…Õ —è€é<Q s+¤ìÆÕ*-)‰ƒ4iG“6ÙŒ)&Uô‚X_zúžu:K Òàu›–˜ð­émÍJ8ÎT˜1A±Gà†Ëö±68H€°1Ä]µÃÀÝ¢lÞaŸ%Ü×óÍÝÝÇ»Ïw7÷ÿ¾ûi0J–´[^4Ÿ¨Ûtd¯înn¯î¯Þ¿ÔrjkU‚¸‰…¸FZUÙ£Å;œµ!@ú*&ÒüÞ6¤Àº¦Ÿeïá¬vÌA¹ù¢@BOÝ¡¢3dÚ´Ïjg]a‚ó„vÕ bç°S,ÿõ/YþÇm¶6ÿcŸ[A[NKG\Lð˜iqJôÑxr¢8wMÈ>'oÏå„'œ‰VÁî?KQUз/¶tÒÛ0hª/ñSc¬ÜëÐÍ úÐqòjcQ§ä„ã*ƒE’!ìfÁ€&| ¹œçÊÕR´^…ÑÕ-o¢L7žóóÂw1…Ö»:çûõ hH™N4΀ÍhS |ºä&:ìH@¼Ï´„ÂdW^ÍÎCY!ÍjÛ#Áî]6_9Þ*Ç+= ù¤ƒ÷ø [>ñ‹´\Ð[[Wõoð]%;Ð,†O«¾Ûåo¬M š3Ýþqn g“fÁÿ’N ǠɣƒNK·æ–,jëÕ²¶…*ĶQ-fI*Ù1Â<ÓGj¨SUf Â,íÒMø¾0vëš&¨8C³Ü­ýêÇ}*¹C;88‡—9+•NûøtnŒ[}Ìb)ñ ÕƒâA_î$žòu°H79¤c…'qƒ(ð¢­ã$@ Ð…ñéÑvܲ}Dz~-ÒÕÏ7ïoO2öbÀžŸ‡À7 ÃH‚˜Æ] ¦®×òd‚pdg‚ñtì9¹ ¢OCÙB´îäš@øSšµÍÁ7CE-²nz™ a’ÂŒ@îav†{Òšq.º¿êùrºC2 XÔ®ÕTš´núO>ùFí¹ý§’`ünI+íÔk²’öm-Bâ7Û¸waAB•Å»º!#u¥"‡Ñøúòú‡.o‘ xzé @J}½á#å8«i*sdJƒ–aò])rt5¿=h¸¦@=Çá«Ó7ðŠög\·ˆ<ø_EU%xÂ~–ÙœÑ}k¢6Œn¡ý!Å–ÿ©ïT`yí:=Þñ‡1­^ߞ߇ù Ó(—PUBÍmíÓÞ2éD%ààÿ²ÞQ½ endstream endobj 210 0 obj << /Type /ObjStm /N 100 /First 886 /Length 2567 /Filter /FlateDecode >> stream xÚÅZmoÛFþ®_±@¿Ôd¹³³¯…QÀmê¶À`$9àî‚ eÚÖURªãûõ÷ E;V‹²Ä´€åËpùì³³3ÏEÉ+£(EœÑFecD›”#\KYyïe£B¶hI%‹ë8ÎÁ£eEd䌬£e\å„.3Ì<¡ÏŒþ‚‡aNŠ"ž´FN,ã@ºr@8ÈYÙöªô*'ŒûÖe§‘%RÖœ%tÎŒ“÷8€]K^1Y± Šm›¨Ø±I훬8¡µFq"?²–çpÅcØbŒ1:r8C“ø°V,¤_¹ÉAzÉÊyár‘q‹I¹”hdÙ*oЧeVž"ŒÙ)Ï$W¼òN^‰|üF'6IùLr+«`äŠûí©€—ެ³ ”FaF…ö¬‹*¤UÂD0ƒì„y´‚#F˜Á´E²ÂePÑÊtø¨¢Kvd}R1°ÜÊ*Æ„[ f X&ÞùÁŠ`”˜¶„ã/ W Ú$Ô¨­XÈA#‹1¤1Y·D'•Á„ÀŒ“>2àt6:…±Ë•Åå?3Éb/½À˜3@]v,Ò"•½Lm•1EFå¾1úÅS’\Èr€‡“L-ÞšsÂDÃ;±n—’£ >Ï6$ƒ„%üý[,2®½ ï54z1 px+Þo"†eÅýA˜<€Y0I¼W€IžFÇÇ£âÝÝ¢TÅÉ|^-GÅÛÕù²=ÿûtþû¨ø¡ª/Êú½ÁÒ4Š_Š_‹ßS{2*Þ”“¥zŸ¼ÎBZë²x·¦öN›ìav¢ŽUñV?Wï*U¼Vß6«óÏN«¹fÍGêûïGøJdmeå:«Y¸HV“ëGâ†Gâ³n§ŠNFMiRüðP\ÔṲ̈“Ÿ´å~$ax$ì5G ³N#hX4[?’8’HÚHD'0DÞÂW%¦Q_†Òáø Nb€Ø–•CV;cûqš‡‚¬ª%×Z|›ð´s¡ˆHÌÚ[ßòà2@»LýP†&¢tCÆFT‰A{Þ•á=…<~…\Erì’, 4ÆýP†Ï&AæH6€_²Ÿh†m?”á³I€"AOÎhƒ…U°é‡âX¡Û²Ð¨XBÁA¸ûí1+ χE0΢£öØWaS¹Ë¶!} ‡…£ÊnqBö”j8÷C±ƒOÇZa‘„$ûl  v2L 8¨g'…¨õ¬°©Õ޶&ú¿ÁŸ†Çá€k8Ç–ïE†ÏÓñ¥÷b;­èá½Ø—k– ‚¶ÕŒÄÎ^v餕íJ7’v ÅÉñqû‚â¤}wñ¶øç›_åÿÛëårñ]QÜÞÞêó²º]Í.uU_GCñÃ^€I k‚df0_Áº†–§/G–_.«j‰×•›ËêBÊ^»¨ ;0•Ô“ M- C¾ºà{íœÿYióŒ€)NÖÚ‡;ŸÐ¾ÒÆ…'ÒÆ¹=¥”èZ ÂáNÚp'm¸“6ÜIî¤ wÒ†;iôá®?×õçºþ\ןã-R§ BÄd)“./‡Ã#õ‚#xd¦­}jU"I&™¸ žfyAB©î1¤rtî…€ŠíˆAB²Hn Ï^[¸¶$»Ôf•¸vÓEwàš\ëÛR?4éN6RGôpö2Õ¢:€*Lí#xµ”¹¢ªZ”sA6,[YKéþª³IÇ_–C{_÷rÅ VŠÎ7Q©»ûídùÓÇéòèÐ å ³|Wq®­b†¤¬;dZ/?NÊ…<ÕÁ³ÂFã¦ü©®«ú³Ìžínþ¹a÷LˆýÌ&ä íØkæ 5Ù§^»¶ DZߎ|ËïƒÝÿ£|­ÿ endstream endobj 304 0 obj << /Length 3065 /Filter /FlateDecode >> stream xÚ­Z[sÛ¸~ϯ`gú u"˜¸ƒ»O7»“î6M¼Óé$y %ÚfC‘Z’ŠWýõ=ÞDIÞ8ãÀƒƒsÃwG÷Qýô"îžøWßG®ñî§4Â?èqÙžß¡§ÓH3’$*R†e’h½µ…R$ŽuÄ9á<ª³èîÅ¿fÈ&^ݼ¸úQˆ(!‰b*º¹‹tB¨æ‘Ž)I´‰n6чſ—J.ÒzIå¢ÌËûï–Ÿn~†Ïäà3ɈŽ i?x³ÝUu S—+ž¨ÅcÞ>¸o4|£$’…oîêj»\©8^lw¹ØÈ/o߸÷ÜRCåš#¢%ضþm†h1 &=æEá˜Y§û&sÍÔ=Êtë;ÖEÚ<ŒÙ†–\´~BÓ¦å&­7–™ƒH¥–Tn¥·‡ö¡*q‹˜0ª¢˜’!Ü«î£NÐÇD2<&šÉ ™×¬³]›¢^uS(ÂL§€Û÷Èdl·ÔûåœLmðõÍÈÄ"Ma‹T£y}øGèÿØFË{´³¶`ržEô,mdž"1ÖRáŸ_"ú°’à7Ë$^ìÛªÎÓbBñk‚ÊDéV42¸Ëi\a”p-ŸXd]`úO ,B“ˆ`׿•›¬ö†]•M[ï×輓ƋëªlëüvÉP8Ðݸ™_~VÜÛcV¬«mö—¯v E9¿Ö%P²4ÖçÍ™13=éÏ¡¡ŸôùœKX¥ªa BZJ[ YýؘÍ]ÜU56Ø N ŸQÕEÿf¿Ã ߸@·KWæYÙ¾tF‹4I(ìò5*þs‘Í,Æ8‘I·Ø ÃãÆ1 ¶°Ý—ù:µÖ®^ݹ¡û¬Ìj :܇¨nÿ›­[ן6®̪÷Ü-Á$ÓX_qØL™¥µ¸^¹ãƒjE´ò§‡ôrØeÙæ¥³ÔM^Ûe°Öuê x“¶ipïØ…¼ãÓ9ÁÝ’ÉÅx ¼¬vu…òü’w.äöá½äc,ãŒÜ¿ø¯ûíÛÃ`íÆ)›ˆ*8Å n\ÚG¸ŒÉñ,²®OóÚÉ_‚œ‡ü¡´ *ñK1·Ô–$\ía²6‹‡wéLÆõ´•{âyïLb  )NƒI¤E±**ÔØ#H‡€ Íœ!I0vÆÃWÛ ˜Ý4n Ý.ýÍ£ºX†™3UàË„9öôFÉ£VŒ\ùgäqޏD±4Y¹A†ðÛ™E8rÒ¹ÎËrñ£3üò͈݂dÛ3Ôà¸4¢›‘=‹J'×ày^½Ö8Äa„Ân=ü9xʽï@¢èüÖ²}_†j€‚eüÃ>²“·Ëñ.Ðp2—åèƒÎ,7C³sÕÈ-GŸ·ûº ‡I‹}f}Ä3r…›Y{£0Qd~Á$„ Jw³q/35€×΀ó v1¦ØûŠag3.Âa…Î+ße¿ï³¦=E»›——Ì×Yó=˜Klƒú®È¼’`9ë–ðÉZ\ Í;”è'ކѴôAšqv¤Óû Ê}c³… µ™ýÄ$ÄÚì¬ésЗTTÆ®u˜ó˜æO'Øoy|O° ˜56ORçb­ˆ—›L@Cr|8œ0S@†=‘KÁ¾ #Cbfžl¦†šc!q¥À –tqpm4 |†øÁºú¡ñak‡:ŒãíCÚº^khCju¶ËÒ6Û7aïi+|°gC€M›m“E:õE|?c¢ òCÕc_'¾œ‡IñÅÄ\Q5Ž_.ŸdhÚ"™ ÉQÀ\­öVÀ 5SÀ5tn¦Lf0†‘—\f“7»"´½ÍÌ:NgƒXºbF/Asàài—m f)Í/Jöu Ëí)J}m«¶Už¸C¦“«Å6GFk»¯ÝíˆYp8®è8ru8°™Í^~Ø·Õ,ëÚ<ñžçá[Þ¬]Y¾¿¤‚n{}¸éÊð<ñexß¶¥Fh¼}ýv¹¢qocóñssÿôW,îzA„¬¾uƒE9[扺=Á[äÀþõ\:ŽÛ°å$m£¥×ðr}u$«2§n8Òä÷e¶¹Ú—®á:Gò¶=¾¨ª=¿ÚTûÛÂSÛA*™7{jÀíiqåJ6Îb^¥ÚÁ'»ÉAœEÕÐp^¤·y‘·7â¬ðeÚ®Ýo°7hµ &äž.ðBc—ÅÁϧÞŒýqƒö¡ô"ÀÓÞ”nVëJ0&¶×Þ©œH]üÄIä~§1ä*/a:ÛŒ•§_™»+y+{%¶O’Xc² 05ÜËúmnæßíËÒ)Y›þ. ÚͺÎw­¿*òI´P g~Õ[v¹ `©jÚ‰ø@ãà7Ûæ„Në}k—œÞfôQUOÈrľ¤µÝåÙÙúI—5Ô[¯e-…ÃÛUå+eW-^ó·PTÕçÐôgøw^DÏþmƒJH Ù¤2+ûß6hnë2”éâo¦O{-Ç‹±¬p×â”ÂZœ:Áüµûa“•£}Y•î)Ücç‚mg+dwøºß((C eÃ]/ù9d<ýoüž~g W˜gÑ6åEH˜œ£ ´ ZË™_LÀ…<ÏÅ”Æøw(rü“…D@Jæ=?@ßÎQ:÷ðf9uÑb©ª2uàxèI ‹€ ¹Àš®]“Æ£O@yÿ…ƒïé endstream endobj 309 0 obj << /Length 1339 /Filter /FlateDecode >> stream xÚí[ßo›H~Ï_±§{±¥²·¿J}iî®juis©¥{H¢Š`œp1ÆÅ89ëtÿûͲ`cl'±1©Û K6,ìÌ·3³Ã7»† kDл#RýÅ”)D0S¾¹¢( +gïŽÞöŽ~ù]D)v¥d¨7@6C6%˜põúè¼Ã1ë^ö>ÔP‚Î-IHç´+H'G©•ÆÖü¤k1ÛéÇQÔe¤3…¾—†ñh­J€*‘‹]:)UXpYL€&iÐ^0&—úÊgé Hµ˜µW~:1'DÓ3ª¡ îjèŽcÆSm<Ó0ÀF 6XˆIP–‡þí0X‚PÍÌ¥*úAb ¤79¸‰ã>ࢯs1ú£Ád@‘þ@‹9XÛò[ïè+4ë¹»ÔARl äG™L!\Ll¸J,•’ Žþ\#Šl 3B´m„v;7æZj)̶‘ÃWBßUØ%6RJb%ò$q´ìqLÀ¢"瑵ÔbÂJg£q(ƳjïGå½Ãh'iÅ]àÞ^J˜ õäô½¾YE»ÅhfÜ쪯ãØD“Èæ_„¥–„7ÕxÕ¹š'ÊéàŠŒÎñ§““/}:ûã× -ÑxaŠ»fân÷sËñ®â|¤_4= uÈçÂ÷_%ªHî‡< ÂÁƒ.U Ä-<º“1ÞTŽê|'õ}¼H„å–EORµ@6É‘Ä:“•}Ô÷Ro/>ú·Ho²° ÊmºÔbty¿2´'õóvé´¢¬0Ç6]‘ðj‹ñfvóÕ73ÇTT…ü·n¢×žŸ“`¤EDGã«n¦¼LÒmdî2U:tÕ«™òÔ»n^÷Šò:™Iç%IÝe¿Ç3SØq¿Q†¢ë3”Õ`Šª¦Iàßé0ÄÓÄr˜Ñ¹ŽºU¹c•Úš ^x~IP.}Ð]Ýg7Fúæœ%Ñg ‰ R@2rœZ2†ž!ÊV0Võ ÍYåÀñ†tUZkj¢2cwœ¬Ð‚ïÜ û0½1G£xd] cÿ6]›ÿóÒg߬Ÿ»Úê+¬ŸÛX8â™Y¿d ²ˆøQX¿Ý²þƒ`ýNËú[Öß²þùD¾Æ<Ûò¡LÐêùiÕ¼÷^˜ÖM¡?pyr8Ó -OÖDÿÞu{ŸF»ÖQ ¦ý@ ”óîMuTE Ä9fBÔª£4 ½}ÓDÅm3öHõqÎLuä%‰7+m×Ì÷I] W'i^`eg³ŸšØ9¡œBuëV‹(ÆSRùÌE—`?òÝQ;=¥æuW9ƒ¬A°ÅèGÓ¨2ø |Òîí4Qåeô8{h@ž[æ¢%s¾Ã7ûágó0{“I¶€R˜Ô°Kx¨¤³q01§Á?ãaè‡épû(_-5—Bï;.5=?KiÇHñÀD×Ai+þiTƒML§¯c ×i´l÷UBn¢Vµ§îç¼n;/nuÓÖû½Ë—RÚv»…ô¼[Hõ“PÓY›ƒ&åEsC9èÔâf¡­iØ< ­!cÞ4#/ ý t,? '~|$-;ä<¸3k&BCý1 †±—*Ñ8_zQëܼ9Žã´ç 8Î žÚ )Mí—°ŒÏ÷þ/£Òêæ¥íbEuÓòx-!ÅÚ¶r0N[g}\ã²ÎòxÝ—4\½àïhðý¼£q‡Ÿ†wÁ3½—ñ6‰½¾ïMÒù¡<óSþU?ôµn/™½®¾XAJze˜0Ž,ð ¡Ô(®ìGA`þéê endstream endobj 314 0 obj << /Length 1307 /Filter /FlateDecode >> stream xÚíZ[SÛ8~çWè1t‰V’ue¦/ì…ÙÎÒÒ–™}LÇCÝ6—uÜÙMwö¿÷ÈVÀv7‘ ÉÅ:útÎÑÑ÷É&èt¼Gn?í+¹Aù—wÇ{Ù´ä_¶ü mörŠL€ ÕHhƒ‰¡¨?È,rÿ*¸˜I,˜DI„®÷Þ.0Dæà¸OLÀæÞhá+·@ߣ³½ŸW il¤äèì‰ QHŽèì õ:×Éh°qöªhZ€ ÁàMQgºØ¦Q¯+ é Æ1O«½ÌõŽãQ’–z^VÀK ÃŒJø)ƒzrú‡½ugí]FÁ»*ÿµ?¸‰`ž èÞ2¥–;/K£»F7ÌŠv:¸b£óË›““½y÷ç¯Zbñ‚¿M3 ‡Ÿ[¹æ|çqG鋿œÔûqü*YE\t>Áøº6¤Œ˜YD½œñ²’p ’Ó^¸t-µÜõ$Uf8Ðå]…iØJŒþsV˜˜yP:Ÿ–Zò“@U¦¶R¿ÏÑ”úô›Ï>ÜÏ>zû*îíT uÖè ǰbÍTü°ÒÂøÉ#Ÿ:Aë§‹ƒÕƒÍLªI× üìÂo«ÂÙëúøM!¼ì·4ƒÎÁCaþwú­-̶øþï[}»’c!T9—¢/“¨® C½ô¶ .Ú§š×@É Kq‹ëõhX;‹®0˜ªûªÝ÷×Ë~8Ií2²òU•ŒFé:F}öºù}îvw_D0«üö·³2}U(úÚ» è ~{eG4ý“]9°W;2û½.{gC@µ£Z73@lÆ**°æWcÃrk-5|_bChµaëØ¨ÒïŒZs ä"€…\›*ºP@‘³>gLTK@¼ï‡i%ñðf¿ËéœNÓ£aþ}tù)ê§“C×ÏG{Tãg‰gS)çä¬7®ùË!`¹šúØ„ú˜ÄߢíQMQ}ì´Ò3ÖJ=ëÛx(ywºts\iT %?sÒyà…èx±>vðº¯FfMùÍv+—`×£duÎû®€ÒñÐgµkä&Z`â* ½ð¦ÙTR |dz·ŽgOr>µ]LÛooÈìö†p2‰ê JE=‹¢W@FÄzrÍÝf#µXK`±y-V›*ÅjQ%ö•Yš^£i_&³™I$(vZ4RYœôê^T' Q/³ŽÃôãê,Æ5fšÍ©,hæê­Ž ó×_§S×’$á´m-§X6Ë­r …lx¤RίœÍÔ_‰ùÌ#XcöïÿɇïaÇu.#RßînÌmñ¹¶uò,=#f´·ð8ÙjÌŽùG»28Wét5p÷ú0fÜæCaþr çuÛw¯ª”ŠãtºË(ÏŒZœ+ñÑö=îÖ\Ê<åS‡†‹§Å ³q£$ïä‚¿èkbc¦× ! §4À ™Æ’$_@ ’"¶©2´|æ^ý³ŒJ/ endstream endobj 318 0 obj << /Length 1464 /Filter /FlateDecode >> stream xÚíY[s›8~ϯÐ̾8»A•”™}H/›i§i²©wöÁÉtX;ÌÚÆ 8±ûë{Â6SsI6i=žØD £s×÷ ‚Fˆ ó#’û}Ý=zõ‡Á‘ÀÂd&ê‘mcC·‘E &º…ºÔëÜ0Æo»VÓPOã„t>÷(ro::Ö'OóÉÕ2¹t‚ÀY†§j–ü#”\\ŸQ$?0’\޼ëýÃrEBǂڈ3 õ'±LØXð8Ø .ýY Šì°L9Ø0à‹ê±†Ù‘kå!ËB6xÈ4¤‡„‰±)àaÊ ’ñÜã ƒ3ø²¨½9r{Ñ/Nfž1[ægW15Û›Ìü ÊÌ}Ù†¾”0̨ ·bU/®Þ'Oï±FÎr-Xp;X Aë§óI}ã°ö²³2—¤1g\laߟ¨èBž¡õW¼@fd½Àïù‚‘ƒkßï#§ƒs2:o./.¾ü}yýñ­¼#ÕŒ!5Cï«ÛŠšíÝÖóܾHmn'ðG‹´ œé¿ÏG[©M^ÛÍÝéàŸù°™Â5JŽëØvZ»Ÿü©[½V4%$ã~oXÚ3L˜,Òek…*o:(…(ŸÓUifFÖ3I>>ñ.‚8Ös&´“\?¨™Bîd-eþôdÚŸ(Y{›LÉ–Ñ·'Çñ­A´œU©ê­”c~骉P-#·À>¢:bb§ì.œŠìV¸ýûç–Ñr¹(i\Al‡CAí8’’PŽU)“þçûQ/ïe²Ëê:\ÎQNºåpV·°ÉW;bÃ,wÆãþØc ’ód»Š(EžÓäùŠŽæ+½[‚pëƒt$ìÅñƒù°b/côÈËZ7tLm»‘ PCö‹lƒKdH.e›Ò­;dH5$Ùª co²ÉÃBådó܉kêà)›'›mÒ'&›ˆ— ÆOL6ÅlÈfu²iÿ´d³øÕ üðkÂÀ*Ñû­(ziÞnž´AÇ­G> stream xÚíZ[oÛ6~ϯк{¨’u)°‡5MŠMœ¥Š! E¦SaÖ¥’œÔÃ~ü%*¶.v­K;o( X2%ž yø}‡ÆÊ½‚•×Gøé*>ñ½’ß\­Ÿ¼œŸéL1‘mb¢L犮ÙH·“`dh™)×£˜a7 R/XòÙX¥ æqèçwQÌÇ”¼p™ÈçžC2¾™¾m›(â-ùMcËéôè34‹D±5dKaF¶a(®Ÿ ÕuaÞ§bÔPb®Ì~oU²Õ¤Š%¤èÂVÛ@66®–&muüpÆsÍ‘ã<} Ê- [¹V ŒG¿JSódãùå›rF¨"ct>yuzûájrñî6rþ®ÉB“«Óߦ§â4«09lfçsCß?LÎÏo?L®Þ½jRsþé ”<ó¼—€Iă|=úþs)‰2ÑE‡/CË%•ZÖ&=+IÛ¯ãϜԙƒâ(K÷]„<«Úñ|œi”-·"Yˆ˜Q’-ö,fwËùœÇƒÄ-ˆzyûQºn—Rˆ¯3ÑG#¹”RK.…à-FÏÒUÔjTMêkޤ›>ÏÖIÉç×/nq{ËäP×ô5Ooc'øSø~Û4 ç󄧇«ï~µ! ¢˜!“Ö/eñ i–²ñ¸õú¨ëÜ­Ržd^U‰¦ÃÖÏzäͺü±—ò['½u á“FÅrµUÊN ´°>XúÝw’ÎÃF»\VÉ‚ÿx-ö¼ÃF ›Ú&Þ_üp´Ú4âó%íDIp½¸^ß™îRôoÝpôÄòûѳ¬c•¢>];i2¹g@?bÍìÒÏd°¼٘ʇå«Å6Vã"°"ZúùÛå•7Ó~;yÌ e¹Ã¸:§ö¯oä hËB—{ZcÈ:8³Áȉ^ºkÛœyI´p\îó ý_Ä­ +ìY[0M /z›ÚÂÓJP‰EÁ©ú e÷`ʃÇ…)›q’³§Ë ©ÕÈ !ߨ¾ +yY£^É|ŸŜï´S.Ù`ÊÛ+oÞV.é%¤¨u0PˆÒ^õ¡‡¦Ñ>õÈÔ!R¨f µÒXð}YÊ€7jHÄÍ’Q­Ê;jëAdæÕ*p|ϫԴF—ñ˜âQèò$ÉÎÀ<ºÃm¤Ðʰ•B1²BJÁi†±» tõÇ´Ç[µ£GÍ„Èè]Š?êɶSflà ¢¥˜ –V/þPl MÌáÝŸ:^&ññóà!ÏžÑ*ý­ë•‚K5½ü¨2}ß*R‡d•ìSs2±æôþôÝY?°9~òBWö…»ËÔ¹[ð '+Dg°l+&N|ŸôÂ-×-˜~g^æFªÍÊÎäìæy"ñ/QºIrº×A+ÛJÕ§m"¿‹aýz]wœOÙ FûSå†cå–µ¡ƒeó½ë©/]€Â¥×’K ÀÚn¤¨8 Ó^K»¯.W“Ét›ëZ‰>¸Y ;׿6«gCÏêÎÔi 3wœKй9õ‘Qb"½ˆ¨¡íVcojøO¢A˜§˜‚ϱúå!0`Þìpq†ü%Ýë߈ Œo0•ÀØØ¢ŠªdyäJôRè!”ÿròX endstream endobj 327 0 obj << /Length 1742 /Filter /FlateDecode >> stream xÚÝY[SÛF~çW(dÒ±¼Þ‹´+…¶¹4¥ÓJÈðLƵeÐÄ–Ù†ÒLþ{ÏjW¶´–Áº$¥H>–ÎmÏå۳غ´°õf/¯ò“\ZêæxõË‹“þ/¶c ä L¬“±e3Ùž%FœeduჇQ8Â…?êö¨ƒ;ã$šª»8ñ»Ôé\Ñb¦)ƒK^!Ý‹“ßJdK~€¢nJ)¯Ov>Y¾A,!¸·9ij†Ó”©m{ bqŒ„ Vâ[ã?JXL…]äqnKS=Ž<,,W—iS‡ÑtªôF6HYþ“)ÀžGÚH%Çþh1”æcͧÏÛð0Ŧ@6 –È©Åmä8ø¥ F¡_aA rhöð^·Ç1îœè»·G¬yõîËß__ìIºÕS²zžã)‰Q\…ÿO&ÿ¦ú½ÿðV[šDÑü_UåøÝ»“UÔo±ìVO¯tÁ¡q„s“· §£ƒŒ;PåRÈœh'f_3HïÐÎ¥ ¥e¹d&³™¨2As‰zv­ü:#æ¹ÖMúäþtÚN¬÷µ+ŽÍqÝF<@ ^X ~'YB\îÂýR ˆø ,°Qz³ëAÂR.Öu‘ÍÀ@ê"æê<§Ô1¥ç@P¿Œ¦ñbz¨kO]N».îDɧ.Á?Q4¹|‘¾^“ÑžºÏh3?¹îžOYÑ‚‘ÿ¼åRmc¹`®Qª)±ñÄýµz튨Žwd;\vr¬=í²’úŽÁÓœ)O?~Ô_Ì’þŸAØ÷ÃkU:âÛùUü_£lãb§ Ò`™j Å"[³ÌSÒäLšÆßVVH¿Lã(™ßÕ3¦ˆžuUå«lt/cU°½Dƒ Ö‡‹©a¼¡~³ò—Ê0«+ÍòeÓ:üÆŸŒ‰ê°Y³ào¿{‡mè+µ¹KÛd~z8ÚJmLmÓXmµ¢j.‚kê:H’ÁmDBòébÇtò(Š 6¹hh4šßÆ~}l¤KmZ8Ëߌr¬1 uÞ Z¦@Ri6œÃÁ,ÍȳÖ`õÁáÉE+¸µndlòÕU³øßNôE‚°ñêÖ2ûe9w¸¯ü9ûnà5 cÀi÷lõ”ê®ÔíÙ Q,{P ÷ÀúR+(°—~ÙöEV^òYéÖAžëÝ%lÃ=¯è‘¿Z©Ç¢šœR @•Z‡§E–Ò} ^îi^PUÑgõÃÎÙ˜Í=Ø=aØ\ñBSÕ¾Y]J¥Ù-‚ª]³A!zV&¿BÈ*ð,-ÿ´ºóרn+Âld{N1®*õÀï–fU]ÏïKtžwÐÕOZÇS=B(òoV­&¥ßf^Y«7r‚˜g×¾jg¹ˆ9ü9&m 7ÕÈÓ-nºÚü27½Ú<{ÌfY›˜˜dãGâ!Ji£¦ÔƒSÑd† k †@Ýàr©ÏÞ f38X'«ë@f@Š@¾0!gtŽZl†x1¤* ѳÑÓdÇAxÙíQávn‚ù•º{zð¦T‚1‡Ü*ç°=jcçž9¬•F‹dØú°”B.Pp¿1,%į}ïa)N„vGН,±2D¼ÞÇÁœ£·?™D7Q2¡¡~xÔÑìsä¾QržU¬kBR6”¤ÈÌ€+×Q`¶F,gr*OªøÚ—äÅfH‘µM¸¤)Äfv#\"õÀÕŽg·>[¥Ðl<&îîé)NHÛ:仟Œå9ê`èg©˜NZïôÂ…î<ŒFO\ð¡ºåöU—wð òHbýÀ.Ÿ3OÌ›F£ÅÄ7ån_æïãÿ¥Âv°à+ƒñãG²]ÃÉbä—•¨;WNWö§q€®~®.ùè¾›‡»÷éæ•ýZe;ø¤úÄÌ8õ[ ˜ÌîµÓøí4ê¯xÊí…´âøQN¢¦ƒX¢•—)4ʦ()lZv£:À?<ø¼ß¨}®ªoýîÙ„‡n|Dªe¿Ió¹˜7ï8×;†Uƒ¶MÉú)vNðê?Ú Ï endstream endobj 348 0 obj << /Length 2245 /Filter /FlateDecode >> stream xÚíYmÛÆþ~¿‚úA*NÛ}çÒ@ ´iœ&¨×9ÀìÀ x«;Ö’¨TÎê¯ïÌîR")ÝY")RDjÉ—gžÑè.¢Ñ·W´wýëÍÕŸ_I%$Ñ\G7‹È"…‰bF qts½Ÿ|à\M¾ù~?-z?S”Nn¦BMÊÝtÆäu¸®ýµ¾·þæÍ®¾/Âà¦,V›úE†Ÿò.ò7o¿½b~`ÄßœùææêÆ,JI˜‰´¢Ä¨$ÊVN¨” ¡1‹àb˜ˆJ-®þyB}Ä(”Ä&¢Dhø¢ÒiØy Ç‘Ãi‰†K4Ihé^aÜîåË—»Á#PH _¨Ju¶Õ`ÛXª?WÁKŠ£6,Ìmæ®6¹Ü솮œ¯6EYwfÃVyk«Œ  XÛïòõ›ïüÛgØ­g´Y#jñ–(3Úl'”¿Àp÷v¹,ŠryÛ“ðåÁ‹~Éé=ôLÈQ,i,Ø_—H·»ðåÖëŒ8'¤—““*Ý9I¨¢§ “õõ¯_|÷ãÛü ¤± ŠãœæË‰êŒ ¨YØYÇG­®§ÎÆïp›ð÷ßùKºòW@‡ÌV•ÿAý¥Xø+ëjx*›ûpÒ‡ŠÔjAÅûŸit ϾGG&&zpo®@/S`ÔZAši‘L^¥³7„À6IˆUÕtŒl–Wvé¦\sŒÄV÷0ÇÄTì=ÓI…Û÷(ņŸiÑÍ7äß|FT(ʧ4K$¡bO²eZ•Òæê/èßÒÖÖÿÂ>³]³]2û1I¥÷¡›9Ÿy·ðØÁT×-U]¦ˆò£¢QÆDª½gÎÙ9Ì0û><„’’´¹ÃÔàšèC`WÛù*¯»,ï´2е3¾_ÀDUvoo·Ò¹¯#h¸ôþW]ø‡óð»[\ÞÃèQAqëð\¼-×ó¡ÂqPÐtý–Ž3¸‰í÷ùÊeÎSv†µ‡´bþ/ëbÍ»‚ôU²”ö«¢Ã‘À ñÞc{ë‘‘>§ØXänÊœ—9ÏbåI×^»yØÍ/[[æÎy4Ù£M4©¶Ë`úHr€mqÞu¡·Of7¾ÏÚO¶uÌ4ÎÀ(ê2kü›èÈŽ44ÿ§ÎC«dHÆpý“âÐG¥2ãXŽöµì!=/i»š§Mÿz°š˜xëiõÀ,$î9Ê@9f‡Ù‹í:CïVä‘FRçœj`—Ë£ó‰lŸ Nœ <Ç—m÷sWÝ© ÁöCQû¿¿ûÆãp ØžÑÀË §$ÊFàØ)O§†§•çÄ€Ëeq»Í\6:ºî¯{¶ï€±˜h3ùË…;ê‰æ°üQ‡Æ=Ó“:-§ÌLîìë·×æ$Š5®9ÑâÁ9nàì‘æMõ0ø êd°yÙ4TýâEŽ& œ±ŒÄ·d,Žjðo;’j¨ØQýÁÄW&_x¥Ž\r Љ‰ÍÛJÿN`ɦ…w‡5hkãŠÄ¼®4qC·éÎÈÿÿwB endstream endobj 376 0 obj << /Length 3718 /Filter /FlateDecode >> stream xÚ­ZYsÜ6~ׯ˜ÇQJƒ%@U•'qRÎÆ±7Vmv+I©(’ÒpÅ!'<,O~ýv£^CÉ’'岈Á>¿nÀ[Ý­¼Õgžý~suöïƒp±H ¹ºº])±RÜcž¯VWéê·õûC»­ÊóbíÓ§iã2ë”~ùM×úQÕôm·üÉpÁnâä~_Õ-ýÊoí·„‰‹"KÙùÆ÷øúLR?äMvqþÇÕgž^yÌWü ´\Õp†£Ê_~€it"߃…¹„óšíöy°?°Û®íꬡ©-5f¤Ð!ÓQäÆu ô6í)Î…·îÊvLIµ?çÞú€s®6¾ÖLòpµáœEaH“TxÖЃ®uF¥Û®LÚ¼*ã"oTåÈcæÅ.uµ£ROM(û,¤B[Ñ÷¯ê{û+o·Çƒ€Ìÿ!Í? Ú뫳?ϸùÅQ dä1)WÉîì·?¼U Õ?"‰#½z0v«@éWÅêÃÙ¿fLJJÍx >döäqÑT—úß W,òu}[¥]‘9î# YàGÈn­-÷g•†ûJ¹2hÇĤ*“®®³²]€GsÁBÕOò]•t;˜"F¾ÑY_Qî_¼]1–¹ˆdùYÛ=Ú&è­VnðHMag;CK6=.ã7$¤’œv9¯4» @,Œ \jãŠqXkãûLCO³bÀÄ"9Ÿ¿Îê·Mèyë·ïß¼?€¬UñúŠu–t-Ø–'¢#˜FÒV®F|™Õàš CKKÜÙÌç7Žá‘,‹¸A³¡Bg@ Óg3RɈ|aÛTWIÖôŒŠÃ7;çáúþÁ}dT™€Ñt7‡2ÙÖUYuMq8—ám©×ß iQr½Ïês¾¾­ê]^ÞQURí6d±P~¢hf±öÉ9¬àG>iüë&ÛÇuŒ[ÀÚ~»ç›@Dë¼¥zØYu.ÂõCC£ðXßäi¶iÚlO?_®5 '8ð‡¢º‰ šûMÙfõ¾Îà/ÍúS•ÜOÍ "»ÝÒ(4BÔ}—Åîí6¶¨J £é¸Ï“{¢“7%PßHÎ×ÕÍÿ²¤ÅI8xƒ¸¤ÚÛ:c^Jµ £ÔvÞÕ¥ñ~¬gxfx¤Imhíëë]œ—××Ôs"†!ðRôòKÚO+¥%ÝÎòº›á7jï= j`MmcVûB­ºæ4M½˜6zBÖ—i\È{30¢LŒê Ý‹­W-«vÉOæå`¹mHP >÷£aרÁ XˆšuÚ©í®Éáù/?4ЪÇ&mL<‚3óH­ãô#n>u—a•6›Ì1±"=”ñ.O¨Ö2•Zvq ÃÐÁQãm“ë1¿€ 5S‚ò‹½‘~“‰á AuÎ1²/´å —ߠ޽cÒæIWÄ5š}­@9³0Så1å‡#ÃÌ@óaÕnÇ>ìã‡òw/ôà?_P .4SQ?x—2Ji@ ãµ‚€©±`ß¾{ûöúÃ럾b`l4HcCÓƒñ· åöȆ`¾P@ï†lTâ´UÝÓxàAO‹.wfãP5u1hö1Šíƒµ?efL0ýXRé~Q¨K¶y‘š5§ÚN?ë®,ã0–‹F8xi É\EÀ” cÊÈò¸“3Ó]¿BLŸÞ½,Üv[g1Ó³ô*3úqk…,N¶§i§ÆüK¼¿Ï¼ˆÏm‘%(lÍð¾(®]™'äB¡A?•È#ÐyÃc‘м™`kL9Ù ­u`i}Ôl¼RL¨!rʉ9{ÙdõØèõfq꽎oÜÜ7XTôQTBv™ã™¡à[‰0Ô›¸Šå®lób˜Ö´6¾ÎÍ„lÉR¾Bœ§m6 GÖê@w Ô¸\ .Bc&' cßMPzî«5¦3’KìëÅd›ÙÖH|±äÄËI•Úv4]CÎÇ!+e¬O•$„C¸nxJŒ Ü•ƒú’øXë»êÊÔ‘u¼@(Dò„O××À”¬^ò@E·"€¶ ü{‚D$"Á h¶öTýŠ“zâ%êá†ïñ)]9÷«SwúÐ,¿|7¨Ø ¡<92!Ïf®!R“GÂBšf©j|Ág¨¥:Õä11 ’æÐ0·'è 5 êá.ªÐMåÒ‚q{ä¦EóÖ½“>öKÞ`1FÞÛæ ³²éœ†n{Bs_ã‡úô†¡÷4¨Ü ¾&`~tÌK9祒 ÎkyÊ€›œ•íþl¨à…L€={!T8ž˜¯ðÔPa±f¼2DMrñ8ÃíÃêXHÉ<ð€2bZëlu kÏó`‘ÊW!‘æDŠ_1e1iÄùKø%Ôàú{]ø®«I}kÊCsDy›£—ÂZ‡U°¼ßÆí·³A38 žSz¾kvîKÎ=à $.MXõ àÇÖö6⋺ÆÖ¸ è´˜Ý~!^˜¨ühŸ¨0¸AŒï; J2QŒÁ ÇJèð}W¤Ô%¼²3 ~8à0 Múôñ .”ƒ„jBòj¸™À¹U&J]hydßÀÚ6-'ÊM\Ãõº²Ồȿ8"SæNêå—8hæ{ó‘Bhj3t€“;$ðh“ãŒv°DµÝé„z^Gãð:šØÌwªàf#¯ˆA™ÏttœýZÊøRØ¥°³ç~´þ˜ ª«s56ÑûÊeŒU‡ž6,€ª>,Àœ±ÁUØžÛ€|lšš0Œ›äØq ÍÉS=ÏsŽRs=xA¡ÒÜmÎ7yf¢Ø‘¡aìnѨ"ŽeÍx)4òñO•[5yo>šÚÕÉiÞ/Íç/àè7Bú[´LO‡6¿¾þš¾¿ƒŒ:€‚åK€¨êcKé(­Á·2—ÎÄ;R¡%#ÿ9߈ ÉÜu¡_Yr]çƒþ ú©ñ&æx$ަýˆ…&O™C=kø²÷ù¿ÉÅ Ì)€þÇ75Çü°¢å#·Ç–©“yuÄä.¼ÃñŸ”Á£-œEÃýã.þdtκÌø}ý3fÁŽ% TUøýä 3,Ò=Òÿê«û‡Øtw‹¤qUc8ÉŸŒ¸}ˆ¸u8»OzUžˆƒ¦{ê>ÇéB, ´ƒØÞ]ÉIe/z„” Ñ)¶»«5è0»Z3ÍÎŒHò­Ð˺SiÝ)6ØvØ·,lâOñk—0˜d|H÷p]€ôÖonÖ1§ðfÌxörj¸ Í—$#¿”xD…b|tÊr+º–Á‹¤»‘û-Í €\çÆ[B#å:ŠÎ¦Ì)«®Œ;Ç«LÊ­K›ªÁ–e×…w”Éå Þÿ÷úí«ÿ\ÿúî—¾þåÃ’‘æ(Å}£Ä йõºCÀÇýYÀ7NϲÊ-Âj²öÂeål¦gk»ß‡BWŽÈQ7¶¹Éÿ²™¤…¹|œ€=”P—à:†‘£›³Aûí(½Ålº(S¾Õòä‹e× f´Ú@|Ï‚ù ½;va'(«K:ÛšìÏ..útÙ´ªÞXxK»»ªóèÜoéðÅI¦Êç,Žúoß×uý´µÂTÃàmòžïÆB‚:» 5 B=½C|ç²…Þ Fifïl¸Ôަã~"œílÂmÐٛѽ¹ô¹Î{}ZRö „è²M—ø, X¿G©Šé&CÙ«ån4Ôp“ä©ÉM’©˜h{Wí)w±6šoŒÏ½ãà 릗Øb¤;§1<Ì®1Iã „2lˆwö©?ÉçB¯ ÀZ!xº±£'3u ¦\yòI—'>u2ØËÎUää#ƒP£KUÔÿÀóÁ=d5IBàöŽ ëã4ÍéMµàe› °±ÈK;U?†sšj”¬Üp0ÔØ69ùÄÊcq´¬†xSÌ.¹¿í—WÚ-¯ôhy… \åg†Uä̰g^6û,¡èÓ]õ—S^ÓA¨PNo‹øîÉ8:ô™\üÅiPLoSpy@eµ§wFO%P=Ëž€%#ÆŸ«­×Ÿž±?pnBGóx®¿µDÙÊú;Τ*˜º·ZS…–S¡:A¡!X¹ÎËÛj)« A­P“&+&8šæÉç4YDèG#MÆ_‡<+Ò>u;5ò ~£¥ûìpAÁ÷Gô°<Ê€ žó~Ü>ÎÍyÊtµÍš%¬õ‡Èè…+M¢C)À‚•5˜£ë \«…P£»CO©Þ°.ì³€«é;˜EVCG9ŒÞ¨¹++I^S?˜CÐ@|éc|ËÚ³c)ZÒºlm]6ÔŒ]¶^pÙÐ\¶}¦("87³±}$¿^mM€*µË@yƒQqã÷ˆÐÜfEAWŠRZ±¹Æ‡;[ ö¡ÍvÔðpÁVSrê¶•ËJKUÔÆ˜ü6k¹éGñÚÂí·ÛÌ=éŸz¤ÓÇX…áå¤y?‚ôr¯Gè¥ðMÄlx|S™ã ”˜ÎMó™Ëý†jrÛ£GgÍìÉŠËjzÓyRÕuÖìÑ๼¾AuWPýû>ÌkØÜ„x“0$ÀW6°PZÂq5òúêìÿ‡‰L– endstream endobj 401 0 obj << /Length 4061 /Filter /FlateDecode >> stream xÚå[Y“Û6~÷¯ÐÛjRB\$‘*¿dËÞÊVíVÏ>Ù©)ŽDI\K¤Â#ãɯßîÀKÔH3çaSS¶H  Ý 0˜mfÁìo‚Ñï·o¾{¯ôÌ0Špv»žq0©ÃY¿Œf·«ÙÇù'!ôͯ·ÿlû}÷>½N1Sa Ôx³+î“]…íG´…aRùfß[‚Lðp0% ü/ãxVÂG…¿àQÈfÇ=­U¶¬Gó2G¾uQÞ,d`æY–Éý.µoYº[eùÆÎ{0V ¬Û‰ t'ûôÛ›Eóß“]“BŸX0tŒâÐw<$YYÙÁêÂM!Ïê,ÙeÐ$ây½u³Ù'YUãçˆÃV‡d™úÞ8æl!„b"ˆg ΙÑÚŽöpÃXêgüIaÅBóCY,ÓªJ+6àÖla¸à3R¾@æ4Ýãõsxa'ñ…0áüÇ5ü 9¯Ò2ã˜ç2b±hé¿…J§5*ŽÛVß"½x¾*ìyáÈö‡¢¬m!røx´H³ j%|w‡ë¹»›P£UtËv²AÂ(/ìˆïP×ã;ŽÏ?¤uݪڀ«\…L y†¯B0®„o4É?|2çØ·†34çP¦7BÏ¿ázžæueuçI}²¯ë²ØÛ§d‰å¸Dz]u½È][bü’Æ­¤„Á&V"ÂIc.Žä-(´Æ2Vv)4ãÑ5ê~Hê픺G,â¯pqÔšÎ.«ž¸ˆ)>À7Íûø¦A/3˜3•ãì+ûH8¿Éáæ+ÛЪÓË'Εf¡iµ³z¬˜çשékÎdÛ€æ4V8œ[OáúÓOQU¿Ôn Üù3Ö0ûHôA[TE[çbhUš”Ë­×ØÑª þ)`/д‡UVNiZÌtÀ{ÀªC9ÿ ¹”£Èò~ feº½J–MI¦F/žËd«Ø L—uQ>Úz’F¯]+ (ëKz6•ô—ëŽ< d«öEÅ–[˜n¹~‹=©C†EÁІ&˜ßú5»ÖJV†àˆpé$÷K Z¡è3_³>¯ì£Ý¹àáÞÕY ùü_?ýèZï»t\Nóö•žÿÜÀV_»>'šV–Pµ-šÝÊ6Ø9š4>&S;¥‰`äYøfuÎòua•Ù 5èÑk7HvåAº,šÍvb¿¢QÐmW‡ìŽH/5ìkQ§ÆmbWo‰0½U·¬ušÔMé6†Ìív;‡‡}’¯L¨ Ž+δ¹ÜÓüF[7eu”÷•àÝk]ìÀ ãÀ+Ýw`•ŽŸt`Ó@ï¬`"2#‡¶» ëØ••E¾'TÁêßÑHÊ gçz áosá¥W2¤ ïÁ„5lH&”êxšÓäžb/îXäÅêòâ¡'qá&–-ÀPÏ#ž`!ê1þV$©+CÁ_‹Íð@¨@ôÆqîkÖ~áVlg>ô߆pј ¤#°¸]²y°å•sDéÅNBG½µ@éñZ¨é)@@oMýDÀeoíìzhéfJà€³kÁ‹3·@‹íg‘íÚeú[h¾ò@âÜWÀ÷b‹ZùšûÇ‘SjA±©FÐ)Wl¤FQÔÇXcòöTÍý>›òkaýq§th”ìÔÌD-2­›|9ívr­;FSQþ¶ÖòMRÞÈh¾©¦ Ùl§Hµ®Ú7ß|~R®0f2ê¯ðÉ |ÁØLÔH™?,·© ²g'ø°EFp™šb Ãju ÓÂþ~Ä%aR¿w£X¿’ÔpÙÔ¤%œ'SkyLØÔKÔ© PLå”⪰Âí'妢YåÐÃ>¶“cN¯e°©N ¸’G´ÌHò•]Y™‚ ‘³/Éuh¬Ó"¿oÈ:Ÿ4†ö«Šûÿ¦Ko¼&¤¨d¼V=m8ÙšçP>w¶¸XÚymñÖ‹¸8úƒñþA‰}˜,ywûæ·7œz@ ù€Ÿª´d:6³åž¨žVITü4°Lgë7?OÐ žJÇocàU¨l:H 5ƒÝŸE±xú—[”Nl*˜uÿ‘Ì%6ºÁþí(Z¡B€¸ŸŠb÷ÎÑD­Ý'_î`ãKËêCŒÈ <ìÂÔn; Jl'>Ž ¼Ã; ¨ñ&ÕéÕ•K~ÿÆ~¦Çuoä@& öÊ.“È J,™Cñ0&ô­ë »húRð«ip!Õ)Î_¶/žØ'²¼ž <[nǬóovµÛiNÙÕØ²¬6ZíÇ_ƒÙ *ÿ‰ ‚°ášî៳áÝì˜pGC r€Ákhà<”ŒfÊŠ?A…¼©“4`Ò<ƒÄ4æôÝae؃„ï>9Llz.­ñg¹0ß‘e;(¾˜ð- ‹.¦Vgû´hê·ÿ.ò©$©ŽHH—ºWKœ×¶É?WÙé[>¦]ðò*N–¾ØÉ‚H˜±n±ïÀ=¶7†m;— ¯NëL—²€/­“ãR6ää¨iÇÈûH·:·¾¬R´¬³þÁ2=ÔS‘ŠaáµpA—˜ty®c¯K“ê1_BX”Mµ{te¹«¬ú EVPˆ^IåràaÎt‘òyýáp¥Ëüš7g<èb0 þLHn­4¬R[²,r— ÜQ6ü`%å¬aQ¬E¹3ƒèÏS`l0¥xHJ â‰Æ $VÆ…ÄÐÌú˜ÄhF"¬)7 oe’Ù¼!´»Òý\HÁâ`6ÜZ›~W–~›ŸÖ—HŠ·è”­¯› øm]šåî.O¿Ôww—$/CØä@ÑD‘‚PÐÏÖs]”Ž%vW´ÏY•ÿí†Çs÷šÜˆÀs¶³"욬6'tŠ‚—N¡ª`F´æ\Aôœ¯ÜTÝÑ<¹Üû óé€Lf(—¢Ì6YŽ 8§âSÐCš FöbÈÂT:Î ‰óà ²¿½d‚Cšs\ž²É½K©ø"Æð.Z&¹]…‘°8ÿŽ=P+ìë§ ER3<ð|tBD¬?¼t*z I0‚͈Õ!]fxGze§2Ìr`s;؉}QHÖßÅ€šAá—nÑÝÐöw—¹4j†‚èv¨zëÈÇl±Í¾%YíŠaÁ˜E—žc*Ëþ8‚')Ø›XeÝÑ!ei’¹,©mûA;[ùyÂ$G?ÀÊM¯%’ÙÒÈïžk¹© –YÿWmtÓ[¾µðì]O­=`jÌr/´P­´A«}Zo‹•}^n‹C5¥3ÀfÙ¡Ÿõ™`³¼K‚ÒOìtòfOÉ8(ÂÛŽŒ~Ž­Øf”¡xðhmˆäê=9·>¡P±³U‰Û9øÃB™ñ‰›ßlD$çuR}¦SôØî`!Úzr€}èK¶‡–döTQÑÅ |¢”@D ¤ÊùÉÓ3é <¨¡ÙÉ ™¦5•È&k‰êÉÓ{)9 L<é Nåf8“AÔ;Æ'ò‰ý9UVgÚ8Ó‰Jzè(€¬H7©W@­ù{,"¤ýÖ¹ömWP*ÅèαúÖ^@iÜ¡=4J\[ð=agÙ¤¶C_É¡v]Lm(x!E…Ï`ƒî6?+ ]e›œ  JÐ=¡ÂlbFzŽ)TxHK˜Ç>É—þè6ÒŒ’ÀËbw Ðh +©#÷Io(X¥kBÚS±Æ*V‘ºC à bÎx´%ýNœrØRx’aßâºïAÖT¶Æîäî%Ë~ôPh3õ¼åúDªÆ^»è) !{t0‹ÌØ¥µk@ÈêáÅ"ÞÖú™Í•ÇN,ðpïú,·I¾ñhhç1â1©ËÔÅš÷ŽݱŠëé´«Ù·—?†cb õMÌÝC$„ü‹¥G'®Ï€7“I[°îtë¶l.Úælbq|}¥õÆðIJ•4]œqûH`eîN>{%*|Ó—ë»sÙ£äf+Ý •ê«ç9…™æñ×ÏsŠX±ˆ‹ÿ¿<§¼*ÛFšŽ[ãÔèQŒ3à-Dƒº…W§q/ÃT÷JŸ–‡¬‹ý_%åêÜú«ó­¤Ÿ‘2‹1‘_/_ç6Ù4‡M/Íñ<ÒsÎz$¤8•¾„1Ä‚|*gûÖÏÃ'i¿¿|> ~ ø«æ”Û„ð•‰à¬½8| ŸÄÇŠi0žkÁ8É¿J&XÀôyìî‚WuRNgƒÁ‹»DéÙàè™g³g2®ýÀf*® `Zêbj—dƒÕŸž æ_çÈ](4Áø|6X…òúl°£„£5lÈsÕå† œ|drn œîµõîýˆ}þCqºÂÛuyU§ÉÊ® X_—eŠ‹´|f–Iâ]¥îz¹Ž8ïù.|d§`¿ ‡‘¿q£ðztAJ_h¼\•ÚŠdWÂúí˦,šZ»‹´ó6‡]꺹<ö³?è«Û+ÂzpaX‘»+A%à×׉}Ù&•mrŸ¦¹-ú$„<”éâìãÛB¶°ëØ= o¦Ïô%+.U&ÀP›Aö ¯LyÞW&-CÁâ¨U§i3†¶Ið‚Œ6щG§üÜ›³¯;pŠ-ŽîH(Ãbô^/và±éÉ¿Pì0Z~E;l ®ò“ç×D;<°»tNÃùh‡·&œ¿|P…' Ƀ!ÙÎê+;Þ/]ó‚ƒ3Jý׌.{øû:fƒŸ iÉ"ºÁÞÂW…z(}:Œq˜}*º††c¸QômÛ5¡‡ùù5"!.4ÉÆnØÛ¦^ùT(„_/>ç^ÌC’Õoo1{ßf!‡ñX_ì׃/¨QþûC¶±¯mòP™Ñ]Ÿ²ôçbÁÀ¸[ž·“ /Bˆ°]I—:§£×ëÂOiúö/MŽ‘þù "àTwšûïL€á‘ÖËþ“çöò#Ÿ¾e$;÷&«&¿æ »§*@ â6špGÏ`ÈðŒi±Ô±žìݨ¶ÇU¶¹ãêíùº1ÎD¡¤³IxélšPTŠ¥Î 9¶BG5_ùé¹C»¿|Öã»ß-¦H1kUË,±w®”ôß´*ÿR€†¥î4ˉaWºBÂÙ Ïõ Ÿ–¡ðŰ묣Ð<)EüæëüGÙRÒlj9Ú%Òá?̽=ü‡R+G|râér0øÂ¿|Ã\¸›/4}À;øè#ä6 endstream endobj 299 0 obj << /Type /ObjStm /N 100 /First 901 /Length 2853 /Filter /FlateDecode >> stream xÚÕ[[o¹~ׯ ЗÍᇇ·"X {I»@ ,’´h†"Ob!²ÆF»ñ¿ïwFGŠ×¶¬‘ûÁæ Å˹ßÈ¡l•QÎ8•Qd2Z¯\ÎÊÅ.«`Gé%åmB›TpÒZ½SÎLv£À*'§BRÖXñàñ`²6KOÔVÆD• %•mv#aÈ.ÉÊYe/³"„% ÇÜ‘3‹À6æ'@…' r!r‚£‘' q@Ëš`iÄFú¢€EÆ øïÀ{kI(‡}-¤ ƒôÒÄŠŒ‹Ô%yÊÀØô˜À2CTôy⤠B›e€¢ld½$ò‹ÑRùêôûHŒ7-è%"ržDŠ@C,±—0"b™Øž=U/šy«ž=SÕ áõÐÊ—òÆØõ §Ð¿@‚â+/?ü0ª~[4“Wu«Þ¨ê·Ÿ_¨êuý©UoGøIV}yQã‡ñ‡zTý„êy»T"Ù˜>ª^ÖËfµ˜ÔËNÇ»®Ö§ÓñÍ'õÆ Ć<Ð[l3^`.¦L}>Ÿ7XêMg;–/¶ì~U?6‹ÓzÑ­eÞV¯~­~ èôVvŸlPDgìRÐ ÒbëúAxuŒã^­ÞµX³úÇtþ±zþìY·Cõ|ÒN›yõªú×Ë_åﻳ¶½XþµªN›ÉR_\¶gÍ\7‹•«fÓw‹ñⲪ?Mê ™µÔgíùì/¿ôïOzþgõFŒbGêÿü÷PQ@Fj¾šÍÞÞ8¯¤ë®q0bfgk؆|fï­R°),ލŸ#&º8H>òuùˆ{ˇ&Áè½ ‰´o‘“‹²ÓL•‹éäã¬^ËÆysºšÕO×]_ÊGÚQ>Òß#™;ÇÀFi¶îFáØÍDlˆ@õ"‰§¶ƒäÁ^·ö~öbc»ƒv}Æx •m ØDƒ0{#™®#vBÒ‘¹†dÜMD¶ÆýÆžû&öoqüFÊlpü ”!w2d÷¥ Ñn”Ùì¢bðn”¹Q¶ôçŠAñ:eüÞ” ;R&lQˆæ<0‡¾®L|?eÚð Ô¹#‰ÈKkKK¥u¥åÒúÒ†ÒÆÒ¦Ò–õ¸¬Çe=.ëqYùÏU¼ŽêÜΟ;2Û½ôŽ l2ò&D Pt¯#âp¢ÚÆ ç¿^©êoÍëFÑß-ëÎ…i~¢>ûŸ{zO N ‰×»"ZÖüy׃ùÎI3Ÿ¬ÂAý~Õ®õrË^ÿùÉ 8Ý›®õµ$¯Èˆ»IõÄÖž¤½7ä½FÒCÄS“úwCñ½Î8lmÒ,’¬îÂ礩ó$—òWañŸôÿò©ž¬Úfñd´2é$Ià-bÒ°‰+½\½;Ÿ¶û#Á²uáCG+kx†$SB]—¿v/ºv¤Ëè,E ‚•ƒB$©ÐÂuqy1Ýd€¼W‹ ä܃L™eW¢/ 'ÞDv5¼Ú•ÉÁÓ¥½ uI•$ŠwLÐy;A‘3¹;Ç!gA|oïGÎ Xþ›ÒÚƒ‹c¸–ÊEÞ7•ã’šù’rù’rù’rù’Âù~\Iá|Iá|Iá|IáBIáBY/”õBY/”õBY/”õBY/–õBß–ucY7–ucßO‡L %“ h :ÇÉñ[´âÃÒÑ”T´ÑvGGYP„,’Q$ÁÁÃ$=R‡âÄ¡w…ƒŠÝAÂÆêÞ“²&ØUŸ$ÇíNªä3¬ÍíV}X’é,ÌtÐÇ 3œ4ã]Žn}ŠbîAÛ³f¹q×”lëÅùSt½ÏžNa‰ Q‹§³fòñ`ÄŒVÓ¿j#GÔAZ9ývˆñ÷NÙ÷Ã!’Ë 9…¯†õbÀ[“ïË5L¿§-Ùã‰g«-|Ëcñl¶@}¾¸©¶''çãéüädKYûΑ,|½œú²C°ÇÃÁjoñάáh‰Áb5¿¸Ü¿ëÙvr >œ&`F¤A Ôrý)¡¥G@}çXç+ø]b‘Ÿ?øÅ„‹Öh_r¶@È '?¨ð,/‹›’‡5ü‡sLQ²¹(œ]ùfΘ†ÓøzF,xMVîýXÈADÚcºì¦·›±a!̤„P„ˆ.™u)Ï#˜¥Ní£-Ã8k$O‰: ~À'!(&ˆibÌÛÿÏVõ/‹Åð="[“r ÒF¼Yq.d ¾õhÊUwt¿› )<Ú¸.heÒrIÊFqËhc¥Nò°aG˜h%>ÔµùåvTBh“j•—í©,T˜M—Cjˆ.ÃXøNyIîf¹Ð#‡up’îx¶øýlüaP%Mâp6gèlgƒ öãżYkìp íï5ôØÀŸ| ú•†²¹•£?9ÖAo=hЃ¸E¹Ë¨¥$cSÐQ˜ÀŒäãéçétÒ~Qˆ‹~·BÜÖ¸u!Î’¿sœë*i§ÛM•³Ko÷ðö¬¶±±×ªm9ï[m‹¥ –J5+•jVZW±Øô¿÷m©–%_~ïßKÕ,•ªY*Õ²Tªb¹¬ŸËú¹TárY7—ur©Âå²^.ëå4슠g›éªŽf‘ÄX¹¤~UGû:â|ï£Åuq< Ó–{Á6díÖõ*c®“´R¿Ú… åÎ1 Þ4zãöl€—Aveá"{¨{/s@¨[ ´§ãYU2«RÇZµO—õx19†@ïk‚óÚJšˆ¼*ÃVÚ&M<.LQK>"ù>q¬Iuö GCMíäìt:äŠøÃîó ¯»OÄžÞÃ_R²Õ°xBŠ_ÚƒÝKûÀÞ u=ÿ}ºØºK¿§ŒKý•»¯¬Ã.†‡ 6#Ù‘Ô&&Ëg>ˆØÉôX¯½ÈýDùz XÈ>Æi+ØA²üA/Ý¿_Í'Yÿùøb¸!°ÐF·ŒÌΊ ô–Ý7âÅëéyݬڥ Éûå«©‚š\ì´”Ú¶)š¶õb,—ÞNNæˆ_o.uÞ¿Vá ä³»ÄÝ}'-ÇvÛÛ?¿‡7R­ÃÎ g$Õ-¹“ëD…¡³H@u>læ&äk›f¶AÍõë²/nö{SSÎO¾©ÇI¬“Æi?jîq·/\Aˆ @$g²rú+â Á†ñ  ÎZuv„x5!sFô™Sw1’2G’s¹y¦‡ãÿ7Y± endstream endobj 430 0 obj << /Length 4028 /Filter /FlateDecode >> stream xÚ­[[oÜ6~ϯ˜Ç1ay‘(©@ÒÖm³HÒlâ¢ØM‹@ž¡=j5ÒT—ºÞ_¿çB]GŽc»ê¡Hêˆ<×ï²ru½’«žIÿûÍų¯¾ÂU"«íêâj¥T,b¬"%…4Ñêb·ú¸Î·ËÒÆå·gÆë´Øq£Ù;nT®.Ûjëj?¡®Ë-¾áçÝdÍ~ö†;Sáúoüã¶mSVÝÄ<çÖ¥ŸwU9¦’¬oö®ðô»YGWì²âÚOm›¶ê—P¹³ß.þûÜ(%’0ä½ìÊëÈÌD¼Ëõ{¸> Ä.wuÍÓË+ü xØñ×™†)yëúqøÜWß[=fg,‚>~“f Ïš2=ʆݤçH/¾ãŠ&«üÝm³/ î?Våu•øù†­¢lx.ï/k¸»*~FÚM혇lÚ¨D •Ø)·zŽêPG©áy­vÜÖ®£AªñL ­ìJŠÀ$ð×Äñª»8é|ÿXI4«¶V„ƒÄH»‰ ·«™|µ±ìg× ØÅ¤ ‚6RVgÛ=/ÌKÖZïÛfW¢†Ý,9ëȉИ°7+à[ÅÖÏùU†òæ JÈ F™zÙfWGdŒÛŽdAl=Gfđ،U8PB‡I¿GZþMß„ÿÔç¸cµÐ6êyé:-C™£åc»ãð̼l, (Ù=Ö•ˆØ Üw “Õ¢¹SÁw3/ªÖ-ƒ)‰ê-7'üîð²‹þ‹Ô ÿA7{Î/žýùLÑУBXª]…I$¤U«í¨üChVlD™UåVWÏþ½@Kμ{ÿ+¤DÁ¡ôð}”è¤ç½Q´ŠaŸ6Gk,XDÐE‚cY5i-`®5ü‰”§>îê«+åÙÁÍß½weäL$è|r§±‡uƒ±õjøæÝ«we™ŸÿÍVÚxHÿþtSV¸ªöÐýZ¤‡–¿~1[7¬ vˆSŒßó¤‡_šª½×ÿÕû7>—øœ-·–ÖŸc‚²@¤gƒóûÿÚ{ú8àM¦leOÿ–D_ÌvHÝçÂ_1gUÝ^²%6hÍcIåΟ{_"8Ú…þ'…·Ñ í9w¬ÝÌ–fR4‘°ƒO}°„N9{â’—œÈܸ(;uQ“« þ 9˜Ä«šz@ÇÅ+_}5Ð#@ŸD×@8´ЈÌçh ûLÐÿßE#L >C\ùrr GƒÀ‡($ ¤£XD]–eӂޝ?€ ”ÏB¨ EÅãH÷ââ, ×}ŒšP 4ÊIŒú\Þ@–ñ Z|È®‹4ðÒfM``•fŸ6<žùßz_¶¹‡fÅË- O!½v#4*”‡k•û³œëßåøˆLÉn†ŽOG0êå<„ºûÎ.ÖýP°š}ë·º=S¸%ŸÒ=~}¡Æš‡ëËÆÀÆ Hf"¡“Ü Ó ŸvÔ.ß•nç»Ý]`z…À®Be„ÖáÜic§mãÍ`´h¤%•ÀWZîÛ²q_/˜¦Q¤|ž)/±Ê }5‡´nÐß`»ÓZx0˜uú¹)ÿÔ<9D&€jïÛ¥ßUWeuàòlHh[mêÛdXÀ1_V¯cêÿjt*†/Ó-;6*¿­‰Äø“6@¸ŸSªÚ}ú:ߎmØ( ÷¯lçü`{¤®ÎS,‰ÊgF]\üøþüåwŸÞüüúâÕ»×çKî¤=ra‚?ð#'ÈÿþE^¦ ‰^×åÁ¯êX)\ÐÃts›Ž àxƒú£²šÐÿ²ûƒF¿[|¸u¾±-‹m[Uð2?sh°MOêª"­‡Ö¡Í› ÂO¬ 5…#»~¹Ûeø}rX6ä€ Q£*OçÞúµ¹- ˆøuf¼æÙÿ ȧ¤¯Í% )(täž­÷æ#þæ<ka8Ô+oÒ3–…#)õ²â=˜  ?‰'ÚK3úM CáÏÝÑKi±‚@Èq‚È«ïŸàƒûõ2NbõÞ!?Éíûh{8fÁñVt¸ÏxÝ ¡ŽfQxÍå.¬QòÏu^^¦~ ÂÞÜ"e_Ð)¯+ôøB é-´IoI%5É•^Ûû‰3¹bWÙÏa¹y/WŸ€#´™êc|Å+4wHÐr…îÄ|8ÿêåëWÿ=ÿnɃè2°äU?FT–Gv&*,ß2_•JŸV˜ B1Ô¦Þ#$;¸_Òªè!Áë2ÂÆÑà]¿,Æ1 Á+”¿,’ÄBÖ JE2k! ÇŒKèàþÙ|aÉ@R VHŒø.Ä Ðmäà*D):Y‡í°µ'Öce?Ç[L  ™x=ሂSëî3d3ôÒ¢Íhðnñ?~¹ÑÄ©Ûqjš GŠ“=\¸ Ð-…¶ƒøâ‘ä½r |xõö‡e ÑGöëYÄðé@E T¿ÿùíÛó×ËûœÂ Ĺœ ‡ E)AYÝ>ÑiÄ«£GyXö‹Û¦\‘)˜;ÇL"E$ÕTïSÁÆÄŠ5Zz]¥YÍggÐÍÊ£õ­;"ðxþÔCP?bÇPì+"èk¿J^9c°[ó«ßùÝ¥l*5OL¹÷W­Í¶*ëzƒ]q ø ºÿnÓdMK6îr»-Pý¹*´k²¢]>ü¢s9:ué—Ÿ·/®hM—øp¸íbئý±G=:õða~úŽq’Cx(Gq$Ý6­Ïn±ß§âq¥>ôðJŠÜÛÌãû]òðaÀ@&iO#Äø}¹ c¡MtZ%4‰¥~è‹^_R}¥_cÐÕ˜ƒùv5ãYgw‚Èë‹ö©¥Q°2ëãI ÌôáÁY}Ü„\íú²Áó¿I×GÅöesä¯áÛÖÃÚ×Ã÷¶+À‰n7§yÕi4y:.„ 7ŽkAfÝõp¶…ó8Ú;.÷0]½H—ê 4@©UÐ^‘!"]=§Ýé!Ûòø64Ëmi‘^Ó‡ÐìúÊ¥ý9¶mªr×nùpÑzƒµÁÚ~ÅÐÄÔ]Zíþêd1# £õï奟¾Ý»]›s~Ïä—pÆ%¾ZÓ9/<Õ·uãõôó°eWA’¿YÚѱÎl¯Èûm³–ÒÍs"cY{g“ökõŽ¥<`¦iè×qêq>ÒÖýçüiù¼h-Cˆ³jg?¡J~ªéôØw¦‹ ¸Õ!Ë©JÜ—ër0 a80ÓË¿`JÏ)ª¥ÅÔ”Õþ¨ë–ü¼eŸ‹¿‡¬Ø=5h)-¢àqAKàÞ+°_EWX3ÉE‚ð"ŽÖ‡²ò»iª´ÅëïÞ|·É3ŽgL¦­A­¹y„°åªîn€”Bì¨ ÔYŒF÷æ ;¡×eÁŠ,¸<Ôß/¡™R`•R¡VQqÕÔho6Ðhë–tÍtº7c×N\ ßìt˿˺MDÃ$ÉHx¤¸„¾¡Â'` nºŠ a ƒy0§‚I`‡ã h°†Úñ;RþÙ–yî¶M6àyßÏUáÀgÒß.y¤Z0ƒI†ËÎþ~GŸ@ØêʈV£4~oä«éré8Å£— s‚Ȫg>¬G(ø;^çA¿CȆgµ3„.œÈpýÁvïÃóPȤa½ „¾Wdm_MÅÎás4Ä.úÃñtÏêž³WQ'ÀÅ^ìï¦Ï×®ñï¦Û¡×ƒÂ™ONŸx,£4Aƒå» ÷ˆ9îÔè’OìNà·5¦cßÖ ­Öo\ZÜ쳜ò¸¤“xlOÎâhÄx¸àÚ ?§üÞ.»ÂÎ+çkžq´‘ZÊw7ð <*ÐÓz›–àå]zØ´ÇišÒt3M;ôØš6Þtw‡|­u<Ù‹? ×Óûj§}ãêlG¡EÑù%'ñYÊ!Ø(å+’0šcnN-ªfÂPQ°s8 P’ÍA NDP‚Râ‹ÐÁ¹&VÀNðv{Ž3鶤òG¡ès»qí)õ8kLKGéÇñÓ½Àt›$sV± –U,GÎ*îà 4.IWé.ßU›syøÝæi]:Œ™—iMJ}`‹OÐPƒ $‘sXÂ,Ò'€TÀ›©–6Cx ”Å÷@××¾‹æXÝj’ÇóAQyeÏÇÊøÕ‰õ1.«ÊtÛ'|_¾–åéeîNóͧIRCÚ-“G–5ûÂÆLx!æ7[Æ~`Å%¶S»#ÞuAÂ.¯K,àªÊ›Ï¨äŒþ´Šÿ%00„½x‹áꔄ @¬šç7 ^öQº:Ã[6/äR‰,ïüÞóWÐnaûÓ<¯¯ßŽ-ËX3X>\õ÷´©5qLuÓGD1Ĭzt¤gƒ"4äØ`êN–]ƒ 3¸6T䱦;Ø3þ²jä×lœŠBJ(åº RP×D©§n¿³sœµ9®F%Áò½ÒÀBú=9uúö§7o>ýòÓû×KõÈ8Võ¸/2#eJŽUbÆÇ®;ZTëHÂÖz*whëäÆ 'äH ~ªa·Ä»¬þ½ÌІŸ Ö_£¿¤2NF\^ G;„…í> â$º†LùUiñÇ‚XðÌH$I2Ëh¼©,Upc¡† $ÑÆõ=rfD§ÜÐ L°A.•;¤×Õ­#œ2Ÿx3é‚SWªk‹O©<å‚iâi¸þ“$_ï»…ð/jƒj÷Xfþ'’³Â¥¾ xœ#ÌÅgÿ5ØàéWâm Níâá.Ü_ˆç¥ð¡V–ê캠½þÚOÞÁÌ€¼m¸€¼aQTó\m:v³ø:—½ÃN•´ÂãC%¤bsꃺšr7f¹ÐøŽz¿+9¹’ÁÓc᣻ꭒÉ+çÏþߨ endstream endobj 451 0 obj << /Length 3740 /Filter /FlateDecode >> stream xÚí]ÛÆñÝ¿B} ‹æ.—K2@œ4IÄë\Ç0x%¦H…¾\Šþ÷ÎÇ.¿DŸïtŠ…Ór¸;;3;ßK{«ýÊ[}÷Äëñ_½_ñàõwOÄ ÿ„‹ß†ÓÅ*öÝXD+-„ëyñ*=F¥b× a²§\íE«:[ížüc‘wFŽùl+ÏU þŸè›B`íWWOž}†«ÈµV««Ý*Önì…«v½ºÚ®Þ8»º:®ß^}?FŽ@ŸPÔc ^½ÙhÏsާ\nç«?I˜YOUÝNV½rD¯ð¤+…†WDêËW/xö=ö˜q¾±¨`¼Gï÷Xí¸—,ÚumWgÍŸ(k¸2F²þº:¿ù=K»¶ª/—»A»‘‚ ßäíá.Z¤v£8þ)¿z7h‚¢ýÍ¢hY’8¾þñåËw¿üøú‡¿>]“|êªj‚ñËÙAópb8Å7g8ð"oN°".•¬+bß )iî<\ HzfF’_\|ªÒ× šÒXSÌhóÝÃI¸”¹JôØò‹í¢¬ÚK—þ½*³»bW„‘%‘dò Ý §‚cÛ~€úÑþ_䉀3¹^fMw}Ì[´³{jàu3Gôô¡“š[óºø„ß8oQÅþƒær¡:-ú¾>@ ¢ø–RðyðÍÕ4Á!ü7o½ÕÞ}ûÅÑê†fq¶I÷‹ÕOí8å»"Ї €ò‚Ý;p`õi MÁ¡áH£»é˜ãø\õR(Ý8Öß#WK¿¯—´Á„À»Éqüéz‰jÐÚôNjÔ»ñ¿ B@¬Xù~YëÀI굜2/÷¢aU0Zx®Œû¤ø…Ép\ òy„h*Ò¬es Kä°Á(ÔwfؽÍL¨€cñµ?Êv6¾8'4¶-޵“0(„]™§ "$Hµã MþGf ¥#u÷îSæ¬tØQDÀC,G´º”3ÿôÍß.ˆ) ÝÐësô'Oyö•LŒ8R ä‘¯Ào@E•çƒx¿ã#UKÙ´IŠäz]K¾/‰axÕV m×Â9˜-žeäì!fÐâᩘtæ¡®Çç6¾6>k, éFRYþÊ—‰4$–Ùýq mvÌJCÔM^LÖ”çŒ_'üÖ3IXËü"oÍûÆJÅÄLÕ-Ì꛵¶ë÷øÃnru/vCNåÝê,Ùâ!É:D-”“•MW>|òž´ ÇÝ6%:¯JžÐ´ÌÌ8ÕÕRƒ1inËôPWeÕ5Å-œ»Þ@êߪµ œ› ÿ~ |õZyNOÒC ‚î÷݋汉2R‡ §z´% qšñÛcÒE±ySy%%š˜K`žfè§@àº+K–%€ÓªL»º†A ôšŽÞ!ÙËÓªÎøÄ—‚ôªºAAÂy ¯*¤v&¥@²}a(`¼°S˧ÔòËô5= %cÆLûç˜9Ê9$õ‘mj¢<³Ê’k¦5°ô²zWÕǤL €ý‹r¾~õóæºêXL«+2 ¥ó¢4Î)if‹^<ûq²hVþ¾!îô…:à/ë€Ùo*ªùh¿®éÀÜn—Ï{ Ž*„5M—=*ˆÃG5Vi pZ‘ðµJÏuF“²'Æ›ðoîÜì•·ÔÙO!IÛ&o«®æEiµ5x(¾h”ŽÁ‡cÓ(íGÅ4$Ö‘œJüŠTâUU÷‘’í$1¹—e¯@VKȌΒ=ÌÂúdo1Y„TMAFˆ©š€àxÇzNZ=`ô,óõcHÌåã„÷Z¯³Õ¾“xh³,ȵlÝ0Ú¦:#|p’’Ø>€*À¦•ÊUÓúîÁ›€Ã‰Cj,ÃÈ)ò³vÓDÀ|¥Ư¿ÎRðm¤â24äÐ×Y‘P‚A3ªÙÌ"IßãˆÝ5BšîD]dzØa’†ƒím™!`Ѓ‰^üÄ'{Î|hE–p› )ù[¹ 8ž Ê“L+š§ó>3oÆÝzw©‹>“cºžì3~òɸÉ’¢ÍêèB(É>³Ùy‹“øáæÕþê¶=T&'6îÆæâàé2“¶Û,„žÖù©µ1ñXm»"³OœäkçüĹž!~Âú¯ž'a ù_•Æü„€i_¥ÉDzç8©œ—m] &§«‚q|¾0BÄÚUJXY?茄ìË(*‹ˆº¾eб82!læ|1—}e³9®G×9ãÍg{‚߇€‰Ya"­,¨92*B¨tú­N|òç¨ÁFC3{šaC†= <ˆÙ;¡pC¡>.ÃsÑé~6Ø $0ÖÒ“41ÙžhªÖ¥cÜaéf9¶¿ôœ1S5l4üdÂqФ6³òòÔµÆþ …‡;5}?ýÂÔØ-ïåßÜ6nÓn¹$ÿX0ÀÔ+žôžÐ!Éÿ©–êü8‘%…Ñ?kýû£ÄT@‚SF÷ˆ¿cWÊ…Þ¶A¿œWÁ`WW’ìÓ¶In›/f0"†\RbÈAÕ•†C)ƒóûˆPWéÞ ÿ¥nxe›rÁ8¦¼²;b&·ä_¦â61ñÞJ§†¨bºQ°(vy±Ù”û…7I½Ë¸®{—B`ÓÕà¼6Æâÿ+Åfß-ˆ4×Ïæd?¬¼øBáé ü_^úiáõŽøÿ› Ï\kžñ>g²« 1™ø¨¯²74ƒ#HÝr¯%ˆL'Ôiå 6уñY{ù‘e }HÁ/+1d0ôðOE¾˜mI¾‹›_“ЧEËÙ÷«÷¬H&MK•Œ1”ö‚³Ý˜°‹d}Ø5Y—ÜØ7än™‚%uR¾g˜gZŠKiC„M¤àþôOZs\Râf”á&B:&-OCœ™…¼²„육ÀäÑŽêªÛ,JRy ²é{€FÊy^”Õë€.4¬{¾ƒuaë-Uαmhk=ˆÆ}ó¢ȶæÉv!õ°ré&ÀÜ’Íë‹¿WtÍ¥¿¡åæ§‹st5ÁÍiž ‰Zkö3µD@°÷í5Æ¡GÁ ¶˜¦Ôȉ¸l“Qd.¬ Ì´ÿ•”ÎË,)ÅÙ•¦T¦Ió¶8"1G`q¹?'¾»Áó…ÆŒëoØ•0î‚r^Ïzq¬P{‚òr"ÛA±Çœ[k˜8ºŠ0ûš‹…o%¹¯—}™k½'Ï™xÏç×UMŸ[õœà 1©…!i?»HDà ª¢Jñª¹{KIšüª)_São¾0æóEàÂùÒÜÉùÚ¬ä’o/f÷Ô3‡b?{˜}} ×SùøBhL¬ä½¿¾€:!úg¯ûûT¬K¹-ʶ ÞfRŽ›&•·¶ Õîñ}K¼1yxR¡ÁéÉw@Îo]n{ M~̋ݲÜ}è%`û`¾„ünÖãÛÇÍ`7`YÉ ’ÛåcS#ç£æ” úz·…¶yůς9¡3¿uô×Ù–F|ǵ¾”tÏNër‹‡ÌÜ[¦€?WOJCßØß§Ù’3à ‹ñºÛ4/qLÕ¹²Bö80 j‡mÏwžÅ#Õû†29žÄU_úKq¿ ˜o¡“òÍ¿ô½Á=â7 ôqóÞógf çTU…eÙÌŸž§ñ:³y…wÈü剌ûȉ®Ø„¯Øºõ8è w‘ÚG‹ø<|ÇáÙ÷?fCÙiC é!Öâ–Á| G‹~29ìÄ” o-1U½µòWósej*^®XÉñ—Î2–˜¿*±ïä[jÔ+%ç³jáË&„rÿ_'M^˜©X)õy L˜ye¥«,€Ãw\ Ï|Â[ðýߣtŠ×ò#ºm£ª™4½qã¯k‡oK—M¼—Rñô²_¡ST܃#}Â[ƶö@ƒ_ìøqaAèLAàð2¼G„§˜U·iðf‘_å„QÅ×nŒå\ lÔFôí¸ïQꈟVgË€¢xa·ÈÌ7o†ËIÚq~–uO8ÀNâd*ˆ@—@—^ð‹0t#%/¾à 0w^̓'óÔǯ÷"¼Ïê»îöíýHç> stream xÚÕ[[sÛº~÷¯àË™¡ÛÁ…à%Óô¡©““LÏ9©ãv:M2Z¢,Æ"©’Tdå×w¯¢uïI:ž„.vß^@.¨uoQëÍ5׿Ü\<í8V@—»ÖÍÔò¸å1J¨ð¬›‰õÑþE—#.©΋ìÅåç›wõÔpæZ”8"€ÿ…ï[9ÜØè¼~sÃGÌ#àšè«,IÂt¢ Ïã4êÒ5WàL¶8s=âS w‰¿fãe¥eXÆYª U×÷ërVµÇ3©Vœ–Q>½d Ö8"=©G¸+P—i©ú׊?j1F)9282Ž„ > T|:D ·ÿ4ÖÇ‘¤Ô¾z “Å<*:Ôz*5sž“z+@Üi6Ÿg—\Ú«8½GÏ_Ã:·TK¡éVªý²œÇ!Y¬õÀÎ’ÁªqÅ8¥žô¼X–ÀúUÎÌŠîð ³ßáÔšF•QÕX/\LlL–ÉBMÇ OwÅIxo$.33*.ô Ø º‹Ó0_à ëÍ/CC»È£ÙûyvÎu{œ¥ è´,ôšæ&ª51f¢!å{öt™ŽÑ ¬|Wc%—Ì7£{JeP0RÃÝøìȦ½’¡ H–=ÎAvŸ/tO˜GšÂ"ÏÊh\F†§U\Ît«&MÂ|2`ÈŽt mV0žj±«îŽØ··i˜D··[p//_êë'ðü··I§··Ø~q9bú !þ€yœøÂ©ç›ÄY‚vàzFV¯±J7°ãB_·˜è_ˆ~¼®fÙÜ ,ÆaŠÞÚŒ/–wI\*ÃP¿Ãù\7@'Een†•ŽŒeX< K}Íұ‰´—…"ˆ'<DÔjOÂÅ6PsJ<Ö Ž ZM¦…V2v±œŽcˆU!Z®úµŽ£ùÄÈÔR §£,ŸDf`X4²éF£ \€yTFfÚ×àçóõ¥+m´&0®(Ï*7æêö°SMl¢i¡¯è’#kÑs〫‹¨Oõwýf#&Z̈]«(v¯æú[\è•GrìÅê‘17ÃWkŠþäÌÂ?èÑÁž«›‹ÿ\0õ³Ü€P7 pON6€+3ÐÌøíGÀUGº½…ã;…KOno¬B¬ÚZÇ¢°+åjÏ£ƒW¥¯8|Wã0¼+†ÖéÛ1îòOÇêT#S[M°a°Q¡Í °-› ®!Œœ?+%ë+zк™dļ ¡T„‘ŽË¡HÇݳ}Z­„0÷»|ZáÒ'ž/Úß}[D=UO‚1}Gíôìrõ§â#ÓÆ—ýÈe%’k„ìô\·^i ïˆgíêö1ÏnÌYm=ŽøÖ#¡¶2˜qqÿ|8„Y¥÷>ñB…5. TEHª€a[(„±AðÄ6ôG­õÁÎ%âM2[¿õäëJ†È0pìºC\ ¢Þ•š|“ç[bΉ ª>a‰õòu4À$¡`õœKPS¨Ë7Îa¢îgÓ½vj¤oˆI¸@P4Û€g{cðñd^3C¤µÐvèšÅEqôûÔn¤ß°¢#Ò»®¥e‹(Ýò&û8O¹çs¦Dã>9—{~v×'Å•ÕݹX>Å­a¾Èš¢üÚt0oç‚ ÙƒîÐ+rŸA†ÓP;É”Wy\F‡Bî<úßó¹÷²Ÿñ˜ÛิÝSÕ…5úrÁŠEý¢õ§ÉÁ\27bÛ¡?î,=;€¸ÆÒ'&œô’¼·!n6˾wû马«ª0âà¯vý/!Æ <µÍâÔ%‚öã ?Ögô,÷÷­—`OÛ :qº·§RyÇðÇ%TöÞø‹ÁZ) é7gvW¨ŽÚ{úõK »e„>ño—~üL­ Ü{‡€ |k¥F&ð¯**œ[ ¥khHGæû§F\Ð Òr!–l¡áxñT.ò äCÑè—?vN 0é§:A¡ ‰©°óOsDéDSÇ^©k}WUüÃUW…ã˜mFzdYѨÏ,@[U#ÃMS¬ˆÌÌÛÀp«`W0›‚ƒdc*;P  ÷=UaBuöDM¼ˆÆñtmfÂ2dÃìxtc‘gã¨0<ÕÏ!à²ÅÈ|°W¯5X¯Æ9ÎRU.9µ—¥þÑÒ—‚«®Ë™¢ÝITÄyU­«˜ÀÆ2ñœÈW¥¿¼0c‹øÛáõÑ RXˆ~Ê¡€–¸°4ÖÚ%­Ã5ÒÌOÒ4ûöØßAð RÛÈ|°À«X!ö:ž§Opâã‡2îy-.Õ8ÆQ¦Rs«'”CÒ‹7Í8ðg^sz¡›fl—[^ |$„ׯ¸’Ù¸:bÀ|lu;‚·Ìoá–·èá-«eìOènNõ|¢T„÷z_xÉìyå)°Ò@£.ÂŦ6ŸO±‚a@´vùWÿºzuû_ßþóêúÃÕ퇷ÿ¾àŒQˆ¨Y‹´fâÕö\ð@–ã™ñ»ë¢ŒÝžV÷knÂ_Ñ=pa͉ޞ> stream xÚÍkÛÆñ»…>ô°è}ñÕ"ÜÆNÄIz¹ @ÓÀàI«cŠTH*—˯ïÌÎ,ER<Ùwç †q9»œ™×®XÜ,Äâ‹g¢⯹YPãò‹gr?€Pcò+Àp¸\ÄY($>Ò0N«ChfIºq˜éxÑØÅæÙ¿gЈbèù«g/^'j‘†Y›ÅÕf/‰0aÅ‹«õâ§à/ËXˆ`·/ìïvE/ËŠž’_mñ‡ePBÏý]·­yØ/‡²ÈÃýÝÅÏW_ÍÒ6eÌ««áºÓ0•j°îŸ~‹5t}µ¡ÎÒÅ­¸ÃÁÄ…rñ=0áˆ!2:”iú@D,õ"‘ŸCa&Ií{p &•Á1’–‰HKÅ,­8…MFÒºÚZä2È4Œ’I˜j(Ü/J7n„Íà“öãVõn—Wë‹¥ÒQPæ‡jµµ-½åôh‹ê¦´Ø6Á›ï¾$ྩW¶åÿ‘è¶–^vyÛÙ@’Þ›CUzáQ&øŽ5Eì ÿ<±§Ç^È(øÿìêаÀºËXÁn‰K)A•#^x^ Þ$ÚUSì»ðb©Ó4øqkÜØ_Ec×ϦŠP‰%“ø7iìtôúúâ5pmÀnP"%Í€ßfnÝ¡:Ô,Ð ÿÓ84:ñßµû×w[µDŒé™¯×EWÔU^Ò;qÌyË㼇—Õ¶(×­˜ûéj|&Áú®ÊwÅ*/Ë;b*Œ#ɼc3Ýõ*ï,}ÃhÓ`_×%ê =o/¤êæ>lÓ"3åôÒ}@:@CÛÃõ®èZF™·ïZã)ãY’žxê&ðSå=†MÝð÷þ;`÷¡ì&4LÑ5ve‹ ¿9mr<cÅ)*Ø ¤c‘ JŸS{¬†–líŽû‰Vh´Ö·®óÕ»~5˜N†Ö“^fYaO\VJq/Kè­òn°dHB¢ƒC b€fœ¦;j¬íªX[j»ùâtf)عåíj»]_䌵nüè&¨&Œ 5ÆSÓms¥e¨Öd2ÒhøþhKšûiÚ.o:»ž“”C®ePW+‹bšÅ0d¶Äq1-Z‚1âaÕÚX@”Ee=¸ê§÷8ÓæiÆBÑÕ‰~„±ˆÂìh¬÷yÛ²”Aw!ƒíÅR’6#mà³€!1à ‰¶ h[üä¸Ü&vP öDèü†Xà”gš÷7B‚ÿÊzÚÈ¢Ÿú›¥Ñ*”zb¦ÇŠ˜_—6dr@c Š¡¢$5¬ûÏ ¢¢¬¨Œ> ˆš‰˜@þƒ¡6|¼hjÀG‡SOÁÁ±P”é‚'ÅSH†4-œŠ¢4"aÛêLa•Ü—@X41†9ÖÜ¢>´G{{ï¡`ñ9tË0ŒÍÀÁŠ9kI( ÛUÆËÒÐÞY좩sÆÑFÞÚÁ°á·3:œÈÆLÍèÀ÷8¢¢Í„ö-8P;ñRrλÇ#eì.è,ûÈMSïÎ{Áã& ¥B;¦bb%·)Ð^jÖÖÄ … kÖ°e-9c}0v0’‘ß±¸à»‹T!z•36HP@B"‰†oœJÝÒ‚=ãÉ¥7mQ3@‡~³¡@‡‘|ºÛ×kƒ….vö9Ûh5˜vO©±Û™1Ñ:ƒa}([T °y Ù^K39ñà4Îe#d˜#Ñ\]XKÑÔÕÎVL'è´N©S"ÃúyûÛ/aî·Ý¶±ù#[ÈžÒ+EF¢ÿÐíÇ’ ¢†²$m_%C’Ç@ª‘~³½mëúµÐçá3?tõâ- ™›3«& •ÑÃU¼.*Ç¿3KH![“ÒôË¡eJ®íÆEZŽ–-7|¶„í~›»¶"v´ ©PÁË>mðæê”`ðé ] ïqÞtŸrá2Y¦´F¾±¶6^"!±fRÁ ­íÆ…ƒêÎLÁNв«ÂW——ß^~ÿöåå«·¯_^½üzNÚ 2Ö8ò_Á¼˜à¬[|iš·iþ …›J¡µ"0…pSÙ ð”i4CÐå««.¿™Õ= ©_ÃsÖµ52³,è "4 —Y¹mßÒ;ÑU[æ”Ó"€¶V,hy< —–§—¿ëwŠ»²{3Š=†-¡µÔ¿¶èr(’Àw²²Ø‚½Q­óf=™ðÚn‰[² §suüFìKô k~Ñ€þ]#¦îüD’Ô‰ áî,Áàcg#Ü—UAV†ÜÝÖ-Údo`ð¶¸ÙâîC g°ÔÑ3:`CÜ4ùŽR7ìœX!dQ‹Šf½DÞÜÍ9ÃU©’dóÖÊÄad’÷ÛR0õ½)]¡¹A¤nƒŸâÔ£´€Du ©íí<¶Qh3* h¢ã%s“îmÆ¥/R–7@WÎB:2½vÒœ˜¹†]c¼CCzg/¹p™Ð9 %@_@ê œÝË;vc¼CŸ¸H&BEеÜåÏÆåqöÛ‚B=µÂ¢ÌY+Hï‰çt¼ÇƵ¥çÚæeGãÂÝ–{! \Î)Æ®®˜_x¹Ð`$ÁœjîÎÅ ìèy0pMB,Ð?žD/Ê[QÇ®s¤è(LV÷ã“Ò³dST¾.u->GGÚWei~û7\ª!•'7°¦BÊÔD)v[¸2 Û7äÏh}\u‚ºAýV–K78šì7ØÚrÏ8¨¼¨W*cS*c œØ°L×îÚq¨×Ö‡fÅñ.ZÙ ï‡ vnw@×>¨óľê%¹hZºZC…9yÜ0ôÊÌpiýxoâX*±É1å ãØ%`£„ÈŒZTÀ“¸­ÖÀ‹w.9ILðe屿ÝìŽêlµvsiƒ·_µK©Z®÷(©ÞËRÃŽ†R•a)ù:‡”¢¹£Çè½&¤Ì÷]½ç9j’›j*_̶+²xØÇEPb“ÆØðд¾RM =‚”Œì}¦cïk֘츨dU”Eçä9+õ¿ W˜Ò’eMí£òqj«b¿·½à¢ñÙ{Eh“fA¶’A~ÛvÖãÄR˜@-i;ˆ<× c4¹ïêC‡É<>cÄ6*Yé&ì„ÈÉÑ”7Ο•VÓÌbh=ÈX8¤ü”^œ¬1§¤Ê%´úýc—šdš…©QÓRS¦ÃØd/5Aæ'Ђb=Qj2ª#È¥/G%ãrX‚0ÕrMŒ“h&4Ä|0L8ÇA(ÁÄ“¯ßKÍËØžJgR(pÉ îf‡òþ9&«^zTÐíⲤ|ž„ñ(aŒ›Žÿ#ˆ[ä¤8÷Û7oÞþøíåן? Ͷ{ÛNòÆDæÿ÷iÑKÓ¾¦1„?”cJ–ÌO!4{÷P‚>›–˜Aì§Àl\Ó„ÙÖ@1fS±9«ø1 éÕîQ,ýì±BSü•çþ DrãuÊ $„ }J÷„ߟˆ6áÑjÒcµHŠ$Œ²Þ"~ƒåá3z¤d ‹NÀkÛvYÄc4ij*úÉ»üæOŸÛ¨éäOÙ¸˜É„±;˜è“-Ïï`‡iöÚÁrv/–ƒÝ™~R»ëßpWpÎógë‡ø4uó±çwƒ°òþ³72ï;¿{ >{ƒ$SÛ§ß!±ÑíüN&hÿ8Ðý®?ø)¨<Ø—EëOÖ[¥ˆ!ÇýNÿmêÏ‹ß <¢yåJÐçÊ8X–ö£Œšèôu~$–ët”+ ºr¾MVt{Bð­1¼3Ý=•Åt)üá¤HOçMè&tUuÇ…‹Ð,gg\À¬9õ©v’knI:¹µÇ‹^®—¯õtÂA0_„ɨ—ÊþBP:8™Á!\©Kâjùà‘vºôÿ¢ìØ/Ç4Xfòóv®šË—ÞWÎÜ^ˆ}Âéšé)Ý”K£c‘űt¬¤R¾‡ûδzèR ©[2ô•F=‘ÙðhúQÄRÀ5–Z¨é/[‘@×­ QƒpsxÔMK£Â0ĶfZËËÖ]"Q­ø~ŸÜ'ò ŠB‘dfÁ±Ô^–î2 ÞØ¼r§×®ê/+ª@ÒÃ×”T¿|­ýò/ð@•®ÙhæŒËé±Lùå•ðâò¦Þ.£éx[«~~.J·Î›„SU䌫B%QP”Ù›¯¶¼Ã<ÛOγ$ØYùP&¢±Š•^ b½ò— o·µ»p91š;ÿÅ¡'ç¿8¶àMcwv]ä×®”ŸÄl$hûÀÃWý˜O)D5jb—p×ÏL¯ð$¥¡Ü]3¾¶Aw•æº¶Š¶=Ìž•ƒ‹Š´úóq´ìõ'ÚÐ]E…dx´ÅnOê§2 çäî:Þ<ƒ¾y¦ô,s¼³+0ËE»£×ë¼µü)0|rÅë}Ì­0øpz+l)UÆ“Côþ’˜ñ5M¸%£Ø-Øt›ôÔœØGFI¯×àjögÏ Àfëã…†]½>”tS0;* Ðupg“xõÐÆæîðô9½öQÅ¡í¶>”¼Êk†ÑÕBøKz3÷¢4TIo°Ç÷¿¦ËC'„›!ÁC7¼©¡Y jqBù?Œ1á6 endstream endobj 490 0 obj << /Length 2427 /Filter /FlateDecode >> stream xÚÕY[oܶ~÷¯ÐÛÑYš¤HJ ФŽÛ&§A}yHCÖrm%ºì‘´Nœ_fHJ+ÉÊ&iÚ‡ h—âe8œùøqfLƒ›€¿žPÿûóåÉé/BšhÅUp¹ bÄŒÅÁå&xæÕj v·4Ìê²L«ë-òʸ̃Á»§aý>¯nÜd¿Š…÷Ým]õS;Óìÿ_I’ÕZ&<|æG³´õ;Õ[׳¯naÃÂø=ÍŠÉðcfv]^Wí#èTÑa£?)åUZäŸ@¸•r[×ïÝЇ¼(ú= õöòùé/pÜÃÙi°fŒh)ÝÑ_\<»zr]7ÝŸTRø¹%s©æsXiWà 9wÆz(ž+"£¨Ÿ‹ÒÏþxñâêõ/º :‘$ID?;¯ò,íê-ýwR°Ó¾u{šíŠËpk².ÇÆZÉ÷n0ÅcX¯pݠƒëq6µK²=ÚÕËtNÍ›º*MÕÔ°ƒÿš›À5^þzÂü=®±Øs~yò?èÆ @F´Vâ`mYi… ¥¥q cÂEИ`{òßISìŠ1v5aq(Ãwv{½R2L¡„3P"" ÿ’Ä:ÿA'¸fxF‰Á¡Þ²ig>æÇóáÌQB4ÊsóËz³/ ”÷ô˜4<;}‚Æîí¾Ê,p¿Oc¡ =hpqõ¤;¥Ç ð9å•$±®·W»öV5‡;Y¬k‡ÎÜwÛgÓÆû.’ŠD*™:¯È¯›´AÇñäÀ³S)qX;1û1Iø€EØørï>¡qjÇjFfØVš†—@Hpv':ÎÃù–bPœ½P0œúo7­kLiÉËN)wu‘w~ß+FÃÔÁaÍŘ$4ÑSs™ªÝ7Žô$=\cü€[RæUŠj¼@4ü­F}ùi Y˜ïˆÒIÁÁ»|c¼¨ªv¿µ»BØ,M/VÞ–~3?£1™[ìÅÛÎmSûi©ûÙ˜tSÔÙ{÷¨èŒãÝ%&œ3ñŒe š(Éaß¼¥ÁúŸø‘|?ØY%°."¥^ÙNZèÄ2´`òØzÈ„pæ"d¤‰¤ü»dÄ_µ||:‹p(ao=WÞzÅÌ;_öï ìj!Ä}0$“˜P)¢$™2À·o¼€B°ܦ¾Ãq‚eޱ Ä&\€íKû„@ö­o¸«0c!ˆ'­i v/w¹ØÝ/0Oöëq;»é®³§algõ¦WÂ÷t½zC´ˆ.ZtW¡5åuÑß¡î6í†SLŒ÷y8Ží¬°À“AœåØŒs93ëÄ@ º»˜&sFZ{fM¢Ïr|µ/‘UÚÃˈÄz à?„•»à„ÉŒ2¢˜>¬ÝæÅR8)I¾}“67odBÈ1$âàF%ü3Tß·`0DsÂ!lX ¾TÿEk% û!­•}ÙZYùZ‹ÿPÖr?GÇãÃ2 W!“)4~rößÇÌæÕO¢•ó)ÃÆ=Æ# ŒªÅVÕ¥@¨÷™{K©I8  4:XÀå ̬Œõ(xåRÛ<»uâË}Û¹Öµß?u?>ƒ¹‡aÈK×¹K;¿®1[ÓôAX쟈òò>ZOé„z-RâÅð–YÖB£)§è&‡  2âûþµ±6b¾t 4ÑîÕU ®®Èâ{¨ *zȼVÔö£¨íS¾ó¶ýjEðÚ~ƒ"bªÈqlB¤@¤Ž§±§Ï©¼^öO@ŸG± R,¦Ð}eÒ€ò]™V:ÜUÀ± :¢ˆQlà±mï!r¨ÒÒøÀÃe’ Dƒj”=x9&û_j6€`f£¢¼k0U×w í'Ò³ö1'k«“Îçº.†X‡P.…r Ì¡ÞÎ^‘¹å"9¤ÿmwHÆ|XøzÁ;zfœo¥Õ—NMölçy×xûcïö>Å”ù;Ë È¿LŒQÝv›¼: k|´ô8'Þ´bˆ‘xý2ÞwiÑÖ§™ÊWÁVAGBÏDðKÐòhB‡;ó´ÎöX?L}eq”(L±·˜+بk³þlFz_Ÿw¹Ì¢¡lf·ö®±ääÙQý=¹ÝYîú…l6Ž™Ûùf=j(3hÏfjdh_S¹á6¿©r|²´êÜ }Y•4Ö)ÞÁËèÇ|z¥ÃnC;[àe¦Yº1ež¹ÞÝþºÀb3œ<Åìµ¹&®ÉÞW®^R˜Íqü.0ìå¿®íƒ6/®gy7°ÁÀD^ëYbÇ 4ùBîÿ»-ç$áÓ´ÈòÊcex±bŒ…v$ÿS •{é\ ;¦Ÿ|¯/²&á¿ê¬nó²~´Ä„‰$‚ Lx±J¨¯7§Ea ¯NŽìwÁZ™ë„›\ã d°Å¾õͤ÷ú£&QŠ‹Œ í“Í:#­|½9qµ™¯­6˜/»ª¢¢DQ=gH_ªö‘M$ø42ÏcƸ€É‘öcðX2òœžÁÛm×ퟞn>’MÀ7¨ysÊà&Q¦Nß‘tsçJ{]cZb7¢Ø3Z¼•íÛ¤á«AÁå\1ëxì<8{_øÞWÖ.}§'¥$|Þ ú×y‘§ËhÀÒT2ú#[áÓ¾|ý«Ã'±ÕM‰ŽsÓrÈeVB†5ZâÎ i¶nÄë Qäš»>ƒxúqFÛWæ"Ä4Õ¤Ýߢ€OQð0P¥WžW…_g›Æ{œÐx€hì†ÓQ¨„’´PRR®ºv„hò€$XôE ½Ûm2À Õd‰z(•¦´ Spn°˜êdDvÀó Ž¼ðËz|- HDîq#V8¡ðÏ‘ƒŠˆ n•~ÕÞ¯N¿±_uïWmý jÏ\«§®E¹JŽY‚&kŸ¥i@œœ1 °¯„ʈ@z¿KB1ꢟ‹Sèø‚ÀT)1R¦2åÄé˧œs~yò‚Õ p endstream endobj 499 0 obj << /Length 2278 /Filter /FlateDecode >> stream xÚÅYmÛ6þ¾¿Bîƒ Ô´ø&Qú¡ ®AŠ»¶×n+Ò ÐÊôZYr%9›½_3J–¼¶÷Å^‰hŠ’ÃgžyF ƒÛ Þ_…ûWÆE„LDþ—j¸ñ ó—÷Wo¯¯æß«0àŠI‰àzÄ"ˆÃ˜)׋àã$ž~ºþáŒ)‚3†“eÓ¦E‘¶yUži‘VÌY¢µ[qÌ$ü2~½Œ_fſؿ¶ym×¶l›‘E˜_ K"x”¦à¾(¢ùŸrNªít&t8)­]P«­èºJ§"œ|™r=±þÎÊ7–UQTS¡'wyyK]Mµlï¦`0­ý M]ml]ÜÓ¯œÜÚM’—t­ê…­ÇóÞà´Û¼Xà^æßÃaï¶ CÁ"pfH[øçϺy#?ß·+:·½ÍG‚i©»ߌüÇ¢ ‹UÌxÌ)hÐBèñ8ò÷w4•ÛmUî]Я&_o wDßtî°K[§7CšífSÕíð除fZ.Æ®hýŒy»ò¯ÀÍ‹ùâ¾L×yF}E~S§unæ÷pùûõÕ_WÜýâA±$Œƒˆk¦Œ²õÕÇOa°€{?À€ôÎ\JI&» ~½úWï I5ðqg3”LNNü±jí›ç!ã±ìÎãÃr ¡‘LîŽRxç¦eKÝ ¼î á5ÕÚÒ çzlŒ]OÖuµ¦»Mµ­3ÛÀ‰HO²•Í>û VÞ´ÞføpCO§-¹“‰Ð`èÅ ýc"ŠÊýNõcÈjÍb®º¾Åå»CïÖ Ö€&fÆÄ@¤ ¡ËzªôO¶­§¸l{2ʵdŠ'Ýt]œõ¡›n6¶\ä_Ÿm$\åK@2ËpÆ0%M #î®'#ÎGµÛ€`±(ÉdG"~o7²QÖ³6«µºhh z­ ‚‚ ;ª_šU¢pjŽñÜxÃ鸀öîÀ=XO¹™¸Äà&×°¾¨gD|0ÍÚmZP;«ÖkGFø£ÈËnˆ³y»¥ŒãºZ?í²I›)Ÿ4Ö?›{Jއ‘1"6WcÐÃæÿüPæí¡á?´ò„Åq¿rSDäm©ÃFrŒÜPL²´±ê€âè»Ë‹‚Z”ð°ÕÂJ+jnK”.µí)Ø[³±%и]øžœ8y^¶¶¦o1©¡‹Xüê™m[|ŒJk‘fÑŽ#zVPB3iï &ÊuFÏu 8=6µ…Ot)Œìru{{r‚é“ú—<õi î:Ïá]bQì"»VÚ|F÷‡fòŽÈ”îûi:2ÿŸºYÎåS€!×_uç±ï`U@Š‚ ùÏŸR©;§\ ŽÔÜ\”K𞀠Á¥/PÍ; ¨TÂL§c&.£Bk3±™lò 5²àjÓæþO¯Ÿ¢PõN dz ¦EmÓÅ=ôž>ÅÛt 3è a ä "ÊúÊ÷'ªTüÙîcß+êîçæž®Û¦Ÿ2¥á@³¡ˆƒ;›4ûœÞÚ±a·EôÁ(Ú¢ ”ëuÞzø½ÿñ·ù?òrû•~.rˆ¶œfÃdáÈs¬'¹ÄÃñ0ƒÄœEIQëMže‡›Ü± ¤†M^tÚý®ÆXð?;`Zöñâ¶FƦuæ%ì&mWßô¨‘¥þäᇠúIÜ«„ÙÃe:/÷…þ~hòÿ ‡{Fá%À:<@&”S دbPFàÁ-Âl°„€}h*k݉’ÈgEhΊ 9Åû¬hË/ö•V¼KÞP­Q}–S{õ”n͞еåTÉëª\ÓjµÓ#X 樽Tw\pP±CþîÝ£ªbSSŸ/ú÷b»—Ž[ ùN:Œßöƒúwp'ôÉÚìÒL)´`\ó}¦”@7Pî^†)…°Vú8S\ÃyþÛ9:mÞVsŠŽ' §ÇÜœ3Ë«PöÀÃÇéÖûûeŸcÃÓ­H8”¬ú,ʃO¼eƒcòÙ”}©2üÙNwe¦¼x™‰T:Ås>z\wùc¤Ð fˆu<þª bÿfD˜_ðsTÿà®´ƒ‡]g»Ú ¸2/WmÇøÂ?¤”E•.ü-Ý!Rƒ°âlÖÒÝ;{ÓäS>qU ü¾µ¥­«mã¾+ÀàUÕ´®~…¶+LaÌÛ¼¥º0ûŒå¤m½|‚јg\Z0¡g…ù‡kÀe/A³m}H§Šˆ©°TÕ‡ì@z2}¿»µí£v:êDZ$ÇéRÛ§ûb•Ö7@;lïs(òD(ÿµGž~÷L€;v!$£Çv¼Ï/^Š&ÒQ2w/û£ õÀQ\NûV\ru/g}pÛu­ÙOt]µí¦y3ŸßÒe€°ª¾Ñw—EE(o|Çìßìw'Änÿû²\Žˆy2pÄ‹Õû&°XÇE€ðÖ<:Éâî½›9 :° nøsl<ù; ±"N.€õcÑùšX­Ͼ6Öñ­ðÂên·ÿwˆïöÿbˆŸaÂÃ3ÁO”ò,„Ã"ô# EÐ4  9÷Ÿî…Á\ú?â64 endstream endobj 409 0 obj << /Type /ObjStm /N 100 /First 912 /Length 2966 /Filter /FlateDecode >> stream xÚÕ[kGýî_QÒ~ +Q]ïÇ E"6‰v%¬v7!ãi'÷Èn‡™¿ç”k öØ=+eRÕíêª[÷yî­Âæ ”°9 mÚ$L4Â)ü‡Ö ¯ØáÛ(|b›D0ã³Á g²ˆÉŽœVB+‹Z mŒGÇpfŽÚa§Ð¡ŒñBÇÈŸ‚ÐK8…QN¡:ŒåçYÕÈ%Œ9Îha‚Å<Æ€V BLùÜ8a•ã/,¦F{²šFa=weµ°[uÖ ÃH+ì?j¾Á†¢ç< 0Æy²{s…þÄ/MÆ„¤À‘6UäŸä°n cf‡oßá-·ì,ø0ÌôÁó'p8&LïÀâŒ]:EPžoÀd1Æ[,ˆrÞˆ¹€f'BŒƒŠd~ ܲÇO‰$`Ѝ,;AD£Ø‰"ÚR}Ñ+á!·P>W"ƤG”zÌ`¿†ˆcöÜæÉ\")îâL*‚X/i2* Þ¡“D*3c“©Ì•HÉ‚tV†oŒÈ¢v %SS\t"~…)r"©1‹œô‚ú£”áb=áRFOs#©è›7#— pÊSø‰_Dê^‚Ê© ¥ 4»èyΙØãìd…ËüÆ;ØNT3ð]ë 24µRÌ#— {à™ƒ íÇÿñ§‹ì{‘¿²gA¹ËXÍ8ÈÙ+„§43ç‹Ð*ê#HË<¶¬-67zð`Ô¼¸ïúQó|õ¦/Ïÿ˜Î5?t‹“vñRÁhÕ«æ§æçæÇ—º<Œšgí¤/Mr’ú‘“Œ–vàeæöU–Áf {(<ÍsÑü½{Ñ‰æ‘øn‰§Ýü¯Rë{âûïGøïp:`ôÒätÀJ¥ fG:ìt|ia0Oè Ãd‚¥Ô…½ ÒݹZ¸n¥ì¤yøàAY yXÖnž7ÿzö3ÿ¾{×÷çË¿5ÍI7YÊóËþ]7—Ýâ´±Ílúf1^\6íŤ=çWKù®?›ýåÙjÞOÏÚÇ‹E·¸wMÿ#ФHð3Ñüç¿¿ BôQ&pc¾šÍ^Ý8^Ã)éa‰ÛÆÁEHºŠmãŒRo_V; Þ}2Ý“nÞ‘=Ï2 ª|ñ»0ð®ë.®~w°*ÔØ¢Õº>À=ÁŽÊ&ož.ºÉó¢ÍÓGODó¢½èÅ«Mñ?Ÿ¶£æGÐÐÎû%¼m¡˜2_v«Å¤]·]^ý³=™Žè.DÑ’€ýÆl ÷§ã¾Å§n=®hÔ«2l‘W dÐZ·¶¶®¶¾¶¡¶±¶©¶yÝš:Ÿ©ó™:Ÿ©ó™:Ÿ©ó™:_åã«=5ßÂô-\S^*F"­`‚A„àüª¿hß¶àâ¤m&ÝÙy·šŸ¼^ög}5€÷Óþݽ¡¼¥TpȺ­à¬­Q°kOÀ!óþäöt؇ŠÀíµ ?&E™¡~ÆÇ-t¸jVØ7†Í2ê‚3d‚¦z¯dÐ~ !j8B¥†=_B'•¡f»2 G4ôœ8 úì ©HÈ‚¼þ!r@2Œ‹’`zá!¬µÒ̸D¶ìIÅÖa„Qu]@7Æ>¬{×îßãÅ|:?Ìâm2@õÖÁìæ­7ÆÁW°â¤·óÀŽÙç­ã´Õ2Æë7zø §¾Sc_wÓgî>†}Ý}¨n½RË¥µ4ki"ÖÒD¬¥‰XÃDôƒ–FÊÙ%p½KåèðÄ £²g!¨ µdMƱâŒ8 Òwwg9<³QÚ_¯ËrHüxÝo;fÍà à6i –†Šày´Éöî‹7ýârÚµµ:]Sï3h8õëÓµ6@°½Þ€dÎåíHx;g³CDìÇûR:$(¼EŽ/ c–&˜»<Êüµ]t¦L—xõéÅ[î‚•´l½@l H,¯ŽÅ™Ñxo¿yÖ¥ æ±™§âÀˆS–>ZéX¬æçµ(xÖ¬fíýòæ“S1î† 6Æ!Ø›tnÌà6’¶£øÞVÊŸßVJ{ßVJ5@§ S ЩèTtªy\ªy\¾zØ-# ð™°VðW`clŒ˜•Õ š2îÛ‹i¿¡*ëWûk¹…‹‰Y žõoãÔOîϧ×õ¼‰|zùúaÿø ²µñ²Ü«Õ¡\òà¸5,ÃxÇxg…Èóñ!Ç"åê/c{$Ë9•›¼jmÈÒNùtçÊø+‰ŠkeÂZb³o‹•‚*ÌR# ñÚ6R4–YrÂmYNâ/äI7-tcBIJÐü&Ç'¼÷> stream xÚíZ[£6~Ÿ_ÁCˆ4xð•ö¡­zU«Þæ¡Õtµr‚“ %@ì4ýõ=æL2Í$Yu+­F“ƒÏù|îÄwVŽï|}ãÛïÏïoX2éÜ/9!õ‰ÏCç>qÜÏ–®f |w›—jñ6ÍWxÙ¬5*iUÛ‹FUs•eŸÎ^ßÛ˜¿jåàà—¯o¨cþ`g¾¼¿ù¦Í êȘø¾BFÂ0t›–¨9‰ÃÈa!‰âÀ©´³¼ùù)"ïHn5¹¥°rËä¦ åþdæI¿Þß-q´)SQî¼ßÈïî’ÕßFT êlq–/’éš—CŒN‘£‘8 ððÚw¸;GÎcûäþ-&™ó+@²'Nh]DØ”;¡ï“{†„ìÀø ÃF'øÏ*­ B"ú½j…U+{‘Ö¾ªd‡Ãeau{>c ài–€zsFw_I6ØÁoHbÎqƒ~úvæq"3øi׬‹WŽx“!‘Œvá¶Ö5.PøU7*OT•àU’ÖͶI³Ú›ƒEÙÉž7s)ÝzW7zCf^R÷›bÆ÷Q›Ïw3¸`¬ÂwoáÑ vëb£'„‘Æ¢Øl`_ËÊ~àgéÛõ]}@vÐʘv"ìÙy*,óIôÂ]Š;¬•Y„ ¶æâ ÁH$€•‚Õ¸@%IÚ¤E®2<•¢4WuçLðøÁpÃã'ãy`k‹òÅ”D‚w¼½šÐ‰áQ 嘹ïuchWlqP—z‘.­.©Á\'@V,”ÁŠc•-W=Ñ?£±Èr8‚“ÉEÇó@²»œ¦dŸ‚³-Ó¬sÚ•*K¸—<£Ç$¸/@ó–,&Q†¥ qDÿÊRÕõG½Ø#÷˜6kµ–g‹"ÿÃ÷Ùj[©ñsi~ü<.23™þt@ ?œ‚ä–)ÓÏÐ/ðË67¶çÇ``­Õ¶nÒ½›{‘Û躱¡ŸÁb­m 6Wj^l|x“Öu?þ ͮԵñŒá·iðZ¸àpér›·X×àTD$Ýûuj·EÄq½.¶­‚ñ\÷Ao •9ÃÖi‰È5§ÀP¨£ŠfØÌ¨[àpâCFî†Bt YØ)ŠXüœ«ûuj5 \•‚ȸ¼hy-6µsÕ~Šá0Ý—e¦7:oZiÑ …[€ï<Ûáʲ*ÌA½KÄV*tlÔ¸xrÞõv^ëÆze¯É'¸èz}Û>Ç;a&vàŒÂ/k x2Œ7' â²§†F ¸Oð0ÂyÞ{˜–J4Y‘[s) ‹_|s‹·~,uÞ3nBÃ-^¥ ÞL³ gæVÎm«Mfd΢¡¾£‹ü ,ºÕìÖÿ¦ùÛ6¢{‚êõ0Ø' •^êªÒÉ„$¶©®íÉ=š©vãcf´™Åp´ûàÙ»¯Þó×fHx¹U„$`ò‰¦<=Ù˜P¼(rt¨´Q«ƒ¢Í!LޱÖU—Hå½ó®:g­ªÅºóäÍúÖNÍ´xUÛ|êÆ81Ãp|R’Á‰¿ä6•¹vÁ!¸„ü„M ›\§à&%ç㊡DuhÇà2¶%)wx5ïà8»|Èt<õ·+.¡aS–qtQù`Ø’_­|4k£ÏÚSx’=Åa<´'ãwòÂÄ J1(ÒÎp̨336†ƒÏönëžÌ`ïqÍUïqͳkewQø•¤Kc®àÍ Øý!ßlc¾Ä`ÒRT–—Ö. ¡ÃvÉÁ A)q¢]J!&vi³}‘Ь۶UšÍžû†BÚÔã¬ùÚ6Í#Ÿ°P¼W›æ‘$]\:Ѥ±¿€uË«»ÖÏÞÁ9Ý­Õ;}×kÚÙV?úl«¿„†µX‡DЋŒÞpáÃ×2z.A… ¢Ÿe®r5ÌÂ!tÉ ­¥}k9,–h9,)–Æ Õ&00À´¦5†ôàC{4³iÑÓå+@Ò¦ñæž©0ÂTÁ<>Mï`n¾Ãom æÖ€öÛJ[Ñàä¸ÒÉn’¼ƒ¢‘ÅruÀ®Ç…³©8sŸQpˆ í0ñmŽÓŽê&zÙ¦MÛ¬ÁGºÂî)G”¤ßçz}ØÅ†QïeÚ, vQI‚Ô^瘳ôç,B…UlF,Ø;ËŽÖbÊÀ}ˆ;p|¿óC"VoŽpi4VăFˆ_ë®óêrì ûÊ Ðx¦bËŽc”‹ˆtm Éð¢VŠáƒúáÕZ)”ÃeؽÆïÞž@ö‘ŸÔý—²g§6ÿ§MFûº¡ÔÕZ•õèÝ|_·öošûFÀ±÷Á¶X½z¡J9‘ï¹ûH) un÷ñUŸ-^ÔoÈyv¿ñ†sعÌH€ qÅ~cÞ·÷¿«¾A¼¾—<õLæE·Ê²é¯Àß±ED€_ñNX÷²ƒ£%p¢ÿRíT¶ endstream endobj 516 0 obj << /Length 1699 /Filter /FlateDecode >> stream xÚÍYmoÛ6þž_¡û`ÍwJû¶k׺.À6´ý Øt¢U–TInš¿ã›,9N·XJ0(O4y<’÷ÞU‚B‡»zÿGøíM„K“èÖŽÜ™ÑnEô;lñ Bp†H’LÒfH s ê[*¸âH)òC:À Þôßd) ¬Ü]\œ*,ôzI€¾Ú·®|³öâmnœÒHáj쇹Cí6D2¤Àl›]s¸Øû(á%i†ÕÙúSvíɺ` 8k6ÖY—Ä%l¸&cpëªWÖèmþõ„mL"~0mUäW«z€â‘N)ýØ?Oh“HQ *„EÒ¿hèùmeyHŠ0 ä!=÷åŽýµ'S)¤p:²%Š}gL¸(DÇBP\[VžaŽBôx>4ˆ£Ðý¼z­®…¯Î¯ñ0×RJrbL¶CZ|láš0H~âv`I3¶Ùü—uº'×g V‘*¶=)³b†{,³Ú8¶!y Ë6x6ÉNPø‘p/'q¬±KrÇö-"Æa3ÌÌ”ö<ïw¾ ¬ «Ûì€ú›€ûÑÞ¤BÜû⹋Dïc—|¹”x¡ÛÎgX½¢#á’!˜ÂÂ2P;X|ÞçëOÅG²hqÞÔ–šç ¼;9F‰ËŒÌ„ AÀp:B-ýU¯=N<”Ä}tÅ»~<9t¥Ëõë¹ÑEQÝVM±±\ ç ùx*ü2¿˜__¸‘˜Aß9ùµk2¯¶nªµn[÷]c’ç5Á‹›ªíÐ\ë‘g^>ózì™×ãXïlBæa:õðyˆ‘§ètJSÄe2‰’Œ¥³¥½œ¥ˆbõ@äYLo|ÞÑTþaÖB"±ÉBÞ¶{äî¥vÌ„ëj·sÏNø(òRÏN‡BOšPp’‚гèp£wÕêÀ|Èåýç;óa»g§StGdaN¦93˜o˜Ùœ™¥ ÅÝ-…œ×hB•áà”Yë¥Êû|V®sRsÈ´câ{Wz¿ØPÞšRÊÜÌà8¨bOêÀ ÎQð{ñ¼Ù‡˜]Ö:ðÌd}»1Íjfglýlgž¢Ã;"Kâx33ð·Íxœ3sø€ÙsµÆÕ¢Èö62ræšS÷˜3¯Ó¸¯Œ' {ÁfñsÓZÁ¿­œ—nêFw¦i5ÂÍïç¹d×HíºÉëîTABÏûwëiŸ9Ú1¼‹~Ž 5aaW`l\;tAÈ?Só¶kò+óHß óÌgnÂ_KðÜÖYŠ‹­ÏêínGõƾš3.‚JDÓ¾†±/óΞÊý]1Šð¡á¬›?hÊôiùÝÓóÞælVp´¦m§2Æ`³g3Æíø&É4Æ0f1cP,FIþ8^„ í8±•³¬7"JÌkòAcìÌ>¡;ÝÚUÆZ=z;û~†Ã«¸O ·M¶³µT[«šOG æì˜ö$$}RLP!l‰å¿b™ŀÿõöi8ìõ|HLÐÜY+ 1 Nx¾¢>…$UÁîžµñ컥 Ô_éÿ˜#ž¨§¤’ìÃÚ!bLÃÄa‹çcb‚ŽàÏ IʦaÌ  53Ta9b\†*,‘é£2O öǺÖåÆýAj‚¶ãš1¤| ¾Dæ1×< u™]„º‚ˆJúÚÈÃúäŠG­5|ø·žqX1N!V>¨P9RŽþ–{Ë endstream endobj 520 0 obj << /Length 2910 /Filter /FlateDecode >> stream xÚÅZ{oܸÿ?ŸBMźÈÒ|é•\ä‚»8¤—&À1YËõ ÑJ{’6Φíwï ‡ÒJ²üPXQ#r8ó ¹wîqïõ#Þ=ñ¯:÷¨ñþõ#ááP¨1IùhØ]xqÈb®¼ÀX ½tmj0kϘ c¯2ÞòÑ?'Ø´Bürüèð7­½˜Å ¼ã¥'¸f<òB.XFÞñÂ;™ýë ðgIu üY‘çON‡a~o˜ÏYÈài¯LmæJ³E²«±åϲ†(YMÏ¢$z^ç¦"ZeþÜf•YÐ[ãzl[fÍÊåí»7sS$gyÛõÝ®Y•…› hLµ©LC\af÷a]Ö Êî͸s«ô:MjS?9˜kÍ’báZ0ee–eeÜ»•>DéjœH>ÛfyûºÃg8[˜åà³dÛ~H Ôßn ¬\O“&´2èž¹^-û¦,Ÿì@Ì–ÒŸ}â\¦Ž]Hº QcyzØ …YP§Ä®–»uú´ÎNU\ŽT„$­Êº¦ö"³ó.AEÓ’ê¦Êh–&+‹šV‚pöfIßwå–_`waì½5«¤u¨›,Ï!õíOqÅ"-[K£‹f&Éa—N†L€º®…±Æ€«j`³h»6†(g&wòØíWJ0.‡jA•HŸÏV­àø‚ZƧÝ'K ´‚²'H(™/ÃVn>l}3¢k΢ý0· ®p–£°ë“uz¸Ž§Ï´·ýÓr½¾°CÐsÆøóëq^€—Ð …Ï|"¾œœroßÀ XÞ…í¹̉˜ˆPÎÜûh3€(Í} Q¶ôÜóC@,ÿ _hæÇãá–r 㥠aÒì¸(Íb“¶?”k´„&AÍl½ÉÍObÏ ?qŸxØ3 °ú©!Œ‚cþæÕõÐIL à*¿ÝâEIÝé rÚÆ”i,àºga&i³Mrj;{¡—<+Ú.–çù—áVиiÏ\—MRׯ Äs.rÝ9ñàЦT<$ î¼Ã|ËG÷Ý‘ãÜ,Œ‚,β"©v¤ŸH3!ÅP==Å7ü1é-Å0Ä3>{I t–ÔYJÍ¡‰ Ö¸}3 8l"·"a[²V¥ö¥\Òó¢´åZÓsïŽûÔÚA¤ãÕa« î× °'ˆŒtÄ]l*’°雃›KOƃřPVÄ!å½;é‘ò"°1«è¤û1„¦Íù«[åíyZðNóíÂŒ†J8ÉÌÇރءŠ:8ŸýL{ÇV/î>9zßÿâ¯7ÙeÙ¡‹ÂÎh‡(0à!ìí¬"Që›ñZ$ŽG&:vkéSˆ£ìqv¾èg@ Øç4ç2OΟ9_e; Øö÷fõÁ¸¿ ©¿¥·á`e›âòµú¬ ì{²Ò²î:ÇóÑ–øn÷ù-œ\5 n©Ó³G{MýŽ-Ͼ›ÅƒÕ…»ÒMu+˜º óX^ghP]ttWÙÿr•줴¾^ÚPæÞ«š“¤ƒ¥A`±­Šë–3Ø'd&Îä}ÅÂ82üïý2† b‘}¯Ý³̲Ô[~)Ü× ðèaL@´pÁ"_]ÇC‡O‡þDêâxècŽ»°¸6eТE*êŠ$@…Ôå¶J];-¶%fÉY‰àWÒG€á€¦J²óU³,« [d¨Ïà‹1ˆßd9…|8 qVåk–o^—D=ðRÆjvDñ›Á_š¯:Ðܦ&‚»lFß/ëº1›¡TTÙÀŽM•¥_lµã)"ÈÃ7&Í’|ªñ‰s•œ#‹0š­ ¬»%Åæð]xQlvÇý'r邞pNõf7ÿÈàoÊ™»î§9l×ô¶ÙÑÛU˜¾z=™ÏåóŸ‹dm^üǾ¤éóÃMÒ¬›òоž^3ÑI½]”§7MÚ¡zÓ:XTõü§£?Þþzùíéƒ|Hos®†·UW¹‡ðhÑŸsñðAÅð}ýÃ\ˆ‚åi)iï^.©¦ bW‡ÆÈo(IX]ÓWªx@£u ØÂ.Žè¸ ²ˆGÅ Ñ!@û=© › ‡îu¥´áNf™}›(©€i û©ÚÑᦇwžÛÛm'¸,”]6Á·Gþ]µ Ôîε֌Çc¯æó²šà( ¯h9v§åêUÆ> ´¸µŒ÷^¥¾a•àQˆ^ˆ,Ðaòpö²®·kò¯šS¡b¯s¹ºÝöëþöOI0ÅÁú=usEpoe´ÖÀ3GIÕMAáÐløpyÎGwË|÷òøèFM>é’3Ô:b"]Mtá›­¶ÑäðŽÂöLbÓ…7>žßqОå$m²^„Ò¥á;E5ÈÚºãk?ÚKÈh4èä‡cvÿ ?,ã…p±J¶?ö‹ïzNº±ˆšhp ³Ä{=—ÿ£üJ Á]o.´ûÆ£§"~*¢®2šääõ«WÔS³˜Éýx!¸ØOøÞ¸¨á+´]÷¹½'pN»•"àí795Ùñnã¼öã•É7ŒÓr³«0ŸØS*³Èšú±ã\9rž¥¦¨#/[:þ`(mKÑlJ‚/^¸Žk 1m„±«¯í ßÄ.œ*=|â*<ÜÖUJÝÆâ—«˜?$@éYíÕÁ…³á«”‡ðhƒ X“ÒÁƒÈ}”}IQH¬ØÉKvñP-cLlËëf·è&Ýù‘dR¹ó19¬WÞyïdîƒÝü‚r—ùÙLʦj;åÚåkˆ”ðžšzTA€6–ž5ðw€l³D­Ú‹4eµö7Íö•2DhŒR[ ÔîÊP²ãgi#¬j›vwˆÊ3ÎÖ¦eÎ÷¹Úk¾%¤Âó®ØÒ 4&.*¡û¶$ìAwyX9Ïs‘5+w%ÔæŒ·Q¯’ÃÅ’’öÂ*ÏΪ¤ÊŒ»Kj]Ñ»?>¼ùØú1,>|ͪ²°—ŽlX_ÃS£0]„´Q¹8ø“”þhûYuÄtпW|uô£¼X¬ì…D³Œ£ub|[(~`2é®°/%nxÓgóïß–]n™®(µdð™¿&ñë%¤í kz³Ã´,–Ùù¶…ü¹ /æ´Ù-‘b¼ç•ó2Mr›®îù¿¢‰¸§ä{'…`Bà]‘è®EmÜþ(ˆ¦þ!‚x€þõRŒYŒSB0ƒÂ[{³ù%7rÃ65 ŒÏYAXãNê&97mh2± c»´ÐÝË|ÌÍ#VVZin"ìãÿu®FC endstream endobj 524 0 obj << /Length 1979 /Filter /FlateDecode >> stream xÚÍY[oÛ8~ï¯ÐCd bx—X ™™všA›M2˜Yt‹@±e[[Ý–’šf~ýŠ”,ÛršÚíÎ DRäááá÷‹Œ½•‡½ŸŸááiþôʳ«Í›nž½á ‘ 1ñn–g qå…#I`dá½÷ÿƒž—E“m²˜T`©Ëܶ*̨ð?¥e[»‘x•À2ûpóËÄÞÄ30b“#¯ožý†Í â)†‰<*$”ôæy'”s…pH<¢H O'ÞòÙ¿&Dm5¤^„””ÜUI¤pèIxFÌõù,ûyü11êÃÊ,¡„ÚݵҢnâ,ëŽ:µ÷îáw5>ØûØ[À;Ø1y÷ÝÌþÝ13ïN¹!8C$ŠN’jP#Ä!’ê1 Æä‘Œ }@„Ñ‚=®Å® ¼ƒÕ‘ ®‰JsMQ„8ƒJ‚¨¹¸‘” /»ìì¤ã5ˆÃQ°üÏ*),2ÿqyñA)A„†» ”…€µ/‚ròô“ åpz¾Â&Ö¶üñyi[%œ4¯ÒàwÃ,´úã,ÏSkÏGgà –éªÕŽA.`™~~uÖÖú,+çqvæ„=‰BŽ>ÿª®ë0MÜå¢Ú)2zžа:kB±hô]¸&BŠBàñ×s öã[K¶oíÿ¦H õÝ©&àrÂ|‰kïùÚ²=™d£E_G±¤ˆï²$¨×±NYzw˜zÝdKzô×ŶѥO¸dôd‘ Iˆñ'ÔàGŶ}ž¦<âˆQw5—‰^ÇäODEþCÙÚÆ} Ö‡–ò‹Ä$^f¬)í³N7°în³ÃòfBäo¼§å»Ÿnß]üpu~õïÛËó›·vÁ–FàÔ$‹úù09†œN—Ežn§O&Ï‹ujhGLbØÖi±r„c Ü4H>W¥n&6fl&úi/&$q$6Ο¦ä@r3ìVjgÁuÜX Æ3âW´ý ZiRw8Ž‘@Dv±11¡¹m[õCÝ$y—ÓB_úU™šlxeßöóÍMtEª“ySêÛ5©sœn¾ÜÌ3éH×Bk0lRÛ.šŒaÿ¢pëãÚ-(—ö¹Jšf§[Ð%OzIÅÇA±DëR;™÷k¸Óžõ£ÃÂê^3Ü+d’úr¥ã¼~a»NcHûË,+ î‡5°câÿyìò¬;7=^,ú‚Ái$ª­í$”«Ô-¬×‰|לë´jlÛàlä „¨¸KG õ2Í’ ppÝÅݘÚL@wq½Öó)9@Æ6‚:í’fŽ 6ÐV”lQ þ‹ƒ½¡¼bìèhúmÃ(ÇÇ–QO£æô\ç¸ýéâj/LM…!ç(º´ã¶^=w‚΀0/ŸO8µ£ãÔÈ*G×`§Èp1†3†9-14jàÇÕ8:1dÔÊŠýÍŠ0Ç‘@°ï i&eg¶C˜žªz¢¿Õ#ÃêSd8D²0Dáו*û2`‡tâ» šÄ0ý{•;4bG{ fŠÿ– †l€B}ÔQ“S<õ™­Zö ýòKB;ëÞþzýúöú-,|õ`³¶£é02éa(;¢Ã)2z(›¼€É“è@#Š¢ÇÕ8L‡c :Ò²Ì*b{óÒÃæeŒm™—±Þ¼æÍ¹} æ5o·ÌkÞî˜× ÌkºoÓÕÚ-†™¥Î㢟ùcgÌAVgÍÁf‡ŒºkFB'ìH:aÇ€*µ±bôd+v.oÏŒ²ŸßLLH³,Í/­”ú?벪Ì4ô_»00ü®­?ºQ0Ž;/šuYƒ>ØëÿM²ÌˆVÃr‡yh™8i¿íu½XÇY–dvû ”ËîÓfm[}d›2hn/8¨6´1ß•G÷Š\Qxqc—–„cç8Fᜆ„+`…Ìe4ÚZ.ûO±¶: endstream endobj 528 0 obj << /Length 1122 /Filter /FlateDecode >> stream xÚ½VMsÛ6½ûWðVp&d@R”Hß,;V¬±Ôôàä“ȘX€Lëþú.¸KWNå:=Øö=`}»Kqoëqïòˆÿ4Î×G/&©—‡ù4žzë7‹½YÄCžÌ¼ué=°‡][Fn¾ùßÖ7/û¼‡ J’ [óäq±•ª?áìƒ$ý§C¹v«w~ÄJQ5d¸ÀÈ!Kàð"Y` á¾sÎØÅoëÂ’—}Ù¡Óä•d× Ù Qð¦ÿ‡zäí¡ü¨ä{?*£YNÓÌs…iJbÆù«=ç룿¸_Æ endstream endobj 534 0 obj << /Length 251 /Filter /FlateDecode >> stream xÚ¥‘ÁNÃ0 †ï} [‰¤‰“8ɉN !!”ÛÄ­ A7•UboG*±¶»qq"û÷ïω‚WP°)Ôò” ”D2 i¸°J>oŠÛTÔU ­4–Ò<E”ÖH-l˧ÓñmßW}(÷íøÑåû}ßv•våwõ’Vuí¥«N¢¢lúynªže$æÊnðqRÞíá$wãqº¯,·îBŒ¤À eùM¦à á¼·-—_&yqØ2*5ÍèDbš!´–ѹØ0öW \”Þÿ ñê“®Ÿ˜?îo´¦À°„‹m'Z£f^w©øÖ9|, endstream endobj 572 0 obj << /Length 967 /Filter /FlateDecode >> stream xÚíYÛnÚ@}ÏWø¤z²÷‹ÔVJ(ih“zo…8-¶#°Óöï;®M‚c'!4éå‹ÌîÎ93;g q¾8Äy¾EŠŸ@™r0Åñ+êÌð‡+{Ï·vû[Û{‚8TŠ9ýSG3GY‚§?v>6:ÁØkRÙøÞüÜq%Ôöž˳‰ã2 ÚÊtòñÿ$œÎ“©Û{¸²«E:§i›ŽsGap:ùϼd¨Cq“8‚‚•ÙR£Ð÷‡Á¸é*BÓIà¥ß³hi!—PÊAj~M”ÂFLB?ù„QifŠ13ÎG$BLæhH¸”sÖæ‘ºþÙäÉUêOä1=ù*2J¡=ùã§¿Me2>~XÆG=(>y¸$Ä("ÒX»µ q†Q|ö‰H‚/Z‚^2PZ/À'ÓAjyMœšÅÜÞâìGSÊœÆQè² Ex­ÖÆú[\¿¿—ðì^·ÇûXчUÈö»vkðúUç Vv>´Ëj‰ö\2».@Z]Ë,HNb=¼;ÙjuðʶڊÆd,][‡tµ †tè`µ{¿²R@¿ØŽËèkUÔV¹9Îн†›Ó·qs « 7'ÐU­eæ2Á«îbFHQ04)‹”7/«¨z-›{™˜pO½råü.xªên£rQÊs—݈(L©YùMsd¬’£¨"¯w78ZÕï8ZÕÿ£õÖGk o™.äã*2Ë€Jq“ ;šçóTˆ&A&H¥Vãú.×VoÔMìã3.v—Õþï)W‹¸¨zÁ³lÕÄ÷çËê&SNáÈD^5Ï|Z-¡ûtrY—1¸x^ xþ5ŽÆá· Âá–µ‚nÈ%·­®T HÁ¯ôH(àÒÚÍ{$eAî¥çÑpVíÿçjaAæñ‰?‰þµ‡¦fÅ?U‚ä'&‹a§JÊ@.æò¼@µû[?õ‚6G endstream endobj 585 0 obj << /Length1 1606 /Length2 10547 /Length3 0 /Length 11374 /Filter /FlateDecode >> stream xÚ­veTœÝ’5îÁ-hãÜÝÝ=8 4Ð8·à!hp—àîÜÝ šàîìã}ïÌÜY÷›_3÷G¯õ”œ]»j×9«i(Ô4™Å-Í@2Ž®Ìì,l°½™›‹²£ƒ³„£àÍÉBC# ]ÁŽR@W@d™88ìüüü(4IG'OØÊÚ@¯­¡ËÀÄô៞¿Rfžÿy;é¶rо}¸ƒììA®oÿ냚 ÀÕ°Û’ªjzò*²zYm€,ÈÚÔÜÌìÀæ%°9ÈÁİt„ìþaÌ,ÀµæÂò†%î\œ@æà·c Oæ §¿BN ˆ=ØÅåívXA€®o3pu€ÌíÜ,þ"ðæ·tü›Äñ-Ãþ-ö¦æèâêb;¹ÞªªIÉüƒ§«5Ðõ¯Ú.à·0ÀÑò-ÓÂÑÜí¯–þ޽Á¼E]`€+è“ë_µÌ@ °‹“Ðó­ö˜ü7 7°ƒÕ?|@@V@ˆ…ÈÅå æ û¯éü³OÀëèädçù÷iÇ¿³þ‹ØÕdgÉ‚ÂÎñVÓÜõ­¶Ø…õ¯E‘w°t°³ýÃoáæôŸ1wäïÑÿµ3 o$€Žvž % «Š£ë[IýÿNe–ŸÈÿ‰ÿ-ÿ[äý¿‰û¯ý·Kü½Ïÿ -ãfg§´[€<0€·Æ øëùÿrö`;Ïÿ!û_uAÿ`ø?È»߯ î`õ& Û?œ`ð'…ØÕÜ` ´{›Ñß~m ÄìzÓòï1˜ÙÙØþ%¦e 6·uøkèÜÿ,þ•ù›<ófÕQ–Ö•Ðeú××ôï,µ7Õ]µ<ÞˆýGÊŽÿeü…!!áø àÍÌÅ `æàåðð±øxÙ}ÿ‡jðÿÓVºBÀŸo-³±ÿÝøüþiý Œ´ƒ¹£Å_[¢é t°x[¬ÿrü6wƒ@Þôüû®¿5üŸöß+}™£,/8š ~¶IIOu­&È“2èéb‡q*ªÓ*È ¨tü៾É_fúTÂR?!ðÒâ9èô¼­À¸3Ô…oG÷# tšKâKÅЇµFÛÆË´Äj\ô.õH÷‹÷ٜҜ>›Îί1u ãïO¤mœ¤³;†*÷¼\ê['t?óäÚ¼vÌz(ìêüÃ#Ú„ý»[º¾áÁþðÝÛÄLY1È4‚@¿o‡‰®ž¦ë:óø?î¼nè[ŒáŽ>8ÖËv_Ñäß=4Û# YØÄ›âA© H§edʱ–¥’b>ûnJ¹mœ°ú—Âuˆ‰¿gy¾¨æ*®WA¨Z4QHdƒÆvÿ€WÐ|·ª{ÎqüÚàp‰zà厨\€ÁØp3¢ÜM4h†UÙ¦µœ”ïAÄ (]Ïsá %än_pð$09€äyíý‚œfê4œMÎÑ?Qˆÿ¾ok“’ÿ´=ÊÆélK;¨ú~Í*_sÅ_¬~–àž­‹‹1›õØ‹n»*‹©÷|õ4yˆxÐúƒ½hÀ²xÂȵ­®2ÚvÄî\ Þ.²ó~ ¾OwŠPâÓ7¦EIñ‡á¡?ÙX?=z&²ƒÐA­‚Ο§BRއufcþ;£_‡Äjqɪ¶ù\× ¾Ðô{A´£-¡!•žr¼q+lù8¶<{úcU²‘[ÙÄIÊ'½(kï”WâcG/Z)†Yrä× ‹ÉÃ4Bêw è“m¨‚›èžœ?f"û)8kŒÏÊ<0}I¯ÿί¡9øûÙ]µ|[Ìœ&XᢿLiò‡#½cŽŸul4ºÜ=ê7|œ‡›k¯žX¼†à0ùñq%­yKþ©Í…”;ŒœWvñ$…ÿŸªX–íd—¬mÃøqKœ„b£»'j[J;ȹj›8h+Ã|9Ûõ@>ÿa½ègS™2ƒàëiuÉV·ùØÐ_YG:ÎÇŒtÉ ™•VSŽP q$«Jôï][wcAÜ}èBöWÃdµ¾á=4Ø®<@ÇT*Vá©ïU±Ë•¥…O{\ZÌP‡rŒNHÒX؈0ÎnÏ fâiäÝFs“iÞï–šŒÝ6 òTÝJ\Ù9Ć¥LŒm K»\e5)&S™–h4 }¨±aë!Ñ‘ Q²$Æ[‡W×~Å–6n5é02 ó0 4ùÎ…÷°«ß$w8¡ÌJ6Ôå¢Rï³’…™è]ÄÏÏ­¿·¶G|qU4âþˆìºnoÝ6CÑÇÞÈø[Åá`û,›¢ûÅÁ ¬´Š¾ûy /%'œsÎZ_÷‰äÕ˜O-gŽ»ÆQígnèrV 0ò27ç l3åIÊA}|õǧç‘ê³hÕœÒÜ:W•{!™ülŠïÎ÷å¨ò\Áñüðü`F&U Fÿ۬=·—ª¤wÐliî¢\dúm™¦Q§Lç{ ­ë +í•d~0ÑïøÂjɘ ùª7³¬Ï¯ûáqÔÏë+g‡#Il • š}dÌÁ×»è¼ J„Ž 'T[ÐEͱdW‘¹ñR~ê¼ß¦b¸J,+Š˜J=ú*Vñô.M³“è‘È»¨×Ž™ûÙHVßfAûß$ÁMyþÆŸ! . „ Žì\™lJÚù³úÈ.¶##E·½³)93Yãµ¶™–ï‚ÀÚ<³ƒføèÔÔÏíºÖ0‡¼Ô©¨±:fŸ>ˆ2ª¨¥²#@Î!Í}î ½,3u C0 {UXØØûµšÖ"%.Eù0WŽ»­ÀEÁUfçè<ýNÈKö‡µg6¶m§|]BÚ‹ÛUP?6ö+k®ªKúõcÅ ‹r—~]ó~è̤ßäÖ°}TWŒ":? ’Íöræ}Íâ§Á9ìþCdOÇåÛ\vŽŸÆôRøYoà*ò…Ë. %úëÀ͈òåÂOª,©¾7s$ž>Ö=Ò¾´Vd/ä8>Á›ÄJ œæc°N­W$ÜÍ©ôËË–=02S²ð‹¤ŽÁ5 GP³œ¯­¢¾Û Nðó-/ö¡4¼Ï7î™_)þiÂHÛ ,ÇÊ»Hþ8²Ÿ¢&êm4b»y˜B4¯elM‡KæÄ.V¡NA¡|H°½uÅýˆDSRå‚R“‡ ¯Þ øLôE˜°¶Ëj%yWÊtR(»‹qÈSƒ5ÈÖg4@„‰T$X0;´Œ7lxåÂ…Gï.‘iÑD88Ñ£þlšp¤Ê2bZ„âÒ¾õ·ö»¹òõC(6Lwwaááuƒj¦#ô‡%*=:¼jà Ón´/t]¶’AÓsöÏMák]^ò"´ÛLVåô16ºG“ Lê §Ûä—Üácc¸cÁŽ/Õ…ž¹+åCHŠÃ[Ù:Õ9(Ûô¯!²^:*-ƒ±ýeâdÍägÈ™à ;Bd9ÃN•1îTñòê‚‘\.Öû`ìHÿOŠþs6 /nì;UùÅ2ˆZâÑ»‚†,œ!ºMß(!E9¢Ôñ#|úè2H×<ÞÚ£)CŸ½,‰®ëOŠTÿØ¡Œrï‚ú(©Â¡VqQ÷“ÎT!Ù¹ñ‰PKÚǪ_¹+’&ÄK•]¡Û¶Æ-¥,ÆãjVFÙ-ng;ç”\ÀM ¹,f ‚L@á¹I-í}„^W¿œúý>—Nö S cNTå\Ó3¤ñ…%n¹»ó¸]%Ÿ$è¬ô)"xE½aë¶8á9k !-“ëÆøtŠZ ᜧ8IÔ™šn®†Žå¹n,ÏbÜû•#H»¨G’åå-g•½yD¶êó l=KõhÌ’ÇrÀu†6|à¡u®Ÿ™g|ÒÓñl’û6å‚ú{ägqî#V÷9e»@Úcp‰X¢ÁוñƒÉ™v® SëAfÑM¤ ‚Ò9”×¼øéVêMNéh^ºÅ$âs…!.½waš¤×ÁŸ¹ž!ðAððÌð³p‡}dtGŸÊ×_öH› ~$ Lm³Jl4b¼;µÉ-ùÂì?_ ¥wI®â„š«Ùå]$Ü’.®DÎúÉDHªï„H<¿„[j[ñµCÖ6ùëYÏL¥ÁªéT÷aŸEºlÛ‘f( Þ$üI;¦ùÒT7VŸ$÷oVò`bôŒH¡vËž?à¤L­±Áïè¼,¾¸î´t=ž‰XÓHSBŒ¼nÔÚ‘¤¢¶RFï]´.<*±ÙPÙpÄÞ_2øa 3þ)ã@q¦;ÄQãpíE»ÙýEë¬Ïïîá…i„¨ öÍçA‹ñ_[Í1³˜W‹ª²¼„¦JÍ+Wš\0–‚g{àÁ§³.VˆNÎBRrÊœ¨Ê²“…Êû6áÔ„ø_'NûÇË¢EtÇJšŸj4Ê=‘ŠËtCXÓKk'Å^¶Ì‹Ã²Ö¾ä|¯µ›ç[0Z“[ƒ(GUŠ–Q RÓùÝïhÕ!Ý`h¦î˜íË =£:gNFTD†9âð9#(´^îQ Y¬8uõ4–Ðk‹øc¬ÞlG½”\”—ˆ(ìÿ¬'á{³ú” (Ä¡îÿÀ…ueÂèå¤z¢ÄúʼëTZqõäŒég3iMU1†î¹­ËƒPµaEîHSMÎxc{Ãg¨ JìK]Kö—NPk¼€”5N{¶Ã‚½ñ´á.‚7z 4¾š}ٔ̓ËÊoÐ4ļs}iÁ*š€yÏÁþÑÈTü=L¶Öˆ¡òpøCýÓMDñã®P¤É±íʪ*}gyù áM¬±;büRØw$¦vâŒóK•н :bÏ ²ê9iƒ¢w)gú¢+þ•VàzIå9ÛÑÓL^•ÇEª¡ÖV½´uEîazÕ>5®Ñêt+Ƨ6:zËFä")0·äŒ+“ñ"¹³è©Y>P·q*Ù:§®ÃŠžQÉÇúl*Ôžy6‡¢„ökÉ 7oº^V¹ü>(Ñy5P¼gNßj0Bâ-¨6¦Kqõu§1žþÕÓ!¼Æf NÞBˆAÛYÙ=³ ‰­Ÿ²KJY¬t¹ëû4ë*ßV*;à`cþʦRXª;\"—Ÿ.%m…Ï`žá\x9IÞJMXž‘ÿWte]ÎMý|ÈhÓDÅ ­ö‚µbÑ ‚ËÃ!iA…•|ȳÃëÜ£€.¢HYýŒ ŠòÖˆ” 5{;BJQJ0æ­ºÝ ú†y¾üDÞ^ß– ­ß æY:“!7}¿=M+I-Ê œŠÊÛ\‡øý¹™÷æÆr%?ìpkœ…`[Y‹‰.¿û0'[®|ÿ².# –_×/5‘I¶ 3îr<¡tóš»\u¿«X©œ•l/¢)5&@î”c36ä°;7=íÌ&k}Çý>üÜ•cÚÎJù6X›ÌÉï×ìœw/®w¼v–સåî¡^A²¡,µ4(7€E«‡–yÕ¹—îKDƒãi[°Û€he»ûŒ…¿ªÆdÜb—xaC–IË8t·N3›ÃJòš÷ÚîÛ ÄË¥‚‡qývóð†‹7€:„ë´ ši•1WGç«ÓÚ3šFç®"žº0Ááìtl–›µ¬ØwÂëÛ;°ßN[ø9ã#0ÃJðé ÚÓp¶kŸBeR{¼ 9ý þDóoÜ5áTÃ…vu ÁɤÃc)§é+nõ¯‰Ñ¦Æ¹hȪ4¹ÛÅF¼1{}E…+–XB~2 èô×¾ ‘Ú ÌH„9öõ ³eËNÒØ›ªnKE Ù2Q=‘™RÄs5‹HïÜÒæ+ûóææ= fkh³ûúú9=è`X֒į#z¦ä˜z誡´_!%lMÅ”ºUž<UðdQŒ?¯ç(¦¿/·éÃ)×!×°¢»Hqì ïò3S¾îèË3ÎHÔK³V ŠË@¾…Á%âJ{ëÄéåù 2úúÌò" 3y0jéBýW¡Ž•ñìBW§NT\ÏÅÑóI‡á¦ÖÇ@´Œ •éKNVöpX€tô©ÈÚ/ëØVð¹ în娓9úsÙà*vÓ^>©ì) :íË:×Vãz¾ñÅG¨®ÍíÐ:=Äs ïIhh¡k¿÷Vi?Ûp\Ÿ:C;š4ÅŸº|-óÕúÎÅÚ( ¿{9¾U’§üÙïGþí‚鸻ȊçÊbRZ×í2ååÀÛÞ*¡T³¥YˆW_$¥§Råö¥ŠñÝõô½L³Sƒ„RØz’§&§Ü”{š@Æš ub6šü°º‚áéÁ Û^‚jTÍËžÜÎ ÒEýêKú)’X%óc¥˜qÎÒwñžV‹J“âöÍãVˆ¶8€ËªŽjzZŒ¢ü}:Q,>AÕ1¤)'ƒËÛÜt·–!«ô^&ÞšëçpkáL±RUQrv…G’h\;"ú²˜x÷Ó§s~»NiB¢nL¤úìì^¬P3Xfýëí;ÌÔµèݨJ¥‹‰yEm\Ãrk˜7RQ\‚ ùrÂ,©ÐõƱC‰·1pIö¸Ÿ §tcÛ6á6ÅMÃ,“ ¼Cóý!=F¼émð†ž-4‹y/WŽJ\_gd¼–áD&#;€vhsa\QW½ ‚ãÇÜT±4½² ÑêGƒãiÆóJ×$é[0Hèõ‰·ß‚ ?·Æš§e»Œhp$“¼–WˆÜÏ*Íi°DäÅ ô£…sZ»Fëdé¿_5´[¹š`’ærÜýºa¢×ÅÔ°dܵ¼£é ÝPÇêâr¬®í4½fìq½>:®,'zËé€JF7Üæ[óŽ+½äÀ$JÁ·wà°ùM8¿Ó­¸*çWy²Y‘D8Óx"È6(b é0ìtrƒ§ù}µ BŸ²ßOCo­!®MC¤6B^ªCãæ¾‰˜”orL¥I=)U×´B¦©³Mk-©&NêçøMµ®¬HºáóÉ5D^>ßÑZv¹6IR¾$Ë;)½Xê$Ú¶°·l.*¿º+o™ЅªíaK@}.%âGé³·¬ök¥6Ê”²ß}U¡pÝ M)ª~ Þ’ãµ£ÒÉ/¿®Ø¾ïGØ\´>é³hW’V¸ã`ÒjV¿ó“SÏ“{&xE÷BÔ×VÍœt.ºrâ¨ÏÑôÅxHʺ£–:Aõx ½?(c§8¨ëIá™IÙ@ÛÚŸ»#WËJcðé~0mS’iâÒUéáPvJêz"š®ÖoŽ¥–VYt%âkÞeˮćå²zTâ¡«®UËŒ;ä/ŽWX1ä«Ú±³!¦ c+¨âyaNÂû9¿w^1î'8¡ ÷_ÚôÕæò̬Îp~MN2K#Ó˜«ž1}WfÏ‚<¤ù#esÉÔe›>_õ™Nm-øÿ¸DâªÐO…Fÿ`X,°¨˜´©÷XaóóÇ•Î×IÚÄ„÷ÇöÙÛA¤íîógÉ2VÀd™ï¶pïŒ~Ü÷z×íËæöØu~yPêøx~Ì—]^¼šLwi<_ ŸI)'~ÿq¨{•² 6ùÄ !;ÂýÞ¿q|oûtâá[£—Úu$'ñRÈ•Rï;Â4h{ˆÕ6a %Y‘ Ô4(š³˜6=_êq/«a)HÿSœ…ñ;=Õ”UÈ—¡‘.óâær¯íO@¶‚`¥õ Ú׎§IrÿÛw!ãn2®kìÔ[ÐE(ãp:§»Är‹åø“é}¥ùÝ'™˜7EÉ {æ´)}*mjNuâ…úþ5ü¶+bú¸È£27ÒUlè^£Ï¡ûˆ¥^4`åB*£ß«,7‹34Hd”£áTÊwê3ƒß2Nõgˆâ'Çꢈª„Fûé£Sâ[¤GÎŒñDRqÇáàÁ_hÜ?lù\å%ýy ~qœãÁG9;¹!eÜÐõmI:Kúd™ ¿­CÔwùÁ„Ô¬o)_R›¾.sɦh6͵rÂL¤F ©ñT#£ ›ç…ÝXYšgý5_"wº˜K¨µ¸ŸðXGó:é\ûà4Ôž÷.þ¦H¯ïØÒK¤€?ÖÕ6tiè(Šê’!%ñkVf78ZŸ¿’U½;ÆÚ¡ÖÜ_2o½f:K©u§Yú«3¾‚Ý$Ž– ) @}r®²òT‘Eøf‡Ì‡<}¤xU†Ô.<å‚íIÃßïɵK25mX8$˜¯½Ìs÷NBȹ«Zéz1´$‰Táhý^aÑÚ{é‰ê¶8v¨-B¤–Z"fÚAà ¸ñYÖˆQIš44g|«S9K ÛÒÙø6¿S–¨ÛêÊ_½ßdêx{Í÷+ĺ32¼Ö7ws²/× {úBš9DEt@ÒL]ÁY¨˜üÐJ\ßXßã }´OÎ7ÅÑW{¼ßC¬ôÄ>^xs(½öY´`?Û6K‘ø‘šñ1N÷¸vk­hg׹ƚã'§Ëlœÿ"Ø${Ì aýeqa´}éßTêgµÂBƒ²VbT¬E‡yŽÜÁôá’ì´Š2²¤‡6¨ý[4¢h¡»³eÂZ— ‹ŽKeÍ8õ×{½'<û"l.´q -Kü`€«\£ƒû£Ôcûä(±¤Hgܤ•DÈJ;bu¹ ‚žé½[ÁÝ%ön!\àØÌn —Sõ4MMokT­`q#Ž/ßÑaf¤àã/›–™"f~¼RD-gÍÆtÖ®®mèÂÅÚÀ ‡¤æý„În!ÙžPœñó Þ=èOº»Å>ÁŠâP„/£¾“7BœüörûDŸ†¶ðÔŠ²,-Kg3‹îç.@êV™fe~é¢ÞÅæ£LÝã GÆ]õBD7/¶,„ùqnZÕã²>ÅA†swÑ —÷¥Æ\Tír=B?÷Œ¿©¤ÁÃuûÇ£K ÷§üÞÎV1·£•>pC·K*‡K„iÅØyó’몰+a`;nF _qƒ5ùkiâ(Œï†$ÎÈ:Så£IÓy'Æn°çg½µÖrW‹3Ûàþ*ƒÿÛL°£z»©«×EAEð´ô”#mèmg^‡,sQ†¯#å{î¾gádÐÙ”wáas–u}Ø÷?¡Z®$EÂFDÁ;ó¥<±ˆi4Tަ±¸q~ ÷º5æÅDWDº™©!z±õyÕ#¥NØPºÕ’—dÞ¿|âÅ>ª)÷–[еò~-8[0é<Ð’ãÍ—›®¾ {„ýSXÕ!Ož„ŒÉèœ&d£/Çx.Í~Î1ÞÊeˆŒjÈuSM[Õ«¶úÃha9©Í‹ÜñÑlØmêÝÙŽ Žiñð}O%!¥ã9çì;ЧÈü7^äµó‚+ë2?ƒ E¼UÉ.ïׯ†gFX S¦ðVÁÛï´¢Žö«_ò·º(ÃzS}|B3Óbm“€¿Öå³34µ¢¾\wçñfò‹T6[Ž€"øÒ`r–bmh !¯ ÍÐóö_R‹Œ5ê¿ÄÿYË?0ù•’Nlon;‡œŽ1´ñLÄèëŒÔº‘ßóPýÝi#ôJfµà©æ.B¨qþlªaÚjùˆ+Ã9›ÙÛ7g¾ä2aŽ­(ËçÕŽ’Ç™‡XÕ/ýUàЫê–AX¤ìq Fµoƒš .˜z6/ôŽpž¼‡ýe óè¯ÙÁ»Â¥31 ‚ËX ’bެS•âfLQo̯ªN#-ݽ&ÚÄ Ä/†D@˜]_W59íd¼&å:êëo[=Þ²g+Ï£j¶ÕÜZ9vÈì_Ò`犴£òŒõÈàÙ $¸¬ŠɬjÉà .ñ#N?  mãºß)U— ˜Í³!%Ï|Þ|õ9mÅŽë|¹+0O>;ƒ¢‹Ši~dþ¼äê˜Z/j’Î19~`ö½¹ª>X{{§fǦð<`‰.’ÕÝ¿}wÕ¬ÁW›PÚ©z¬]wò0©IªÑm$¬pî_´ø¶D•«n¿ÈÇba=VÑWÆ-HêÓ­VóÕŒ¤4ºBþ´|ë׿Υ|"M ½l¶àÀãOºê±(¯ÿ»óþ<àN£|ZÚéõËêW¡nšƒpx¦£8¿Hè‘ãëÊú0y¦mø;ÙRøjme‰©°Ûœ;éÍø¯6BÁ"‰¨Ö äy ‹a¨j%Ï1š'[®KEÙ|Þ?ÖR²*U”‡ãÃhŸr¥ƒƒÊñ£<Ç ®¶e´žuMd°$æ`@¢Uq¬Ÿž’cº´8“'9ÔÂò˜$C7&3yì÷iˆÝ’Ãf0F,ŒvÊO5¦h/çá²Ä1ðìæÜC¼›”ÉÖÏ>¦/ FŽ]ï;P‚õ£>ö}ŽAc3ê,¡¶øæ |ež8%Hn ™ô>™Œ4‰ÐwooÂ6$!Hñé¼¾F|™(šDhYõ”Âtý-Â$ϲØÛðœS¯îol MÄÖïÊ‹²¾&=@¤öÒáÚvÖósjm7y6‘|gß׉@îrÖºa;µ0ì/2»Xn×RX^è+ž‹ «ú¼7«”“ºª§—y¦?žnüqÍ2/˜{²ªåW_'‘+šBë´v`ÂÀò¸ç'¨Yk?'‹Š­l‚ÿ80ðÇH6êÌèï ~øF¸&Žu]9ñ3õ@ÿõš–œ+SŠû"QiyHþ‰Õš¦`9‹K„ç­x:¾ÚÊŒ'¿öø1´p´t!Ì;PÊŽø£ÛIÇÛ”Å:=âǰ ëÁüôÙ›¨å]wG¦It`‹”­‘{€_)oÅÓwš9ã°%’:>­°q*úÆ^ê÷‡¸öê»F.tâ¼?DCVbnË7)·ãÚ/§¤†¼7sª–ê¦CJöײ7$¯^:£K"4ÆßÎphxù|O´§GNžb_÷¡ÅÑ:¾“iv 4ž«ºnº-F6EzÝý3ò æøÕÖ%ZþÇ‘ôÏÕ릵¼lˈ=¼ªa)¶¡ÿ…½êÙ×[×4õ?)j;VƒdŽ•š?‹õ¢l P˜KczG§ÝxƧâ¤GȨ0ʹôu½èE^ÒZŽ4Í%›žvgÂZ:ûé )?7¨®¿ÜšÑ|@D~úxyWçm/¤7h&Ë#“„Yæ1C¸Æf1mÑÅÈ#Á´¹ÿ´³e´g¸ì+é5‡K[ÏE$nàˆ‹»‰ˆÚu'ŽÙ²Oú«œ»à›µk„:5 Z2úÄÇi¤óÏ÷;üœ8x dAß9(XÅæ$7+†#‚° TI±×…PÖ1žLpäÕ ²¨ F£ˆÝ§'FÑ‘›lÏðc Û­Û_wتV½Åa½{äeTsLL•±Ö3šì>—íIKÁyZæi&¬Êö&õg8—®w® Åàyì¤î šžuX #8WÝ, ¹’nÁ±m!ÌY4%åÖš­Ýþ´o˜‡g8¸¡ºIÌÔÉT= §Õ•¶æC©>g²ÁƒCÅ€Xß´B™[Ù¾éö07ó>R£¿›ÖˆÏ;O Å&i\™òöâê¿Ó›Äš[‰¶yÈ5K¹Æû ãõy‹›éé!ubø$çgÿ>ì7þòîéîóF¯2çÏáìÚÝ? ‰hÔ†>Š„³(ÍÇå„ í½OÄÝy—*Px ú'_±³l’& K©s£"T'ê‡Ft!yÓ„×ð{’¿¤zr\xÌ”F?;á0r©G¨IéG,áÚW 6&äFF$|0îî]¥ÇNÒ ÇÁÖH /ÔÇü¼ê­æTô{Ĉ‡#Ãl ¸+¹ag&©¤Nt)„gcF%jÃ_Àü¼Ëð÷%/ ûòæDÛÀøB‚r°ûŸÜ3ÚÍiß rc I~aâÇ4Tßn|Cñ"<-°îWÊò(…¶j5錰ÁëtDo9NºýDÿ9Äsrtõ'T´‰ëOTƒUkɳ˜¤¾!fÆ Ÿö—úgè ßvªæSA¾ÿ|'œ! endstream endobj 587 0 obj << /Length1 1612 /Length2 18334 /Length3 0 /Length 19169 /Filter /FlateDecode >> stream xÚ¬¸c”e]³%œ¶í1â€F ÆÅFÖmKáz¤Þ¯3?yXÑ<¢÷½Á”7Y›ÂäBb*„óbA¨ç2i]ÈP˜`åêp‚u/–pgPüL¿¿dTm_4•å‚/ଓ÷ ¨Òûwuj·†QTÑätzš`ï›kE ¢dÊŽØ—&àÚZqdÐK%ñ΄ Ã²ýòë'Ê⤹o©<>µ^ÓaC%ê÷(")-ùlp?…¢Aßm¥ ¼û¾ŸVUüJBz¾µËò%j¿k÷~á´Ÿ½:5†«b î"š´™óÀAû/EÁ Bly¬Bˆ ê5³—jÔ•ùH¹žFjD8ˆN §ä©¬ìLþÁæÂc ¡•sD!XçMRøM‰ó™™ÊV‰Âý ÊpКã•,Z%ú³¦ùg7RÍØ†§0Žz]oû‹ŽÁ¯0³òªïiM¢úEC3íòŠAîòÊâLäGT|‡ÛHÁùˉ3²£–TÕ›Šò·Ì>„óáªsã·ŸzM-öÅ]«häì `‡ 2² o-Ÿœ·Zà“Ç!ì-y^±å6ªÝx?á0×}‹p…?èŠt·  ûÀ AoèÙ=’¤¶*†»äòÖÁY±’-L/¤ü!bK{ëB”ŽÏ¹—¼ð*cwQHüèGèéb3çÕ)Ž¥ÃôÿÃëÖƒk’  9«¤Uç8.¿6{l4T`Ï0ö]ÌoŠ„3°ÄJöy©nןw¦oì¶+Š€ Mâ;¼ý¥fUÖ>«ñÚn·M{7YàјÜç ‚ºï)ËÃB2žUÞÚѬ޲Υ-vtæŽG3k`~õ¦¢$H›´œIëy>Ôþ3É ÒCXø$kã4¦¸ñàÀ*LWŠÒ—Ar²ÚÈP…LGÆ´Z¥Ø9{œ§[l, )RiÑÌ´íêÄE#húWˆe²ÕÔ¸_¸¦Èdïéúû#¿1©H«ÑÑ•‹üB—s‰¡Ϊ€¸§1òTb1~Ë(Ö Ö|ì;°yÁäG*àìx ¼›iˆ:ô*òíh2î_9sÞ2zM²ªHŽ– ÚPÛ¿{5ç× 2ŽÁ-¡!ŒNF­®RØ“K=Þ5mÿ²"êÉöžû ·ÚõÝ£I­ì‚‡%î‡z—‡lÛýÅ’§¡/¨ß¶j>áC-} ;·~£”oîQˆ‹ÐgÇd’CÈü áuÞNÉ,écBÔ ~줽İx£ÞüRÛ¼™‡)‰xÖjÌã5¬¶þ%žº1!¤¶ÚqÙéË\ƒæ"„}éfKw{ä›;ɱyG*£<ßÖò~›oÃÉ;SÀZ|Ö– NlöPi¨B©5Ç‚·R¹ MP„äêóxÂÍ&¡m€Þ}Ä,¥iãî+xÄhõņ-&TÏc¤-wÐSî·ÛEå­/W™*­-1MFî_¾Ö õƒÂ†‡J-pO ¡QX±¢ðK ݺ ÏñÔé^›æT™(~¹ç™2L }h˨rÕ@€*ÍWسÜõÅ$° ¸œ_n ¿(Bm ³$1Ç{NË„;þö»J ê¹¾!…¼às7tºž´Ùg“•ˆŸÙ'Î'“‚kXr“ +zYV B i׆{;EÆ;Çø.uõR,Öð2r£ãTƒ3‹ÎüÇ`Ó1SÏè“~€²¨0*dð½LjN'Cùûvsê•Þô‚Ø5óº¤SœbEM¹ò¹uzmvk‹‚ø…ÚèU—€êcM­%^:æNÏ^ó{³›0UyG™¬¨"ŽzvéÃ#§{mÍõ¬·ÒIAFÛ+DàÉz­ÈŒƒvWß+±GûÅŸ7ÐüH¤/=KBLç ø’eu% ƒAo¾ µ—aS&ÄŽb-(s!‹=![_Â+E"pqö2ö6 ¿AÔ–Wf%o-¶Å‹2‡e&–\`¡`ò{)î²EÛWòôûGšNe$Sr *`]T¼ÖZ#ƒ`DΚÛ4³Z 6ž‹ öEõ÷„r&²ûx3˜Å^•MCáíX`TgÎu^PVÁ+¨oËôÖ**NS#_|í¤³dà@y9‚ákþbÇÌFõ¹ i«˜ÌÙNñÛ/)hð÷¶Ç^ƒi¯¦"Uûœç%g¦üÆ9¼dr‡í2[Ý ßà"a¶¶ Õć ì©À¤ÀVð¢ÑKiPçÀÑM´ÁMÏÔºÓcÌ1)o:êt$27ð<«ME×Wßg»¥àÄ‚}&Œ’FDèñìXLÍo©™MlHýДDö-ø²°i6Æaú¶ïÜœª}3Î 2©« …›WøÛÕ}‰àÂF|ü þú«´}$þ™`E ›9‰bÉÜdÆžÛ}2úÖuвgæ?í2íQ6¾Œé°&ö@Ë¿ä2EÉì®ge|·°Î`ZæÒŒ¯>ÛÎ*ÂTõÌá8Ѫåk¹Aì² ÙÄ7Ø0'ÆÖÀØP¶ê¹P;ª¼O&–@fÅxÑSU 'ƒKCâ‹=^è îrß5¤[7ëÞ¦ îè§ý¦.Åݳ8Zœ-ÕΘznÌÿ>U’®—ü°¶]MPÒÝdû[bÁS'ⷾȱÏ[gÂíÔIäTüœJêà´l²yo†€î`úüÄç¾2Tòsý ¥Lž7û ‘®A8‡]3¥¾a¨ÛŒ{ ÿ.‡…bÔÓPqhaµ_:@ªËæÙ%éÉlÅÁ½h QĉÁgs뇷ü†;RP&J áDk¯M ©øçä°}{ù3TQPPÂR;\á¼Uà·¯—RèãÕ Ñ^÷娨ú¦Ýç©8öMR,2 yMj¥1 “¶Ö6Ä.…^×àvÙ'ˆ¯¨hÍ7OÖ)Ö=ÉFÃ…>¶YÖw°¯ÈoÝoéŒ6åQƒcfVÊHŒi8òïM9 * …²ÂQM¸i‡± ëI»aiÁzùÕÙvBÑŒ<»– @y"áõ±Ó—ò¯¢Ñô°\ΣÔPW‡`Ùˆyê›VÝ=b}¹Þ4å‡F/…:â†äû_c“Qþ¾å ËËX1^›…DNôµùÄ\æ=ëŠÄ¸-/bzŽäìÀ&uphI2=¢èU ·AKß•¦°FúåïWlZÖdÁû‰Ÿ„ìŸ_šž3 ™\ ±7mÔŽ¡ s‚à2‚ÌëãIM y?¢ßñz|%IF£©¶Õ•çÊÇw'¦2µE²¿‡íÑ­K³xÚ;ñ†×„BÚNY«Z°™Q¡OÒº²g.%UUÈí<ä#×Ίý ÛåqöÃ*þÜZñÁè_d>ïÁýUv¤‘ÿbŠå»Â–¤WUÛ0|Kf Yw>ÏÕXc™:ÚÓÇ‘ï¶_¿98 ¥‘ŒÍxš÷?ÅÞbÃ…ø‘'E«Ôèf)4?¤DDl¯Uœ^=f=”ø$«":bGî,ˆ › *Õ@J[ûΠѬ´Ã™;î•ãe§ÙwŸæ¬€Þ¬Ö™Aúû/0ÅKe i/—¤WÂ;‰Ö)':JÇIÑŒ€'ÑNi ˜BFÿbÃB{xðï•Z¥$-ðò¼¢†¤ªÑÀðº¼;°¢]¦C.4£e Œªð³¶ª¸FÔY¿]L¹Ò°õ)85‘ ÅÐ_Q‡T)sFoö>z%ýDÍ [Ý‘÷…ç ª¦= # -ù˜H™í5À§‹­!˸OJýˆ|MËimGÀ¢ËïSÓí~¢èMÏÄG™;<‘jp-#¼È«]À©¢¨–d›X9Çm´u‚K³Þ iÄÁ÷7 c•ñlb~ùŸ¨mDnõGY5…P””Òu+NŠmU&iõBPÁ |K+—4ÓZ“ëKý1z¾‰A n38:ª€ >³û4S…TÆ:üz0Ô–2AˆèÓº#ØçhýeSé§C1ùQÿ.ô”(‚@c$.á£HTª<£|žùvo^뻪¤ïÃ¥"yÞmŠc_ü =ÞMeU€E„“–Cæ'W FáûГá7´î¥ã~/€r¢(ΔZlÕfBíòáîÌ}†õnëps·ò¥¯ÅX)fb¢šeµÐ›Ôû„ëaÙcø…Ü羞,I,cúª•‰ŽÔ#ãHÓk ¬¡Zº¶H2G]¾ÝÒTPeð]wÏâ+Á†ïJ®pÈO·BNÜ…@ °ƒ¨N™ÚDˆ‡ã7¡Ø-³fª¶Ä)¾¦kœ¦ ʈ!7øÏ”îÔ=ô‹Ô=Æ©>[> iº|Xr˜¦*,m®3Œ( ôÎ P ¼а8K6Óø´Ôe Sœ."öõ´e[)Ø7¡|î)y‘‘‘ðŒBhŒ¹Ú;frVtm®:üC³þù æ4¿²¼ªÎ™ç˱ÈÏ„ì»8PäÀ£À”µÿk1 P+µ‡¢’{ïî9 £<Ð?nôyltC"½CØ^%î(S—]qÖÅrèè)¤ÓÁL›KË/ke+ Pг:(ó‰€;`ž\!©¼®Y*s¢@f,F¢UKÙÜ3]MQˆPý^Ë^aÍÚ" ‡Qï¯;â­çc¶µÏ2eA9þâô<Ûí§}Ñé­VUò ÖÊw…p‹O¼?j 4,Õð«4*¾®–O˜–»!p]!vÙ¢¨Qp5E…ÇaêÑ,u; »ŸJ`-÷[ü /nSLÐ’Ä;Ñ— cÜ[>¬¨…‚Kf_]ŸÔîO](îþÂÕÈõxd˜þ"ÝÍ%Xgú˜9"{WÙ êC„gÂÕ{Y…{®«ßÂÝ㤒ÜE /z~üä!Ý » e‡kl¿ØhDˆ(¹²•yçáò4òņÔÜñj_îŠ"¨áÈðóI©|ë¼­DOþ¥$ƒ¿=KŸBuØ7vvkEæð<ýiA ›HV‹xuÚÌõ½Õ?€,¼ þã„xA ²UÂ/žLBœcY>”ÿ9]V^Qçã;êë³£3?P÷“ú) ‹’ý"é‡Îç½*\ºÐ9rïÚïÕµŸŒèDcmâl¡¨‘($ÒN >‹åƒ¿Fº\ö0HR6âthɯT½ìs_BÑýàU#ÈÅÏ8ˆxË+NJëÝAü_^jJ92WÐhì€-t¼è¶fóÄ2 du-G€z¿èŒìÅGöàif¢:Ú6­“1ùK¾N(æüäg½XÌ4µ­Jñ²_ø©`MbÂ'’2ãóVzØOÉòd«-ø`È“Çåµh^Äà±fA‘Bó¾ë ÞÂì+ûô8‹ï„8Ôâ:,‰{/Í0¡Õ9.ëu·“s%ìÅÎ3¢5Bãð(먡ïN,:M‡ÁÙ.’bRKà!¹ƒ)ªã74©…T8a’µ2¦‰9c] ¿ËÇ¿šq[zÔ ×Ïk»Iž’"·ÌÄÈà¥Ø»6ïó\Ìβÿ~ߘø~X‡h"/,9@d§ÝN×CóãŸ~bé¡&LsU~-sG¿pؽåáZµK#¿qù‡\Aò1ë—çm®F¾a÷è°í“1ê÷‚ý¶•Ï]I´ˆæ\¬¬=L~³%÷«—D £Ù'còßE-8”¶zäÄškR‹5Áh\Èç,J¸©hî÷AÓÊÛ­æÓ/W–VZ”³gYf¥Kò6ÊúÖ­¼»ú¥Â?ãHÏ™¿®ê§~¤6ÿôÙ½Dü¢ß[ÈÓ §™^ß@“/;ìždÝÁŽv1èÜ„;'yf…ž›¢€ÀžÜËLþ>#:n#à\EÕJ¬õºäq¬2àPˆ³%crï%Òµû«õlebRl”ñlԖŧG°¦;*•À±÷¡î[±”jyDδ¸Ûò»Y{–2Xjû¾6?ô‹gÈ,[ɉ$…*2R‰z–žÁ$O9©Wƒ–a»MÒ—“°}†ë.ÅI‹\ËÂ8$ø¸ˆ¹ Οí1„;üXލ=;«‹àã¼üOu¥û3“˜ÂÓQ¯¶ƒAÊ6¼×ÜÍ| ”š÷"ïÚÕR] Íñ•ej$†LªfbääBì%iáí®)âC3žðBSjŽ(±0sì*‚éК[)Äq쫵' ©l¢¾ŸkröFCFe„»%Hý6"76±øbJÏínƒÈ’ÿ‡1* fQO‡×PÆ¡YÜ#êbE®}*”=¡Û€£¬… 'péDâë\Ù{oÏ&xºúdtRžFÕdA¥rf)ߪ Óu™#$(Ÿ+—ŽàQ‡.ÁòË ôgP¥6 qk< ² µÉE^Žéq¾Ö^ ¨:ì)'$Æ£È óS[Ã’ãžg×ìw+±0ïÁ1aK“ ”.oq{‘î\¿¶™šÎÝóžŽjëX—£ñµ§ ‘@U§\”‡ñ®î„¯ Í“a1Öä5‚Ñ–Cg&}íUc[ùéõMš±é2X¶Üž?Äö–¯Ô˜Õw_? &¢d0È&\†v÷ð­ë­µæ®rßÃä«“5‹u&«ptÞ/öÆ‚t¿‡P’\™©¬1æ:Ç‹]èP¿Ô;1$Í«7˜‹$ù¡‚ºI )—ÁˆîÜf‰T€TÃêÂÜ6$z$]c˜î8I¹5ùˆå­¾ü.ëŽÒ6ê‘ÑOû’?—˘w˜Ë›e[,=œçÓŽæ&9H y0°¾šê´æê«ŒS!_GhhÛÂùÉê)´ž ìH…²ùC[Á\õe»”K Î+¿â0wHûãÆ-þ$y·Àó§î®@PF\[`°1Ö\ï‰Ü|Q²¬Óž"Ó£²ˆC.æ6éz)ÞðDû¿ðg r£çf›=Ê–¥,ð4nT<_¬©h!c–û4%‚š÷Ôæ”vN ƒü~Aët®ßžP†‰ÈØR}2O옮C¸‰¯w_G}B™È2"ÔÕxñEp£sM0ÊÿLÿWáÅ-á%³2³°4TH‘rŒ#ÁÝ«ws,ñ8%› êù‡´éT´¦ð·Ð§Gxý«g,åÒѬ+†¿vÝÐn‹Ë50ü3ék¾žðÓ»­_š'åÛž–Á3 'Ϙ¢Û.¼3#䮂-Îɇ4¹Ri’ˆ6\P¿JZšãä!ˆð^ZM¸¨)CÀßÀf/bÿD¶…vŠÑÉÄýÚv¨Ö TêÕìL}f7¤ÞöÊgïòu_e͇PÙ%gÆ5Gà Ñðb­zh"±€‡V¿k`~c´)Úd§¦xFЉy¼uÛAñ+v_I|Wè$ûŒ¦µøüõáôHûJûÙï»âÝŒœ±áu…F`îdG{Ø¢¡³³rÕ]F#$'Èì”ËZÝnN¼¯("ˆ°žÐꈈ4ÍkZ¿‰B•̰6¹_ÿ§d‰R"$RDÛõåR8P ¯ÌýXŽ7EJ—Å-kCvÅñmÜžӪsYN¼|G©Î5ûò): 7A^üÅãÃ?¨Úv¼¿?Âv»Kñ ú®^uº"\M1{ôÖä!(~*r ³5!£¶9ƒI5€zà÷Va¦¬kY¶mýùƒKÍ­ö™-xåe•/Sü*Œ„}aøýwø$D´ï‰3—©àKt¬BJ÷œ@O1ܳwWW¶ô¦û>›l§[q‚Jöžß«9NZ™.ÂúÔG^’°^¿tpu_ñaÌïBÈCöÚM$p,JËOJõy½1³X=î¾4”îò²¥‰°‹9–t·}ZC2òBCh¹ÇA£ðä… ÖZçIP$6LÍX0¦Â' öàHö«nÞ™Íÿ €¦ê÷÷x,l2ë'?B .O85ŸÅù£¯ã^%•fòÝ,#æ+ÉÇk,‰ Ž¶=ÜÔ˜]mA.2õ:v`H8SPîÃìÉ[o†×¶kð¾‚[ÙWÀ"5Fîã³EàÅ·4ã.9™ØI‡ÅŒð€[Èõ7ç Œ|DÐ'ø¯9‰Ò…ŸÍy$Ó%d3®ÑÎæ¡Áudz¼ïNdd'†ü*õñq{ð­{kÇ¥ks‘Q9qWÇGUµç(ÝK«Q½ÃHI§Ny‚e\¶Ï¤Òzø‰ºxµ¼úÜ”ärÂׇÁ”éß‚ÈØNìst玩Þxض3h_æ¾hªêïe¶ªtY ö:Eêp<ÇyI"ƒOŸSqÑ?ñB/‚Ù”2ÿá\:7Hj#þFb9ØŽŠ¨ÝÃðhÍäˆå™,A e{”‘l\zÉ?ŸEƒŸÆ•"fü¡ ‘r>‰Íx¦ë™©òkÏ ¡ÉlsÇÊ4{öé`=ïüHØê>Ç(W¶“};aÊ-m;1Õóžëê!yDûQ×yUï,N`Æ,—¤jEÃ¥­c·ãC4ýc’^¨¹š¿¯Úzü“±á„†‰“lhšdYA¦yCH{è³t«ÝxRäçõd¶Äx-Š’)UfÝ%3Øj‚“ˆj9""ÿ¤BS.§®lAÍ<Ê ¢º|l+Ö5w˜že+V{Ñk$s±Õ¥˜Z&ô¡·T,‹ãµ¾@4]ÜECpè*Ã`†saï;¨¨Ã` ª;+Lñ'µw&èáC^™Y½#U|ÏK(2ë±wžÞF#K„· áZ݇bñç˜È—ë 7R‚òM½¯DºDW~R9M)-×óËŽŠûä·± èþ!«¼|tF²ÕÂä£+ÑÇ}ÿ&¾H¾¸ÀÇôò\ „e^—Cº¶b*°€8dg<ñUeò4›i¢°2%oÐ(ýÓåmr<Γ¤!qû|ˆŸJzøL†çquhÜh˜>;šæ˜˜Ç¯àä!ŒïG™CêÌAÁú`û[âê‹é÷¤ü_Ÿ?C« y;ú¤ãqqakªËº¦ÝWzÒß*àèψg 9JçE±\Í~4²–É‚õE³èþæBâ=0"^òÞ_dg‹ŸV¼J`ûš:Ù·e~ÖŠ®L€jjDùÄÿ˜®2îDËú:ßé(m†z…x'AÊáû#âùu}Ïÿå™uh1"ú'Ctø¬dI Fæ,Lˆ øÎ7Ôƒ fiÅ4<ù³<„Gº-˜–ׇå)¢]‘"§±}»R«`VÉk&£ÊdTÚ:â'ðMÍï[¼0;êgRëâg2=¬áúösBz‚ãΣ&’gÕÃT†éœããâ¨Ä¨°ÊÔªmåÐÜÅàs¦xÍYjŠTøÚ˜Q ®(¡HͶ/ócáiöS2ŠZO(%wî>½À¡MÒjv‚Š,Dº_99ƒëT´í÷S»¤òòöÍØžØmBèŒ\&ê)ž¹ öôG¦>±¤7ñ·†xk#‘ͽnòeðVÀ#™÷²FìRr4\‚>.Ûøvs¿PzÁûİӱ. Y£5¼­×ªˆ8ê†-/O2§Ú#í´Eέ²ÔÀcqX/åQñÓ ‘圼W^ œ‹ ò67Õ+b«˜k¢T rh¶ÑØ9u¡^õ'vÍb¤ª1-,äeˆþtvJiÝÐé:…k"òÌ0/B8F̳0Ê‘b¢™.éÂßêþ*4Õ‚G¯„6xVkÒºr7˜%¯ ~'ʸÈ›ÉK¢[*Rœ|ËÊ,2¼éIŽ¥j‚KD˜nÏG!p[~—fƒÏ__ÈH£zH Ž£~Ðhbš»ÇˆúùQb¿a†ê w½éæy™§ǹƒèÕÞ9”KÒ(uÖ„ÝÏÚÁsäË -L¸\L8GTm$ó’øË›%Ó¸%~kz’ ¸p–Tú5:™(8˜>.t’ Eºéaª/yËUh^îYj(Ž«Ñg×mDˆ1óšG—1×koÉ _ø,è1ä«Òݪ»Â9†óáèÙO z*¸–…ëŽú脚nÒÃ|ha c»}…‚ól3ÀÁY%i€4ÆJ±È®¬®fzmm¥ÿö9±9Ö/ï[.›[…Y\~ßeé~³ýUA‘J+µ'ÚçÔb.ÈG$yµÖä羌êÇ7ý¯¡hnR¯Â]>‰EuH*^5ÖIX‘4…¹„ D}#§tÂR–ºµÑëÅ{úz1 œêèàº@OžÂusKÝ^ Ê&W§?•Jñ0j1í­x'SéÏÃÑë¾mJ—Ï!RÃïîBÅ]9 >†ï ÑóC‘Élßwr“ú‰pZA.†[ÓàÒvÌ~ÅÞ€3¢§0ßPnKYbù²µÔý1ïYqþIAu*†L ñ³¢¶%ɶZrÉóËY¬õ]Y5Àc˜!(óÛJ<`¦±Ì.—YpŒä®•Á¼ZßÍ[U: ç°!Æš–èWÔ®jÚ´c!dåg@åRØÑsdÖbùÚ5C‰N#öå¥yÄbO­P$’¼FOŠ%.>Úó=áXÖÓÅôèÕ©Ÿ)ÊŽA¢B©5oÿG6°×>¸ aâ´Õ¿ÎÖçèÝýyÝÛT³?uá"ãEw]Ì2„8aU„ÏXç­Éí fƒ$ò±þ¹Á÷²¡|ôH{Ř3«ÀVŒ¯„]µÃC¼þ!“Ö“YeИØJšÌ`"¿JÛ¬B·x¬HE?rÔ‘“éÑøMÉ^µõ.#¡ öwŽp£ñr¥ûNØp/\™3ñäæ%l¤l/ŒÇ¢%ë L×w’8çBŽZH¨†ôâ£,Ý3Ðò¨Ã¿Ã!TâÇ6®ÑÆÃU,y…"ùÁ½òá¶*8“6lĒ㿹:¨k8 Ê¿”ÚÐøòVQEÆ»kØadï~5i¡øœShçíR,•¬0üÄ2ÎOD`À³ÄìÐ7J!¬¹-œB%(´€$ ÀC˜~–µ‰.Ê»âÿèä7ä``rzÉ8¸è+ g+I”%.v%í½®«© æ÷…¤×AHðfK†¾žÕStÖå†z:ÃŒ¦õk˜3xn»›Õ] 6RKu`G+j®Ê³5fðóÅTÀE»èãí/ÀÙîÞ£hhN éé‰ܯ¶ƒ Xê l|u3i`Ìܪa«˜èûK¿²Á24hÍUšÿã»­iv0ÍŸ¹g$¥!h ·ŠG_ñÃ’ÓßAñ?!Ëﮜ}Š`$£ d o¼~ÃûÌXŸÁðe}(œ0˜ ÂUü»·²C†ÝŽä([â\üêoJ¿œNµ(yp¡>I[GÂàZ„W¨]©’0aÊ©rR!0q„x1Áº>µ2ŦM„÷¶8·¼ÊuçØ÷Ò½`7.p½úÓŸTi×Ó}ì("Ìçs›¢6vÃðÇ×'†´œ£vmÀmÞ‘B\ú, i|gÙõ¼Ù#÷ÍÙQ~/™x¡=ÝQžo“`'e-@ÉÿEMÕ.w¹ï sD.§Ö´›]Ih¨æŸù~§ô+­Ô MÍ”¸•-GïSúó‰Ó‡—Û¼­Ô<+7¤Ùlç4Œÿ­Ìߟ 7:­÷M†"Å6–Í‹°ø»ŒeÚZl@E %_Ù¤ÿÂE>€”ð÷ÿ\¡NŠ›`‰­mýD?ª<š_ ±tÜÆ¢b)¡yq4CjÚØæ–L‚÷ºtUÕø…2 œ‹jÀÍ,â¢úÔ7šœTXGò»³vgÞ)3ÿý9Ký¹+¦áþ±c Aú&K'cqÛ1Ís ¯»Üèê¶ÇèÖRŠù„vãT„ÄÁÂ3·¨­ë'ç©ßò|Ἰ¹¼†7Äß™p-¡w£|P³º)wË@Ý‚ P¥Mõú«5¨™“»ãÂàÓ4ÁRÚ†èÔXcKdIZkJA¤ï5#™!à ²Ç~"{ <-žÕl8ØŽài¢ÉƱ>Ù™÷ˆMJµ‹ÄÉÊYƒBŸ‘÷ é Ô•è`9ØÇ+KDŸS´àÆÔzƒf¿ZÏf>Ýò¤¯(gŸÄM+|Ÿ’æ)dV.ÿ)%à`0ß?È)ÙULÒe×`>ékƒ³ghЖsæjÑ5 L·R1ÅD¢[ƒú¨Ž§˜G0£Q.pÕäžÚIµ5„¤(‹éb÷¢Ø†“á¥;ñî5ƒÀ#ØÔ.¶˜®šëêÀÔ?%–qLÖQðR7KÈÑ™˜ƒ¯›LE£Ý×ã…J‰[V‰H{½×ƒŒ@e•2}o\žb; Ê\ÅiM“†¹oÿn¦í¯]ó\Ø]¿†¬<ÐÓ‰zцâ/9¤Ÿ+e¢ ›¨Àª¼v7:L0‹Í<É¿t#Ñhi§¡?ÜÞødNÏ#ð’¹;˜„J‡E’ñ‡àæÜw²‰…‚Ë„‚J\ÀFŠ%g% ]bs–yø à¢T­OLdÑà’!êZk ® qB‚»ÉïKÅA÷Ï«Ô{^6âu»º&åk«,©sÓk8WìW(3Õ‰Ù˜9àd¦ ¼ïÜ[&¢üáT““–“q£`>£CÓ~Û=¡1N?-åÅÆ/lö^?hÔ}2+©Ƹ¢?¯ uÝ—’š9#á#:K{ÿP‹h=±=‹üÓ• afRTa>+É c«Éî,”ß ƒrNà·â%M³ë[MLJ™Éà’øC§÷û´;þ­Ü.¹Ék=äA?*$• ¢Q/š[É;¯ÕAe…ÂŽ$ÿÌ÷´UAûtêò69q2TM}YàÆ²·k‚úoÝ»_‹ø5»Ú²Iw™à?Ú‹¢%’¿¦ô^;côZ¿\2l<°ù?äOÁ8kfϲzø¨s“Ì ’#å±]¢#ìÉe.·öÓúÁ»ÏžÒ[~\¶*ŽHâ/"ˆXÆÃ0Ÿì…)$q¦rqZ£íâ ©ÀU»Ã´EÁ…EZ,ä‘é+H£!%¶¢û$~2¾²Õœ6|ÜŠB©MŸÄDq̶‡VÓ˜h⦿}ØÚ ] 3Þ™Þ`lL«C°Ö›Åv˜Œì»F‰g,´nЭVÜ÷¹s20iY’&“L?ØGéŒå”|Ežø¥y>žãͬÜQ§ž‹¦Q]J¯Ã¡üO/æõ®<Åá"À…õA_Âí”5™#ÙÚnùIUÏ3ÃÊ6zÙŽ.¼¢ìä˪ã9ÚoäÆÇsKàŸÖ]¥™÷ÃJÿ$‹%„ýjdlZ{qÊ‹¦@I±wNp±À`ðÝ}íÑ~Å»:éc’ RáSØóãUÁ“üÑ Ð¥&ã)Žjh9q4)„ªñ6Á}ƹèD‘Ó kÙ®ÇLËCeÚnÅq@òzÎ á„oˆØ-â^Qû¥<´8–ºî7U<8}ý µ'ËLs%qmoØË÷{‹Vš"m©UßÛñQ¡DD–Y‡9Ì „låe§ÐÍö·bÊqÎöÛÑ“•¡k,Ãèì´EXô— ®|éú߉Œ}štjë0VôžÜ1ÇnÅ妈}^m+O×óùýEÑ?ÎKã 4®$Š:©w¯PF¼ý,žž±bœ©žî'©ã†ùj‘ù‚þ«ÝÌè|Í` ¨Ê,mß Joç\xœSóˆ>ºT‡Š Ê êž¹…Cã˜Ý7ËÑÁÊÚQR÷ŽøQ£Î(8žWxç'œº±'ø›øÁʪN5 Ò|©UQ‹d~oYÝá.¹Ö-忪•|SìÞ°M\üûc€`ÒÞNùM_?æzØ‹ÀŒuñᘲÓÁ°¦´áFþˆ÷"…6MüûT|öðÀ{#.Öï2×uE•哚Ò’.¥{½Óì3àC€è-Ê:XiÃŒûbCȽ¬ÝVB?6ѳQÑUIÔŠg½Š€j˜…“í@å=VZÙôå“ â·˜¥^P0Úï#uí7Úçͪç…X)¢ˆ)Æz<ˆ„”ÎßBÊ+þ=®Õ­®NßoGiÕ¶Y§šúùÍ:~äÔÐZ»6ÂÌŽ¨bM1i6_1ºsO·º´S\]ü"z470pE_ˆÁ~à&v{‹ô XLp9ñœåÉ[!(~c%l0}›Lv8†dôb(BV;{[^£®ˆÚSîzù½æí~ ÄXû ]ÁXߊâ=#„=(»e ùYáu>“ªS¢;¡Õ©œçëy­ðgÐG¡k"”LOùn]4ègÊÒ¶&ߥîY(à(*·'`Ø9é„MNÑu4ƒß°«îOZº¤_}#†½ÌãòóŸ”`ow5a]·o¿ÂôˆQŒ0ä Ó7æF<›än`”- rKõVÃÞØZvûI†ÒígJXæ{avnÀ'Mò6‹ªaeEœ¨ Éw̉‚,ÒîäbæÜ´ÁßßÃà‘*µ BÉ'qI³¹«ðÈÄ}öAX$1€´d”º ‡ž·ð/³Ï|+o¸‘Ä}À„û^YÔý0HŸë¶]@kÃ|üIHKàëHe¿¨ß€vž a’_‰þe1.öC‡ªoì·jgOr°KBOÄÈ‹ÁV§% ýÂ-‡•ýÇB!Tx &Odþþ™‚°¨Áfœfоòõ­HFFp $‚öümãKr8ÑèüÕ÷{5rÿ:Ø{{‹—³âùõ3€•P,vÜ@ñû[Ê›mäž]tÃ#unHã~yX<ì]Ç„o¹ö5£öótO·¬5|V4¯ECnÎh% uŠö˜ªérÉ‘VV¯D —s©˜ë&<뇛Ž< xñÜ.[u“ñ6#±åüYƒwìc<÷ŒÑégt0ï(3f®ñžL†J Ü ¨ÛIµx}˜ÃšÍ¥Ê`ü,*ù·¯ÖE¼œñùË[DOÜfäÁÐu,–˜ ßû¼@öW»¿„ñM zŠä’’gQøFh²T¬5¾w´œvÃè{eœeŒ(Ówão"nœ4`w Úõ*—¿ú$T¶_ÏÉ€:š:LþfBV9ñ©—ÛQé”’¿!J»÷îåd{ªÅYO ïßò5ö*¬¤g²ˆ«u$Kë ^Œ ¥øÉ ñl%ˆmp ÷Ëwº\ìÏûŒå ý¯ú<áÈ‹¢¡}Ã%ޏžqæÏ¯Ð:Ä:¨\~HÕgCÕc2Mö°‚ïÞJ†Ô[ì² ƒýb>AN v?×ÿdYzͼm¡¶ÙŸ Hzƒ”7<[|ÜëºTxžejåCÿ±³ØY\Ž>Ç Åˆ™Ìž‘ñyœñpz«ÿ^©ëZÎQ€‰®kßi4ƒÔ˜½CÆoÃ(k›h'éñ€ksÿõË·ðâÞ£V¡“»Ðúqã­zwhœ×·^«—ªË¾i¦ÿ§ö7Eìâ=?UÅêHv¥ÔÆ7TIÀÓ“‰°³•sßÏe#†4+âÛãN£é]E·ì¶Ü™°L_!ô®“6f ÿÒ ©mã6ŒŸDÚëóïõD^Ü+tm—ñ¾œ³÷OhJLK¸æ"X}¥2º‰Â½ƒq»„õ4qx{[©¸Wa —T²x±7£ÌððMa‚ëƒíi²‰,ÙøÁOÄúÍÕÑšv%ÈS…ç5oEÌ‚NŒ÷—¬àx!;+ûkGgo1xÒ}sÕuºN^C’ÊE®›;Ññ”S£‡݆/–ú†H¤Õ²Vϳ‘ÂøÜõOú{}q® ¶:µNB£ìèe|ÏNÄÞ"Ç…"FȸÅ4 S²ÌÇTžZ4†)röÖ¯HtÅ/›öŽk¬aÖÔ×NãŒ×~ÚÕ½Ÿtìz­{ðµmºIžß¤Ÿ‹ŽÔ‰Á)–a¡æ¯ØÔy¢¬ášsBëBµàRqg V°‰êFvú5ÔÈÈœ™U”G µ ½_ÎD“`R›ÜÎä¢l£×5äAÀ^€âÔÀÃþ ½ ¹BI-ìñÖ£'ÞV’2‡T"‚ (ÜÎø+¢úy²ü­Ï@G@èÒ]ÂTBsª¸RsbZ»x$Bš©ØZ ÿð =âÁ]†såz”ô±K]¬—@O:bøy-ty3ÕYhsÊê܆ӑ¯ $èÏ­Oö­ÆXˆ‚ŸR¨hÇ[C¸¿5*ðn¶Œâ¨DŠÛQO§>|N^çÐCà=f6‡¶×®³ˆcdþT®AR6CJÏ^Þ|²™buÓiÁž%ÇzÀ×<0©×G¸ ¡Bí= ]÷Ǫ»_çò©’½É‚£LÅm¼,›AP,¾#ÅÌËϪ¸#Ö úCsÿF%è”ÿPv‘õäm„úzŒs½ÔÓVN»Š¼Â™âˆ7ô†bŸÃ¶¾_ÿïn´¶üzé,æ;æR í8yQÉüU¨EóWf_ÒjEl?{r=8ã–Ž$!Ô}9ü:tT˜MÆùš¸7ïH^"êƒãr]"Ó åê£üñFÒÃù—&e„L²W4 蕣羦f‹í ãê)/ÌX2Ìc4eÖD‚¹>¾.gkûýÉ*j4Ÿå/:¶Wõ †éÀÉW{_2ž´lK…FÒ«2Ø1¯µŽëN;báô¯ _(Ä×Þü+P`î ¿F2Iöôë!)Â;ä|î,øV'’#˜‘Î^7·UÑÀ~ ãRQ´[%É?‚\Y¼„“'8™FÓ›|ÚÊtsƒÄúcÎíûR¶žAG }Át×=—«ç¿ŠI•Ò+о}–Ùl¤ª@Yö{ÃLã§MN2&:f»¤lý!¿@#P‡ 7>íÀH7.$G¬ãnƒQö ¬E +þÔwoFl:`/³“L¼¨¥ZJi7ª}CVëÊÅ:¶}„ Ihoúê22?ÖZx%Ñ=%ý­r\dÃI¯Ä4Ü—£¼'0'î0œ”Òü vÌ¿œb\# r½Óx›Fô)¤Ú²0ËsiDTNPóŸ&'ë ÿm‹“(~|ïyØcé+?úã¨,Pl­|àPxùæã˜£'·§už`ôóÈ‹½d¾«„²¹™¿©6:ô%È-±ÉókwÐú§J)/èdXemZ»‡?Ĭ£ Ê”‹›IM?zo)ƒ£ç.íT"Þ* oßxëR{ž„!šl»ê÷Ä‘a ,L"]Pp¿:Ø%.jêîqZ|… ’Z†¾àZ6¸˜žyÃш›ßÞ±¸ê2+i{ ÏÞì.…a^J²=®¤i°Åç±TÒ­ÒÓÏŽh(P6žïÙ¡ªv†üE ^ösIœ,Hüd±ËÓÙäD ãšøƒM¥œGOŠ“„‡Ì+‡ÛN­ Šë ý”D™+’TBÛjOCA>£h÷oó½0A.gÃöû3»ìÒ[•Û—ƒÀÝôf“À5UA;œju[;qÏjÆšr5ämVš,†y‰-§Žâvûéxï ñ‘7°•O0¬ýÒU’/jC•åÂâá…GÊkðK͡˸ÜnH³èF"©JD&©ü ¬N@ê„€Ì-Õ½÷G…×4›lŠ[¢-¹Qf¸¤ÚòYyrÑÆ1»u©ç€Ýc&Ë4Þ#÷ Õ†‹FÌÁÇ3õ(¯mõÌOpñ9ŠäÛgd[e–[§v óèóÔðw#Ã0Ôgo«Sáåw庑¨SAÀÊ•º—¹kzÏîX,_9·¥Åš&injä-Kœ­n½DøíŒ@oÃà}bQ]™µáp­¢Í–)b÷OyâþÏm £&6ù‹À"æ¯ç}hDû<÷ Ÿªã9ºf{`Š™î „W\R`~¸„xINkºÉÖ+ØzØ·ÓDc+Án™âže á³;~xQ4ʼËv»™ÐÆÜo  øTÖ…9~¨\åÄÛáN›F²hÝâ‡VáFÉIçø”Õ÷$}æ2%eïžÐ:iVሦ+6ÌŽ$‘ΰ eàã΢ ,í$À ÞÜäù´_YìñRàuP]_˜”& ³àÖ Ññ Abøôg· [,ãxrÔuˆç³ ##^ÂÉáý·1°6"¦ÞHøÉ5‡˜ðJÓ’KD?;)QhŽ–:µx¥Jcs½à'¨¨ªÖpå:&õx®¦68‘ñÿÈŽÈ‹[‚ôš\žÛoõS“cõøg· )‚s£•%7ÛÒ£ókcJÊ"EžV·E8¯)S>3p΂tÀ^$†ä¿wj†#û^°ú·Ø*1$ô0¡ÇÔ©ýëÌ¥& o)(‚Ûú­™LbaÝ”rzì©f{Œœš´„±ýŽüð€+üøæÖ1’ ´€u0›èXhæ3*‘@O©þVØñ:øfÀ»HkÙ˜fûU€XÈ|'¼ñúÕ¨Óza|k?Κ…ÅáÊ ½sc×nO`õÛ Ôýª]²¡öŽs8˜f~;€~d’ˆÂ”臦kQ®€±'üNmCZ]”Áç«»˜hj¡“¾\ó/IH†Mû¤Øu¼ÑÅ^´£»jõ×ÞŸÓ¤Mn÷_Q|Ç]¹;×™XmÐi;í ­\E¡`ÿ)d]á{ûixÏ>_fTYLâðíÖtÄ%[.ÆÝïò¡>o-”ð—ÊÓ¾MÇ !°‡ú·<€Ô|Ü-_xº§ÕÐõq?„%t‡sb‹O –IÑÝ-F’nÝÙ¢ê›Çë‘UVò½°j9Þ›®BÞ«yK¼4ïé­æáØW̃\¬[pkâùYüxTúŠ5H’…(5%OÿZ; oC=´ú–/ºïÜm 3;Ç`€÷E"ެ›ò? “Bvwž3€eŽH PÕ»C1%sn±,è°Ðbˆ9ëN,w pŽ2åµL°¬_Ö8–^aúmÛcIåA£ 5rK0Rq|–rùa7U 0w1h#’ઈES=Ó”€µ.ü± ™Ð†÷f±méYG•r‹:öS²4â¡z$ÜYâÙº9Ö¦BÇïò[=ÛÄ׿UÿüÀÚ.`:;hÉjõ…¸[ES$Ë-NHâÛ+ ½<;JrÏÈëoZwðp$µCw¥6**Š£Êcßw7´ jë Ñu¹ŒV—ìoŽ@𨂥øøÔ@“ájÚñÀ{Íþöÿ>Hwébî VRcæ >º¥Žì@“"ÑÏ›ý+„Ó˳¼È\Éщê—1Ⱥ"ù“(ØÈ°íDçUÔRÿÔ€Ò“ÌCùOÃA¡æÑˆdc÷.H F¶¸(q¾ù§]B¯$>e^·Nõ¼ÌɈ/…‹Ózýêeë£Z¡/Þ;;õ%ûæH<œIf«îG‰Wz±JÜ=L…V@â:ѨE°>W¸Q¸ÄâU x?‚&z@——ëôn„Ûªa_–œšÜŒm^¯P+¤KŒB‰¼kß®“TFÜÆ‚3ÇAgÜù”Æ$!ùÀ²‚ÌN‡n7Ã9X0@„øõÃKÒ>ÔÂÉîÔ†[÷_ˆF¾!Ñ“o{Ôajó/>ª!ð”_ò]âà ¦‰É¢øJQ‚gå‘HäÀ­2ö;¶L zÀi6"ç,D­|ÉØ"¯÷å0©4qBŒw&&v—gÕ…¦f!çºí›Ö pö–²óX&ªªG7RÂÕO6´1õêé"ðaÄHâ*Š¬Ê»”¿hs{FÔ†‹¿ôºp|C,] ²oƒ¥ÊÚ~òZ,þW?úäwÍ ÓØSƒ&L®ìE<Ž,ßîZeÄÂØ„zäÊCjhMØw4UÈŠ;ÇŠXŠ5çR²/°Â¶h— Êúþ­ÄJ–öÍ*|ÙÐ0±Úa*qºÞ°¤Ÿ^r@žR(“å'tòDBpàZ)7"‘kÒ/)ÂãéûG:N’¿G¶ÌNÏÚ±E^Qqm(–dî²éˆìs6›QH Œd c'Áb,ˆ‰„z‚‚ó;| ƒãC2`Ø]jì €º Œ*tøF¸‹>÷ØTÖ£A¬èW±{ìÓÛç²æcnç GÃ?ªT@fb«nRÌ158+Ffz²Xk’"t!C)?ºžódü‹ÇµÐº{³t`-Ajýö…š~6cÂ> stream xÚ­teXœÛ’54¸kãîÒHH Xp·àÒ@ãÒ¸www‡àînÁ îÁÝ?ιsçÎs¿ù53?ºŸwתZ%«ö¦¡PTa1±5IØÚ@X8XÙò`k#'G9[Ye™“‚‘ðð ÓЈ:€ !`[1CH 2ˆŒœœ~~~d€¨­›ØÌ WSÖ``bbþ—å/€‘Û?‘·HG°™ €öíÃdekg ²¼QüU@ Ä0[¢ ŠZRò’zIy5€$Èä`hPtzkÅ 6Ù8‚¦¶«ƶ6&à¿Zsd}ãqí@Æà·0«1Èî/ˆ`r°;:¾}ÀŽ3CÈÛ ¶°±•“É_¼ÙMmÿ.ÈÎÁöÍÃú {#S´u„8;€í €·¬Šbÿ¨bnù+·#ø Øš¾yšØ;ýÕÒߨÍ 1Û8 WÈ_¹Œ@°£•¡Û[î72;ðße89‚mÌþU3Àdfè`brt|£yãþk:ÿêð_º7´³³rû;Úöo¯ÿ¬ qY™²"sp¾å4†¼å6Û ³ýµ,R6¦¶öØMœìþ‰9ƒþý_;ÃðV„¡‰­•ÀdŠÌ&o yK  ÿŸ©Ìú'òÿÄÿ'ÿŸÈû¿÷ß5ú/—ø{ŸÿZÂÉÊJÞÐúmþñÈÞ^[€,à¯wÆÊÐð×[cïúÿ ­ÁVnÿMà¿;j€þQìðý;,1|ŠˆÙ›0,œ¬ìÿ0ƒ%À® E0ÄØ`jhõ6³¿íj6& +° èMÛ¿ÇúÄÎþo˜ª9ØØÒæ/xþlLþ½ü7¹þ.žMMA]]V‰é¿{aÿöT|Ûˆª›ði4älMþóðÏç϶®^ 'rø88¼þ›ŒÓpüë,gq»´ÙYÙÙ9oÿÿüýë¤ûo4â6ƶ&mŽ ÄÐÆämÙþÓðlìäàð¦ñß÷ÿ­éžÿ^{ÈdŒ¼8gk,`‘’ž ùŽŸÝ?*¦ÝÝÉÛhW\§Zç[eÛᓲÎ_nðTÈZ?.ðòÃíסÝó¶4ãÎ`'ž]Gè$—ċС+s•¶È´óM¯ø}ê‘F„Çé¬ìÜW^võQ%e½¢§w¤ã­\ˆ§· ¾TÎy¾8Ô7vhÞÆÉµÑ¸mõPXßóhã÷ooèz‡úû:Îá»¶‰™²¢‘h ñ½) nWuÆ/ðÎ@— A%Œ XÖ£„æ¯Aù©VŸHƒœHÈ7`^£Mê”’OV/¤T%s¨0×—|N¢a¼»žý|Œ²ûά H~FW˜f‰ŒUÒD.A,ã8¹( •%2È K"2MÑÖc:¢A·³YKøbKŒ¨/Wî9`|Žþ)EÙñÊc¯_óä%z2[@ð©V¹›w鯞¬áÀ8­¶éüçFný'þ¬’3‡¹%%@=í[Ä8ÀagEë7[G5Í>Š4 YØLJf–3÷kÙæxíð‡é³N(Ý؇ΞþÝÑù†ÁiE(>Ëi’Ù>·ß¾þ&;kêŒùT³Z"pc1S›XN®šGßñU¢ÁÞ$Þ£µÑÖE§EHNKÿIµ1™òI¹“Äré×àLfƒQò‡XüÁ±¨) ŽÀ`”b¦NÎóÇ3ã :_õsÓ=ŽÖ¹ãÕ¡ŠÒ*¡oÖÔ¹ìP&l¯ñï~ÏŸ~ £qEž÷㬧b,…IJ·nM\V²khÄä\ºn(¨Œ€ÁoaIî9ç8ê´ÝïÿDÞ·VT¼Ìt²X—ËŒ“'e3y_:#wµé£ —(ôO±GE±Fßµ È¿öàÑ(é3ïKÉ߆Å7ïK,£–ÓìÙµ=iûU®˜àr Q4ƒK~‡êÜ›LÕ“îΧ‘K•VâVÝ}ŽOL½u‹Ùˆ×ü¬î†?!EZl™õ 0Äi)•¢ÚÖ402–•d%DËÃ×0äÓ uŸVUZ ”ös–u @ªm,‰±0ùдA6¡3 `u–GšÚ«+¸Y" 3 JJöÞñÒoÇŽÂÞñ‡—ŠtÔžž¤x.›õõóã§(ÎŽ¶¦™®zLýiÍMVT±âŒä›%Õ<9ä`\{Ök?õŸKê| kÃIºSöá|­‹°Sh!£$¦9Ú@Ú0ܱ (üazq瀋 ßbÏ`A°.]¬Ýš÷ÑKÆ«ÇÞ߬Oû1÷'e„Ÿ8 ›XIÑnûÈbЦ[ ìé–¦Ñ •géæÿá§ö;ÜÄGº¡{Ånó.Žæ=r?sDRýˆwr*”¿P£Åõ `ƒÛO=Ê^Ò,¿À~Ëò´R•ýY‚POi‰ô¤bOVåÝwÓòÁ¿3œ©…³ÁÇòydg.d%S‰ZÍãþ1´Ñ<~Ç]dÊ蟈 ü¹Çâ­Øåg cuo&°õ•è–\áËÂY×>ŠËTÖŸ{oÍÚ…b¯Ca+êCÅ?¯b,Ú2-eLX¶]É{Œ£è:ãMãßtOk P§¿”V9m4_h"Ñh£_—6øy‚Nç; ÊÖÙÔM9S2Î Ù1CÔã°Q‘Ï‘öNöðä®›çÙCy¾*4÷<0˜¦L™å8XïD¿ò`‡ †}C;9wTVèœî¹Åa¬Üwö‚S"­Ä¾Ewt˜p—1=¢Z~uU0Κ~Ôk Äcü²4ñÛm\Xª]ª~S’°Bî1<4W麖|E4¬nå…Ò°øX »›9¬A­™î%Œv}»«Ô?hÜÏì]ª7“õÜÍFÂfä%ƒ©Z`ÔR´‚£¡Y=¼¯ò+Ÿ®‚ÞØÑ\=jž¤cÝVñÙË®#Ø ¾Þ-Ožæè™-0†žb‰e2CŽ’y••zç>=oÈÂ"ý§1c “@?J3¾rÕþ 9gVB/., 7ÊBäLÚˆ-Ƥ9¦éˆl÷»:ÓÂ÷Íö‹ÿVö×5N…‹ ¦iºßaiÖ=.J$?XÉœf% ækyÕG½]ÙHÿ•¨9©ºÉÓ`9f`cevLŒ»!Gôv÷Ëz»)Xw žÎ!ò•“¿Å<Ôšˆw<1c,'¼“«ÂiyåµÕnw>r9ÂÞ j$·º®"&’Ç1%kŸ&I¥híÆ¢åÚ‚¿ Ó²š²ÊW˜nq`œ19ù7}Ê;VµyÄ0Õ®l ~×ê¥à÷gíz O¨xä^µûÕBuÛ(›,Ž…M’æªlÒd“ªGž"9þªõtïªÆ«r˶DÙa™¶å~VÞÓ©¡#<ÞOØòÀ~4y·#/·†A39°‚¥NHJ¨’‚½fn«ê€Ý1øš_~zFÎÅœû[.ñÍÇO•iØX=?fOg¦ÅôFaÎôèq®ÞÉ“ÜYdÖ#ÃÝ-vª¥¤ߤB¯³~…•»€ß¬õŒwÐ&7×´œ¸¾x—[Y`i„å½Rå>ÿø~¢xÀhü§žÏ;wHuŠ­*à•QþãþŒý¸¸5“9‘šãœÝשæíÉÖä³xvFÿÔ,A±œU{yì¥Ô7suTÈFÙŧáWò†dz£îýô͉ÐÄ‘,sc!á„ûè…¯ÜH¯Vƒ—=A|ˆ Ñ ^%õU'‹€Eh€MNéØh×WR&;92Þé$"æ{ý^³„Úƒþ¹Î1LWÁ~»ß¢Ó®fCSàt¹¹qÞ\ï ëvµ{¥›*ˆ„†8«!Ïú4ëA¼^¶èdÔvÇria»&A”*TÁ/AትHocîãÐüÓ¯ùSOª×K®VÁû‹Fa*béâ ðˆ)*6¶DAûcºÏ—óç Ú³FliÁT<õÕ$M `­´ ëAíÌDɘh¿Z8`ùúŽÝ=&”ÒF³¼”6_ÂË&ÌàQU‹ ÐS£&Åú)~m w}çh¤X8«{‘Ì—þqÌX¢E˜›eÄÙ1“"Æu•»ònvû¡ÝL~Q’IFÁãi"˜‡\óFHôâçSã‘Ý0‡ÄXýî4^›Œ˜‡¾v ¸•ÿéýL¥%ã_;L“HüášîÞ¢©ØÜôã¬e d¢²ýû¡cø9¶æ³%%d{’›Ô*²ÂÑÍ30¦8æ ¤ e‹eþ'p‡n˜¿°mÊÿ% ›4K¶n7IdÆík£wåT¹±öÇ™ÎTç@á’Vœ™õ›ºÓÿÌ'©Kj`q7õŽ :8ÙË?¸( ÉÓÜçàUüãÀŒOq+ˆÜŸ%¡L/ »’a³«_qA¿ÅµËìQŽ"ÜÀp²*–7çÓz›ꡲÀš[XÓôêÂ,:–éiyëkež˜3Ó¬BØÇ{yó𖫃%AïNs&™÷żÏ¸é“Æ0³[g4löͬ2÷ÅÞ­$À2ÁGʼnµÒ}Ä5¤¥(}gÉC±›+_‚몉âfç¾âŠIÔáb¡ôw€E'c„Ãîñš~HÚ2h–÷Ÿ S!¹Àñ…¹/Z#ô  mæ—)Äp2pä9dâÚ:Yšµ¨tSö¹+^K;•Çt3EO[«E›WoçžsVUÈUc[`Y˜QúEj Ÿwö‰42˜4‰-iåÖÍaø1‘©†TÔ=Ê0·æ¼Xúªl³œŒcF%{ìå›cìQ”høÒä>)J‰)ï­ÆLþ>a®:ª(qqÇ&D~²¨íÍm©{£ct\üA­d M:>ÈSH{‚+W´$äQ=Ùßf3g?Ó^`Kó…$¡s(Ù^ŠŒ Û/ã¦ZÆ %´ºñÁõödoøõFÎ Sãxvg÷ÉïÀÿFe5Kê¸aìðÄŸµÌKÛRb™ ½!&Ò_Šd]îà«R¹¹ŒœÔÖéʇ|›’h~Í­¾.䦑þ®VVOOd”VÀ•qa#’ʹ«änBæ L#‘½”0÷§L*’"ªdP^¢.b–GD4à\'=R¶:çÜó¤Òiž7—Tjç;[±¾ü1t¿ïþ ‡"’͉„ÿ´ÈÞ@6Ù§Vü.A¹ï–3>3Õ GñSKç}±î³{¡§wc"A°| Ÿšâ-ÐÙbísP‰y°2;?Õî¢8ÝãZySïÁ¥öدPÖ_Z>¥¡FªµÈKýº‘:“&T¬÷=AdŒôFEÍì—òê+Š-ùÕ¬ÕâäköM{DZÑΙۣ¢úï#‹µï·}yÛÐ-É3DC°ÕþÃg/È¡EQ¡Ï$·fë”–ùK>4ÁÙxIcœ‚Wg}–îj‹Iâ5‚ãï¤Ñ4˜Í-%Ð!Ý·Û›Å6!Žæ&yâÑ5vÂJÛ!ANÛ16Í G½Zž÷˜¬¼„nS7Rh=j)ê…F;eåbæ„ñ~ì3Ü…<ÈéÓªrtA@<‰Æ‹:…Š»»ó’ZqFÿkx œ+nßpk>®E·#]ð€ÃÆÕLrªâYÞÔ7Èï‘\‡ì:KÒfx‡ÒøUt·c™kgqé¬1:Õb†t¥¯pDN´é8s=Z‚efËMé¬2ï*sâç2IµH ±{sý…·?ŸqyõꦑudÔ’øËðZ,”V22JaNƇi½&Q˜ÛnU·qÌ\ª½jA1+ôõ¤’‰M²q+Ùïà5<±°jFb¸ò÷2³î©[ ´”C³úí³qÚÍf" {åGd"€;|up•ˆqŸ3’Ø: ªâØ£] aQ8]ÝãkÇðÐHê}€âË—„rûQ(¢H±5ÌŠS)‘æ­(ÌgLè`¿$ñò»e.¨ª©¦ÕC¿´jdM]5æ•,Â/†]`IC& ='‚°­IÿÖ•^Çå2…ïáe¨#‹œ}ø-žDaÍ;_®:~-b‰c}y­Ý{,Y ÌWú æôœu¤HÛû²­ÚõÀït!YçÓ%zÌŠ¤´>Y¡!k†°“Þ«8>vìåªÉ®ÔeIPaË:V·Ï|µR·7g劲‰Iãž ­ï—ôbt¨Kc/ÀV˜6쨡Vêž-Œ'q¥W$X,/õ8Ô˜ô™›umYž¿¿¯=jͯÝÊî! r/º÷ÇÆGÅœ ¥ª×!Í„_•í#X™4*,‡  ¹ÈU,Ï× môKäõ{Ã]ûbf óF*lÂ6_ˆ‰IV!TM,ŠçäÃÈ ¾ÿ¥PɤZ3C|«B*þkLdòTõé|9Éégù¥±lاÇ9úDÉꘖ›Ý”GBþÇËéO×Qï[]/xä’â·çi M7}qŠ?ÐË 4òõ‚ˆ•6(¬¬©°ìv5FoÛ1Zîgð«W·ÜÉXÄGÊ–X׊q-ËU„r^=ŽS{°–œu}Öó‡ Ùß¹Sü¨÷‰D³Z†º›þªE¤Ÿl¯–´SR_‡®vÁx¢­g¥&#¸þäé2TPTÌpà5Î%X“ºâ'ÿJ xù(É òÓn³ý¶¥ûJ ïcÍŒ›éI›A<Óªƒ’cE^¨ëË, Nñß,×jðÖ`Œü>©®¿i?Å ´“Bá×™ {¿pž§´Žø®XÈ̈ì(ø M˜ÁóÜÞ33 L}Nm‚†ÊÙ£yeA儎”˜¡ù2¨BT±fdŠÏ/´µ*%ï·SäÃ}Í1 Í€šû¿…w®$oxO¬“ŸÒÀÑæŒ](æ|Køf’/Ç£d²f»ü‰~=´Ìæ>ž÷xÕÞÔ+ :ÐÐrï°Ë· s5`˜àyPšç.M 眩‰²ášJêÎåLòr»SÌÐíʺˆ¾b ÷ôhŽPìç ah„„ü!S-—ò÷ŽÏS\'£%“ò+›„oUô*÷ý’£8ÚBPd‰"p ÎŽÀÆäÿJCiî~á†,f±B©P±¯ì%‚Eƒ|×^¼ÚI?£S¡míö1¬8àŒZ"µÐ®Ÿñ •aÝqoºì_FëœØ“ð匑„ÿt¡ýòK®šœ0Öpé‹N¦ÿˆäAhÊu¿GŠ=#¬ú3’É•Ì%²"‰¼àoÎËA Ç™ T„@ ‚u,Öxî˜chŽföG V%AQôÂwŽOfÛ& ðžzÐ.aíøÝäÒp1Ur$1†¨qPy38i ¼ÑW8~sb+èÚ>h4úï¶Q¬ï¸°tþ™%;väCýr§¾žÍ«5Ô‚rÐâNàñxÉ;vPæœ/·±&1E¹Wº—`êoPÔ{¨(;xžâ. ûF`uu¹ Zu¥Ô¶C·6Ð  „Ó3Q1gÅö~¿«Î1±æ8µá¼R‡o›?Èî6S"HͰœ1%×1®Å#gX!/ËÏ^ø¤Ïd¹o±V%úµüÈÇ.<1ìZ¼¯ùP6Ÿž#ßé{…WÓB{‚;#'åÊ œ DÀû‚hŽZ°š¦ÿ2ž¨‰Œ‡óAÜ8£ÅøãA{³OÅM¦àÈ÷rª½ÇÙYlm½›¤òü‰nz‚²Ü­ye.÷tݲ¨Jj:Ëû@ÊìË ­oƒ…F\”nS}øô{Ê_Ú™'ûZy; 1µÄÒ>•3|Ý9¸¾ òÐ<'“x¬.BÕ4YÖÄ4¬òÜ­ªÀ[uûX**d>û&ì‚.•|ªÐ3nÝáö-ÃÌJùã×ü><Á5[”š¸ÁÖöO]ù_'âƒ(dÍ_O‡‡’ÿÐÛ²Wˆߘ™•Ѻ;yU¶ê¼øKõé»É$1ß^\®»#¸‡P ¸'3Y¼UX¦ÔÞ#3[9¥f×VˆÐ h„¼¤-ð—Þ&A×®O³ Ãm!+¥ˆvd‹Ç U»üL~ÎÙŠÒC̱”— ó9º?·²ÝëÍ…™Ì*èŸ·ÚÆ&δjÏêè—*Òô¦Ãeo¹3 Ö>.vdã,9  ä‡°—ÉxW¯U–ŠET4øÙ-œÈµòðš¨[vqÒ¸&„}O?X;¬g g#k‡S>ºÌØ)y_¤š#œ+ì“<áxyº—}Òü9tæ©+ZWñ]½j¥ú¬ÙÉNL¹¯¬~S=(é6×Û‘è|-^YÜ’3´ &EqñUfâ~3Mp+rb†ä 4<Ýì/ý†îJù®!ƒ¼èFã.6ê'‘ÐÉ!…I8–|Åzf÷+bN*½ðKÏG™c’`¼G†(oàR7ÐISä;N§¢qg§›J¼~ò˜ï³ßÁtåY‡ozŸ7¦øº’}g€OmL*…bØ4J1üõçUMrGÇo Q-÷wЬ(m,áLÖ¹·!…fʾ.!½\E®Ñ¡+BhýgnÞòÐ$Èô[}þ¼þ ì~Ƀ‰]mWd(ÌRª˜> ? Æñ†&w@hkÏÆ‹t8µ¡6<'Ñ!öì¶O‘Ù‘¸ßÕÓw «‹jtsårG `¿¶°´ÍV$È1Ð1êýQs8_jðÞ"‘/ªTM{Åf<ýݰƒà5ÁËõ]\Œ¯#Ü`H ‘jž¤èýéŽð–äc òñÇÆÛ†º¦³É¥‘?Õ§Qü 8LuÚËVÌ Ìx¥Ïa%Ôúdá×ÌáÓºÔǸMW#çÎ^v|Kí¡6”Ê }Iõñ:A˜ö˜ý‰r×ú„¸éþÌ «é-ëÁHmbZÃÅPÇû3ºTöþ`Ä!H®®~¨ÍœÆˆÁ ›ïÄѺÐG¾²´FÅÛš]oØnµ§$ÿL`?§7g‹¤óéç¤c7_¾€,ÃdK-{šÏsÐÔ®ý/g0Õ¼P¯¡ì#’Úë±#ÇM›)0œ€IlS¯³~·þÚq× ótMUÆK‡žA6y*úÅ« C¨”r„ˆ‰’,Fíd•2·}ì×}ã«öK}ÕhÑØW0ìŽXò ¼¤DÞž‘ ŒBâhQžw&>UÛ}·ãº ËëBî”ä’tML¾ÙÑŽ›En“IçŒxíÄ¡±EøÏZ,‰/÷;3UÛ±¥lÂfó…U‘Hêt“ñšv]MõvˆÖ;ƒt[*EÕVå8‰Ê Keb«zþ} ‰ —Ë ‡ácRÆwŒWÖê©Ó‡L·©šÊ…Ž’ÚÌÉ¿}„Ľ\ü:¾jÊ0ZÚp! HÉ}–¤zð f÷'Z±x Y&z@òßË<3y Ò *¶€·ºû‰iÛ*Û²÷½ôÇžT°rØ’l;jÚ·«‰/iDŽqØ’)HÐ^¡dß‹…}DÍQ‚’âZÌe°áúIª,Õ¦Ÿ?HÒÕà$Â2bßâ=øô<¸î|1¾ì%Zå Þ¸,×”•np׌ÛÚ'²7umø·Nˆ¥a¨·; ÷ åïŽfÏÚjŸi ˆð~S†¯;$Ï=L÷Æ-ð©F1wÄ€ì»xI`C|"`¿¢ä±ùœ’~5ë4´m{»c©!óy“Î *ª!è¤s$d=3¹!2 /X3TÓ?“íâÖ<±{ì$0ý̹š=Sõˆo¶À|–›Š‹ƒBëŒ%˜#ïÞcÊ9*vžê”µøT2<ºž×x§¥ÄGŠñ UÈÆâ åc@a#ÄG4? »ß5:„åáêÆ[•Í‹.Ó2°k!~ÒCØ•Á7ªbF×d&pAI:ê¿Â"$®k…þ6tdšÙ¨]ůk h„©ëorªOK”*Øj›t»ó[¶Z7žz¹fâY5§^™Å3mûÕÝ(ðÇË3bž#Mhî3!‚úÞÕìÆ‚ãÏr·y²Ë6ñRNÛøî\‰gåR¤LÃLðÖÓ'w¿°¿—ö®?³r¸‰O]³cEÂ1‚q“gSH " ׌»r-yB—Ùì8b)÷$­¶ƒ‚â¶*—扆ÄfësU€ÆH…eN$NÒÙ¥’æ§×æ]„$áõ§†ÁÎú/jMn(.©ÞåÛÇá?µ#è}5¹B_´ÒøªÿœalUEºV¤gtj!ª³Q3ÊoÁÇWPÈCªb}—ñNÜnã)°Wá["^`¡:y»¦|ÑöX˜%Ó¯u!$Ùl–íÏ­‰£FWªérh¼ü ðçUZ¨ Ñ*"ôšIr’O¾8_U‡ŽV5ÌàÚ·Ÿ‡_ä]—‡×ˆx©?gJ•XÇÔ‰‘pŽ 7Mõ£†ú\‚¬ñF…6§ó€we_¬'x{Ó b`…¹5g¼>´ZUf_`ê&²¤ wñf|g¾ºKˆV@!dåá@”óP¾–½J¸Ѱ†ßXX=ª=[O35uÿsÿÛ¨•+†¡‰aÿa$]¼uÁ¾åRC(]wôbæÁ×k“n[¿ÎDÆÿ§®0¬‰O»}w'ù=&1p .=҆켺ßòÒ8kõ,…d2õÉ/øŽàçŽG[ŽCõ””‡™ ’N0gsæïVÄä^•ÓtŸ—s ,D†ƒŸƒe(ÏwQfä>º¶^P½£&¨é[;d A§vîŽá°¿³v”v»îØ04d1Õ>鈠Ÿe‹í=®¿¾åáÃmb]‘5×éëcšsf °¬±ˆ¾¾²<çÿ(gbÿ1–þQŸ …)ÙQßQ6T ôî¬UýÇOAq(­‹O5ÆT˜sÍðïØûôT#‘LõÊe…†)¨÷á(éq®Ÿn‚ $2áHv;KAÁZê %ƒ×xQùÁ'gtà±Åç%Ý_dpcYüìl4ЍNùéR[ë<6‚¡OÞáÀT¸¯ŽÔNȇ'®ªØ€ðZœ;Řª²YÙ݋󞄂ä¿ç1éw´›ÂÑ"u—bÀƒC²†¾áÓózæç¼¿4zM§=YŽÞ}°,n•ü¤­SÆïîQ?Ȩ0O ÿ¾‡Ì‰ÛÝahññ=H{SíŽêeâfŒèWåøÞµ´BpgpóÔã6ô³µ¬«Ç,¼~¥Ó­õ!^«ºü±‡Ùhõ#$-'E000õsP[û´äÞÊ9Z—©®w òbLå„íÌiV1–a`²¿·¯±@À¤z€_øÛõÙUˆÏ>´¦a m\W€A.`ÔÛ©²yΉªM@’­:ßü{‹.‹;dÇð“hQÀ¼Stúy .oU-ÉÉeÊxá<Œ|ãqÃÁù*‹»ñîH‰ÎÕ@œèÒ’”„ñ²6yFíJ¦ù§±ºrBû/7<×k›w:?Çô¡Ï3Ô¦%»³äYüràƒõp ¯‘'išl‘sÏrð/ÜÚt]§Æ„‹;ˆÖði@¢É¹È,ô^ ½% NFÞG9\ÌN0üt§öõ>qñ»z¼ÁÚ€±3S~½ýÐkä ~Ëk8 {kÒ…ç ’Hóz8çz ëgmÞEÄ•§ˆë #GíCm´ 7Ì9CêªM½+‰Â6¼³Âü‹‘ÞE«Úý4‹“Wˆ-qßá~z@/ùÔí½&NËD {B3¬ˆŠ§#bìyß#Sj©]j~£/Á”?uuд{ÙçßterþµåÙ±­¨_û®..†Ó7—¡xav0ïò¹)ž>é|Ü©XÏ÷¡f :ìð(@<{9ýðù»„×ó!Єjä\>Ì ˜EsŽXŒÏЋ —~ŸnÛ•ç¸.Z•¦²T'ãGešÃ}v€Ù(¨ºÎQ¸€*,lûÖ;Örr¦îb@³'÷#r\·!+*kÆùNY/V%“¦#(ózò†Õ–päÈyrê|ÑA!a½áü†þƒË9ütºÂ˜©Ž–îÜÓ7óAÚÊGa+b~‰6ÉâñLú¼²Â["æ$fl‰Ûï>ÕÊ,Œó2y•ÃKGïö¦ž}}ãF{^ÖÏPº¨MêMãG! Ÿ‰Ü–­A‹÷”Ž÷ ¿ /ÒÕ™¨çó“nk„ÇyXHÒDâô,Ͷ!µÂÜüo·Ñp˜”e­ !ËÆ™P M#{—@ö݇œƒ˜T:g?ç•ÏZïTÛj3B\ñá^dzymÂ᫜ð‚ã;¢&¹_àÉèZÂä)×\ëÀD)îÈ9bÒ³ˆ>ÞúÔ;ƒ½H,yzŒžº“ëåÕ9d{h«¶?Q½%XÖœµÌßß›ÓÜ&¨òf¤«Rž¿ßåäÒÞ`ŒËè%/WëCìýµ1b…QŸE # ^>ÞÙ²ð_¿Çô­yÊ-VtzFV¸¨Ðº9yx­ˆ­Êa‘{$ߡǺ"L‹ÁkEÇÑérm÷6GŸüà–)ÐZE|¦o ú¬­£”©’sèj¤1ÏÜØ@Úib6±‘»Ö¢°Mòw/ŒÓŽñÔÓáKô?‡qòIØÂP`Ʊ(ˆ®Â˜Ý }ñ>¥¹¯ëBq‰:[wHó·½îäú¢žÏ”UˆiÀ{1¢WYY!_ãÑÁý§ÅȳâIQ´ƒ©Cê]ù÷ÁÛß7*x›ŽæžÛÏg>«­N~??ˆw6ñ±…^Ôm-ß×Ã1E‡5=z…`RE]…‡(kwZ85á]³sÂF¤}ÈÏípÈ#f™+_'kóÎÖ«Q¦¼:ü«tÕš¾~ˆ>°óŠD)4¡þyEÞ#VšPY_WÚðe?Î<=x7Žå7Íó7ä>ásÅÅùEõêt*æ÷xÜ_`¶[÷[׳cÖ´¹Ÿ‹ÀaˆQ5ø)ȯ:³_³ª¯âÆqÝŸ!ÒΣ}è8ÆË´hœúÊ—ªß˵‡Êd#³œAwņ0Y£6êœÅµ`±üôæŠ$˜|2§¯(ü†”#kK:EõbEB~Ü.0¿<ãˆÇŠ ù¨èÝ4˜”QunxÈû‘lÛ¿µQÆœKëSö{ƒ¾ªwSVun¹.~£qCßà]˜éRsÖxSïçáýÈ0öTCŒM¢c,ýÂvѰkà$ï¡m®&­@UhOn E¼]À k½l¡ÙfýtBn›engÉbøD\Ô®–3½S!÷ÑŸC¨À/yFC)‹¿ ZÔÜ ×ˆ×Z$¬5¤pãf³1$–¤Û~I´ø†€#]œ¿]ŽÉáw~ÒÜ乊1ý¢ÛÀbtR2â–>Gæ{—¹þ“dvz[>kèöãoz™ù)ÿÛéK‘dÞí@î…C'*{ïP ©íæöô] ‘·¡×¡nÄØÍ\Ø{3]ñš.Ú™ hÈÊFLK8®óYkžåºñh wQLM8iÀ}e«ñ`¬|‹™ÌxIbæ¿ø0¾¥x²>€Iέµ© êµ:¤ø9>ñå?¹«rù1ûj0¥wz®Ù´ÒR9 ™=ÂêИ\ÍvZ®ŠÖŽêüôMô,‘sIé_ù83·BîŒÞûºä×Lùð ÑÞû®Póel’h.ù™e÷·¤ÞV5•n¿,u«”õjȪÐFo=¹p˜E~,A bÈÍà"'N§=Œ8=ìkú4ü`:úÞ ÿ÷£Kƒ?Ù„X¸®éžÒ •^ÐëÙ ùêÀ6>’\¾r<ѯ×Wº=)fgE˜ë‘€j5‡¤ßõ¡Üø Ý~ísÛóìoÉy¹^T¨É)ÚFªd bˆòç6ÄY‚K+˜á¸æ-54E-cTЫ:3Õ–c8Gik÷"! &ó A‹~ÃýO& Ï rÁÊßßk³3Â8”Å’>#â+R<s‡ÐtiòÍXü&–Ó>âã¶aòæ .Zúã—Lú:EeÎßåÇt´bÇ (÷í ¢ò³ângvt ògJ–¯6EÓ®‡[Ê•¬"@ð͇ùª›0 endstream endobj 591 0 obj << /Length1 1608 /Length2 10974 /Length3 0 /Length 11803 /Filter /FlateDecode >> stream xÚ­veTœÝ’5Np·BãÜ=¸»;èÆÝÝàîîî$HNp'Hpwýxß;3wÖýæ×ÌýÑk=§ªÎ®]µëÔjJR%Ua1XÂÎÖ™…‘™¨`acìâ¤jd+Ç bg ¾9))EÁFÎv¶bFÎ`^ &›YY,<<<ˆ”@Q;{G 3sg ºŠ&-ý?-…=þÓó~ÓÉÂÌHõþá ¶¶³·Û:¿Cü¯/ª‚Á@gs0ÐÔ UTÒ–VÒH*¨%Á¶`G#k ’‹±µ… PÎÂl릚Ú9­ÿqšØÙ‚,þ*͉ñKØ ht²›X¼_»›€íÿrÑíÁŽ6NNïß@ ' ™£‘­ó{œí€¶&Ö. ¿¼ÛMíþ&dïh÷aóî{S²srv2q´°w¾gU“øOgs#ç¿r;Y¼»v¦ï‘ ;—¿JúÛ÷óîu6²°u:ƒÝÿÊe ‚,œì­<Þs¿ƒÙ;ZüMÃÅÉÂÖìŸ èŽ`3#G5ØÉéæû¯îü³Nà«ÞÈÞÞÚãïÛvGý g'°µ)#" ë{Nç÷Üf¶ˆL Š´­©…ùv‹ýú\ÁŽ7ˆæ¯™¡}'a²³µö‚À¦ˆL vÎï)4ÿ;•ÿ}"ÿ$þ·üo‘÷ÿ&î¿jôßñÿõ=ÿ+´„‹µµ‚‘ÍûücÁß7ŒPø×Žùÿbl,¬=þ‡è Ôÿƒáÿ"ílôÞa[³w)˜™ÿa´p’°pƒ”,œM̦FÖï=úÛ®n ;Z[؂ߵü»@Žñ©™[˜XÙþÕtNž¿]`[п2—çoÞLR:" :tÿºMÿŽRzWÝYÍÃþØÔ!oú¯Ã_""vî@/.6 3×ûccfò°óøüùþbùçYÞÈÙѨû^43ËߥÿÇïŸ'ý·5±ý5'ªÎF¶ ÷Ñú/Ã_nGÇwEÿ~íï%ÿçùï!ƒÝÁ&ˆKóv&|Á–i™éÎux¹Ccbºý½,ÐC!ö¥jEþ5v=~iá›<•_žkC›&x_Û=æí_vd>íþèŵ¦îIŸæùÓö`¬QurÑí2”¢¤i~õ:›•Û€ÑádÖØÝSV1(y†#žèdsüpvGëOîZàMqkêk’Ú‹Ó…ÞYWxxD•¸wK=02<4ØsÛ·CH—‹@Ég„ç›|HšäìñÅñºÑäÅ¡†7;1dœÔ¤ÿãC-R/Ì®0¡±ù©~šÛF¤I˲ï¬èÀ ëq½¾K mæíˆø6ÃN™“äk9ÀšÎF¾ÿŒDäŠ`¦®U#‰DðÜᥗvoó*ŸsÎa§¯9%ˆÄ€&–mn§wï…4®¾æ“׿•õwm`jÆ~ùh]$:·W}`Wê*#â”Tžƒû”6üT7¤2'T¿† ž9ëê2C4³%ž7c†ÌÂY2hwÂù‚ö–ù?¨MÊ:»gc´þD< Q˜€Bªû5‰7ê±$áÒ¯ç]bFŸŒ¥`†Òž”!l‡#zA€MzÉÊ %f¨s-åp:ŸlÃ+ðÀ¾ 5K¸pzYÅkÊtñÓ$´lÇ«ØÀ.bEùúkƒ—9y$PÅå&¹ÿ+Iä—æZÁð*lg•n· ãœ"6 ynýçå`Íâc©ŸzE¿îSêÊù,ÊatW)›î Ñh˜½‡nߘŠò,#m޾vÈÕMs.Ãk VöýèÀ^"a’ˆäLµŽÀà±Bš-å>&Å=T~G'!×þv;t‰3¨¥Æö®|ÔCÀ(PÒÅÞäMxðy«áP+Ìmy1‰Ï ߪÏú ®£Ë»ç~³ž&ûŠÀÛ¸ˆƒÊ">ò…p¦˜¥ŒÀÇ/Òš%Ð?ßOÀòüÐF¤ü v¦jǸ2<ýwB.Jàǵú˜´°QßÞÍoËìcS"‘Ü"Ix]»g²Gw· '?Ã,¦`fDNÈ„ZY¥6¥â_gl%™jÆûàc¶Ÿj­g\š¨:2 w‹y¡#i‹ò &äþôõ! o™ê\q‡Ïáœw íó<Ë-e*UÕ\+ÆõåGYQL0½:³èŸÈ4Šïˆ'"RKJ©p­m³U\ë½"IÐ6ŒêíþUeć+bãHBH+‘ìØ½2#U_ÝaÐé‡\‰`‹%ÇÙð<6Õ€® Ú€Éùr7¿ioŠ[jfSÊË\hýJÆòT¼õj‘ü‰ ±OY|pò£¬Ù§ÑMäl¾Õ?eêÙâiügvŠýŠˆ¼NámT,¸¨º¿fQpx,éu« e4µ”00¥Ê¢ÜC \/ÅìW¬°ÛŸ$aDÔ´„\Ÿ3dæ;·8e§‡³H0ðâÖœç9TààJºR£Àc-û]/±+5T‡ÆÛ6Ðxê tÃOð<¬ê ßÅ¡¡o ¬Üy“S“¸ŸùÐÉs|sG¸ªÈ0ZŸÙZ7n;þ-´2½µñý bÔW›\†JˆsÒK¢69×WS8dÏ’÷ã Iz›´eîd–4ë i2ñ,ë“ $<Ð 5W¹õKà™‚ãÌåQ'ÄqïV9ÙüúÜÀy©í™ -Ž#za‘¥ 3†"4]í"ÐS[¢‚i¤G=E­y$èc¥UÿEÙ8µÇƒFÚ¥ÕÆïÒ±Éê…=sQPÙ„ƒ¦"ƒ™ Ï̹OѨ†ìpƒ€ƒ¶.ñb^ ƒU¯Ø+ÒÌašxl~Td}-ˆûÀâsOb–wÎ ^˜EtLܤÖbìÄÍósf”¾Æ®‹«ùV¾Yû=˜~Ò¢ñÉ“± ÅÓÁúÕàÔtÓë”×âÑ‹?NñÊ‘âƒW˜s Pl”V`1Onmu¼ |¾¨¬CpS„´h=ï¦öƒ,µo¯Ý‘8çÙžÇУ­®sÊ ­Ï”ƒvÊé£f¸ÇîÃÛ¢¤9Е¶ƒûŠú9XáôáI<‚v,†(-JÊ6kU¢L~¿>ªèb˜ÿ>’¾X´•ñjºÛÕº7êë–°qùxú´Ù‹ÞÊ ß÷Ü|¹J$Æø3OZ•Α@æíäƒjLêzßo`8÷/ÂñÆŠi^ÌôîÄÆ‹rÇ^E ?Øî%Ú–áô#Êíƒ0ö¼Ÿ2ò ;?Uƒ†Ž¾Z‹‡“EL~RITluUäÐ8<ê !ß…ð º-üUr„æ×ÅÏŠòGÝY§Iký<¿H„@Ù…í?›Ô6~Ü ZÀü”ŒróBôrÕV7h™‡YQ§-HÖo`[>³nßÖ™86¾/<ÓNÞTŠì=öÒ7±ûkèV¨’ÇaK€úñX†0;NÌl`Ðiè X¬ˆFí»­V¢ë.NMÐiTÉÐí¾Ú€„³Õkìïa ø³!G£iÚk[fþ€³©Œ•3ùûÓH›„¥~aŒSB/6MUœ²4sù²tgtÇLéA°rVt{B·þ’á*r´îåŸ©Ž³‰Øßà]//ë¯ñ[>múqGøáxðb+ñÖ¥Ûª] +¹ù³@¬jýÏÏ®”9”¡ˆÒÓ0áš+ÁüÆã:Øþˆm΂Ëcr†ç Ñ«['w¶T£È%3y´:üýް#ÒŠ†¤÷M­¹™‘:ã¦p=÷ôšVÝ4Æb[­=MqR)U!Ò-åWkcˆΆ.Ö’.Vë)” P“\ï )­¾·3x^štõODÿñ¤§B}ÿ·;žExHJL×\ͳÂàì8-æ4ú·»?”€úÞ¦ ËPþwø|ÌL7´%ñÚФ%u6o!‰1A¥C_>Ôˆ7¤eçÁ¨S2³œ0”\TÛuÔ†@ëJâŒáPŽEûøQвr~Æé(å]×߬ÀÓâ9bÝ…~¾„ê­~ ÚþFßì@Ÿ´|Ág ÎF3âo$Øwÿ„HÐX‚I-¢x³«vTH§¾®[#*%ø€»í‰™æ‡~÷£÷˜äm IðÖ’ëÞ®\LYM^*õ/6ÃPSº_øTh],Ò¡~ñYã Ч#ÈX•=iØãlÈã¾¹ë"¿ñË¥d5túü=—Q÷Jp £AË[~ÛûRd{C|W¤R5o½è °Ò„"òÔÏö•»UéœÖ2i“r¦øŒNŽ¢U+I8%P­-3|¹OÊRi8:@¤Hâk0¥îsYšÊm’A˜MÜÔ)7eß`­cxsÀVq¹¾=­WLù5é«´„hŸÐÂ8>¦W{š‡7ÁÑŽÕ/ý€‹øË_ U”†\µ ˆðÕs£ZØÝ&AÅî'rF8¨ïÈ(Ýçu¥óbJe)àP[ð“µLœ™åq¢Z‰v0çôº/ÎNj¢ØQªe¼³Ãä•ã+QßNY»˜LZ:ŸF¾ÍòÃ9ˆvAANï³û57ÖOõ·Âf’fªˆ¾ß)½ÎOzl7²ÁÆŠäNÝô”pbæl®çÅnËÓOéЃ§¹ªÃì²OÕ 18ÖüŽ>_Nõ7O‰ÎJw*xU9«™Áú¸Œ»_•föa >cP“Q4ð›ç2zçÁ£×È‹c·%D§ö—º'ƒPÄ»Bëom¶^(êüÙÿ Šñ_|?Å»ü3¼E\LáNäé’›½«S-ÜCýyP?Aä£ò øCNûʼmˆæÈÐ㛨YÄùÐÇí«ÃM‚ÆeÅß?#*AƒxA°ÚÂ$ñ{íÚê¦bw¦´°Ó£xk®žØe6dFaì•1à|  #ÀÙ÷™¯hîùØó“‰!·½tÞwmÒXó‘‚XÙ0ڳхýRøUÓÇ9De*&Wü„ð/å6±$o¡æÅaeA€áÓo8o *…ÓºJ´Æe@0ð ,óé* _¤â›Ä_)ßN‹„a Mî”V!ËH5"=Y^NžY¤?däåïËkJÌå}”Œ¢9i`»îk/Õv¨¬hfóJÏ¡Ej‚™G÷PaÙ~Í܃-Ò%µ÷˜Ñ ^Ûq(¿ÂYf"l>Šì·í”«¼³Ø?™Ó'Ûð;ZF¯KQàfôfyȵâˆe¸žÈU>€›±ðØÌ¢Oâ$©=¥&cøÎKíµZøcÐþæ^2la…µ¤FG3!Më˜nK£J°tÿÕY/üÚ– #¢ÉÐÍÃ-†6õ¨ì3L•u•'°% 'ðÈ8*y–^~e¬›Êuóö(Ú©_… ؇J!•ÐÃ]Ô<=ôFPÏJe¢ ù.¡Ë¯NœAñ`FšJý ý6Y&^ÇP†Xž>޲îÇÊñél)µštPƒË†ôÉÞ†ŠÀ4ÐQž³„}µ¤†£Üˆì€¹ã¥Cêã^ŽÀZêlI¢c2ï·"À}Ý4Mà€mÃ|Á¬ÂôúF©¦"Ÿ AqEÖ#49 ¿e"3Yñ‹íå^­àä§ѯG ëË…úä}Y†ü›1‚å57ìa‰B‘zk¶CÜòô¤ƒS‹~5KtúGv«±ÑNT¯Ê^aA³@˜"º Q ‚vJãLêøRÖF™^‹·îåó8ü'P?C–h꺔¢èv ‰Èî‚AÁñ’U4["/ññò`ü6Ì/…5ô€™å‡ÒÜêòbI„Ð!˜àðŒue,âußk×;ÛFƒ ùg¥GôYþó×Ýò}b±«i’|­–ŸTzeã¯üØJ¢àÆXÊ5w&¾Ëk±X RSî)~«Ì̓”Šª²´M$¡ÅÈo:Õ`´rKN÷÷]ÿAóu¯´¼³tC­(•þ~©zþÜ(EGÕ¤w¹ïƒS¸ÿ+[éGÍÚÁ0ŽV&æI—„ÌMçÜs-ŒJŽ›È`5ÆŒä£}™ÃYé›g$Mh!F(û.Á³Çn@–6kbÙãW9ŠŽ%&Ýbó¦­IÈÍ+Ÿ¼aË•œé£>¼¤<ÐÿzŽ0VEL㲪¦—¨8ÔŒ€¨;,ïÿt–Ÿö¦É3n~™$±¼#ò0›ñû§jöÌžgí\xìIUE¡ñâbI# _GŒ³ÑëkZ M±Ý‚ŽŒceŸx,Ð ~ rVÒ†œsÊEan±Z³¤¤K„~·+™`/0_ûæÝÏ_âV²âF¯o§•Ǫ±&XbúÖù‘|Ôý[5­Šïn1мÉqÎÐÔŒµÅ¡ÕµéúBW:<-*Ââ ±¿èçhç³Ò‘CâÔ¬¾‰évTÆ›¢ÌÎTPpx­êK;Š×NpOá" Õ¥¸‹Q ²m:®bÑÁxÔJSy²µ—„JygG6Y”ÜAû'j—Gxa¾\ÞgëºX‹¢SÇ¡&Aw61T4Ü5Ý1ËJoî$mÜ7™ÎÖ(Raþ娾‘7\äê ·çÓב6Ì(¿ûN׃âl_F7 ï²ƒ9$:Ì൜#®þL; Òëþ8)'Ü­/®WRL«¦‰,’ÆÐÙsZ¨öüWˆ;&øŠzòáØÚŒ§Ù¡ä"2‘]Ÿ"*}?ªÉ¥èÉž¶`“?7DQ•«B9˜ÚY7èO¨¾õ¾=¡Lä©NWãnH!Èî0uk.¢FR;øÄbõÌw>Ú+D²€=å²2 Ò×Y#ëe)ÀÃ.q ) "‰Ö¾H˜§EP»]®V$;ñlâFŽ4µ:¦Þæ@˜½ðдfl%uP£óS{åŠ Föð…†»^ÿ .x!qC§š8D ï ‡  õi<9Ót™9«XÚ1EðÒiÙã­˜»´SI7¼¯™öZz€tºÈLÓ}–›Û)ÊØ LWSdAÓ6écÿSV=GÅÃH¡Œ2¸ÇÁBI0Pôo¨Zí™q_J4ù¬—úJ(ÓéÍÍY— ÎyâŽo?õTªç–?j [}q—åro[ë½cš*&¶Ï½ÎK·îÖG•®™¦À™¿¢oGRÜGô»=é‘­_´ë6Ô~ ºq@zjM…D 7ýÂ`›>õÃ|‹TÙGÍrˆuŒíˆžþT¿Ø¯‹5õ˜¯6 רÕTºV‡4×ý«WúДN‚„g"Øà‚P|õíNŒÚZ Qâ'(kuü?êË먴Ç{R{9ArÿÉXøð­Œ:~òžÜóO‚R‘¢¯ÐÇÅÜ”ãäD¯‹îº$åùµŸik êË”ü_½ïÿë8ÒN1óes¥Ë2œôü?PHgŒ^­ÿ:¨|Ä+ÁÜQbËB#à3ÁØä©¼à+|Ò´–乨fe”–E¸Õ¹±‰.<Œ‰F°ÆwË%õôcéÄŽýþâþ$´ëi‘ÝXÇBû™* +ýdBOx/¼JµVíøí7b„Ë‹Æ=Û-bhoÖsá¾_‹ïA3*‹Êx–eîy$;ŽŽyà<çìA޾'•¸Ç<.¼iÖ‚]%B˜÷›5=PA¹µœz&Yfn²‡Wš‰Éúó\YÿtH’dt‰èÕÑ o—ócˆþG)´ÍN‚UAÇÕŸŸbµó&…=Ï®œ¹ðc¥'áÙMõ´î¥_ˆ°$Ì¿Cx°lé£hSÔþQKÐïÄWoM†0,âŸËn®ÆIE…&Áéȹ5u°KÄLL6‡üLl?kv"ŠI8Ø¿ò¶Ï,‚K­võ×ù²{t\Sò8 µ3X ù¾Ú? Î?qýd€ÌgrdYZ9”†jN®¤ÒFäŸ7_°„oò¦a´ƒö)JGÒe‹#ÇéæùŠ., E….Búz/;ž ¼åë—è?ÎÆ³¿ ›í-´V1¬V{+âUèŒ:_o{€!Ò Zê\ ¼ü$jm¿„X¤ÖwÔ<.\0!;IJ‰K›=ωôæFÿfĉ¨w»= 2Ô +Ú°ÕFmòJ½›%å±r­‹r;àÿõýëFÓT©âýgÄ(é­âL(¡#l+Äð9R{&ð“«îðqÉ6o9'MIs¸7Þuºtf´U”"°ê±EO-„‘€DdH¸š±´!õ;ìS•ŽIîÂk¬HÚÿ©µú§kÈK—sÒ[¿É ˆ!Y‰¯É7]bŒqׯqÉÍ,Ïòø>Ú»©/¡#‹Éý¬ Žô£œìgÞ*š;б€)”g“ØOÉøÛøm½6&1P&ÅJ1ó/^pØ”r›´A¶ùA-$SÔ¼Bt.B~ˆ\#.7‹½iPƒp¹2^ñ„)ƒa8Î4ŒWçF]œÞ9{Gî©@Y–ÀbÿvhIZ­/g½ò|îù|Ê`n¬V‘«;‚ð>Ôii˜Rà¼Tr²týXQª"êE³î¤Q—&hÖ+7†Þ¡îoã&r~+4²} ºµ„UÍÑdo*X.Þ{ ô#À‰Ý¾{SÕ"挵fµ¥Ïú©¢E@r‚|OÞš›…ë?9byˆ¦ÉvÈ튀\±?yÐFµ;¥hHëoP=Zèm¶hÓJŠ›2EÖ«ñˆÂa¯{‡ó~˜0°àf¢Þ•0”X³t£g²xnz(‰¯ tŒÒ¬cÄ¿Îä¯(›Ow»Ž6%Zece6ç8hгhÉØØÄÛG`5¨=ÑꮣùӬܩ¢jeTVvÎí3®‰AÇ Ýþ!‹õÕð#Á®¤cè‘vkÏÏ6­ÝxJ‹3ÃÉÖ‹ôè4ÕwFörm\ZRÞa'‡üCçaô4è±¾7=nÈH%ؤ™_ï…ÆÎŽYg6R­ŸIÏi)­à4%ºÃx!ÕW6¬ö=Ó„=º «#fÓ@aeŽÃO¹2Ûºo J!Îõ^¢R•œ¶“›Ú²1l­W«¼Ö?Øî§"ñ1ôï#F O Ì#Ã%@שޅˆ„ôy“4w$Ò!fŒÆ$Î*sw“ø! lò·0¢…B>Ë{4“³#ÁD1b~¡ÄA”T8ÌÙk†+…ÆÝ°òKÁ*HnßÿÒJã($À}|Žàðåt¸œ¾ð[Ȉt‹j+òÃjׇ΢Xs.:çî3°‡OLñ§ÛMß “#À» Ëå5'6rÀnH†ËÔ5&Gó„öà§pzWFÃØ”Ë'ìŸáòu __c…ð”'ŒD?õhì‡~Ì÷43”aŒzbã¹C›tÔ‹xhd¸-,¥„îT¡R¥‘¬´ËHZ¥ªöû[ô§~ŽŒƒ3h°5Ê8ƒ/М¹SO®™)RÔòÙŠ•ç=”SUG­Ú9º#*0:Û*ù;°L³i¯¿M¥~Þ—ƒšk»C"¶`¤÷eQnä-(¶œSàm/ÂÝL8T¨3¶ÙÝYˆƒhʯþ°ÿL@ÛœŽ4ÊåË ‘©ón8ÖB?Ï9ß‹ó¡w±`J[Ré*8´dT›/ ¤àiæÞCãÃÒyÉúªÄd~Ö’ œ%ìAì{´âêV§tà7ºÈab*’QYÅ/<± J±{Rõ$Ó˜ä­èÝýBŒÌàåyB/oß­P³Ï@k ½W¦J¹?¦d i=ö²—Øa6Ø“x{ F˜Ãƒi7ìÂA£rnÔJÌÊDsrv+¦1Z¡Æ#°°@jë71“ÈiíI’ôÊGÌŽü!šsAŠáSÊÛ‡6æ¹uODʘ”£¿ÁbB™X)9«\抙0òþæ”Jt¢˜ž¦²«Õ py|°ú•âÄRnca>ç oáÑ@¬³`ɉÒÅ´’§$¡¦R sU}äY¢ÄïL^ m@qîõÜ£9ĆqĦÂΡç]°Û⎩,ˆ¨uÃaGò“&vñ˜m¾Òž]ô(ÒÅ-âS35íVrÜY–¾M „É0¦ Éä´y"Ï[,›Ô+ѧ&#åøòÇdK¥¢¤¢†f"U»`ã¦ìþ«ædc²ËzÄþ€bV4ËŽɺÓ¼¯4ôkd¿ ÙU&Ÿ¬)°ñvo¾}=°=ƒœÖ«+eÉlw°òvf¸5˜ÁÁôö¼#ì†C4ÃT±»:3@Â3íú 2üF¤» Ž%§ ƒtÿfjç=ê6ýˆdí[:t•¡‚…ÛáÉ3­ù¨\ò‚5Áª5h ž^•s£±g<ÅëEéqŠ fQL„ò·ÙZÞÃeí!q_:¯¸­%«0I•ªt–ú‰ëÍÄ+\žvÉ—·<8ä¶–]_C5Z«¥PpÂ×Z¦;þæã,óg‚ïù9©áMt^/—ô¸ÿ[$êëQ+æ«?[ðG~—c[:K¼9cS:ZÊä@ý•¼ìj†Ï¤èݸ©-1«mi,ºB¿«Kñ‹Ðâ ó?ZfÉK>&þ‰rý®Qáúæ¬5w õm‚=Áïr}ßo ý-ûµššîv ørÄÆÁ/RíºXÓÁ3Ï+u”0ßìRÚIoƒ¥‡¤‚|KÂ$¼-ÜÕQý/Ôþc¨(ßO„ª ÝÈÒÕ{ô_jWÉÓXÑ’Êy¨“CT^ÜêXw¼Ï)þí¥fŽge¦,wú‹Kóäì˜H¯û0Š[âD/õÓ3k8³Ü¦´2çgÞ¹*$™ºrää oEZ©²tg¸J†ø3Gþ†ð”iêUÉP.¨ú­­dæhnôþÆOI{ê#›J1œÂÅÝ?’~wÍ:7±1(}Í`2NV’PÖI›¹™«Ñ} òkÖ û±ÐæLfë­Û¯ÖQlJ}ëØ(N¦ÊRÖ=…™ê,½¸[Bߪ‘³j?”íDó]³¬ ®Û‰‘Qú­"¦ŠÄ† ©þRf„`q,ðoºULeþÔYyèB‚¡‹o`ð)Ns#0Uì¬3â¬k-=¤w»lN¥®7_þwFõyUîÒ3¾ÕßsøüÀšº‹Ð÷ùBÛÒ›ÔÎ@F6"Ø}?ûýÉ÷0L <œ4~Ã]…Û1»vÞo'cSÑTƒ˜§©j†0þðÈÉ|«£•ï;uUVŠ<…ãô[y8Q" *&JåÈQÜ ùæA1Zt¢ˆæÓ/ÃZjóâ‚Ù£/öZ'±è8®9-A‘2îâÄ‹_NäO‡x|ãO9Ú‘ð’y^gJ¶:8¶å`ŽN·ÇL¹<½CÍ-ì{Èô>ÔÓ…l³7±Ê(!÷),Ä–½Â^‡[r¤<£®e²ÇbßÕÆP±-3°D.‰Oõôd°xŠ~íHA³×ê={J={îùÀ÷̲"К9B‘Á»^Ò%¾b ûäÀB€8hµh˜f‘½Ž7µ&ði?ps°…°x©·1¦%¢iB'<ä—Xˆ'=4-³é~Üû`ZÕÙ{”Ç\~AÖ£¶¤àfè.D‘§¨ ÿÆ ‹:²ùçÜdÕiéùŒ#öÚx¢?#þ«…Ú,ÅbÜ“n“4™Â€±˜_²xêT¼ýÌ=®‹T$™¿GKje•MÒr¹7RS:Qõ¨"Ÿéìþ3øÐ,æ—Æ}EÍ»A®×>6]Ó¨%‰›œïÕ!צÀ`À×®!–=ÂBÛ@&!žaÀE]½N. Æå`*Ù kè†ùiÞò÷Ûœí±¤bLÝÒ8}"ã½À¾CÅ}à=a4a]ß ½e¸ešÌ<üò@>cvïÈ´ÉDØæÒþ8jÞ= P0Öæv7²ÏXòXho›VÛËÔžö>ÇÓFT+7Æ·š¬ßyI‰TêØì%L±~UEñ|Ùµ ‘[²~‡úìü!?dF{ôD#•ÖÞÐã Æ/r-œ¶\Žì꣫»¡9ðߎI`O%›S¶Aÿ~žðøs(Ý1!À áys‚Ë+þ{q]é“‹K†ÓLnjN µ‘$4‚x¢6 “":úHѧχ™íÅúå^ý¨'åè (ÉN4ÃSðE‰’Š’DT"æï$#I6p€¾ª,ÏÕ®ñK˜Ÿ¹Š² Þ}ߌš67¾S’ Òê‘W””£TãÞrBœÊ%eX @µcΘˆWé²_2äͱA@b°°ÜryÛq):0઼ÛíÃ(MÄ`q/«ÓÑÖC8 žMËXH5v“¾…e—+ïAqµÌè³ãÚ"Ö—¦‰¥îüQåk¯¦Ç1C飘<tLõYHynI%Ÿø Íxvg¢p›Ík‡Ä£ð‹O Òæ yÊ&Ò€<Æ ÖlQ)€ucG­ÂõiE¬#)6䞺žˆu¬ªþ%3øë‚oˆº?sÊÈJ0Íìã®.‚®„Ô)Eígꀅ#¢™áï/>Úc\¶çî')¾¢T§gÔMTFJF´º´Ù‘8ELÒßO¸I`Ió"lŸ^¦¦•zn©p‰¬”r4ìÈäšÐqoýÄÊ/x¸9 ¬Ò]L{‰›ÊÜ'ˆ³ºí/Ì ³jù$Ïì«qkÛº:š¥ß¨x¼ ¥ñã‘EÓdŽã'Ç% 6QIU +qó¢’(‡¿°¡änæAšUqSß<žç³ò0Z©Þ{9Ê Z±/éðÇ£bü¨Ìº…ÍéªÇÐáls‰scúæe/Cukq  µz›“Å­>†ƒNŠMïr#.ˆÂIïf 5È­2 <¬ 7мvÀ:!÷¥oóŸÒãyu²”dU>æMOâ3ÿí@bkOÁS&ÅD áÏÖˆlûeƒ…Bݹ H' Ÿ»h°`´z~ P>Ù@Ü\2SåËc¸vX*ÀEã¯PÕRÈR£~•e@;7O8€Œ WèÃYMjj’iyø:{ òF= ³f€‡Iö=¸õm1Ï|)÷dÐ\$øsP“…©ÎÇ8&k£ýÒ"b±U È3΢ÊpjŒÝáÒ ‰¤‰y:¬ÜÓ(ý‹–Ë7t»ÿM‡µ¢é´)ט©?½ú½wèbÝSª! ⱚá§Gá²Ä»$÷ÑP»:ÈÇÒ•6±Á—2漎óYOÑy ª_êJø)ñzncM@>xn¦æÎÈ G§!0óuª{h”I±RzX½ŠDZq@שéœõÇјʺ#3¾Ï„2ß™Ò2\7X¢˜êWD(È÷2†v‘´ë¹­n Δò·ðûà«¶jÝHêªd#27q·œQw–ž?Ihüê_ƒÍvÊ÷å6u½b+æ/7F¾Rï^MY‰3ô¢ÊapÙ窙×ÝøÔÃ*5s¿W×uŽ¡K¶ëØ+è8 §ÑB@nDk,ÊC+TA’Slù\~Jº´ø½ÑNpüqSPf®TÒdHýFÛPáM”Ë4ÁÿYÂXPÂ:ÕÁV¤‰ˆj0-BOç’bÖ?¸!Øe§aŠKœÎ°¸:Äúp5‘ñ0Àœ°ùT{í¡«ƒVàû¤ýÌP“ø¥S¤ð¡‡£ã“%¦á©˜É·‘+Ògß*‰)A`µ(¬»Ø§i¢Ê'l$Í19ˆëÝþ€´µ›‡úÐEè @ŒTMä£0i÷ÿM— endstream endobj 593 0 obj << /Length1 1625 /Length2 5933 /Length3 0 /Length 6756 /Filter /FlateDecode >> stream xÚ­TeX”í¶¦‘iº»CéV@@éža™!%%¤¤»K@:%¥i)é:$ÏèwöÞçúÎþuÎþ1s½Ïº×º×½âyX´uyä€P+2çàå—h‚­\`º–g<òP ÜÒ€DpYXœA–p0¢h IôA@€"È (Àe(@<œÁ¶vpûK}..îY~»¬<þ #a`[€ùá r€:9‚ p$Åÿ9PÀí@°  ¥m¨¦©`WÑ| PA@ÎÈ"´]¬ÀÖ€g`kâØ@ÖPü»4/’K°Àœ@Ö`dÈÝäôâ8œÁ0ò†l-!pdàPbíàü-i·þää Ez8"1$™6‡Y;ƒàdVmEå¿tÂí,á¿sÃÀHµAz¡Ö.¿Kúƒ!i(Ü à wøï\V  sr°ô@æF’99ƒÿÈp!¶ÿRÀ pÙZ:@0’Éý»;ÿªð?ª·trrðø ýãõO `8 ä`Ë+ ˆÌi Gæ¶Cpù~/‹Ä àÿËtqúæ rþÓ öß;Ãa „B<@ .Ÿ&ŽL `ÿ¿M™÷?7äÿÀˆÿ#þŒ÷ÿ7Ü¿Ïè\âÿï}þ;µ²‹ƒƒ¦¥#rþzdÈWxøýÎ~?4`ëÿbévðø7AwÔý%ô7×ß±¿¨å ¶È‰ðòòÿeÔÁî  6nm°±t@6ëý%rvC@È¡þé'2H@ào˜žØú5äw÷E%þ@ ðïÚ‘sú£œÏà•–¦Þ ®÷´þñÔF®\Ïà øoiúÏ¡À~óÈËCÝoyÄÄ~஬™|vÓ•'Æ7ê‹Å‰ni}'j„W¾5àY;Ð÷}(·(TîÏ"#Gy€î0!kþ1r 1G1H1g#×`Ÿ“¾‰ž4iPÙTŽ N£ø2_·†’7#€©ûJîåÅÚfu¨hô3"N?%;™…ðÜú”,2osaôPó™ËBõ#zÞiO*6¶°Á¼#ò"îzŠaÄŽ:iÃÁcªÃÅ¡·”°ÅG¤zíšfÌI–ð;ÿÌ•ŒC 8öi êÁŸ)-ÛQñµÕ[€ðI¾ŠƒZ¦Ì²ŠÅcòË@r!Û¼³ÚKkuô±/¾´h© )ùD$iêj*7£ƒoä]"~~9W1øpdßõÚ _»}S“M'î’únܧT“ñès(¤[cÖÆ³Ü›ý¦DɾAí½Kíø²Q: £§Ñ«X™µ<ͤ®ëËó%v¹Ní° ²L•r^†­âFwM‚(šŸäÓlÕºÂð\$ý–Êz¢ÂÇ—ÙÅÖƒ”z‹Þ ,™ ˜*¬œÆœnF~ r]Õ?Év|“á#xx¢<±æï PÝÖ¡”ˆxÊÃ@篿êi¼—(L‘ü.J[ßy ¿"¿6²²Ø•l#Jlqdhm ¹÷€Ïêñ%FdpÒöPA ‹ˆëõi½àr9ÔÁÈ/ã£/òöÎTÐ-Ÿ§WFæÖ÷¤‡öõÝ8»ž>ñÖaÓ+ìŽtÝ«õöÕŠÕnXtòëùìJIˆÙ:-_¨y¦ª*…Ömð‚ýIœmÌ(IׯÝw#;Ò´pŽ—Ì;¤ †VušT«Ì;“XËanV”{بW-¿T»$o `‚Ö¨åÖx4¾SžŠ.Ê<0*µªxáÝW·GX-ûŽ·×ÔÑÕ+Ÿñ o6ã×½-Æ÷Z¹ÒøãUù&Ÿû²Çσ;BŽWwû¨è#έÞva=[É®W äTòöfùÆ\"¸Ìv_/œe±IÑMñ¢^mP#—z².t,åË-mãõCù%~'"]¬Â¨“0±’>–§â`ÿªÝlF¨y;Tgý¹­Û,êÏ!6úäèž"?áÍŠXåN­Þ­6y( ¶÷·ö©(9d­ x®#+ã°K8p/FÑ—o \¸d–ÛI“—aÜ£³ÄUqFA|t¼¾,vè·×»áEE3Ëò"º»Ìe¯Ï`ézÅÚΫ ÓèÚ€§C²g £‡ŠÓí%«ò›>Œ:oǽHÆl§Üs …J¼°éYEgØß28}k.ïdލ¨73%23ÓBÅr@± +¾ ªÀìþÛØ £¨®~rGy4©å=™ÎñÜŒQP¬ ·M.|…Ó-üiBz–¡UÇ_>SoûRaiýjÝvFqÛ|»s„HY?‰ªmå›ÿÉWEÞÔ[¹ºË·¢ñ{;SpÏçù#ó!û×BYÅ=Ÿìæsg²Ën~(ÖY6‘ZñŠÂ¿C®h½†›+ϧݫ×Ñf scÈ~Žq¿<~eÒ¬ðãÃluáéªu£6×çŸe.ÕƒrÄçš T5Ûãb´¯êöö:ù?Dì0Á— ‚RÔ´›y Qž¨]¹c¦‰¸çŒ;zœÃcŠ#* ã<–rU*ŠíÍ»Ì|ó%ãÓÔ/ítW9eÅ ¿™lîl‘gç|û¾®šøq@TÇ€Õp-\)WS—¯T~õËúŠ TŒ¿z—1Ê)GˆQøA¤›”$+Ë(Ëç^“ûÂ&·Š–è8¸¹´|ü*G„~Âä––ãXK±-ÜG.YÚç>ÙÈzߢ«üàáËÏ¡A^äcÁ<¹3ãܼ­ ¬ŠÁÖ×4–ëÒGml/™ÕW{2€DnâÁÙêsçǨ[^Å%RiààwMÖçìÝS-åíîæqPZä˜ur~¹Öçû£ÒøŽNHÑ‘‰!Ê—g§Ã ,ñU Æ'7½Ñ9Ðó¸óç…pIœŠ½‚?¸jmDк%›hÿ[û]—§?éAšÄâ¦t´tˆe“ƒ¦Á\vìHkÑ,Uegio‚`ó-BJôÙqY±Rõ¢îqŸf«ÒÝœµ&Û8jCLÕɉ½½%nƒö ø*>Z‹—Å«™Me»©?‚bÉ5’ÎùJùxé9Ùkó¡å÷£­žá§åíUæPY¶Ó™ÐW·Ý#ð–L%„Ý“c]Ñ1Ï®Ú Åå<5’}Šž“0ý÷{ç?·ìID-?ÏÅ(L);æ›mvŒŸ‡ÞØQÞÞ(`ðvÅœ[°Zèâ^ŸphN?AaÊÍ »‘Ý*×Å^q3öoǬ«žÌ¤Ô ½dÃxï²KÖ€šzfšl.ÄL]ÖûábþâÇŸ)êúà¦áp{êœËÐÇ@o®ƒßîN<úÂ@´Œ¥éÈꎾ¸±‚«DÅUŒÌlåƒÇª”ðÇàÊA‰º›FÂc}¾4ñ›[&ÕiÆØa3æ$‚›eÜVq­¶ö+òŽÍß/ZICÐòó”C×É@>=b«v)šSldc !tP±o¶Yê2Z žÓMVdÔŠ¥àhR¡ôj1ƒÆYsŸ)ÆF¬O&Á„;  Sy‹Ý~w²þ$ãj+ì ÎÛ ×g¦¤l¬v4Õ+~qƒÀ›;VH/cŸ4D$4ÝϺq{8| ®J0Aq/üNLⱑÑäòÞðç«Ëæ¿<„Ÿ¾V$|¥›<—Ù2CEz™-ÕÉ-cpî9!±ût„Ö©tÝj”û b­yõ@tÞdKéÀhÒ£¨Ÿ„˜LÔÒÝ}v9"ÔÍ6…pp~#ù»Å½K¥ãnÞÌÒH³ñIDûÎ^¦>¾¢8§Oª¥Ãß?ÇÛmzÖ¸õ~!§h ;Æ>‚vx¯y<ŽªSÿœû¦Tœ2Ùqæ%ýò*n¡ç¥d÷ùæºQUAß& I|И&?õ¼+T©!7Ѓ3»@AëœonAéjœ„2o¼ƒ¦ºWwäÐX½`iÄ »??LÚ¸^Aç;óç4žÜಠ:ÿ†uÈ\zc¦¥Àh5] åäpÒåE*_¹{òé²0Ìž8DaI­_ƒZ¿¿¾SsÃlfòQ9šáš‚Bõ$h$æÅ!§úVqÂ3ãàCϵ1EUÓI'µ™ý³ Ô&,ƈ_,zÏ£SŒ(aàöÒ•,)‹ˆþœ2Ørý¢ÝÍåó3ÃLGÞ(u\æî–Äœ0=FÖÓ«‰Vq_¼6`ªÙÍÛcÑþ½•rÔ'&c94J?âת}Vó-˜ºÉn­ó¤°À°-ë}n;5dó½W9˜ÉÛölsþ½z÷Û]ÍÀ÷hÑÛ’u¬ÉX®u&Dò¯­ðŽCqáXÃf»1^a}f¤U÷ŠYj´ô¦¡fF…e=«ü§øGV¦ƒ,ÏÈ£µÞ‚Ÿ6Óªg#ˆ…Óö¸Ñ(Ø3ýk [±Ý>5Å} ™«¿F{[–fóÅ;P÷GD$©Ë²“ú·ô—cÅL¶öž³÷ä'…pœy+Vñd|ÎmC¾"Û2¼Yʇ8ûñm÷ÙVyðÑ\˜ë~ŒÏ™Z•hÜÝò¢hbmÆX1™ºrÚí¸áS´_¿½f¢,J>óÐbŽ _m- É£6®~ZRñl»T”X|›9ªÔ~‚}<~µ–*ö#rššãv×Ìj|•ú$Ibz>Lºžnˆp‹'í›-˜øÛ¶Ý¡ip»8¯7‹Ê@­;x {õ†ƒ>É¡¼&Ѩ Ÿ#K­d/€)8)f›¶¯nljÏÃ3·ë»X*—К[ª2¬Ne ‡©~l`¡•Ñj2ì¼rüÕ„]V2¸¬pèÅ»u’_œy&s` ðŠ‰øhb:õ‘‹€‚¥–£«ýeüon‡‚•ØD°¡µr’È+§|&l<Ñ{SL˜:¸‡÷Kcþ”ó*£ºÝà¤ÃÑ:çõV|%»¸#¯‹ßcñeÞe4ƒ#º”õàÿ.°¦íŠ¡•¿Ì_)Ä|qŸf7A+zdèÊgµTnºùæ5÷µ‡2kÎý„ô:cûÖLÁUüë¹j”ó%¶m†»«¾ÞÝââöOÖëÎË5î@—%²‡êgô>³Ÿt8ë‚èƒàe4÷"þ×-´7Îeç†K»YܳJÜ—i9³Ž(Àö+`º*fI¿\R1Ö–SŠ¿ÙûæÃ‰cÑý;;•Þ¾بs«T¢xFCþ2»î }T‘űNåá4üëÍ·~¸rꀚCßøýB»ôµ jð]¸ÎUVÅxÛáÔ¥ô.µÂþ¯mtÿ•XÜvîïX£þ(¯î+µîÕ®èp}Yø†.Á¼÷SÖ6¥*‡íS§F]m@ ¡K™Bí=Ià¶0i„_žn=Ý»ñÂu½ƒ6CÕÌ׿Œ?l_£Á¿cS~*kô ·U”j|ËÞïeñnvù)‹SÂ#ô ãû-»wµ.;™ÍäîÏB±5¶rŒ³e-w­ª¥Vm4»; j±¥ LÕˆÞku÷̆(Mü†lǤÇÜ«ŸšìÞx6ô‡ëT|ã(:€”ÚÉæ+2Pq®Ø‹ÀÂ'æ)#×Ëz–{FEƒü{ý•„ì/Éõk¾á}WºX5p+UÊ5gj_iïõ·G Mn¦Ú”Gì>yß·KI„ë(3á3tÌ4ÈryBX+ 1J»tî3GYH”RÓ—j¯ÕAyI9¯CøU¨™CÅVú_v<çëêp7Í®Íaˆú-€êÀJŽþ4¿zmŠÓèHŽðšo±ßîìG¿Rzz‰4wåÔ–‡&à „Ÿ##Öæî'´f¨Jhví(˜Çþ¢µ@ñýãG­ŠÊ ßlä I~nàËiJë Sàgmy»Ã,w‡îOñèòPÂ/ŽÑ¦³TD.C ‰|2#m·´êé,óÕ~-çNvg.´öYü9ÄÕJT%3ßWyKT>á!ßä>ôMÏÐTFÛ?Æ•H‹‘¼52$@ÝEèiU´w9[Ï}omóàôÇ«M¨<ßE£ªQÐÆÌpŒÜî×ç4 þŽ“×öˆ½s.cò&cR™,æÖ7¥ÁJu+…N~}ðñ«H5{nÊ6‘¥ßÒ×Ó×ø?Û·q:<Ä—*iZܹ0“>¤pÄ?Oì6ð>I²Û<¥‹Ïp”k)ò•&]§v¹/;7µÇoçš]µ1ýÔ…ÞbÿædE¼`5=šqQ@Ie»¾rFì]0‡‰ ‹¨˜Ý•sÂ.®xÛà “>'o$Pï?2Ú™êk–ïD)º}±Xã)®À*|p1Rš’‹7(+K fÖ­JMöËC¢¾¨—™MЦ~<šòñã¿K¤*ó—ÜÐÙ^Øž¾xâꨬï£Ù„¢÷Þ±{õ=„îÙGŒ†[$’’Ð!R5ô„bz˜Æž¸R ´ Ï;. 10â¼gµ•—bœ ¥uËaÌμ ]o[žÉáñ–‡Û¾%v+ÈÒîL_CÍŸš€ö ›öTÐ¥=ˆÎ4+2\Ë@=.»Á(q»d2ýágn1ž”$Ê–ûªrM=óÑ„Æ5?MFèìÖ¡©n•³O¹ÐÒý•½ªî¢6EuIÁáÚÄ•|Ø&X=@èF¶ßL"Oeã`oÇCsÍ]ÓBâˆ[ìyþ2.±0Þfȼs¯!O–ièîüüœÁX­Tš.½Fy)«t® òJÈßé^yÍàCòÛØªip¬'.‰£{¨•;ó>AN‚ƒ§vN\˜ŬÁøéÉÊb1 Q€g“'G µ)1ÝÑ#ô…SÇÐçYÕ÷Ss­ÀG„)¤’𳽡³u¹0Kt·Mt|ôÚIãÇLÄú<+vØg637‡uª´ïŒDgµÎLF€êˆ4}xÞb‰b©ˆTkºù϶wI(Úòùæwøáu[cñ„6ͦ "®çM{<¤³Å€K"Î[g˜WËϲtádÓ6¬ÊîJp1†‹Xƒävd£8µ6UrÞfª6ǨWZß2åN­´Xøn‡_{ŠÚ‡ÆUË×&·Æ|iô$·‡‡]àÅÖ*…V^ 5¤¥©0Q6~ÿVõc…<Å÷—YLi´ó¾½ÿÝ„帎DdÉÖ ˆýÃ0¦¥óÕqQFB¦÷]Zï}Ìé\aJóÚ”£¬IJrfû™ï“zÁ4ÙŠ,øD™yÚ=‡¥ÅW…5·lÚZT”M±ÓúæöÈÐh(æ a|§K™•TäR?gv·R­è…hâ‰ý±%Û)e¤‚d'3~$g~"ݫČ´¥¼å89 ìý%¿š‘jZ)¬gMú,PÀ†s1rq#õFÜ›ó*$¹MÕuÍôßJ\D4N:>ƒÉ"”ÅpvHgç–Ò™ bëÞ8Ñ“Ånî÷8–)‡·óæÁ{ó~Ô½+ýhE›¢7*ãJ÷òñô.µ¶üêÐ(xóôýrÂä¿IÈk endstream endobj 595 0 obj << /Length1 1144 /Length2 3463 /Length3 0 /Length 4209 /Filter /FlateDecode >> stream xÚuSy<”kÿ&E†T“­,=ÙÆn†lÔ-K–ìKRÆÌÃŒef̃NvY²µÐB*ûΡì:…B "ÙŽ5T$“Ò;Õ{N¿ÓyŸç羯ë{_ßå¾né#ÖvJúX¢hL$P•Êp$`…÷ó QìÐ %[Ћ°@u4DZÚOõÿE³C2ˆ¦â‰#4•ÅÛãh€%š ¨Â ×Bª#Xk¸Ú_D2°&ãýˆA€5Hɾx‹2"bh~ jG#‘|ñ Ö¤id HAž¬Êþ0$’èd¼Ž È:Ø:É)((þDÚÚÚ€ý/0)x/ ÃZœ}‰¤o™X& $³ŠÆ~‹µöDŸÀâ©ßÚdqT* ©¢BòDƒ,L™â©L©*r¬BO°†D¿oÈ·™áÉ †Õ]å×¹ùˆ„àÁžxö{KXIÅ€÷§fFÿ fAŸ˜HÔáªpm¸*ú` §ò-¥=~'ß`4{!˜D$žh_ xï ²~` ú<PÉ4ðBðÿ%þ¹ƒ ¡ ë~ª³`ÐóÇÞM%ãW¸2Žàß¾¿Wn¬ Å ¾ôŸáVh?P±12>åì¨ðkïGY’JÍ£€’ª–:Ë),Emuµ_­ÑøÿVÿyØŒàI´ΚØ_ÅŸÉ– Ùþ©dE¤â1 ûÓ$gàêp–?X?Äÿ4Ï?øÿi¡_sÓ|}¿÷/û£q€Õ9°¾õî‹&ÿ+í‡÷¥ÿ¿:?|þÿè˜QѾxŒ>ÁË÷ï1á)Æø@k§bp?Œñw `¿¿8КHÁ{³€Bñ gÃc| …Ârßw $`Iy‚€!bñ/ÀŽÊòšŒýøFchd2k<ß/ˆuö¯½'žU ‚ȃˆÑ‰ô®ŒlØ,× Púó™Z«†ÃÆWÚá£Ë¾ìÓÊ;Z¬„} DŽÞý u-ÃȺ w¬Ô•Ã’ƒ=:YäÄeÍmƒFe.è(èÓØCo”×µBò¾Ý-ÛûÞz(%A8í΂!½ÝtõHц‹ô1è]4Qà¢Øæé¹yÿSœ"âE÷K¸OÍ3ä´?…¯œ2õýÍÉ9ð¤Éî“Æs²ùAvò4σ7”4BÝm{Ô/D›@¨•o=D\ 4‘M=ͪŸpæzMìsâ²`sk*Ý<ÛOäx9…¯¤ˆ½âå~¦ná§3‚Ù-rsð^[cŸì^­a%}‚û’GY€DÜxPAf–¤0Í‚Ëdbjt³¦[µk¨q˜è¹æå–ÙÁßPÓÆ¼éÈðzÕïÖ5{Þ°¥É|rº›­âŒ8›èEbÙ•ðó(âƒÅ3»sÜ¿¡a’TwÔ[[?[wµÊýþbSirFêîË™bsÏíVϾ?+³KѺh£-xèÐôç m¢Evøìݯ¦&CVFU±>öå#¥Ã–ñâôZ_îLbÎŽ¹Ú¨ «Üˆj6\E¥h­ù2+ËgÈ…º®O˜¶ù‘2X‰ÁÑñÝ(ñ¯ ð(Û½7}ÅaNØØËÙ£Y¦& ƒSñ›[±vã—ª/Úç ¾òB³.qðÞƒY±e—]>:·]z¬å¢†o‘ÓUé¤Km<¡"¨eùØøŽã7Ì?œ‡–«¹Ÿ\Ê÷HGYu[q8Â*R¿¼n¢ýþÑïX Iño›]A/OÞkcwå\b¸B ßã2Â]çªöös¾z~=êJ­{¨Š/nh Ú©RÊÇ—ÈE?}6l_YŒþ!ï¬ØªüÞ/!Êy!¹ìsú½»c§b­Ï©öèÓ¸ ¼4˶ë$–Þ 1øotÕ×âå: \' WÏø½¶bœƒT¤½’êm³ê[û5¯œS69¿m5V®Þ@ßöÂÛ”ŒÜ3S{äký²‚×ó$þ’‰ú&€åÌ5žÖÓMÅ“ô=ÖÖ6òyûfäŠ?Ê—J%ÕVû¦¦¡Iœ‘±:R¨–d ³émCw¯k^“KD¤KÏÙªn~És‰/Ÿ;Û-•ŒœÒóõ»öΦ 5"aŽ} LEGšèÆ©&Óîd9ùf]yÿ'œ%,ì\6[éëgùW^ØøwÍ[#o[óÆ1\Þ³/@6!Âù_¶l‰<ô'iµu«/Oq=__dËò|Os­ÛIúò¥ÿ^ž$£;L¶B­aSbúãNäHkÉ1JsrµÄŠà¹<7±§•Ñl£à³C³ÍvcI~:S¦Þ=¯2˜u©†…ˆ¡1Ý’#6îÑyS ©7S•Ø`íEäEÿ.ÎÌ޷壅G¥Eã®õsÖ—r©"–ss‚fÆ$еˆ “¦.È:-’K@ìCiq4¯Ùåµwr8CD¬Š{ËëþV‡$Êw€ª[Wé¯TJ'†5hd…ì{-brÙåKÐÜ®èj…#ùÄÍ\dX¸[p í8ª#hIÖ®ïíW,ì|»0Õyÿ·–S•·£™À)˜ÑçV•~”ÖOO û¹ç4 Îìt7oË*¸€t}Óëg²áðþòÔÒºp•‘—6"1á 2Ù|3Ô`¯F޳Pʺbrü0Y(]Yo$0Þ¶Ñ‘ãÖGwyz^üµgY+J€PMExtœ£Vm:¯» UÜ)^;${0õD¬Ú¾î‘ªÏêÆõ;ôÖŠow”@áJÁéj(»ô|)P2´+RKï·¦œ,쥼.5À»ÕÇð ÓÙ<ú‹˜•Aõ6v¢÷Ü IÿršZÞÅìë¾ÝÀ=›åà»emØñ<Ðì-¶˜±lÄ£“s°í7YÌuus×÷Ÿ–ÍÙÖˆŠ®cSV¢í¯õVCmz„Ò|éñÎ½Ï ¥åG#…„‹ +Ž…åc13÷oÀšg_L¨M»UÝ(4XÄä÷8–µ+x_j<¬»¹‘v9õú¾%×ãÑB·«‡”ädÏ®%Ê>ZR¼þ2äM×yHÐüjƒüåf÷!hHn°÷uð™ïow2ÃߦŒ2‡Åž(-”L´TQj²ÒÁ3îÓ››ºÆï¸K+ôk&ŽE %ìÚRÊ3‹üØ8˜:g„˜l…Ø¢ºÌJ»Q ™'bjvëÛÏräND4Žf^èqƒ¯O%©Ü‚O\K—5i3GVõFßΊVx>|0‘ú+ô 1Ô‡'3MÎ^¼P|•ÝXïÖ™,Ù•Å1«ùD9CÔëã™ÁÜÏ…\uÒb€×ÞwÀÜ˺îJ`Ìd/·áÝ®k‰Ã/…ì’—ÙRÄJ·4¹+à2¯œ¿ã£ï¡@ÙíQçŒO%“…ð#¤ðÓþÐ#·…Þ›â"륖ù‰ÖÆù¦eV'j|ÀMѵ×Iƒ¬¥ŒÊèÕ¬‘mûÄ©•¼]`xçÕ±Û‰ÿÂ3w#cýR D+<ô·×‡Kϲ5‹Ov{ÊU¼YÊ)=ïZ9ƒ;ÎǻɼQù*»V:ørÕãõ—Æ+|¡ Å\¼a¹þ=Ž ÕC˜É'\vQ=fGH$HAìÂ+ÛáúÁJrç$&…Ù”{dG3De«Wpí\Ö@µkGñH={ÒÐX¾¥«®‰©Ìw¬Î2èÞÊÿ°rs|˜yì™yª«:Fï>·YcÊRLp~º ’ë­Ýjzò&jF<ð•lqÍx³”+es®¥×ºžØ;IšS¸¥V“|Ò÷ƒ©‹Yøz)­¦å6ðÈb"Ôçš~á‘¶gî‡â²ã"‹;>í*3}¹ßýF=fJ5¥âÚÌn«6̉ڊ üŒÏ«ÊXTÅßa>H£ñ§ß÷ä‹°´ß>)]zê $Îçe~T= òb| ûÚ-• ÈS“ÔnÔ¼žW<c*¨1¢¾F®ˆŸ¨É@ßߎ8)©Ö·Úk[•"Wžôkü¨}&BëEg³BqPZŽÐÇÓ;SjúÏ{ŸØ÷hÂ&®Su¯ÆI^W9?¨Â½ãcÓ?yrý“åcÞ6á^øs¢uµEÑažw¾Âl'}°8l™–ÞLpß×Ûnÿló«û½¡6üP&×Û~væ{EA[È­ ÁéM†@âÓ6 '“ö>Í‘OÊ>ýÒ£/gçèÅý‰"I¸SÝD>ƒ­'ÊO𙥆ê1rú.`ÕzuÔ)Žó]â ±Jã©kk#ô2‡ë/Õ#景ž¸ƒ=|šmdÉ‘2a@i<Ž˜¿êŸ¤¤ y JˆNÓ÷öW‡>woVqúÈàÒ/ôSêLvã±™DºK…©áÎPùȆcWæÒ,åa®)n3L‰¼¾Q Òá×ÎÈé0x\úáªXåþI‹,›Ò¨õ2­7õ^壮Wg2Ã-,\›Ä4*JF¢=ÞãùÚë¾Î¯0Gª¥©åON´Ò!ׯÕÎà“p¨¶KûÂÌl®î}p€ fÀÎ_Ÿ«-Þ=Žáxǧô–ì}¹8ÃXÖýÀܵ@zUº<•JÒ»™¸=lÈ-Ž[j¬?#Qlcx•~,î"±Ps‡?VgÁtvi-^‚1Ùy4LÍ\–µ_›ˆ:KÂR¢™ûÿì“)v˜Ó—+ð°’ºÇ ­÷ÜÑe^¶´Æç±œ·Ã½kÅg=¾bhÝØMOŒ`?“ÉæÊ-—¶Ë¹ä‰5W\¾dôÝìZy©’Ê[c£°>ÛIGo=œ­zg¤a{ƹ´j}½Þ Øî´˜oy¹xûl×f´—§êÚ«‘]ßßJ°—è,o6a[rÊmj¥çòÁt6mo¿Èâg/°N?ر<¨pò!ÎvÀäÓ÷¬md=-ŽHS«š­f{÷Ý;ß&¯WXì ¹—…éó®`Ük3W1ѹؗ-U}ÿÍ~s¶ ‡µèÉÁ¥·ÆŒ‘ÓvÅb7]PUÙsB“Z×þ¤ï’›t&çֽоº+ËB/mþ7³û¬Pù¹Ý»ænH¦KáRÖ€T k}Xº€Që&©Û&€u3dËyάÙ1Y¥ Åw£R9ÞŸgœB9Ê6ê,ÿc½BI›–£Tõò*­À»¬k/Ù”ÖYô)-ÖÁŸ£ ãtY|)&÷â«Ds,Òù¸‰„ë}}æ9kûø#ÜðÜ'¤OÜ{ö˜ÌY¨#‘TªvfRNz-­{æ%S4@?¤÷X 6XÜ%î6_Øb֨ɕÈë6×Ö *ÅjNWû‰Z—3wÙ¨·äê"̬Ðâ_1Qgÿp@H~6ÚÁYr ¡áXuì¢KóëKëÍí²kÂ÷${Çd)ŠÜRò;†Û@nU×Á9›Ÿ»û¤ºº°)sZ¤yI8rF"¬’7“OÁ³Ñ–¢ö¦HÞxEÆ;ýàÌ9a»úáÚŽ¨ŠÀƒç›}:JƱQ®siÚ_ò{ͳöUßÚÖ‡ÞôµÉè ={ç.¦e˜™Óqüª‡îÓ“rŠ~ÛÈöež“rzbÿ ·ê3—þÏbšq7œ@—‡ãbC›p§þŸ6Ñ ÊúãÃúÝΚ¸\Ø–b0m endstream endobj 597 0 obj << /Length1 1626 /Length2 12322 /Length3 0 /Length 13163 /Filter /FlateDecode >> stream xÚ­weTÜ’-'¸;Mpw×àîNpmÜÝ%îîÜÝÝÝÝÝÝy|ß;wÖ}óþÌ›½VŸ’]»j×9½š”H^‰ö»‘±¨µ#-#@heàä hc%kÃ)M+cl|ÚYaII…ìõ6ÖÂúŽÆ\5c#€°±!€‰ ÀÈÉÉ K ²±u³šš9(TÕ(©©iþeù+`àöOÏg¦ÐÔ@öùÅÙØÒÆÖÊØÚñ✨dl p43˜-Brò²b 1Y€˜±µ±½¾%@ÞÉÀh[;SLlì–ÿ8 m¬€µæ@÷‰õÝ p°56~¦»Ûþ墨Û[>¿€S{}kÇÏ8Ú€Ö†–NFø´›ØüMÈÖÞæ3ÂêÓ÷ &oãàè`h´u|V•ýOG3}Ç¿j;?Ý“ÏH#C§¿ZúÛ÷ óéuÔZ;]ÿªe` 0:ØZê»}Öþ³µþMÃÉhmú/4{cS}{#Kc‡O˜O쿦ó¯>ÿ¥{}[[K·¿³mþŽúO@GcK:XF¦Ïš†ŽŸµMÖ°ô튄µ‰ €‘áv#'ÛúœíÿÅ_;CùIBßÈÆÚÒ `dlK/kãøY@ñ?S™îOäÿ‰ÿWþ_‘÷ÿOÜ×è¿\âÿßûüïТN––²úVŸ ð7ðùÈè[>߀4ேÆÉêÿJÑ·Zºý¿’þ=ZÍølm,þÝ'á¨ÿ9’ïÖ¦Ÿ²0Ð1üÃtºÉ Í&ú–ŸóúÛ®bmdlo ´6þÔõï‘hþͧl4´°þKÖ¸Œ­þþ§T“§‘Qû.Nýß<®Ê.£²›í'·ÿhEÆÆè?Á Ú¸ÿ:iÿŒˆµ¡Ñ_k£ä¨omô¹iÿiøËmèdoÿ)ðß—ÿ³ëžÿÞyccWcCØ¥yCî@ó¤ÔdÇJÌÌþQa­îNF°þ ÛÂå¼ßr›Ÿ¤_›œ%z¯Atµã\ïMnsǶo»’T{ƒ–ä ÆçÙx^Ä”]9Èkd-ìÔ{þô:…ðÉ'j¿=.f¥7À5ÙT÷¶Fu ^!ñÇ[˜í¡/(}‰s|ÑHîm¼ «#Ñ[‘jAP*sOÈbîÉ{‡úû:® ºvq©3"aH¹õ1½ã‰âÝôìok ß!žÙmAT†œl5%—„è¢êšSdLÊÖ¨|Ré{¨ËÔé¶æ*Êïo¬dâUýµ ZÝ+8UNW‰Ù7ôöÎáƒÔD¥ýxV‰ê|¯sÚ¿‡dg`¥¯„d.­l¤1íD 9¡%/’re‰rçebŸÈó«2ðf•}å3HÙ 3n»í:åüÉy®‘â¾xé7ˆh¹œ¯^Ì}E.RÛ²à„5FÁ%ŹìNq¹>h0–…)pËC9¤Q¶iÀ…9˜ÿ-÷u=“‹¶|òpÙÆ s¸<–¼·ž ~kZJ»öÁ‹û±€M7òŠ7›?%M}Fø.Š(d\Âä¯{Çð"‹_l¯`;BÅiºÂ Ðâ€F‰Õ±“j€œä¬ëÂìYÃÈÝ’å$&e%&ÌÒu¡‹US9¾È°ÈçQâ³V”ýÝüœxSÛðúäBq í&§×kåì¡ñÓBO÷-èZ¹=Ù|HokKÍ|PÛü ;ÒB”ÏèðÔ§ÆE0¢©¦<€âÌ:g0:kQI–“SÚân ½•ÜQæ3÷¢FÂ8Üát%ªºz?¦íTâï Ÿï»Vè8r £ÒŽ[Là`º­;Fù–f­_6îA´ß5#n£ë<Ó¢*6LØÅ¾úŽl–Ð çõñW§]…™Qé¾›t ÒÛ&–[¥ÜÖÜ)Ô]­3Ñ*á< 7“Ù¼°–yâÎ-ëAÔ ¹P»pªeucN¢7»"Fg,öéGQêá'œ1»Ä˜ãòòSUÚ?,ã4v*-Ó9dØú´Ý qºé2߃(AûnÂ$‚ÚX¯¥ùkˆi1¿i=WƒÍǾ}ìtcuè`läyEÓêÝŒóh«&2€}$š9JŽîÙ|ýÃ× µè{é Ñv„r\d°„'¿[U×Rá*6Òô[†‹ØÔ´ž¦Ë¬¦) äpŽáà»ÍÔ½Æ##g{f8Bgˆµä;uúåƒlá ¥X󨳋ìô¾¸Àö-ôÕ>-ì QsÕïJ™aèù^h­ìB´ ÐðVìe ôûŸ#nÛ¼ZnæÉ,œéiÚd vY¼”µh¾3êÀ«Î{ÜìØku³ñ™?Ž‹¤Õ©¥¤_r ßÜš+—Š+Û«ø ¡nP~]I!è‘é'@I…Ù“ýú¸Nì„¡mÁr0xi7œ)ðì+Jw¨~c9Ì‘ËmÖüÜÂc»6®ÐFLȨo ~ ÂÂW¾º1÷—½åÍ™WpÓ+Bq®› +^>µÄ&Ãå„«$üÕ·;˜1»T»4†VóýJ2#OY«7 s¦ÀQ…ù¦dl¼xWºh¦¿ÃO÷éÉÄxíÛdÀÐl‰ì0ÜÒ{Oó@öÀËO”Wš+1µ˜#×;¾ì"#t{dÓ[‹y)×…ì ‡ŸºwX¥ÓxÛP'D?ƒ0Ž’%"ÝÈðpS §¬ãüqV^¾ÒXG+êôΘÇg ê”¶,?ØoÚß%ý>J¡R$W¾·1=…ÆÈè¯ÝœHšj¤Ÿ,FÕDmC2 ´»ðЬ¤Í§LœåZ‹7çÕµ®ê[P”Fùñ³€ßý:vx}*X7À¾/P3¸Èˆ8ôAñ6gô„„ñ¿v²éT²fø(_!©Ò½‹ˆÖFÎú±E’wȬg„ôV‘о¸‚ƒnNb@ùƒ [ë¡áô£ÿû•CiÇ„°SVë(¦¢È<íb-ÀðkþÃ#º©PÊÖLC% ƆöiIØNYVâàÚæÙ%R¿•MÓÏûG ‰šº­U"ïP¶Tÿ°íudçߨx2sÙ`„m‚á•C5¡Éù˜âAÛË5ìWöN6e”RQ$I¢c í?*Û¾oPÀRøI‹¡Ö<ÃÍBùfm»@ë´Ší‰%³B·ïÀ€M„Ë(©è8Ä¿mŸ ÿƒÔpٹͽü ©F÷¬„¥S¶UAšÞsü¡Åe_¥tñ܆oëÀºú†g”O64îˆQ=¼'WôEO1þ$Â&¶O”8ŽŠ²GrŸTk Õ¡­É·°GÍ¢@™eQBÉ}À‰±&üëÇÒ­#wõÅÜϧåÇ£l÷zW`8µ 23U9EÕ—ÖÚ‘¬_31tçvòHÞ\¢Ç1¡èê.¥mS²rÄ ®RF}$Ý¹è ¯‘£¢„¹žg¹©=”„†z{?ºsZ‚V„WÜðñD+¶[W[Œ:BèžÍ_Ž lãËٺ盽²IÕÁnêŠ #0<¬‘ý'ý9Z3–N3MygE5Û¢žÜ`MÓxF’BŠÖW„ÓN+Ÿ÷J.Œª¶Ã®Pˆ1PoK7;•Ÿ÷­m-v˜‰óð’|{iTP³ð=‰àÉiì¸sëQá+GJö:è,YJW×>n¼íÏÝ“ÊÙ—RÁc3GŸ°&߃kñÍ£ÃPóÏ|¦^Ã,¥KgÝ£_œËí¸*õË«@åê$D3¾×ŸžÁ0¨Ü¦³L eZƪ‘ 2ïÊEÃX( Í»! $«sä@¦º-ãÀR…”ÖÉäПJ+U?fC¬ ¥¡ûzx~¸åö%ß>2å¢g…ϯ;ÁE`‹ÝZ­~W›ž]9ù9¢â‡ Ôòï@Û¬pÛh ­5È1 MÇøÖÀpÖ˜ý4Yºc^ÉÈÚÎZÒqµ ~®Q=úR‰ZütVxÜík^ OÛ ßùf!ö-zTÒÅ›Ó!¨g^™Üç¶2T '¹ªÊM&žTŸj¾Ž¬Ï“-Ñ¥6QÆ©‰‰ÂŠÈ¾ÝaÒ=MDü•ÐÁñÖýÜð³­ÛÜo#ý°kv%·šOQåh:ç$¾qÓ·,s7$~#n ‚éIÔ„´MW}L‚cJ²'©Û®nXadH]üe˜½ »>Nß›‚H*^Åãú¡3­tÿ…?hôŽmbþúÔš-©.dò.Ì(TÚ+Óuqc³ÆI‡¯rDZŠo·Û80̨Bû6É¿îðÊTXbÃcXm”%Ää®ö[ë”:I피ÿQñžy4c­þ+©ʹE¬ Ï=I9UÁæ\ǘCÕÎzPðïüKàÈ%^ñDŒ ÕÏߥ(/ÍD”áBKWdCûÀ%½“y2Þ‡Ž5À÷7„ŒP œf5]jÎ’¢»Mƒ2ó7”1H*‹ˆsæêú¡*¯úãñSÜN·Cö•žê©M-¯¢^Öœ'1¡¢…ÌR"vk ðÊ›xå'ÇlA_D‰TQ ¾@Euñ­ÉfM¦#“´AV´$×…ƒ‚«ÒÈÛ¦-€ƒˆ|EœÆLüQj‘5ÈÐÖü[¡Þ€žÄ:¥½ô;U\úš¬yÚ±Ô’ŒKžLPÏOËNDùä§Ÿ{º nÊ-Av,;+‘5«oˆ°(ˆ,¹î©NsHÈRï Œ G‰,«9ØGg´œÖ8[¬-»Â÷ß¶©’²¼jª>6ǯ_ˆÉ­/“OçÇ;‡ßgÏâÛµü`´^j‚¡ý› –EÁÝk2æö³*÷ ìtb:PQŸ€,lÓhsü~ôð”!~æê{ÜI¡jsr\á¾zë˜MZYe-|FU‹9Jm¥´…b·¨¥OqlòyÌ‘Ê ×aYçÔ„ÒÎΙ)L±U ó¥W“"Ù`-SÇŒI»W›í$[º;²†;0ùy¥¼6~iåcrÉf7‹ €ÑJAEV8K¬”m¹e5êÊ1‡À:<ñízþŠ…¡èë<}Óc°g¿SʈNx“í5èAïeÛµ#5cÙ˪V<ê>)Ë¢`èhéBi§¿ošÊN1†>3Î-¶E¯ÙÕ{yÏüv©Œÿ¾¾ñ±\è´o¨Ê¯î×)mŽŸ“ÉQ©©—¬RñSm±2¯îˆ,G;SýT‹èïé¢]ÄXÊçÍq¨æä¿îÇQªìä¶“Î ž&ä¶;¼òHuŽ î`>.šÈÄæ$°‡\Š:¢^Ž’aVuÞàC©wVp±…qq[PÄš"OÇw²_Í4q˜BiHüŽ/.ê‹%*Ùnòç«÷܉²Æ„D˜çúJøøed~”Å å–5—¨±Âni6TÑLb×V8ùkÀ9&í5Ñ¡YB²¥#Ê…·ìgÔ7!ú´ŒP‹<õ¹ À_µâ(o8‚È*~Ñà­îiñü¡ªaσ§Ñ ž§Ý…a݆‰­õomVð$-0ÝŒÁÂÛ&‰œB¬às#XÊ.†]]3Š8Z7AsoBNwU˲æñc¿ âîÑü<ëƒ †m›Èí[aiº® ¡vl"„ÿMÍñèI†6£Hk‹Š£ÒàÍS9Œ ¢…J?Û7É·æøºã!È´MìúýÏqç!Q„¾ò€j¼|†³ÜÛZ7Šëä ÝÓÄ{LD *QÜ‘õ“­Õ,çȺS¿yïñRYýRIwìÚƒ+Ž'fÄ#”BŠ ÙCpCÂ#SîÑûŸjª~dþÑáø_/öF|%‘V¡ÇSsZÝP‘2¹¬yÃÊѸƒ_²,¸´3Gô"ÃûhÖ,›§²åÉÝê96bÙ6õWçMys½Âc¢·5¯Ýü3ÃÅZ~üø¶´Ê†ƒøAÓ?” ,{®s…‹¼ùÊ3s Q•R|Uæýfþg•H_}&Úá^MXV#‹0+6"hŸS_›ò+žÅ“•Šî·ì/ãaŽŸ)Þ Ì^:Ï©ÖÃn$uù›JjYŸÿèÆò™wµY\q1C±Œ|o”hÞQ«òk×_“Y²SäϾò ¬œ«$Í=æéDŽÁ&øE4\gRMTΚº[Q9(||ló‡ Æ'‡ø¾qÖBxQ‘µ*;3²yØ.й…œq 3kh`sïžt?Ä`¥u¾Ã¸´Ž7E•ní¦5À£ »h~"*“ÜÛža½ÛÄ—øõŸ¿ÒiláßeOþRK£öñ¬¸ÇÛVFøÄðù¡ Ò®Ïëòn|‡iA,°`‰ܼtÇÐüHÐp(£Ž'Ï_õçí!VGp#Fãµ¢!ðàh|)óî9MÞL.[hoŵ Ú+ ?õ‹Œü½]1(œ~غœœI7’cvÀš+SWä¯$pIÃÊà†K€çúìñ";æ¤ ÖÙú \“ž-M=#/–]ŒcP¥:óš¦A¬bñ÷3ƒѹø~ÏïäR÷ºrÝ\Ð:B•)õ’ÖKÇJ ò†÷FUJÁeýîðƒ?dP›H˜`à­Ï›<ãa†(¥mÖ¬äVœ^`wŽô7r§óTd:ਾé¡[KZ1*j*¬·Ð±>ׇ·òRÕ B[ë™b¸‚ž1ŒþNJcù•íî´Íº†hÉ£Áœ¬Fä£î]¸¨Ú‡T¾â•¤í3„äÜ®ô YI@ЪÔwuL_INM;,x~ö½Ê6)>—î 2ôAe±M”ÇéÝåÿm1Ì¥i(Ÿj()0}.^,ƒ 5kTò’ñPð’7]çlÜ«Ýß%âýz“;C(ÖÃèg ü#¬­Àøõ†4oíÂÄ•£Ca[w}]ĆO . þ!­à1Ö’ãƒ6XÐaÔDRí åèfU¹LQmS׆Á§nŒO êíühs2­¢Ö¨ÎèIžûÛÑæ…>µ*(5»NäJ‚Ej«º)‡å&îD?]néâB¨7–ë¤Û€ËÂL<«„Wƒî³תãç„î Á}lF´Ó‘ЈýCîLÁ ¢O+7sžUoõs¦Ð0Ê™ôD˜TÏ-Y4ÚÉfiÆñvJsZð|CÔ¡mÒfÊ´^¤C`¹=CÖ£—G…Ò8œ8•ñ«PÌ»/Îz;h‡Aýjœº²Sjø «¢ XšÛ[Š Td®îQ 0ØÄfñJ`n0<î^f™ÂÓOj¡f7¶£ñá¸<טéM¿ˆW›)§ö+¦Ú T{nÞªiVfŸ÷-ù‹Û_¿Öĺ£l1Í5(~:‹Ú†¶ÅTnM«q§œJ©ØY‹…Þ9˜b2çÅg^•ËtXÖæ¸9hVãÓ<¦ºã bÐ({Dï§Ö_ü‰Ï`%V]¡–¢uC_Ô g7Ft"L±´·).Ö ÉŠ±eg“ª L Þ‰Ã)V`lkMÇfK#öšŽdqx%’MÂSÞÔ¥n¾ÏWƒ(€à,ƒdîíb^v±X~!mÊ¿"Ø¿ò`ÄÝ…)1чрf »9’Ö‡­n.0mVÀÏæ/‚ãP-¹0ª«bHB¬\€ÚçG“àK¿å~þâMƒRqOÒVõ`qÀl0õ”%àËÜP¼åíqÊ( U NÇ%e}ÈàÁÞ™á]øëÜzõì)$…'p“Hý%§Ò_»šy¶³#MhcR‰ç‡¡­e5àŽŽùÞ¥«ì¬ÄZŸxˆ *ô Ë\C©íýfŠX´x‰Äj…5plžJ}ró®¯4ŒdÇ’ˆÉäýV´Ë]™£õ ¦¸ÊØ•*Žé_µòÇûܤ•¢i}Eï¶Q¤ÆçÑ鮈Šü0h0òåƒ<ȃ³ÚŸÔ¬þkßzF~(Æ1 ²1SÞC¶ubÓ ¸þç÷yïÒêõ:44‡dÔ,­3!Cqdæ:vH·ð¼‰ Í‹@̤>²ýYR¸"ÝŽGž¬êò?ø4ñ¡èˆneçÎÍ~´ÒÞ|Ì. Ÿ©-ÎÆ#îâ_o”–ÌCؘ«Ÿ£ý …w]1ø‚fÚ“.Ìûð#8æ[ O†Þh<™„ M›èKô%×g.MxîKaŽUf±™Ñ£lµ§Æ`{ùrùÃÆ´Žö‡´ÆïTU‹J从âûYSë"©jÎ’6á IOJ²EÒÐGSÊQ~nѰãÜùÎN¬ü§*ÌNTŒ:Tß±<ËÇžbÖ]ŽØÐ§ºm…cHôÚ9ÙÀ'ऎ‹#ã¦0§|ÈjûŸ7òEò$,TÅŸ¾3¿¾î?HÉ*8YÅõ6Y í‹ÀÄNÅ "|SÆPûâU"«K¶–Jô§ä¢®Y×ë[O—ø¶î²!˜é‡¦$T¡KaÖÄõðpÏ‚/kô'§¿ß&õÏA`Ú7Aßç~RÞZÒ¸Ïô@qã<7kC½A4›)êÀw5¸| T7y5åBàY|ߌN¹xc ùÒ‡z‹%Jøˆ[Ž­zÏn‚¿’SÉ•AtØ¢BÞ îò0äï7lÿJV2BNïV Á2€à|¾{̱Óq®æø#©DÙïÆ$ Ñ$ø’Ó?…¥—½àÅï‰ØÔïàú&¥!sºcÛ¾Å*ªGiæ­ìë¶gh‘*º«¯@ñá’ãX'VgóƒøÝ§kÓ~Øâr4)°]m?ˆ«íòÝ[ݯ¨½ê̯•å¤@t8,ØìžsœïîáÙ‹%³Í–OË´d³)i 9umçÞšÕDM epbWå^b ™kÇï$A‰š:fœÖ=¦ý4ºn•õÆã2gÉ5+A49›Æ­ÝUJž|’G¡U_ÂéöFùݘP‚„ѱ›µE7*`ì„e I8ÐÇߊ‹L¥w:À÷gOÖ_,—B%§cŠ\þ!2ׄUÏc¥+Í!ù ún\Ù^¯¬:›]%903x,>mÙ©|å0r‚r(0Ø‚0s’OÐM M„<Ê>%Ž V\Ie‚,âŒr¶7'2¥Ÿ8ˆ·²)ÒT/áÛŒiÆ•@€Qªa†Ëb"{½eÌôD†hTW-¯:9Ÿù ßO_Ðø! ëØ9î›×pçdDgF…¨ ê9òÇãÕÝÎfj˜SÐf”.Cù?wÛè'âJuoçÉØÓ‹Ò{þg,P¦kòmÛk¸{þÁHÊ&ú`¿¯‡¸/¶„Œ-@ƈ",r:š ¸y½5âÅRkÀÏä28‰,ãp|ïûÑ~jIíº·W‡"¥à”P~ m…~!Gí}&ÿÃö &Íí ÑV¤K}ƒø¡ÅÄv%á¢lÏ£;>Å+µ!wCÓ×ì¿QÞ;èÚ¹''êjx0\bM5~våEë³KLaÐe…ö][dÓ]7σ€(âõªÂÜêƒãÀkxŒ«ÏåÕŸ'gR•¹ùâšAtCĤØÑ¥=ñ[ÑÍ2¾ùfÆp…qS‡:B#“€“SZ½ð¾}3¨[ØÆ³Þ})¦gzGã×Q`/–ûÚê@1Þ}´‹(>0‹!\˜MO7ë>VÒ}:©¶ãV™yõMªz ±kÕ}ôEêFÌœCÝô˜ê;àL#0«?(Îp¾yÜ^!/‹š`Ѻ’@'ÕafèCUM•s…™÷계l´¨¤¨æèG¤)w Y‡at=QJ]ˆ:¿ÇE3³ö(Ô-: ªùÞAš -ùšÚ" Ïœ—Ì ¼TT,^cƪÇ7 ®T±æ™!Ãk 8húcrІ¢ðgܧ `¬³¯óÚùñCÞ²þ¨ÍÆ¢m 's³9&©Dìf¡´L7¥ŽfŽw/…/¿”y´ZÑøšö³LÉJ‡‹ÎÁ=½—çÔ¡43$(—© NVŒ¿¢âlœ® z!›?œÅ¹õÑÂ"÷/Ì6÷±ŒEÖ’l"»ŒP‡Ÿ'pBÉÌ^PFµ”mþ3îÅ{kð£p‰%L£;mÔTDÍ¡âëÇ46œ´LgZ9ÃfïáìBñ ‘YoØ Î-¸°CJ%ÑÉ¥R¡×úŒ•XeË4ÄýÉþ W¼ñØíe>zå ìf0ѯñ“örùÆ©_èÉ’Ô¨§‹÷QwHÜí@Š¡v”‚ `³…ðGe/ØñîõÂxëÖÃèr¸ÕÙ4NE»à¢»ß™ƒß2iæ »Î\RVc6RßÝ£ZÅ}¼Q¶g™?¦.ÈcÞüXOf—ÀL¬M®"ñ@ú)“tÀçŒb?Rm¤œÅ9Ób8ó„f€î¶8­³æOçû¦¡u"þý«4ÓK<2±¹Z¢òÈyKñŸ¨T[Ø«ðcà£ÿ¯³^Äþ靿bCÏL0kåLøPUTó½—Š&³kü¤ªe¾PlŽ‘Ò×{4šÃ‘ËÂC@]‹‚© aÑžY™¦« eòˆ7CúßÑZK?꽬 &[*ñQ mÜå Ú/ýYö{†ŠÓÇÊNžણ‰Wc©ŸJyÓf[)E!ýC|œ.ÆÀI2Êà’kÚî¶,Z/Îó', DáÒ¿œz=à€ÍôL™íhµjßN‚†›»QÕ'Šè-Ø‹jÿÛÌUeç¶øR¸YæÖ€VÕåô2c:¿¬ÁäÕhšØ~o>]‡óêÅ7G+ámÎq1äÒø‹³¤Áº#­»®Iô¹Æyƒ–½bGý˜äuÄKñf×°Á­1åâ]C©p¼É­´qKÀß§³úú¤^²ëbe­¬ “,óÜàíY°±Æ,ß³ËH~º)ç°²¼°Moäæ5œq{Ð¥Ö°>ÿ ,Àn*(CÀAV ¬C•€‰É-”êgFퟟÈuZ­Íg(ÞÕ†å †fè+RTxøÍ@°¤Ê s'ŒnikËf7Ú »îø”V\ÿíáN%¼Å̃*Ö|‚i«PŽÀmµ‚_ÒâE³V;õc!)\êŒ @. ¹yÍ=nSÛ\1Ÿ®ü²WÛA1ñÓ¯»6¡$ßÇÁô4îÛÉ„PpK 瑪y‰ÞXÃg“º•Ý||þp<@ø;Ql'¹,ÉŽÀëúeü‡/ùE‰«6%ëE>~]óųE¶ŠQn8Prß7`EÑ2wüêjE¿QÜ<¿h š#ËBÌ%»­¿x9©‹É*Pâ4*ÆM8½¡Y „eÚ*Öe 9öƽXÎì÷›ñàˆæ£ÏùºÇ(4ÿà}ìæìJ6õÇÅíêyJ—#È:ÄLJ—2ü¥9˰qbVä Œ/ó¶þƒ£"°Ñ¤‘BPªÄ­¬ô¨ÖNê'þŒ»¢¸$)äåØË€7|“TI©ØÂ­y®Ì:ò}‹tìâ›ÂRšm§Ü÷õ,)cظœò$¹àsÃeÜ9úeŽÖÔ<5ÝM³Ûœ/¶jYîcæШ©n&ihÄŒE«sôFƒRvcVƒ±A×gª±÷IÁÔz3ô‡{·é12#³àçÐã‘ óUðvë´z~™•ÖŽú¿™M°“·dDòêPx=÷U'ò’·1j #çcÄD!^UKOß`Ô÷W_è§ŽáÉ¢à1\”,ªZi…Ò.=v£4²¿f{‘àÝ:ʃaè¤*.RÈ Ã:# ò(K›‹³)§„ƒ—6KÔ·œðÂgÂ|'Ô/cöòVèâLÇP4)eÖúd—iÕ&KQ¿_2ÑŒÚwroZ´êmŠ‹Kb‘Ö\GKëÁv§Ó¦«—se+V}7èi’ "íßFÂé Aµ\´ö‰I”óÚÝ·@CŽ4\70‘ è$?dúòR<³† F¸W!z#-¤‡t{6¾$Ú¬µ{'í÷³|è5§ Vœ2¯1C,óô¸Ë“ŽëðjúÜHkyª»÷‘CÝÊ©KÖÞ>¬KÙTÍÃvc®?F°¾evûýäÌ€µ˜ w`åÛ>×7¢˜A$]ei2§þ=…©¿-¹Ð|?A0Q~«èd㬿-_ÎÖŸ;‹×V ½9Ùù°øÝ”¡b—FêÃIóa˜)©y]Åa~›4‰`±%ô=å¨é’õvð—ïÄ’óÉ’ºÙcÃ73ã°^Se± öÜF5°h§Z>>,骔ïRA"d?+ÆŽ³i<ÝAaëzîКä2Á( ±tÞÛkÏm% ‚qB.Œü°£ÖŸU'±sÃHï,ʯÈ>&§uî!­"i8 t3è*# ±ÐuoÚ°z£ëÁñ-|ºÔ=¿ÔÇ3?üb·Á8#ŒÉßÕ‚'u:MÞyà·]ê™Þ~õòFjÞ.øV„¬W& ’Ó×ÔDMÇôFуÏk‰¡ïsp]»nž;XÚ°Ùd·¬UÓ¯¯P~™i¬¿sͦEWÅëÆÀt!û/% *jîNáFN23â¯H°ŽdH Ó ŒþuÅGç =·{pœ ›YÖ‹edÙËÑDÎüæ_ùFtSúÓî£8¶Ú°ö4ûK"äÒéÀY¸†|ï -ÿ6°wæ¯rRÎé<®cc`ÃE°øC¢LÒb[T~˜F ÜëK2¸W€ÉºT-ë7¾ÕÇ:v"¨zºÁ]ƒ^2ãPÌRAnaÉðVo2Ѳ‹Ì‚Ì/,ÆÂΕÛ<ìâ¿Eÿj’_.Ö±ËÈž—*£ÄÀÆ‘ú.0¥uZÅäêül¥Í™âìQµjÄdöM]OR¢ò!Ãe•-=Œ²vX5BÖ¬ Ö¨Lsâ§Øy|” *¥³YÇ©Íþ¾:ø߃Èê˜IG7­×ŒòNù•:id%n­{ÖǦ‚·FªôˆrÖfÑÙä Öh:ûa/Y¹…Až2OŠF?K)¯šeÙûï6^nJ±€SMËŸ‹ª7SÁ' PÛB…ãó¯u^Æn“ ¹Ò\Tòy̓Ðu†æ".3é7ö¡…ªft´ú¶]*õŽ1ÞƈQ¿H\qžæî4ù u¢, StÎøFˆ· îæøæi¶ ¶eRATÚ®=©£Œ… ®—<Þd( Ä·°Ç­…•²Ž9­Ur¢fê`4!ŒÁ0¹’5¹ãìIŒ”úkM±-7Zº $(ÁóDP&“ x?n~’ƒâ*ÒÏùêi ¶«B7*òÎêgT•_¦5ÝD|Á8âS”tŒ¨µ_ïáœfúlb˜öÃä›ËE€MÐ+òÓ²±Çms0ff'ílRŸÙêŠGeK¿l œj´¼$è7Dœ†ÊÖÑÁÞvÓö83ý!Œ!ѾÙºÁêŒþ¹¡wpÓ7ÂvMjÛâvnþ°¹^‘D¾kد WÜñŸâÍýZJ)+ÃIGV<œÜvJo7ifdTb»Õqm®Ñ^Ê—–;@è¤ô2 öòKƒéJ;~jÎVbðz¤òƒFÍôf-Ufî`ät¹øâ›`ÿé˜5[OÐÂË£\|ÕŽÌЦ|4ïá¶µøaÅÝÃ/NôBÕÃÚìö‘bš¶–Uís|Ù*5w¯á£GôºŠÚyjeêœéee.1—î¤jÊ;8öHÖP“Ä‹BÃcÅ êånïy’\ [„=õcÃl±Ú÷Öós†_7‡Mü;~yGWʨY§ºùk$¹^O~mùˆ=(,qŒÛmk!ñEÙ”º]õNžã¿ñ`º§&A,f¸o}T‚a²î‘:ij³Ü¼½J@²Ck‡ƒÃ¥¡;+Ü<ñ®úÜŽBGA !¬lí| ?ô©Õ"XâÙø¿Øuݳ Ú]WG¯°Œâô›F¬"VD+>p™-¾‰ÌÇJb¤±5')ùÏ%š±–¿oZ„BvŠ@«’œÁ¶}/¯,ƒ3\Èë’Ø‰&®Ñ£SäÑkY¾Ä÷+q#›0Û7†|ÿõ•±ö õ˜E41tŸ8ÿ÷u½Jí’Bù•%®ÛbÐ&âêM ­‡eQHÇQE-Ûä~ÒÂóÑPÃiýi|„¡òì°8ÀÄêŲ4 ŒúlJAYWöðx ¨ÝžÅ¬’õÎxý„Ú“g¶)ÜËÒ°¹ŽY+µ> þ dì³…¿ÕÚîºaŸ,%r’)¢ÂÀ-—(_ ¢}Ì27Î4‹8?€¯úQôP`Â—ÂØÓ]?l'[r]Ui+×uvÚ½;ôGZÕ˜ëö¯$Ó¢În­C]ñHoŠÁ†w ·"Ë ü5_¾üÞw'pºTgÀÈ´Öd9ü`qñuQs\´Û ¿±4¶úq¤ç›p“ÝA÷e9À+2EOïe jqº]všÑçB >Ä™fçmÀ5¹Ì#%¥øC4%¢"·Ê ¶¨ud›D6qƒÕÄVv¹Þë¾úºX:·Óf.ÑYúå®sÓ:ÓY@ó ¶H%m¼ß0ZN ú×è·žÙ­–°2J&«]Ö<|J“®óº ‡Öõi3›îQm‰˜5蚯scßÕÛI.†¼9§~ÖW;¼Ú})UlùÎÆÛz“–çD¦æäAÓÑ·Ô&\ñ8‹ 2ˆÔD¿Cm—.ò"Àa"^‡ZìaÉÊ7|Y¶âŸ.12ë¬ÑüØÄtDA§é°–é4‰ô;ß¡oÇ:º]‡%‡KÕyãÙD™µÛãlÅ¥%ø~¯8ôÁ"64â'^„¥ËEbÛ$€æ–5a'ZÉtÈR[µ‡èáåÁCwÊw8+Õ¨OKb#ɺï¸,ñ~®tn¥À#¤ÅQݧ¿%‰8ÛHÚ€µ¹ù9^2áÃ2ò&)]¶uÍ…¼Ñ[ÄÕad„åBBÍ\–Ÿe> stream xÚ¬·ctem·&;©ØIíTÌŠmÛ¶mÛvŶmÛ¶mÛÎWÏûöéÓã|ݺÏ5ƺ'®‰kÞsïEL «@Ígh£o$lcíHMGCË6³Òwr·±’¶a“¤–72qü•3Á Øé9šÙX ê9±TŒ ‚Fzz 1@ÀÆÖÍÞÌÄÔ@¦$¯BNIIõŸ’Lúnÿ¡ùëé`fb ùûâldickedíøâÿÚQÁÈàhj06³4ÈȪ‰I‹ÈD¤•"FÖFöz–Y'}K3€¤™‘µƒ9ÀØÆ`ùïÀÀÆÚÐìŸÒhþbñ9ô¶FfÝŒ\ ŒlÿQQlì­Ìþ¾Ì&özÖŽ{àh0³6°t2ü'¿rc›%dkoó×Âê¯î/˜¬ƒ£ƒ½™­#àoTYAáçéhªçøOl³¿j€ñ_KC§Jú—î/Ì_­£ž™µÀÑÈÕñŸXúFC3[K=·¿±ÿ‚ÙÚ›ý+ '3k“ÿÌ€ `od¢gohiäàðæ/ö?ÝùÏ:ÿKõz¶¶–nÿò¶ù—ÕÿÌÁÌÑÁÈÒ˜†ŽþoLÇ¿±M̬a~ÿ3+bÖÆ6:ÚË lÿCçldÿ¯‘ý33ä“Ð3´±¶tÃü–¶qü@öÇ2ÍÉÿ ÿ·üßBïÿ¹ÿ•£ÿåÿ¿Þçÿ -ìdi)­gõwþ½c—Œž5àïžHþY4–zöÿ?=+3K·ÿ“×µV1úwºÿ01G½¿má³6ùK - í¿…fÂf®F†²fަc=Ë¿=û—\ÉÚÐÈÞÒÌÚè/·ÿj+€šŽ–ö¿èMÍ ,¬ÿ!éß*#kÃÿZÁ_ºþ•ÿo~eyÊÿÍ‚ý—¡ìßApTt³ý›Ûÿ¨FÊÆðþáç·qxPÓ1³¨éYéþÞ¿¿ ±Ñ3zýoBþ ˆî?ÏRzŽöf®¿uÓÒý«úÿñüçIë¿ÀYØþ3: ŽzÖ†§í þQ8ÙÛÿ%ù_ àoÕÿqþ×ܹÀ¬.Ùp𧤧:Ö`dMjôõÐÙ×+äùVÙtû¤„î°•ë~TÑ4L±µº-žÙ~ˆSŽô [’v']åâz’÷æ!m’´³PúÿÖ.†O=W‰ô¸^ÜSg¦U>Ü“×.ú€À›jg°‡º~&÷%tÎóE%z²Eð6H®‹Aë@lB®É?;'‰?y~"ì¾ï=À¡ÌŠ&æÐÃðN<#HptÓµ¨7øsfq¨XÌhV©BŠWrqÇy_rúIô½ƒB—zÉ€oòͼOË»¤#ár M_ÇMõsL`ZQ\»¶cIì|…yí¢Ž›=Å"}…-Ú ö¨!bI$…°€ië I™ŒWt`!]=ø¡¨2-+bªœšr×4 c-6±7BoïhYÂ.oa”v»£>WP¥bJmæ¹,õ—(uÝ‘Køƒ'-/¯šy0Åyää›|)c4Ï'6HÒf:Ù¤yÅÜÐ*8$OJct'Rµ‹ÄÕ>1ÃV’è¦UÃOöH±lâ{ÏûDíænή!&øyÝé㾉¢](·ú!5Ñ®K  hîhéoÆDõóO„ýêÁ†*ˆÍrœŒ6þ¤ôîpæ½¼tÀÓ5#ú‰3RnÒ|°k¸Â|ô` ²ø(ð£ÎoZËSñ*Uè:G»z¦†qÝKn¸HŒþÊ®äÇä¤À;ˆ²HB¹ËFN«m ±í>´§³súblNv%á~'þâg SO£G"0†Úl¡¦m}ªíÆ´3DÆzR¬i¾ÅˆAžJ0Šâ$w§\£8N©k¶³«¢ÅÖ“d†Ü¸‘$±J$‡„'ew¥ˆ!a¹ê h]¡d¦`%“¢•_p‰Nk­ƒ2⓳k€-*Ýcž,, ‰íAQðÇ=ßeÊKå/ðp3`CyLÀ¬=9^Ãé5o°–ê˧8êœÊWÁƒ+FkkW3tÆÝH>·»˜uî^sJhî ¹=DÚïÝ…Þ\!kîJpàQi­¬SÉ Í{œ–CÁ£»½Òì•`õéVr„ù´žmqMVô2jë~6›SC:¢ UŸ-èù“Óë-±¾€MÁO†‰‚³ÉK¿úãùçžLeuCä Úh¿®P‚RPLY•t©/=ÍhÏ_zÅÞ¬4ªUè@…[Å"E”±;$?ÊKÝíkþP`ºO‘W˜odxÙ0M–ÇWÒ+ѱ0säÝl´}ò¾Å¼¹ˆœ§7âM“ãô80 Ñ­oœyÕI¦‚Œ†™ãRÍ`a¯D0ÌÔ0Q2YƧx¯ê±¦)÷k ‡ ò™ap³‘öˆåkìΤ–È}IÀ?¹z0 õJ,at`ì¤@X)æ7GJ]iS%Ðy¼À!vZ¹î!΃›¼KVÅ®÷Èó[s& °#èÍ’¹-‡µrbúœ²‰úãóÎêFÍ…be(T[¼Äê ÕåÊ‹Q¥âI•çÙõrªöÂçs¤äâ8%\%!Shòá[¹CSÌ'öw ª@‚m4JñïÚ’Ÿ>s-’ª™rGvZ+º¢ÍqGßL/CÜ@ãÍ~ÌL‡ ߥ¦aÑ©îDníp‘mן4;¡AÎL|T E¿¯$ÜxÈŽ× »g¹hüúï)¾õ¢  £/žp÷FâÙÏò?/fë¡j¼Sƒs\[é…ß×%¡öí¿74x€²ŠƒYë;q'Oá¢QïŠî†²gåª)nL=û&O)û^¯v¯ Ô§šÎ5*Q,ìJñg£P sÜ ‘ùµ9ß©Ÿ¿{Ž_‚së¦ìñ„(¬tQƒüÁ˜Ë¾ÉO*((—¨›ê_ Æ [•6óq[ÑYÕ‹)xGÀO™ÉegO¶/Œp›‰ŸjÛ½$#‡£ÓIÌ-!Zv|g‚šùÉ–]Çè]h•Mô*ÒúN!f²pÞ=ÇÔÀÒ¼ Œ¨W{­ªe{×'“–†Î"Éh r.w Åb㡘ú;óÓ>%ÕxlV‡ï¹ æ²­Z¥ˆ.†±Ø-ͽ×Ãú·çJ ØLø½Aåá#Î…Þë†,ÚK: T±:°ûÆ,B _´Þ2uÁ^µó†]]ý¡Ââ ƒËâÎÆ$%,*BGhZ_Ú@ò ŸuK]ù­³#¬gÙû®6OºŠˆ½.¾G•ˆ¹ùW*D ®;‘õŒáéqݨ3½_Ys¿ÉüÜAž¡·«å{éùˆ^ô -ã‰$ñ Ÿ÷>ŒQôH§¾åîÍ›Mºt‚iú+§¾c`dAØP²MŒl1R{I· õø5BÏ?r4¦>Û±EÃÈ·y `j%‡ aÆnêU~6àû±§Iµ$ò/æÈ¸æ°¥Í2ÅlH£¨®Ñˆ-ãH‰µ?ˆ“-/rh &=“;Å”Úgž»`¦=جÉï|Y¬<2#¤Æ ë”cŽ¿@’EÀ—°*©=”Wãì›ŰH:ÿ¤æ©ì&"ä6‰éõ“ñ€jwa#&4Säo±ÍÙ–©9é)±9˜ŸwßÊ<ã'âYš±A&6XÕíÒ¾8Køm*†,ðö¥JaRSÀ»÷…tƒ‡ñÞÐO‚àÿSè³7“U¡ý@LJ}DÝ aõmÀ¦™+1€2®/e›fØÖ:Ûe$GB>cð³Ý…qÎý-‡°Õ“ÙóšÔÒ^Ãái"´“7 ó=Ùsw5þÊTQLõ|¯Ó’V÷x<&TÀ!~ ìÝŽ ÅÇ¢¼Áãv^š×:þNÿ]4|±—Lª2ÞVÁ9«$èA¢b>öS¬‘´q*yãÎ¹îÆ©­&eÎ7«‰>ÞÕ8 E^^P\§žÎ½F¨_’]Å(ÞϰºÔ;$Yœ®õDÞÝ8ÿñûÊÊ .µ¸Æà ùÔ´ôN¾ï}í2„4˜týRpáÂ÷¥§Xt„T q¶_’ìê’óìò:÷”%¡gõ wåa~ó°N††ÒIKðL¤šh;[“NàíŸùg¢¥¢xJûÙx¬,Q ~ÃC‚Dý쑦‡ïYûN}ûóþ‰ü9 ¾!r¡‘'A B3êÕOpZüaŒªK¥tsŽËî°±mL¾B‘Ù×ݙےN@ÓW \XŽ0w8)éÿ‘¢h¼Q‘–!oÿ3sgOÔv‰8‡éÁd ö;ÿàuÓ›ƒâ" Ü„íd½ÎLN¾6ÊH2vÛÒ-8v éåKs‘[T}Âr5”+è ÉR<|Ž©xœÈlYЙýþw¶UÖ&*CÅ­Ÿém š\J=ù»0W8J‡Ð;¦&ª%±h¾Ÿ ®åØ¢ÞÚ£uëÍ~ÛŸ[Sª0•g f\è²›l&ߟ*MF—¿ÔO­3€­jr‹LbÓYžÜ÷TLga€ ÐÅÜàë!ÅÞÏÐe¨i·øôK0­3UŒï•]prpã rJH=e’ZB™–SZ^õíŒ, ø%AòYÛX¨|è¨=_—ô¼Oã9sà.L‚ŸWþƒæðšUC æ+ë­˜Áø¾Mð˜›ÝoA´5æeÛ”!"4,QÐ2# „$U›O–yZ½1T‚EU¦ûûÝqóŠ˜ù»'Íq2=ÌÕ*D3fnl¹ÉïBŠd<ûdvçr^„·ÈvßsÖkŠ$1p×—fBnôþý,£c†þïb ­{œÐøL ³q þÚðÜh¡§bçZ‚zú)1ÿ¢ÓÆ$8SÆ–é‘шñjÖ0Ô'~•§gZËÏKU_kb*ù6µDΪPDXØ u¶œD¬’u6 OŽ7Ó¨¢¾îÚE³(ßõ¸ý}òé½z”£ G‰ÊVsí‰8mëÄ,9›EîV-5‡ø)0ÍøÍ¥‹Œ÷é°â‡'Y— HÃÔƒxuÅ„Wÿ}JÉ‘ˆ4ƒroœûÈ@:þ>®XèÆçÃ‹Û ¹vvU@d{kòó>KцKZ¯‡ŽŠÕIáÉËd”d'q¢-;GÌ‘¤hhð…Y‚§w¥a“¸ýˆ‡jñ6Žš])Kú 0ÅnWéFhk;zkËîèKvèèÅã0ëÐçýxÆe`¹i¼Tž÷1¹Ó|õg~Qf0¸Ï«·Ž=G$z?øD}ÁI +=½)„7:¢»‰Ç'q)·2%lŒ—ž¯/W:n=S¡Ya¦AŒP"êj,Xõ8iL›7±lÝï8ÄkDyJyé±3YØ)œÿB •É(› îÓäDY ¦Få4W³9 UíòºS}Sv= ~cCçbj¨”ó¶ðM'»š*ÄS„8Qe°#/0%/.sÿbê C›ˆréš †a{–Ÿò•Å[ ²i\¨ÂÔùkõTÓ 8  BÞµ ,lE£¤ðpj_áµÁõ,a׫¢œ—‰‡ñ˜†·ÖR¯À½`FV\/Oko?ŒóùE–’cÏœ'Kd„âð”žþí“ÎŒ¦ÌFÛU‡ž`ËÈøÉ 8Má]Ãév¥{µF­cù´t7ãoH-‡9$¯¯Àø9ÆÄ/—è&êÑP±è EK¨¡+³|ÂUt£÷U{ÏQ„o§^-Àä9ÏÅ­w"¢»`âžx¢õK`è +„»„ß,‘ ¥Ix œBïë¾ûBÍÌ·{oBpõ/§ª]»¿á˜ë4zÚmcï ­ Þž)ÆÐ~ãûÚ+ð„M°cšu‰Òªh˜Ak sŠçà“·OÞzÎYÑÝAŽÇ€YöT2}|®?74õu™¡¯]–n\‡mèW¶PÂ(u*Çj]u°îÖ 7ö AÏPÙ\“YÊ['"C‘ ¤ިnÙæ÷ÚDüp|£Tõmýœñ }J´.d{™Ÿ¡Ïc¼¾bØxr uÉGäµíËïÁB”›x1 n×DhV]n^?±± ÉGÖ—ÛdÈD짃/Zin 7uÈ*t_3JÊÁéÐn§SÕd´‹”Ù`lòÝT—éÊ ¥!O2¤ñ„„¿ÑŽö'D/ðÅ>á?îVó è Îå܈9ÿ‡eôÜÀÀ@òÓ"˜Éלìõ8ßð® L©‘Ìžuq¶P< ïá¥vŸõßÒvÇûòwÿ,ÝŠ\NÖ(wù†®¯*YžÇζ8ºÖþª¬ÿƒëqv¼é#ÍSÚJaq¯,˜`.­wÔ^8N)¡óã‹©«¾æ—;6²A ñã!<ÿÙ|•.×´!cUò“Ç&ü#fJ‹ý@V;·3![¢~°zYhˆ‘mC?^¸t@ÚÔCíÃL–0è†nÞ„7¨g®D(hùûm¢ì-VäOˆu˽\z˜ euSYÝ 0iùM3ÎÈí„(jä4®Ë¸YÙLÑáC5»ÆÆèĈ5Víà{;lÿz&¸UH«BæGûŸa킟khÞ0ÚK¥ì’©‡6.;kßcûØõ¿4´æ‹-¤0‰3 ¨±NUZŠ|³­jç;àªÇ/HÝ‹‰Óã³aNi$%÷‰Ñ§qÃLÝÜÖÍ~û¦ÈM×ÿº°çy½øò®B] ›C_ôðOÝ0׊å°Òt¢6)ÒM(ŽÞ8d3‘³åÛdÕ‚p3€&œÔÅO:þµŽs@Ÿâ®÷ÀW{c¤ ¼vÂ,/­ä<ñ &^ÐEÔêü>) Á.6dÞÐI­Ž¶Š´‡< ®‰Õª%ø~’yµ,óoqùÙœciëÔaN´¢ ¦ ¾Ç q¡C¨@ªN1úèÎ=Ö5ÌûÞb§¡^Í‚ 5Ÿ´ø‘h? !Žƒœt+_è¦êm¤A»Ösö’È!r“ÜáûÐóèúK¡<'É×b])<¸zÓ䵋Ó!T·3p8ÄÉ5Ä ñÐÓÊØõ—B‚È8ô#Ou[VÍêLdÒïj§g¤Æm´)™ Öƒh•]Œ?‰ð¢n|6ÿÌ•ëžÑÐëëk½ÃðÌ6ò9ñ~Oð±¾Ç›Ð›ÜîO#µóõÝ»  Û•³ó7Ý’Ò·©ü´ÝlÔëÆ¦Ù8ñ¶zIU[Ä5Î=JnÜé-p鑸ª‚î“¶­hÙxwîßC#B$Wõêм™Æò¦ÿ±¨«\ŽDÂéëdwþÇÐbdSBÑ‚ñª Q¡õ>ߘtYçQ¥ÅˆlØôÞt/éEeá ‹¿r¬½K’"¬:QîZ# 6G6gÁìQk¤¹Ò›Ì¤VÿÑÜÑž#ƒ¿˜]ÔpììHùIm(!Šíþ9Ç÷.²ªô˜4›îý¾/#nÙpŠÄƒ`…vùk´]¤òêó¥S윃tjå!¢8q£6P8¢\ð„•¨…šÄ@E¬d†C"31•>T“;üÎݺO²ÐC:GzË«XÛxyçÈ'z7ûNCxÈŒ¹#GµÙ—s6% ä üÒ?ð”çƒaHù¼z½NyS,*㇠¡¥‚ÄËŸT€7[²ÊÈÇ<(:ÀžNÌ^!ùaxÙ»ZnæŠ ýš¸56 …P"Ü)Ԝ왯%½j‡Dœ¸-/öMb¶êµ~Œ‡ëpÓc¢õWØIrdºÆ)ï1½Kx7-zn¥Æ«`hÒÉ“Ù8Ìl°î³½ék1~)dðN«Œ'N”aKoZÙÜI¬Cõtã½Adãš´ËÔÍŸôïæA ¹øçMö›z­ªy0NLÙÚKBMZÔ)JþÈ‹–îMËßíÇ1¥:¶²ü^¬ »Ê.ÿˆ|K6WI¹_ÀÿÀXóÄ–ë%e^D²†PdW˜@g”XÁÆ’9_F‰wjñ „ņÚè‘C'}µô¿2 ’ä`•*‘—à±÷ù©0$¹n ÙU¬!Œr"¸p³Ù<ëÓ;qf[˜ï©¾è&Ÿ”Ú­ÝŒ3y;QˆCI>Bú…é,·îÓ[²}yOƒ7ï#M Ö5y“ùk„¹+"¾«Bý ‘ÃQºht4ÂÆ©‘.ò¼¹d®ÈXvh³NL'ŸBcç½ÂÉØ&Eøâ «Š3ÂJ:·þNûV>7˜ø§˜ÁXIP„½Ûo3”´_¾ YÙ:; ¨Í•ûÎüo8äºyªYÜßbÙß™xë&Õ¥rI/¨v¹ä(4 ûŸ£ÙVm :ÉyWè.Óc<þ?%”ÏNqÓW­Ó‘Š;î ›â§ÉP€8˜QŠ“tщ,÷Þk$A&ñèô5 µKúé|Ó}y#Z›p)êË ¿iØäIpAÀ«9Øûµy:ýâÔ’£ïÜVcnU§nhõ¢Íœ×:ÿeõbÐI’tÔê„÷=vŠykÛxcƒ²†M«®¶Œf ÎŽ(¶h†5/ÌÎBú¡…%Ãlk* èïkÜi!´×ÀÑ„äT\RNÕ16ªû}‘Ó™X“EÐA´vb‘Èô«ñµ›y/BÏXXm fÎo¡T“xü³SƉ¦ÕufNôíɘ˜Õ°ú¤yD¬ÏŶb’òÐÚ=Ós^\“^öBâwP”j c ¡aˆ„#<Ò¬ù©¦)äoRÑ쵡çCu(¨ª ­¨ $4ºõ¹X4æ†8‹ªM$Zu¢7â<M÷9ɺ'~=ñÝ’4Ö‚Q¦‘¹€¼C7M¾§h”×€lR\‚ –Ÿ‚¹l˜½™ª˜ÍH”Û&!7:ŠÎþ‹^ÅyS}x˜ï8*ÙL÷æø÷±“;“<ýøoÔs–)F½ïY¦•áCÅÕlxàYk¹ùgˆ1‚’Ûs4÷ù©¥·þ*g8¤j F€iˆÁùz…kTµå-Äöë!@Ë€`íÒi_QŸºƒs9´\iŒqP%à²l•’Q(w¨›Ý[tê±,ˆ$¤vRü÷qÓf§ Û^N£jnÑtë Ï7Ò®)˜¼Zj'T OWôsÄ0H¤qNgçøP'²uÌÈØZýånéWFY°…¾¦Ûb—_†¸ Ðb,ø—cqá÷cZMBФâXtÙjÓF%–ºufá§ô½3¾˜„¨¹ZYæ{S}€2“ ó½‚”G ͊^üÓ¹Pd%6Ò}¯·rÉÙÎÊf3Ì3R6Í×Äôït"/±$%„wáq$hÌ6ë‰ÅǧѩÐY/I†7&w©´Q;A-¼×–7`­ŸmhlgY| ¢TØÖ³¿ŸœÌYöguÅ–ÖÍýx08~WP¡¶œ¡ŽŒRHwxÛ@íqÒÓïm"¦8©þ¸žÝø´¨c ž¶ûƒh©uˆÖQŸU¢&)©  YÁrâ}–ƒì-SF w¦ß:zIºUf-Ú8f¨G””h@W½é2KPÿiôcÅåv5Ä;>þXSü¤B&Lmr·()Ô¾,«|ä7'†àjƒeë”8µQ†+_úzs\YsÃR#[aúˆKQ+zK`.]3:€è(J/³Y£-ˆ —^¨mB'•Žá%„²z7éÏÆ6ì”è¥ÍÌÎUš/;dLïú´îO€q$¶§³À«¢‰pNyeÄ6wÜ/¡¶¼é¸°¥¨kˆï¬×)¦cñëÁ¬5°\‘w¹_îê5½Ü ;§ ÁdxsE¡˜Œ€ƒI¢gC­ra[bY±?®å;ÙI¢W µ¸}´bEÑKQN¹D瞯ÔÕÐ%ä­n¯Þ(ˆöÏ.œ°PúXNFûõÛ!œMÞ¸Ÿ® μ©ð%Þa“£6PõRËu®»YqœM™] ,6T#n¬#?Ìc"_Q&G®2àD‹ÉƒHwìÖ¡Áèg1Þ¸NðÚ_< #R¼{¿«ÚhÓ–¨J‚YF0k§Í""¼´~ÂÞU³~Xþ¹ÊŒ›± XpìžûU— ó:S öºŒÖÜÈL£gMMcZóÊ|¦›(¯Ry@p"׿PŸÌ©9š.MpUš²5&³Z;1FTa0M‘à~ “Õ;•ú«¿¹_€ð/æLÐ]‡¬>¿Nfº4“@*g'†ž{ù ÍQÜ•´ÔÓÚV՜ވ#]™¸€zR˜=1…cŽàÍd£Ð(m.]¢áC1€Â·êÉ-Ö?§ ýô’žCe úÍrÌ³Ë Rh[aäy »…M,iÅ éuíýJ_dzŸE¹«(ÖŠT±•_52o²kUøœþƒ’Ýa¦ÀÈ5†gäO´=eq"䄊Wh1欎H§¶Ü^[;z¨Ñ´øÖÅbÙèŒÛàu‰zZ¥Ý2ÈA dɪÉ[Ò/õ¥Î¹QåBñ- ù¢PÏ¡·6k¼0¡G‹¾‚‚bëÎù—ÙéÖ§vë÷Æ«‚PêÍWENÆêý ‡tã‚›5¿ÝÅ¡t¼ñ{Hä¦.ÛüiYÚg+ŒŸ,ZåŠ@(J‚´{HˆÞÇgÝr^©8å6’ÌRUˆI¦•(ý’ÿ ¼ŠüýÄ-À”ȧÂ=Äwñ~~ñ.%±¾èâ –E3MËD™y$ZT„ämèî©ýçãÊ·ÙéPä¢ß¢F§ææPiòɰŒ>èb=Š6¤™ˆXǹñÞix>“*ˆw³—?¸òÎJCÄÈ¡íÔÊ©Sbo/ÉuòÍ´ÊCøÉ›ˆX¥È…ã½|ó ¯8ClO “Z÷} Ÿ¾ÇÊ;ý¥ïÙhh\÷]¢Û‘ÐÆ‰ó!øD€h÷ŽÎ§î¸ ~^m‹¨Ég÷|aïµb0¨\ uI)sÛ%2«DGoüG³x‰ú¶å¨ø!‘Ý`¨ø‰•J¬*+V«ü²A†Ä¶G”¹Ù²Èžã8‡ý͆ƒaÈÒ ä…?(g^£¹žÕ·mX©oȘ{E7SJ£¡*ãp˜#yJíi ¸ˆÍ Ù‰±p]jŽÀœÝ0OË.ç7ãC(w},ú³xðrúÉ~ ™ª*•}.Ç)Þ`ï¶Š oI7|@*£j*öO3HBè¢:OÊî}®Ö®šÞا©ãá7`·›´¶a0ì(iÒ94µ³ŽV«%À•+ûæYCàýÖýÃ$â°²´k¿i³‡âw¾|ìfϳÉK‘$m®ñ>è5ëuü' ¦~®j³°* ê<Ú•Îêìú´P-»ŠidßñGJÚóR r²P²­‘\&ßWŽÖžK^㬽:Ö'¼È›„mu—jµ IâBæH°VõÑdé‰üøà#þ†|€}iD³•#–Ϋ_5APëéíáâQ| »Nl„›¥[_8Ákz»+ì¾¥;*"€x׳O‹‰”«ñIù$@=ªýl²cø¨­>f§Q¯Ëxx±ðûf¢Ù•T2H†/÷í›Î–4CÀOzÈ?DµÍJ¯"hèÛ§€’ötG•…_j0EáòN'Ú©ã>÷kĪã].EP-="=Ç@x)Eí†.Æ@6Ý@œwîTÐr®ŠºcíÂÁ·ÌÜÅlÅ_äôï_Îf‹sÕ ®!W”¢ÖäÁg9i»#Ýg=¸‡¤·-Ùˆ…”–Eð$šÆýÌ+lm4‡ ËXü‘š"ÂN&>á8õÕeÿ×yè$®¦L­æ0(Ý”t¢ƒ…òG rÚÏIù?Å×2Ð I†`¦Ù³W•H¡6º’þ°Ló›‚ï(‚hVÇv*ê¨ ²E–™»H&­?Ut¯B1´EQ‘n²À .™JE}Ñ7$yˆªK³¯f‰œÖº=kÏbhb?tÿXVëåjº¦ûËW;B•Ü0FÎ^BWʙŶhhFï³» ñ}Á¿¢ZCXp>•{Í8šMÍ|ÖNq>“,‰1tq{Ä…ø´_7]š:ã"Q̃+óY±o}Ä‘WÐ[³´dùXÃ=…ÇÀç­p½ƒ$µ˜Ól«"g”žòÑÚ†;j?ŠB÷UPë¾±pvêøw(‹ ×pÄ5zåÛ·gŸ2fGEúðqfÕî幺`e+M ã‰Vd·ðÁpím¥§‘Ò¨"Âu|Ù¾&\.UškD¿_ä0Ôà†­¿SzB^ns$Þ«Ç{uÿ‰Åuî6FnÅÞ|5q˜{±ªþ!Õ,Íle»o„Í:Ðu½+v—í tž“F¥d³XêpÉ…S eÄqaÎG¹hï°3ÿã—-^\›Æü;%!šp!àWóëmúkôÌj Ę l%4>;(v±PØB³fQ!fowL¾ XàÚØß„,Ìn”œcÇ\×<ެg‹VÈ%±´J‹ (ë³[–a,K,¨-gft0ƒh¿Ô–·+Ûß‘‡1ÔÈóu?ÝC>¾—ì®Z%{œZІ ”Ä.׃ÒÊŽ#8ÜÆ ªè~>èý’_½Þ|ó*oçXy~ë\GVŽd½PûÁÕÛ°INz`·®ËKEÛ„²:©¸*ÓCåVzVÝ@v…›BlÇož™Í×G;w%«ÉiÒÈx¹¡áêÈRHÍ:¢*`ú€æ:çÁ¾Q®[$|=Ë3óÎJŸÃÂi-ñ †Øã¢âppŠò&€ãäíf/V‚æ¨Â<ÓxPT×ÃE“Ò<üÜgßz«$æ»ËÁòÕÏu_Ç3Ü}™¿Ÿ5ý„3³LðÌÌFÃÔ rhy1Ž ƒÖbMÅÚÒíp¢•›Júéöë®h/|î@j?î«^ZÔp?rc sZL”O×!?eâ‘Ãbo×3\D4–}™¸Ìl†ß„ҽѭmˆšô¹L]1îr€Rééý<3uüµI¦C”p»É¢9àc@Œ0q½qûþ%B–ê»l"cpOY«…óV¢T…¥Z~—4\Š™–Ž¢kÊ š2}YKŽÛT ë~ïxéZvx BÌ”uÂÇ¿1Ó0´†tóʦÚ÷LiØ÷ñgæQ·üVJ‚K,Ú±ƒœ—®áò#ÿÚ)悘@ÚD¶›ìbÛF;Ìu£žQ@ÃO æ!;uíçܪÉyºkÖ5.ÈÛ$Ùw·‚é÷a ð/û=ºÎÆSçõuj”â‚m‰E}—Õ@Rwú9žþ-¨©Vú þ‰ò]•Ÿ1s¼Â<Ø^1j“kÕ1y?Çv^º³Vî'á²2vÃçÇ‚…ZF^­‹Q4Mª+ÈæÔþ-¼2'6ÓXY 1Êë–¨ÓƒH9;.è7%Hà"Ÿ. ²üëK²i "HÕ·_µXÈís•â}ÝâÚ6Mû ÊfÓdÊìèž[àb¸8 Ö¼7ѹäG0ŠQ’á?fçHˆ ö3Ó¬Ç|8«=i4Œ¯^ m†5PµUÁpš/Ödÿ¾•é~ú~+aZ §kVdÖ¸¬¨Ý$à1Odq’1YìV(´Æì¾âhÿ¼Dò]©}û®7#ìþò }øjß: ½®w×GzyÛϵa(uï©åÌYº¼JzôÌýú£àkZ0Ï„T¥Ñše.žb{¼x¾­tíÝ@’S+)MPØ–‘3‘K'Þ-¶¸i7¯N lw ›õ»]k¢çFªvlZuJÒ.xŸ6X#¹ß±‰Fí²ŒÂ<Ü×…ÿÍ$-2€’EÆ”éh¶x5ÇB9ðWÚáölÒUd‹©ö÷PÔ· ˆ†³ßº”?|/Ï (¿Çø7±¸Û ~á&@(ðÓiœùŽ3]¥€öfv é¸ #‡—y耩R}7IÀ^v€‹þWs¬c—º#}>Ä—„‹ü:ýÛF~Æg¤e÷Í‹Pž¨=Lö\êpˆÏ¶=²u! #‚œôÕf‹Laxßvù*dý2nÒ Mšn”QüÍþ¼öÞ „4ý²-DŽÓðD첡 óüžaø®çd¾Šl 6u‹žÊš!>é~fLWТNÎ,…|ÅùoW…t /ñA®»¸ØáÈ´Q%ŸdWüÇ]ïd­Š<“ë¡úq ƒ¹ÉÜc» ·Öd-IÀ5c\Í•û‹Ãòœ?¡êÝ×Üp¿¬fǦ(5P»Ð^»Íµ¶ûòã¯.žÒ'ÁÞ‡æß|Dlieä•<¹íiÊòk‚fðì²{ln†… áZ€ubldÒ~a¯rDÈàœs”‡°ÔŠc×¹‘øav—îô_’+üÔ™CŒ)¯Øª„9Šœs'.G®ÑRÿbwDÌjãX€²µÂø|Áò·U ߉ø³Yê<ÆW}Ë5‹ØûJ?§zª¿J´j…Mo=(ÐÃ{º:>ÒŠånTœÌ›øPî9—­SÿjÁi2·ÅŠun"9dÕn¯†áºs!úˆô"Ôv¾€øÇÕ¬ Z…˜VrT#¹„ãS›ÛyDHÆòoÁKìò ö|›E”õ‹5‚7ö¢ÑåêÝCê î¢-Îãìñ ÔGÍââþ$”•-*»ý`A9¿Àz$¾¢Ù=¸ ]Fd’‹¥õÍöÛÍß?~´Xe)âϯö<íèhGË N|0…™LC€ÝO| ßŠÈn ׿Ç= Ÿ¡vÜÅW s“3gØòÜ4Ñ¿m¥¸Q`,ÚxX!ÄÒ;b«E¨v}„ì.E‡˜áë×1@¾Ïî\oä¥?O€gÖ6¾€‘FIì²)ÆÚzPŠ4œAä|¬ô*×_©c}ô‚ÝžÃò‹8#f U0+öeø+­2>iù”C«LZ= ñ¡A:@Nž´-MèñD‘H…Qü1ÿ)äÔòšþLYê7'ž½]ÔýXFL)µ§Z>„4F*Åÿ`4%÷WÇà:tM›¤ÐÒ04iú-Í©FÁÅΞø)®©ã²LÀg•@u¦}n‰¦0Np·þ¸ž¼y0ÊïŸ}gvZ­Íï8YWÑÄ|'¦|o>!´$ÕMî è<÷zÖ3ƒ/ñÛ¬a.r/‚@L3ð®ù'È»«Ê»Äb¶Ãf¯¡ô“¼ã#¸Jh+ÆLI3âf|rÎ y| nb#]¥n ©yK¥²dÎD†|M›¨-~=W<Úé%<î×–ÌïtyªÍ%v´M*zXÓðˆ™^[R™3¨NEA±©!z™‹ yæ}W?Ër–#â?‡‘èr†öÖ4‘dHÇu-*h“-&ho¿Æ¬iºþ$Ý€ˆqVæÏ¶©+CFàì€æäTé½Ó£x¿<>Ëç[ó¤"of›–û}`x,’Þ²Wਸ¯›ƒeLlE¡‹Hkè§'ð8’*/˜Ë¬Œ°"ÊÇV÷àòÞÕèÑJ•ë ㆯEL¶1Þ{ŽÚ*Äøµï@W/1^> ß÷6“Ò1Hf_d+ƒA0vÁÇ †ía_*ºx/û)–µ1ŠºûHr;Ëè·6äÛž'‡'M`‰—gœ–=ÿà‚çàA‹`›  ›‘N·V8ƒ{ù‹· ]ÖìwSœiÞ…GU2¼ÿœµ–c7›­ßvèCütûá€è×E™M9[·;geF<Ôï9RûMlH)}‹ê"½´˜×9&)ãÿ( L¦Àéáü £+ÿS-ä;mÄrèŠÖgâtR íïG˜z6î»+ã§Ô²“¦·]+À‹Nk¯žì‚ÏMì&…éfJ¹)iD³iQÎû7Êsg‘ÔÌñ¸¡[š êâkáÕGÍ·´Í WßOý€Sy™M?~ûlŒ2ÝœªÄ®z_”—FjßÀWß Þò¦>·ü0ñœëë ¼öONc½KÝÒ‚¨×ºMñSŽ‚øñóór×de²Ÿ´µ‹Vûî¬8¼Uö´6 tsà í†ÚæØv– ZU±§¿‡ Ub$¯z„qŽO½VÐôÇ*Xø¿ .á]WNAÇRñŽU<±ŽýÞ‘üý£¼x ”S¥gì4&E­xèX­ô´;£$œy¶’P;ëøkøü¥2‘Xe'Gw~có‹,ßRŠ£Ô7„ýL ˜Õ†S$o8M.ùµ÷í4..µ˜IŠ‘ñ„Ãn¨f¨yÃ;°ˆœ?äeçêSŠtÿzêÞÏ&?ØŒ:*‰7›Š)‹†vÔ5üÂÔÜý›Àn —0vlraÊ"ŽL;=x¹K{óOoýº»ªSäRH½]0ïêl/ô ƒ5QjIöLrÿ7DÚxöÕòÍÓ•ŠÏ/…%ùåÑ3M;T­ï­¦Á£uíZðŸ?hcÜÜþpœÝfðOCòŠ­° Ù0öÇzÆ¥…@¢#øxÐÊÂ듹Úêî‰ÅèwœL[«¨¤øLÙ[Ço즨¡²Þyõâsy^çÙ+æ»~Ä"ª E:X6x("@G$¢àÔjzgBðãS3æôÀà ÊÔ7îåÈDPíj’káð™(«&ÂH}©5¯ûášP¿uµvŒËåÔ}^êOE_&×Ë¡˜ã]l¬C›>p±à€ c–ôyÛ).ªãP],ÍÝÏ;º) ²UmTߘùæÈ·ÏÑS£ùUs5€Ÿômd½ív°5tC€üh"ñq~µ\¼­?ØâlæØ¢Q`Žþ˜8è.nå0ó@@QWò—o(ŠÙ¦ ÈÈHvðkºþÛ²¨(û˜~²Ê˜ˆ›XxV·\™Ö^z`^àÅ˽eñdhùÎÞ]oSEÖ;JáŠÉj„î ·û{»Óö“¶zà±…æº_J`”ÿñHǘç~ÏÂÜÚ­AJÖ–>4•чo¶7¿yñ½çø6}ìÜØCÀ\õܱã`6rênÍÉ.¹¼@ÝòØU OØŽ–ÝOêjçkµóðÉÜ.Á§ZzÓ  Ä"ÿ`àR¡)˜{ä¿ÜY/½Ôï (æwœêÖšî>l@ ƒé²2Ý„uÞ#u$‰ÙÉÂ|Mýóz\J¥¥”B­(’â뾯’+>‘;9he–f ps¹‡ð¢¡0tJ‚S­•Ë:«&wp5 }°ÛVÛØ ŠÙÕ…œÑãIÌ¥®32Ø0æq3tõ؆|%K &w„@òÝ&“IîéÁ„8*‹lšŽ\Wo1ÇÜ:XÊ®Œ‡ÌNÅ+ë&]¬Œ«ƒbø¦ÞCpª®î•uþÑÉ;]ì¯eµ…A–ÐŽ% õ¾Ý–Á¡¯=PJW´_ykeQvÏSõ®Zœ%zò§a3â½ãR{-+¡Æ1Rƒ¹4‘CÙòäÂ3€ˆ*‘ð$c‚ pf¼(Ðs†ḠÈ罸aä<˜%7B'¼e$4bÀ‹WïXNõÓ[X9ðŒaøæ\½næ^Þ;¹_Äcn€ã¢š u=ƒtï*ncj¿n‚Ô U—puº/ì@(ÏpWä úКàMɾàÜhÚ“k¿‚F/Ñ¥š§Î6°YB•ôw‹±»A¸UdÇŠ!MTÿ…höé³~†Š ƾ¬@³ó›-÷&ØÃ³Mª8’þ¼8nkaHÖý¤®}Ùi¼.b¢S\ˆ¢ÏJÞodòE-8üïÀ-¸‡Ä8åp?­ù‹‰³g†¦ŸzŒï÷·yÜqŒ Î]v ðª.Sv0ï[ÓKšÃç½–»®ùþ&6;Öywa£4öɤŸ/ Pzæ%÷ „à ¨I)Ïe´Ù"ºý™ð¿âmH¡ˆö„jGŒç‘õ¬*ñ¨ÚRݬfiþÀ ¡pµj]½]Ùôoô:)$b©-–ØSùž¡ŽŠïI2j8zØe ù} Sï‹(òÅLJÉn-¶öÔlïˆ"޾-_öî"RNÈŸš)"yžÓãe±Jÿ°ˆP‡ÒòAÒNàZ¨gºx#·¶ÛŽÅÏZ=RxïÖO+7%ŸC•·‹Ú]I… Ã&›L§dØ{r—¶ ¥žÎ_»¯*#`õB¶á}Þ±b¾7z©ýn°¥Å$Uh•mÀ ½—g›úìw'é4zuÀٙ"ѪßBÝÚº³K2¤`Ì1°Àp¹ü#„9ýéë,ÖÄ‹6e±gAzØWå9Ê:Ô&O×äD™Ù´-3Ô×?“>^݄ܭX­l’ДùåFð‰4ڔʴø!ؾQ¢1?–Òb ¬Î'ÓúˆlÐ+!Dî«K½FUëñ³%Ts°2_«!¼ ìGÙÇðç/|ƒ@‹À+õ¬2A˜s‘Ð.c Ølô¨#yˆo£)$m.â!þº/ÝiMØýN}Kæ¦íU>|Ôý]ì[-¡ã°¤‘ú¥%<4ìÀ{vÓT·¸ÑJ<‰r¨B/,ì.°D-\n6&×¼Üjî"3#¡Žèº+%Ë•y´SHR»?ߨ ~a*@[ œ2AQÝýº‡7 Tµ×.¦tùIð¿úw}Ë&²Š¬)Ü:5¤®ªf× ÛíúK¸Ž»‡$Yæ°åJ´ñYY·öËÉBcÛª±¹„D¸®~#‘u gDzk«Žð5ñ&”8U˜ïi–¨rÔ&!£O4Ź”»–žžL„}:{_@U®;AæU„dÌuRr,##¦Û%Ó}k\yçk·aXÒË)؉/üªƒnnÀµ[g’ÀtÂǘ[ÒO ’îÈ`Û\'^ŠÂŠç…‡s ƒ𼕠´Õ}† êo¡$ Á¼_·6©Ø%“dÊT²¹0ðvmð~DÒh–[\ѬÅ"Ð:c¦y¹Êc½ïßBæûM¥Dþи2ÔÌ ùJËpŒP §~r—#ìÄm—ѹnᓬVE‚Цô&Ø’Bi<ŸÚ“«ãLD°ö# þ(,o¿¦~Çb¶gûÚ­KØúè5ü «n>]ZË —. Ìb<ÏU\‹ÆäRÙ£Àavm3o§ÈïšÑ ¡¼Ü~UK‘ÅZ¬ëè”jjrIþci£,4l3¼%Ä'R!‘¥ eŽïézR³'å¸jvM•b{ž'ûb¨c7n‚ß:Ž¥rfåÿ€½wÃqº&2¾eÏxÓ©{¤9yJLgÖ鯧ü )¤ïÖ¨ð’Þf.x;Z—¢ä¾„g*µE´¹× \“v*檤µÇ b® 4•ÇAÄÒà>jFý8™íŽªÓ._Å…._¿¿),ҘߢqÂU×lvF™Ç…;Å žÆìhm‰*‰;ÒÐX½É´±M¹ËœÉap}C´t#¤Þ{ßíL´YI󄃫ˆéç:v¶Þ/„oÁŽa\Ÿ dr9kˆŒ^)2g½ðȵ¨…×:äùú|–ëN5Ñ»?M?Þü–ááKàU]%4i– GaÊÚäH©¬?B@¥)´­„çØ€”½[]çG¹£7h+_Cjf_UMD&ïÿ”O‘±¦cçÁõüâÃûàø“¢Úå—odÁ½k"CD– 1É+,Înq®KÛ𻥭«‚Û ñkJÀ•kâÿ Ý"÷α9©9úч]t‘Ò»¦eE1#ÐRf‚îN„bo¿¥|"t€ìq>øþQ <MU³­BÞ[oO”9üža›©@AZ]V†vK]Ù4¿ê&ƒ9™‰‘ÿHŒ]õïtê Ö '¤X‹ðÞÎß-9y¨¼OŽÀ*Lݳpñð€Ø®T•ºì›1N`ÑÞ0Á[±„¹#6N :ýðæ¨Y¨ÎÀWEùJž¢ÏZ@o~ºY=µ¦f^|Ìt*Â;;3ŠÒÙáeWûm=pZV=ƒãt¾`ßLZM —¾à–<'9@޹ËÉè!l.žš{W-¬ÌÔÄù 'Þõø8¨ÞÃ7¦ä'!ÝPØ·}Êqv©øÊÀ9Lj^)`±ì °Æ7]KeavJ+bÈí¿mQ­ÂWŸíBÞÊa¤¨•jo€¤EÛ¹«"ã]Í„Š«êñî¯Òm:¹—솘َêQ-ž?¦„¾³œPr-Ö &³ô­î«gÏn¤7('e”BÍî iôɉ{$vpö1½o>íû¼]Œ•$ÙËr¨–sµH­W̓1•ÜpŽ~SD|&„¥E1Ô;À,SÆnlHÖ€`°m¢;m…–¤·Zl}ÕßÔ.wf/Ž>¡QÊ|öN´ÁtÉhè¬A¬Ú¡œ1.1\ã,L§ä ¥j–\ðYpšÂ0ÐIŽÄˆÿ¾¤:š }Û™ã¯\EÏ„×5Õò¦rž]cÞ‚!É‹]”UÐßÓGMú¥˜!#—|´õ¬Úá¶üçÀȘâààÂFΦ$²''§d¨jV‘âäK§*«$ …þ·³¸úwÞ8%zȈ¡Ñ“ ©b†„dÅ<ÿtÇœâOÖ±fáåÕÁx; &.Hb|ª,XOÄb ú…ç-ã}‚!HÞ…Th±û>“Þßr>ø¬ð¢®–hó:Ü-ÆÔ÷¶í°\;c[LaÅÙkw¼×…ÉÀ¬dF³×¬ûQ]¸a1ßÞ†²­žw+^‘e(Øò0NÔ`lhýN³ÚÀ‚1`äpbû;£b² ¬³¤7.o€¼ñG$Ln×7gÛ†ßÃÒ ­/b¾û1äE#¼šÀøŒøè_ÜSöÄ#Ÿ›_!“ÑØH$mêe¦Ê²ôB¸Þ¬^sRm¹Qo(ŠJÍÝM± 7§ {eÖiYQœlÊÄU]r–N½ÖRS»ç²Œ1z(d×a,”ÞÄ™Ÿ—î§Æ¥ÓŸ¦·/Á²;ª£‡2~èØ2DL´ÌÓ¸€Xøõ&á·›±ï>isˆqqd' § -¹ÎA8´íßc.b¦&õ5:ªêd#D>¯õC`Dä‚ÓÞó"Í[ƒøº+êþsmÖPj¾ÞNã,,ex‹àÉðo¸EL4†¤°®N>:¶m.·ºV[£KJ½NhlD Ü {Ô_&†²²?ÎjÁÃOÆœ(P–#;.(ê› Ê|Æ!*¼ª´Þ|¶(hW1‘¡°ý:5©ÝA`cPÍпDP¢0¨Fݘsrm9§ ½Ÿ»¿;\"”8ñOâ·•÷D‹³™ÀHh¾—RÙ L*z=QŒz{xñެ“»ùŸ%®0¢ô¥…A=Ö` XäuÁµWø@Ϊú«kö™g"cÆp_ª ±XLrÍ—‰,ä/ã>£g1%ムÉùä/ã#ýUk¹Cýu\Dïýîú1É´GZh¦íҫͪ¶V°ºìl ÜV¾¤AO#¦ÆIe`Ôlºå:?rçiR[u˜,ζ» F§,çZ}‚Þaü"Ò²å][¡/Vì Ç¢›!IÐj'O0ð~yyLD¶’}Ö#¢°·Ç8Ûv°ñ_}7†þNÛöHËôÔóYàš‚¨VRèÄÇq48t×ôdÓ¯J;,"ضÓîâoöA™ŒkÄôòlB…e­×;.åc¼¸ÇËýÃÕø14ö°’}ãÉŒÜ.‹´±ÿ!Ñ%ÀÏN¾Ò¶‡”B½«W%¢;ï†ÒàÆW¯.Ó=6m¬žG½4ødˆžk¢ƒq¥uè>|e¾ìTJ/&ÏÔQÂÁ|”…¢ÜÒ˯¬Àë&\Fªƒ@ ;Ú2 ²§êwîk!ÉóTQg×øñ/«?qjŒ-³\²Ò?uTdo½ êApª±ÈâÞûF„:½r-`xÁÆJ#©I~pcV˜S²Þ{ñvØ9Ücâ½B·ù–Su®‰vÐòs-¡Çuº%%5Ì_|œ=GÒhvKf¨Œýp~èÛ8„tXÃô̧Hê¯ïðÇÓ´©TÛvÿ¾*µµËG¤ÏTÒMB úR…^MÛp¦¾"` Ù‰}-±D±ïÿóŸMI£î#‰mƒvvd›•¤v÷Úk¾@˜»G‰D 0]$™Ð¹~çp´Á…ã”üŒ\ ý+t¬ÕÂG1Ǫ°T·gëDìÁÓn/¤0Jʲ;7Õ¥B’±Ì³‡¬'‰ ™ˆÔZ…c4„Ö[ª *´ºíXȹ*¿/•+zÀF¥÷–R‘™ o2»¥<ð+’ÎVá;ÁëQt ÅÕnO>Dž:Þ®‡êh@9˜xë çL.K[ÍeÔ‘&K9.EoTýqü¹^}jÜa¨e}aÉ™^ú”MWb"Ðaæ´º¬Q@Oi×h"üÏÐH ÅŠÊ\ÚüõùÖj³ ó7ã„|…JàUÉ3—ÉÎ&ÞFoÙ·Q¶öíÚ1íÛ÷-n+ endstream endobj 601 0 obj << /Length1 1647 /Length2 13172 /Length3 0 /Length 14023 /Filter /FlateDecode >> stream xÚ­weTÜ’-œàn»»;Á îN»»;'@pwwww÷à4xßwçÎuß›?óæG÷êS»jWÕÙuj­¦ ùªÂ bjg ”´³uf`adæ(€lŒ]œ”ílìx䔿.ÒÎFÖ€Œž‚BÌhä ²³7rò4€¦q  €•ÀÂÃÃO³³÷p™[8¨Õ”5hèèèÿeùË`ìñOä#Ò dn  üøá ´¶³·Ú:PüU€@€³`²Ä¿jI+|PQP|Ú?šøêbl 2ÈL€¶N@€™#Àú€‰­)è¯Öœ?¸DœF'{  è# èn´ÿ ¢Øm@NN¿ '€¹£‘­óÇ8Û@¶&Ö.¦ða7³û» {G»›ìƒì«“³“‰#ÈÞð‘õ«¸ä?êt¶0rþ+·èØ™}xšÚ™¸üÕÒߨÍêl²u8ÝÿÊe ˜‚œì­<>rÙ;‚þ.ÃÅ dkþ¯ èŽ@s#GSk “ÓÍ÷_·ó¯>ÿ¥{#{{k¿£íþöúÏ@ÎN@k3FxÖœ&ιÍA¶ðLÍ‹´­™€…ùvSûb®@Ç¿/ˆú¯™¡ù(ÂÈÔÎÖÚ` 4ƒgR°sþH  þŸ©Ìø¿'òÿ‚Äÿ+ÿ¯Èûÿ'î¿kô_ñÿï{þwjIkk#›øÇž|,#[ÀÇ®ÈþZ6ÖFŽ€¿Èäÿ 5²Y{üwÁÿî­üGÕÿÁùïð?RˆØš(ÄÀÂÁÈñ3ÈIä4ý r6±˜Y\Þßv5[S £5Èø!òß÷ûÄÌüo˜ªÈÄÊö/58þmMÿ½‡Ýþî€ITDBECŠî¿Ù¶;ý˜ gU{ à?2iÈÛ™þçá/*QQ;w€ '€•‹ùã1~úÒàÞÃ×L¿›YšªòÄo»Ä¶:qJ¬q΄TrB\&þà§~IVº;8ÒˆùUU´ ‡²Ðýæ%Q3s'W–.Xôʈ}*Ö"h\^]?½4§ +WF`J+ŸŠo¡„äk8Ò† ÕºA:o ŽW0‚U臥ӌƒÉ¾ ¯å5Iø·$þ&È —‡_ƒÓmâküYZá,˜_CgÃÜc7 I!òGUI8éeêJÛŸN&eÞ¾[iª"œ D,~Nýv°ðm9°CºÅÆcÉλ^*ðHÕâ¨)›añÞªXŸ;ûeFIëãB4y7$<ˆê×±2Å)Á«i´F••W-ͨ `y^¯G]ÖÔT!…ü²wT«ŒoÁµõ窘Ó\bº›Ê†±nwâFLC•\>œê1öÁÀ…!¸"Q’­Ø«1 œ™¢='Á…ü¾Ó‹l1¶3ò´©T“4´ŒQn‘À¬E%¾ˆÍZeG°Ï„'%ÙÒç ݃zëŽèÿ‰dm8ž3Œ y[£T¹zøùíù?-¯:$9WYˆ3O7VüÆ9\Hë~Ïm?“ØD’×,u8ô%GaAíh<{Zd—¸K¬ˆˆ¿Þdö‘>}“´ÿf}zŸXºUcHÿÛÄfþŒÓp]®Ò¸4-u2y ?5¼"q¢¾‚ æÙtû\wl\5Å:ŸyÊëjbŒ¡vŧ7ŠtÙgó|z@÷ì¯ñΓÌ+1ç€Ïë¼ôîf£næÑÙ:zÙyõ=¡GQU’7˜N“Îrb7±Ó¥ŸZ2KF°Õ©ÌR²F¹Œä êÊy:jFPËó¯l[ T>¢S—,&@$͹*¿P‡kþJÁQ§_4®’Oq"‚Is¡Ù&³¶ y…0*0Zßÿƒ‘!É‘ÒIé.p1»Ì±6ºof ,¿¼ò+¸šÈGäx€¹ï¥/W‚ýA7Þ@òW·ìýiqÁÕªÿ,¹dr[vÜÅ÷êϳk“ðë§¹7ìuE¾4Šb"Óˆ´×Ê#¨\(øGótîØ[†„ѾÃ瀃’±W [Æô9=… }Œvûµ®M²I¹íÞïˆëˆc;^çSÚÞæ¹ôl\XfüL¾4źºnUž ÊFBÕjŒŸÝ˵>“ŒÆWðS] ¦§ƒºŒiJŽR"›ÜzŠöϯÄg‡Ž$P+ì èÇ焲yB¨)÷_X,Æ•k-… ü@ðf·x¬ ˆøªÂÃâm¤€æŸ¹ƒ¼ët8ßgèו¢Ì”ÃJ5ùY‡£ðHð4ä7‰ÂÝýI¿â¬RDóÂýIÄ©ÿc’˳—‡õ©›ªv¤mÁR;~þnÿYvŸˆBÈ™ŸcºE§‚‡Ûv«ÀÖzqº™ÞBµñâs›€¶†ÝTÜ»‘ƒ¡Ègµ +#¶-Õ ‘ŸáeåfVRS]‰=RÈdÙlSûúÒîJk"uÚ–áïR€Á Š©=òðXcn‡¢4d} Š4Ärõ…÷ÇF·hªØ?LÆÜ]Gø4?Ò¾fñ¢¤nÆÂ€Õ¬gÉ ½E)?d¹õ™B¥õif¸GbM!Ç€z…@5) $½ämìPÖ …¦gÊp[¢JÉ·ßšûÞ&…MîxåY¢Ù–6ñožítVu&j3ä‹!Y4¦k×¹GŸbá(¿5›Ñ0¹·IͦþƒPŽYáz¼áiDv[Ÿ;ºKÉ{ ôLt‚c#Kƒ»§Ùkʈ`¼Ädªö%lÜ“8R|ß¿!óÑÙŒ×F´9a1È ÿ\N&cL0h8ÿNF“º$ð€ËÏ̃kÌ݃XXqÛ£ažîWxÐðµÓ¬òf[ k ¸,PF¯g$|³¹@n›(my 13ꯈ„e2%7.&ŽAÇi«>7å˜\0 µY$@ÃùŽaé:yœóÛ”­ÁAÏÅÌß½¼òEÕî…»?üÉH¬-ì×D” ¦Ø÷ÏË&\FÙ¡ÕÄM\ˆ—V’^w+–þøÓ'Õšpˆ½ùЩ/Ÿ&qøû¸Bq×Qz[m¥Á1Þ'“Õ,ã3w;Så︲ôoÍs¨éKyXìÍ1öùHR§ÅV ‰Ò]lâ1LÆ%áfG)b7£âÜçÁÃýÕÐÁ…~^v›œ/ãÆ«‡PTËþ·£æ{æö,„gÊUä>ñD8/K‘·$ú†žŸbªl+ I™¤Á8 ‚£Gv+Ú7Ô6b›¸µ”›—lqpXÒŒ ¦;Qx È!5(+6ļ’HãëhòÿËÌnij2˜ó›³:!m¹ºƒXË’°ÀHtxÞwI>Ñ÷zÓÝ’ccÇ$úãT2 CØ! ±"œÓxì5z ¹É0ë³öfªàFñLŸ{X x×)’Õâ’#Æð7iåOzäFÚ~4õÞ°Ÿ¿Y`\Ú2×IôQF°i£æÃ—à`±ò:h³È¨HjNëÝ7À x‡”&,¼|š0¹ŽõÍ—žšûûD5Õ–i©>·0ýú£ßߨI<ˆKÅY楌‹Í‚€a¾J‡ÉlM$’XÍf'Xì³1²l„¯+!QQ¹‰€Ð¢»®fxa‡ðúüǰ¬!8ªˆn©uŒôJâ°»«ŽgmŽÈ,±¿2ûÌ*‘ô’˃NP ›œ>¥+/"p°¼ßIâõÞÅ%7jöJAY©ØFê$ºß¾ø¡ ÀXÄq•®/uW³æ>¶¨%Ø4ïDp“ä"öД٦¢?Ù;üâÕGiä,S×äÖÄ€øŒ´jï@¬všIrþ–UgJ^ã;ƒÈoËZ‘gÜ«ÍVã¦G7‹ïFü¬ìÝÒ˜—ÄÔÃìYhü6Fu¯3Œ‚FÎê÷ÂíÈKóÁ+*TE©ýx(ñ`7­Ç®SÔ×Þ^½[ÚéÒ†8Mše÷èï¼Fñ71E C~“ëÎßàL%IÖw3]ƒP¤FIž­Ðz¸õêû‹â3•Ê }õo™ØçÈ÷„¿Œ6ñ(¸qïP1íÅñ'­.tê]ÀËßgo”zßèâ#op“u2¯ŠÚ°Î—Ý÷ÓØáÆ/ÿòW¤.\ÑK&ti.†þgÙw‚Xd5ÊÏß’ÂxvˆøvèÜ1[·Ù„$J›¯&³1°Š¬J”•„,gSd•`1©ïüVV!åçàGGMdk…†Ýð?ÿ°Ðª9ÔHžÆÑê w7oB ^±ƒ&4þÞU®áþ;å¡À'R›•üMTsÙÈÛ’€A䥈ªÒ ó)~¢|è¼+ž$3rs¡Ã»a´²o­H쌅8Óay8¼%Iuu:'4~ò·†pò½W½ 2Å7íé)ôõn(Óåç[*I`hŠ+£³y¡òo¨³Ó§§jKÓ¬™ß3*"ߥ¹œøM€Ï§¤§Q!;>{ü™ð`dš‹ ¯œ3qÔ”>ú]ü ~ ¨f0ã^ûçjX^ô~ÈÓ]ü¡Êá­{eë_öî|jþ6l*Ê$kVÆ„m˜q®pÆÎ¼mÝx𧣌xöû0öH)ÓI8n A¨·ÉŸW2Ü8ÑŠ¯K¶Óº3Ìëä»éðép„08êf{z¾ $е’õ•cÂ,/Œ÷µ9ù¯Á_õÎ,”ùE+¤5Ù§X{}•wðÃF£¤ø.ÈúEÏÏ,t4d„8/_JŸ¦ÌËEéî¤w]¥ïºPz/„/ýq„ù¥Rì¿Ìžò¾‰€ôºý³7ÕÄø(z3é>!«^þ†W)ø–J_„º¹œË1v¾r(Ÿ¼‰»Çã7ne*ÉZŒÈ¹Ñ¼Aò“óΘòŽÎSqî{ûåXË1¨‡oxkJ„¾¥˜å'mæÌƒé²íNÕ7[—´àè[&À ž U±¿Ñ«ÿÝÀët”g90fQsVØ×fæ'#y¥øš–æW»Š|ÖÎIÖÓ8Ó@Òí0 d¹Z#º«Üq‡‚wß'ëë­°äØ$ ÷Ô/Îóàk†±ñ {—’ã0ÝÌ!Ý%~8ü=c¬fgÞìõ’Ý&#Ó#'¿ÙŠ73a‡FQ~ˆŸý°Šg]ñWàRdžU´lÈVp¨¿>áõ„ÿz5ŸÉƒì|<õØÎ›úùx]ï099,šÏS5·»»žáƒî˜ªÁ=dæ5+Öj,¶, Ëvù¤±„½·…³7|ºŒ·-Iš†]]¤ŽOà ¼‹ÃÕ„«åǦ’,1wWè±”ï›ûʵ¸ëÊf+¶j6 ?8;ŸµPôåÍ3Q{¼Ò¥Sè§¾A"?&Äb:US–¹•~wz2ƒ¯¤¥ŸÓ 9_ñDt-}6Ô¡ôEz-˜³Þ .,w8K)£‹Šå*ÙhÕ‚,Ù•nMÆóu•Y›ª™çÓ³‰5}Ä™Ãò˜Ê³^œM-Áç,9¤±<Ó]æÃ€d£¥Y±åo‘5I’”v=©óG3å¢Wî.»Z‚„“&¢¸žV¢°ü]пOƒX,ç/½!¾ÄŠ®ÌÀÎ×€QÂß´œSIÄuwÁÏÉÛƒŒh¿Ôå<´ RWE9ab«7§<ÖPJ«wT<=¼‹cvpO³;ñ æTå×®Õ¢éú Ç ÏÖó>ÙjøYœy.àÍ›*ú88WÍôµ¤²ŸµdÇX¹mHU€k >ß ¸.Mά—n—é¢ôk'71«ç\lÍŽ¸Š»=°Æ >âL‡å»Uv¨pXßÚçôdUpmϲ´ÃjˆÝ ØŒz6¡£_~SJŸñ¿6 Tf¿¿wEÌEƒ`S5ƒ'=UdT¾XS_c+T½Ÿ¦˜êbEJqΉ)¤?2tJ"}V.Só!#é’màT#Dó<½‹ë;V{†Ðäàµíþ%'VŸYõ©.±5P[úy¢vWIxâHumžpµ@þîxlBÄ%|T(V"C¼¸cEÀ /%Aø"#™i9…ÓŸ'Dóåb+¿M,¼”›„Ъ´s~û§b$·ÔÖãR~™4öu=#}šâºYRÕÑ뺠cÕ&ïíïôJsÀê„熺¦¶2eÇ«¾Õíâ>¯Z鱿%W=M¬áÔ×Í óÄçÎ\Ì}pܳ‚Þ8n¡¦7r tH¾zæåD1ã'Ÿ$ëCÿÖAãÍæ?×+jWò„¿°!þœØ3ÍrTû½ºk\ž i±ÝÈ}Ãßv‹™Æi\4äyƒß®Á™y†FZŒµ™$3 ‚ÔÞæ6gýEd—>à~îëâÔÈŽw˜ RÑÅ7j2eöÒEØuŠ)ÇÞ¼ÑÏnêsu†w@ub‰Þt7M×Ù‚ÛH³|ï+’ ûCwÓ"øýEgMìáÆŠpÈ"¹²ÔܳX 9¯$vKVÓÌÿª JåPÒröbèÍ’äç@æçtœýUÒáKT¨–Ÿub•‚ôiT,ï¸^P ÿû½XÓ‘õˆKìH› ÎöBr~¾î=´2’]&A-IÔ’”YÚ¶<Ø™ºeN?©ÐkÕw²¤›F¶¸FOœRÝcf¬LsÐŒX½¶œLý;G<ÐNŤ©_Ô”g½2ÒÇã^i2ÞiuwÍ+%ÖéO£}’70{¬«uío»í?ažÜíˆÚ«†ÑàËß|¤öÍ’vÕÏ Z~£Ë™©çwqY]ž„Ú™ò{:–¨gÐǧl‹ µ{À¸‰­Ë»°3ˆu]Ž‚G¡¡há #’L}!ïÑ'ø»¶O«›B+â«?a[/´ÎÛĎЦºÊÒX‚]±Ä¢ì–”*¤ZØ«âr¨Ã7oJÑBóƒ2­gêRKõ±rÏÐÝ;ÚöæR’´¦ªà:8`ß+¤ê ¡%Â]ÊѦ…›xÇà¾6•ÃÚ`ixKúy-yÐqš}¹Ì³à¢M€˜7w'›û?›"Š'싟¾&sÀs‹q²åïô?S[ûŒÝ“‚/­NBeYÅu?¶Š¯24ëç¾FÀ­1E°–S™L†bDø½g§×­$Ša¼øVµ,}¥QŸ(ó8T {Î_×ÇfuæõG¶.U¿3ž‘¿;£ØjÎ…âÁ:¾ÐÁ5†2ÊЈþœCópõ¡?™ýY]%Ô²â?þ0˜ý¢o€µnlEÙÇ»{*À¹CëCÇ*ä½ø¦A9¨b~W}N¨:ÚšØö«G,£_[†qšEb´GÏ0¼0¦Ä±µn’U¡$…óv´!<7f,J$x‰@"½$™›õäi>#°ÐÏ[ÉÄœ'—º€4ÜÑÓ΂ú®ØEÔ¤k›ÛŒ®G¾’¾<]ÅÍjêLþâ!WóAWÕö{——)f“£Á“ÕÍ'Kv; ís«–¶UB7ÿôt&uÃ9AJ ¾¬‰¢½– ôJqDÆ~Xr0?£#R«“Åè]®Ñ4é&³žª Ó}“"C!ÓvzÄ;èM.969 -¥Ä~÷Òð‹¡my¦« á©ÒªÀ¸y‹è“•S6æ<-ë¼1÷²“½›àÕÕ²Ê, ½Ï¹½Qs°oG–eä~Ê4Qa"B¢ËîöJ³¿9)ø÷ûnuìô‘† L–ÖÌ ¡„âóõ‚ËÀŽ*Q¿`«kJF/çƒ/o§ÛºŽP™É©¡S—^ë’}Òré|„/æE÷ˆ>‰¯Ñ4Êͳ=à´Œq¾®±¾õ¤Ö~{×n µÍÞ©•º‘HÂíãâ„‘¹r<˜&?‡-y&“šs˜+‘«.ÇKÍ®ü¡µ0¯™é÷šm{íPZð,ŒÔ¤ÄÄŒ‰ÀÕ©Ž»´h€ØP0QÇA“ÚÛ—Ù3SDÇQ(>Èv™éÃ$xÚÈ ‚¾*’.ºt'-ÚÜßôV_`Àûö8ú8å^Ï*6c¬SJàv’Ç&xï¹ñƒVÁÔÞ÷wJPŽ?‚9ø“2èU¯·#GüpŒ‚À³|–z]€Nq%RM,NéMï÷¡µÛ !qS¹uF Ýì0æÙ…Ѽ[·Í;o.éR_CÜϸj‘A¯t0ñÍ\ãF+uÁ5 ªw&ß,µ*¢íŸòf¬Së\‘e­଀ÝÖ7žBîZ¤;,J™­ŸKYÉÆ«ÕÆ÷S™¢„ãÞTàšôs´ã £Ò1©'ˆæë·Èrü^šQf<acƒìÍÓsí¸Ô&6LsƒðT‘1ˆÏXJ¿öäx‡?XÓÛÄmÙ åH½›3‘oè#ä¥<šÕŠ6Þ;L;øøËÄc«kjÙ>¨¢Q ¬ÀìóºÈ‚Ü(ÜôK'Ö é@2K|$Ç,’æAo²OÅ,½âÙ#µñ/Ogáédðh[Ò™ò¤¶ë‚ãs z5¹ù‘YP•+&õ?­çè:…9AÂ[/"-•¯ sÝÍU'`ÊÔØðïgšŒÞÀíÌ©÷> ÖþZv>+ªSqËQiÌr‚û½[ÇbSóûA"Lñ„LÆàœ´ü‡L*e”¿u[Ê„ðãeÄ$º‰Ùm`¡6·xø)‘԰¶‰çDS/ø”D'ðwó#Vc&¡GQƒöíÒ'cue JÁßk×/‰iþ” S° ÝÛš1O| Š%qb_9T„“þþócµmÇÈŒ;T‹†ïG¸ ü–{£ø©ÉQ? ~ýÑ}øÌf¸H4u­È^DÌßÉxëÔO.,¨º¸-Á~EïÌÓƒªÛ¨C?!Ûß. æ6*&šŸ¶À „˜Â[zÚ‹Ê@(^7ú!ÓLˆô3m”7kæsœdí{lÍš"’`qµmíyQ ¯–$!§c„†X˜ãTe_ÑÌ->²ûe™/#êíû5Æ: ïÀB¯F‘ðèYOwý‚dÍ <…ÚgmvÞ¢›gkç5\ i‘Á°\‡'ÊL2 RU9Oe˜½·£è•b¹C¶˜°94îžÕ‹×6 ¨¯F^Ša¥›˜O/âÒÔ]ç©üÔH²8ˆ€)ü¥îòqeSʳ¼ð…XâæËþÓºÍLWp §§¨ëéQpÁðS€ “Ú…åˆÍ9è¸MbŠ%…—üðwÉPƒlk…R¹ÐªAdmÔ„ä“j€uèX“—çZvÙv"ËýÅ(¢l@Kã=²G·¬ÁÔ‰‹©­…©BB¤g+¯H¼Ûò1ÑB5ZfO{˜ ª‘Y­Sµ„øŠ”6å'e§ [òëú‰úúw²» Ïï+ «hF½ÝÁ"êsõOÆ4Xr›B¤÷°j¸h%Y¬NYÖã>—Ñ Å3ŽÛadõPúÆ€f*’úT©ô‚‘Çøvãä÷9Ùîv=Z –¯ï‡ò½Í6†ÌË2ŒËØL<»Ë˜ùÊŸì@È=47™dÅ&X;JgnNÄŸªàÛ;œM…Œ†°“È “Γn'PáEg~#•Ÿ_к¿ÃßùìÕêÐÞMndŠWU¹[,ˆ‡/ñ,%¡'ѽÊ⤗ù_Ðþ"Šutúò}XàA¦ü0ê|wC  jƒâEªzhšÒ o𥠼Œ:³Æj8·\TÚ?vOÊÎ ]È[¨€­Yè,CKe'ò&HšƒøëÕyݾ|Ñ7õÀÜJbUÍ%¨§=K­ÒŒÉpöë“73ÞÔ%4ÚùJ¿YPTuŒ¶ÒM[^?Õ„ÆCTCvN— t•—‘Jžz²“¢"” ™TðÎh‘uÁE.ã¿Ï×FQ6N¢€ˆ[é4¶Š™cqê\ÕiŽé7Ç(ÌNû–ÉnT³I"åk*±7ÖC[fi¥%ØàÐfN â “Ù“4Nz’í¿¾Ïô¿;9ÙU}- Ú-ÿ£Šœ|¬Ïš›T^S«Sš¶bBžR1Áøã>õ^ÿ0È´t­»oòyªº´µ›:Ò£cßÄÙ)ÝОëZb#žo…œènk´5Aò¾Þ}#ÚU¢ •êw½S,,oÔÓ:œhMõ ³«ï5ŠóêM皌ä-züEanWŠ›ìȂή¥ò!*½ÚŽàLPÜâE×Ãðµõ ÒLR­° Í]³–”õóþ p9ÞN݆2ĬY÷#ü&ñFŽù–þMÂ?/WÁ©¢ ßT|ª©€Ií|ǺÜǦvfUÌÉpŒÆ.+M$!¯æE:Rõ0kNÍH¿Ì+>±K‡§QÏê(Åð÷y™,>qI~ Bq`¹LXöľOJÞ-=Ó(2Ç7ð9è-€¡ˆÎÍVÙ¥>à]¬á ûu7acHÇnsA~³sIæQ†ráVoFPŠŸ!©€/öZ9 ß/»³†]Aˆh_ÞÜTÕ­9‹æ6Â¥Ò¹5×[*öKžaHþïJWr@ÐTé½ Ùñãçm.A—Ø›üAn¡d¥ Î1P‰¾¬ç­ TÊר¢ÊOAö)`$yj¢ú‰²)ÃwÓVº6K.(ÑÖogÎjv0 Óº\ó<~±ºlò®%2:šÖ³¤f˜ Õi´ñ_Cãs°SÉái¡‘_1çeyL’NwéÐܽE‚ÇT%Ì"¤HB¶àÒ£Qí3@v¢&Gƒ> .o‹£«›Ë&é ZÙM)ÇeA¡×º6¥óŽO«‹F§îh†½ó¢£b¤—ð¡\VÅðÒpäÍïP†×íš?\è>²±‰õ™J»uúüë!~Û2D#¼ðdwîp=*öøu¶ê!5øºw'.÷m[¹‘÷¨jßàwtNyס2£ñl‚W…â°sëšm8Ã{¸è0ÁÞéïn]ðšyk¥ b“oaÆ!&ï?2 -™7'KVðFC%Ðl™^5â×?í'"/B㥪¾Í¨#õž†mjBãI(Ýë–˜\Ë ‡Ï½a·˜À·¶™pÅ)]Ó ˜®ÀKÙž?åˆôpL<,Ú¡X ÷¯ãÏaÆL/}ý+l|io+ pܨ9ü ’¨U¨˜¼rïeù Ö8n坿wö'¬µí%óÓ’¹f|Dô…ÌXCèÖŽ³› S45›³•_‘õÌÁûd¨ïÖ¶³„ý«I —ë$N*«¾:ûa›í3~…åD“ #%ìÀäÔÕüï1t•Ɉäh&Åêq×”—×gaJD·Ìèõq’ÞëÌ£ÎEÚZÖ…ó­,ÄÝH]rzfNªT5¼/7\QÕ ?aU¡~û—×$»½’‰ÉÜšˆýj¦Ñ $iœN´š¡ïžÖºX¶щð+Þ«òŠ1.lá—ƒ¢? qB8Ô÷&ð‘¡+HØ*åôçŸgz±.…:0ÜÞ÷ >x¨™‹¬õ b$禃 4oŽÚ„lr·ï¸ÅøçA"ØáPŽ}‡4Þ1Ïá¯î‚/3é«öëµIϦÚ-«>j©ÕÙi<Îîý³xÖìùTÂ3õ8²½å …áãìõ¥«ß"çûX4¬†ð‚ÂO·ÍP·É”J`À<ùýïAQCËMMj[ C×`m‘Úæ_„}(C¿, †}f¾dj}qõxXåd‰ô×!Ò“÷ªYþ¢‹Êúôd%#©3}þ<¸bøëG» ÃP?wFUŠ@PùÇ )ÛÈÎHR­[[‰KÑK%6ÞÞŠºæ{r°ÓHPnEgyóñ&ùèx¿[pôØ×/“µB“Ç”dúõ¥ä0é¯Ãmr/ûÝ¢òÜþud…Ç}5616xÕ¿ŠXµeV vRffˆÚn:ξ Ñ¡H•y`éè"Š{P”æi"{¸~žwÖ5+}Ç òˆ® ¾è¢`ï‹S'M9@÷f‹¶¤×6J·Ô]øåÖ¦—Ñ—Qƒ'Î>)Ú2æÐiÍ[w "òƒ·÷ûqËàÅŸ»42ˆ²‡ÅœA§Ì>Á;NpéñDeBŸ€|º„O ŸÈ0‡‡OqƒòíÎ]3° F Mð¹ò+l®_Ñ ¾¾¶g„-;ßsÃë6{²õü¬i%BëÁÄTBf"*s+´Ç!ïKkóÈ…#Ì«ôtëp& ´n4C“x‹vö1­¸ìö´r{`w>øÒ@ÐzY¼s·ðZ¼›D-φûsùÀªa¦CT‹ûäÚ4í­Ÿ¦’w?üÀ°îK›–µ Sæb ;/& 4{i™˜­Ëöôôš¢–ôŒÑœ Õ¢Mz%ÌH§Y³>p8ÔË‚X¹~~~Ÿždšè §<²½××’™nGàd¾nòvA²ðÇ,s`j(tãáïw’5bž?9‹/Ž Y•ý*\ÀÀ­Ã⇃‘?¿¡’5ú`*T!- ÌQœCAy12ÿ™¬=L<ê~ïÑlgRE ýI2–!L%Ûè‡øÝydfq’~¦üÑ6F[øfÛfÚÛ ¥£ÃÑÑM¿ypsbä«9ÖhÌżΓê½î¢{%YÖKW½=e™3M÷^nÉ47¥r¿ë$NT£,¶_öçù•½>û®%’îö*mÊU‹uôÓz…š‚eþÖš]é–B?ßPÏÄÒ&hsyŠqjmõIˆI(Ãh@Æ»¨˜xx‚É%`η¤ˆu½˜³Šñ©šZKVµI½õ61ig3™pÀÙ˜|Cíƒaibñ÷Ýû ùk¯ kÉ"qßk=ˆ\enºµ&ùgåt*·* ½uÉ-É÷¶ï„ƒ?‹Á\¹Êt¿DÔŸöÞ¤±¬R³Ô¾é×…ìør¯1Îȸ‡„ î”îæ9B$.S—ÁÅa&3xÜ"ñ:Ǻ¼à6®'ÌG6¤ÉId †û7ÈN¶ð¿¿;l¦VÆŸ: +ìý–I"=-5—,PÁÍû‘¢ˆ£ýÒx¾*/5>U<šàµQ}tðW{ŽO*eÖ§À“MǶ‚b¤kU7¦6GÑK©çÒº(ß?áÙhõ '”TÂÉîéµF¼NPξà„à¤7_’ôoR²t[©I`Ûpj°’ïÊx@¤Úp1z±}gõ½^»ÌfùæÒší©Ö±6:gà”Ž+K8¾ºIR‘«Jºˆ–ÒÈ­jZ±2‡o×O÷JÍŒ¾NªÒúiP÷!v^¹3që:U9c›m^ÈIߗϧ›Äø&Úe™Óaå~"fx©J8WM/ÕŠpÞ²ùJ¹,ƒ@í§((#'õj@ú>2Š%…ɾ@ÿù .ZT´\»µoœ%vÊßÍÓ °_s Eÿ õá¢Kïjg0õ,¨ „¸'dVnj"ìñØãÖ¿ÖþÈ&P\2è ¤oóÙ5g0i ȲódP¯Ä·e½%2a{ð»ŸòPÐù•–ÜÞj;ª Ë*i§_ÒM4ˆ—”ª®‹¡ÕšftpªlD@<ùǸ(]¢ú²o:ÓxÖ_©?_ ƒû’GHð– *8ngC\ºÒ¦ÀIüûþä2y´}/¾‰ä.‰‘#œ£xd&‹ö¦õ[ä©Ì¿(üÖ±\ôß!ÿ矶N endstream endobj 503 0 obj << /Type /ObjStm /N 100 /First 896 /Length 3699 /Filter /FlateDecode >> stream xÚí[koÛÆýî_Á-.Â}¿.‚v7½7O;±Óù ËŒ­F]In“þú{f¹¤H=mGp evIÍgÏœ™%i!uÆ3!}¦l&”Ì58„Ítp™0&3ÜdÒQë2å8ZŸiAmÈ´A‹¾|ÏpEç&³Ê¡%ut®² h äÙQÆÞýþ€àžn†Ã{¿ü²JÆ™Kpc“œ¶!w0{“øžcî±Ãr4Í>ÌØ!()ÁÚ8à”“<>´4ÔÕ¿ \x}BJm-xhÚtåìÕ¸ìÓìCÆ^=>ÌØ›âË4kîûæëuzÅ{ŠÑtâÆá{쨘”7ã~A—tuéyq>è”_²,ež ?â6½1Æ"eˆ(7›½©'g/2gf¿ˆRW¨K™kÄÖ&9%§Ä·QÎÊÜ"¢VÁÞFºƒgö¸WÝi±ˆ´¸Òl4*¡êC\ÈBƒÚ¹[G¹=vPŽÏ‹qÔÉ?²§ì7ö'údEæ#Sçž2µï--"©×«\82áøæl ìÙ`ô™í?|ïÀöûÓA9bÇìíÑotüt9^ÿ›±Q9)òqÑ;Ÿ^çe’Jö3LûFë¤Ë-²1’c®NRù‰ýÎÖE‹®¿N‹É4/ÇmˈEâ–ìsló2§$·INøsdÐr:@ß-ÙÛæh—½m^#%«ŠCÛ¡²ä‹Tö÷MX©n{è¦V.s1/ׂ©4WçÖÕ0m;ü¥^ÀLÊûb&Õí0ëÈZVäT#m”S"·:l–ã"wk|pŸDÛñÛ`÷‹°Û{Ãîn »›«ôé¤Ï$}&é3IŸIúLÒg’>“ô™¤Ï$}&é³IŸMúlÒg“>›ôÙ¤Ï&}6éK¡àÃ@òkìöˆ ·Â~?R4Dd,¥ß5¼›K³½hl*×ffƒT¹[ßÍlìs¢D²Á„{¹k¬AÑlœA†Zgƒú6hÔrfƒ‘9çn76ÍÂKë€m6™žlo#?V!Â0pv,Zë¸.K!2mtøŽ!$V‡à3­d\¬¢Ô!i‹Q;2¢¾©äqi¢]Ž£‡Øã…àvd„¦dø¹7èyQrÀÖLË3¡P…™ ÜåÜï*6¼ÉiQT¨= .§'·ÊÐÆz~›IBåññ·²¹¢ÇË Z•0 Õ¨_ã á¶JjÊP5K•¢x]„þÞ2§§´7$ūܑ7ª­8J|EOå£O” h]‡ƒØ>!¤÷q;RBOÕínŒ‚ÖjzÕ`Á€¸v+˜·X=ì¶IJZºé¹ö[<¾†ÁªÁ5½‰Á\wEª‡oëfõ¦hz»“Ûu”[4BÀõ»P› z>rO°Ï²ër„Ý¢NvK/Á{Ђ "=Ðsk˹Í$¡òø’U÷"˜ø(‡¸áŒØQ¶ä&÷NU‹– ᨮ͈¯.ØeË´ŒZÔwup£ÀW±£à°6çBÄô 8e l¼-U5owS\RÄw»HYNW‘©±±2äAí(_6H ~A”Î7‚³;âe ‹mvÀul ^׆Æ6qP %¥sñIÃÖO!WSÚ´†œ¡w³p(dߣVŵBk=½VÆÂ¡Ânrvc„K¥U2 m*¹+#à†ø¦Yž)‹u<¾RGµnÜ5‚ž‡9q»‡¾98ÞQ@èí=7ë<5_ÿ탥WÿRƃúêœç’¾ªà<^§çM¾Š²¸Ç%¹f\êzšB×ÒuÒS”vHWü&€¾S ƒó¦ïY÷É’ÃïÔÒý›1éPt~¯Ç¡ïÒ1CšÁã{?þÚÿ©R® Š¹Ê')Q_Å—ô¯u”„cÎñ!^!¾â¿ø»ˆ;±Ø×’×9©Ê£-ýu£;Ôòñó·”osÔzHG}Ðõ yÌÁñH¹¾>¯ó~´/åì:Ï·eë¶ÎÓõy”£ëu.ö¡Â ­N9¸žtºmÏ­YÒõVþžÍ0Oúkd#µtà7òd²¤öd½út=Y½û ßâÈ[xRx>ó$÷=Iw¸¯'k4HG}AÎVضwjÔž$”¥¾K«m=žúmЊÝT¸^cçK+vòdÛƒuÛöpc{ê»%ó®mlcÒöxô(áM}ú`0¾a«=QK>§²º*šwÛ‡ K Åû·Ä½IlŠ/ÅT—ÖQ)â,SÝÔ Mç­z+z¥¥'N©­´íú ²`ÆVnImûz3&õ›BªUx¥ jä–¹Eú—Ƕú´§í–˜B׺%ž´ÿk$M]­5 š«óV_âË´ê Lò_ ÝÚúv.ŸÝ§¾íºEwêØ:Bë¶ÎJíº¸q àoru:"wŒMÈÔwúÐB͸hoâÕlŸH«ÇŤ?\OËqµÑzÑ»Â/'ÏŸœœþëÅàêìfò¼={pPÏ!1ì]L2]‰Äh•= ƒ,¢Ð»øä`Ò§/¬„à£ÞõÓbpq9¥™ØóÕo„´{ì·io8èï.†EƱaW'ô}Ô{—i ã²7¦=ÛOì{‚}ësö‚½b=vÆÎzýÏ“aorÉú¬_Ë;gûÄ>•7cvÁ.ÆEoZŒÙ%»üz}YŒØ€ Ù°˜Lر’]³ëb<(ÏÙ˜Mؔݰ›¶È“~9.Ø_ìoö…}ý¹šëá&oÚ7mñÙïo_¾iƒxT\Ü,QH€¨ÀD¿MD×Q» ê6†õ Ã}vÉCök|ð_ö,bú¨±cö†½e'씽c¿³÷À¹w˜&½Ñ9ëMç`ò9B?fgã^¿Ÿ¦UoL·‹ÝÏÅ´¹Œ~õCí¢~yuÕƒ£ÎËáJ ÍdÅŸ7½!+¾ô‡½+ráà¯bæÇN–xóö¹íÑÑ`TÀ­%þ…ké;–hEìU6`"]í÷ëáÍ„ýÉþ¼)§ÅùÙ°êL„eäĤ¸TFOŠ¿pÇÉà «ø6eÓËqQ°éßåRÞ°Ø?ŸìÒÇÝ…>o_žœ<{=OŸ—gÃÁr YQQÈ9ý-©•$ªñHÒkÓbÞÉEË£óA9XðÝèæê @.RtÞ…’onÖº!ÜÅ Oß¼8yŸÜpÜ[› …C.Tœþºˆ+dþ0s–ƒ¶âiã)Vűh²Qr} /†ñiL“ý¶;"ˆÝøZˆ¨Å`J`îb?¯ÂãÛƒ"ˆ»xãÝÉËo^Ï{ƒ [åG ™pKúpã>i……Ðf¥OŽ€w^“Èâ¬Õ]fýúñáËw'íY¯YIþ$½ç\ÌÍXtg,º3V+8èÛÓ•ª=݃˜ˆvDºcP¸SbÞÝ…3Üiá}º„ kr¬ ´ ¯˜g„ FÐé¬ôj>ÇššĤ†Z,çÄÓ…@\ZŠDÇâ²òì‚G?/ÄjSp‡µÌò%kÙ“Q¿}*@ ú ûƒŒ¦ 3ÅSuÛ*=±«¹ØT7­Ê(ÕÍu4«Î[ÜYÊÆ›ÈÇŠý „z½ŠÔ¢yE(hîË"h1&"#« ‰APS´&k¬ê*Ìër¯&?ÒÂ=Âú}7¨›m_;¼±Øµü„M}ÊÊÕ–ð"œ´œ}Rm·\líiêN¥•òºÀM¹¥Jùíõ>–.‚Ò½Ißm®ÞnwÂ4þEpü$ÿp0žL)"2*EžõÒ‰Ðz:8Ÿ^NâßGÙšñ¯~;ÿy¿¤Û endstream endobj 630 0 obj << /Author(\376\377\000L\000i\000s\000a\000n\000d\000r\000o\000\040\000D\000a\000l\000c\000i\000n)/Title(\376\377\000M\000P\000I\000\040\000f\000o\000r\000\040\000P\000y\000t\000h\000o\000n)/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.19)/Keywords() /CreationDate (D:20191104140525+03'00') /ModDate (D:20191104140525+03'00') /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) kpathsea version 6.3.0) >> endobj 603 0 obj << /Type /ObjStm /N 81 /First 694 /Length 2323 /Filter /FlateDecode >> stream xÚ­Zmo7þ¾¿b>Ö=ø¬WJ*Šq^Ã9v'v¯‡~XÛSgqönà]×ûõGŽ43’†;nFKQäÇ”¨ñDoD£¥l¤5Ç ŸÐ€Æjh@‘Ü5Îy|ú&hÛ(å)‚DAh¤²8ð¦‘ÚÊ…V¢‘%F£ÄâÀ’q C‰ÃxI‹ƒ8’`ñ4*Ѽ²®q %!,¤ èXK2š2èØ &©zÖ¨l T¨ J::…Ê. ^´®¼C_•ƒÒ ¥ÑBSL¿hPH$Âé&¸F+´‡Þ´–¾ñ¨©4wG=‹xê„—hðn¨ç¬oõê9¢ õò‹jÞèµ<† ”Ç\c){€ÿ¯^ÐbK‰I¨zÀ„Ø@:’`"­å$êiŒ$êY¬ Šœ! NÇU¾qRŠÈ€4Ä¥ ¦›JH"AŠ$ªqA£yüá%’AÕå1u8°×dP!»3^kвBÞñׯ/~üqqôé¯msôf³Þ-ŽÎ¯vÝOÊÅÑñrÛÒLstò¯Ïïß|úÛéêþêqûn³>9üØÞ>.ºu¯ÚíõÃêënóÐXOÛà#ÊWÛÝË/ˬƒÅÑÉ2ýÀ-Ž.W7»/[$+DÝ×ëëÍÍj}Kôu’Ÿ~ú È>Ÿ]\œ|¨‘]Ý­¦è‚˜ Ó:•¡sÏîí/ǧ¿$tçKDw¼¹»a©™1ûá&|d?_œ~úP#ûÇnyÇ 3t£“YV½~t^½9ûù"GÇ×nõ È”Ì2 Ïìøõ»Ëo²›ûÓM89|×Þpå6Ù Ææà¬ÈhSÏîüøòâãeŽeÄd/¨› 6ù,Ľx}~ù–ÁÆÖ5‹¯ØâÏà{¿¼m·‹£—›GDƒEò~ùÐÒH¤âþçêfÛü[B·ï©CƧ±ñ ééDzvË~ý*ŠÝâ3î~êééãSêoö]7ÚPɶо´IòHvOñÍ>Œ цœˆ¾L<;©wÆgÜßäʈÓÊþmÚ”«¢/«ŸäJîõáäSkµ’'BJžIĦàµIcr-[ g»»ÕšìvuÝÄ:í꺻¼u¿\9,]íîZºûÅé8L›cˆ'M½hïî~yõ§ÕrXmýÜj›ŽÉÓö¿#¦Ò–u£-;gËØÂ‡ËšÑ–,l «“­À­ÃjãøÕÑ·ÕÌjãj=‡*måMg–’˜¥$ªÚ¥\êPV…KíÀÚ«íìj6’³5¯åœ-r[<®1 Êñ¶Òj. jLƒšOƒ,¢²ET‘†rŸS»Ó ÜKY©,_ŽI‘UR$®‰—rÆ·/xïcOÑJ—GÛÿJÑÖ'‡Ó#Êôô>b°‚ OŒÙznq‘ÁíV1°Â~KÁ†La`<Ø;E곉 Y;ÝÒÀT|õn&…¶¥¯¥˜Â^Ì`â«Ï -Ýù!¾LAï  ¢(waÿJ—ãô ãn`ÜÙ39ã7îä~3³ïöÝÀ>¸3ùÉ㘫0Ã*äu LYÃ@±å)Ž+VíÀêl-޽¾4cõàº"J‰ëkÈUÎî«>Û›ï|q]vl²U-Wætsívì¶U³-ÍäÁrhÆZ5ÐŒι7 ÷c+­:ii&¯h®Ž]TϰZ´P®ƒŽ TÍP\ôR®•ŽTñw+ÃjÖçúa‘c—W¢Ê¯²Õ%ÈW}`l˜ÕaR\a¸ ÛØ9÷.,º&wY¨vœtOa¶ù@-ÏO¤¶èÒŤlѺ7~º¼oñµâ»W›ëÃóÝòawШøzÒ|÷ö·Íf·ÞìÚ¿K”*_KÕA÷çåNz½BÁj½{ØüpÕ.ÿw×þ.ŠK1ýeµÞ¶ë8k&³÷_W‡øïú M«ø st²º_í*”ü¢_ë¸*­Í×vO2®Yßío87þdr»»!&Òû&3«hV²³ÛÕú–L'ïpúaywu·¹þñkâ G»{½vôW|wìr–Þè“@àF·¹u´¹D‘¤ÐÑ$ ¹ÄÐ_Ók´½ÓAi,K«}nPb X:½Å'‰G†âý­—”h™Iˆ|eyXö`Pâa)$ÇØÜê’br ¼Ë*$Ç„’cEN©²$q,.ò:hí†ìX™s¡« §ž$yÖT IUSíåf4ú¶šç‹œZ<.ôX—×F® ÷€+—S $€L@‡€Ïmxx“jËï„1«¶m¯w«ÍúûxtA-¤l÷[a”RÆÅD—².\-¥Ì )â('hÇICE¬jÛ–¤º–ÕÚDבt¢K‘þŒ—I©(âM?Ç\ )´÷§ÂµýÉ1J‘@iC-E%Ô‹¶¥î,%´§Å^ÀÝöU÷Á¥Ú·eZ©X}É•«”%¿T±RU(É*œÈ·4fPòŸiNa>^ =®\L*F®‰Û‰\ueo9ê9ò“v[«—ÌE¢ˆbÍA£êŒœê›ƒLÎA\P3¡tÈê%s¡hb ã YÏÈÑã aè9†î#Çн™ ¥CV/™ Å;a Í¡Œœ LfÂЄa&h‰)+–\ËX¬{Â1u‘Ù'2ã:›LA»nÃhÅLP@L]º. ¦0}烩@ßù°s»ÆÕyö˜ÂùAåûn‹ö—ŸjŠš¸óìußþnRMQ–¢Žœ§=›¢Þ\‰uºî©©Éÿ„e?µœñc¤f ©=C*;HI u(rîMbrÑIÖÓ ñu¬ûïñiÓ3y—nÿ…e߉ٻH€ÓR¯t½ƒôù ”þSÚ,Y©@º(‚‚9Rö›{ÕnQ”›~ä|¹Ü-ï6·‹øõjüÐÕwÊ^W»Ò5| ºmßmnÚ£ÏÛvüHu†o ] /Length 1460 /Filter /FlateDecode >> stream xÚ–ÉoVeÆßó]: ”B …—±”–蔩td,¡;+§¥€‰Â†ä$Æ…®Ä‰ 7®X¹01ycb¢1ÑÄD7îLÎÆDû{6¿¼çùîw§ç9ç¾)¥ôŸ¥Ô˜*)ÉRC«ÜSI•Õ‹h*hÐF) ° mm„² T£¢] ¬µh×І)ë@=Úu´ó” `7Ú-´!Ê=`/Úm´s”  mí,e3hA»v†rØöí4e+hC[A;EÙ:Ð6ÑNR+ÉÊ]h%e'8„V…6HÙ£Õ£ PÝh hý”=à(Z Zå1Ћֆv‚ò88vM¥îG;ÖK© ¢AÓ©t“'Ñ΢¥ÔžF›CÓmèåìb~­›R/vmM S†Ñ® ¦”¡#hwÑôø ÃE4½ÓC”c`m M¯î¸¼£EB;HyL š^û$˜B« áL1 ®¢h²ì¸ŽÖˆ†«Å ¸Ö„&»o‚[hÍh$¢¸ î µ¢)*³@EŠ90Ï!½hJØXD›G#„ÅX÷,_¨…îƒà!xƒð¬‚5°6À&ØOÁ3°M0Õô`VÒyYG¿eõ]–ÕeôVVoÑQYEeõš›,U_×IÕ[zzÙz»Šw5¨µôÎ_:N}ÄëÌê Èê,Ëx™19ã~&™¼d‚™›-µ|ª³«ÜÍ™u»D4“ñLø3AÏ´K&ޙ˄:Ó’™(gš8àLÛgb›™°fFUîµÔõ“®Fv£=4gôZ2t“〈æË€`æ @ó „™„å1KýÏu«<ŒVwÀ KÃo©$u™läYKWç¤Ýä*ÏÒ” H^¶4÷•¹Çùä )É,­~¯ˆO&/yv–¶jéZŸLr2ÉÉ$'oÛÎtM\µ ˜¥¶ôCÁão³Ú j,}øJ?Ôqƪì±ôbD?ìûÀN†^~&MmUϪì·ôÉ—ú¡`@Ùaéózi¸PvMœ)5,ñ£Ôˆ<4Ã> !84úJ wœ‡,½Ð…Nú·$åÀä*GóªL©ò`6•W©œÌ¡r0}Êk€™S2dÊ›€ÑRÞ³` ,€!K_Oê^î‚ÀÌ)—Á=p<Àcð¬‚5 »7À&ØOÁ3€yÎ5·§]N/Zzݦ0¹|V(w*@¼Æl°SÇá 7Âà{v;ð&Ð Zðý“½ à¾wLvZÍqßñ×ë,ýú³.Ä7Ô‰€!9º$Æ;Æ;Æ;Æ;Æ;Æ;Æ;Æ;Æ;Æ;Æ;&;ß7?È÷XúûO]ˆD¸¾t¸ïúná¾ëk…û®oî;Nû°¥Ô ƒ“'ŽûŽûŽûŽ—Nœ8p"àøës`Ú¬®U§"N"œO‡'Nœ8ö8pìöy³öý—D8‰páDÅÉ—fÝè`…€ø3+:>F \*³‘£*ñ°1ÚÍ–Þ”†ñoÑe¶ò¾4Z #include "helloworld.c" }% %include mpi4py/mpi4py.i %mpi4py_typemap(Comm, MPI_Comm); void sayhello(MPI_Comm comm); .ft P .fi .UNINDENT .UNINDENT .IP \(bu 2 Try it in the Python prompt: .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C >>> from mpi4py import MPI >>> import helloworld >>> helloworld.sayhello(MPI.COMM_WORLD) Hello, World! I am process 0 of 1. .ft P .fi .UNINDENT .UNINDENT .UNINDENT .SS Wrapping with F2Py .INDENT 0.0 .IP \(bu 2 Fortran 90 source: .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C ! file: helloworld.f90 subroutine sayhello(comm) use mpi implicit none integer :: comm, rank, size, ierr call MPI_Comm_size(comm, size, ierr) call MPI_Comm_rank(comm, rank, ierr) print *, \(aqHello, World! I am process \(aq,rank,\(aq of \(aq,size,\(aq.\(aq end subroutine sayhello .ft P .fi .UNINDENT .UNINDENT .IP \(bu 2 Compiling example using f2py .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C $ f2py \-c \-\-f90exec=mpif90 helloworld.f90 \-m helloworld .ft P .fi .UNINDENT .UNINDENT .IP \(bu 2 Try it in the Python prompt: .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C >>> from mpi4py import MPI >>> import helloworld >>> fcomm = MPI.COMM_WORLD.py2f() >>> helloworld.sayhello(fcomm) Hello, World! I am process 0 of 1. .ft P .fi .UNINDENT .UNINDENT .UNINDENT .SH MPI4PY.FUTURES .sp New in version 3.0.0. .sp This package provides a high\-level interface for asynchronously executing callables on a pool of worker processes using MPI for inter\-process communication. .SS concurrent.futures .sp The \fI\%mpi4py.futures\fP package is based on \fI\%concurrent.futures\fP from the Python standard library. More precisely, \fI\%mpi4py.futures\fP provides the \fI\%MPIPoolExecutor\fP class as a concrete implementation of the abstract class \fI\%Executor\fP\&. The \fI\%submit()\fP interface schedules a callable to be executed asynchronously and returns a \fI\%Future\fP object representing the execution of the callable. \fI\%Future\fP instances can be queried for the call result or exception. Sets of \fI\%Future\fP instances can be passed to the \fI\%wait()\fP and \fI\%as_completed()\fP functions. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The \fI\%concurrent.futures\fP package was introduced in Python 3.2. A \fI\%backport\fP targeting Python 2.7 is available on \fI\%PyPI\fP\&. The \fI\%mpi4py.futures\fP package uses \fI\%concurrent.futures\fP if available, either from the Python 3 standard library or the Python 2.7 backport if installed. Otherwise, \fI\%mpi4py.futures\fP uses a bundled copy of core functionality backported from Python 3.5 to work with Python 2.7. .UNINDENT .UNINDENT .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B Module \fI\%concurrent.futures\fP Documentation of the \fI\%concurrent.futures\fP standard module. .UNINDENT .UNINDENT .UNINDENT .SS MPIPoolExecutor .sp The \fI\%MPIPoolExecutor\fP class uses a pool of MPI processes to execute calls asynchronously. By performing computations in separate processes, it allows to side\-step the \fI\%Global Interpreter Lock\fP but also means that only picklable objects can be executed and returned. The \fB__main__\fP module must be importable by worker processes, thus \fI\%MPIPoolExecutor\fP instances may not work in the interactive interpreter. .sp \fI\%MPIPoolExecutor\fP takes advantage of the dynamic process management features introduced in the MPI\-2 standard. In particular, the \fBMPI.Intracomm.Spawn()\fP method of \fBMPI.COMM_SELF()\fP is used in the master (or parent) process to spawn new worker (or child) processes running a Python interpreter. The master process uses a separate thread (one for each \fI\%MPIPoolExecutor\fP instance) to communicate back and forth with the workers. The worker processes serve the execution of tasks in the main (and only) thread until they are signaled for completion. .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The worker processes must import the main script in order to \fIunpickle\fP any callable defined in the \fI\%__main__\fP module and submitted from the master process. Furthermore, the callables may need access to other global variables. At the worker processes,:mod:\fImpi4py.futures\fP executes the main script code (using the \fI\%runpy\fP module) under the \fB__worker__\fP namespace to define the \fI\%__main__\fP module. The \fI\%__main__\fP and \fB__worker__\fP modules are added to \fI\%sys.modules\fP (both at the master and worker processes) to ensure proper \fIpickling\fP and \fIunpickling\fP\&. .UNINDENT .UNINDENT .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 During the initial import phase at the workers, the main script cannot create and use new \fI\%MPIPoolExecutor\fP instances. Otherwise, each worker would attempt to spawn a new pool of workers, leading to infinite recursion. \fI\%mpi4py.futures\fP detects such recursive attempts to spawn new workers and aborts the MPI execution environment. As the main script code is run under the \fB__worker__\fP namespace, the easiest way to avoid spawn recursion is using the idiom \fBif __name__ == \(aq__main__\(aq: ...\fP in the main script. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class mpi4py.futures.MPIPoolExecutor(max_workers=None, **kwargs) An \fI\%Executor\fP subclass that executes calls asynchronously using a pool of at most \fImax_workers\fP processes. If \fImax_workers\fP is \fBNone\fP or not given, its value is determined from the \fBMPI4PY_MAX_WORKERS\fP environment variable if set, or the MPI universe size if set, otherwise a single worker process is spawned. If \fImax_workers\fP is lower than or equal to \fB0\fP, then a \fI\%ValueError\fP will be raised. .sp Other parameters: .INDENT 7.0 .IP \(bu 2 \fIpython_exe\fP: Path to the Python interpreter executable used to spawn worker processes, otherwise \fI\%sys.executable\fP is used. .IP \(bu 2 \fIpython_args\fP: \fI\%list\fP or iterable with additional command line flags to pass to the Python executable. Command line flags determined from inspection of \fI\%sys.flags\fP, \fI\%sys.warnoptions\fP and \fI\%sys._xoptions\fP in are passed unconditionally. .IP \(bu 2 \fImpi_info\fP: \fI\%dict\fP or iterable yielding \fB(key, value)\fP pairs. These \fB(key, value)\fP pairs are passed (through an \fBMPI.Info\fP object) to the \fBMPI.Intracomm.Spawn()\fP call used to spawn worker processes. This mechanism allows telling the MPI runtime system where and how to start the processes. Check the documentation of the backend MPI implementation about the set of keys it interprets and the corresponding format for values. .IP \(bu 2 \fIglobals\fP: \fI\%dict\fP or iterable yielding \fB(name, value)\fP pairs to initialize the main module namespace in worker processes. .IP \(bu 2 \fImain\fP: If set to \fBFalse\fP, do not import the \fB__main__\fP module in worker processes. Setting \fImain\fP to \fBFalse\fP prevents worker processes from accessing definitions in the parent \fB__main__\fP namespace. .IP \(bu 2 \fIpath\fP: \fI\%list\fP or iterable with paths to append to \fI\%sys.path\fP in worker processes to extend the \fI\%module search path\fP\&. .IP \(bu 2 \fIwdir\fP: Path to set the current working directory in worker processes using \fI\%os.chdir()\fP\&. The initial working directory is set by the MPI implementation. Quality MPI implementations should honor a \fBwdir\fP info key passed through \fImpi_info\fP, although such feature is not mandatory. .IP \(bu 2 \fIenv\fP: \fI\%dict\fP or iterable yielding \fB(name, value)\fP pairs with environment variables to update \fI\%os.environ\fP in worker processes. The initial environment is set by the MPI implementation. MPI implementations may allow setting the initial environment through \fImpi_info\fP, however such feature is not required nor recommended by the MPI standard. .UNINDENT .INDENT 7.0 .TP .B submit(func, *args, **kwargs) Schedule the callable, \fIfunc\fP, to be executed as \fBfunc(*args, **kwargs)\fP and returns a \fI\%Future\fP object representing the execution of the callable. .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C executor = MPIPoolExecutor(max_workers=1) future = executor.submit(pow, 321, 1234) print(future.result()) .ft P .fi .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B map(func, *iterables, timeout=None, chunksize=1, **kwargs) Equivalent to \fI\%map(func, *iterables)\fP except \fIfunc\fP is executed asynchronously and several calls to \fIfunc\fP may be made concurrently, out\-of\-order, in separate processes. The returned iterator raises a \fI\%TimeoutError\fP if \fI\%__next__()\fP is called and the result isn’t available after \fItimeout\fP seconds from the original call to \fI\%map()\fP\&. \fItimeout\fP can be an int or a float. If \fItimeout\fP is not specified or \fBNone\fP, there is no limit to the wait time. If a call raises an exception, then that exception will be raised when its value is retrieved from the iterator. This method chops \fIiterables\fP into a number of chunks which it submits to the pool as separate tasks. The (approximate) size of these chunks can be specified by setting \fIchunksize\fP to a positive integer. For very long iterables, using a large value for \fIchunksize\fP can significantly improve performance compared to the default size of one. By default, the returned iterator yields results in\-order, waiting for successive tasks to complete . This behavior can be changed by passing the keyword argument \fIunordered\fP as \fBTrue\fP, then the result iterator will yield a result as soon as any of the tasks complete. .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C executor = MPIPoolExecutor(max_workers=3) for result in executor.map(pow, [2]*32, range(32)): print(result) .ft P .fi .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B starmap(func, iterable, timeout=None, chunksize=1, **kwargs) Equivalent to \fI\%itertools.starmap(func, iterable)\fP\&. Used instead of \fI\%map()\fP when argument parameters are already grouped in tuples from a single iterable (the data has been “pre\-zippedâ€). \fI\%map(func, *iterable)\fP is equivalent to \fI\%starmap(func, zip(*iterable))\fP\&. .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C executor = MPIPoolExecutor(max_workers=3) iterable = ((2, n) for n in range(32)) for result in executor.starmap(pow, iterable): print(result) .ft P .fi .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B shutdown(wait=True) Signal the executor that it should free any resources that it is using when the currently pending futures are done executing. Calls to \fI\%submit()\fP and \fI\%map()\fP made after \fI\%shutdown()\fP will raise \fI\%RuntimeError\fP\&. .sp If \fIwait\fP is \fBTrue\fP then this method will not return until all the pending futures are done executing and the resources associated with the executor have been freed. If \fIwait\fP is \fBFalse\fP then this method will return immediately and the resources associated with the executor will be freed when all pending futures are done executing. Regardless of the value of \fIwait\fP, the entire Python program will not exit until all pending futures are done executing. .sp You can avoid having to call this method explicitly if you use the \fI\%with\fP statement, which will shutdown the executor instance (waiting as if \fI\%shutdown()\fP were called with \fIwait\fP set to \fBTrue\fP). .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C import time with MPIPoolExecutor(max_workers=1) as executor: future = executor.submit(time.sleep, 2) assert future.done() .ft P .fi .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B bootup(wait=True) Signal the executor that it should allocate eagerly any required resources (in particular, MPI worker processes). If \fIwait\fP is \fBTrue\fP, then \fI\%bootup()\fP will not return until the executor resources are ready to process submissions. Resources are automatically allocated in the first call to \fI\%submit()\fP, thus calling \fI\%bootup()\fP explicitly is seldom needed. .UNINDENT .UNINDENT .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 As the master process uses a separate thread to perform MPI communication with the workers, the backend MPI implementation should provide support for \fBMPI.THREAD_MULTIPLE\fP\&. However, some popular MPI implementations do not support yet concurrent MPI calls from multiple threads. Additionally, users may decide to initialize MPI with a lower level of thread support. If the level of thread support in the backend MPI is less than \fBMPI.THREAD_MULTIPLE\fP, \fI\%mpi4py.futures\fP will use a global lock to serialize MPI calls. If the level of thread support is less than \fBMPI.THREAD_SERIALIZED\fP, \fI\%mpi4py.futures\fP will emit a \fI\%RuntimeWarning\fP\&. .UNINDENT .UNINDENT .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 If the level of thread support in the backend MPI is less than \fBMPI.THREAD_SERIALIZED\fP (i.e, it is either \fBMPI.THREAD_SINGLE\fP or \fBMPI.THREAD_FUNNELED\fP), in theory \fI\%mpi4py.futures\fP cannot be used. Rather than raising an exception, \fI\%mpi4py.futures\fP emits a warning and takes a “cross\-fingers†attitude to continue execution in the hope that serializing MPI calls with a global lock will actually work. .UNINDENT .UNINDENT .SS MPICommExecutor .sp Legacy MPI\-1 implementations (as well as some vendor MPI\-2 implementations) do not support the dynamic process management features introduced in the MPI\-2 standard. Additionally, job schedulers and batch systems in supercomputing facilities may pose additional complications to applications using the \fBMPI_Comm_spawn()\fP routine. .sp With these issues in mind, \fI\%mpi4py.futures\fP supports an additonal, more traditional, SPMD\-like usage pattern requiring MPI\-1 calls only. Python applications are started the usual way, e.g., using the \fBmpiexec\fP command. Python code should make a collective call to the \fI\%MPICommExecutor\fP context manager to partition the set of MPI processes within a MPI communicator in one master processes and many workers processes. The master process gets access to an \fI\%MPIPoolExecutor\fP instance to submit tasks. Meanwhile, the worker process follow a different execution path and team\-up to execute the tasks submitted from the master. .sp Besides alleviating the lack of dynamic process managment features in legacy MPI\-1 or partial MPI\-2 implementations, the \fI\%MPICommExecutor\fP context manager may be useful in classic MPI\-based Python applications willing to take advantage of the simple, task\-based, master/worker approach available in the \fI\%mpi4py.futures\fP package. .INDENT 0.0 .TP .B class mpi4py.futures.MPICommExecutor(comm=None, root=0) Context manager for \fI\%MPIPoolExecutor\fP\&. This context manager splits a MPI (intra)communicator \fIcomm\fP (defaults to \fBMPI.COMM_WORLD\fP if not provided or \fBNone\fP) in two disjoint sets: a single master process (with rank \fIroot\fP in \fIcomm\fP) and the remaining worker processes. These sets are then connected through an intercommunicator. The target of the \fI\%with\fP statement is assigned either an \fI\%MPIPoolExecutor\fP instance (at the master) or \fBNone\fP (at the workers). .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C from mpi4py import MPI from mpi4py.futures import MPICommExecutor with MPICommExecutor(MPI.COMM_WORLD, root=0) as executor: if executor is not None: future = executor.submit(abs, \-42) assert future.result() == 42 answer = set(executor.map(abs, [\-42, 42])) assert answer == {42} .ft P .fi .UNINDENT .UNINDENT .UNINDENT .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 If \fI\%MPICommExecutor\fP is passed a communicator of size one (e.g., \fBMPI.COMM_SELF\fP), then the executor instace assigned to the target of the \fI\%with\fP statement will execute all submitted tasks in a single worker thread, thus ensuring that task execution still progress asynchronously. However, the \fI\%GIL\fP will prevent the main and worker threads from running concurrently in multicore processors. Moreover, the thread context switching may harm noticeably the performance of CPU\-bound tasks. In case of I/O\-bound tasks, the \fI\%GIL\fP is not usually an issue, however, as a single worker thread is used, it progress one task at a time. We advice against using \fI\%MPICommExecutor\fP with communicators of size one and suggest refactoring your code to use instead a \fI\%ThreadPoolExecutor\fP\&. .UNINDENT .UNINDENT .SS Command line .sp Recalling the issues related to the lack of support for dynamic process managment features in MPI implementations, \fI\%mpi4py.futures\fP supports an alternative usage pattern where Python code (either from scripts, modules, or zip files) is run under command line control of the \fI\%mpi4py.futures\fP package by passing \fB\-m mpi4py.futures\fP to the \fBpython\fP executable. The \fBmpi4py.futures\fP invocation should be passed a \fIpyfile\fP path to a script (or a zipfile/directory containing a \fB__main__.py\fP file). Additionally, \fBmpi4py.futures\fP accepts \fB\-m \fP\fImod\fP to execute a module named \fImod\fP, \fB\-c \fP\fIcmd\fP to execute a command string \fIcmd\fP, or even \fB\-\fP to read commands from standard input (\fI\%sys.stdin\fP). Summarizing, \fBmpi4py.futures\fP can be invoked in the following ways: .INDENT 0.0 .IP \(bu 2 \fB$ mpiexec \-n \fP\fInumprocs\fP\fB python \-m mpi4py.futures \fP\fIpyfile\fP\fB [arg] ...\fP .IP \(bu 2 \fB$ mpiexec \-n \fP\fInumprocs\fP\fB python \-m mpi4py.futures \-m \fP\fImod\fP\fB [arg] ...\fP .IP \(bu 2 \fB$ mpiexec \-n \fP\fInumprocs\fP\fB python \-m mpi4py.futures \-c \fP\fIcmd\fP\fB [arg] ...\fP .IP \(bu 2 \fB$ mpiexec \-n \fP\fInumprocs\fP\fB python \-m mpi4py.futures \- [arg] ...\fP .UNINDENT .sp Before starting the main script execution, \fI\%mpi4py.futures\fP splits \fBMPI.COMM_WORLD\fP in one master (the process with rank 0 in \fBMPI.COMM_WORLD\fP) and 16 workers and connect them through an MPI intercommunicator. Afterwards, the master process proceeds with the execution of the user script code, which eventually creates \fI\%MPIPoolExecutor\fP instances to submit tasks. Meanwhile, the worker processes follow a different execution path to serve the master. Upon successful termination of the main script at the master, the entire MPI execution environment exists gracefully. In case of any unhandled exception in the main script, the master process calls \fBMPI.COMM_WORLD.Abort(1)\fP to prevent deadlocks and force termination of entire MPI execution environment. .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 Running scripts under command line control of \fI\%mpi4py.futures\fP is quite similar to executing a single\-process application that spawn additional workers as required. However, there is a very important difference users should be aware of. All \fI\%MPIPoolExecutor\fP instances created at the master will share the pool of workers. Tasks submitted at the master from many different executors will be scheduled for execution in random order as soon as a worker is idle. Any executor can easily starve all the workers (e.g., by calling \fI\%MPIPoolExecutor.map()\fP with long iterables). If that ever happens, submissions from other executors will not be serviced until free workers are available. .UNINDENT .UNINDENT .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \fI\%Command line\fP Documentation on Python command line interface. .UNINDENT .UNINDENT .UNINDENT .SS Examples .sp The following \fBjulia.py\fP script computes the \fI\%Julia set\fP and dumps an image to disk in binary \fI\%PGM\fP format. The code starts by importing \fI\%MPIPoolExecutor\fP from the \fI\%mpi4py.futures\fP package. Next, some global constants and functions implement the computation of the Julia set. The computations are protected with the standard \fBif __name__ == \(aq__main__\(aq: ...\fP idiom. The image is computed by whole scanlines submitting all these tasks at once using the \fI\%map\fP method. The result iterator yields scanlines in\-order as the tasks complete. Finally, each scanline is dumped to disk. \fBjulia.py\fP.INDENT 0.0 .INDENT 3.5 .sp .nf .ft C from mpi4py.futures import MPIPoolExecutor x0, x1, w = \-2.0, +2.0, 640*2 y0, y1, h = \-1.5, +1.5, 480*2 dx = (x1 \- x0) / w dy = (y1 \- y0) / h c = complex(0, 0.65) def julia(x, y): z = complex(x, y) n = 255 while abs(z) < 3 and n > 1: z = z**2 + c n \-= 1 return n def julia_line(k): line = bytearray(w) y = y1 \- k * dy for j in range(w): x = x0 + j * dx line[j] = julia(x, y) return line if __name__ == \(aq__main__\(aq: with MPIPoolExecutor() as executor: image = executor.map(julia_line, range(h)) with open(\(aqjulia.pgm\(aq, \(aqwb\(aq) as f: f.write(b\(aqP5 %d %d %d\en\(aq % (w, h, 255)) for line in image: f.write(line) .ft P .fi .UNINDENT .UNINDENT .sp The recommended way to execute the script is using the \fBmpiexec\fP command specifying one MPI process and (optional but recommended) the desired MPI universe size [1]\&. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ mpiexec \-n 1 \-usize 17 python julia.py .ft P .fi .UNINDENT .UNINDENT .sp The \fBmpiexec\fP command launches a single MPI process (the master) running the Python interpreter and executing the main script. When required, \fI\%mpi4py.futures\fP spawns 16 additional MPI processes (the children) to dynamically allocate the pool of workers. The master submits tasks to the children and waits for the results. The children receive incoming tasks, execute them, and send back the results to the master. .sp Alternatively, users may decide to execute the script in a more traditional way, that is, all the MPI process are started at once. The user script is run under command line control of \fI\%mpi4py.futures\fP passing the \fI\%\-m\fP flag to the \fBpython\fP executable. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ mpiexec \-n 17 python \-m mpi4py.futures julia.py .ft P .fi .UNINDENT .UNINDENT .sp As explained previously, the 17 processes are partitioned in one master and 16 workers. The master process executes the main script while the workers execute the tasks submitted from the master. .IP [1] 5 This \fBmpiexec\fP invocation example using the \fB\-usize\fP flag (alternatively, setting the \fBMPIEXEC_UNIVERSE_SIZE\fP environment variable) assumes the backend MPI implementation is an MPICH derivative using the Hydra process manager. In the Open MPI implementation, the MPI universe size can be specified by setting the \fBOMPI_UNIVERSE_SIZE\fP environment variable to a positive integer. Check the documentation of your actual MPI implementation and/or batch system for the ways to specify the desired MPI universe size. .SH MPI4PY.RUN .sp New in version 3.0.0. .sp At import time, \fBmpi4py\fP initializes the MPI execution environment calling \fBMPI_Init_thread()\fP and installs an exit hook to automatically call \fBMPI_Finalize()\fP just before the Python process terminates. Additionally, \fBmpi4py\fP overrides the default \fBMPI.ERRORS_ARE_FATAL\fP error handler in favor of \fBMPI.ERRORS_RETURN\fP, which allows translating MPI errors in Python exceptions. These departures from standard MPI behavior may be controversial, but are quite convenient within the highly dynamic Python programming environment. Third\-party code using \fBmpi4py\fP can just \fBfrom mpi4py import MPI\fP and perform MPI calls without the tedious initialization/finalization handling. MPI errors, once translated automatically to Python exceptions, can be dealt with the common \fI\%try\fP…\fI\%except\fP…\fI\%finally\fP clauses; unhandled MPI exceptions will print a traceback which helps in locating problems in source code. .sp Unfortunately, the interplay of automatic MPI finalization and unhandled exceptions may lead to deadlocks. In unattended runs, these deadlocks will drain the battery of your laptop, or burn precious allocation hours in your supercomputing facility. .sp Consider the following snippet of Python code. Assume this code is stored in a standard Python script file and run with \fBmpiexec\fP in two or more processes. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C from mpi4py import MPI assert MPI.COMM_WORLD.Get_size() > 1 rank = MPI.COMM_WORLD.Get_rank() if rank == 0: 1/0 MPI.COMM_WORLD.send(None, dest=1, tag=42) elif rank == 1: MPI.COMM_WORLD.recv(source=0, tag=42) .ft P .fi .UNINDENT .UNINDENT .sp Process 0 raises \fI\%ZeroDivisionError\fP exception before performing a send call to process 1. As the exception is not handled, the Python interpreter running in process 0 will proceed to exit with non\-zero status. However, as \fBmpi4py\fP installed a finalizer hook to call \fBMPI_Finalize()\fP before exit, process 0 will block waiting for other processes to also enter the \fBMPI_Finalize()\fP call. Meanwhile, process 1 will block waiting for a message to arrive from process 0, thus never reaching to \fBMPI_Finalize()\fP\&. The whole MPI execution environment is irremediably in a deadlock state. .sp To alleviate this issue, \fBmpi4py\fP offers a simple, alternative command line execution mechanism based on using the \fI\%\-m\fP flag and implemented with the \fI\%runpy\fP module. To use this features, Python code should be run passing \fB\-m mpi4py\fP in the command line invoking the Python interpreter. In case of unhandled exceptions, the finalizer hook will call \fBMPI_Abort()\fP on the \fBMPI_COMM_WORLD\fP communicator, thus effectively aborting the MPI execution environment. .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 When a process is forced to abort, resources (e.g. open files) are not cleaned\-up and any registered finalizers (either with the \fI\%atexit\fP module, the Python C/API function \fI\%Py_AtExit()\fP, or even the C standard library function \fBatexit()\fP) will not be executed. Thus, aborting execution is an extremely impolite way of ensuring process termination. However, MPI provides no other mechanism to recover from a deadlock state. .UNINDENT .UNINDENT .SS Interface options .sp The use of \fB\-m mpi4py\fP to execute Python code on the command line resembles that of the Python interpreter. .INDENT 0.0 .IP \(bu 2 \fBmpiexec \-n \fP\fInumprocs\fP\fB python \-m mpi4py \fP\fIpyfile\fP\fB [arg] ...\fP .IP \(bu 2 \fBmpiexec \-n \fP\fInumprocs\fP\fB python \-m mpi4py \-m \fP\fImod\fP\fB [arg] ...\fP .IP \(bu 2 \fBmpiexec \-n \fP\fInumprocs\fP\fB python \-m mpi4py \-c \fP\fIcmd\fP\fB [arg] ...\fP .IP \(bu 2 \fBmpiexec \-n \fP\fInumprocs\fP\fB python \-m mpi4py \- [arg] ...\fP .UNINDENT .INDENT 0.0 .TP .B Execute the Python code contained in \fIpyfile\fP, which must be a filesystem path referring to either a Python file, a directory containing a \fB__main__.py\fP file, or a zipfile containing a \fB__main__.py\fP file. .UNINDENT .INDENT 0.0 .TP .B \-m Search \fI\%sys.path\fP for the named module \fImod\fP and execute its contents. .UNINDENT .INDENT 0.0 .TP .B \-c Execute the Python code in the \fIcmd\fP string command. .UNINDENT .INDENT 0.0 .TP .B \- Read commands from standard input (\fI\%sys.stdin\fP). .UNINDENT .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .TP .B \fI\%Command line\fP Documentation on Python command line interface. .UNINDENT .UNINDENT .UNINDENT .SH CITATION .sp If MPI for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. .INDENT 0.0 .IP \(bu 2 L. Dalcin, P. Kler, R. Paz, and A. Cosimo, \fIParallel Distributed Computing using Python\fP, Advances in Water Resources, 34(9):1124\-1139, 2011. \fI\%http://dx.doi.org/10.1016/j.advwatres.2011.04.013\fP .IP \(bu 2 L. Dalcin, R. Paz, M. Storti, and J. D’Elia, \fIMPI for Python: performance improvements and MPI\-2 extensions\fP, Journal of Parallel and Distributed Computing, 68(5):655\-662, 2008. \fI\%http://dx.doi.org/10.1016/j.jpdc.2007.09.005\fP .IP \(bu 2 L. Dalcin, R. Paz, and M. Storti, \fIMPI for Python\fP, Journal of Parallel and Distributed Computing, 65(9):1108\-1115, 2005. \fI\%http://dx.doi.org/10.1016/j.jpdc.2005.03.010\fP .UNINDENT .SH INSTALLATION .SS Requirements .sp You need to have the following software properly installed in order to build \fIMPI for Python\fP: .INDENT 0.0 .IP \(bu 2 A working MPI implementation, preferably supporting MPI\-3 and built with shared/dynamic libraries. .sp \fBNOTE:\fP .INDENT 2.0 .INDENT 3.5 If you want to build some MPI implementation from sources, check the instructions at building\-mpi in the appendix. .UNINDENT .UNINDENT .IP \(bu 2 Python 2.7, 3.3 or above. .sp \fBNOTE:\fP .INDENT 2.0 .INDENT 3.5 Some MPI\-1 implementations \fBdo require\fP the actual command line arguments to be passed in \fBMPI_Init()\fP\&. In this case, you will need to use a rebuilt, MPI\-enabled, Python interpreter executable. \fIMPI for Python\fP has some support for alleviating you from this task. Check the instructions at python\-mpi in the appendix. .UNINDENT .UNINDENT .UNINDENT .SS Using \fBpip\fP or \fBeasy_install\fP .sp If you already have a working MPI (either if you installed it from sources or by using a pre\-built package from your favourite GNU/Linux distribution) and the \fBmpicc\fP compiler wrapper is on your search path, you can use \fBpip\fP: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ [sudo] pip install mpi4py .ft P .fi .UNINDENT .UNINDENT .sp or alternatively \fIsetuptools\fP \fBeasy_install\fP (deprecated): .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ [sudo] easy_install mpi4py .ft P .fi .UNINDENT .UNINDENT .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 If the \fBmpicc\fP compiler wrapper is not on your search path (or if it has a different name) you can use \fBenv\fP to pass the environment variable \fBMPICC\fP providing the full path to the MPI compiler wrapper executable: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ [sudo] env MPICC=/path/to/mpicc pip install mpi4py $ [sudo] env MPICC=/path/to/mpicc easy_install mpi4py .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SS Using \fBdistutils\fP .sp The \fIMPI for Python\fP package is available for download at the project website generously hosted by Bitbucket. You can use \fBcurl\fP or \fBwget\fP to get a release tarball. .INDENT 0.0 .IP \(bu 2 Using \fBcurl\fP: .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C $ curl \-O https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py\-X.Y.tar.gz .ft P .fi .UNINDENT .UNINDENT .IP \(bu 2 Using \fBwget\fP: .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C $ wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py\-X.Y.tar.gz .ft P .fi .UNINDENT .UNINDENT .UNINDENT .sp After unpacking the release tarball: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ tar \-zxf mpi4py\-X.Y.tar.gz $ cd mpi4py\-X.Y .ft P .fi .UNINDENT .UNINDENT .sp the package is ready for building. .sp \fIMPI for Python\fP uses a standard distutils\-based build system. However, some distutils commands (like \fIbuild\fP) have additional options: .INDENT 0.0 .TP .B \-\-mpicc= Lets you specify a special location or name for the \fBmpicc\fP compiler wrapper. .UNINDENT .INDENT 0.0 .TP .B \-\-mpi= Lets you pass a section with MPI configuration within a special configuration file. .UNINDENT .INDENT 0.0 .TP .B \-\-configure Runs exhaustive tests for checking about missing MPI types, constants, and functions. This option should be passed in order to build \fIMPI for Python\fP against old MPI\-1 or MPI\-2 implementations, possibly providing a subset of MPI\-3. .UNINDENT .sp If you use a MPI implementation providing a \fBmpicc\fP compiler wrapper (e.g., MPICH, Open MPI), it will be used for compilation and linking. This is the preferred and easiest way of building \fIMPI for Python\fP\&. .sp If \fBmpicc\fP is located somewhere in your search path, simply run the \fIbuild\fP command: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python setup.py build .ft P .fi .UNINDENT .UNINDENT .sp If \fBmpicc\fP is not in your search path or the compiler wrapper has a different name, you can run the \fIbuild\fP command specifying its location: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python setup.py build \-\-mpicc=/where/you/have/mpicc .ft P .fi .UNINDENT .UNINDENT .sp Alternatively, you can provide all the relevant information about your MPI implementation by editing the file called \fBmpi.cfg\fP\&. You can use the default section \fB[mpi]\fP or add a new, custom section, for example \fB[other_mpi]\fP (see the examples provided in the \fBmpi.cfg\fP file as a starting point to write your own section): .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C [mpi] include_dirs = /usr/local/mpi/include libraries = mpi library_dirs = /usr/local/mpi/lib runtime_library_dirs = /usr/local/mpi/lib [other_mpi] include_dirs = /opt/mpi/include ... libraries = mpi ... library_dirs = /opt/mpi/lib ... runtime_library_dirs = /op/mpi/lib ... \&... .ft P .fi .UNINDENT .UNINDENT .sp and then run the \fIbuild\fP command, perhaps specifying you custom configuration section: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python setup.py build \-\-mpi=other_mpi .ft P .fi .UNINDENT .UNINDENT .sp After building, the package is ready for install. .sp If you have root privileges (either by log\-in as the root user of by using \fBsudo\fP) and you want to install \fIMPI for Python\fP in your system for all users, just do: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python setup.py install .ft P .fi .UNINDENT .UNINDENT .sp The previous steps will install the \fBmpi4py\fP package at standard location \fB\fIprefix\fP\fP\fB/lib/python\fP\fIX\fP\fB\&.\fP\fIX\fP\fB/site\-packages\fP\&. .sp If you do not have root privileges or you want to install \fIMPI for Python\fP for your private use, just do: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python setup.py install \-\-user .ft P .fi .UNINDENT .UNINDENT .SS Testing .sp To quickly test the installation: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ mpiexec \-n 5 python \-m mpi4py.bench helloworld Hello, World! I am process 0 of 5 on localhost. Hello, World! I am process 1 of 5 on localhost. Hello, World! I am process 2 of 5 on localhost. Hello, World! I am process 3 of 5 on localhost. Hello, World! I am process 4 of 5 on localhost. .ft P .fi .UNINDENT .UNINDENT .sp If you installed from source, issuing at the command line: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ mpiexec \-n 5 python demo/helloworld.py .ft P .fi .UNINDENT .UNINDENT .sp or (in the case of ancient MPI\-1 implementations): .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ mpirun \-np 5 python \(gapwd\(ga/demo/helloworld.py .ft P .fi .UNINDENT .UNINDENT .sp will launch a five\-process run of the Python interpreter and run the test script \fBdemo/helloworld.py\fP from the source distribution. .sp You can also run all the \fIunittest\fP scripts: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ mpiexec \-n 5 python test/runtests.py .ft P .fi .UNINDENT .UNINDENT .sp or, if you have \fI\%nose\fP unit testing framework installed: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ mpiexec \-n 5 nosetests \-w test .ft P .fi .UNINDENT .UNINDENT .sp or, if you have \fI\%py.test\fP unit testing framework installed: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ mpiexec \-n 5 py.test test/ .ft P .fi .UNINDENT .UNINDENT .SH APPENDIX .SS MPI\-enabled Python interpreter .INDENT 0.0 .INDENT 3.5 .sp \fBWARNING:\fP .INDENT 0.0 .INDENT 3.5 These days it is no longer required to use the MPI\-enabled Python interpreter in most cases, and, therefore, is not built by default anymore because it is too difficult to reliably build a Python interpreter across different distributions. If you know that you still \fBreally\fP need it, see below on how to use the \fIbuild_exe\fP and \fIinstall_exe\fP commands. .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp Some MPI\-1 implementations (notably, MPICH 1) \fBdo require\fP the actual command line arguments to be passed at the time \fBMPI_Init()\fP is called. In this case, you will need to use a re\-built, MPI\-enabled, Python interpreter binary executable. A basic implementation (targeting Python 2.X) of what is required is shown below: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C #include #include int main(int argc, char *argv[]) { int status, flag; MPI_Init(&argc, &argv); status = Py_Main(argc, argv); MPI_Finalized(&flag); if (!flag) MPI_Finalize(); return status; } .ft P .fi .UNINDENT .UNINDENT .sp The source code above is straightforward; compiling it should also be. However, the linking step is more tricky: special flags have to be passed to the linker depending on your platform. In order to alleviate you for such low\-level details, \fIMPI for Python\fP provides some pure\-distutils based support to build and install an MPI\-enabled Python interpreter executable: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ cd mpi4py\-X.X.X $ python setup.py build_exe [\-\-mpi=|\-\-mpicc=/path/to/mpicc] $ [sudo] python setup.py install_exe [\-\-install\-dir=$HOME/bin] .ft P .fi .UNINDENT .UNINDENT .sp After the above steps you should have the MPI\-enabled interpreter installed as \fB\fIprefix\fP\fP\fB/bin/python\fP\fIX\fP\fB\&.\fP\fIX\fP\fB\-mpi\fP (or \fB$HOME/bin/python\fP\fIX\fP\fB\&.\fP\fIX\fP\fB\-mpi\fP). Assuming that \fB\fIprefix\fP\fP\fB/bin\fP (or \fB$HOME/bin\fP) is listed on your \fBPATH\fP, you should be able to enter your MPI\-enabled Python interactively, for example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ python2.7\-mpi Python 2.7.8 (default, Nov 10 2014, 08:19:18) [GCC 4.9.2 20141101 (Red Hat 4.9.2\-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.executable \(aq/usr/bin/python2.7\-mpi\(aq >>> .ft P .fi .UNINDENT .UNINDENT .SS Building MPI from sources .sp In the list below you have some executive instructions for building some of the open\-source MPI implementations out there with support for shared/dynamic libraries on POSIX environments. .INDENT 0.0 .IP \(bu 2 \fIMPICH\fP .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C $ tar \-zxf mpich\-X.X.X.tar.gz $ cd mpich\-X.X.X $ ./configure \-\-enable\-shared \-\-prefix=/usr/local/mpich $ make $ make install .ft P .fi .UNINDENT .UNINDENT .IP \(bu 2 \fIOpen MPI\fP .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C $ tar \-zxf openmpi\-X.X.X tar.gz $ cd openmpi\-X.X.X $ ./configure \-\-prefix=/usr/local/openmpi $ make all $ make install .ft P .fi .UNINDENT .UNINDENT .IP \(bu 2 \fIMPICH 1\fP .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C $ tar \-zxf mpich\-X.X.X.tar.gz $ cd mpich\-X.X.X $ ./configure \-\-enable\-sharedlib \-\-prefix=/usr/local/mpich1 $ make $ make install .ft P .fi .UNINDENT .UNINDENT .UNINDENT .sp Perhaps you will need to set the \fBLD_LIBRARY_PATH\fP environment variable (using \fBexport\fP, \fBsetenv\fP or what applies to your system) pointing to the directory containing the MPI libraries . In case of getting runtime linking errors when running MPI programs, the following lines can be added to the user login shell script (\fB\&.profile\fP, \fB\&.bashrc\fP, etc.). .INDENT 0.0 .IP \(bu 2 \fIMPICH\fP .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C MPI_DIR=/usr/local/mpich export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH .ft P .fi .UNINDENT .UNINDENT .IP \(bu 2 \fIOpen MPI\fP .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C MPI_DIR=/usr/local/openmpi export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH .ft P .fi .UNINDENT .UNINDENT .IP \(bu 2 \fIMPICH 1\fP .INDENT 2.0 .INDENT 3.5 .sp .nf .ft C MPI_DIR=/usr/local/mpich1 export LD_LIBRARY_PATH=$MPI_DIR/lib/shared:$LD_LIBRARY_PATH: export MPICH_USE_SHLIB=yes .ft P .fi .UNINDENT .UNINDENT .sp \fBWARNING:\fP .INDENT 2.0 .INDENT 3.5 MPICH 1 support for dynamic libraries is not completely transparent. Users should set the environment variable \fBMPICH_USE_SHLIB\fP to \fByes\fP in order to avoid link problems when using the \fBmpicc\fP compiler wrapper. .UNINDENT .UNINDENT .UNINDENT .SH AUTHOR Lisandro Dalcin .SH COPYRIGHT 2019, Lisandro Dalcin .\" Generated by docutils manpage writer. . mpi4py-3.0.3/docs/LICENSE.html0000664000175000017500000002271213560002761016703 0ustar dalcinldalcinl00000000000000 LICENSE: MPI for Python

LICENSE: MPI for Python

Author: Lisandro Dalcin
Contact: dalcinl@gmail.com

Copyright (c) 2019, Lisandro Dalcin. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

mpi4py-3.0.3/docs/mpi4py.info0000664000175000017500000031455013560002767017044 0ustar dalcinldalcinl00000000000000This is mpi4py.info, produced by makeinfo version 6.6 from mpi4py.texi. MPI for Python 3.0.3, Nov 04, 2019 Lisandro Dalcin Copyright © 2019, Lisandro Dalcin INFO-DIR-SECTION Miscellaneous START-INFO-DIR-ENTRY * mpi4py: (mpi4py.info). MPI for Python. END-INFO-DIR-ENTRY Generated by Sphinx 1.8.4.  File: mpi4py.info, Node: Top, Next: Contents, Up: (dir) MPI for Python ************** MPI for Python 3.0.3, Nov 04, 2019 Lisandro Dalcin Copyright © 2019, Lisandro Dalcin Author: Lisandro Dalcin Contact: Web Site: ‘https://bitbucket.org/mpi4py/mpi4py’ Date: Nov 04, 2019 Abstract ======== This document describes the `MPI for Python' package. `MPI for Python' provides bindings of the `Message Passing Interface' (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors. This package is constructed on top of the MPI-1/2/3 specifications and provides an object oriented interface which resembles the MPI-2 C++ bindings. It supports point-to-point (sends, receives) and collective (broadcasts, scatters, gathers) communications of any `picklable' Python object, as well as optimized communications of Python object exposing the single-segment buffer interface (NumPy arrays, builtin bytes/string/array objects) * Menu: * Contents:: * Python Module Index:: * Index:: — The Detailed Node Listing — Contents * Introduction:: * Overview:: * Tutorial:: * mpi4py.futures: mpi4py futures. * mpi4py.run: mpi4py run. * Citation:: * Installation:: * Appendix:: Introduction * What is MPI?:: * What is Python?:: * Related Projects:: Overview * Communicating Python Objects and Array Data:: * Communicators:: * Point-to-Point Communications:: * Collective Communications:: * Dynamic Process Management:: * One-Sided Communications:: * Parallel Input/Output:: * Environmental Management:: Point-to-Point Communications * Blocking Communications:: * Nonblocking Communications:: * Persistent Communications:: Environmental Management * Initialization and Exit:: * Implementation Information:: * Timers:: * Error Handling:: Tutorial * Running Python scripts with MPI:: * Point-to-Point Communication:: * Collective Communication:: * MPI-IO:: * Dynamic Process Management: Dynamic Process Management<2>. * Wrapping with SWIG:: * Wrapping with F2Py:: mpi4py.futures * concurrent.futures: concurrent futures. * MPIPoolExecutor:: * MPICommExecutor:: * Command line:: * Examples:: mpi4py.run * Interface options:: Installation * Requirements:: * Using pip or easy_install:: * Using distutils:: * Testing:: Appendix * MPI-enabled Python interpreter:: * Building MPI from sources::  File: mpi4py.info, Node: Contents, Next: Python Module Index, Prev: Top, Up: Top Contents ******** * Menu: * Introduction:: * Overview:: * Tutorial:: * mpi4py.futures: mpi4py futures. * mpi4py.run: mpi4py run. * Citation:: * Installation:: * Appendix::  File: mpi4py.info, Node: Introduction, Next: Overview, Up: Contents 1 Introduction ************** Over the last years, high performance computing has become an affordable resource to many more researchers in the scientific community than ever before. The conjunction of quality open source software and commodity hardware strongly influenced the now widespread popularity of Beowulf(1) class clusters and cluster of workstations. Among many parallel computational models, message-passing has proven to be an effective one. This paradigm is specially suited for (but not limited to) distributed memory architectures and is used in today’s most demanding scientific and engineering application related to modeling, simulation, design, and signal processing. However, portable message-passing parallel programming used to be a nightmare in the past because of the many incompatible options developers were faced to. Fortunately, this situation definitely changed after the MPI Forum released its standard specification. High performance computing is traditionally associated with software development using compiled languages. However, in typical applications programs, only a small part of the code is time-critical enough to require the efficiency of compiled languages. The rest of the code is generally related to memory management, error handling, input/output, and user interaction, and those are usually the most error prone and time-consuming lines of code to write and debug in the whole development process. Interpreted high-level languages can be really advantageous for this kind of tasks. For implementing general-purpose numerical computations, MATLAB (2) is the dominant interpreted programming language. In the open source side, Octave and Scilab are well known, freely distributed software packages providing compatibility with the MATLAB language. In this work, we present MPI for Python, a new package enabling applications to exploit multiple processors using standard MPI “look and feel†in Python scripts. * Menu: * What is MPI?:: * What is Python?:: * Related Projects:: ---------- Footnotes ---------- (1) http://www.beowulf.org/ (2) MATLAB is a registered trademark of The MathWorks, Inc.  File: mpi4py.info, Node: What is MPI?, Next: What is Python?, Up: Introduction 1.1 What is MPI? ================ MPI(1), *note [mpi-using]: 8. *note [mpi-ref]: 9. the `Message Passing Interface', is a standardized and portable message-passing system designed to function on a wide variety of parallel computers. The standard defines the syntax and semantics of library routines and allows users to write portable programs in the main scientific programming languages (Fortran, C, or C++). Since its release, the MPI specification *note [mpi-std1]: a. *note [mpi-std2]: b. has become the leading standard for message-passing libraries for parallel computers. Implementations are available from vendors of high-performance computers and from well known open source projects like MPICH(2) *note [mpi-mpich]: c. and Open MPI(3) *note [mpi-openmpi]: d. ---------- Footnotes ---------- (1) http://mpi-forum.org/ (2) https://www.mpich.org/ (3) https://www.open-mpi.org/  File: mpi4py.info, Node: What is Python?, Next: Related Projects, Prev: What is MPI?, Up: Introduction 1.2 What is Python? =================== Python(1) is a modern, easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming with dynamic typing and dynamic binding. It supports modules and packages, which encourages program modularity and code reuse. Python’s elegant syntax, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed. It is easily extended with new functions and data types implemented in C or C++. Python is also suitable as an extension language for customizable applications. Python is an ideal candidate for writing the higher-level parts of large-scale scientific applications *note [Hinsen97]: f. and driving simulations in parallel architectures *note [Beazley97]: 10. like clusters of PC’s or SMP’s. Python codes are quickly developed, easily maintained, and can achieve a high degree of integration with other libraries written in compiled languages. ---------- Footnotes ---------- (1) https://www.python.org/  File: mpi4py.info, Node: Related Projects, Prev: What is Python?, Up: Introduction 1.3 Related Projects ==================== As this work started and evolved, some ideas were borrowed from well known MPI and Python related open source projects from the Internet. * OOMPI(1) + It has not relation with Python, but is an excellent object oriented approach to MPI. + It is a C++ class library specification layered on top of the C bindings that encapsulates MPI into a functional class hierarchy. + It provides a flexible and intuitive interface by adding some abstractions, like `Ports' and `Messages', which enrich and simplify the syntax. * Pypar(2) + Its interface is rather minimal. There is no support for communicators or process topologies. + It does not require the Python interpreter to be modified or recompiled, but does not permit interactive parallel runs. + General (`picklable') Python objects of any type can be communicated. There is good support for numeric arrays, practically full MPI bandwidth can be achieved. * pyMPI(3) + It rebuilds the Python interpreter providing a built-in module for message passing. It does permit interactive parallel runs, which are useful for learning and debugging. + It provides an interface suitable for basic parallel programing. There is not full support for defining new communicators or process topologies. + General (picklable) Python objects can be messaged between processors. There is not support for numeric arrays. * Scientific Python(4) + It provides a collection of Python modules that are useful for scientific computing. + There is an interface to MPI and BSP (`Bulk Synchronous Parallel programming'). + The interface is simple but incomplete and does not resemble the MPI specification. There is support for numeric arrays. Additionally, we would like to mention some available tools for scientific computing and software development with Python. + NumPy(5) is a package that provides array manipulation and computational capabilities similar to those found in IDL, MATLAB, or Octave. Using NumPy, it is possible to write many efficient numerical data processing applications directly in Python without using any C, C++ or Fortran code. + SciPy(6) is an open source library of scientific tools for Python, gathering a variety of high level science and engineering modules together as a single package. It includes modules for graphics and plotting, optimization, integration, special functions, signal and image processing, genetic algorithms, ODE solvers, and others. + Cython(7) is a language that makes writing C extensions for the Python language as easy as Python itself. The Cython language is very close to the Python language, but Cython additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code. This makes Cython the ideal language for wrapping for external C libraries, and for fast C modules that speed up the execution of Python code. + SWIG(8) is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages like Perl, Tcl/Tk, Ruby and Python. Issuing header files to SWIG is the simplest approach to interfacing C/C++ libraries from a Python module. (mpi-std1) MPI Forum. MPI: A Message Passing Interface Standard. International Journal of Supercomputer Applications, volume 8, number 3-4, pages 159-416, 1994. (mpi-std2) MPI Forum. MPI: A Message Passing Interface Standard. High Performance Computing Applications, volume 12, number 1-2, pages 1-299, 1998. (mpi-using) William Gropp, Ewing Lusk, and Anthony Skjellum. Using MPI: portable parallel programming with the message-passing interface. MIT Press, 1994. (mpi-ref) Mark Snir, Steve Otto, Steven Huss-Lederman, David Walker, and Jack Dongarra. MPI - The Complete Reference, volume 1, The MPI Core. MIT Press, 2nd. edition, 1998. (mpi-mpich) W. Gropp, E. Lusk, N. Doss, and A. Skjellum. A high-performance, portable implementation of the MPI message passing interface standard. Parallel Computing, 22(6):789-828, September 1996. (mpi-openmpi) Edgar Gabriel, Graham E. Fagg, George Bosilca, Thara Angskun, Jack J. Dongarra, Jeffrey M. Squyres, Vishal Sahay, Prabhanjan Kambadur, Brian Barrett, Andrew Lumsdaine, Ralph H. Castain, David J. Daniel, Richard L. Graham, and Timothy S. Woodall. Open MPI: Goals, Concept, and Design of a Next Generation MPI Implementation. In Proceedings, 11th European PVM/MPI Users’ Group Meeting, Budapest, Hungary, September 2004. (Hinsen97) Konrad Hinsen. The Molecular Modelling Toolkit: a case study of a large scientific application in Python. In Proceedings of the 6th International Python Conference, pages 29-35, San Jose, Ca., October 1997. (Beazley97) David M. Beazley and Peter S. Lomdahl. Feeding a large-scale physics application to Python. In Proceedings of the 6th International Python Conference, pages 21-29, San Jose, Ca., October 1997. ---------- Footnotes ---------- (1) http://www.osl.iu.edu/research/oompi/overview.php (2) https://github.com/daleroberts/pypar (3) https://sourceforge.net/projects/pympi/ (4) http://dirac.cnrs-orleans.fr/plone/software/scientificpython/ (5) http://www.numpy.org/ (6) https://www.scipy.org/ (7) http://cython.org/ (8) http://www.swig.org/  File: mpi4py.info, Node: Overview, Next: Tutorial, Prev: Introduction, Up: Contents 2 Overview ********** MPI for Python provides an object oriented approach to message passing which grounds on the standard MPI-2 C++ bindings. The interface was designed with focus in translating MPI syntax and semantics of standard MPI-2 bindings for C++ to Python. Any user of the standard C/C++ MPI bindings should be able to use this module without need of learning a new interface. * Menu: * Communicating Python Objects and Array Data:: * Communicators:: * Point-to-Point Communications:: * Collective Communications:: * Dynamic Process Management:: * One-Sided Communications:: * Parallel Input/Output:: * Environmental Management::  File: mpi4py.info, Node: Communicating Python Objects and Array Data, Next: Communicators, Up: Overview 2.1 Communicating Python Objects and Array Data =============================================== The Python standard library supports different mechanisms for data persistence. Many of them rely on disk storage, but `pickling' and `marshaling' can also work with memory buffers. The pickle(1) modules provide user-extensible facilities to serialize general Python objects using ASCII or binary formats. The marshal(2) module provides facilities to serialize built-in Python objects using a binary format specific to Python, but independent of machine architecture issues. `MPI for Python' can communicate any built-in or user-defined Python object taking advantage of the features provided by the pickle(3) module. These facilities will be routinely used to build binary representations of objects to communicate (at sending processes), and restoring them back (at receiving processes). Although simple and general, the serialization approach (i.e., `pickling' and `unpickling') previously discussed imposes important overheads in memory as well as processor usage, especially in the scenario of objects with large memory footprints being communicated. Pickling general Python objects, ranging from primitive or container built-in types to user-defined classes, necessarily requires computer resources. Processing is also needed for dispatching the appropriate serialization method (that depends on the type of the object) and doing the actual packing. Additional memory is always needed, and if its total amount is not known `a priori', many reallocations can occur. Indeed, in the case of large numeric arrays, this is certainly unacceptable and precludes communication of objects occupying half or more of the available memory resources. `MPI for Python' supports direct communication of any object exporting the single-segment buffer interface. This interface is a standard Python mechanism provided by some types (e.g., strings and numeric arrays), allowing access in the C side to a contiguous memory buffer (i.e., address and length) containing the relevant data. This feature, in conjunction with the capability of constructing user-defined MPI datatypes describing complicated memory layouts, enables the implementation of many algorithms involving multidimensional numeric arrays (e.g., image processing, fast Fourier transforms, finite difference schemes on structured Cartesian grids) directly in Python, with negligible overhead, and almost as fast as compiled Fortran, C, or C++ codes. ---------- Footnotes ---------- (1) https://docs.python.org/3/library/pickle.html#module-pickle (2) https://docs.python.org/3/library/marshal.html#module-marshal (3) https://docs.python.org/3/library/pickle.html#module-pickle  File: mpi4py.info, Node: Communicators, Next: Point-to-Point Communications, Prev: Communicating Python Objects and Array Data, Up: Overview 2.2 Communicators ================= In `MPI for Python', ‘MPI.Comm’ is the base class of communicators. The ‘MPI.Intracomm’ and ‘MPI.Intercomm’ classes are sublcasses of the ‘MPI.Comm’ class. The ‘MPI.Comm.Is_inter()’ method (and ‘MPI.Comm.Is_intra()’, provided for convenience but not part of the MPI specification) is defined for communicator objects and can be used to determine the particular communicator class. The two predefined intracommunicator instances are available: ‘MPI.COMM_SELF’ and ‘MPI.COMM_WORLD’. From them, new communicators can be created as needed. The number of processes in a communicator and the calling process rank can be respectively obtained with methods ‘MPI.Comm.Get_size()’ and ‘MPI.Comm.Get_rank()’. The associated process group can be retrieved from a communicator by calling the ‘MPI.Comm.Get_group()’ method, which returns an instance of the ‘MPI.Group’ class. Set operations with ‘MPI.Group’ objects like like ‘MPI.Group.Union()’, ‘MPI.Group.Intersect()’ and ‘MPI.Group.Difference()’ are fully supported, as well as the creation of new communicators from these groups using ‘MPI.Comm.Create()’ and ‘MPI.Comm.Create_group()’. New communicator instances can be obtained with the ‘MPI.Comm.Clone()’, ‘MPI.Comm.Dup()’ and ‘MPI.Comm.Split()’ methods, as well methods ‘MPI.Intracomm.Create_intercomm()’ and ‘MPI.Intercomm.Merge()’. Virtual topologies (‘MPI.Cartcomm’, ‘MPI.Graphcomm’ and ‘MPI.Distgraphcomm’ classes, which are specializations of the ‘MPI.Intracomm’ class) are fully supported. New instances can be obtained from intracommunicator instances with factory methods ‘MPI.Intracomm.Create_cart()’ and ‘MPI.Intracomm.Create_graph()’.  File: mpi4py.info, Node: Point-to-Point Communications, Next: Collective Communications, Prev: Communicators, Up: Overview 2.3 Point-to-Point Communications ================================= Point to point communication is a fundamental capability of message passing systems. This mechanism enables the transmission of data between a pair of processes, one side sending, the other receiving. MPI provides a set of `send' and `receive' functions allowing the communication of `typed' data with an associated `tag'. The type information enables the conversion of data representation from one architecture to another in the case of heterogeneous computing environments; additionally, it allows the representation of non-contiguous data layouts and user-defined datatypes, thus avoiding the overhead of (otherwise unavoidable) packing/unpacking operations. The tag information allows selectivity of messages at the receiving end. * Menu: * Blocking Communications:: * Nonblocking Communications:: * Persistent Communications::  File: mpi4py.info, Node: Blocking Communications, Next: Nonblocking Communications, Up: Point-to-Point Communications 2.3.1 Blocking Communications ----------------------------- MPI provides basic send and receive functions that are `blocking'. These functions block the caller until the data buffers involved in the communication can be safely reused by the application program. In `MPI for Python', the ‘MPI.Comm.Send()’, ‘MPI.Comm.Recv()’ and ‘MPI.Comm.Sendrecv()’ methods of communicator objects provide support for blocking point-to-point communications within ‘MPI.Intracomm’ and ‘MPI.Intercomm’ instances. These methods can communicate memory buffers. The variants ‘MPI.Comm.send()’, ‘MPI.Comm.recv()’ and ‘MPI.Comm.sendrecv()’ can communicate general Python objects.  File: mpi4py.info, Node: Nonblocking Communications, Next: Persistent Communications, Prev: Blocking Communications, Up: Point-to-Point Communications 2.3.2 Nonblocking Communications -------------------------------- On many systems, performance can be significantly increased by overlapping communication and computation. This is particularly true on systems where communication can be executed autonomously by an intelligent, dedicated communication controller. MPI provides `nonblocking' send and receive functions. They allow the possible overlap of communication and computation. Non-blocking communication always come in two parts: posting functions, which begin the requested operation; and test-for-completion functions, which allow to discover whether the requested operation has completed. In `MPI for Python', the ‘MPI.Comm.Isend()’ and ‘MPI.Comm.Irecv()’ methods initiate send and receive operations, respectively. These methods return a ‘MPI.Request’ instance, uniquely identifying the started operation. Its completion can be managed using the ‘MPI.Request.Test()’, ‘MPI.Request.Wait()’ and ‘MPI.Request.Cancel()’ methods. The management of ‘MPI.Request’ objects and associated memory buffers involved in communication requires a careful, rather low-level coordination. Users must ensure that objects exposing their memory buffers are not accessed at the Python level while they are involved in nonblocking message-passing operations.  File: mpi4py.info, Node: Persistent Communications, Prev: Nonblocking Communications, Up: Point-to-Point Communications 2.3.3 Persistent Communications ------------------------------- Often a communication with the same argument list is repeatedly executed within an inner loop. In such cases, communication can be further optimized by using persistent communication, a particular case of nonblocking communication allowing the reduction of the overhead between processes and communication controllers. Furthermore , this kind of optimization can also alleviate the extra call overheads associated to interpreted, dynamic languages like Python. In `MPI for Python', the ‘MPI.Comm.Send_init()’ and ‘MPI.Comm.Recv_init()’ methods create persistent requests for a send and receive operation, respectively. These methods return an instance of the ‘MPI.Prequest’ class, a subclass of the ‘MPI.Request’ class. The actual communication can be effectively started using the ‘MPI.Prequest.Start()’ method, and its completion can be managed as previously described.  File: mpi4py.info, Node: Collective Communications, Next: Dynamic Process Management, Prev: Point-to-Point Communications, Up: Overview 2.4 Collective Communications ============================= Collective communications allow the transmittal of data between multiple processes of a group simultaneously. The syntax and semantics of collective functions is consistent with point-to-point communication. Collective functions communicate `typed' data, but messages are not paired with an associated `tag'; selectivity of messages is implied in the calling order. Additionally, collective functions come in blocking versions only. The more commonly used collective communication operations are the following. * Barrier synchronization across all group members. * Global communication functions + Broadcast data from one member to all members of a group. + Gather data from all members to one member of a group. + Scatter data from one member to all members of a group. * Global reduction operations such as sum, maximum, minimum, etc. In `MPI for Python', the ‘MPI.Comm.Bcast()’, ‘MPI.Comm.Scatter()’, ‘MPI.Comm.Gather()’, ‘MPI.Comm.Allgather()’, and ‘MPI.Comm.Alltoall()’ ‘MPI.Comm.Alltoallw()’ methods provide support for collective communications of memory buffers. The lower-case variants ‘MPI.Comm.bcast()’, ‘MPI.Comm.scatter()’, ‘MPI.Comm.gather()’, ‘MPI.Comm.allgather()’ and ‘MPI.Comm.alltoall()’ can communicate general Python objects. The vector variants (which can communicate different amounts of data to each process) ‘MPI.Comm.Scatterv()’, ‘MPI.Comm.Gatherv()’, ‘MPI.Comm.Allgatherv()’, ‘MPI.Comm.Alltoallv()’ and ‘MPI.Comm.Alltoallw()’ are also supported, they can only communicate objects exposing memory buffers. Global reduction operations on memory buffers are accessible through the ‘MPI.Comm.Reduce()’, ‘MPI.Comm.Reduce_scatter’, ‘MPI.Comm.Allreduce()’, ‘MPI.Intracomm.Scan()’ and ‘MPI.Intracomm.Exscan()’ methods. The lower-case variants ‘MPI.Comm.reduce()’, ‘MPI.Comm.allreduce()’, ‘MPI.Intracomm.scan()’ and ‘MPI.Intracomm.exscan()’ can communicate general Python objects; however, the actual required reduction computations are performed sequentially at some process. All the predefined (i.e., ‘MPI.SUM’, ‘MPI.PROD’, ‘MPI.MAX’, etc.) reduction operations can be applied.  File: mpi4py.info, Node: Dynamic Process Management, Next: One-Sided Communications, Prev: Collective Communications, Up: Overview 2.5 Dynamic Process Management ============================== In the context of the MPI-1 specification, a parallel application is static; that is, no processes can be added to or deleted from a running application after it has been started. Fortunately, this limitation was addressed in MPI-2. The new specification added a process management model providing a basic interface between an application and external resources and process managers. This MPI-2 extension can be really useful, especially for sequential applications built on top of parallel modules, or parallel applications with a client/server model. The MPI-2 process model provides a mechanism to create new processes and establish communication between them and the existing MPI application. It also provides mechanisms to establish communication between two existing MPI applications, even when one did not `start' the other. In `MPI for Python', new independent process groups can be created by calling the ‘MPI.Intracomm.Spawn()’ method within an intracommunicator. This call returns a new intercommunicator (i.e., an ‘MPI.Intercomm’ instance) at the parent process group. The child process group can retrieve the matching intercommunicator by calling the ‘MPI.Comm.Get_parent()’ class method. At each side, the new intercommunicator can be used to perform point to point and collective communications between the parent and child groups of processes. Alternatively, disjoint groups of processes can establish communication using a client/server approach. Any server application must first call the ‘MPI.Open_port()’ function to open a `port' and the ‘MPI.Publish_name()’ function to publish a provided `service', and next call the ‘MPI.Intracomm.Accept()’ method. Any client applications can first find a published `service' by calling the ‘MPI.Lookup_name()’ function, which returns the `port' where a server can be contacted; and next call the ‘MPI.Intracomm.Connect()’ method. Both ‘MPI.Intracomm.Accept()’ and ‘MPI.Intracomm.Connect()’ methods return an ‘MPI.Intercomm’ instance. When connection between client/server processes is no longer needed, all of them must cooperatively call the ‘MPI.Comm.Disconnect()’ method. Additionally, server applications should release resources by calling the ‘MPI.Unpublish_name()’ and ‘MPI.Close_port()’ functions.  File: mpi4py.info, Node: One-Sided Communications, Next: Parallel Input/Output, Prev: Dynamic Process Management, Up: Overview 2.6 One-Sided Communications ============================ One-sided communications (also called `Remote Memory Access', `RMA') supplements the traditional two-sided, send/receive based MPI communication model with a one-sided, put/get based interface. One-sided communication that can take advantage of the capabilities of highly specialized network hardware. Additionally, this extension lowers latency and software overhead in applications written using a shared-memory-like paradigm. The MPI specification revolves around the use of objects called `windows'; they intuitively specify regions of a process’s memory that have been made available for remote read and write operations. The published memory blocks can be accessed through three functions for put (remote send), get (remote write), and accumulate (remote update or reduction) data items. A much larger number of functions support different synchronization styles; the semantics of these synchronization operations are fairly complex. In `MPI for Python', one-sided operations are available by using instances of the ‘MPI.Win’ class. New window objects are created by calling the ‘MPI.Win.Create()’ method at all processes within a communicator and specifying a memory buffer . When a window instance is no longer needed, the ‘MPI.Win.Free()’ method should be called. The three one-sided MPI operations for remote write, read and reduction are available through calling the methods ‘MPI.Win.Put()’, ‘MPI.Win.Get()’, and ‘MPI.Win.Accumulate()’ respectively within a ‘Win’ instance. These methods need an integer rank identifying the target process and an integer offset relative the base address of the remote memory block being accessed. The one-sided operations read, write, and reduction are implicitly nonblocking, and must be synchronized by using two primary modes. Active target synchronization requires the origin process to call the ‘MPI.Win.Start()’ and ‘MPI.Win.Complete()’ methods at the origin process, and target process cooperates by calling the ‘MPI.Win.Post()’ and ‘MPI.Win.Wait()’ methods. There is also a collective variant provided by the ‘MPI.Win.Fence()’ method. Passive target synchronization is more lenient, only the origin process calls the ‘MPI.Win.Lock()’ and ‘MPI.Win.Unlock()’ methods. Locks are used to protect remote accesses to the locked remote window and to protect local load/store accesses to a locked local window.  File: mpi4py.info, Node: Parallel Input/Output, Next: Environmental Management, Prev: One-Sided Communications, Up: Overview 2.7 Parallel Input/Output ========================= The POSIX standard provides a model of a widely portable file system. However, the optimization needed for parallel input/output cannot be achieved with this generic interface. In order to ensure efficiency and scalability, the underlying parallel input/output system must provide a high-level interface supporting partitioning of file data among processes and a collective interface supporting complete transfers of global data structures between process memories and files. Additionally, further efficiencies can be gained via support for asynchronous input/output, strided accesses to data, and control over physical file layout on storage devices. This scenario motivated the inclusion in the MPI-2 standard of a custom interface in order to support more elaborated parallel input/output operations. The MPI specification for parallel input/output revolves around the use objects called `files'. As defined by MPI, files are not just contiguous byte streams. Instead, they are regarded as ordered collections of `typed' data items. MPI supports sequential or random access to any integral set of these items. Furthermore, files are opened collectively by a group of processes. The common patterns for accessing a shared file (broadcast, scatter, gather, reduction) is expressed by using user-defined datatypes. Compared to the communication patterns of point-to-point and collective communications, this approach has the advantage of added flexibility and expressiveness. Data access operations (read and write) are defined for different kinds of positioning (using explicit offsets, individual file pointers, and shared file pointers), coordination (non-collective and collective), and synchronism (blocking, nonblocking, and split collective with begin/end phases). In `MPI for Python', all MPI input/output operations are performed through instances of the ‘MPI.File’ class. File handles are obtained by calling the ‘MPI.File.Open()’ method at all processes within a communicator and providing a file name and the intended access mode. After use, they must be closed by calling the ‘MPI.File.Close()’ method. Files even can be deleted by calling method ‘MPI.File.Delete()’. After creation, files are typically associated with a per-process `view'. The view defines the current set of data visible and accessible from an open file as an ordered set of elementary datatypes. This data layout can be set and queried with the ‘MPI.File.Set_view()’ and ‘MPI.File.Get_view()’ methods respectively. Actual input/output operations are achieved by many methods combining read and write calls with different behavior regarding positioning, coordination, and synchronism. Summing up, `MPI for Python' provides the thirty (30) methods defined in MPI-2 for reading from or writing to files using explicit offsets or file pointers (individual or shared), in blocking or nonblocking and collective or noncollective versions.  File: mpi4py.info, Node: Environmental Management, Prev: Parallel Input/Output, Up: Overview 2.8 Environmental Management ============================ * Menu: * Initialization and Exit:: * Implementation Information:: * Timers:: * Error Handling::  File: mpi4py.info, Node: Initialization and Exit, Next: Implementation Information, Up: Environmental Management 2.8.1 Initialization and Exit ----------------------------- Module functions ‘MPI.Init()’ or ‘MPI.Init_thread()’ and ‘MPI.Finalize()’ provide MPI initialization and finalization respectively. Module functions ‘MPI.Is_initialized()’ and ‘MPI.Is_finalized()’ provide the respective tests for initialization and finalization. Note: ‘MPI_Init()’ or ‘MPI_Init_thread()’ is actually called when you import the ‘MPI’ module from the ‘mpi4py’ package, but only if MPI is not already initialized. In such case, calling ‘MPI.Init()’ or ‘MPI.Init_thread()’ from Python is expected to generate an MPI error, and in turn an exception will be raised. Note: ‘MPI_Finalize()’ is registered (by using Python C/API function Py_AtExit()(1)) for being automatically called when Python processes exit, but only if ‘mpi4py’ actually initialized MPI. Therefore, there is no need to call ‘MPI.Finalize()’ from Python to ensure MPI finalization. ---------- Footnotes ---------- (1) https://docs.python.org/3/c-api/sys.html#c.Py_AtExit  File: mpi4py.info, Node: Implementation Information, Next: Timers, Prev: Initialization and Exit, Up: Environmental Management 2.8.2 Implementation Information -------------------------------- * The MPI version number can be retrieved from module function ‘MPI.Get_version()’. It returns a two-integer tuple ‘(version,subversion)’. * The ‘MPI.Get_processor_name()’ function can be used to access the processor name. * The values of predefined attributes attached to the world communicator can be obtained by calling the ‘MPI.Comm.Get_attr()’ method within the ‘MPI.COMM_WORLD’ instance.  File: mpi4py.info, Node: Timers, Next: Error Handling, Prev: Implementation Information, Up: Environmental Management 2.8.3 Timers ------------ MPI timer functionalities are available through the ‘MPI.Wtime()’ and ‘MPI.Wtick()’ functions.  File: mpi4py.info, Node: Error Handling, Prev: Timers, Up: Environmental Management 2.8.4 Error Handling -------------------- In order facilitate handle sharing with other Python modules interfacing MPI-based parallel libraries, the predefined MPI error handlers ‘MPI.ERRORS_RETURN’ and ‘MPI.ERRORS_ARE_FATAL’ can be assigned to and retrieved from communicators, windows and files using methods ‘MPI.{Comm|Win|File}.Set_errhandler()’ and ‘MPI.{Comm|Win|File}.Get_errhandler()’. When the predefined error handler ‘MPI.ERRORS_RETURN’ is set, errors returned from MPI calls within Python code will raise an instance of the exception class ‘MPI.Exception’, which is a subclass of the standard Python exception RuntimeError(1). Note: After import, mpi4py overrides the default MPI rules governing inheritance of error handlers. The ‘MPI.ERRORS_RETURN’ error handler is set in the predefined ‘MPI.COMM_SELF’ and ‘MPI.COMM_WORLD’ communicators, as well as any new ‘MPI.Comm’, ‘MPI.Win’, or ‘MPI.File’ instance created through mpi4py. If you ever pass such handles to C/C++/Fortran library code, it is recommended to set the ‘MPI.ERRORS_ARE_FATAL’ error handler on them to ensure MPI errors do not pass silently. Warning: Importing with ‘from mpi4py.MPI import *’ will cause a name clashing with the standard Python Exception(2) base class. ---------- Footnotes ---------- (1) https://docs.python.org/3/library/exceptions.html#RuntimeError (2) https://docs.python.org/3/library/exceptions.html#Exception  File: mpi4py.info, Node: Tutorial, Next: mpi4py futures, Prev: Overview, Up: Contents 3 Tutorial ********** Warning: Under construction. Contributions very welcome! `MPI for Python' supports convenient, `pickle'-based communication of generic Python object as well as fast, near C-speed, direct array data communication of buffer-provider objects (e.g., NumPy arrays). * Communication of generic Python objects You have to use `all-lowercase' methods (of the ‘Comm’ class), like ‘send()’, ‘recv()’, ‘bcast()’. An object to be sent is passed as a paramenter to the communication call, and the received object is simply the return value. The ‘isend()’ and ‘irecv()’ methods return ‘Request’ instances; completion of these methods can be managed using the ‘test()’ and ‘wait()’ methods of the ‘Request’ class. The ‘recv()’ and ‘irecv()’ methods may be passed a buffer object that can be repeatedly used to receive messages avoiding internal memory allocation. This buffer must be sufficiently large to accommodate the transmitted messages; hence, any buffer passed to ‘recv()’ or ‘irecv()’ must be at least as long as the `pickled' data transmitted to the receiver. Collective calls like ‘scatter()’, ‘gather()’, ‘allgather()’, ‘alltoall()’ expect a single value or a sequence of ‘Comm.size’ elements at the root or all process. They return a single value, a list of ‘Comm.size’ elements, or ‘None’. * Communication of buffer-like objects You have to use method names starting with an `upper-case' letter (of the ‘Comm’ class), like ‘Send()’, ‘Recv()’, ‘Bcast()’, ‘Scatter()’, ‘Gather()’. In general, buffer arguments to these calls must be explicitly specified by using a 2/3-list/tuple like ‘[data, MPI.DOUBLE]’, or ‘[data, count, MPI.DOUBLE]’ (the former one uses the byte-size of ‘data’ and the extent of the MPI datatype to define ‘count’). For vector collectives communication operations like ‘Scatterv()’ and ‘Gatherv()’, buffer arguments are specified as ‘[data, count, displ, datatype]’, where ‘count’ and ‘displ’ are sequences of integral values. Automatic MPI datatype discovery for NumPy arrays and PEP-3118 buffers is supported, but limited to basic C types (all C/C99-native signed/unsigned integral types and single/double precision real/complex floating types) and availability of matching datatypes in the underlying MPI implementation. In this case, the buffer-provider object can be passed directly as a buffer argument, the count and MPI datatype will be inferred. * Menu: * Running Python scripts with MPI:: * Point-to-Point Communication:: * Collective Communication:: * MPI-IO:: * Dynamic Process Management: Dynamic Process Management<2>. * Wrapping with SWIG:: * Wrapping with F2Py::  File: mpi4py.info, Node: Running Python scripts with MPI, Next: Point-to-Point Communication, Up: Tutorial 3.1 Running Python scripts with MPI =================================== Most MPI programs can be run with the command ‘mpiexec’. In practice, running Python programs looks like: $ mpiexec -n 4 python script.py to run the program with 4 processors.  File: mpi4py.info, Node: Point-to-Point Communication, Next: Collective Communication, Prev: Running Python scripts with MPI, Up: Tutorial 3.2 Point-to-Point Communication ================================ * Python objects (pickle(1) under the hood): from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = {'a': 7, 'b': 3.14} comm.send(data, dest=1, tag=11) elif rank == 1: data = comm.recv(source=0, tag=11) * Python objects with non-blocking communication: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = {'a': 7, 'b': 3.14} req = comm.isend(data, dest=1, tag=11) req.wait() elif rank == 1: req = comm.irecv(source=0, tag=11) data = req.wait() * NumPy arrays (the fast way!): from mpi4py import MPI import numpy comm = MPI.COMM_WORLD rank = comm.Get_rank() # passing MPI datatypes explicitly if rank == 0: data = numpy.arange(1000, dtype='i') comm.Send([data, MPI.INT], dest=1, tag=77) elif rank == 1: data = numpy.empty(1000, dtype='i') comm.Recv([data, MPI.INT], source=0, tag=77) # automatic MPI datatype discovery if rank == 0: data = numpy.arange(100, dtype=numpy.float64) comm.Send(data, dest=1, tag=13) elif rank == 1: data = numpy.empty(100, dtype=numpy.float64) comm.Recv(data, source=0, tag=13) ---------- Footnotes ---------- (1) https://docs.python.org/3/library/pickle.html#module-pickle  File: mpi4py.info, Node: Collective Communication, Next: MPI-IO, Prev: Point-to-Point Communication, Up: Tutorial 3.3 Collective Communication ============================ * Broadcasting a Python dictionary: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = {'key1' : [7, 2.72, 2+3j], 'key2' : ( 'abc', 'xyz')} else: data = None data = comm.bcast(data, root=0) * Scattering Python objects: from mpi4py import MPI comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() if rank == 0: data = [(i+1)**2 for i in range(size)] else: data = None data = comm.scatter(data, root=0) assert data == (rank+1)**2 * Gathering Python objects: from mpi4py import MPI comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() data = (rank+1)**2 data = comm.gather(data, root=0) if rank == 0: for i in range(size): assert data[i] == (i+1)**2 else: assert data is None * Broadcasting a NumPy array: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = np.arange(100, dtype='i') else: data = np.empty(100, dtype='i') comm.Bcast(data, root=0) for i in range(100): assert data[i] == i * Scattering NumPy arrays: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() sendbuf = None if rank == 0: sendbuf = np.empty([size, 100], dtype='i') sendbuf.T[:,:] = range(size) recvbuf = np.empty(100, dtype='i') comm.Scatter(sendbuf, recvbuf, root=0) assert np.allclose(recvbuf, rank) * Gathering NumPy arrays: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() sendbuf = np.zeros(100, dtype='i') + rank recvbuf = None if rank == 0: recvbuf = np.empty([size, 100], dtype='i') comm.Gather(sendbuf, recvbuf, root=0) if rank == 0: for i in range(size): assert np.allclose(recvbuf[i,:], i) * Parallel matrix-vector product: from mpi4py import MPI import numpy def matvec(comm, A, x): m = A.shape[0] # local rows p = comm.Get_size() xg = numpy.zeros(m*p, dtype='d') comm.Allgather([x, MPI.DOUBLE], [xg, MPI.DOUBLE]) y = numpy.dot(A, xg) return y  File: mpi4py.info, Node: MPI-IO, Next: Dynamic Process Management<2>, Prev: Collective Communication, Up: Tutorial 3.4 MPI-IO ========== * Collective I/O with NumPy arrays: from mpi4py import MPI import numpy as np amode = MPI.MODE_WRONLY|MPI.MODE_CREATE comm = MPI.COMM_WORLD fh = MPI.File.Open(comm, "./datafile.contig", amode) buffer = np.empty(10, dtype=np.int) buffer[:] = comm.Get_rank() offset = comm.Get_rank()*buffer.nbytes fh.Write_at_all(offset, buffer) fh.Close() * Non-contiguous Collective I/O with NumPy arrays and datatypes: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD rank = comm.Get_rank() size = comm.Get_size() amode = MPI.MODE_WRONLY|MPI.MODE_CREATE fh = MPI.File.Open(comm, "./datafile.noncontig", amode) item_count = 10 buffer = np.empty(item_count, dtype='i') buffer[:] = rank filetype = MPI.INT.Create_vector(item_count, 1, size) filetype.Commit() displacement = MPI.INT.Get_size()*rank fh.Set_view(displacement, filetype=filetype) fh.Write_all(buffer) filetype.Free() fh.Close()  File: mpi4py.info, Node: Dynamic Process Management<2>, Next: Wrapping with SWIG, Prev: MPI-IO, Up: Tutorial 3.5 Dynamic Process Management ============================== * Compute Pi - Master (or parent, or client) side: #!/usr/bin/env python from mpi4py import MPI import numpy import sys comm = MPI.COMM_SELF.Spawn(sys.executable, args=['cpi.py'], maxprocs=5) N = numpy.array(100, 'i') comm.Bcast([N, MPI.INT], root=MPI.ROOT) PI = numpy.array(0.0, 'd') comm.Reduce(None, [PI, MPI.DOUBLE], op=MPI.SUM, root=MPI.ROOT) print(PI) comm.Disconnect() * Compute Pi - Worker (or child, or server) side: #!/usr/bin/env python from mpi4py import MPI import numpy comm = MPI.Comm.Get_parent() size = comm.Get_size() rank = comm.Get_rank() N = numpy.array(0, dtype='i') comm.Bcast([N, MPI.INT], root=0) h = 1.0 / N; s = 0.0 for i in range(rank, N, size): x = h * (i + 0.5) s += 4.0 / (1.0 + x**2) PI = numpy.array(s * h, dtype='d') comm.Reduce([PI, MPI.DOUBLE], None, op=MPI.SUM, root=0) comm.Disconnect()  File: mpi4py.info, Node: Wrapping with SWIG, Next: Wrapping with F2Py, Prev: Dynamic Process Management<2>, Up: Tutorial 3.6 Wrapping with SWIG ====================== * C source: /* file: helloworld.c */ void sayhello(MPI_Comm comm) { int size, rank; MPI_Comm_size(comm, &size); MPI_Comm_rank(comm, &rank); printf("Hello, World! " "I am process %d of %d.\n", rank, size); } * SWIG interface file: // file: helloworld.i %module helloworld %{ #include #include "helloworld.c" }% %include mpi4py/mpi4py.i %mpi4py_typemap(Comm, MPI_Comm); void sayhello(MPI_Comm comm); * Try it in the Python prompt: >>> from mpi4py import MPI >>> import helloworld >>> helloworld.sayhello(MPI.COMM_WORLD) Hello, World! I am process 0 of 1.  File: mpi4py.info, Node: Wrapping with F2Py, Prev: Wrapping with SWIG, Up: Tutorial 3.7 Wrapping with F2Py ====================== * Fortran 90 source: ! file: helloworld.f90 subroutine sayhello(comm) use mpi implicit none integer :: comm, rank, size, ierr call MPI_Comm_size(comm, size, ierr) call MPI_Comm_rank(comm, rank, ierr) print *, 'Hello, World! I am process ',rank,' of ',size,'.' end subroutine sayhello * Compiling example using f2py $ f2py -c --f90exec=mpif90 helloworld.f90 -m helloworld * Try it in the Python prompt: >>> from mpi4py import MPI >>> import helloworld >>> fcomm = MPI.COMM_WORLD.py2f() >>> helloworld.sayhello(fcomm) Hello, World! I am process 0 of 1.  File: mpi4py.info, Node: mpi4py futures, Next: mpi4py run, Prev: Tutorial, Up: Contents 4 mpi4py.futures **************** New in version 3.0.0. This package provides a high-level interface for asynchronously executing callables on a pool of worker processes using MPI for inter-process communication. * Menu: * concurrent.futures: concurrent futures. * MPIPoolExecutor:: * MPICommExecutor:: * Command line:: * Examples::  File: mpi4py.info, Node: concurrent futures, Next: MPIPoolExecutor, Up: mpi4py futures 4.1 concurrent.futures ====================== The *note mpi4py.futures: 0. package is based on concurrent.futures(1) from the Python standard library. More precisely, *note mpi4py.futures: 0. provides the *note MPIPoolExecutor: 30. class as a concrete implementation of the abstract class Executor(2). The submit()(3) interface schedules a callable to be executed asynchronously and returns a Future(4) object representing the execution of the callable. Future(5) instances can be queried for the call result or exception. Sets of Future(6) instances can be passed to the wait()(7) and as_completed()(8) functions. Note: The concurrent.futures(9) package was introduced in Python 3.2. A backport(10) targeting Python 2.7 is available on PyPI(11). The *note mpi4py.futures: 0. package uses concurrent.futures(12) if available, either from the Python 3 standard library or the Python 2.7 backport if installed. Otherwise, *note mpi4py.futures: 0. uses a bundled copy of core functionality backported from Python 3.5 to work with Python 2.7. See also ........ Module concurrent.futures(13) Documentation of the concurrent.futures(14) standard module. ---------- Footnotes ---------- (1) https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures (2) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Executor (3) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Executor.submit (4) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Future (5) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Future (6) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Future (7) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.wait (8) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.as_completed (9) https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures (10) https://github.com/agronholm/pythonfutures (11) https://pypi.python.org/pypi/futures (12) https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures (13) https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures (14) https://docs.python.org/3/library/concurrent.futures.html#module-concurrent.futures  File: mpi4py.info, Node: MPIPoolExecutor, Next: MPICommExecutor, Prev: concurrent futures, Up: mpi4py futures 4.2 MPIPoolExecutor =================== The *note MPIPoolExecutor: 30. class uses a pool of MPI processes to execute calls asynchronously. By performing computations in separate processes, it allows to side-step the Global Interpreter Lock(1) but also means that only picklable objects can be executed and returned. The ‘__main__’ module must be importable by worker processes, thus *note MPIPoolExecutor: 30. instances may not work in the interactive interpreter. *note MPIPoolExecutor: 30. takes advantage of the dynamic process management features introduced in the MPI-2 standard. In particular, the ‘MPI.Intracomm.Spawn()’ method of ‘MPI.COMM_SELF()’ is used in the master (or parent) process to spawn new worker (or child) processes running a Python interpreter. The master process uses a separate thread (one for each *note MPIPoolExecutor: 30. instance) to communicate back and forth with the workers. The worker processes serve the execution of tasks in the main (and only) thread until they are signaled for completion. Note: The worker processes must import the main script in order to `unpickle' any callable defined in the __main__(2) module and submitted from the master process. Furthermore, the callables may need access to other global variables. At the worker processes,:mod:‘mpi4py.futures’ executes the main script code (using the runpy(3) module) under the ‘__worker__’ namespace to define the __main__(4) module. The __main__(5) and ‘__worker__’ modules are added to sys.modules(6) (both at the master and worker processes) to ensure proper `pickling' and `unpickling'. Warning: During the initial import phase at the workers, the main script cannot create and use new *note MPIPoolExecutor: 30. instances. Otherwise, each worker would attempt to spawn a new pool of workers, leading to infinite recursion. *note mpi4py.futures: 0. detects such recursive attempts to spawn new workers and aborts the MPI execution environment. As the main script code is run under the ‘__worker__’ namespace, the easiest way to avoid spawn recursion is using the idiom ‘if __name__ == '__main__': ...’ in the main script. -- Class: mpi4py.futures.MPIPoolExecutor (max_workers=None, **kwargs) An Executor(7) subclass that executes calls asynchronously using a pool of at most `max_workers' processes. If `max_workers' is ‘None’ or not given, its value is determined from the ‘MPI4PY_MAX_WORKERS’ environment variable if set, or the MPI universe size if set, otherwise a single worker process is spawned. If `max_workers' is lower than or equal to ‘0’, then a ValueError(8) will be raised. Other parameters: * `python_exe': Path to the Python interpreter executable used to spawn worker processes, otherwise sys.executable(9) is used. * `python_args': list(10) or iterable with additional command line flags to pass to the Python executable. Command line flags determined from inspection of sys.flags(11), sys.warnoptions(12) and sys._xoptions(13) in are passed unconditionally. * `mpi_info': dict(14) or iterable yielding ‘(key, value)’ pairs. These ‘(key, value)’ pairs are passed (through an ‘MPI.Info’ object) to the ‘MPI.Intracomm.Spawn()’ call used to spawn worker processes. This mechanism allows telling the MPI runtime system where and how to start the processes. Check the documentation of the backend MPI implementation about the set of keys it interprets and the corresponding format for values. * `globals': dict(15) or iterable yielding ‘(name, value)’ pairs to initialize the main module namespace in worker processes. * `main': If set to ‘False’, do not import the ‘__main__’ module in worker processes. Setting `main' to ‘False’ prevents worker processes from accessing definitions in the parent ‘__main__’ namespace. * `path': list(16) or iterable with paths to append to sys.path(17) in worker processes to extend the module search path(18). * `wdir': Path to set the current working directory in worker processes using os.chdir()(19). The initial working directory is set by the MPI implementation. Quality MPI implementations should honor a ‘wdir’ info key passed through `mpi_info', although such feature is not mandatory. * `env': dict(20) or iterable yielding ‘(name, value)’ pairs with environment variables to update os.environ(21) in worker processes. The initial environment is set by the MPI implementation. MPI implementations may allow setting the initial environment through `mpi_info', however such feature is not required nor recommended by the MPI standard. -- Method: submit (func, *args, **kwargs) Schedule the callable, `func', to be executed as ‘func(*args, **kwargs)’ and returns a Future(22) object representing the execution of the callable. executor = MPIPoolExecutor(max_workers=1) future = executor.submit(pow, 321, 1234) print(future.result()) -- Method: map (func, *iterables, timeout=None, chunksize=1, **kwargs) Equivalent to map(func, *iterables)(23) except `func' is executed asynchronously and several calls to `func' may be made concurrently, out-of-order, in separate processes. The returned iterator raises a TimeoutError(24) if __next__()(25) is called and the result isn’t available after `timeout' seconds from the original call to *note map(): 33. `timeout' can be an int or a float. If `timeout' is not specified or ‘None’, there is no limit to the wait time. If a call raises an exception, then that exception will be raised when its value is retrieved from the iterator. This method chops `iterables' into a number of chunks which it submits to the pool as separate tasks. The (approximate) size of these chunks can be specified by setting `chunksize' to a positive integer. For very long iterables, using a large value for `chunksize' can significantly improve performance compared to the default size of one. By default, the returned iterator yields results in-order, waiting for successive tasks to complete . This behavior can be changed by passing the keyword argument `unordered' as ‘True’, then the result iterator will yield a result as soon as any of the tasks complete. executor = MPIPoolExecutor(max_workers=3) for result in executor.map(pow, [2]*32, range(32)): print(result) -- Method: starmap (func, iterable, timeout=None, chunksize=1, **kwargs) Equivalent to itertools.starmap(func, iterable)(26). Used instead of *note map(): 33. when argument parameters are already grouped in tuples from a single iterable (the data has been “pre-zippedâ€). *note map(func, *iterable): 33. is equivalent to *note starmap(func, zip(*iterable)): 34. executor = MPIPoolExecutor(max_workers=3) iterable = ((2, n) for n in range(32)) for result in executor.starmap(pow, iterable): print(result) -- Method: shutdown (wait=True) Signal the executor that it should free any resources that it is using when the currently pending futures are done executing. Calls to *note submit(): 32. and *note map(): 33. made after *note shutdown(): 35. will raise RuntimeError(27). If `wait' is ‘True’ then this method will not return until all the pending futures are done executing and the resources associated with the executor have been freed. If `wait' is ‘False’ then this method will return immediately and the resources associated with the executor will be freed when all pending futures are done executing. Regardless of the value of `wait', the entire Python program will not exit until all pending futures are done executing. You can avoid having to call this method explicitly if you use the with(28) statement, which will shutdown the executor instance (waiting as if *note shutdown(): 35. were called with `wait' set to ‘True’). import time with MPIPoolExecutor(max_workers=1) as executor: future = executor.submit(time.sleep, 2) assert future.done() -- Method: bootup (wait=True) Signal the executor that it should allocate eagerly any required resources (in particular, MPI worker processes). If `wait' is ‘True’, then *note bootup(): 36. will not return until the executor resources are ready to process submissions. Resources are automatically allocated in the first call to *note submit(): 32, thus calling *note bootup(): 36. explicitly is seldom needed. Note: As the master process uses a separate thread to perform MPI communication with the workers, the backend MPI implementation should provide support for ‘MPI.THREAD_MULTIPLE’. However, some popular MPI implementations do not support yet concurrent MPI calls from multiple threads. Additionally, users may decide to initialize MPI with a lower level of thread support. If the level of thread support in the backend MPI is less than ‘MPI.THREAD_MULTIPLE’, *note mpi4py.futures: 0. will use a global lock to serialize MPI calls. If the level of thread support is less than ‘MPI.THREAD_SERIALIZED’, *note mpi4py.futures: 0. will emit a RuntimeWarning(29). Warning: If the level of thread support in the backend MPI is less than ‘MPI.THREAD_SERIALIZED’ (i.e, it is either ‘MPI.THREAD_SINGLE’ or ‘MPI.THREAD_FUNNELED’), in theory *note mpi4py.futures: 0. cannot be used. Rather than raising an exception, *note mpi4py.futures: 0. emits a warning and takes a “cross-fingers†attitude to continue execution in the hope that serializing MPI calls with a global lock will actually work. ---------- Footnotes ---------- (1) https://docs.python.org/3/glossary.html#term-global-interpreter-lock (2) https://docs.python.org/3/library/__main__.html#module-__main__ (3) https://docs.python.org/3/library/runpy.html#module-runpy (4) https://docs.python.org/3/library/__main__.html#module-__main__ (5) https://docs.python.org/3/library/__main__.html#module-__main__ (6) https://docs.python.org/3/library/sys.html#sys.modules (7) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Executor (8) https://docs.python.org/3/library/exceptions.html#ValueError (9) https://docs.python.org/3/library/sys.html#sys.executable (10) https://docs.python.org/3/library/stdtypes.html#list (11) https://docs.python.org/3/library/sys.html#sys.flags (12) https://docs.python.org/3/library/sys.html#sys.warnoptions (13) https://docs.python.org/3/library/sys.html#sys._xoptions (14) https://docs.python.org/3/library/stdtypes.html#dict (15) https://docs.python.org/3/library/stdtypes.html#dict (16) https://docs.python.org/3/library/stdtypes.html#list (17) https://docs.python.org/3/library/sys.html#sys.path (18) https://docs.python.org/3/tutorial/modules.html#tut-searchpath (19) https://docs.python.org/3/library/os.html#os.chdir (20) https://docs.python.org/3/library/stdtypes.html#dict (21) https://docs.python.org/3/library/os.html#os.environ (22) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Future (23) https://docs.python.org/3/library/functions.html#map (24) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.TimeoutError (25) https://docs.python.org/3/library/stdtypes.html#iterator.__next__ (26) https://docs.python.org/3/library/itertools.html#itertools.starmap (27) https://docs.python.org/3/library/exceptions.html#RuntimeError (28) https://docs.python.org/3/reference/compound_stmts.html#with (29) https://docs.python.org/3/library/exceptions.html#RuntimeWarning  File: mpi4py.info, Node: MPICommExecutor, Next: Command line, Prev: MPIPoolExecutor, Up: mpi4py futures 4.3 MPICommExecutor =================== Legacy MPI-1 implementations (as well as some vendor MPI-2 implementations) do not support the dynamic process management features introduced in the MPI-2 standard. Additionally, job schedulers and batch systems in supercomputing facilities may pose additional complications to applications using the ‘MPI_Comm_spawn()’ routine. With these issues in mind, *note mpi4py.futures: 0. supports an additonal, more traditional, SPMD-like usage pattern requiring MPI-1 calls only. Python applications are started the usual way, e.g., using the ‘mpiexec’ command. Python code should make a collective call to the *note MPICommExecutor: 38. context manager to partition the set of MPI processes within a MPI communicator in one master processes and many workers processes. The master process gets access to an *note MPIPoolExecutor: 30. instance to submit tasks. Meanwhile, the worker process follow a different execution path and team-up to execute the tasks submitted from the master. Besides alleviating the lack of dynamic process managment features in legacy MPI-1 or partial MPI-2 implementations, the *note MPICommExecutor: 38. context manager may be useful in classic MPI-based Python applications willing to take advantage of the simple, task-based, master/worker approach available in the *note mpi4py.futures: 0. package. -- Class: mpi4py.futures.MPICommExecutor (comm=None, root=0) Context manager for *note MPIPoolExecutor: 30. This context manager splits a MPI (intra)communicator `comm' (defaults to ‘MPI.COMM_WORLD’ if not provided or ‘None’) in two disjoint sets: a single master process (with rank `root' in `comm') and the remaining worker processes. These sets are then connected through an intercommunicator. The target of the with(1) statement is assigned either an *note MPIPoolExecutor: 30. instance (at the master) or ‘None’ (at the workers). from mpi4py import MPI from mpi4py.futures import MPICommExecutor with MPICommExecutor(MPI.COMM_WORLD, root=0) as executor: if executor is not None: future = executor.submit(abs, -42) assert future.result() == 42 answer = set(executor.map(abs, [-42, 42])) assert answer == {42} Warning: If *note MPICommExecutor: 38. is passed a communicator of size one (e.g., ‘MPI.COMM_SELF’), then the executor instace assigned to the target of the with(2) statement will execute all submitted tasks in a single worker thread, thus ensuring that task execution still progress asynchronously. However, the GIL(3) will prevent the main and worker threads from running concurrently in multicore processors. Moreover, the thread context switching may harm noticeably the performance of CPU-bound tasks. In case of I/O-bound tasks, the GIL(4) is not usually an issue, however, as a single worker thread is used, it progress one task at a time. We advice against using *note MPICommExecutor: 38. with communicators of size one and suggest refactoring your code to use instead a ThreadPoolExecutor(5). ---------- Footnotes ---------- (1) https://docs.python.org/3/reference/compound_stmts.html#with (2) https://docs.python.org/3/reference/compound_stmts.html#with (3) https://docs.python.org/3/glossary.html#term-gil (4) https://docs.python.org/3/glossary.html#term-gil (5) https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor  File: mpi4py.info, Node: Command line, Next: Examples, Prev: MPICommExecutor, Up: mpi4py futures 4.4 Command line ================ Recalling the issues related to the lack of support for dynamic process managment features in MPI implementations, *note mpi4py.futures: 0. supports an alternative usage pattern where Python code (either from scripts, modules, or zip files) is run under command line control of the *note mpi4py.futures: 0. package by passing ‘-m mpi4py.futures’ to the ‘python’ executable. The ‘mpi4py.futures’ invocation should be passed a `pyfile' path to a script (or a zipfile/directory containing a ‘__main__.py’ file). Additionally, ‘mpi4py.futures’ accepts ‘-m `mod'’ to execute a module named `mod', ‘-c `cmd'’ to execute a command string `cmd', or even ‘-’ to read commands from standard input (sys.stdin(1)). Summarizing, ‘mpi4py.futures’ can be invoked in the following ways: * ‘$ mpiexec -n `numprocs' python -m mpi4py.futures `pyfile' [arg] ...’ * ‘$ mpiexec -n `numprocs' python -m mpi4py.futures -m `mod' [arg] ...’ * ‘$ mpiexec -n `numprocs' python -m mpi4py.futures -c `cmd' [arg] ...’ * ‘$ mpiexec -n `numprocs' python -m mpi4py.futures - [arg] ...’ Before starting the main script execution, *note mpi4py.futures: 0. splits ‘MPI.COMM_WORLD’ in one master (the process with rank 0 in ‘MPI.COMM_WORLD’) and 16 workers and connect them through an MPI intercommunicator. Afterwards, the master process proceeds with the execution of the user script code, which eventually creates *note MPIPoolExecutor: 30. instances to submit tasks. Meanwhile, the worker processes follow a different execution path to serve the master. Upon successful termination of the main script at the master, the entire MPI execution environment exists gracefully. In case of any unhandled exception in the main script, the master process calls ‘MPI.COMM_WORLD.Abort(1)’ to prevent deadlocks and force termination of entire MPI execution environment. Warning: Running scripts under command line control of *note mpi4py.futures: 0. is quite similar to executing a single-process application that spawn additional workers as required. However, there is a very important difference users should be aware of. All *note MPIPoolExecutor: 30. instances created at the master will share the pool of workers. Tasks submitted at the master from many different executors will be scheduled for execution in random order as soon as a worker is idle. Any executor can easily starve all the workers (e.g., by calling *note MPIPoolExecutor.map(): 33. with long iterables). If that ever happens, submissions from other executors will not be serviced until free workers are available. See also ........ Command line(2) Documentation on Python command line interface. ---------- Footnotes ---------- (1) https://docs.python.org/3/library/sys.html#sys.stdin (2) https://docs.python.org/3/using/cmdline.html#using-on-cmdline  File: mpi4py.info, Node: Examples, Prev: Command line, Up: mpi4py futures 4.5 Examples ============ The following ‘julia.py’ script computes the Julia set(1) and dumps an image to disk in binary PGM(2) format. The code starts by importing *note MPIPoolExecutor: 30. from the *note mpi4py.futures: 0. package. Next, some global constants and functions implement the computation of the Julia set. The computations are protected with the standard ‘if __name__ == '__main__': ...’ idiom. The image is computed by whole scanlines submitting all these tasks at once using the *note map: 33. method. The result iterator yields scanlines in-order as the tasks complete. Finally, each scanline is dumped to disk. from mpi4py.futures import MPIPoolExecutor x0, x1, w = -2.0, +2.0, 640*2 y0, y1, h = -1.5, +1.5, 480*2 dx = (x1 - x0) / w dy = (y1 - y0) / h c = complex(0, 0.65) def julia(x, y): z = complex(x, y) n = 255 while abs(z) < 3 and n > 1: z = z**2 + c n -= 1 return n def julia_line(k): line = bytearray(w) y = y1 - k * dy for j in range(w): x = x0 + j * dx line[j] = julia(x, y) return line if __name__ == '__main__': with MPIPoolExecutor() as executor: image = executor.map(julia_line, range(h)) with open('julia.pgm', 'wb') as f: f.write(b'P5 %d %d %d\n' % (w, h, 255)) for line in image: f.write(line) LiteralBlock: ‘julia.py’ The recommended way to execute the script is using the ‘mpiexec’ command specifying one MPI process and (optional but recommended) the desired MPI universe size (3). $ mpiexec -n 1 -usize 17 python julia.py The ‘mpiexec’ command launches a single MPI process (the master) running the Python interpreter and executing the main script. When required, *note mpi4py.futures: 0. spawns 16 additional MPI processes (the children) to dynamically allocate the pool of workers. The master submits tasks to the children and waits for the results. The children receive incoming tasks, execute them, and send back the results to the master. Alternatively, users may decide to execute the script in a more traditional way, that is, all the MPI process are started at once. The user script is run under command line control of *note mpi4py.futures: 0. passing the -m(4) flag to the ‘python’ executable. $ mpiexec -n 17 python -m mpi4py.futures julia.py As explained previously, the 17 processes are partitioned in one master and 16 workers. The master process executes the main script while the workers execute the tasks submitted from the master. ---------- Footnotes ---------- (1) https://en.wikipedia.org/wiki/Julia_set (2) http://netpbm.sourceforge.net/doc/pgm.html (3) This ‘mpiexec’ invocation example using the ‘-usize’ flag (alternatively, setting the ‘MPIEXEC_UNIVERSE_SIZE’ environment variable) assumes the backend MPI implementation is an MPICH derivative using the Hydra process manager. In the Open MPI implementation, the MPI universe size can be specified by setting the ‘OMPI_UNIVERSE_SIZE’ environment variable to a positive integer. Check the documentation of your actual MPI implementation and/or batch system for the ways to specify the desired MPI universe size. (4) https://docs.python.org/3/using/cmdline.html#using-on-cmdline  File: mpi4py.info, Node: mpi4py run, Next: Citation, Prev: mpi4py futures, Up: Contents 5 mpi4py.run ************ New in version 3.0.0. At import time, ‘mpi4py’ initializes the MPI execution environment calling ‘MPI_Init_thread()’ and installs an exit hook to automatically call ‘MPI_Finalize()’ just before the Python process terminates. Additionally, ‘mpi4py’ overrides the default ‘MPI.ERRORS_ARE_FATAL’ error handler in favor of ‘MPI.ERRORS_RETURN’, which allows translating MPI errors in Python exceptions. These departures from standard MPI behavior may be controversial, but are quite convenient within the highly dynamic Python programming environment. Third-party code using ‘mpi4py’ can just ‘from mpi4py import MPI’ and perform MPI calls without the tedious initialization/finalization handling. MPI errors, once translated automatically to Python exceptions, can be dealt with the common try(1)…except(2)…finally(3) clauses; unhandled MPI exceptions will print a traceback which helps in locating problems in source code. Unfortunately, the interplay of automatic MPI finalization and unhandled exceptions may lead to deadlocks. In unattended runs, these deadlocks will drain the battery of your laptop, or burn precious allocation hours in your supercomputing facility. Consider the following snippet of Python code. Assume this code is stored in a standard Python script file and run with ‘mpiexec’ in two or more processes. from mpi4py import MPI assert MPI.COMM_WORLD.Get_size() > 1 rank = MPI.COMM_WORLD.Get_rank() if rank == 0: 1/0 MPI.COMM_WORLD.send(None, dest=1, tag=42) elif rank == 1: MPI.COMM_WORLD.recv(source=0, tag=42) Process 0 raises ZeroDivisionError(4) exception before performing a send call to process 1. As the exception is not handled, the Python interpreter running in process 0 will proceed to exit with non-zero status. However, as ‘mpi4py’ installed a finalizer hook to call ‘MPI_Finalize()’ before exit, process 0 will block waiting for other processes to also enter the ‘MPI_Finalize()’ call. Meanwhile, process 1 will block waiting for a message to arrive from process 0, thus never reaching to ‘MPI_Finalize()’. The whole MPI execution environment is irremediably in a deadlock state. To alleviate this issue, ‘mpi4py’ offers a simple, alternative command line execution mechanism based on using the -m(5) flag and implemented with the runpy(6) module. To use this features, Python code should be run passing ‘-m mpi4py’ in the command line invoking the Python interpreter. In case of unhandled exceptions, the finalizer hook will call ‘MPI_Abort()’ on the ‘MPI_COMM_WORLD’ communicator, thus effectively aborting the MPI execution environment. Warning: When a process is forced to abort, resources (e.g. open files) are not cleaned-up and any registered finalizers (either with the atexit(7) module, the Python C/API function Py_AtExit()(8), or even the C standard library function ‘atexit()’) will not be executed. Thus, aborting execution is an extremely impolite way of ensuring process termination. However, MPI provides no other mechanism to recover from a deadlock state. * Menu: * Interface options:: ---------- Footnotes ---------- (1) https://docs.python.org/3/reference/compound_stmts.html#try (2) https://docs.python.org/3/reference/compound_stmts.html#except (3) https://docs.python.org/3/reference/compound_stmts.html#finally (4) https://docs.python.org/3/library/exceptions.html#ZeroDivisionError (5) https://docs.python.org/3/using/cmdline.html#using-on-cmdline (6) https://docs.python.org/3/library/runpy.html#module-runpy (7) https://docs.python.org/3/library/atexit.html#module-atexit (8) https://docs.python.org/3/c-api/sys.html#c.Py_AtExit  File: mpi4py.info, Node: Interface options, Up: mpi4py run 5.1 Interface options ===================== The use of ‘-m mpi4py’ to execute Python code on the command line resembles that of the Python interpreter. * ‘mpiexec -n `numprocs' python -m mpi4py `pyfile' [arg] ...’ * ‘mpiexec -n `numprocs' python -m mpi4py -m `mod' [arg] ...’ * ‘mpiexec -n `numprocs' python -m mpi4py -c `cmd' [arg] ...’ * ‘mpiexec -n `numprocs' python -m mpi4py - [arg] ...’ -- Describe: Execute the Python code contained in `pyfile', which must be a filesystem path referring to either a Python file, a directory containing a ‘__main__.py’ file, or a zipfile containing a ‘__main__.py’ file. -- Program Option: -m Search sys.path(1) for the named module `mod' and execute its contents. -- Program Option: -c Execute the Python code in the `cmd' string command. -- Describe: - Read commands from standard input (sys.stdin(2)). See also ........ Command line(3) Documentation on Python command line interface. ---------- Footnotes ---------- (1) https://docs.python.org/3/library/sys.html#sys.path (2) https://docs.python.org/3/library/sys.html#sys.stdin (3) https://docs.python.org/3/using/cmdline.html#using-on-cmdline  File: mpi4py.info, Node: Citation, Next: Installation, Prev: mpi4py run, Up: Contents 6 Citation ********** If MPI for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, `Parallel Distributed Computing using Python', Advances in Water Resources, 34(9):1124-1139, 2011. ‘http://dx.doi.org/10.1016/j.advwatres.2011.04.013’ * L. Dalcin, R. Paz, M. Storti, and J. D’Elia, `MPI for Python: performance improvements and MPI-2 extensions', Journal of Parallel and Distributed Computing, 68(5):655-662, 2008. ‘http://dx.doi.org/10.1016/j.jpdc.2007.09.005’ * L. Dalcin, R. Paz, and M. Storti, `MPI for Python', Journal of Parallel and Distributed Computing, 65(9):1108-1115, 2005. ‘http://dx.doi.org/10.1016/j.jpdc.2005.03.010’  File: mpi4py.info, Node: Installation, Next: Appendix, Prev: Citation, Up: Contents 7 Installation ************** * Menu: * Requirements:: * Using pip or easy_install:: * Using distutils:: * Testing::  File: mpi4py.info, Node: Requirements, Next: Using pip or easy_install, Up: Installation 7.1 Requirements ================ You need to have the following software properly installed in order to build `MPI for Python': * A working MPI implementation, preferably supporting MPI-3 and built with shared/dynamic libraries. Note: If you want to build some MPI implementation from sources, check the instructions at *note Building MPI from sources: 45. in the appendix. * Python 2.7, 3.3 or above. Note: Some MPI-1 implementations `do require' the actual command line arguments to be passed in ‘MPI_Init()’. In this case, you will need to use a rebuilt, MPI-enabled, Python interpreter executable. `MPI for Python' has some support for alleviating you from this task. Check the instructions at *note MPI-enabled Python interpreter: 46. in the appendix.  File: mpi4py.info, Node: Using pip or easy_install, Next: Using distutils, Prev: Requirements, Up: Installation 7.2 Using `pip' or `easy_install' ================================= If you already have a working MPI (either if you installed it from sources or by using a pre-built package from your favourite GNU/Linux distribution) and the ‘mpicc’ compiler wrapper is on your search path, you can use ‘pip’: $ [sudo] pip install mpi4py or alternatively `setuptools' ‘easy_install’ (deprecated): $ [sudo] easy_install mpi4py Note: If the ‘mpicc’ compiler wrapper is not on your search path (or if it has a different name) you can use ‘env’ to pass the environment variable ‘MPICC’ providing the full path to the MPI compiler wrapper executable: $ [sudo] env MPICC=/path/to/mpicc pip install mpi4py $ [sudo] env MPICC=/path/to/mpicc easy_install mpi4py  File: mpi4py.info, Node: Using distutils, Next: Testing, Prev: Using pip or easy_install, Up: Installation 7.3 Using `distutils' ===================== The `MPI for Python' package is available for download at the project website generously hosted by Bitbucket. You can use ‘curl’ or ‘wget’ to get a release tarball. * Using ‘curl’: $ curl -O https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-X.Y.tar.gz * Using ‘wget’: $ wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-X.Y.tar.gz After unpacking the release tarball: $ tar -zxf mpi4py-X.Y.tar.gz $ cd mpi4py-X.Y the package is ready for building. `MPI for Python' uses a standard distutils-based build system. However, some distutils commands (like `build') have additional options: -- Program Option: --mpicc= Lets you specify a special location or name for the ‘mpicc’ compiler wrapper. -- Program Option: --mpi= Lets you pass a section with MPI configuration within a special configuration file. -- Program Option: --configure Runs exhaustive tests for checking about missing MPI types, constants, and functions. This option should be passed in order to build `MPI for Python' against old MPI-1 or MPI-2 implementations, possibly providing a subset of MPI-3. If you use a MPI implementation providing a ‘mpicc’ compiler wrapper (e.g., MPICH, Open MPI), it will be used for compilation and linking. This is the preferred and easiest way of building `MPI for Python'. If ‘mpicc’ is located somewhere in your search path, simply run the `build' command: $ python setup.py build If ‘mpicc’ is not in your search path or the compiler wrapper has a different name, you can run the `build' command specifying its location: $ python setup.py build --mpicc=/where/you/have/mpicc Alternatively, you can provide all the relevant information about your MPI implementation by editing the file called ‘mpi.cfg’. You can use the default section ‘[mpi]’ or add a new, custom section, for example ‘[other_mpi]’ (see the examples provided in the ‘mpi.cfg’ file as a starting point to write your own section): [mpi] include_dirs = /usr/local/mpi/include libraries = mpi library_dirs = /usr/local/mpi/lib runtime_library_dirs = /usr/local/mpi/lib [other_mpi] include_dirs = /opt/mpi/include ... libraries = mpi ... library_dirs = /opt/mpi/lib ... runtime_library_dirs = /op/mpi/lib ... ... and then run the `build' command, perhaps specifying you custom configuration section: $ python setup.py build --mpi=other_mpi After building, the package is ready for install. If you have root privileges (either by log-in as the root user of by using ‘sudo’) and you want to install `MPI for Python' in your system for all users, just do: $ python setup.py install The previous steps will install the ‘mpi4py’ package at standard location ‘`prefix'/lib/python`X'.`X'/site-packages’. If you do not have root privileges or you want to install `MPI for Python' for your private use, just do: $ python setup.py install --user  File: mpi4py.info, Node: Testing, Prev: Using distutils, Up: Installation 7.4 Testing =========== To quickly test the installation: $ mpiexec -n 5 python -m mpi4py.bench helloworld Hello, World! I am process 0 of 5 on localhost. Hello, World! I am process 1 of 5 on localhost. Hello, World! I am process 2 of 5 on localhost. Hello, World! I am process 3 of 5 on localhost. Hello, World! I am process 4 of 5 on localhost. If you installed from source, issuing at the command line: $ mpiexec -n 5 python demo/helloworld.py or (in the case of ancient MPI-1 implementations): $ mpirun -np 5 python `pwd`/demo/helloworld.py will launch a five-process run of the Python interpreter and run the test script ‘demo/helloworld.py’ from the source distribution. You can also run all the `unittest' scripts: $ mpiexec -n 5 python test/runtests.py or, if you have nose(1) unit testing framework installed: $ mpiexec -n 5 nosetests -w test or, if you have py.test(2) unit testing framework installed: $ mpiexec -n 5 py.test test/ ---------- Footnotes ---------- (1) http://nose.readthedocs.io/ (2) http://docs.pytest.org/  File: mpi4py.info, Node: Appendix, Prev: Installation, Up: Contents 8 Appendix ********** * Menu: * MPI-enabled Python interpreter:: * Building MPI from sources::  File: mpi4py.info, Node: MPI-enabled Python interpreter, Next: Building MPI from sources, Up: Appendix 8.1 MPI-enabled Python interpreter ================================== Warning: These days it is no longer required to use the MPI-enabled Python interpreter in most cases, and, therefore, is not built by default anymore because it is too difficult to reliably build a Python interpreter across different distributions. If you know that you still `really' need it, see below on how to use the ‘build_exe’ and ‘install_exe’ commands. Some MPI-1 implementations (notably, MPICH 1) `do require' the actual command line arguments to be passed at the time ‘MPI_Init()’ is called. In this case, you will need to use a re-built, MPI-enabled, Python interpreter binary executable. A basic implementation (targeting Python 2.X) of what is required is shown below: #include #include int main(int argc, char *argv[]) { int status, flag; MPI_Init(&argc, &argv); status = Py_Main(argc, argv); MPI_Finalized(&flag); if (!flag) MPI_Finalize(); return status; } The source code above is straightforward; compiling it should also be. However, the linking step is more tricky: special flags have to be passed to the linker depending on your platform. In order to alleviate you for such low-level details, `MPI for Python' provides some pure-distutils based support to build and install an MPI-enabled Python interpreter executable: $ cd mpi4py-X.X.X $ python setup.py build_exe [--mpi=|--mpicc=/path/to/mpicc] $ [sudo] python setup.py install_exe [--install-dir=$HOME/bin] After the above steps you should have the MPI-enabled interpreter installed as ‘`prefix'/bin/python`X'.`X'-mpi’ (or ‘$HOME/bin/python`X'.`X'-mpi’). Assuming that ‘`prefix'/bin’ (or ‘$HOME/bin’) is listed on your ‘PATH’, you should be able to enter your MPI-enabled Python interactively, for example: $ python2.7-mpi Python 2.7.8 (default, Nov 10 2014, 08:19:18) [GCC 4.9.2 20141101 (Red Hat 4.9.2-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.executable '/usr/bin/python2.7-mpi' >>>  File: mpi4py.info, Node: Building MPI from sources, Prev: MPI-enabled Python interpreter, Up: Appendix 8.2 Building MPI from sources ============================= In the list below you have some executive instructions for building some of the open-source MPI implementations out there with support for shared/dynamic libraries on POSIX environments. + `MPICH' $ tar -zxf mpich-X.X.X.tar.gz $ cd mpich-X.X.X $ ./configure --enable-shared --prefix=/usr/local/mpich $ make $ make install + `Open MPI' $ tar -zxf openmpi-X.X.X tar.gz $ cd openmpi-X.X.X $ ./configure --prefix=/usr/local/openmpi $ make all $ make install + `MPICH 1' $ tar -zxf mpich-X.X.X.tar.gz $ cd mpich-X.X.X $ ./configure --enable-sharedlib --prefix=/usr/local/mpich1 $ make $ make install Perhaps you will need to set the ‘LD_LIBRARY_PATH’ environment variable (using ‘export’, ‘setenv’ or what applies to your system) pointing to the directory containing the MPI libraries . In case of getting runtime linking errors when running MPI programs, the following lines can be added to the user login shell script (‘.profile’, ‘.bashrc’, etc.). - `MPICH' MPI_DIR=/usr/local/mpich export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH - `Open MPI' MPI_DIR=/usr/local/openmpi export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH - `MPICH 1' MPI_DIR=/usr/local/mpich1 export LD_LIBRARY_PATH=$MPI_DIR/lib/shared:$LD_LIBRARY_PATH: export MPICH_USE_SHLIB=yes Warning: MPICH 1 support for dynamic libraries is not completely transparent. Users should set the environment variable ‘MPICH_USE_SHLIB’ to ‘yes’ in order to avoid link problems when using the ‘mpicc’ compiler wrapper.  File: mpi4py.info, Node: Python Module Index, Next: Index, Prev: Contents, Up: Top Python Module Index ******************* * Menu: * mpi4py.futures: 0. Execute computations concurrently using MPI processes. * mpi4py.run: 1. Run Python code using ‘‘-m mpi4py‘‘.  File: mpi4py.info, Node: Index, Prev: Python Module Index, Up: Top Index ***** [index] * Menu: * bootup() (mpi4py.futures.MPIPoolExecutor method): MPIPoolExecutor. (line 169) * command line option; -c : Interface options. (line 29) * command line option; –configure: Using distutils. (line 37) * command line option; -m : Interface options. (line 24) * command line option; –mpi=: Using distutils. (line 32) * command line option; –mpicc=: Using distutils. (line 27) * environment variable; LD_LIBRARY_PATH: Building MPI from sources. (line 22) * environment variable; MPI4PY_MAX_WORKERS: MPIPoolExecutor. (line 48) * environment variable; MPICC: Using pip or easy_install. (line 19) * environment variable; MPICH_USE_SHLIB: Building MPI from sources. (line 42) * environment variable; MPIEXEC_UNIVERSE_SIZE: Examples. (line 52) * environment variable; OMPI_UNIVERSE_SIZE: Examples. (line 55) * environment variable; PATH: MPI-enabled Python interpreter. (line 34) * LD_LIBRARY_PATH: Building MPI from sources. (line 22) * map() (mpi4py.futures.MPIPoolExecutor method): MPIPoolExecutor. (line 108) * mpi4py.futures (module): mpi4py futures. (line 6) * mpi4py.run (module): mpi4py run. (line 6) * MPI4PY_MAX_WORKERS: MPIPoolExecutor. (line 48) * MPICC: Using pip or easy_install. (line 19) * MPICH_USE_SHLIB: Building MPI from sources. (line 42) * MPICommExecutor (class in mpi4py.futures): MPICommExecutor. (line 30) * MPIEXEC_UNIVERSE_SIZE: Examples. (line 52) * MPIPoolExecutor (class in mpi4py.futures): MPIPoolExecutor. (line 44) * OMPI_UNIVERSE_SIZE: Examples. (line 55) * PATH: MPI-enabled Python interpreter. (line 34) * shutdown() (mpi4py.futures.MPIPoolExecutor method): MPIPoolExecutor. (line 146) * starmap() (mpi4py.futures.MPIPoolExecutor method): MPIPoolExecutor. (line 135) * submit() (mpi4py.futures.MPIPoolExecutor method): MPIPoolExecutor. (line 100)  Tag Table: Node: Top322 Ref: index doc519 Ref: 2519 Node: Contents2727 Ref: index contents2815 Ref: 32815 Ref: index mpi-for-python2815 Ref: 42815 Node: Introduction2990 Ref: intro doc3064 Ref: 53064 Ref: intro introduction3064 Ref: 63064 Ref: Introduction-Footnote-15144 Ref: Introduction-Footnote-25176 Node: What is MPI?5240 Ref: intro what-is-mpi5325 Ref: 75325 Ref: What is MPI?-Footnote-16135 Ref: What is MPI?-Footnote-26165 Ref: What is MPI?-Footnote-36196 Node: What is Python?6230 Ref: intro what-is-python6340 Ref: e6340 Ref: What is Python?-Footnote-17619 Node: Related Projects7651 Ref: intro related-projects7740 Ref: 117740 Ref: intro mpi-std111387 Ref: a11387 Ref: intro mpi-std211550 Ref: b11550 Ref: intro mpi-using11701 Ref: 811701 Ref: intro mpi-ref11859 Ref: 911859 Ref: intro mpi-mpich12035 Ref: c12035 Ref: intro mpi-openmpi12237 Ref: d12237 Ref: intro hinsen9712675 Ref: f12675 Ref: intro beazley9712896 Ref: 1012896 Ref: Related Projects-Footnote-113140 Ref: Related Projects-Footnote-213198 Ref: Related Projects-Footnote-313243 Ref: Related Projects-Footnote-413291 Ref: Related Projects-Footnote-513361 Ref: Related Projects-Footnote-613391 Ref: Related Projects-Footnote-713422 Ref: Related Projects-Footnote-813449 Node: Overview13478 Ref: overview doc13569 Ref: 1213569 Ref: overview overview13569 Ref: 1313569 Node: Communicating Python Objects and Array Data14215 Ref: overview communicating-python-objects-and-array-data14325 Ref: 1414325 Ref: Communicating Python Objects and Array Data-Footnote-116873 Ref: Communicating Python Objects and Array Data-Footnote-216941 Ref: Communicating Python Objects and Array Data-Footnote-317011 Node: Communicators17079 Ref: overview communicators17227 Ref: 1517227 Node: Point-to-Point Communications19031 Ref: overview point-to-point-communications19161 Ref: 1619161 Node: Blocking Communications20068 Ref: overview blocking-communications20192 Ref: 1720192 Node: Nonblocking Communications20886 Ref: overview nonblocking-communications21044 Ref: 1821044 Node: Persistent Communications22381 Ref: overview persistent-communications22507 Ref: 1922507 Node: Collective Communications23470 Ref: overview collective-communications23613 Ref: 1a23613 Node: Dynamic Process Management25934 Ref: overview dynamic-process-management26072 Ref: 1b26072 Node: One-Sided Communications28471 Ref: overview one-sided-communications28605 Ref: 1c28605 Node: Parallel Input/Output31093 Ref: overview parallel-input-output31225 Ref: 1d31225 Node: Environmental Management34236 Ref: overview environmental-management34335 Ref: 1e34335 Node: Initialization and Exit34493 Ref: overview initialization-and-exit34612 Ref: 1f34612 Ref: Initialization and Exit-Footnote-135681 Node: Implementation Information35742 Ref: overview implementation-information35876 Ref: 2035876 Node: Timers36395 Ref: overview timers36520 Ref: 2136520 Node: Error Handling36651 Ref: overview error-handling36741 Ref: 2236741 Ref: Error Handling-Footnote-138139 Ref: Error Handling-Footnote-238210 Node: Tutorial38278 Ref: tutorial doc38371 Ref: 2338371 Ref: tutorial id138371 Ref: 2438371 Ref: tutorial tutorial38371 Ref: 2538371 Node: Running Python scripts with MPI41341 Ref: tutorial running-python-scripts-with-mpi41454 Ref: 2641454 Node: Point-to-Point Communication41716 Ref: tutorial point-to-point-communication41862 Ref: 2741862 Ref: Point-to-Point Communication-Footnote-143157 Node: Collective Communication43225 Ref: tutorial collective-communication43346 Ref: 2843346 Node: MPI-IO45616 Ref: tutorial mpi-io45738 Ref: 2945738 Node: Dynamic Process Management<2>46690 Ref: tutorial dynamic-process-management46806 Ref: 2a46806 Node: Wrapping with SWIG47816 Ref: tutorial wrapping-with-swig47944 Ref: 2b47944 Node: Wrapping with F2Py48624 Ref: tutorial wrapping-with-f2py48714 Ref: 2c48714 Node: mpi4py futures49369 Ref: mpi4py futures doc49464 Ref: 2d49464 Ref: mpi4py futures module-mpi4py futures49464 Ref: 049464 Ref: mpi4py futures mpi4py-futures49464 Ref: 2e49464 Node: concurrent futures49802 Ref: mpi4py futures concurrent-futures49895 Ref: 2f49895 Ref: concurrent futures-Footnote-151129 Ref: concurrent futures-Footnote-251222 Ref: concurrent futures-Footnote-351317 Ref: concurrent futures-Footnote-451419 Ref: concurrent futures-Footnote-551512 Ref: concurrent futures-Footnote-651605 Ref: concurrent futures-Footnote-751698 Ref: concurrent futures-Footnote-851789 Ref: concurrent futures-Footnote-951888 Ref: concurrent futures-Footnote-1051981 Ref: concurrent futures-Footnote-1152033 Ref: concurrent futures-Footnote-1252079 Ref: concurrent futures-Footnote-1352173 Ref: concurrent futures-Footnote-1452267 Node: MPIPoolExecutor52361 Ref: mpi4py futures mpipoolexecutor52478 Ref: 3152478 Ref: mpi4py futures mpi4py futures MPIPoolExecutor54742 Ref: 3054742 Ref: mpi4py futures mpi4py futures MPIPoolExecutor submit57573 Ref: 3257573 Ref: mpi4py futures mpi4py futures MPIPoolExecutor map57928 Ref: 3357928 Ref: mpi4py futures mpi4py futures MPIPoolExecutor starmap59560 Ref: 3459560 Ref: mpi4py futures mpi4py futures MPIPoolExecutor shutdown60162 Ref: 3560162 Ref: mpi4py futures mpi4py futures MPIPoolExecutor bootup61420 Ref: 3661420 Ref: MPIPoolExecutor-Footnote-163154 Ref: MPIPoolExecutor-Footnote-263232 Ref: MPIPoolExecutor-Footnote-363304 Ref: MPIPoolExecutor-Footnote-463370 Ref: MPIPoolExecutor-Footnote-563442 Ref: MPIPoolExecutor-Footnote-663514 Ref: MPIPoolExecutor-Footnote-763577 Ref: MPIPoolExecutor-Footnote-863672 Ref: MPIPoolExecutor-Footnote-963741 Ref: MPIPoolExecutor-Footnote-1063807 Ref: MPIPoolExecutor-Footnote-1163869 Ref: MPIPoolExecutor-Footnote-1263931 Ref: MPIPoolExecutor-Footnote-1363999 Ref: MPIPoolExecutor-Footnote-1464065 Ref: MPIPoolExecutor-Footnote-1564127 Ref: MPIPoolExecutor-Footnote-1664189 Ref: MPIPoolExecutor-Footnote-1764251 Ref: MPIPoolExecutor-Footnote-1864312 Ref: MPIPoolExecutor-Footnote-1964384 Ref: MPIPoolExecutor-Footnote-2064444 Ref: MPIPoolExecutor-Footnote-2164506 Ref: MPIPoolExecutor-Footnote-2264568 Ref: MPIPoolExecutor-Footnote-2364662 Ref: MPIPoolExecutor-Footnote-2464724 Ref: MPIPoolExecutor-Footnote-2564824 Ref: MPIPoolExecutor-Footnote-2664900 Ref: MPIPoolExecutor-Footnote-2764977 Ref: MPIPoolExecutor-Footnote-2865049 Ref: MPIPoolExecutor-Footnote-2965119 Node: MPICommExecutor65193 Ref: mpi4py futures mpicommexecutor65304 Ref: 3765304 Ref: mpi4py futures mpi4py futures MPICommExecutor66685 Ref: 3866685 Ref: MPICommExecutor-Footnote-168513 Ref: MPICommExecutor-Footnote-268582 Ref: MPICommExecutor-Footnote-368651 Ref: MPICommExecutor-Footnote-468708 Ref: MPICommExecutor-Footnote-568765 Node: Command line68870 Ref: mpi4py futures command-line68974 Ref: 3968974 Ref: Command line-Footnote-171839 Ref: Command line-Footnote-271900 Node: Examples71970 Ref: mpi4py futures examples72050 Ref: 3a72050 Ref: Examples-Footnote-174664 Ref: Examples-Footnote-274712 Ref: Examples-Footnote-374763 Ref: Examples-Footnote-475300 Node: mpi4py run75370 Ref: mpi4py run doc75465 Ref: 3b75465 Ref: mpi4py run module-mpi4py run75465 Ref: 175465 Ref: mpi4py run mpi4py-run75465 Ref: 3c75465 Ref: mpi4py run-Footnote-178718 Ref: mpi4py run-Footnote-278786 Ref: mpi4py run-Footnote-378857 Ref: mpi4py run-Footnote-478929 Ref: mpi4py run-Footnote-579006 Ref: mpi4py run-Footnote-679076 Ref: mpi4py run-Footnote-779142 Ref: mpi4py run-Footnote-879210 Node: Interface options79271 Ref: mpi4py run interface-options79335 Ref: 3d79335 Ref: mpi4py run cmdoption-m80024 Ref: 3e80024 Ref: mpi4py run cmdoption-c80137 Ref: 3f80137 Ref: Interface options-Footnote-180425 Ref: Interface options-Footnote-280485 Ref: Interface options-Footnote-380546 Node: Citation80616 Ref: citing doc80709 Ref: 4080709 Ref: citing citation80709 Ref: 4180709 Node: Installation81532 Ref: install doc81623 Ref: 4281623 Ref: install installation81623 Ref: 4381623 Node: Requirements81743 Ref: install requirements81838 Ref: 4481838 Node: Using pip or easy_install82710 Ref: install using-pip-or-easy-install82829 Ref: 4782829 Node: Using distutils83639 Ref: install using-distutils83753 Ref: 4883753 Ref: install cmdoption-mpicc84451 Ref: 4984451 Ref: install cmdoption-mpi84574 Ref: 4a84574 Ref: install cmdoption-configure84697 Ref: 4b84697 Node: Testing86862 Ref: install testing86942 Ref: 4c86942 Ref: Testing-Footnote-187968 Ref: Testing-Footnote-288004 Node: Appendix88036 Ref: appendix doc88110 Ref: 4d88110 Ref: appendix appendix88110 Ref: 4e88110 Ref: appendix py-test88110 Ref: 4f88110 Node: MPI-enabled Python interpreter88208 Ref: appendix mpi-enabled-python-interpreter88317 Ref: 5088317 Ref: appendix python-mpi88317 Ref: 4688317 Node: Building MPI from sources90489 Ref: appendix building-mpi90598 Ref: 4590598 Ref: appendix building-mpi-from-sources90598 Ref: 5190598 Node: Python Module Index92299 Node: Index92578  End Tag Table  Local Variables: coding: utf-8 End: mpi4py-3.0.3/docs/index.html0000664000175000017500000003012213560002761016722 0ustar dalcinldalcinl00000000000000 MPI for Python

MPI for Python

Author: Lisandro Dalcin
Contact: dalcinl@gmail.com

Online Documentation

Hosted at Read the Docs [http://mpi4py.readthedocs.org/]:

https://readthedocs.org/projects/mpi4py/badge/?version=stable https://readthedocs.org/projects/mpi4py/badge/?version=latest

Hosted at Bitbucket [https://mpi4py.bitbucket.io/]:

Discussion and Support

Hosted at Google Groups:

Downloads and Development

Hosted at Bitbucket:

Citations

Acknowledgments

This project was partially supported by the Extreme Computing Research Center (ECRC), Division of Computer, Electrical, and Mathematical Sciences & Engineering (CEMSE), King Abdullah University of Science and Technology (KAUST).

mpi4py-3.0.3/docs/apiref/0000775000175000017500000000000013560002767016203 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Intercomm-class.html0000664000175000017500000004707113560002764024004 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Intercomm
Package mpi4py :: Module MPI :: Class Intercomm
[hide private]
[frames] | no frames]

type Intercomm


Intercommunicator
Instance Methods [hide private]
 
Get_remote_group(self)
Access the remote group associated with the inter-communicator
 
Get_remote_size(self)
Intercommunicator remote size
 
Merge(self, bool high=False)
Merge intercommunicator
a new object with type S, a subtype of T
__new__(S, ...)

Inherited from Comm: Abort, Allgather, Allgatherv, Allreduce, Alltoall, Alltoallv, Alltoallw, Barrier, Bcast, Bsend, Bsend_init, Call_errhandler, Clone, Compare, Create, Create_group, Create_keyval, Delete_attr, Disconnect, Dup, Dup_with_info, Free, Free_keyval, Gather, Gatherv, Get_attr, Get_errhandler, Get_group, Get_info, Get_name, Get_parent, Get_rank, Get_size, Get_topology, Iallgather, Iallgatherv, Iallreduce, Ialltoall, Ialltoallv, Ialltoallw, Ibarrier, Ibcast, Ibsend, Idup, Igather, Igatherv, Improbe, Iprobe, Irecv, Ireduce, Ireduce_scatter, Ireduce_scatter_block, Irsend, Is_inter, Is_intra, Iscatter, Iscatterv, Isend, Issend, Join, Mprobe, Probe, Recv, Recv_init, Reduce, Reduce_scatter, Reduce_scatter_block, Rsend, Rsend_init, Scatter, Scatterv, Send, Send_init, Sendrecv, Sendrecv_replace, Set_attr, Set_errhandler, Set_info, Set_name, Split, Split_type, Ssend, Ssend_init, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, allgather, allreduce, alltoall, barrier, bcast, bsend, f2py, gather, ibsend, improbe, iprobe, irecv, isend, issend, mprobe, probe, py2f, recv, reduce, scatter, send, sendrecv, ssend

Properties [hide private]
  remote_group
remote group
  remote_size
number of remote processes

Inherited from Comm: group, info, is_inter, is_intra, is_topo, name, rank, size, topology

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: Comm.__new__

mpi4py-3.0.3/docs/apiref/frames.html0000664000175000017500000000111113560002764020335 0ustar dalcinldalcinl00000000000000 MPI for Python mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Grequest-class.html0000664000175000017500000002474113560002764023645 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Grequest
Package mpi4py :: Module MPI :: Class Grequest
[hide private]
[frames] | no frames]

type Grequest


Generalized request
Instance Methods [hide private]
 
Complete(self)
Notify that a user-defined request is complete
 
Start(type cls, query_fn, free_fn, cancel_fn, args=None, kargs=None)
Create and return a user-defined request
a new object with type S, a subtype of T
__new__(S, ...)

Inherited from Request: Cancel, Free, Get_status, Test, Testall, Testany, Testsome, Wait, Waitall, Waitany, Waitsome, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, f2py, py2f, test, testall, testany, wait, waitall, waitany

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: Request.__new__

mpi4py-3.0.3/docs/apiref/toc-mpi4py-module.html0000664000175000017500000000267213560002764022365 0ustar dalcinldalcinl00000000000000 mpi4py

Module mpi4py


Functions

rc

[hide private] mpi4py-3.0.3/docs/apiref/toc.html0000664000175000017500000000261213560002764017654 0ustar dalcinldalcinl00000000000000 Table of Contents

Table of Contents


Everything

Modules

mpi4py
mpi4py.MPI

[hide private] mpi4py-3.0.3/docs/apiref/crarr.png0000664000175000017500000000052413560002763020017 0ustar dalcinldalcinl00000000000000‰PNG  IHDR e¢E,tEXtCreation TimeTue 22 Aug 2006 00:43:10 -0500` XtIMEÖ)Ó}Ö pHYsÂÂnÐu>gAMA± üaEPLTEÿÿÿÍð×ÏÀ€f4sW áÛЊrD`@bCÜÕÈéäÜ–X{`,¯Ÿ€lN‡o@õóðª™xdEðí螊dÐÆ´”~TÖwÅvtRNS@æØfMIDATxÚc`@¼ì¼0&+š—Šˆ°»(’ˆ€ ;; /ðEXùØ‘?Ð n ƒª†— b;'ª+˜˜YÐ#œ(r<£"IEND®B`‚mpi4py-3.0.3/docs/apiref/redirect.html0000664000175000017500000000275613560002764020701 0ustar dalcinldalcinl00000000000000Epydoc Redirect Page

Epydoc Auto-redirect page

When javascript is enabled, this page will redirect URLs of the form redirect.html#dotted.name to the documentation for the object with the given fully-qualified dotted name.

 

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Op-class.html0000664000175000017500000003745713560002764022434 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Op
Package mpi4py :: Module MPI :: Class Op
[hide private]
[frames] | no frames]

type Op


Op
Instance Methods [hide private]
 
Create(type cls, function, bool commute=False)
Create a user-defined operation
 
Free(self)
Free the operation
 
Is_commutative(self)
Query reduction operations for their commutativity
 
Reduce_local(self, inbuf, inoutbuf)
Apply a reduction operator to local data
 
__call__(...) <==> x(...)
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
f2py(type cls, arg)
 
py2f(self)
Properties [hide private]
  is_commutative
is commutative
  is_predefined
is a predefined operation
Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/mpi4py-module.html0000664000175000017500000003473213560002764021604 0ustar dalcinldalcinl00000000000000 mpi4py
Package mpi4py
[hide private]
[frames] | no frames]

Package mpi4py

source code

This is the MPI for Python package.

What is MPI?

The Message Passing Interface, is a standardized and portable message-passing system designed to function on a wide variety of parallel computers. The standard defines the syntax and semantics of library routines and allows users to write portable programs in the main scientific programming languages (Fortran, C, or C++). Since its release, the MPI specification has become the leading standard for message-passing libraries for parallel computers.

What is MPI for Python?

MPI for Python provides MPI bindings for the Python programming language, allowing any Python program to exploit multiple processors. This package is constructed on top of the MPI-1/2 specifications and provides an object oriented interface which closely follows MPI-2 C++ bindings.


Version: 3.0.3

Author: Lisandro Dalcin

Credits: MPI Forum, MPICH Team, Open MPI Team

Submodules [hide private]

Functions [hide private]
 
get_include()
Return the directory in the package that contains header files.
source code
 
get_config()
Return a dictionary with information about MPI.
source code
 
rc(**kargs)
Runtime configuration options.
source code
 
profile(name, **kargs)
Support for the MPI profiling interface.
source code
Function Details [hide private]

get_include()

source code 

Return the directory in the package that contains header files.

Extension modules that need to compile against mpi4py should use this function to locate the appropriate include directory. Using Python distutils (or perhaps NumPy distutils):

import mpi4py
Extension('extension_name', ...
          include_dirs=[..., mpi4py.get_include()])

rc(**kargs)

source code 

Runtime configuration options.

Parameters

initialize : bool
Automatic MPI initialization at import (default: True).
threads : bool
Request for thread support (default: True).
thread_level : {'multiple', 'serialized', 'funneled', 'single'}
Level of thread support to request (default: 'multiple').
finalize : None or bool
Automatic MPI finalization at exit (default: None).
fast_reduce : bool
Use tree-based reductions for objects (default: True).
recv_mprobe : bool
Use matched probes to receive objects (default: True).
errors : {'exception', 'default', 'fatal'}
Error handling policy (default: 'exception').

profile(name, **kargs)

source code 

Support for the MPI profiling interface.

Parameters

name : str
Name of the profiler library to load.
path : list of str, optional
Additional paths to search for the profiler.
logfile : str, optional
Filename prefix for dumping profiler output.

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Cartcomm-class.html0000664000175000017500000006403013560002764023606 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Cartcomm
Package mpi4py :: Module MPI :: Class Cartcomm
[hide private]
[frames] | no frames]

type Cartcomm


Cartesian topology intracommunicator
Instance Methods [hide private]
 
Get_cart_rank(self, coords)
Translate logical coordinates to ranks
 
Get_coords(self, int rank)
Translate ranks to logical coordinates
 
Get_dim(self)
Return number of dimensions
 
Get_topo(self)
Return information on the cartesian topology
 
Shift(self, int direction, int disp)
Return a tuple (source,dest) of process ranks for data shifting with Comm.Sendrecv()
 
Sub(self, remain_dims)
Return cartesian communicators that form lower-dimensional subgrids
a new object with type S, a subtype of T
__new__(S, ...)

Inherited from Topocomm: Ineighbor_allgather, Ineighbor_allgatherv, Ineighbor_alltoall, Ineighbor_alltoallv, Ineighbor_alltoallw, Neighbor_allgather, Neighbor_allgatherv, Neighbor_alltoall, Neighbor_alltoallv, Neighbor_alltoallw, neighbor_allgather, neighbor_alltoall

Inherited from Intracomm: Accept, Cart_map, Connect, Create_cart, Create_dist_graph, Create_dist_graph_adjacent, Create_graph, Create_intercomm, Exscan, Graph_map, Iexscan, Iscan, Scan, Spawn, Spawn_multiple, exscan, scan

Inherited from Comm: Abort, Allgather, Allgatherv, Allreduce, Alltoall, Alltoallv, Alltoallw, Barrier, Bcast, Bsend, Bsend_init, Call_errhandler, Clone, Compare, Create, Create_group, Create_keyval, Delete_attr, Disconnect, Dup, Dup_with_info, Free, Free_keyval, Gather, Gatherv, Get_attr, Get_errhandler, Get_group, Get_info, Get_name, Get_parent, Get_rank, Get_size, Get_topology, Iallgather, Iallgatherv, Iallreduce, Ialltoall, Ialltoallv, Ialltoallw, Ibarrier, Ibcast, Ibsend, Idup, Igather, Igatherv, Improbe, Iprobe, Irecv, Ireduce, Ireduce_scatter, Ireduce_scatter_block, Irsend, Is_inter, Is_intra, Iscatter, Iscatterv, Isend, Issend, Join, Mprobe, Probe, Recv, Recv_init, Reduce, Reduce_scatter, Reduce_scatter_block, Rsend, Rsend_init, Scatter, Scatterv, Send, Send_init, Sendrecv, Sendrecv_replace, Set_attr, Set_errhandler, Set_info, Set_name, Split, Split_type, Ssend, Ssend_init, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, allgather, allreduce, alltoall, barrier, bcast, bsend, f2py, gather, ibsend, improbe, iprobe, irecv, isend, issend, mprobe, probe, py2f, recv, reduce, scatter, send, sendrecv, ssend

Properties [hide private]
  coords
coordinates
  dim
number of dimensions
  dims
dimensions
  ndim
number of dimensions
  periods
periodicity
  topo
topology information

Inherited from Topocomm: degrees, indegree, inedges, inoutedges, outdegree, outedges

Inherited from Comm: group, info, is_inter, is_intra, is_topo, name, rank, size, topology

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: Comm.__new__

mpi4py-3.0.3/docs/apiref/api-objects.txt0000664000175000017500000034007513560002764021152 0ustar dalcinldalcinl00000000000000mpi4py mpi4py-module.html mpi4py.profile mpi4py-module.html#profile mpi4py.get_include mpi4py-module.html#get_include mpi4py.get_config mpi4py-module.html#get_config mpi4py.rc mpi4py-module.html#rc mpi4py.MPI mpi4py.MPI-module.html mpi4py.MPI.Unpublish_name mpi4py.MPI-module.html#Unpublish_name mpi4py.MPI.ERR_ACCESS mpi4py.MPI-module.html#ERR_ACCESS mpi4py.MPI._typedict mpi4py.MPI-module.html#_typedict mpi4py.MPI.PACKED mpi4py.MPI-module.html#PACKED mpi4py.MPI.UNIVERSE_SIZE mpi4py.MPI-module.html#UNIVERSE_SIZE mpi4py.MPI.ERR_ARG mpi4py.MPI-module.html#ERR_ARG mpi4py.MPI.VERSION mpi4py.MPI-module.html#VERSION mpi4py.MPI.APPNUM mpi4py.MPI-module.html#APPNUM mpi4py.MPI.ERR_IN_STATUS mpi4py.MPI-module.html#ERR_IN_STATUS mpi4py.MPI.SIMILAR mpi4py.MPI-module.html#SIMILAR mpi4py.MPI.MAX mpi4py.MPI-module.html#MAX mpi4py.MPI.ERR_ASSERT mpi4py.MPI-module.html#ERR_ASSERT mpi4py.MPI.THREAD_MULTIPLE mpi4py.MPI-module.html#THREAD_MULTIPLE mpi4py.MPI.DOUBLE_PRECISION mpi4py.MPI-module.html#DOUBLE_PRECISION mpi4py.MPI.SINT8_T mpi4py.MPI-module.html#SINT8_T mpi4py.MPI.COMM_TYPE_SHARED mpi4py.MPI-module.html#COMM_TYPE_SHARED mpi4py.MPI.COUNT mpi4py.MPI-module.html#COUNT mpi4py.MPI.WTIME_IS_GLOBAL mpi4py.MPI-module.html#WTIME_IS_GLOBAL mpi4py.MPI.GRAPH mpi4py.MPI-module.html#GRAPH mpi4py.MPI.MAX_PORT_NAME mpi4py.MPI-module.html#MAX_PORT_NAME mpi4py.MPI.MAXLOC mpi4py.MPI-module.html#MAXLOC mpi4py.MPI.MODE_NOPRECEDE mpi4py.MPI-module.html#MODE_NOPRECEDE mpi4py.MPI.INFO_ENV mpi4py.MPI-module.html#INFO_ENV mpi4py.MPI.UINT16_T mpi4py.MPI-module.html#UINT16_T mpi4py.MPI.Get_error_class mpi4py.MPI-module.html#Get_error_class mpi4py.MPI.Alloc_mem mpi4py.MPI-module.html#Alloc_mem mpi4py.MPI.INT mpi4py.MPI-module.html#INT mpi4py.MPI.C_LONG_DOUBLE_COMPLEX mpi4py.MPI-module.html#C_LONG_DOUBLE_COMPLEX mpi4py.MPI._lock_table mpi4py.MPI-module.html#_lock_table mpi4py.MPI.COMBINER_SUBARRAY mpi4py.MPI-module.html#COMBINER_SUBARRAY mpi4py.MPI.WIN_NULL mpi4py.MPI-module.html#WIN_NULL mpi4py.MPI.WIN_UNIFIED mpi4py.MPI-module.html#WIN_UNIFIED mpi4py.MPI.REAL mpi4py.MPI-module.html#REAL mpi4py.MPI.UNDEFINED mpi4py.MPI-module.html#UNDEFINED mpi4py.MPI._sizeof mpi4py.MPI-module.html#_sizeof mpi4py.MPI.C_DOUBLE_COMPLEX mpi4py.MPI-module.html#C_DOUBLE_COMPLEX mpi4py.MPI.DISTRIBUTE_BLOCK mpi4py.MPI-module.html#DISTRIBUTE_BLOCK mpi4py.MPI._typecode mpi4py.MPI-module.html#_typecode mpi4py.MPI.WIN_FLAVOR_DYNAMIC mpi4py.MPI-module.html#WIN_FLAVOR_DYNAMIC mpi4py.MPI.ERR_READ_ONLY mpi4py.MPI-module.html#ERR_READ_ONLY mpi4py.MPI.HOST mpi4py.MPI-module.html#HOST mpi4py.MPI.Attach_buffer mpi4py.MPI-module.html#Attach_buffer mpi4py.MPI.COMPLEX32 mpi4py.MPI-module.html#COMPLEX32 mpi4py.MPI.ERR_RMA_SHARED mpi4py.MPI-module.html#ERR_RMA_SHARED mpi4py.MPI.ERR_IO mpi4py.MPI-module.html#ERR_IO mpi4py.MPI.COMBINER_VECTOR mpi4py.MPI-module.html#COMBINER_VECTOR mpi4py.MPI.COMBINER_INDEXED mpi4py.MPI-module.html#COMBINER_INDEXED mpi4py.MPI.ERR_LOCKTYPE mpi4py.MPI-module.html#ERR_LOCKTYPE mpi4py.MPI.ERR_UNKNOWN mpi4py.MPI-module.html#ERR_UNKNOWN mpi4py.MPI.F_FLOAT_COMPLEX mpi4py.MPI-module.html#F_FLOAT_COMPLEX mpi4py.MPI.Aint_diff mpi4py.MPI-module.html#Aint_diff mpi4py.MPI.pickle mpi4py.MPI-module.html#pickle mpi4py.MPI.ERR_RMA_FLAVOR mpi4py.MPI-module.html#ERR_RMA_FLAVOR mpi4py.MPI.ERR_BAD_FILE mpi4py.MPI-module.html#ERR_BAD_FILE mpi4py.MPI.ERR_RMA_ATTACH mpi4py.MPI-module.html#ERR_RMA_ATTACH mpi4py.MPI.LB mpi4py.MPI-module.html#LB mpi4py.MPI.DISP_CUR mpi4py.MPI-module.html#DISP_CUR mpi4py.MPI.F_INT mpi4py.MPI-module.html#F_INT mpi4py.MPI.MODE_RDWR mpi4py.MPI-module.html#MODE_RDWR mpi4py.MPI.WIN_SEPARATE mpi4py.MPI-module.html#WIN_SEPARATE mpi4py.MPI.SINT32_T mpi4py.MPI-module.html#SINT32_T mpi4py.MPI.NO_OP mpi4py.MPI-module.html#NO_OP mpi4py.MPI.CXX_BOOL mpi4py.MPI-module.html#CXX_BOOL mpi4py.MPI.SHORT_INT mpi4py.MPI-module.html#SHORT_INT mpi4py.MPI.ERR_FILE_IN_USE mpi4py.MPI-module.html#ERR_FILE_IN_USE mpi4py.MPI.UINT32_T mpi4py.MPI-module.html#UINT32_T mpi4py.MPI.ERR_TYPE mpi4py.MPI-module.html#ERR_TYPE mpi4py.MPI.THREAD_SINGLE mpi4py.MPI-module.html#THREAD_SINGLE mpi4py.MPI.ERR_COMM mpi4py.MPI-module.html#ERR_COMM mpi4py.MPI.ERR_UNSUPPORTED_OPERATION mpi4py.MPI-module.html#ERR_UNSUPPORTED_OPERATION mpi4py.MPI.GROUP_EMPTY mpi4py.MPI-module.html#GROUP_EMPTY mpi4py.MPI.DATATYPE_NULL mpi4py.MPI-module.html#DATATYPE_NULL mpi4py.MPI.ERR_SPAWN mpi4py.MPI-module.html#ERR_SPAWN mpi4py.MPI.BSEND_OVERHEAD mpi4py.MPI-module.html#BSEND_OVERHEAD mpi4py.MPI.MIN mpi4py.MPI-module.html#MIN mpi4py.MPI.COMBINER_CONTIGUOUS mpi4py.MPI-module.html#COMBINER_CONTIGUOUS mpi4py.MPI.FLOAT_INT mpi4py.MPI-module.html#FLOAT_INT mpi4py.MPI.ERR_RMA_CONFLICT mpi4py.MPI-module.html#ERR_RMA_CONFLICT mpi4py.MPI.Get_processor_name mpi4py.MPI-module.html#Get_processor_name mpi4py.MPI.BOTTOM mpi4py.MPI-module.html#BOTTOM mpi4py.MPI.Aint_add mpi4py.MPI-module.html#Aint_add mpi4py.MPI.LONG mpi4py.MPI-module.html#LONG mpi4py.MPI.SIGNED_INT mpi4py.MPI-module.html#SIGNED_INT mpi4py.MPI.COMM_WORLD mpi4py.MPI-module.html#COMM_WORLD mpi4py.MPI.Open_port mpi4py.MPI-module.html#Open_port mpi4py.MPI.SUM mpi4py.MPI-module.html#SUM mpi4py.MPI.Lookup_name mpi4py.MPI-module.html#Lookup_name mpi4py.MPI.Get_version mpi4py.MPI-module.html#Get_version mpi4py.MPI.COMBINER_INDEXED_BLOCK mpi4py.MPI-module.html#COMBINER_INDEXED_BLOCK mpi4py.MPI.get_vendor mpi4py.MPI-module.html#get_vendor mpi4py.MPI.ERR_BUFFER mpi4py.MPI-module.html#ERR_BUFFER mpi4py.MPI.F_COMPLEX mpi4py.MPI-module.html#F_COMPLEX mpi4py.MPI.ERR_DISP mpi4py.MPI-module.html#ERR_DISP mpi4py.MPI.UNSIGNED_LONG_LONG mpi4py.MPI-module.html#UNSIGNED_LONG_LONG mpi4py.MPI.ERR_SIZE mpi4py.MPI-module.html#ERR_SIZE mpi4py.MPI.ANY_SOURCE mpi4py.MPI-module.html#ANY_SOURCE mpi4py.MPI.ERR_UNSUPPORTED_DATAREP mpi4py.MPI-module.html#ERR_UNSUPPORTED_DATAREP mpi4py.MPI.LXOR mpi4py.MPI-module.html#LXOR mpi4py.MPI.Query_thread mpi4py.MPI-module.html#Query_thread mpi4py.MPI.LOGICAL mpi4py.MPI-module.html#LOGICAL mpi4py.MPI.WIN_CREATE_FLAVOR mpi4py.MPI-module.html#WIN_CREATE_FLAVOR mpi4py.MPI.COMM_SELF mpi4py.MPI-module.html#COMM_SELF mpi4py.MPI.COMPLEX4 mpi4py.MPI-module.html#COMPLEX4 mpi4py.MPI.ERR_ROOT mpi4py.MPI-module.html#ERR_ROOT mpi4py.MPI.COMPLEX8 mpi4py.MPI-module.html#COMPLEX8 mpi4py.MPI.DISTRIBUTE_CYCLIC mpi4py.MPI-module.html#DISTRIBUTE_CYCLIC mpi4py.MPI.F_BOOL mpi4py.MPI-module.html#F_BOOL mpi4py.MPI.ERR_INTERN mpi4py.MPI-module.html#ERR_INTERN mpi4py.MPI.SEEK_SET mpi4py.MPI-module.html#SEEK_SET mpi4py.MPI.ERR_DUP_DATAREP mpi4py.MPI-module.html#ERR_DUP_DATAREP mpi4py.MPI.ERR_RMA_SYNC mpi4py.MPI-module.html#ERR_RMA_SYNC mpi4py.MPI.Compute_dims mpi4py.MPI-module.html#Compute_dims mpi4py.MPI.SINT16_T mpi4py.MPI-module.html#SINT16_T mpi4py.MPI.BAND mpi4py.MPI-module.html#BAND mpi4py.MPI.UNSIGNED_CHAR mpi4py.MPI-module.html#UNSIGNED_CHAR mpi4py.MPI.ERR_NAME mpi4py.MPI-module.html#ERR_NAME mpi4py.MPI.WCHAR mpi4py.MPI-module.html#WCHAR mpi4py.MPI.PROD mpi4py.MPI-module.html#PROD mpi4py.MPI.TAG_UB mpi4py.MPI-module.html#TAG_UB mpi4py.MPI.UNSIGNED_INT mpi4py.MPI-module.html#UNSIGNED_INT mpi4py.MPI.COMBINER_F90_INTEGER mpi4py.MPI-module.html#COMBINER_F90_INTEGER mpi4py.MPI.CHAR mpi4py.MPI-module.html#CHAR mpi4py.MPI.ERR_RMA_RANGE mpi4py.MPI-module.html#ERR_RMA_RANGE mpi4py.MPI.ERR_KEYVAL mpi4py.MPI-module.html#ERR_KEYVAL mpi4py.MPI.ERR_SERVICE mpi4py.MPI-module.html#ERR_SERVICE mpi4py.MPI.LAND mpi4py.MPI-module.html#LAND mpi4py.MPI.ERR_COUNT mpi4py.MPI-module.html#ERR_COUNT mpi4py.MPI.MAX_PROCESSOR_NAME mpi4py.MPI-module.html#MAX_PROCESSOR_NAME mpi4py.MPI.TYPECLASS_INTEGER mpi4py.MPI-module.html#TYPECLASS_INTEGER mpi4py.MPI.LOGICAL2 mpi4py.MPI-module.html#LOGICAL2 mpi4py.MPI.LOGICAL1 mpi4py.MPI-module.html#LOGICAL1 mpi4py.MPI.SUCCESS mpi4py.MPI-module.html#SUCCESS mpi4py.MPI.LOGICAL4 mpi4py.MPI-module.html#LOGICAL4 mpi4py.MPI.LOGICAL8 mpi4py.MPI-module.html#LOGICAL8 mpi4py.MPI.CART mpi4py.MPI-module.html#CART mpi4py.MPI.MODE_EXCL mpi4py.MPI-module.html#MODE_EXCL mpi4py.MPI.ERR_INFO_KEY mpi4py.MPI-module.html#ERR_INFO_KEY mpi4py.MPI.WIN_MODEL mpi4py.MPI-module.html#WIN_MODEL mpi4py.MPI.Free_mem mpi4py.MPI-module.html#Free_mem mpi4py.MPI.LONG_INT mpi4py.MPI-module.html#LONG_INT mpi4py.MPI.DIST_GRAPH mpi4py.MPI-module.html#DIST_GRAPH mpi4py.MPI.INT64_T mpi4py.MPI-module.html#INT64_T mpi4py.MPI.ERR_TAG mpi4py.MPI-module.html#ERR_TAG mpi4py.MPI.MODE_DELETE_ON_CLOSE mpi4py.MPI-module.html#MODE_DELETE_ON_CLOSE mpi4py.MPI.INFO_NULL mpi4py.MPI-module.html#INFO_NULL mpi4py.MPI.ERR_RANK mpi4py.MPI-module.html#ERR_RANK mpi4py.MPI.Add_error_code mpi4py.MPI-module.html#Add_error_code mpi4py.MPI.MODE_UNIQUE_OPEN mpi4py.MPI-module.html#MODE_UNIQUE_OPEN mpi4py.MPI.Get_library_version mpi4py.MPI-module.html#Get_library_version mpi4py.MPI.ORDER_FORTRAN mpi4py.MPI-module.html#ORDER_FORTRAN mpi4py.MPI.COMBINER_DARRAY mpi4py.MPI-module.html#COMBINER_DARRAY mpi4py.MPI.ERR_INFO mpi4py.MPI-module.html#ERR_INFO mpi4py.MPI.FLOAT mpi4py.MPI-module.html#FLOAT mpi4py.MPI.DISTRIBUTE_NONE mpi4py.MPI-module.html#DISTRIBUTE_NONE mpi4py.MPI.LONG_DOUBLE mpi4py.MPI-module.html#LONG_DOUBLE mpi4py.MPI.F_DOUBLE mpi4py.MPI-module.html#F_DOUBLE mpi4py.MPI.ERR_AMODE mpi4py.MPI-module.html#ERR_AMODE mpi4py.MPI.ERR_PORT mpi4py.MPI-module.html#ERR_PORT mpi4py.MPI.UINT8_T mpi4py.MPI-module.html#UINT8_T mpi4py.MPI.COMBINER_NAMED mpi4py.MPI-module.html#COMBINER_NAMED mpi4py.MPI.ERRHANDLER_NULL mpi4py.MPI-module.html#ERRHANDLER_NULL mpi4py.MPI.ERR_REQUEST mpi4py.MPI-module.html#ERR_REQUEST mpi4py.MPI.GROUP_NULL mpi4py.MPI-module.html#GROUP_NULL mpi4py.MPI.REQUEST_NULL mpi4py.MPI-module.html#REQUEST_NULL mpi4py.MPI.Detach_buffer mpi4py.MPI-module.html#Detach_buffer mpi4py.MPI.Add_error_string mpi4py.MPI-module.html#Add_error_string mpi4py.MPI.SIGNED_SHORT mpi4py.MPI-module.html#SIGNED_SHORT mpi4py.MPI.SIGNED_LONG mpi4py.MPI-module.html#SIGNED_LONG mpi4py.MPI.WIN_DISP_UNIT mpi4py.MPI-module.html#WIN_DISP_UNIT mpi4py.MPI.REAL8 mpi4py.MPI-module.html#REAL8 mpi4py.MPI.COMBINER_HINDEXED mpi4py.MPI-module.html#COMBINER_HINDEXED mpi4py.MPI.REAL2 mpi4py.MPI-module.html#REAL2 mpi4py.MPI.REAL4 mpi4py.MPI-module.html#REAL4 mpi4py.MPI.ERRORS_RETURN mpi4py.MPI-module.html#ERRORS_RETURN mpi4py.MPI.ORDER_C mpi4py.MPI-module.html#ORDER_C mpi4py.MPI.ORDER_F mpi4py.MPI-module.html#ORDER_F mpi4py.MPI.ERR_TOPOLOGY mpi4py.MPI-module.html#ERR_TOPOLOGY mpi4py.MPI.WEIGHTS_EMPTY mpi4py.MPI-module.html#WEIGHTS_EMPTY mpi4py.MPI.LONG_LONG mpi4py.MPI-module.html#LONG_LONG mpi4py.MPI.LONG_DOUBLE_INT mpi4py.MPI-module.html#LONG_DOUBLE_INT mpi4py.MPI.DOUBLE_COMPLEX mpi4py.MPI-module.html#DOUBLE_COMPLEX mpi4py.MPI.Init_thread mpi4py.MPI-module.html#Init_thread mpi4py.MPI.COMBINER_HVECTOR mpi4py.MPI-module.html#COMBINER_HVECTOR mpi4py.MPI.MAX_DATAREP_STRING mpi4py.MPI-module.html#MAX_DATAREP_STRING mpi4py.MPI.KEYVAL_INVALID mpi4py.MPI-module.html#KEYVAL_INVALID mpi4py.MPI.SHORT mpi4py.MPI-module.html#SHORT mpi4py.MPI.ERR_OTHER mpi4py.MPI-module.html#ERR_OTHER mpi4py.MPI.ANY_TAG mpi4py.MPI-module.html#ANY_TAG mpi4py.MPI.MODE_WRONLY mpi4py.MPI-module.html#MODE_WRONLY mpi4py.MPI.COMPLEX mpi4py.MPI-module.html#COMPLEX mpi4py.MPI.UNSIGNED_LONG mpi4py.MPI-module.html#UNSIGNED_LONG mpi4py.MPI.ERR_NOT_SAME mpi4py.MPI-module.html#ERR_NOT_SAME mpi4py.MPI.Finalize mpi4py.MPI-module.html#Finalize mpi4py.MPI.UNSIGNED mpi4py.MPI-module.html#UNSIGNED mpi4py.MPI.ROOT mpi4py.MPI-module.html#ROOT mpi4py.MPI.Is_thread_main mpi4py.MPI-module.html#Is_thread_main mpi4py.MPI.MODE_NOPUT mpi4py.MPI-module.html#MODE_NOPUT mpi4py.MPI.LOCK_SHARED mpi4py.MPI-module.html#LOCK_SHARED mpi4py.MPI.COMPLEX16 mpi4py.MPI-module.html#COMPLEX16 mpi4py.MPI.AINT mpi4py.MPI-module.html#AINT mpi4py.MPI.MESSAGE_NULL mpi4py.MPI-module.html#MESSAGE_NULL mpi4py.MPI.TWOINT mpi4py.MPI-module.html#TWOINT mpi4py.MPI.COMBINER_F90_REAL mpi4py.MPI-module.html#COMBINER_F90_REAL mpi4py.MPI._set_abort_status mpi4py.MPI-module.html#_set_abort_status mpi4py.MPI.OP_NULL mpi4py.MPI-module.html#OP_NULL mpi4py.MPI.MINLOC mpi4py.MPI-module.html#MINLOC mpi4py.MPI.ERR_FILE mpi4py.MPI-module.html#ERR_FILE mpi4py.MPI.LASTUSEDCODE mpi4py.MPI-module.html#LASTUSEDCODE mpi4py.MPI.Is_initialized mpi4py.MPI-module.html#Is_initialized mpi4py.MPI.UNEQUAL mpi4py.MPI-module.html#UNEQUAL mpi4py.MPI.F_FLOAT mpi4py.MPI-module.html#F_FLOAT mpi4py.MPI.DOUBLE_INT mpi4py.MPI-module.html#DOUBLE_INT mpi4py.MPI.MAX_INFO_KEY mpi4py.MPI-module.html#MAX_INFO_KEY mpi4py.MPI.INT16_T mpi4py.MPI-module.html#INT16_T mpi4py.MPI._typedict_c mpi4py.MPI-module.html#_typedict_c mpi4py.MPI._typedict_f mpi4py.MPI-module.html#_typedict_f mpi4py.MPI.SUBVERSION mpi4py.MPI-module.html#SUBVERSION mpi4py.MPI.MODE_NOSUCCEED mpi4py.MPI-module.html#MODE_NOSUCCEED mpi4py.MPI.LOCK_EXCLUSIVE mpi4py.MPI-module.html#LOCK_EXCLUSIVE mpi4py.MPI.Register_datarep mpi4py.MPI-module.html#Register_datarep mpi4py.MPI.CONGRUENT mpi4py.MPI-module.html#CONGRUENT mpi4py.MPI.__pyx_capi__ mpi4py.MPI-module.html#__pyx_capi__ mpi4py.MPI.UNSIGNED_SHORT mpi4py.MPI-module.html#UNSIGNED_SHORT mpi4py.MPI.Is_finalized mpi4py.MPI-module.html#Is_finalized mpi4py.MPI.Get_error_string mpi4py.MPI-module.html#Get_error_string mpi4py.MPI.WIN_BASE mpi4py.MPI-module.html#WIN_BASE mpi4py.MPI.BYTE mpi4py.MPI-module.html#BYTE mpi4py.MPI.MAX_ERROR_STRING mpi4py.MPI-module.html#MAX_ERROR_STRING mpi4py.MPI.C_COMPLEX mpi4py.MPI-module.html#C_COMPLEX mpi4py.MPI.IN_PLACE mpi4py.MPI-module.html#IN_PLACE mpi4py.MPI.INT32_T mpi4py.MPI-module.html#INT32_T mpi4py.MPI.LOR mpi4py.MPI-module.html#LOR mpi4py.MPI.Init mpi4py.MPI-module.html#Init mpi4py.MPI.WIN_FLAVOR_CREATE mpi4py.MPI-module.html#WIN_FLAVOR_CREATE mpi4py.MPI.WIN_FLAVOR_ALLOCATE mpi4py.MPI-module.html#WIN_FLAVOR_ALLOCATE mpi4py.MPI.ERR_QUOTA mpi4py.MPI-module.html#ERR_QUOTA mpi4py.MPI.CXX_FLOAT_COMPLEX mpi4py.MPI-module.html#CXX_FLOAT_COMPLEX mpi4py.MPI.FILE_NULL mpi4py.MPI-module.html#FILE_NULL mpi4py.MPI.COMBINER_RESIZED mpi4py.MPI-module.html#COMBINER_RESIZED mpi4py.MPI.ERR_FILE_EXISTS mpi4py.MPI-module.html#ERR_FILE_EXISTS mpi4py.MPI.REAL16 mpi4py.MPI-module.html#REAL16 mpi4py.MPI.Wtick mpi4py.MPI-module.html#Wtick mpi4py.MPI.MODE_SEQUENTIAL mpi4py.MPI-module.html#MODE_SEQUENTIAL mpi4py.MPI.ERR_NO_SPACE mpi4py.MPI-module.html#ERR_NO_SPACE mpi4py.MPI.IO mpi4py.MPI-module.html#IO mpi4py.MPI.WIN_FLAVOR mpi4py.MPI-module.html#WIN_FLAVOR mpi4py.MPI.COMBINER_HINDEXED_BLOCK mpi4py.MPI-module.html#COMBINER_HINDEXED_BLOCK mpi4py.MPI.C_FLOAT_COMPLEX mpi4py.MPI-module.html#C_FLOAT_COMPLEX mpi4py.MPI.BOR mpi4py.MPI-module.html#BOR mpi4py.MPI.THREAD_FUNNELED mpi4py.MPI-module.html#THREAD_FUNNELED mpi4py.MPI.C_BOOL mpi4py.MPI-module.html#C_BOOL mpi4py.MPI.MAX_OBJECT_NAME mpi4py.MPI-module.html#MAX_OBJECT_NAME mpi4py.MPI.CXX_LONG_DOUBLE_COMPLEX mpi4py.MPI-module.html#CXX_LONG_DOUBLE_COMPLEX mpi4py.MPI.DISTRIBUTE_DFLT_DARG mpi4py.MPI-module.html#DISTRIBUTE_DFLT_DARG mpi4py.MPI.COMBINER_F90_COMPLEX mpi4py.MPI-module.html#COMBINER_F90_COMPLEX mpi4py.MPI.ERR_NO_MEM mpi4py.MPI-module.html#ERR_NO_MEM mpi4py.MPI.MODE_RDONLY mpi4py.MPI-module.html#MODE_RDONLY mpi4py.MPI.MODE_NOSTORE mpi4py.MPI-module.html#MODE_NOSTORE mpi4py.MPI.DOUBLE mpi4py.MPI-module.html#DOUBLE mpi4py.MPI.MAX_INFO_VAL mpi4py.MPI-module.html#MAX_INFO_VAL mpi4py.MPI.Publish_name mpi4py.MPI-module.html#Publish_name mpi4py.MPI.WIN_FLAVOR_SHARED mpi4py.MPI-module.html#WIN_FLAVOR_SHARED mpi4py.MPI._keyval_registry mpi4py.MPI-module.html#_keyval_registry mpi4py.MPI.MESSAGE_NO_PROC mpi4py.MPI-module.html#MESSAGE_NO_PROC mpi4py.MPI.ERR_TRUNCATE mpi4py.MPI-module.html#ERR_TRUNCATE mpi4py.MPI.COMBINER_STRUCT mpi4py.MPI-module.html#COMBINER_STRUCT mpi4py.MPI.INTEGER mpi4py.MPI-module.html#INTEGER mpi4py.MPI.Pcontrol mpi4py.MPI-module.html#Pcontrol mpi4py.MPI.IDENT mpi4py.MPI-module.html#IDENT mpi4py.MPI.ERR_INFO_NOKEY mpi4py.MPI-module.html#ERR_INFO_NOKEY mpi4py.MPI.INT8_T mpi4py.MPI-module.html#INT8_T mpi4py.MPI.UNWEIGHTED mpi4py.MPI-module.html#UNWEIGHTED mpi4py.MPI.OFFSET mpi4py.MPI-module.html#OFFSET mpi4py.MPI.SEEK_END mpi4py.MPI-module.html#SEEK_END mpi4py.MPI.ERR_OP mpi4py.MPI-module.html#ERR_OP mpi4py.MPI.INT_INT mpi4py.MPI-module.html#INT_INT mpi4py.MPI.F_DOUBLE_COMPLEX mpi4py.MPI-module.html#F_DOUBLE_COMPLEX mpi4py.MPI.UB mpi4py.MPI-module.html#UB mpi4py.MPI.Get_address mpi4py.MPI-module.html#Get_address mpi4py.MPI.ERR_NO_SUCH_FILE mpi4py.MPI-module.html#ERR_NO_SUCH_FILE mpi4py.MPI.MODE_NOCHECK mpi4py.MPI-module.html#MODE_NOCHECK mpi4py.MPI.COMM_NULL mpi4py.MPI-module.html#COMM_NULL mpi4py.MPI.SEEK_CUR mpi4py.MPI-module.html#SEEK_CUR mpi4py.MPI._addressof mpi4py.MPI-module.html#_addressof mpi4py.MPI.ERR_INFO_VALUE mpi4py.MPI-module.html#ERR_INFO_VALUE mpi4py.MPI.Close_port mpi4py.MPI-module.html#Close_port mpi4py.MPI.REPLACE mpi4py.MPI-module.html#REPLACE mpi4py.MPI.COMBINER_DUP mpi4py.MPI-module.html#COMBINER_DUP mpi4py.MPI.TYPECLASS_REAL mpi4py.MPI-module.html#TYPECLASS_REAL mpi4py.MPI.WIN_SIZE mpi4py.MPI-module.html#WIN_SIZE mpi4py.MPI.THREAD_SERIALIZED mpi4py.MPI-module.html#THREAD_SERIALIZED mpi4py.MPI.MAX_LIBRARY_VERSION_STRING mpi4py.MPI-module.html#MAX_LIBRARY_VERSION_STRING mpi4py.MPI.ERR_CONVERSION mpi4py.MPI-module.html#ERR_CONVERSION mpi4py.MPI.ERR_GROUP mpi4py.MPI-module.html#ERR_GROUP mpi4py.MPI.UINT64_T mpi4py.MPI-module.html#UINT64_T mpi4py.MPI.INTEGER16 mpi4py.MPI-module.html#INTEGER16 mpi4py.MPI.SINT64_T mpi4py.MPI-module.html#SINT64_T mpi4py.MPI.Wtime mpi4py.MPI-module.html#Wtime mpi4py.MPI.BOOL mpi4py.MPI-module.html#BOOL mpi4py.MPI.ERRORS_ARE_FATAL mpi4py.MPI-module.html#ERRORS_ARE_FATAL mpi4py.MPI.ERR_LASTCODE mpi4py.MPI-module.html#ERR_LASTCODE mpi4py.MPI.INTEGER2 mpi4py.MPI-module.html#INTEGER2 mpi4py.MPI.INTEGER1 mpi4py.MPI-module.html#INTEGER1 mpi4py.MPI.INTEGER4 mpi4py.MPI-module.html#INTEGER4 mpi4py.MPI.INTEGER8 mpi4py.MPI-module.html#INTEGER8 mpi4py.MPI.CHARACTER mpi4py.MPI-module.html#CHARACTER mpi4py.MPI.DISPLACEMENT_CURRENT mpi4py.MPI-module.html#DISPLACEMENT_CURRENT mpi4py.MPI.PROC_NULL mpi4py.MPI-module.html#PROC_NULL mpi4py.MPI.MODE_APPEND mpi4py.MPI-module.html#MODE_APPEND mpi4py.MPI.ERR_PENDING mpi4py.MPI-module.html#ERR_PENDING mpi4py.MPI.SIGNED_LONG_LONG mpi4py.MPI-module.html#SIGNED_LONG_LONG mpi4py.MPI.BXOR mpi4py.MPI-module.html#BXOR mpi4py.MPI.TYPECLASS_COMPLEX mpi4py.MPI-module.html#TYPECLASS_COMPLEX mpi4py.MPI.ERR_DIMS mpi4py.MPI-module.html#ERR_DIMS mpi4py.MPI.ERR_BASE mpi4py.MPI-module.html#ERR_BASE mpi4py.MPI.SIGNED_CHAR mpi4py.MPI-module.html#SIGNED_CHAR mpi4py.MPI.CXX_DOUBLE_COMPLEX mpi4py.MPI-module.html#CXX_DOUBLE_COMPLEX mpi4py.MPI._handleof mpi4py.MPI-module.html#_handleof mpi4py.MPI.MODE_CREATE mpi4py.MPI-module.html#MODE_CREATE mpi4py.MPI.Add_error_class mpi4py.MPI-module.html#Add_error_class mpi4py.MPI.ERR_WIN mpi4py.MPI-module.html#ERR_WIN mpi4py.MPI.Cartcomm mpi4py.MPI.Cartcomm-class.html mpi4py.MPI.Comm.iprobe mpi4py.MPI.Comm-class.html#iprobe mpi4py.MPI.Comm.Isend mpi4py.MPI.Comm-class.html#Isend mpi4py.MPI.Comm.probe mpi4py.MPI.Comm-class.html#probe mpi4py.MPI.Topocomm.Ineighbor_alltoall mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoall mpi4py.MPI.Topocomm.Neighbor_allgather mpi4py.MPI.Topocomm-class.html#Neighbor_allgather mpi4py.MPI.Comm.Bsend_init mpi4py.MPI.Comm-class.html#Bsend_init mpi4py.MPI.Intracomm.Iexscan mpi4py.MPI.Intracomm-class.html#Iexscan mpi4py.MPI.Comm.Rsend_init mpi4py.MPI.Comm-class.html#Rsend_init mpi4py.MPI.Comm.Allgather mpi4py.MPI.Comm-class.html#Allgather mpi4py.MPI.Comm.__lt__ mpi4py.MPI.Comm-class.html#__lt__ mpi4py.MPI.Comm.group mpi4py.MPI.Comm-class.html#group mpi4py.MPI.Comm.send mpi4py.MPI.Comm-class.html#send mpi4py.MPI.Comm.Get_info mpi4py.MPI.Comm-class.html#Get_info mpi4py.MPI.Topocomm.degrees mpi4py.MPI.Topocomm-class.html#degrees mpi4py.MPI.Comm.Call_errhandler mpi4py.MPI.Comm-class.html#Call_errhandler mpi4py.MPI.Comm.allgather mpi4py.MPI.Comm-class.html#allgather mpi4py.MPI.Comm.Ibcast mpi4py.MPI.Comm-class.html#Ibcast mpi4py.MPI.Comm.Recv mpi4py.MPI.Comm-class.html#Recv mpi4py.MPI.Comm.Sendrecv mpi4py.MPI.Comm-class.html#Sendrecv mpi4py.MPI.Comm.info mpi4py.MPI.Comm-class.html#info mpi4py.MPI.Comm.Gather mpi4py.MPI.Comm-class.html#Gather mpi4py.MPI.Comm.Allgatherv mpi4py.MPI.Comm-class.html#Allgatherv mpi4py.MPI.Comm.Igather mpi4py.MPI.Comm-class.html#Igather mpi4py.MPI.Comm.rank mpi4py.MPI.Comm-class.html#rank mpi4py.MPI.Comm.Gatherv mpi4py.MPI.Comm-class.html#Gatherv mpi4py.MPI.Comm.__gt__ mpi4py.MPI.Comm-class.html#__gt__ mpi4py.MPI.Comm.__nonzero__ mpi4py.MPI.Comm-class.html#__nonzero__ mpi4py.MPI.Comm.Ibsend mpi4py.MPI.Comm-class.html#Ibsend mpi4py.MPI.Cartcomm.dim mpi4py.MPI.Cartcomm-class.html#dim mpi4py.MPI.Comm.Create_group mpi4py.MPI.Comm-class.html#Create_group mpi4py.MPI.Comm.name mpi4py.MPI.Comm-class.html#name mpi4py.MPI.Cartcomm.coords mpi4py.MPI.Cartcomm-class.html#coords mpi4py.MPI.Comm.Iallgather mpi4py.MPI.Comm-class.html#Iallgather mpi4py.MPI.Comm.Bcast mpi4py.MPI.Comm-class.html#Bcast mpi4py.MPI.Comm.Disconnect mpi4py.MPI.Comm-class.html#Disconnect mpi4py.MPI.Cartcomm.Sub mpi4py.MPI.Cartcomm-class.html#Sub mpi4py.MPI.Comm.Create mpi4py.MPI.Comm-class.html#Create mpi4py.MPI.Comm.reduce mpi4py.MPI.Comm-class.html#reduce mpi4py.MPI.Comm.Send mpi4py.MPI.Comm-class.html#Send mpi4py.MPI.Comm.Create_keyval mpi4py.MPI.Comm-class.html#Create_keyval mpi4py.MPI.Comm.Split mpi4py.MPI.Comm-class.html#Split mpi4py.MPI.Comm.Set_info mpi4py.MPI.Comm-class.html#Set_info mpi4py.MPI.Comm.Irecv mpi4py.MPI.Comm-class.html#Irecv mpi4py.MPI.Comm.ssend mpi4py.MPI.Comm-class.html#ssend mpi4py.MPI.Comm.issend mpi4py.MPI.Comm-class.html#issend mpi4py.MPI.Comm.Igatherv mpi4py.MPI.Comm-class.html#Igatherv mpi4py.MPI.Intracomm.Accept mpi4py.MPI.Intracomm-class.html#Accept mpi4py.MPI.Topocomm.Neighbor_allgatherv mpi4py.MPI.Topocomm-class.html#Neighbor_allgatherv mpi4py.MPI.Comm.f2py mpi4py.MPI.Comm-class.html#f2py mpi4py.MPI.Comm.Delete_attr mpi4py.MPI.Comm-class.html#Delete_attr mpi4py.MPI.Topocomm.Neighbor_alltoall mpi4py.MPI.Topocomm-class.html#Neighbor_alltoall mpi4py.MPI.Comm.Abort mpi4py.MPI.Comm-class.html#Abort mpi4py.MPI.Comm.Get_group mpi4py.MPI.Comm-class.html#Get_group mpi4py.MPI.Comm.py2f mpi4py.MPI.Comm-class.html#py2f mpi4py.MPI.Comm.__ne__ mpi4py.MPI.Comm-class.html#__ne__ mpi4py.MPI.Comm.Improbe mpi4py.MPI.Comm-class.html#Improbe mpi4py.MPI.Comm.Join mpi4py.MPI.Comm-class.html#Join mpi4py.MPI.Comm.barrier mpi4py.MPI.Comm-class.html#barrier mpi4py.MPI.Intracomm.Create_graph mpi4py.MPI.Intracomm-class.html#Create_graph mpi4py.MPI.Comm.Get_size mpi4py.MPI.Comm-class.html#Get_size mpi4py.MPI.Comm.Rsend mpi4py.MPI.Comm-class.html#Rsend mpi4py.MPI.Intracomm.Spawn_multiple mpi4py.MPI.Intracomm-class.html#Spawn_multiple mpi4py.MPI.Intracomm.Create_intercomm mpi4py.MPI.Intracomm-class.html#Create_intercomm mpi4py.MPI.Comm.alltoall mpi4py.MPI.Comm-class.html#alltoall mpi4py.MPI.Intracomm.Create_cart mpi4py.MPI.Intracomm-class.html#Create_cart mpi4py.MPI.Comm.recv mpi4py.MPI.Comm-class.html#recv mpi4py.MPI.Comm.sendrecv mpi4py.MPI.Comm-class.html#sendrecv mpi4py.MPI.Comm.topology mpi4py.MPI.Comm-class.html#topology mpi4py.MPI.Comm.Ssend_init mpi4py.MPI.Comm-class.html#Ssend_init mpi4py.MPI.Comm.Get_rank mpi4py.MPI.Comm-class.html#Get_rank mpi4py.MPI.Intracomm.Graph_map mpi4py.MPI.Intracomm-class.html#Graph_map mpi4py.MPI.Intracomm.Scan mpi4py.MPI.Intracomm-class.html#Scan mpi4py.MPI.Comm.scatter mpi4py.MPI.Comm-class.html#scatter mpi4py.MPI.Comm.Scatterv mpi4py.MPI.Comm-class.html#Scatterv mpi4py.MPI.Comm.Ibarrier mpi4py.MPI.Comm-class.html#Ibarrier mpi4py.MPI.Intracomm.Iscan mpi4py.MPI.Intracomm-class.html#Iscan mpi4py.MPI.Comm.Split_type mpi4py.MPI.Comm-class.html#Split_type mpi4py.MPI.Cartcomm.Get_topo mpi4py.MPI.Cartcomm-class.html#Get_topo mpi4py.MPI.Cartcomm.ndim mpi4py.MPI.Cartcomm-class.html#ndim mpi4py.MPI.Topocomm.inoutedges mpi4py.MPI.Topocomm-class.html#inoutedges mpi4py.MPI.Comm.Alltoallv mpi4py.MPI.Comm-class.html#Alltoallv mpi4py.MPI.Comm.Alltoallw mpi4py.MPI.Comm-class.html#Alltoallw mpi4py.MPI.Comm.Issend mpi4py.MPI.Comm-class.html#Issend mpi4py.MPI.Comm.Ialltoall mpi4py.MPI.Comm-class.html#Ialltoall mpi4py.MPI.Comm.Get_name mpi4py.MPI.Comm-class.html#Get_name mpi4py.MPI.Topocomm.neighbor_alltoall mpi4py.MPI.Topocomm-class.html#neighbor_alltoall mpi4py.MPI.Topocomm.outedges mpi4py.MPI.Topocomm-class.html#outedges mpi4py.MPI.Comm.Get_parent mpi4py.MPI.Comm-class.html#Get_parent mpi4py.MPI.Comm.Free mpi4py.MPI.Comm-class.html#Free mpi4py.MPI.Comm.Dup mpi4py.MPI.Comm-class.html#Dup mpi4py.MPI.Comm.Sendrecv_replace mpi4py.MPI.Comm-class.html#Sendrecv_replace mpi4py.MPI.Comm.Get_attr mpi4py.MPI.Comm-class.html#Get_attr mpi4py.MPI.Comm.size mpi4py.MPI.Comm-class.html#size mpi4py.MPI.Comm.Bsend mpi4py.MPI.Comm-class.html#Bsend mpi4py.MPI.Comm.Irsend mpi4py.MPI.Comm-class.html#Irsend mpi4py.MPI.Comm.isend mpi4py.MPI.Comm-class.html#isend mpi4py.MPI.Cartcomm.Get_coords mpi4py.MPI.Cartcomm-class.html#Get_coords mpi4py.MPI.Comm.Idup mpi4py.MPI.Comm-class.html#Idup mpi4py.MPI.Topocomm.outdegree mpi4py.MPI.Topocomm-class.html#outdegree mpi4py.MPI.Cartcomm.Get_dim mpi4py.MPI.Cartcomm-class.html#Get_dim mpi4py.MPI.Intracomm.Create_dist_graph_adjacent mpi4py.MPI.Intracomm-class.html#Create_dist_graph_adjacent mpi4py.MPI.Comm.Alltoall mpi4py.MPI.Comm-class.html#Alltoall mpi4py.MPI.Comm.ibsend mpi4py.MPI.Comm-class.html#ibsend mpi4py.MPI.Comm.bsend mpi4py.MPI.Comm-class.html#bsend mpi4py.MPI.Topocomm.Ineighbor_allgather mpi4py.MPI.Topocomm-class.html#Ineighbor_allgather mpi4py.MPI.Comm.Iallreduce mpi4py.MPI.Comm-class.html#Iallreduce mpi4py.MPI.Comm.Ireduce_scatter_block mpi4py.MPI.Comm-class.html#Ireduce_scatter_block mpi4py.MPI.Comm.Iallgatherv mpi4py.MPI.Comm-class.html#Iallgatherv mpi4py.MPI.Comm.mprobe mpi4py.MPI.Comm-class.html#mprobe mpi4py.MPI.Comm.Allreduce mpi4py.MPI.Comm-class.html#Allreduce mpi4py.MPI.Comm.Dup_with_info mpi4py.MPI.Comm-class.html#Dup_with_info mpi4py.MPI.Comm.Get_errhandler mpi4py.MPI.Comm-class.html#Get_errhandler mpi4py.MPI.Comm.is_inter mpi4py.MPI.Comm-class.html#is_inter mpi4py.MPI.Comm.__eq__ mpi4py.MPI.Comm-class.html#__eq__ mpi4py.MPI.Comm.Scatter mpi4py.MPI.Comm-class.html#Scatter mpi4py.MPI.Intracomm.Spawn mpi4py.MPI.Intracomm-class.html#Spawn mpi4py.MPI.Comm.Compare mpi4py.MPI.Comm-class.html#Compare mpi4py.MPI.Comm.Iprobe mpi4py.MPI.Comm-class.html#Iprobe mpi4py.MPI.Comm.allreduce mpi4py.MPI.Comm-class.html#allreduce mpi4py.MPI.Comm.__le__ mpi4py.MPI.Comm-class.html#__le__ mpi4py.MPI.Intracomm.Connect mpi4py.MPI.Intracomm-class.html#Connect mpi4py.MPI.Comm.Reduce_scatter_block mpi4py.MPI.Comm-class.html#Reduce_scatter_block mpi4py.MPI.Comm.Free_keyval mpi4py.MPI.Comm-class.html#Free_keyval mpi4py.MPI.Comm.Ssend mpi4py.MPI.Comm-class.html#Ssend mpi4py.MPI.Comm.Iscatter mpi4py.MPI.Comm-class.html#Iscatter mpi4py.MPI.Comm.__ge__ mpi4py.MPI.Comm-class.html#__ge__ mpi4py.MPI.Comm.Set_name mpi4py.MPI.Comm-class.html#Set_name mpi4py.MPI.Comm.gather mpi4py.MPI.Comm-class.html#gather mpi4py.MPI.Comm.Get_topology mpi4py.MPI.Comm-class.html#Get_topology mpi4py.MPI.Comm.Set_attr mpi4py.MPI.Comm-class.html#Set_attr mpi4py.MPI.Intracomm.scan mpi4py.MPI.Intracomm-class.html#scan mpi4py.MPI.Comm.Ireduce mpi4py.MPI.Comm-class.html#Ireduce mpi4py.MPI.Intracomm.exscan mpi4py.MPI.Intracomm-class.html#exscan mpi4py.MPI.Comm.Reduce_scatter mpi4py.MPI.Comm-class.html#Reduce_scatter mpi4py.MPI.Comm.is_topo mpi4py.MPI.Comm-class.html#is_topo mpi4py.MPI.Cartcomm.periods mpi4py.MPI.Cartcomm-class.html#periods mpi4py.MPI.Comm.Mprobe mpi4py.MPI.Comm-class.html#Mprobe mpi4py.MPI.Intracomm.Cart_map mpi4py.MPI.Intracomm-class.html#Cart_map mpi4py.MPI.Comm.bcast mpi4py.MPI.Comm-class.html#bcast mpi4py.MPI.Comm.Is_intra mpi4py.MPI.Comm-class.html#Is_intra mpi4py.MPI.Cartcomm.__new__ mpi4py.MPI.Cartcomm-class.html#__new__ mpi4py.MPI.Comm.Barrier mpi4py.MPI.Comm-class.html#Barrier mpi4py.MPI.Comm.Clone mpi4py.MPI.Comm-class.html#Clone mpi4py.MPI.Topocomm.Ineighbor_alltoallw mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoallw mpi4py.MPI.Comm.Iscatterv mpi4py.MPI.Comm-class.html#Iscatterv mpi4py.MPI.Comm.irecv mpi4py.MPI.Comm-class.html#irecv mpi4py.MPI.Cartcomm.Get_cart_rank mpi4py.MPI.Cartcomm-class.html#Get_cart_rank mpi4py.MPI.Topocomm.inedges mpi4py.MPI.Topocomm-class.html#inedges mpi4py.MPI.Comm.Ireduce_scatter mpi4py.MPI.Comm-class.html#Ireduce_scatter mpi4py.MPI.Comm.Send_init mpi4py.MPI.Comm-class.html#Send_init mpi4py.MPI.Cartcomm.Shift mpi4py.MPI.Cartcomm-class.html#Shift mpi4py.MPI.Cartcomm.topo mpi4py.MPI.Cartcomm-class.html#topo mpi4py.MPI.Cartcomm.dims mpi4py.MPI.Cartcomm-class.html#dims mpi4py.MPI.Comm.Recv_init mpi4py.MPI.Comm-class.html#Recv_init mpi4py.MPI.Topocomm.Neighbor_alltoallv mpi4py.MPI.Topocomm-class.html#Neighbor_alltoallv mpi4py.MPI.Topocomm.Neighbor_alltoallw mpi4py.MPI.Topocomm-class.html#Neighbor_alltoallw mpi4py.MPI.Topocomm.Ineighbor_allgatherv mpi4py.MPI.Topocomm-class.html#Ineighbor_allgatherv mpi4py.MPI.Comm.improbe mpi4py.MPI.Comm-class.html#improbe mpi4py.MPI.Comm.Set_errhandler mpi4py.MPI.Comm-class.html#Set_errhandler mpi4py.MPI.Topocomm.indegree mpi4py.MPI.Topocomm-class.html#indegree mpi4py.MPI.Comm.Probe mpi4py.MPI.Comm-class.html#Probe mpi4py.MPI.Comm.Reduce mpi4py.MPI.Comm-class.html#Reduce mpi4py.MPI.Intracomm.Exscan mpi4py.MPI.Intracomm-class.html#Exscan mpi4py.MPI.Topocomm.neighbor_allgather mpi4py.MPI.Topocomm-class.html#neighbor_allgather mpi4py.MPI.Topocomm.Ineighbor_alltoallv mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoallv mpi4py.MPI.Intracomm.Create_dist_graph mpi4py.MPI.Intracomm-class.html#Create_dist_graph mpi4py.MPI.Comm.Ialltoallv mpi4py.MPI.Comm-class.html#Ialltoallv mpi4py.MPI.Comm.Is_inter mpi4py.MPI.Comm-class.html#Is_inter mpi4py.MPI.Comm.is_intra mpi4py.MPI.Comm-class.html#is_intra mpi4py.MPI.Comm.Ialltoallw mpi4py.MPI.Comm-class.html#Ialltoallw mpi4py.MPI.Comm mpi4py.MPI.Comm-class.html mpi4py.MPI.Comm.iprobe mpi4py.MPI.Comm-class.html#iprobe mpi4py.MPI.Comm.Isend mpi4py.MPI.Comm-class.html#Isend mpi4py.MPI.Comm.probe mpi4py.MPI.Comm-class.html#probe mpi4py.MPI.Comm.Rsend_init mpi4py.MPI.Comm-class.html#Rsend_init mpi4py.MPI.Comm.Allgather mpi4py.MPI.Comm-class.html#Allgather mpi4py.MPI.Comm.__lt__ mpi4py.MPI.Comm-class.html#__lt__ mpi4py.MPI.Comm.group mpi4py.MPI.Comm-class.html#group mpi4py.MPI.Comm.send mpi4py.MPI.Comm-class.html#send mpi4py.MPI.Comm.Get_info mpi4py.MPI.Comm-class.html#Get_info mpi4py.MPI.Comm.Call_errhandler mpi4py.MPI.Comm-class.html#Call_errhandler mpi4py.MPI.Comm.allgather mpi4py.MPI.Comm-class.html#allgather mpi4py.MPI.Comm.Ibcast mpi4py.MPI.Comm-class.html#Ibcast mpi4py.MPI.Comm.Recv mpi4py.MPI.Comm-class.html#Recv mpi4py.MPI.Comm.Sendrecv mpi4py.MPI.Comm-class.html#Sendrecv mpi4py.MPI.Comm.Gather mpi4py.MPI.Comm-class.html#Gather mpi4py.MPI.Comm.Allgatherv mpi4py.MPI.Comm-class.html#Allgatherv mpi4py.MPI.Comm.Igather mpi4py.MPI.Comm-class.html#Igather mpi4py.MPI.Comm.Get_name mpi4py.MPI.Comm-class.html#Get_name mpi4py.MPI.Comm.Gatherv mpi4py.MPI.Comm-class.html#Gatherv mpi4py.MPI.Comm.__gt__ mpi4py.MPI.Comm-class.html#__gt__ mpi4py.MPI.Comm.__nonzero__ mpi4py.MPI.Comm-class.html#__nonzero__ mpi4py.MPI.Comm.Create_group mpi4py.MPI.Comm-class.html#Create_group mpi4py.MPI.Comm.name mpi4py.MPI.Comm-class.html#name mpi4py.MPI.Comm.Bcast mpi4py.MPI.Comm-class.html#Bcast mpi4py.MPI.Comm.Disconnect mpi4py.MPI.Comm-class.html#Disconnect mpi4py.MPI.Comm.Create mpi4py.MPI.Comm-class.html#Create mpi4py.MPI.Comm.reduce mpi4py.MPI.Comm-class.html#reduce mpi4py.MPI.Comm.Send mpi4py.MPI.Comm-class.html#Send mpi4py.MPI.Comm.Create_keyval mpi4py.MPI.Comm-class.html#Create_keyval mpi4py.MPI.Comm.Split mpi4py.MPI.Comm-class.html#Split mpi4py.MPI.Comm.Set_info mpi4py.MPI.Comm-class.html#Set_info mpi4py.MPI.Comm.Irecv mpi4py.MPI.Comm-class.html#Irecv mpi4py.MPI.Comm.ssend mpi4py.MPI.Comm-class.html#ssend mpi4py.MPI.Comm.issend mpi4py.MPI.Comm-class.html#issend mpi4py.MPI.Comm.Igatherv mpi4py.MPI.Comm-class.html#Igatherv mpi4py.MPI.Comm.f2py mpi4py.MPI.Comm-class.html#f2py mpi4py.MPI.Comm.Delete_attr mpi4py.MPI.Comm-class.html#Delete_attr mpi4py.MPI.Comm.Is_inter mpi4py.MPI.Comm-class.html#Is_inter mpi4py.MPI.Comm.__le__ mpi4py.MPI.Comm-class.html#__le__ mpi4py.MPI.Comm.Get_group mpi4py.MPI.Comm-class.html#Get_group mpi4py.MPI.Comm.py2f mpi4py.MPI.Comm-class.html#py2f mpi4py.MPI.Comm.__ne__ mpi4py.MPI.Comm-class.html#__ne__ mpi4py.MPI.Comm.Improbe mpi4py.MPI.Comm-class.html#Improbe mpi4py.MPI.Comm.Join mpi4py.MPI.Comm-class.html#Join mpi4py.MPI.Comm.barrier mpi4py.MPI.Comm-class.html#barrier mpi4py.MPI.Comm.Get_size mpi4py.MPI.Comm-class.html#Get_size mpi4py.MPI.Comm.Rsend mpi4py.MPI.Comm-class.html#Rsend mpi4py.MPI.Comm.alltoall mpi4py.MPI.Comm-class.html#alltoall mpi4py.MPI.Comm.Get_attr mpi4py.MPI.Comm-class.html#Get_attr mpi4py.MPI.Comm.recv mpi4py.MPI.Comm-class.html#recv mpi4py.MPI.Comm.sendrecv mpi4py.MPI.Comm-class.html#sendrecv mpi4py.MPI.Comm.topology mpi4py.MPI.Comm-class.html#topology mpi4py.MPI.Comm.Ssend_init mpi4py.MPI.Comm-class.html#Ssend_init mpi4py.MPI.Comm.Iscatter mpi4py.MPI.Comm-class.html#Iscatter mpi4py.MPI.Comm.Scatterv mpi4py.MPI.Comm-class.html#Scatterv mpi4py.MPI.Comm.Ibarrier mpi4py.MPI.Comm-class.html#Ibarrier mpi4py.MPI.Comm.Split_type mpi4py.MPI.Comm-class.html#Split_type mpi4py.MPI.Comm.Alltoallv mpi4py.MPI.Comm-class.html#Alltoallv mpi4py.MPI.Comm.Alltoallw mpi4py.MPI.Comm-class.html#Alltoallw mpi4py.MPI.Comm.Issend mpi4py.MPI.Comm-class.html#Issend mpi4py.MPI.Comm.Ialltoall mpi4py.MPI.Comm-class.html#Ialltoall mpi4py.MPI.Comm.rank mpi4py.MPI.Comm-class.html#rank mpi4py.MPI.Comm.Free mpi4py.MPI.Comm-class.html#Free mpi4py.MPI.Comm.Dup mpi4py.MPI.Comm-class.html#Dup mpi4py.MPI.Comm.Sendrecv_replace mpi4py.MPI.Comm-class.html#Sendrecv_replace mpi4py.MPI.Comm.size mpi4py.MPI.Comm-class.html#size mpi4py.MPI.Comm.Bsend mpi4py.MPI.Comm-class.html#Bsend mpi4py.MPI.Comm.Irsend mpi4py.MPI.Comm-class.html#Irsend mpi4py.MPI.Comm.isend mpi4py.MPI.Comm-class.html#isend mpi4py.MPI.Comm.Idup mpi4py.MPI.Comm-class.html#Idup mpi4py.MPI.Comm.Iallgather mpi4py.MPI.Comm-class.html#Iallgather mpi4py.MPI.Comm.Alltoall mpi4py.MPI.Comm-class.html#Alltoall mpi4py.MPI.Comm.ibsend mpi4py.MPI.Comm-class.html#ibsend mpi4py.MPI.Comm.bsend mpi4py.MPI.Comm-class.html#bsend mpi4py.MPI.Comm.Iallreduce mpi4py.MPI.Comm-class.html#Iallreduce mpi4py.MPI.Comm.Ireduce_scatter_block mpi4py.MPI.Comm-class.html#Ireduce_scatter_block mpi4py.MPI.Comm.Iallgatherv mpi4py.MPI.Comm-class.html#Iallgatherv mpi4py.MPI.Comm.mprobe mpi4py.MPI.Comm-class.html#mprobe mpi4py.MPI.Comm.Allreduce mpi4py.MPI.Comm-class.html#Allreduce mpi4py.MPI.Comm.Dup_with_info mpi4py.MPI.Comm-class.html#Dup_with_info mpi4py.MPI.Comm.Get_errhandler mpi4py.MPI.Comm-class.html#Get_errhandler mpi4py.MPI.Comm.is_inter mpi4py.MPI.Comm-class.html#is_inter mpi4py.MPI.Comm.__eq__ mpi4py.MPI.Comm-class.html#__eq__ mpi4py.MPI.Comm.Scatter mpi4py.MPI.Comm-class.html#Scatter mpi4py.MPI.Comm.info mpi4py.MPI.Comm-class.html#info mpi4py.MPI.Comm.Compare mpi4py.MPI.Comm-class.html#Compare mpi4py.MPI.Comm.Iprobe mpi4py.MPI.Comm-class.html#Iprobe mpi4py.MPI.Comm.allreduce mpi4py.MPI.Comm-class.html#allreduce mpi4py.MPI.Comm.Abort mpi4py.MPI.Comm-class.html#Abort mpi4py.MPI.Comm.Reduce_scatter_block mpi4py.MPI.Comm-class.html#Reduce_scatter_block mpi4py.MPI.Comm.Free_keyval mpi4py.MPI.Comm-class.html#Free_keyval mpi4py.MPI.Comm.Ssend mpi4py.MPI.Comm-class.html#Ssend mpi4py.MPI.Comm.scatter mpi4py.MPI.Comm-class.html#scatter mpi4py.MPI.Comm.__ge__ mpi4py.MPI.Comm-class.html#__ge__ mpi4py.MPI.Comm.Set_name mpi4py.MPI.Comm-class.html#Set_name mpi4py.MPI.Comm.Probe mpi4py.MPI.Comm-class.html#Probe mpi4py.MPI.Comm.Get_topology mpi4py.MPI.Comm-class.html#Get_topology mpi4py.MPI.Comm.Set_attr mpi4py.MPI.Comm-class.html#Set_attr mpi4py.MPI.Comm.Bsend_init mpi4py.MPI.Comm-class.html#Bsend_init mpi4py.MPI.Comm.Ireduce mpi4py.MPI.Comm-class.html#Ireduce mpi4py.MPI.Comm.Reduce_scatter mpi4py.MPI.Comm-class.html#Reduce_scatter mpi4py.MPI.Comm.is_topo mpi4py.MPI.Comm-class.html#is_topo mpi4py.MPI.Comm.Mprobe mpi4py.MPI.Comm-class.html#Mprobe mpi4py.MPI.Comm.Ibsend mpi4py.MPI.Comm-class.html#Ibsend mpi4py.MPI.Comm.bcast mpi4py.MPI.Comm-class.html#bcast mpi4py.MPI.Comm.Is_intra mpi4py.MPI.Comm-class.html#Is_intra mpi4py.MPI.Comm.__new__ mpi4py.MPI.Comm-class.html#__new__ mpi4py.MPI.Comm.Barrier mpi4py.MPI.Comm-class.html#Barrier mpi4py.MPI.Comm.Clone mpi4py.MPI.Comm-class.html#Clone mpi4py.MPI.Comm.irecv mpi4py.MPI.Comm-class.html#irecv mpi4py.MPI.Comm.Ireduce_scatter mpi4py.MPI.Comm-class.html#Ireduce_scatter mpi4py.MPI.Comm.Send_init mpi4py.MPI.Comm-class.html#Send_init mpi4py.MPI.Comm.Get_rank mpi4py.MPI.Comm-class.html#Get_rank mpi4py.MPI.Comm.Recv_init mpi4py.MPI.Comm-class.html#Recv_init mpi4py.MPI.Comm.Iscatterv mpi4py.MPI.Comm-class.html#Iscatterv mpi4py.MPI.Comm.improbe mpi4py.MPI.Comm-class.html#improbe mpi4py.MPI.Comm.Set_errhandler mpi4py.MPI.Comm-class.html#Set_errhandler mpi4py.MPI.Comm.Get_parent mpi4py.MPI.Comm-class.html#Get_parent mpi4py.MPI.Comm.gather mpi4py.MPI.Comm-class.html#gather mpi4py.MPI.Comm.Reduce mpi4py.MPI.Comm-class.html#Reduce mpi4py.MPI.Comm.Ialltoallv mpi4py.MPI.Comm-class.html#Ialltoallv mpi4py.MPI.Comm.Ialltoallw mpi4py.MPI.Comm-class.html#Ialltoallw mpi4py.MPI.Comm.is_intra mpi4py.MPI.Comm-class.html#is_intra mpi4py.MPI.Datatype mpi4py.MPI.Datatype-class.html mpi4py.MPI.Datatype.Create_struct mpi4py.MPI.Datatype-class.html#Create_struct mpi4py.MPI.Datatype.Set_name mpi4py.MPI.Datatype-class.html#Set_name mpi4py.MPI.Datatype.Pack_external_size mpi4py.MPI.Datatype-class.html#Pack_external_size mpi4py.MPI.Datatype.Set_attr mpi4py.MPI.Datatype-class.html#Set_attr mpi4py.MPI.Datatype.Create_vector mpi4py.MPI.Datatype-class.html#Create_vector mpi4py.MPI.Datatype.Create_indexed_block mpi4py.MPI.Datatype-class.html#Create_indexed_block mpi4py.MPI.Datatype.Create_darray mpi4py.MPI.Datatype-class.html#Create_darray mpi4py.MPI.Datatype.__gt__ mpi4py.MPI.Datatype-class.html#__gt__ mpi4py.MPI.Datatype.Get_name mpi4py.MPI.Datatype-class.html#Get_name mpi4py.MPI.Datatype.Unpack_external mpi4py.MPI.Datatype-class.html#Unpack_external mpi4py.MPI.Datatype.Create_keyval mpi4py.MPI.Datatype-class.html#Create_keyval mpi4py.MPI.Datatype.__nonzero__ mpi4py.MPI.Datatype-class.html#__nonzero__ mpi4py.MPI.Datatype.Free mpi4py.MPI.Datatype-class.html#Free mpi4py.MPI.Datatype.Create_hvector mpi4py.MPI.Datatype-class.html#Create_hvector mpi4py.MPI.Datatype.Commit mpi4py.MPI.Datatype-class.html#Commit mpi4py.MPI.Datatype.Dup mpi4py.MPI.Datatype-class.html#Dup mpi4py.MPI.Datatype.__lt__ mpi4py.MPI.Datatype-class.html#__lt__ mpi4py.MPI.Datatype.contents mpi4py.MPI.Datatype-class.html#contents mpi4py.MPI.Datatype.size mpi4py.MPI.Datatype-class.html#size mpi4py.MPI.Datatype.Create_contiguous mpi4py.MPI.Datatype-class.html#Create_contiguous mpi4py.MPI.Datatype.Create_hindexed_block mpi4py.MPI.Datatype-class.html#Create_hindexed_block mpi4py.MPI.Datatype.lb mpi4py.MPI.Datatype-class.html#lb mpi4py.MPI.Datatype.__new__ mpi4py.MPI.Datatype-class.html#__new__ mpi4py.MPI.Datatype.true_extent mpi4py.MPI.Datatype-class.html#true_extent mpi4py.MPI.Datatype.f2py mpi4py.MPI.Datatype-class.html#f2py mpi4py.MPI.Datatype.Delete_attr mpi4py.MPI.Datatype-class.html#Delete_attr mpi4py.MPI.Datatype.decode mpi4py.MPI.Datatype-class.html#decode mpi4py.MPI.Datatype.Pack_size mpi4py.MPI.Datatype-class.html#Pack_size mpi4py.MPI.Datatype.py2f mpi4py.MPI.Datatype-class.html#py2f mpi4py.MPI.Datatype.is_named mpi4py.MPI.Datatype-class.html#is_named mpi4py.MPI.Datatype.Unpack mpi4py.MPI.Datatype-class.html#Unpack mpi4py.MPI.Datatype.__ne__ mpi4py.MPI.Datatype-class.html#__ne__ mpi4py.MPI.Datatype.Resized mpi4py.MPI.Datatype-class.html#Resized mpi4py.MPI.Datatype.envelope mpi4py.MPI.Datatype-class.html#envelope mpi4py.MPI.Datatype.Get_extent mpi4py.MPI.Datatype-class.html#Get_extent mpi4py.MPI.Datatype.Get_size mpi4py.MPI.Datatype-class.html#Get_size mpi4py.MPI.Datatype.Get_contents mpi4py.MPI.Datatype-class.html#Get_contents mpi4py.MPI.Datatype.Create_f90_complex mpi4py.MPI.Datatype-class.html#Create_f90_complex mpi4py.MPI.Datatype.extent mpi4py.MPI.Datatype-class.html#extent mpi4py.MPI.Datatype.Create_resized mpi4py.MPI.Datatype-class.html#Create_resized mpi4py.MPI.Datatype.Create_dup mpi4py.MPI.Datatype-class.html#Create_dup mpi4py.MPI.Datatype.Get_attr mpi4py.MPI.Datatype-class.html#Get_attr mpi4py.MPI.Datatype.__eq__ mpi4py.MPI.Datatype-class.html#__eq__ mpi4py.MPI.Datatype.Get_true_extent mpi4py.MPI.Datatype-class.html#Get_true_extent mpi4py.MPI.Datatype.true_lb mpi4py.MPI.Datatype-class.html#true_lb mpi4py.MPI.Datatype.Pack mpi4py.MPI.Datatype-class.html#Pack mpi4py.MPI.Datatype.is_predefined mpi4py.MPI.Datatype-class.html#is_predefined mpi4py.MPI.Datatype.Create_f90_real mpi4py.MPI.Datatype-class.html#Create_f90_real mpi4py.MPI.Datatype.name mpi4py.MPI.Datatype-class.html#name mpi4py.MPI.Datatype.Create_hindexed mpi4py.MPI.Datatype-class.html#Create_hindexed mpi4py.MPI.Datatype.Get_envelope mpi4py.MPI.Datatype-class.html#Get_envelope mpi4py.MPI.Datatype.Create_indexed mpi4py.MPI.Datatype-class.html#Create_indexed mpi4py.MPI.Datatype.Create_f90_integer mpi4py.MPI.Datatype-class.html#Create_f90_integer mpi4py.MPI.Datatype.Create_subarray mpi4py.MPI.Datatype-class.html#Create_subarray mpi4py.MPI.Datatype.__le__ mpi4py.MPI.Datatype-class.html#__le__ mpi4py.MPI.Datatype.true_ub mpi4py.MPI.Datatype-class.html#true_ub mpi4py.MPI.Datatype.Pack_external mpi4py.MPI.Datatype-class.html#Pack_external mpi4py.MPI.Datatype.Free_keyval mpi4py.MPI.Datatype-class.html#Free_keyval mpi4py.MPI.Datatype.Match_size mpi4py.MPI.Datatype-class.html#Match_size mpi4py.MPI.Datatype.combiner mpi4py.MPI.Datatype-class.html#combiner mpi4py.MPI.Datatype.__ge__ mpi4py.MPI.Datatype-class.html#__ge__ mpi4py.MPI.Datatype.ub mpi4py.MPI.Datatype-class.html#ub mpi4py.MPI.Distgraphcomm mpi4py.MPI.Distgraphcomm-class.html mpi4py.MPI.Comm.iprobe mpi4py.MPI.Comm-class.html#iprobe mpi4py.MPI.Comm.Isend mpi4py.MPI.Comm-class.html#Isend mpi4py.MPI.Comm.probe mpi4py.MPI.Comm-class.html#probe mpi4py.MPI.Topocomm.Ineighbor_alltoall mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoall mpi4py.MPI.Topocomm.Neighbor_allgather mpi4py.MPI.Topocomm-class.html#Neighbor_allgather mpi4py.MPI.Intracomm.Iexscan mpi4py.MPI.Intracomm-class.html#Iexscan mpi4py.MPI.Comm.Rsend_init mpi4py.MPI.Comm-class.html#Rsend_init mpi4py.MPI.Comm.Allgather mpi4py.MPI.Comm-class.html#Allgather mpi4py.MPI.Comm.__lt__ mpi4py.MPI.Comm-class.html#__lt__ mpi4py.MPI.Comm.group mpi4py.MPI.Comm-class.html#group mpi4py.MPI.Comm.send mpi4py.MPI.Comm-class.html#send mpi4py.MPI.Comm.Get_info mpi4py.MPI.Comm-class.html#Get_info mpi4py.MPI.Topocomm.degrees mpi4py.MPI.Topocomm-class.html#degrees mpi4py.MPI.Comm.Call_errhandler mpi4py.MPI.Comm-class.html#Call_errhandler mpi4py.MPI.Comm.allgather mpi4py.MPI.Comm-class.html#allgather mpi4py.MPI.Comm.Ibcast mpi4py.MPI.Comm-class.html#Ibcast mpi4py.MPI.Comm.Recv mpi4py.MPI.Comm-class.html#Recv mpi4py.MPI.Comm.Sendrecv mpi4py.MPI.Comm-class.html#Sendrecv mpi4py.MPI.Comm.info mpi4py.MPI.Comm-class.html#info mpi4py.MPI.Comm.Gather mpi4py.MPI.Comm-class.html#Gather mpi4py.MPI.Comm.Allgatherv mpi4py.MPI.Comm-class.html#Allgatherv mpi4py.MPI.Comm.Igather mpi4py.MPI.Comm-class.html#Igather mpi4py.MPI.Comm.rank mpi4py.MPI.Comm-class.html#rank mpi4py.MPI.Comm.Gatherv mpi4py.MPI.Comm-class.html#Gatherv mpi4py.MPI.Comm.__gt__ mpi4py.MPI.Comm-class.html#__gt__ mpi4py.MPI.Comm.__nonzero__ mpi4py.MPI.Comm-class.html#__nonzero__ mpi4py.MPI.Comm.Ibsend mpi4py.MPI.Comm-class.html#Ibsend mpi4py.MPI.Comm.Create_group mpi4py.MPI.Comm-class.html#Create_group mpi4py.MPI.Comm.name mpi4py.MPI.Comm-class.html#name mpi4py.MPI.Comm.Iallgather mpi4py.MPI.Comm-class.html#Iallgather mpi4py.MPI.Comm.Bcast mpi4py.MPI.Comm-class.html#Bcast mpi4py.MPI.Comm.Disconnect mpi4py.MPI.Comm-class.html#Disconnect mpi4py.MPI.Comm.Create mpi4py.MPI.Comm-class.html#Create mpi4py.MPI.Comm.reduce mpi4py.MPI.Comm-class.html#reduce mpi4py.MPI.Comm.Send mpi4py.MPI.Comm-class.html#Send mpi4py.MPI.Comm.Create_keyval mpi4py.MPI.Comm-class.html#Create_keyval mpi4py.MPI.Comm.Split mpi4py.MPI.Comm-class.html#Split mpi4py.MPI.Comm.Set_info mpi4py.MPI.Comm-class.html#Set_info mpi4py.MPI.Comm.Irecv mpi4py.MPI.Comm-class.html#Irecv mpi4py.MPI.Comm.ssend mpi4py.MPI.Comm-class.html#ssend mpi4py.MPI.Comm.issend mpi4py.MPI.Comm-class.html#issend mpi4py.MPI.Comm.Igatherv mpi4py.MPI.Comm-class.html#Igatherv mpi4py.MPI.Topocomm.Neighbor_allgatherv mpi4py.MPI.Topocomm-class.html#Neighbor_allgatherv mpi4py.MPI.Comm.f2py mpi4py.MPI.Comm-class.html#f2py mpi4py.MPI.Comm.Delete_attr mpi4py.MPI.Comm-class.html#Delete_attr mpi4py.MPI.Topocomm.Neighbor_alltoall mpi4py.MPI.Topocomm-class.html#Neighbor_alltoall mpi4py.MPI.Comm.Abort mpi4py.MPI.Comm-class.html#Abort mpi4py.MPI.Comm.Get_rank mpi4py.MPI.Comm-class.html#Get_rank mpi4py.MPI.Comm.py2f mpi4py.MPI.Comm-class.html#py2f mpi4py.MPI.Distgraphcomm.Get_dist_neighbors mpi4py.MPI.Distgraphcomm-class.html#Get_dist_neighbors mpi4py.MPI.Comm.__ne__ mpi4py.MPI.Comm-class.html#__ne__ mpi4py.MPI.Comm.Improbe mpi4py.MPI.Comm-class.html#Improbe mpi4py.MPI.Comm.Join mpi4py.MPI.Comm-class.html#Join mpi4py.MPI.Comm.barrier mpi4py.MPI.Comm-class.html#barrier mpi4py.MPI.Intracomm.Create_graph mpi4py.MPI.Intracomm-class.html#Create_graph mpi4py.MPI.Comm.Get_size mpi4py.MPI.Comm-class.html#Get_size mpi4py.MPI.Comm.Rsend mpi4py.MPI.Comm-class.html#Rsend mpi4py.MPI.Intracomm.Spawn_multiple mpi4py.MPI.Intracomm-class.html#Spawn_multiple mpi4py.MPI.Intracomm.Create_intercomm mpi4py.MPI.Intracomm-class.html#Create_intercomm mpi4py.MPI.Comm.alltoall mpi4py.MPI.Comm-class.html#alltoall mpi4py.MPI.Intracomm.Create_cart mpi4py.MPI.Intracomm-class.html#Create_cart mpi4py.MPI.Comm.recv mpi4py.MPI.Comm-class.html#recv mpi4py.MPI.Comm.sendrecv mpi4py.MPI.Comm-class.html#sendrecv mpi4py.MPI.Comm.topology mpi4py.MPI.Comm-class.html#topology mpi4py.MPI.Comm.Ssend_init mpi4py.MPI.Comm-class.html#Ssend_init mpi4py.MPI.Intracomm.Graph_map mpi4py.MPI.Intracomm-class.html#Graph_map mpi4py.MPI.Intracomm.Scan mpi4py.MPI.Intracomm-class.html#Scan mpi4py.MPI.Comm.scatter mpi4py.MPI.Comm-class.html#scatter mpi4py.MPI.Comm.Scatterv mpi4py.MPI.Comm-class.html#Scatterv mpi4py.MPI.Comm.Ibarrier mpi4py.MPI.Comm-class.html#Ibarrier mpi4py.MPI.Intracomm.Iscan mpi4py.MPI.Intracomm-class.html#Iscan mpi4py.MPI.Comm.Split_type mpi4py.MPI.Comm-class.html#Split_type mpi4py.MPI.Topocomm.inoutedges mpi4py.MPI.Topocomm-class.html#inoutedges mpi4py.MPI.Comm.Alltoallv mpi4py.MPI.Comm-class.html#Alltoallv mpi4py.MPI.Comm.Alltoallw mpi4py.MPI.Comm-class.html#Alltoallw mpi4py.MPI.Comm.Issend mpi4py.MPI.Comm-class.html#Issend mpi4py.MPI.Comm.Ialltoall mpi4py.MPI.Comm-class.html#Ialltoall mpi4py.MPI.Comm.Get_name mpi4py.MPI.Comm-class.html#Get_name mpi4py.MPI.Topocomm.neighbor_alltoall mpi4py.MPI.Topocomm-class.html#neighbor_alltoall mpi4py.MPI.Topocomm.outedges mpi4py.MPI.Topocomm-class.html#outedges mpi4py.MPI.Comm.Get_parent mpi4py.MPI.Comm-class.html#Get_parent mpi4py.MPI.Comm.Free mpi4py.MPI.Comm-class.html#Free mpi4py.MPI.Comm.Dup mpi4py.MPI.Comm-class.html#Dup mpi4py.MPI.Comm.Sendrecv_replace mpi4py.MPI.Comm-class.html#Sendrecv_replace mpi4py.MPI.Comm.Get_attr mpi4py.MPI.Comm-class.html#Get_attr mpi4py.MPI.Comm.size mpi4py.MPI.Comm-class.html#size mpi4py.MPI.Comm.Bsend mpi4py.MPI.Comm-class.html#Bsend mpi4py.MPI.Comm.Irsend mpi4py.MPI.Comm-class.html#Irsend mpi4py.MPI.Comm.isend mpi4py.MPI.Comm-class.html#isend mpi4py.MPI.Comm.Bsend_init mpi4py.MPI.Comm-class.html#Bsend_init mpi4py.MPI.Comm.Idup mpi4py.MPI.Comm-class.html#Idup mpi4py.MPI.Topocomm.outdegree mpi4py.MPI.Topocomm-class.html#outdegree mpi4py.MPI.Intracomm.Create_dist_graph_adjacent mpi4py.MPI.Intracomm-class.html#Create_dist_graph_adjacent mpi4py.MPI.Comm.Alltoall mpi4py.MPI.Comm-class.html#Alltoall mpi4py.MPI.Comm.ibsend mpi4py.MPI.Comm-class.html#ibsend mpi4py.MPI.Comm.bsend mpi4py.MPI.Comm-class.html#bsend mpi4py.MPI.Topocomm.Ineighbor_allgather mpi4py.MPI.Topocomm-class.html#Ineighbor_allgather mpi4py.MPI.Comm.Iallreduce mpi4py.MPI.Comm-class.html#Iallreduce mpi4py.MPI.Comm.Ireduce_scatter_block mpi4py.MPI.Comm-class.html#Ireduce_scatter_block mpi4py.MPI.Comm.Iallgatherv mpi4py.MPI.Comm-class.html#Iallgatherv mpi4py.MPI.Comm.mprobe mpi4py.MPI.Comm-class.html#mprobe mpi4py.MPI.Comm.Allreduce mpi4py.MPI.Comm-class.html#Allreduce mpi4py.MPI.Distgraphcomm.Get_dist_neighbors_count mpi4py.MPI.Distgraphcomm-class.html#Get_dist_neighbors_count mpi4py.MPI.Comm.Dup_with_info mpi4py.MPI.Comm-class.html#Dup_with_info mpi4py.MPI.Comm.Get_errhandler mpi4py.MPI.Comm-class.html#Get_errhandler mpi4py.MPI.Comm.is_inter mpi4py.MPI.Comm-class.html#is_inter mpi4py.MPI.Comm.__eq__ mpi4py.MPI.Comm-class.html#__eq__ mpi4py.MPI.Comm.Scatter mpi4py.MPI.Comm-class.html#Scatter mpi4py.MPI.Intracomm.Spawn mpi4py.MPI.Intracomm-class.html#Spawn mpi4py.MPI.Comm.Compare mpi4py.MPI.Comm-class.html#Compare mpi4py.MPI.Comm.Iprobe mpi4py.MPI.Comm-class.html#Iprobe mpi4py.MPI.Comm.allreduce mpi4py.MPI.Comm-class.html#allreduce mpi4py.MPI.Comm.__le__ mpi4py.MPI.Comm-class.html#__le__ mpi4py.MPI.Intracomm.Connect mpi4py.MPI.Intracomm-class.html#Connect mpi4py.MPI.Comm.Reduce_scatter_block mpi4py.MPI.Comm-class.html#Reduce_scatter_block mpi4py.MPI.Comm.Free_keyval mpi4py.MPI.Comm-class.html#Free_keyval mpi4py.MPI.Comm.Ssend mpi4py.MPI.Comm-class.html#Ssend mpi4py.MPI.Comm.Iscatter mpi4py.MPI.Comm-class.html#Iscatter mpi4py.MPI.Comm.__ge__ mpi4py.MPI.Comm-class.html#__ge__ mpi4py.MPI.Comm.Set_name mpi4py.MPI.Comm-class.html#Set_name mpi4py.MPI.Comm.gather mpi4py.MPI.Comm-class.html#gather mpi4py.MPI.Comm.Get_topology mpi4py.MPI.Comm-class.html#Get_topology mpi4py.MPI.Comm.Set_attr mpi4py.MPI.Comm-class.html#Set_attr mpi4py.MPI.Intracomm.scan mpi4py.MPI.Intracomm-class.html#scan mpi4py.MPI.Comm.Ireduce mpi4py.MPI.Comm-class.html#Ireduce mpi4py.MPI.Intracomm.exscan mpi4py.MPI.Intracomm-class.html#exscan mpi4py.MPI.Comm.Reduce_scatter mpi4py.MPI.Comm-class.html#Reduce_scatter mpi4py.MPI.Comm.is_topo mpi4py.MPI.Comm-class.html#is_topo mpi4py.MPI.Intracomm.Accept mpi4py.MPI.Intracomm-class.html#Accept mpi4py.MPI.Comm.Mprobe mpi4py.MPI.Comm-class.html#Mprobe mpi4py.MPI.Intracomm.Cart_map mpi4py.MPI.Intracomm-class.html#Cart_map mpi4py.MPI.Comm.bcast mpi4py.MPI.Comm-class.html#bcast mpi4py.MPI.Comm.Is_intra mpi4py.MPI.Comm-class.html#Is_intra mpi4py.MPI.Distgraphcomm.__new__ mpi4py.MPI.Distgraphcomm-class.html#__new__ mpi4py.MPI.Comm.Barrier mpi4py.MPI.Comm-class.html#Barrier mpi4py.MPI.Comm.Clone mpi4py.MPI.Comm-class.html#Clone mpi4py.MPI.Topocomm.Ineighbor_alltoallw mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoallw mpi4py.MPI.Comm.Iscatterv mpi4py.MPI.Comm-class.html#Iscatterv mpi4py.MPI.Comm.irecv mpi4py.MPI.Comm-class.html#irecv mpi4py.MPI.Topocomm.inedges mpi4py.MPI.Topocomm-class.html#inedges mpi4py.MPI.Comm.Ireduce_scatter mpi4py.MPI.Comm-class.html#Ireduce_scatter mpi4py.MPI.Comm.Send_init mpi4py.MPI.Comm-class.html#Send_init mpi4py.MPI.Comm.Get_group mpi4py.MPI.Comm-class.html#Get_group mpi4py.MPI.Comm.Recv_init mpi4py.MPI.Comm-class.html#Recv_init mpi4py.MPI.Topocomm.Neighbor_alltoallv mpi4py.MPI.Topocomm-class.html#Neighbor_alltoallv mpi4py.MPI.Topocomm.Neighbor_alltoallw mpi4py.MPI.Topocomm-class.html#Neighbor_alltoallw mpi4py.MPI.Topocomm.Ineighbor_allgatherv mpi4py.MPI.Topocomm-class.html#Ineighbor_allgatherv mpi4py.MPI.Comm.improbe mpi4py.MPI.Comm-class.html#improbe mpi4py.MPI.Comm.Set_errhandler mpi4py.MPI.Comm-class.html#Set_errhandler mpi4py.MPI.Topocomm.indegree mpi4py.MPI.Topocomm-class.html#indegree mpi4py.MPI.Comm.Probe mpi4py.MPI.Comm-class.html#Probe mpi4py.MPI.Comm.Reduce mpi4py.MPI.Comm-class.html#Reduce mpi4py.MPI.Intracomm.Exscan mpi4py.MPI.Intracomm-class.html#Exscan mpi4py.MPI.Topocomm.neighbor_allgather mpi4py.MPI.Topocomm-class.html#neighbor_allgather mpi4py.MPI.Topocomm.Ineighbor_alltoallv mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoallv mpi4py.MPI.Intracomm.Create_dist_graph mpi4py.MPI.Intracomm-class.html#Create_dist_graph mpi4py.MPI.Comm.Ialltoallv mpi4py.MPI.Comm-class.html#Ialltoallv mpi4py.MPI.Comm.Is_inter mpi4py.MPI.Comm-class.html#Is_inter mpi4py.MPI.Comm.is_intra mpi4py.MPI.Comm-class.html#is_intra mpi4py.MPI.Comm.Ialltoallw mpi4py.MPI.Comm-class.html#Ialltoallw mpi4py.MPI.Errhandler mpi4py.MPI.Errhandler-class.html mpi4py.MPI.Errhandler.__ne__ mpi4py.MPI.Errhandler-class.html#__ne__ mpi4py.MPI.Errhandler.__nonzero__ mpi4py.MPI.Errhandler-class.html#__nonzero__ mpi4py.MPI.Errhandler.__new__ mpi4py.MPI.Errhandler-class.html#__new__ mpi4py.MPI.Errhandler.f2py mpi4py.MPI.Errhandler-class.html#f2py mpi4py.MPI.Errhandler.Free mpi4py.MPI.Errhandler-class.html#Free mpi4py.MPI.Errhandler.__le__ mpi4py.MPI.Errhandler-class.html#__le__ mpi4py.MPI.Errhandler.__gt__ mpi4py.MPI.Errhandler-class.html#__gt__ mpi4py.MPI.Errhandler.py2f mpi4py.MPI.Errhandler-class.html#py2f mpi4py.MPI.Errhandler.__lt__ mpi4py.MPI.Errhandler-class.html#__lt__ mpi4py.MPI.Errhandler.__eq__ mpi4py.MPI.Errhandler-class.html#__eq__ mpi4py.MPI.Errhandler.__ge__ mpi4py.MPI.Errhandler-class.html#__ge__ mpi4py.MPI.Exception mpi4py.MPI.Exception-class.html mpi4py.MPI.Exception.__int__ mpi4py.MPI.Exception-class.html#__int__ mpi4py.MPI.Exception.Get_error_code mpi4py.MPI.Exception-class.html#Get_error_code mpi4py.MPI.Exception.__str__ mpi4py.MPI.Exception-class.html#__str__ mpi4py.MPI.Exception.Get_error_string mpi4py.MPI.Exception-class.html#Get_error_string mpi4py.MPI.Exception.__lt__ mpi4py.MPI.Exception-class.html#__lt__ mpi4py.MPI.Exception.__init__ mpi4py.MPI.Exception-class.html#__init__ mpi4py.MPI.Exception.__ne__ mpi4py.MPI.Exception-class.html#__ne__ mpi4py.MPI.Exception.__gt__ mpi4py.MPI.Exception-class.html#__gt__ mpi4py.MPI.Exception.__bool__ mpi4py.MPI.Exception-class.html#__bool__ mpi4py.MPI.Exception.error_class mpi4py.MPI.Exception-class.html#error_class mpi4py.MPI.Exception.__eq__ mpi4py.MPI.Exception-class.html#__eq__ mpi4py.MPI.Exception.Get_error_class mpi4py.MPI.Exception-class.html#Get_error_class mpi4py.MPI.Exception.__nonzero__ mpi4py.MPI.Exception-class.html#__nonzero__ mpi4py.MPI.Exception.error_string mpi4py.MPI.Exception-class.html#error_string mpi4py.MPI.Exception.__qualname__ mpi4py.MPI.Exception-class.html#__qualname__ mpi4py.MPI.Exception.__le__ mpi4py.MPI.Exception-class.html#__le__ mpi4py.MPI.Exception.__repr__ mpi4py.MPI.Exception-class.html#__repr__ mpi4py.MPI.Exception.__hash__ mpi4py.MPI.Exception-class.html#__hash__ mpi4py.MPI.Exception.error_code mpi4py.MPI.Exception-class.html#error_code mpi4py.MPI.Exception.__ge__ mpi4py.MPI.Exception-class.html#__ge__ mpi4py.MPI.File mpi4py.MPI.File-class.html mpi4py.MPI.File.Iread_at mpi4py.MPI.File-class.html#Iread_at mpi4py.MPI.File.Read_all_end mpi4py.MPI.File-class.html#Read_all_end mpi4py.MPI.File.Iwrite_shared mpi4py.MPI.File-class.html#Iwrite_shared mpi4py.MPI.File.Write_ordered_end mpi4py.MPI.File-class.html#Write_ordered_end mpi4py.MPI.File.Read_all_begin mpi4py.MPI.File-class.html#Read_all_begin mpi4py.MPI.File.Set_view mpi4py.MPI.File-class.html#Set_view mpi4py.MPI.File.Iwrite_at mpi4py.MPI.File-class.html#Iwrite_at mpi4py.MPI.File.group mpi4py.MPI.File-class.html#group mpi4py.MPI.File.Write mpi4py.MPI.File-class.html#Write mpi4py.MPI.File.Get_errhandler mpi4py.MPI.File-class.html#Get_errhandler mpi4py.MPI.File.Set_info mpi4py.MPI.File-class.html#Set_info mpi4py.MPI.File.Iread mpi4py.MPI.File-class.html#Iread mpi4py.MPI.File.__lt__ mpi4py.MPI.File-class.html#__lt__ mpi4py.MPI.File.Read_ordered_end mpi4py.MPI.File-class.html#Read_ordered_end mpi4py.MPI.File.Get_byte_offset mpi4py.MPI.File-class.html#Get_byte_offset mpi4py.MPI.File.size mpi4py.MPI.File-class.html#size mpi4py.MPI.File.Get_amode mpi4py.MPI.File-class.html#Get_amode mpi4py.MPI.File.Get_view mpi4py.MPI.File-class.html#Get_view mpi4py.MPI.File.__new__ mpi4py.MPI.File-class.html#__new__ mpi4py.MPI.File.Write_at_all_end mpi4py.MPI.File-class.html#Write_at_all_end mpi4py.MPI.File.Iread_all mpi4py.MPI.File-class.html#Iread_all mpi4py.MPI.File.__eq__ mpi4py.MPI.File-class.html#__eq__ mpi4py.MPI.File.Read_ordered_begin mpi4py.MPI.File-class.html#Read_ordered_begin mpi4py.MPI.File.Preallocate mpi4py.MPI.File-class.html#Preallocate mpi4py.MPI.File.Iwrite_at_all mpi4py.MPI.File-class.html#Iwrite_at_all mpi4py.MPI.File.f2py mpi4py.MPI.File-class.html#f2py mpi4py.MPI.File.Write_ordered mpi4py.MPI.File-class.html#Write_ordered mpi4py.MPI.File.Read_at_all_begin mpi4py.MPI.File-class.html#Read_at_all_begin mpi4py.MPI.File.Set_size mpi4py.MPI.File-class.html#Set_size mpi4py.MPI.File.Get_group mpi4py.MPI.File-class.html#Get_group mpi4py.MPI.File.py2f mpi4py.MPI.File-class.html#py2f mpi4py.MPI.File.Write_all mpi4py.MPI.File-class.html#Write_all mpi4py.MPI.File.atomicity mpi4py.MPI.File-class.html#atomicity mpi4py.MPI.File.Get_type_extent mpi4py.MPI.File-class.html#Get_type_extent mpi4py.MPI.File.Write_at mpi4py.MPI.File-class.html#Write_at mpi4py.MPI.File.__ne__ mpi4py.MPI.File-class.html#__ne__ mpi4py.MPI.File.Open mpi4py.MPI.File-class.html#Open mpi4py.MPI.File.amode mpi4py.MPI.File-class.html#amode mpi4py.MPI.File.Read_at mpi4py.MPI.File-class.html#Read_at mpi4py.MPI.File.Get_info mpi4py.MPI.File-class.html#Get_info mpi4py.MPI.File.Call_errhandler mpi4py.MPI.File-class.html#Call_errhandler mpi4py.MPI.File.Get_position_shared mpi4py.MPI.File-class.html#Get_position_shared mpi4py.MPI.File.Iread_at_all mpi4py.MPI.File-class.html#Iread_at_all mpi4py.MPI.File.Get_size mpi4py.MPI.File-class.html#Get_size mpi4py.MPI.File.Write_shared mpi4py.MPI.File-class.html#Write_shared mpi4py.MPI.File.Seek_shared mpi4py.MPI.File-class.html#Seek_shared mpi4py.MPI.File.Read_at_all_end mpi4py.MPI.File-class.html#Read_at_all_end mpi4py.MPI.File.Read_ordered mpi4py.MPI.File-class.html#Read_ordered mpi4py.MPI.File.Write_at_all mpi4py.MPI.File-class.html#Write_at_all mpi4py.MPI.File.Iwrite mpi4py.MPI.File-class.html#Iwrite mpi4py.MPI.File.Delete mpi4py.MPI.File-class.html#Delete mpi4py.MPI.File.info mpi4py.MPI.File-class.html#info mpi4py.MPI.File.Read_all mpi4py.MPI.File-class.html#Read_all mpi4py.MPI.File.Read_shared mpi4py.MPI.File-class.html#Read_shared mpi4py.MPI.File.Set_atomicity mpi4py.MPI.File-class.html#Set_atomicity mpi4py.MPI.File.__nonzero__ mpi4py.MPI.File-class.html#__nonzero__ mpi4py.MPI.File.Get_position mpi4py.MPI.File-class.html#Get_position mpi4py.MPI.File.Set_errhandler mpi4py.MPI.File-class.html#Set_errhandler mpi4py.MPI.File.Seek mpi4py.MPI.File-class.html#Seek mpi4py.MPI.File.__gt__ mpi4py.MPI.File-class.html#__gt__ mpi4py.MPI.File.Read_at_all mpi4py.MPI.File-class.html#Read_at_all mpi4py.MPI.File.__le__ mpi4py.MPI.File-class.html#__le__ mpi4py.MPI.File.Sync mpi4py.MPI.File-class.html#Sync mpi4py.MPI.File.Write_ordered_begin mpi4py.MPI.File-class.html#Write_ordered_begin mpi4py.MPI.File.Read mpi4py.MPI.File-class.html#Read mpi4py.MPI.File.Iread_shared mpi4py.MPI.File-class.html#Iread_shared mpi4py.MPI.File.__ge__ mpi4py.MPI.File-class.html#__ge__ mpi4py.MPI.File.Iwrite_all mpi4py.MPI.File-class.html#Iwrite_all mpi4py.MPI.File.Close mpi4py.MPI.File-class.html#Close mpi4py.MPI.File.Write_at_all_begin mpi4py.MPI.File-class.html#Write_at_all_begin mpi4py.MPI.File.Write_all_begin mpi4py.MPI.File-class.html#Write_all_begin mpi4py.MPI.File.Write_all_end mpi4py.MPI.File-class.html#Write_all_end mpi4py.MPI.File.Get_atomicity mpi4py.MPI.File-class.html#Get_atomicity mpi4py.MPI.Graphcomm mpi4py.MPI.Graphcomm-class.html mpi4py.MPI.Graphcomm.neighbors mpi4py.MPI.Graphcomm-class.html#neighbors mpi4py.MPI.Comm.iprobe mpi4py.MPI.Comm-class.html#iprobe mpi4py.MPI.Comm.Isend mpi4py.MPI.Comm-class.html#Isend mpi4py.MPI.Comm.probe mpi4py.MPI.Comm-class.html#probe mpi4py.MPI.Topocomm.Ineighbor_alltoall mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoall mpi4py.MPI.Topocomm.Neighbor_allgather mpi4py.MPI.Topocomm-class.html#Neighbor_allgather mpi4py.MPI.Graphcomm.nnodes mpi4py.MPI.Graphcomm-class.html#nnodes mpi4py.MPI.Intracomm.Iexscan mpi4py.MPI.Intracomm-class.html#Iexscan mpi4py.MPI.Comm.Rsend_init mpi4py.MPI.Comm-class.html#Rsend_init mpi4py.MPI.Comm.Allgather mpi4py.MPI.Comm-class.html#Allgather mpi4py.MPI.Comm.__lt__ mpi4py.MPI.Comm-class.html#__lt__ mpi4py.MPI.Comm.group mpi4py.MPI.Comm-class.html#group mpi4py.MPI.Comm.send mpi4py.MPI.Comm-class.html#send mpi4py.MPI.Comm.Get_info mpi4py.MPI.Comm-class.html#Get_info mpi4py.MPI.Topocomm.degrees mpi4py.MPI.Topocomm-class.html#degrees mpi4py.MPI.Comm.Call_errhandler mpi4py.MPI.Comm-class.html#Call_errhandler mpi4py.MPI.Comm.allgather mpi4py.MPI.Comm-class.html#allgather mpi4py.MPI.Comm.Ibcast mpi4py.MPI.Comm-class.html#Ibcast mpi4py.MPI.Comm.Recv mpi4py.MPI.Comm-class.html#Recv mpi4py.MPI.Comm.Sendrecv mpi4py.MPI.Comm-class.html#Sendrecv mpi4py.MPI.Comm.info mpi4py.MPI.Comm-class.html#info mpi4py.MPI.Comm.Gather mpi4py.MPI.Comm-class.html#Gather mpi4py.MPI.Comm.Allgatherv mpi4py.MPI.Comm-class.html#Allgatherv mpi4py.MPI.Comm.Igather mpi4py.MPI.Comm-class.html#Igather mpi4py.MPI.Comm.rank mpi4py.MPI.Comm-class.html#rank mpi4py.MPI.Comm.Gatherv mpi4py.MPI.Comm-class.html#Gatherv mpi4py.MPI.Comm.__gt__ mpi4py.MPI.Comm-class.html#__gt__ mpi4py.MPI.Comm.__nonzero__ mpi4py.MPI.Comm-class.html#__nonzero__ mpi4py.MPI.Comm.Ibsend mpi4py.MPI.Comm-class.html#Ibsend mpi4py.MPI.Graphcomm.Get_neighbors mpi4py.MPI.Graphcomm-class.html#Get_neighbors mpi4py.MPI.Comm.Create_group mpi4py.MPI.Comm-class.html#Create_group mpi4py.MPI.Comm.name mpi4py.MPI.Comm-class.html#name mpi4py.MPI.Comm.Iallgather mpi4py.MPI.Comm-class.html#Iallgather mpi4py.MPI.Comm.Bcast mpi4py.MPI.Comm-class.html#Bcast mpi4py.MPI.Graphcomm.Get_neighbors_count mpi4py.MPI.Graphcomm-class.html#Get_neighbors_count mpi4py.MPI.Comm.Disconnect mpi4py.MPI.Comm-class.html#Disconnect mpi4py.MPI.Comm.Create mpi4py.MPI.Comm-class.html#Create mpi4py.MPI.Comm.reduce mpi4py.MPI.Comm-class.html#reduce mpi4py.MPI.Comm.Send mpi4py.MPI.Comm-class.html#Send mpi4py.MPI.Comm.Create_keyval mpi4py.MPI.Comm-class.html#Create_keyval mpi4py.MPI.Comm.Split mpi4py.MPI.Comm-class.html#Split mpi4py.MPI.Comm.Set_info mpi4py.MPI.Comm-class.html#Set_info mpi4py.MPI.Comm.Irecv mpi4py.MPI.Comm-class.html#Irecv mpi4py.MPI.Comm.ssend mpi4py.MPI.Comm-class.html#ssend mpi4py.MPI.Graphcomm.index mpi4py.MPI.Graphcomm-class.html#index mpi4py.MPI.Comm.issend mpi4py.MPI.Comm-class.html#issend mpi4py.MPI.Comm.Igatherv mpi4py.MPI.Comm-class.html#Igatherv mpi4py.MPI.Topocomm.Neighbor_allgatherv mpi4py.MPI.Topocomm-class.html#Neighbor_allgatherv mpi4py.MPI.Comm.f2py mpi4py.MPI.Comm-class.html#f2py mpi4py.MPI.Comm.Delete_attr mpi4py.MPI.Comm-class.html#Delete_attr mpi4py.MPI.Topocomm.Neighbor_alltoall mpi4py.MPI.Topocomm-class.html#Neighbor_alltoall mpi4py.MPI.Comm.Abort mpi4py.MPI.Comm-class.html#Abort mpi4py.MPI.Comm.Get_rank mpi4py.MPI.Comm-class.html#Get_rank mpi4py.MPI.Comm.py2f mpi4py.MPI.Comm-class.html#py2f mpi4py.MPI.Comm.__ne__ mpi4py.MPI.Comm-class.html#__ne__ mpi4py.MPI.Comm.Improbe mpi4py.MPI.Comm-class.html#Improbe mpi4py.MPI.Comm.Join mpi4py.MPI.Comm-class.html#Join mpi4py.MPI.Comm.barrier mpi4py.MPI.Comm-class.html#barrier mpi4py.MPI.Intracomm.Create_graph mpi4py.MPI.Intracomm-class.html#Create_graph mpi4py.MPI.Comm.Get_size mpi4py.MPI.Comm-class.html#Get_size mpi4py.MPI.Comm.Rsend mpi4py.MPI.Comm-class.html#Rsend mpi4py.MPI.Intracomm.Spawn_multiple mpi4py.MPI.Intracomm-class.html#Spawn_multiple mpi4py.MPI.Intracomm.Create_intercomm mpi4py.MPI.Intracomm-class.html#Create_intercomm mpi4py.MPI.Comm.alltoall mpi4py.MPI.Comm-class.html#alltoall mpi4py.MPI.Intracomm.Create_cart mpi4py.MPI.Intracomm-class.html#Create_cart mpi4py.MPI.Comm.recv mpi4py.MPI.Comm-class.html#recv mpi4py.MPI.Comm.sendrecv mpi4py.MPI.Comm-class.html#sendrecv mpi4py.MPI.Comm.topology mpi4py.MPI.Comm-class.html#topology mpi4py.MPI.Comm.Ssend_init mpi4py.MPI.Comm-class.html#Ssend_init mpi4py.MPI.Intracomm.Graph_map mpi4py.MPI.Intracomm-class.html#Graph_map mpi4py.MPI.Intracomm.Scan mpi4py.MPI.Intracomm-class.html#Scan mpi4py.MPI.Comm.scatter mpi4py.MPI.Comm-class.html#scatter mpi4py.MPI.Comm.Scatterv mpi4py.MPI.Comm-class.html#Scatterv mpi4py.MPI.Comm.Ibarrier mpi4py.MPI.Comm-class.html#Ibarrier mpi4py.MPI.Comm.Irsend mpi4py.MPI.Comm-class.html#Irsend mpi4py.MPI.Intracomm.Iscan mpi4py.MPI.Intracomm-class.html#Iscan mpi4py.MPI.Comm.Split_type mpi4py.MPI.Comm-class.html#Split_type mpi4py.MPI.Graphcomm.Get_topo mpi4py.MPI.Graphcomm-class.html#Get_topo mpi4py.MPI.Topocomm.inoutedges mpi4py.MPI.Topocomm-class.html#inoutedges mpi4py.MPI.Comm.Alltoallv mpi4py.MPI.Comm-class.html#Alltoallv mpi4py.MPI.Comm.Alltoallw mpi4py.MPI.Comm-class.html#Alltoallw mpi4py.MPI.Comm.Issend mpi4py.MPI.Comm-class.html#Issend mpi4py.MPI.Comm.Ialltoall mpi4py.MPI.Comm-class.html#Ialltoall mpi4py.MPI.Comm.Get_name mpi4py.MPI.Comm-class.html#Get_name mpi4py.MPI.Topocomm.neighbor_alltoall mpi4py.MPI.Topocomm-class.html#neighbor_alltoall mpi4py.MPI.Topocomm.outedges mpi4py.MPI.Topocomm-class.html#outedges mpi4py.MPI.Comm.Get_parent mpi4py.MPI.Comm-class.html#Get_parent mpi4py.MPI.Comm.Free mpi4py.MPI.Comm-class.html#Free mpi4py.MPI.Comm.Dup mpi4py.MPI.Comm-class.html#Dup mpi4py.MPI.Comm.Sendrecv_replace mpi4py.MPI.Comm-class.html#Sendrecv_replace mpi4py.MPI.Comm.Get_attr mpi4py.MPI.Comm-class.html#Get_attr mpi4py.MPI.Graphcomm.Get_dims mpi4py.MPI.Graphcomm-class.html#Get_dims mpi4py.MPI.Comm.size mpi4py.MPI.Comm-class.html#size mpi4py.MPI.Comm.Bsend mpi4py.MPI.Comm-class.html#Bsend mpi4py.MPI.Graphcomm.nneighbors mpi4py.MPI.Graphcomm-class.html#nneighbors mpi4py.MPI.Comm.isend mpi4py.MPI.Comm-class.html#isend mpi4py.MPI.Comm.Bsend_init mpi4py.MPI.Comm-class.html#Bsend_init mpi4py.MPI.Comm.Idup mpi4py.MPI.Comm-class.html#Idup mpi4py.MPI.Topocomm.outdegree mpi4py.MPI.Topocomm-class.html#outdegree mpi4py.MPI.Intracomm.Create_dist_graph_adjacent mpi4py.MPI.Intracomm-class.html#Create_dist_graph_adjacent mpi4py.MPI.Comm.Alltoall mpi4py.MPI.Comm-class.html#Alltoall mpi4py.MPI.Comm.ibsend mpi4py.MPI.Comm-class.html#ibsend mpi4py.MPI.Comm.bsend mpi4py.MPI.Comm-class.html#bsend mpi4py.MPI.Topocomm.Ineighbor_allgather mpi4py.MPI.Topocomm-class.html#Ineighbor_allgather mpi4py.MPI.Comm.Iallreduce mpi4py.MPI.Comm-class.html#Iallreduce mpi4py.MPI.Comm.Ireduce_scatter_block mpi4py.MPI.Comm-class.html#Ireduce_scatter_block mpi4py.MPI.Comm.Iallgatherv mpi4py.MPI.Comm-class.html#Iallgatherv mpi4py.MPI.Comm.mprobe mpi4py.MPI.Comm-class.html#mprobe mpi4py.MPI.Comm.Allreduce mpi4py.MPI.Comm-class.html#Allreduce mpi4py.MPI.Comm.Dup_with_info mpi4py.MPI.Comm-class.html#Dup_with_info mpi4py.MPI.Comm.Get_errhandler mpi4py.MPI.Comm-class.html#Get_errhandler mpi4py.MPI.Comm.is_inter mpi4py.MPI.Comm-class.html#is_inter mpi4py.MPI.Comm.__eq__ mpi4py.MPI.Comm-class.html#__eq__ mpi4py.MPI.Comm.Scatter mpi4py.MPI.Comm-class.html#Scatter mpi4py.MPI.Intracomm.Spawn mpi4py.MPI.Intracomm-class.html#Spawn mpi4py.MPI.Comm.Compare mpi4py.MPI.Comm-class.html#Compare mpi4py.MPI.Comm.Iprobe mpi4py.MPI.Comm-class.html#Iprobe mpi4py.MPI.Comm.Set_errhandler mpi4py.MPI.Comm-class.html#Set_errhandler mpi4py.MPI.Comm.allreduce mpi4py.MPI.Comm-class.html#allreduce mpi4py.MPI.Comm.__le__ mpi4py.MPI.Comm-class.html#__le__ mpi4py.MPI.Intracomm.Connect mpi4py.MPI.Intracomm-class.html#Connect mpi4py.MPI.Comm.Reduce_scatter_block mpi4py.MPI.Comm-class.html#Reduce_scatter_block mpi4py.MPI.Comm.Free_keyval mpi4py.MPI.Comm-class.html#Free_keyval mpi4py.MPI.Comm.Ssend mpi4py.MPI.Comm-class.html#Ssend mpi4py.MPI.Comm.Iscatter mpi4py.MPI.Comm-class.html#Iscatter mpi4py.MPI.Comm.__ge__ mpi4py.MPI.Comm-class.html#__ge__ mpi4py.MPI.Comm.Set_name mpi4py.MPI.Comm-class.html#Set_name mpi4py.MPI.Comm.gather mpi4py.MPI.Comm-class.html#gather mpi4py.MPI.Comm.Get_topology mpi4py.MPI.Comm-class.html#Get_topology mpi4py.MPI.Comm.Set_attr mpi4py.MPI.Comm-class.html#Set_attr mpi4py.MPI.Intracomm.scan mpi4py.MPI.Intracomm-class.html#scan mpi4py.MPI.Comm.Ireduce mpi4py.MPI.Comm-class.html#Ireduce mpi4py.MPI.Intracomm.exscan mpi4py.MPI.Intracomm-class.html#exscan mpi4py.MPI.Comm.Reduce_scatter mpi4py.MPI.Comm-class.html#Reduce_scatter mpi4py.MPI.Comm.is_topo mpi4py.MPI.Comm-class.html#is_topo mpi4py.MPI.Intracomm.Accept mpi4py.MPI.Intracomm-class.html#Accept mpi4py.MPI.Comm.Mprobe mpi4py.MPI.Comm-class.html#Mprobe mpi4py.MPI.Intracomm.Cart_map mpi4py.MPI.Intracomm-class.html#Cart_map mpi4py.MPI.Comm.bcast mpi4py.MPI.Comm-class.html#bcast mpi4py.MPI.Comm.Is_intra mpi4py.MPI.Comm-class.html#Is_intra mpi4py.MPI.Graphcomm.__new__ mpi4py.MPI.Graphcomm-class.html#__new__ mpi4py.MPI.Comm.Barrier mpi4py.MPI.Comm-class.html#Barrier mpi4py.MPI.Comm.Clone mpi4py.MPI.Comm-class.html#Clone mpi4py.MPI.Topocomm.Ineighbor_alltoallw mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoallw mpi4py.MPI.Comm.Iscatterv mpi4py.MPI.Comm-class.html#Iscatterv mpi4py.MPI.Comm.irecv mpi4py.MPI.Comm-class.html#irecv mpi4py.MPI.Topocomm.inedges mpi4py.MPI.Topocomm-class.html#inedges mpi4py.MPI.Comm.Ireduce_scatter mpi4py.MPI.Comm-class.html#Ireduce_scatter mpi4py.MPI.Comm.Send_init mpi4py.MPI.Comm-class.html#Send_init mpi4py.MPI.Comm.Get_group mpi4py.MPI.Comm-class.html#Get_group mpi4py.MPI.Graphcomm.topo mpi4py.MPI.Graphcomm-class.html#topo mpi4py.MPI.Graphcomm.dims mpi4py.MPI.Graphcomm-class.html#dims mpi4py.MPI.Graphcomm.edges mpi4py.MPI.Graphcomm-class.html#edges mpi4py.MPI.Comm.Recv_init mpi4py.MPI.Comm-class.html#Recv_init mpi4py.MPI.Topocomm.Neighbor_alltoallv mpi4py.MPI.Topocomm-class.html#Neighbor_alltoallv mpi4py.MPI.Topocomm.Neighbor_alltoallw mpi4py.MPI.Topocomm-class.html#Neighbor_alltoallw mpi4py.MPI.Topocomm.Ineighbor_allgatherv mpi4py.MPI.Topocomm-class.html#Ineighbor_allgatherv mpi4py.MPI.Comm.improbe mpi4py.MPI.Comm-class.html#improbe mpi4py.MPI.Graphcomm.nedges mpi4py.MPI.Graphcomm-class.html#nedges mpi4py.MPI.Topocomm.indegree mpi4py.MPI.Topocomm-class.html#indegree mpi4py.MPI.Comm.Probe mpi4py.MPI.Comm-class.html#Probe mpi4py.MPI.Comm.Reduce mpi4py.MPI.Comm-class.html#Reduce mpi4py.MPI.Intracomm.Exscan mpi4py.MPI.Intracomm-class.html#Exscan mpi4py.MPI.Topocomm.neighbor_allgather mpi4py.MPI.Topocomm-class.html#neighbor_allgather mpi4py.MPI.Topocomm.Ineighbor_alltoallv mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoallv mpi4py.MPI.Intracomm.Create_dist_graph mpi4py.MPI.Intracomm-class.html#Create_dist_graph mpi4py.MPI.Comm.Ialltoallv mpi4py.MPI.Comm-class.html#Ialltoallv mpi4py.MPI.Comm.Is_inter mpi4py.MPI.Comm-class.html#Is_inter mpi4py.MPI.Comm.is_intra mpi4py.MPI.Comm-class.html#is_intra mpi4py.MPI.Comm.Ialltoallw mpi4py.MPI.Comm-class.html#Ialltoallw mpi4py.MPI.Grequest mpi4py.MPI.Grequest-class.html mpi4py.MPI.Request.waitany mpi4py.MPI.Request-class.html#waitany mpi4py.MPI.Request.Testany mpi4py.MPI.Request-class.html#Testany mpi4py.MPI.Grequest.Start mpi4py.MPI.Grequest-class.html#Start mpi4py.MPI.Request.Test mpi4py.MPI.Request-class.html#Test mpi4py.MPI.Request.Testsome mpi4py.MPI.Request-class.html#Testsome mpi4py.MPI.Request.__lt__ mpi4py.MPI.Request-class.html#__lt__ mpi4py.MPI.Request.waitall mpi4py.MPI.Request-class.html#waitall mpi4py.MPI.Grequest.__new__ mpi4py.MPI.Grequest-class.html#__new__ mpi4py.MPI.Request.f2py mpi4py.MPI.Request-class.html#f2py mpi4py.MPI.Request.Free mpi4py.MPI.Request-class.html#Free mpi4py.MPI.Request.Waitsome mpi4py.MPI.Request-class.html#Waitsome mpi4py.MPI.Request.Testall mpi4py.MPI.Request-class.html#Testall mpi4py.MPI.Request.Get_status mpi4py.MPI.Request-class.html#Get_status mpi4py.MPI.Request.test mpi4py.MPI.Request-class.html#test mpi4py.MPI.Request.py2f mpi4py.MPI.Request-class.html#py2f mpi4py.MPI.Request.wait mpi4py.MPI.Request-class.html#wait mpi4py.MPI.Request.Wait mpi4py.MPI.Request-class.html#Wait mpi4py.MPI.Request.__ne__ mpi4py.MPI.Request-class.html#__ne__ mpi4py.MPI.Request.testany mpi4py.MPI.Request-class.html#testany mpi4py.MPI.Request.testall mpi4py.MPI.Request-class.html#testall mpi4py.MPI.Request.__gt__ mpi4py.MPI.Request-class.html#__gt__ mpi4py.MPI.Request.Waitany mpi4py.MPI.Request-class.html#Waitany mpi4py.MPI.Request.__eq__ mpi4py.MPI.Request-class.html#__eq__ mpi4py.MPI.Grequest.Complete mpi4py.MPI.Grequest-class.html#Complete mpi4py.MPI.Request.__nonzero__ mpi4py.MPI.Request-class.html#__nonzero__ mpi4py.MPI.Request.__le__ mpi4py.MPI.Request-class.html#__le__ mpi4py.MPI.Request.Cancel mpi4py.MPI.Request-class.html#Cancel mpi4py.MPI.Request.__ge__ mpi4py.MPI.Request-class.html#__ge__ mpi4py.MPI.Request.Waitall mpi4py.MPI.Request-class.html#Waitall mpi4py.MPI.Group mpi4py.MPI.Group-class.html mpi4py.MPI.Group.Union mpi4py.MPI.Group-class.html#Union mpi4py.MPI.Group.rank mpi4py.MPI.Group-class.html#rank mpi4py.MPI.Group.Intersect mpi4py.MPI.Group-class.html#Intersect mpi4py.MPI.Group.Dup mpi4py.MPI.Group-class.html#Dup mpi4py.MPI.Group.__lt__ mpi4py.MPI.Group-class.html#__lt__ mpi4py.MPI.Group.Incl mpi4py.MPI.Group-class.html#Incl mpi4py.MPI.Group.size mpi4py.MPI.Group-class.html#size mpi4py.MPI.Group.__new__ mpi4py.MPI.Group-class.html#__new__ mpi4py.MPI.Group.f2py mpi4py.MPI.Group-class.html#f2py mpi4py.MPI.Group.Free mpi4py.MPI.Group-class.html#Free mpi4py.MPI.Group.py2f mpi4py.MPI.Group-class.html#py2f mpi4py.MPI.Group.Excl mpi4py.MPI.Group-class.html#Excl mpi4py.MPI.Group.Intersection mpi4py.MPI.Group-class.html#Intersection mpi4py.MPI.Group.Translate_ranks mpi4py.MPI.Group-class.html#Translate_ranks mpi4py.MPI.Group.__ne__ mpi4py.MPI.Group-class.html#__ne__ mpi4py.MPI.Group.Get_rank mpi4py.MPI.Group-class.html#Get_rank mpi4py.MPI.Group.Get_size mpi4py.MPI.Group-class.html#Get_size mpi4py.MPI.Group.__gt__ mpi4py.MPI.Group-class.html#__gt__ mpi4py.MPI.Group.__eq__ mpi4py.MPI.Group-class.html#__eq__ mpi4py.MPI.Group.Compare mpi4py.MPI.Group-class.html#Compare mpi4py.MPI.Group.Difference mpi4py.MPI.Group-class.html#Difference mpi4py.MPI.Group.__nonzero__ mpi4py.MPI.Group-class.html#__nonzero__ mpi4py.MPI.Group.Range_incl mpi4py.MPI.Group-class.html#Range_incl mpi4py.MPI.Group.__le__ mpi4py.MPI.Group-class.html#__le__ mpi4py.MPI.Group.Range_excl mpi4py.MPI.Group-class.html#Range_excl mpi4py.MPI.Group.__ge__ mpi4py.MPI.Group-class.html#__ge__ mpi4py.MPI.Info mpi4py.MPI.Info-class.html mpi4py.MPI.Info.Get_nkeys mpi4py.MPI.Info-class.html#Get_nkeys mpi4py.MPI.Info.Create mpi4py.MPI.Info-class.html#Create mpi4py.MPI.Info.Get_nthkey mpi4py.MPI.Info-class.html#Get_nthkey mpi4py.MPI.Info.Dup mpi4py.MPI.Info-class.html#Dup mpi4py.MPI.Info.__lt__ mpi4py.MPI.Info-class.html#__lt__ mpi4py.MPI.Info.__new__ mpi4py.MPI.Info-class.html#__new__ mpi4py.MPI.Info.Get mpi4py.MPI.Info-class.html#Get mpi4py.MPI.Info.f2py mpi4py.MPI.Info-class.html#f2py mpi4py.MPI.Info.Free mpi4py.MPI.Info-class.html#Free mpi4py.MPI.Info.py2f mpi4py.MPI.Info-class.html#py2f mpi4py.MPI.Info.__len__ mpi4py.MPI.Info-class.html#__len__ mpi4py.MPI.Info.__ne__ mpi4py.MPI.Info-class.html#__ne__ mpi4py.MPI.Info.__getitem__ mpi4py.MPI.Info-class.html#__getitem__ mpi4py.MPI.Info.get mpi4py.MPI.Info-class.html#get mpi4py.MPI.Info.keys mpi4py.MPI.Info-class.html#keys mpi4py.MPI.Info.update mpi4py.MPI.Info-class.html#update mpi4py.MPI.Info.__setitem__ mpi4py.MPI.Info-class.html#__setitem__ mpi4py.MPI.Info.__gt__ mpi4py.MPI.Info-class.html#__gt__ mpi4py.MPI.Info.copy mpi4py.MPI.Info-class.html#copy mpi4py.MPI.Info.__eq__ mpi4py.MPI.Info-class.html#__eq__ mpi4py.MPI.Info.Delete mpi4py.MPI.Info-class.html#Delete mpi4py.MPI.Info.__delitem__ mpi4py.MPI.Info-class.html#__delitem__ mpi4py.MPI.Info.Set mpi4py.MPI.Info-class.html#Set mpi4py.MPI.Info.__nonzero__ mpi4py.MPI.Info-class.html#__nonzero__ mpi4py.MPI.Info.items mpi4py.MPI.Info-class.html#items mpi4py.MPI.Info.clear mpi4py.MPI.Info-class.html#clear mpi4py.MPI.Info.__contains__ mpi4py.MPI.Info-class.html#__contains__ mpi4py.MPI.Info.__iter__ mpi4py.MPI.Info-class.html#__iter__ mpi4py.MPI.Info.__le__ mpi4py.MPI.Info-class.html#__le__ mpi4py.MPI.Info.values mpi4py.MPI.Info-class.html#values mpi4py.MPI.Info.__ge__ mpi4py.MPI.Info-class.html#__ge__ mpi4py.MPI.Intercomm mpi4py.MPI.Intercomm-class.html mpi4py.MPI.Comm.iprobe mpi4py.MPI.Comm-class.html#iprobe mpi4py.MPI.Comm.Isend mpi4py.MPI.Comm-class.html#Isend mpi4py.MPI.Comm.probe mpi4py.MPI.Comm-class.html#probe mpi4py.MPI.Comm.Rsend_init mpi4py.MPI.Comm-class.html#Rsend_init mpi4py.MPI.Comm.Allgather mpi4py.MPI.Comm-class.html#Allgather mpi4py.MPI.Comm.__lt__ mpi4py.MPI.Comm-class.html#__lt__ mpi4py.MPI.Comm.group mpi4py.MPI.Comm-class.html#group mpi4py.MPI.Comm.Free mpi4py.MPI.Comm-class.html#Free mpi4py.MPI.Comm.Get_info mpi4py.MPI.Comm-class.html#Get_info mpi4py.MPI.Comm.Call_errhandler mpi4py.MPI.Comm-class.html#Call_errhandler mpi4py.MPI.Comm.allgather mpi4py.MPI.Comm-class.html#allgather mpi4py.MPI.Comm.Ibcast mpi4py.MPI.Comm-class.html#Ibcast mpi4py.MPI.Comm.Recv mpi4py.MPI.Comm-class.html#Recv mpi4py.MPI.Comm.Sendrecv mpi4py.MPI.Comm-class.html#Sendrecv mpi4py.MPI.Comm.Gather mpi4py.MPI.Comm-class.html#Gather mpi4py.MPI.Comm.Allgatherv mpi4py.MPI.Comm-class.html#Allgatherv mpi4py.MPI.Comm.Igather mpi4py.MPI.Comm-class.html#Igather mpi4py.MPI.Comm.rank mpi4py.MPI.Comm-class.html#rank mpi4py.MPI.Comm.Gatherv mpi4py.MPI.Comm-class.html#Gatherv mpi4py.MPI.Comm.__gt__ mpi4py.MPI.Comm-class.html#__gt__ mpi4py.MPI.Comm.__nonzero__ mpi4py.MPI.Comm-class.html#__nonzero__ mpi4py.MPI.Comm.Create_group mpi4py.MPI.Comm-class.html#Create_group mpi4py.MPI.Comm.name mpi4py.MPI.Comm-class.html#name mpi4py.MPI.Comm.Bcast mpi4py.MPI.Comm-class.html#Bcast mpi4py.MPI.Comm.Disconnect mpi4py.MPI.Comm-class.html#Disconnect mpi4py.MPI.Comm.Create mpi4py.MPI.Comm-class.html#Create mpi4py.MPI.Comm.reduce mpi4py.MPI.Comm-class.html#reduce mpi4py.MPI.Comm.Send mpi4py.MPI.Comm-class.html#Send mpi4py.MPI.Comm.Create_keyval mpi4py.MPI.Comm-class.html#Create_keyval mpi4py.MPI.Intercomm.Get_remote_size mpi4py.MPI.Intercomm-class.html#Get_remote_size mpi4py.MPI.Comm.Split mpi4py.MPI.Comm-class.html#Split mpi4py.MPI.Comm.Set_info mpi4py.MPI.Comm-class.html#Set_info mpi4py.MPI.Comm.Irecv mpi4py.MPI.Comm-class.html#Irecv mpi4py.MPI.Comm.ssend mpi4py.MPI.Comm-class.html#ssend mpi4py.MPI.Comm.issend mpi4py.MPI.Comm-class.html#issend mpi4py.MPI.Comm.Igatherv mpi4py.MPI.Comm-class.html#Igatherv mpi4py.MPI.Comm.f2py mpi4py.MPI.Comm-class.html#f2py mpi4py.MPI.Comm.Delete_attr mpi4py.MPI.Comm-class.html#Delete_attr mpi4py.MPI.Intercomm.Get_remote_group mpi4py.MPI.Intercomm-class.html#Get_remote_group mpi4py.MPI.Comm.Abort mpi4py.MPI.Comm-class.html#Abort mpi4py.MPI.Comm.Get_rank mpi4py.MPI.Comm-class.html#Get_rank mpi4py.MPI.Comm.py2f mpi4py.MPI.Comm-class.html#py2f mpi4py.MPI.Comm.__ne__ mpi4py.MPI.Comm-class.html#__ne__ mpi4py.MPI.Comm.Improbe mpi4py.MPI.Comm-class.html#Improbe mpi4py.MPI.Comm.Join mpi4py.MPI.Comm-class.html#Join mpi4py.MPI.Comm.barrier mpi4py.MPI.Comm-class.html#barrier mpi4py.MPI.Comm.Get_size mpi4py.MPI.Comm-class.html#Get_size mpi4py.MPI.Comm.Rsend mpi4py.MPI.Comm-class.html#Rsend mpi4py.MPI.Comm.alltoall mpi4py.MPI.Comm-class.html#alltoall mpi4py.MPI.Comm.Get_attr mpi4py.MPI.Comm-class.html#Get_attr mpi4py.MPI.Comm.recv mpi4py.MPI.Comm-class.html#recv mpi4py.MPI.Comm.sendrecv mpi4py.MPI.Comm-class.html#sendrecv mpi4py.MPI.Comm.topology mpi4py.MPI.Comm-class.html#topology mpi4py.MPI.Comm.Ssend_init mpi4py.MPI.Comm-class.html#Ssend_init mpi4py.MPI.Comm.scatter mpi4py.MPI.Comm-class.html#scatter mpi4py.MPI.Comm.Scatterv mpi4py.MPI.Comm-class.html#Scatterv mpi4py.MPI.Comm.Ibarrier mpi4py.MPI.Comm-class.html#Ibarrier mpi4py.MPI.Comm.Split_type mpi4py.MPI.Comm-class.html#Split_type mpi4py.MPI.Comm.Alltoallv mpi4py.MPI.Comm-class.html#Alltoallv mpi4py.MPI.Comm.Alltoallw mpi4py.MPI.Comm-class.html#Alltoallw mpi4py.MPI.Comm.Issend mpi4py.MPI.Comm-class.html#Issend mpi4py.MPI.Comm.Ialltoall mpi4py.MPI.Comm-class.html#Ialltoall mpi4py.MPI.Comm.Get_name mpi4py.MPI.Comm-class.html#Get_name mpi4py.MPI.Comm.send mpi4py.MPI.Comm-class.html#send mpi4py.MPI.Comm.Dup mpi4py.MPI.Comm-class.html#Dup mpi4py.MPI.Comm.Sendrecv_replace mpi4py.MPI.Comm-class.html#Sendrecv_replace mpi4py.MPI.Comm.size mpi4py.MPI.Comm-class.html#size mpi4py.MPI.Comm.Bsend mpi4py.MPI.Comm-class.html#Bsend mpi4py.MPI.Comm.Irsend mpi4py.MPI.Comm-class.html#Irsend mpi4py.MPI.Comm.isend mpi4py.MPI.Comm-class.html#isend mpi4py.MPI.Comm.Idup mpi4py.MPI.Comm-class.html#Idup mpi4py.MPI.Comm.Iallgather mpi4py.MPI.Comm-class.html#Iallgather mpi4py.MPI.Comm.Alltoall mpi4py.MPI.Comm-class.html#Alltoall mpi4py.MPI.Comm.ibsend mpi4py.MPI.Comm-class.html#ibsend mpi4py.MPI.Comm.bsend mpi4py.MPI.Comm-class.html#bsend mpi4py.MPI.Comm.Iallreduce mpi4py.MPI.Comm-class.html#Iallreduce mpi4py.MPI.Comm.Ireduce_scatter_block mpi4py.MPI.Comm-class.html#Ireduce_scatter_block mpi4py.MPI.Comm.Iallgatherv mpi4py.MPI.Comm-class.html#Iallgatherv mpi4py.MPI.Comm.mprobe mpi4py.MPI.Comm-class.html#mprobe mpi4py.MPI.Comm.Allreduce mpi4py.MPI.Comm-class.html#Allreduce mpi4py.MPI.Intercomm.Merge mpi4py.MPI.Intercomm-class.html#Merge mpi4py.MPI.Comm.Dup_with_info mpi4py.MPI.Comm-class.html#Dup_with_info mpi4py.MPI.Comm.Get_errhandler mpi4py.MPI.Comm-class.html#Get_errhandler mpi4py.MPI.Comm.is_inter mpi4py.MPI.Comm-class.html#is_inter mpi4py.MPI.Comm.__eq__ mpi4py.MPI.Comm-class.html#__eq__ mpi4py.MPI.Comm.Scatter mpi4py.MPI.Comm-class.html#Scatter mpi4py.MPI.Comm.info mpi4py.MPI.Comm-class.html#info mpi4py.MPI.Comm.Compare mpi4py.MPI.Comm-class.html#Compare mpi4py.MPI.Comm.Iprobe mpi4py.MPI.Comm-class.html#Iprobe mpi4py.MPI.Intercomm.remote_size mpi4py.MPI.Intercomm-class.html#remote_size mpi4py.MPI.Intercomm.remote_group mpi4py.MPI.Intercomm-class.html#remote_group mpi4py.MPI.Comm.allreduce mpi4py.MPI.Comm-class.html#allreduce mpi4py.MPI.Comm.__le__ mpi4py.MPI.Comm-class.html#__le__ mpi4py.MPI.Comm.Reduce_scatter_block mpi4py.MPI.Comm-class.html#Reduce_scatter_block mpi4py.MPI.Comm.Free_keyval mpi4py.MPI.Comm-class.html#Free_keyval mpi4py.MPI.Comm.Ssend mpi4py.MPI.Comm-class.html#Ssend mpi4py.MPI.Comm.Iscatter mpi4py.MPI.Comm-class.html#Iscatter mpi4py.MPI.Comm.__ge__ mpi4py.MPI.Comm-class.html#__ge__ mpi4py.MPI.Comm.Set_name mpi4py.MPI.Comm-class.html#Set_name mpi4py.MPI.Comm.gather mpi4py.MPI.Comm-class.html#gather mpi4py.MPI.Comm.Get_topology mpi4py.MPI.Comm-class.html#Get_topology mpi4py.MPI.Comm.Set_attr mpi4py.MPI.Comm-class.html#Set_attr mpi4py.MPI.Comm.Bsend_init mpi4py.MPI.Comm-class.html#Bsend_init mpi4py.MPI.Comm.Ireduce mpi4py.MPI.Comm-class.html#Ireduce mpi4py.MPI.Comm.Reduce_scatter mpi4py.MPI.Comm-class.html#Reduce_scatter mpi4py.MPI.Comm.is_topo mpi4py.MPI.Comm-class.html#is_topo mpi4py.MPI.Comm.Mprobe mpi4py.MPI.Comm-class.html#Mprobe mpi4py.MPI.Comm.Ibsend mpi4py.MPI.Comm-class.html#Ibsend mpi4py.MPI.Comm.bcast mpi4py.MPI.Comm-class.html#bcast mpi4py.MPI.Comm.Is_intra mpi4py.MPI.Comm-class.html#Is_intra mpi4py.MPI.Intercomm.__new__ mpi4py.MPI.Intercomm-class.html#__new__ mpi4py.MPI.Comm.Barrier mpi4py.MPI.Comm-class.html#Barrier mpi4py.MPI.Comm.Clone mpi4py.MPI.Comm-class.html#Clone mpi4py.MPI.Comm.irecv mpi4py.MPI.Comm-class.html#irecv mpi4py.MPI.Comm.Ireduce_scatter mpi4py.MPI.Comm-class.html#Ireduce_scatter mpi4py.MPI.Comm.Send_init mpi4py.MPI.Comm-class.html#Send_init mpi4py.MPI.Comm.Get_group mpi4py.MPI.Comm-class.html#Get_group mpi4py.MPI.Comm.Recv_init mpi4py.MPI.Comm-class.html#Recv_init mpi4py.MPI.Comm.Iscatterv mpi4py.MPI.Comm-class.html#Iscatterv mpi4py.MPI.Comm.improbe mpi4py.MPI.Comm-class.html#improbe mpi4py.MPI.Comm.Set_errhandler mpi4py.MPI.Comm-class.html#Set_errhandler mpi4py.MPI.Comm.Get_parent mpi4py.MPI.Comm-class.html#Get_parent mpi4py.MPI.Comm.Probe mpi4py.MPI.Comm-class.html#Probe mpi4py.MPI.Comm.Reduce mpi4py.MPI.Comm-class.html#Reduce mpi4py.MPI.Comm.Ialltoallv mpi4py.MPI.Comm-class.html#Ialltoallv mpi4py.MPI.Comm.Is_inter mpi4py.MPI.Comm-class.html#Is_inter mpi4py.MPI.Comm.is_intra mpi4py.MPI.Comm-class.html#is_intra mpi4py.MPI.Comm.Ialltoallw mpi4py.MPI.Comm-class.html#Ialltoallw mpi4py.MPI.Intracomm mpi4py.MPI.Intracomm-class.html mpi4py.MPI.Comm.iprobe mpi4py.MPI.Comm-class.html#iprobe mpi4py.MPI.Comm.Isend mpi4py.MPI.Comm-class.html#Isend mpi4py.MPI.Comm.probe mpi4py.MPI.Comm-class.html#probe mpi4py.MPI.Intracomm.Iexscan mpi4py.MPI.Intracomm-class.html#Iexscan mpi4py.MPI.Comm.Rsend_init mpi4py.MPI.Comm-class.html#Rsend_init mpi4py.MPI.Comm.Allgather mpi4py.MPI.Comm-class.html#Allgather mpi4py.MPI.Comm.__lt__ mpi4py.MPI.Comm-class.html#__lt__ mpi4py.MPI.Comm.group mpi4py.MPI.Comm-class.html#group mpi4py.MPI.Comm.Free mpi4py.MPI.Comm-class.html#Free mpi4py.MPI.Comm.Get_info mpi4py.MPI.Comm-class.html#Get_info mpi4py.MPI.Comm.Call_errhandler mpi4py.MPI.Comm-class.html#Call_errhandler mpi4py.MPI.Comm.allgather mpi4py.MPI.Comm-class.html#allgather mpi4py.MPI.Comm.Ibcast mpi4py.MPI.Comm-class.html#Ibcast mpi4py.MPI.Comm.Recv mpi4py.MPI.Comm-class.html#Recv mpi4py.MPI.Comm.Sendrecv mpi4py.MPI.Comm-class.html#Sendrecv mpi4py.MPI.Comm.info mpi4py.MPI.Comm-class.html#info mpi4py.MPI.Comm.Gather mpi4py.MPI.Comm-class.html#Gather mpi4py.MPI.Comm.Allgatherv mpi4py.MPI.Comm-class.html#Allgatherv mpi4py.MPI.Comm.Igather mpi4py.MPI.Comm-class.html#Igather mpi4py.MPI.Comm.Get_name mpi4py.MPI.Comm-class.html#Get_name mpi4py.MPI.Comm.Gatherv mpi4py.MPI.Comm-class.html#Gatherv mpi4py.MPI.Comm.__gt__ mpi4py.MPI.Comm-class.html#__gt__ mpi4py.MPI.Comm.__nonzero__ mpi4py.MPI.Comm-class.html#__nonzero__ mpi4py.MPI.Comm.Ibsend mpi4py.MPI.Comm-class.html#Ibsend mpi4py.MPI.Comm.Create_group mpi4py.MPI.Comm-class.html#Create_group mpi4py.MPI.Comm.name mpi4py.MPI.Comm-class.html#name mpi4py.MPI.Comm.Bcast mpi4py.MPI.Comm-class.html#Bcast mpi4py.MPI.Comm.Disconnect mpi4py.MPI.Comm-class.html#Disconnect mpi4py.MPI.Comm.Create mpi4py.MPI.Comm-class.html#Create mpi4py.MPI.Comm.reduce mpi4py.MPI.Comm-class.html#reduce mpi4py.MPI.Comm.Send mpi4py.MPI.Comm-class.html#Send mpi4py.MPI.Comm.Create_keyval mpi4py.MPI.Comm-class.html#Create_keyval mpi4py.MPI.Comm.Split mpi4py.MPI.Comm-class.html#Split mpi4py.MPI.Comm.Set_info mpi4py.MPI.Comm-class.html#Set_info mpi4py.MPI.Comm.Irecv mpi4py.MPI.Comm-class.html#Irecv mpi4py.MPI.Comm.ssend mpi4py.MPI.Comm-class.html#ssend mpi4py.MPI.Comm.issend mpi4py.MPI.Comm-class.html#issend mpi4py.MPI.Comm.Igatherv mpi4py.MPI.Comm-class.html#Igatherv mpi4py.MPI.Comm.f2py mpi4py.MPI.Comm-class.html#f2py mpi4py.MPI.Comm.Delete_attr mpi4py.MPI.Comm-class.html#Delete_attr mpi4py.MPI.Comm.Abort mpi4py.MPI.Comm-class.html#Abort mpi4py.MPI.Comm.Get_rank mpi4py.MPI.Comm-class.html#Get_rank mpi4py.MPI.Comm.py2f mpi4py.MPI.Comm-class.html#py2f mpi4py.MPI.Comm.__ne__ mpi4py.MPI.Comm-class.html#__ne__ mpi4py.MPI.Comm.Improbe mpi4py.MPI.Comm-class.html#Improbe mpi4py.MPI.Comm.Join mpi4py.MPI.Comm-class.html#Join mpi4py.MPI.Comm.barrier mpi4py.MPI.Comm-class.html#barrier mpi4py.MPI.Intracomm.Create_graph mpi4py.MPI.Intracomm-class.html#Create_graph mpi4py.MPI.Comm.Ssend_init mpi4py.MPI.Comm-class.html#Ssend_init mpi4py.MPI.Comm.Rsend mpi4py.MPI.Comm-class.html#Rsend mpi4py.MPI.Intracomm.Spawn_multiple mpi4py.MPI.Intracomm-class.html#Spawn_multiple mpi4py.MPI.Intracomm.Create_intercomm mpi4py.MPI.Intracomm-class.html#Create_intercomm mpi4py.MPI.Comm.alltoall mpi4py.MPI.Comm-class.html#alltoall mpi4py.MPI.Comm.Get_attr mpi4py.MPI.Comm-class.html#Get_attr mpi4py.MPI.Comm.recv mpi4py.MPI.Comm-class.html#recv mpi4py.MPI.Comm.sendrecv mpi4py.MPI.Comm-class.html#sendrecv mpi4py.MPI.Comm.topology mpi4py.MPI.Comm-class.html#topology mpi4py.MPI.Comm.Get_size mpi4py.MPI.Comm-class.html#Get_size mpi4py.MPI.Intracomm.Graph_map mpi4py.MPI.Intracomm-class.html#Graph_map mpi4py.MPI.Intracomm.Scan mpi4py.MPI.Intracomm-class.html#Scan mpi4py.MPI.Comm.scatter mpi4py.MPI.Comm-class.html#scatter mpi4py.MPI.Comm.Scatterv mpi4py.MPI.Comm-class.html#Scatterv mpi4py.MPI.Comm.Ibarrier mpi4py.MPI.Comm-class.html#Ibarrier mpi4py.MPI.Intracomm.Iscan mpi4py.MPI.Intracomm-class.html#Iscan mpi4py.MPI.Comm.Split_type mpi4py.MPI.Comm-class.html#Split_type mpi4py.MPI.Comm.Alltoallv mpi4py.MPI.Comm-class.html#Alltoallv mpi4py.MPI.Comm.Alltoallw mpi4py.MPI.Comm-class.html#Alltoallw mpi4py.MPI.Comm.Issend mpi4py.MPI.Comm-class.html#Issend mpi4py.MPI.Comm.Ialltoall mpi4py.MPI.Comm-class.html#Ialltoall mpi4py.MPI.Comm.rank mpi4py.MPI.Comm-class.html#rank mpi4py.MPI.Comm.send mpi4py.MPI.Comm-class.html#send mpi4py.MPI.Comm.Dup mpi4py.MPI.Comm-class.html#Dup mpi4py.MPI.Comm.Sendrecv_replace mpi4py.MPI.Comm-class.html#Sendrecv_replace mpi4py.MPI.Intracomm.Create_cart mpi4py.MPI.Intracomm-class.html#Create_cart mpi4py.MPI.Comm.size mpi4py.MPI.Comm-class.html#size mpi4py.MPI.Comm.Bsend mpi4py.MPI.Comm-class.html#Bsend mpi4py.MPI.Comm.Irsend mpi4py.MPI.Comm-class.html#Irsend mpi4py.MPI.Comm.isend mpi4py.MPI.Comm-class.html#isend mpi4py.MPI.Comm.Bsend_init mpi4py.MPI.Comm-class.html#Bsend_init mpi4py.MPI.Comm.Idup mpi4py.MPI.Comm-class.html#Idup mpi4py.MPI.Comm.Iallgather mpi4py.MPI.Comm-class.html#Iallgather mpi4py.MPI.Intracomm.Create_dist_graph_adjacent mpi4py.MPI.Intracomm-class.html#Create_dist_graph_adjacent mpi4py.MPI.Comm.Alltoall mpi4py.MPI.Comm-class.html#Alltoall mpi4py.MPI.Comm.ibsend mpi4py.MPI.Comm-class.html#ibsend mpi4py.MPI.Comm.bsend mpi4py.MPI.Comm-class.html#bsend mpi4py.MPI.Comm.Iallreduce mpi4py.MPI.Comm-class.html#Iallreduce mpi4py.MPI.Comm.Ireduce_scatter_block mpi4py.MPI.Comm-class.html#Ireduce_scatter_block mpi4py.MPI.Comm.Iallgatherv mpi4py.MPI.Comm-class.html#Iallgatherv mpi4py.MPI.Comm.mprobe mpi4py.MPI.Comm-class.html#mprobe mpi4py.MPI.Comm.Allreduce mpi4py.MPI.Comm-class.html#Allreduce mpi4py.MPI.Comm.Dup_with_info mpi4py.MPI.Comm-class.html#Dup_with_info mpi4py.MPI.Comm.Get_errhandler mpi4py.MPI.Comm-class.html#Get_errhandler mpi4py.MPI.Comm.is_inter mpi4py.MPI.Comm-class.html#is_inter mpi4py.MPI.Comm.__eq__ mpi4py.MPI.Comm-class.html#__eq__ mpi4py.MPI.Comm.Scatter mpi4py.MPI.Comm-class.html#Scatter mpi4py.MPI.Intracomm.Spawn mpi4py.MPI.Intracomm-class.html#Spawn mpi4py.MPI.Comm.Compare mpi4py.MPI.Comm-class.html#Compare mpi4py.MPI.Comm.Iprobe mpi4py.MPI.Comm-class.html#Iprobe mpi4py.MPI.Comm.allreduce mpi4py.MPI.Comm-class.html#allreduce mpi4py.MPI.Comm.__le__ mpi4py.MPI.Comm-class.html#__le__ mpi4py.MPI.Intracomm.Connect mpi4py.MPI.Intracomm-class.html#Connect mpi4py.MPI.Comm.Reduce_scatter_block mpi4py.MPI.Comm-class.html#Reduce_scatter_block mpi4py.MPI.Comm.Free_keyval mpi4py.MPI.Comm-class.html#Free_keyval mpi4py.MPI.Comm.Ssend mpi4py.MPI.Comm-class.html#Ssend mpi4py.MPI.Comm.Iscatter mpi4py.MPI.Comm-class.html#Iscatter mpi4py.MPI.Comm.__ge__ mpi4py.MPI.Comm-class.html#__ge__ mpi4py.MPI.Comm.Set_name mpi4py.MPI.Comm-class.html#Set_name mpi4py.MPI.Comm.gather mpi4py.MPI.Comm-class.html#gather mpi4py.MPI.Comm.Get_topology mpi4py.MPI.Comm-class.html#Get_topology mpi4py.MPI.Comm.Set_attr mpi4py.MPI.Comm-class.html#Set_attr mpi4py.MPI.Intracomm.scan mpi4py.MPI.Intracomm-class.html#scan mpi4py.MPI.Comm.Ireduce mpi4py.MPI.Comm-class.html#Ireduce mpi4py.MPI.Intracomm.exscan mpi4py.MPI.Intracomm-class.html#exscan mpi4py.MPI.Comm.Reduce_scatter mpi4py.MPI.Comm-class.html#Reduce_scatter mpi4py.MPI.Comm.is_topo mpi4py.MPI.Comm-class.html#is_topo mpi4py.MPI.Intracomm.Accept mpi4py.MPI.Intracomm-class.html#Accept mpi4py.MPI.Comm.Mprobe mpi4py.MPI.Comm-class.html#Mprobe mpi4py.MPI.Intracomm.Cart_map mpi4py.MPI.Intracomm-class.html#Cart_map mpi4py.MPI.Comm.bcast mpi4py.MPI.Comm-class.html#bcast mpi4py.MPI.Comm.Is_intra mpi4py.MPI.Comm-class.html#Is_intra mpi4py.MPI.Intracomm.__new__ mpi4py.MPI.Intracomm-class.html#__new__ mpi4py.MPI.Comm.Barrier mpi4py.MPI.Comm-class.html#Barrier mpi4py.MPI.Comm.Clone mpi4py.MPI.Comm-class.html#Clone mpi4py.MPI.Comm.irecv mpi4py.MPI.Comm-class.html#irecv mpi4py.MPI.Comm.Ireduce_scatter mpi4py.MPI.Comm-class.html#Ireduce_scatter mpi4py.MPI.Comm.Send_init mpi4py.MPI.Comm-class.html#Send_init mpi4py.MPI.Comm.Get_group mpi4py.MPI.Comm-class.html#Get_group mpi4py.MPI.Comm.Recv_init mpi4py.MPI.Comm-class.html#Recv_init mpi4py.MPI.Comm.Iscatterv mpi4py.MPI.Comm-class.html#Iscatterv mpi4py.MPI.Comm.improbe mpi4py.MPI.Comm-class.html#improbe mpi4py.MPI.Comm.Set_errhandler mpi4py.MPI.Comm-class.html#Set_errhandler mpi4py.MPI.Comm.Get_parent mpi4py.MPI.Comm-class.html#Get_parent mpi4py.MPI.Comm.Probe mpi4py.MPI.Comm-class.html#Probe mpi4py.MPI.Comm.Reduce mpi4py.MPI.Comm-class.html#Reduce mpi4py.MPI.Intracomm.Exscan mpi4py.MPI.Intracomm-class.html#Exscan mpi4py.MPI.Intracomm.Create_dist_graph mpi4py.MPI.Intracomm-class.html#Create_dist_graph mpi4py.MPI.Comm.Ialltoallv mpi4py.MPI.Comm-class.html#Ialltoallv mpi4py.MPI.Comm.Is_inter mpi4py.MPI.Comm-class.html#Is_inter mpi4py.MPI.Comm.is_intra mpi4py.MPI.Comm-class.html#is_intra mpi4py.MPI.Comm.Ialltoallw mpi4py.MPI.Comm-class.html#Ialltoallw mpi4py.MPI.Message mpi4py.MPI.Message-class.html mpi4py.MPI.Message.__ne__ mpi4py.MPI.Message-class.html#__ne__ mpi4py.MPI.Message.Iprobe mpi4py.MPI.Message-class.html#Iprobe mpi4py.MPI.Message.__nonzero__ mpi4py.MPI.Message-class.html#__nonzero__ mpi4py.MPI.Message.__new__ mpi4py.MPI.Message-class.html#__new__ mpi4py.MPI.Message.recv mpi4py.MPI.Message-class.html#recv mpi4py.MPI.Message.Probe mpi4py.MPI.Message-class.html#Probe mpi4py.MPI.Message.f2py mpi4py.MPI.Message-class.html#f2py mpi4py.MPI.Message.probe mpi4py.MPI.Message-class.html#probe mpi4py.MPI.Message.Irecv mpi4py.MPI.Message-class.html#Irecv mpi4py.MPI.Message.iprobe mpi4py.MPI.Message-class.html#iprobe mpi4py.MPI.Message.__eq__ mpi4py.MPI.Message-class.html#__eq__ mpi4py.MPI.Message.__gt__ mpi4py.MPI.Message-class.html#__gt__ mpi4py.MPI.Message.irecv mpi4py.MPI.Message-class.html#irecv mpi4py.MPI.Message.py2f mpi4py.MPI.Message-class.html#py2f mpi4py.MPI.Message.__lt__ mpi4py.MPI.Message-class.html#__lt__ mpi4py.MPI.Message.__le__ mpi4py.MPI.Message-class.html#__le__ mpi4py.MPI.Message.Recv mpi4py.MPI.Message-class.html#Recv mpi4py.MPI.Message.__ge__ mpi4py.MPI.Message-class.html#__ge__ mpi4py.MPI.Op mpi4py.MPI.Op-class.html mpi4py.MPI.Op.__ne__ mpi4py.MPI.Op-class.html#__ne__ mpi4py.MPI.Op.__nonzero__ mpi4py.MPI.Op-class.html#__nonzero__ mpi4py.MPI.Op.__new__ mpi4py.MPI.Op-class.html#__new__ mpi4py.MPI.Op.Create mpi4py.MPI.Op-class.html#Create mpi4py.MPI.Op.Is_commutative mpi4py.MPI.Op-class.html#Is_commutative mpi4py.MPI.Op.Free mpi4py.MPI.Op-class.html#Free mpi4py.MPI.Op.f2py mpi4py.MPI.Op-class.html#f2py mpi4py.MPI.Op.is_predefined mpi4py.MPI.Op-class.html#is_predefined mpi4py.MPI.Op.__le__ mpi4py.MPI.Op-class.html#__le__ mpi4py.MPI.Op.is_commutative mpi4py.MPI.Op-class.html#is_commutative mpi4py.MPI.Op.__gt__ mpi4py.MPI.Op-class.html#__gt__ mpi4py.MPI.Op.__call__ mpi4py.MPI.Op-class.html#__call__ mpi4py.MPI.Op.py2f mpi4py.MPI.Op-class.html#py2f mpi4py.MPI.Op.__lt__ mpi4py.MPI.Op-class.html#__lt__ mpi4py.MPI.Op.__eq__ mpi4py.MPI.Op-class.html#__eq__ mpi4py.MPI.Op.Reduce_local mpi4py.MPI.Op-class.html#Reduce_local mpi4py.MPI.Op.__ge__ mpi4py.MPI.Op-class.html#__ge__ mpi4py.MPI.Prequest mpi4py.MPI.Prequest-class.html mpi4py.MPI.Request.waitany mpi4py.MPI.Request-class.html#waitany mpi4py.MPI.Request.Testany mpi4py.MPI.Request-class.html#Testany mpi4py.MPI.Prequest.Start mpi4py.MPI.Prequest-class.html#Start mpi4py.MPI.Prequest.Startall mpi4py.MPI.Prequest-class.html#Startall mpi4py.MPI.Request.Test mpi4py.MPI.Request-class.html#Test mpi4py.MPI.Request.Testsome mpi4py.MPI.Request-class.html#Testsome mpi4py.MPI.Request.__lt__ mpi4py.MPI.Request-class.html#__lt__ mpi4py.MPI.Request.waitall mpi4py.MPI.Request-class.html#waitall mpi4py.MPI.Prequest.__new__ mpi4py.MPI.Prequest-class.html#__new__ mpi4py.MPI.Request.f2py mpi4py.MPI.Request-class.html#f2py mpi4py.MPI.Request.Free mpi4py.MPI.Request-class.html#Free mpi4py.MPI.Request.Waitsome mpi4py.MPI.Request-class.html#Waitsome mpi4py.MPI.Request.Testall mpi4py.MPI.Request-class.html#Testall mpi4py.MPI.Request.Get_status mpi4py.MPI.Request-class.html#Get_status mpi4py.MPI.Request.test mpi4py.MPI.Request-class.html#test mpi4py.MPI.Request.py2f mpi4py.MPI.Request-class.html#py2f mpi4py.MPI.Request.Wait mpi4py.MPI.Request-class.html#Wait mpi4py.MPI.Request.__ne__ mpi4py.MPI.Request-class.html#__ne__ mpi4py.MPI.Request.testany mpi4py.MPI.Request-class.html#testany mpi4py.MPI.Request.testall mpi4py.MPI.Request-class.html#testall mpi4py.MPI.Request.__gt__ mpi4py.MPI.Request-class.html#__gt__ mpi4py.MPI.Request.Waitany mpi4py.MPI.Request-class.html#Waitany mpi4py.MPI.Request.__eq__ mpi4py.MPI.Request-class.html#__eq__ mpi4py.MPI.Request.wait mpi4py.MPI.Request-class.html#wait mpi4py.MPI.Request.__nonzero__ mpi4py.MPI.Request-class.html#__nonzero__ mpi4py.MPI.Request.__le__ mpi4py.MPI.Request-class.html#__le__ mpi4py.MPI.Request.Cancel mpi4py.MPI.Request-class.html#Cancel mpi4py.MPI.Request.__ge__ mpi4py.MPI.Request-class.html#__ge__ mpi4py.MPI.Request.Waitall mpi4py.MPI.Request-class.html#Waitall mpi4py.MPI.Request mpi4py.MPI.Request-class.html mpi4py.MPI.Request.waitany mpi4py.MPI.Request-class.html#waitany mpi4py.MPI.Request.f2py mpi4py.MPI.Request-class.html#f2py mpi4py.MPI.Request.Test mpi4py.MPI.Request-class.html#Test mpi4py.MPI.Request.Testsome mpi4py.MPI.Request-class.html#Testsome mpi4py.MPI.Request.__lt__ mpi4py.MPI.Request-class.html#__lt__ mpi4py.MPI.Request.waitall mpi4py.MPI.Request-class.html#waitall mpi4py.MPI.Request.__new__ mpi4py.MPI.Request-class.html#__new__ mpi4py.MPI.Request.Testany mpi4py.MPI.Request-class.html#Testany mpi4py.MPI.Request.Free mpi4py.MPI.Request-class.html#Free mpi4py.MPI.Request.Waitsome mpi4py.MPI.Request-class.html#Waitsome mpi4py.MPI.Request.Testall mpi4py.MPI.Request-class.html#Testall mpi4py.MPI.Request.Get_status mpi4py.MPI.Request-class.html#Get_status mpi4py.MPI.Request.test mpi4py.MPI.Request-class.html#test mpi4py.MPI.Request.py2f mpi4py.MPI.Request-class.html#py2f mpi4py.MPI.Request.Wait mpi4py.MPI.Request-class.html#Wait mpi4py.MPI.Request.__ne__ mpi4py.MPI.Request-class.html#__ne__ mpi4py.MPI.Request.testany mpi4py.MPI.Request-class.html#testany mpi4py.MPI.Request.testall mpi4py.MPI.Request-class.html#testall mpi4py.MPI.Request.__gt__ mpi4py.MPI.Request-class.html#__gt__ mpi4py.MPI.Request.__nonzero__ mpi4py.MPI.Request-class.html#__nonzero__ mpi4py.MPI.Request.__eq__ mpi4py.MPI.Request-class.html#__eq__ mpi4py.MPI.Request.wait mpi4py.MPI.Request-class.html#wait mpi4py.MPI.Request.Waitany mpi4py.MPI.Request-class.html#Waitany mpi4py.MPI.Request.__le__ mpi4py.MPI.Request-class.html#__le__ mpi4py.MPI.Request.Cancel mpi4py.MPI.Request-class.html#Cancel mpi4py.MPI.Request.__ge__ mpi4py.MPI.Request-class.html#__ge__ mpi4py.MPI.Request.Waitall mpi4py.MPI.Request-class.html#Waitall mpi4py.MPI.Status mpi4py.MPI.Status-class.html mpi4py.MPI.Status.Set_error mpi4py.MPI.Status-class.html#Set_error mpi4py.MPI.Status.Set_tag mpi4py.MPI.Status-class.html#Set_tag mpi4py.MPI.Status.Get_tag mpi4py.MPI.Status-class.html#Get_tag mpi4py.MPI.Status.tag mpi4py.MPI.Status-class.html#tag mpi4py.MPI.Status.Get_error mpi4py.MPI.Status-class.html#Get_error mpi4py.MPI.Status.__lt__ mpi4py.MPI.Status-class.html#__lt__ mpi4py.MPI.Status.Set_cancelled mpi4py.MPI.Status-class.html#Set_cancelled mpi4py.MPI.Status.Get_elements mpi4py.MPI.Status-class.html#Get_elements mpi4py.MPI.Status.__new__ mpi4py.MPI.Status-class.html#__new__ mpi4py.MPI.Status.f2py mpi4py.MPI.Status-class.html#f2py mpi4py.MPI.Status.Set_elements mpi4py.MPI.Status-class.html#Set_elements mpi4py.MPI.Status.source mpi4py.MPI.Status-class.html#source mpi4py.MPI.Status.py2f mpi4py.MPI.Status-class.html#py2f mpi4py.MPI.Status.__ne__ mpi4py.MPI.Status-class.html#__ne__ mpi4py.MPI.Status.Set_source mpi4py.MPI.Status-class.html#Set_source mpi4py.MPI.Status.Is_cancelled mpi4py.MPI.Status-class.html#Is_cancelled mpi4py.MPI.Status.__gt__ mpi4py.MPI.Status-class.html#__gt__ mpi4py.MPI.Status.Get_count mpi4py.MPI.Status-class.html#Get_count mpi4py.MPI.Status.__eq__ mpi4py.MPI.Status-class.html#__eq__ mpi4py.MPI.Status.count mpi4py.MPI.Status-class.html#count mpi4py.MPI.Status.Get_source mpi4py.MPI.Status-class.html#Get_source mpi4py.MPI.Status.__le__ mpi4py.MPI.Status-class.html#__le__ mpi4py.MPI.Status.error mpi4py.MPI.Status-class.html#error mpi4py.MPI.Status.cancelled mpi4py.MPI.Status-class.html#cancelled mpi4py.MPI.Status.__ge__ mpi4py.MPI.Status-class.html#__ge__ mpi4py.MPI.Topocomm mpi4py.MPI.Topocomm-class.html mpi4py.MPI.Comm.iprobe mpi4py.MPI.Comm-class.html#iprobe mpi4py.MPI.Comm.Isend mpi4py.MPI.Comm-class.html#Isend mpi4py.MPI.Comm.probe mpi4py.MPI.Comm-class.html#probe mpi4py.MPI.Topocomm.Ineighbor_alltoall mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoall mpi4py.MPI.Topocomm.Neighbor_allgather mpi4py.MPI.Topocomm-class.html#Neighbor_allgather mpi4py.MPI.Intracomm.Iexscan mpi4py.MPI.Intracomm-class.html#Iexscan mpi4py.MPI.Comm.Rsend_init mpi4py.MPI.Comm-class.html#Rsend_init mpi4py.MPI.Comm.Allgather mpi4py.MPI.Comm-class.html#Allgather mpi4py.MPI.Comm.__lt__ mpi4py.MPI.Comm-class.html#__lt__ mpi4py.MPI.Comm.group mpi4py.MPI.Comm-class.html#group mpi4py.MPI.Comm.send mpi4py.MPI.Comm-class.html#send mpi4py.MPI.Comm.Get_info mpi4py.MPI.Comm-class.html#Get_info mpi4py.MPI.Topocomm.degrees mpi4py.MPI.Topocomm-class.html#degrees mpi4py.MPI.Comm.Call_errhandler mpi4py.MPI.Comm-class.html#Call_errhandler mpi4py.MPI.Comm.allgather mpi4py.MPI.Comm-class.html#allgather mpi4py.MPI.Comm.Ibcast mpi4py.MPI.Comm-class.html#Ibcast mpi4py.MPI.Comm.Recv mpi4py.MPI.Comm-class.html#Recv mpi4py.MPI.Comm.Sendrecv mpi4py.MPI.Comm-class.html#Sendrecv mpi4py.MPI.Comm.info mpi4py.MPI.Comm-class.html#info mpi4py.MPI.Comm.Gather mpi4py.MPI.Comm-class.html#Gather mpi4py.MPI.Comm.Allgatherv mpi4py.MPI.Comm-class.html#Allgatherv mpi4py.MPI.Comm.Igather mpi4py.MPI.Comm-class.html#Igather mpi4py.MPI.Comm.rank mpi4py.MPI.Comm-class.html#rank mpi4py.MPI.Comm.Gatherv mpi4py.MPI.Comm-class.html#Gatherv mpi4py.MPI.Comm.__gt__ mpi4py.MPI.Comm-class.html#__gt__ mpi4py.MPI.Comm.__nonzero__ mpi4py.MPI.Comm-class.html#__nonzero__ mpi4py.MPI.Comm.Ibsend mpi4py.MPI.Comm-class.html#Ibsend mpi4py.MPI.Comm.Create_group mpi4py.MPI.Comm-class.html#Create_group mpi4py.MPI.Comm.name mpi4py.MPI.Comm-class.html#name mpi4py.MPI.Comm.Iallgather mpi4py.MPI.Comm-class.html#Iallgather mpi4py.MPI.Comm.Bcast mpi4py.MPI.Comm-class.html#Bcast mpi4py.MPI.Comm.Disconnect mpi4py.MPI.Comm-class.html#Disconnect mpi4py.MPI.Comm.Create mpi4py.MPI.Comm-class.html#Create mpi4py.MPI.Comm.reduce mpi4py.MPI.Comm-class.html#reduce mpi4py.MPI.Comm.Send mpi4py.MPI.Comm-class.html#Send mpi4py.MPI.Comm.Create_keyval mpi4py.MPI.Comm-class.html#Create_keyval mpi4py.MPI.Comm.Split mpi4py.MPI.Comm-class.html#Split mpi4py.MPI.Comm.Set_info mpi4py.MPI.Comm-class.html#Set_info mpi4py.MPI.Comm.Irecv mpi4py.MPI.Comm-class.html#Irecv mpi4py.MPI.Comm.ssend mpi4py.MPI.Comm-class.html#ssend mpi4py.MPI.Comm.issend mpi4py.MPI.Comm-class.html#issend mpi4py.MPI.Comm.Igatherv mpi4py.MPI.Comm-class.html#Igatherv mpi4py.MPI.Topocomm.Neighbor_allgatherv mpi4py.MPI.Topocomm-class.html#Neighbor_allgatherv mpi4py.MPI.Comm.f2py mpi4py.MPI.Comm-class.html#f2py mpi4py.MPI.Comm.Delete_attr mpi4py.MPI.Comm-class.html#Delete_attr mpi4py.MPI.Topocomm.Neighbor_alltoall mpi4py.MPI.Topocomm-class.html#Neighbor_alltoall mpi4py.MPI.Comm.Abort mpi4py.MPI.Comm-class.html#Abort mpi4py.MPI.Comm.Get_rank mpi4py.MPI.Comm-class.html#Get_rank mpi4py.MPI.Comm.py2f mpi4py.MPI.Comm-class.html#py2f mpi4py.MPI.Comm.__ne__ mpi4py.MPI.Comm-class.html#__ne__ mpi4py.MPI.Comm.Improbe mpi4py.MPI.Comm-class.html#Improbe mpi4py.MPI.Comm.Join mpi4py.MPI.Comm-class.html#Join mpi4py.MPI.Comm.barrier mpi4py.MPI.Comm-class.html#barrier mpi4py.MPI.Intracomm.Create_graph mpi4py.MPI.Intracomm-class.html#Create_graph mpi4py.MPI.Comm.Get_size mpi4py.MPI.Comm-class.html#Get_size mpi4py.MPI.Comm.Rsend mpi4py.MPI.Comm-class.html#Rsend mpi4py.MPI.Intracomm.Spawn_multiple mpi4py.MPI.Intracomm-class.html#Spawn_multiple mpi4py.MPI.Intracomm.Create_intercomm mpi4py.MPI.Intracomm-class.html#Create_intercomm mpi4py.MPI.Comm.alltoall mpi4py.MPI.Comm-class.html#alltoall mpi4py.MPI.Comm.Get_attr mpi4py.MPI.Comm-class.html#Get_attr mpi4py.MPI.Comm.recv mpi4py.MPI.Comm-class.html#recv mpi4py.MPI.Comm.sendrecv mpi4py.MPI.Comm-class.html#sendrecv mpi4py.MPI.Comm.topology mpi4py.MPI.Comm-class.html#topology mpi4py.MPI.Comm.Ssend_init mpi4py.MPI.Comm-class.html#Ssend_init mpi4py.MPI.Intracomm.Graph_map mpi4py.MPI.Intracomm-class.html#Graph_map mpi4py.MPI.Intracomm.Scan mpi4py.MPI.Intracomm-class.html#Scan mpi4py.MPI.Comm.scatter mpi4py.MPI.Comm-class.html#scatter mpi4py.MPI.Comm.Scatterv mpi4py.MPI.Comm-class.html#Scatterv mpi4py.MPI.Comm.Ibarrier mpi4py.MPI.Comm-class.html#Ibarrier mpi4py.MPI.Intracomm.Iscan mpi4py.MPI.Intracomm-class.html#Iscan mpi4py.MPI.Comm.Split_type mpi4py.MPI.Comm-class.html#Split_type mpi4py.MPI.Topocomm.inoutedges mpi4py.MPI.Topocomm-class.html#inoutedges mpi4py.MPI.Comm.Alltoallv mpi4py.MPI.Comm-class.html#Alltoallv mpi4py.MPI.Comm.Alltoallw mpi4py.MPI.Comm-class.html#Alltoallw mpi4py.MPI.Comm.Issend mpi4py.MPI.Comm-class.html#Issend mpi4py.MPI.Comm.Ialltoall mpi4py.MPI.Comm-class.html#Ialltoall mpi4py.MPI.Comm.Get_name mpi4py.MPI.Comm-class.html#Get_name mpi4py.MPI.Topocomm.neighbor_alltoall mpi4py.MPI.Topocomm-class.html#neighbor_alltoall mpi4py.MPI.Topocomm.outedges mpi4py.MPI.Topocomm-class.html#outedges mpi4py.MPI.Comm.Get_parent mpi4py.MPI.Comm-class.html#Get_parent mpi4py.MPI.Comm.Free mpi4py.MPI.Comm-class.html#Free mpi4py.MPI.Comm.Dup mpi4py.MPI.Comm-class.html#Dup mpi4py.MPI.Comm.Sendrecv_replace mpi4py.MPI.Comm-class.html#Sendrecv_replace mpi4py.MPI.Intracomm.Create_cart mpi4py.MPI.Intracomm-class.html#Create_cart mpi4py.MPI.Comm.size mpi4py.MPI.Comm-class.html#size mpi4py.MPI.Comm.Bsend mpi4py.MPI.Comm-class.html#Bsend mpi4py.MPI.Comm.Irsend mpi4py.MPI.Comm-class.html#Irsend mpi4py.MPI.Comm.isend mpi4py.MPI.Comm-class.html#isend mpi4py.MPI.Comm.Bsend_init mpi4py.MPI.Comm-class.html#Bsend_init mpi4py.MPI.Comm.Idup mpi4py.MPI.Comm-class.html#Idup mpi4py.MPI.Topocomm.outdegree mpi4py.MPI.Topocomm-class.html#outdegree mpi4py.MPI.Intracomm.Create_dist_graph_adjacent mpi4py.MPI.Intracomm-class.html#Create_dist_graph_adjacent mpi4py.MPI.Comm.Alltoall mpi4py.MPI.Comm-class.html#Alltoall mpi4py.MPI.Comm.ibsend mpi4py.MPI.Comm-class.html#ibsend mpi4py.MPI.Comm.bsend mpi4py.MPI.Comm-class.html#bsend mpi4py.MPI.Topocomm.Ineighbor_allgather mpi4py.MPI.Topocomm-class.html#Ineighbor_allgather mpi4py.MPI.Comm.Iallreduce mpi4py.MPI.Comm-class.html#Iallreduce mpi4py.MPI.Comm.Ireduce_scatter_block mpi4py.MPI.Comm-class.html#Ireduce_scatter_block mpi4py.MPI.Comm.Iallgatherv mpi4py.MPI.Comm-class.html#Iallgatherv mpi4py.MPI.Comm.mprobe mpi4py.MPI.Comm-class.html#mprobe mpi4py.MPI.Comm.Allreduce mpi4py.MPI.Comm-class.html#Allreduce mpi4py.MPI.Comm.Dup_with_info mpi4py.MPI.Comm-class.html#Dup_with_info mpi4py.MPI.Comm.Get_errhandler mpi4py.MPI.Comm-class.html#Get_errhandler mpi4py.MPI.Comm.is_inter mpi4py.MPI.Comm-class.html#is_inter mpi4py.MPI.Comm.__eq__ mpi4py.MPI.Comm-class.html#__eq__ mpi4py.MPI.Comm.Scatter mpi4py.MPI.Comm-class.html#Scatter mpi4py.MPI.Intracomm.Spawn mpi4py.MPI.Intracomm-class.html#Spawn mpi4py.MPI.Comm.Compare mpi4py.MPI.Comm-class.html#Compare mpi4py.MPI.Comm.Iprobe mpi4py.MPI.Comm-class.html#Iprobe mpi4py.MPI.Comm.allreduce mpi4py.MPI.Comm-class.html#allreduce mpi4py.MPI.Comm.__le__ mpi4py.MPI.Comm-class.html#__le__ mpi4py.MPI.Intracomm.Connect mpi4py.MPI.Intracomm-class.html#Connect mpi4py.MPI.Comm.Reduce_scatter_block mpi4py.MPI.Comm-class.html#Reduce_scatter_block mpi4py.MPI.Comm.Free_keyval mpi4py.MPI.Comm-class.html#Free_keyval mpi4py.MPI.Comm.Ssend mpi4py.MPI.Comm-class.html#Ssend mpi4py.MPI.Comm.Iscatter mpi4py.MPI.Comm-class.html#Iscatter mpi4py.MPI.Comm.__ge__ mpi4py.MPI.Comm-class.html#__ge__ mpi4py.MPI.Comm.Set_name mpi4py.MPI.Comm-class.html#Set_name mpi4py.MPI.Comm.gather mpi4py.MPI.Comm-class.html#gather mpi4py.MPI.Comm.Get_topology mpi4py.MPI.Comm-class.html#Get_topology mpi4py.MPI.Comm.Set_attr mpi4py.MPI.Comm-class.html#Set_attr mpi4py.MPI.Intracomm.scan mpi4py.MPI.Intracomm-class.html#scan mpi4py.MPI.Comm.Ireduce mpi4py.MPI.Comm-class.html#Ireduce mpi4py.MPI.Intracomm.exscan mpi4py.MPI.Intracomm-class.html#exscan mpi4py.MPI.Comm.Reduce_scatter mpi4py.MPI.Comm-class.html#Reduce_scatter mpi4py.MPI.Comm.is_topo mpi4py.MPI.Comm-class.html#is_topo mpi4py.MPI.Intracomm.Accept mpi4py.MPI.Intracomm-class.html#Accept mpi4py.MPI.Comm.Mprobe mpi4py.MPI.Comm-class.html#Mprobe mpi4py.MPI.Intracomm.Cart_map mpi4py.MPI.Intracomm-class.html#Cart_map mpi4py.MPI.Comm.bcast mpi4py.MPI.Comm-class.html#bcast mpi4py.MPI.Comm.Is_intra mpi4py.MPI.Comm-class.html#Is_intra mpi4py.MPI.Topocomm.__new__ mpi4py.MPI.Topocomm-class.html#__new__ mpi4py.MPI.Comm.Barrier mpi4py.MPI.Comm-class.html#Barrier mpi4py.MPI.Comm.Clone mpi4py.MPI.Comm-class.html#Clone mpi4py.MPI.Topocomm.Ineighbor_alltoallw mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoallw mpi4py.MPI.Comm.Iscatterv mpi4py.MPI.Comm-class.html#Iscatterv mpi4py.MPI.Comm.irecv mpi4py.MPI.Comm-class.html#irecv mpi4py.MPI.Topocomm.inedges mpi4py.MPI.Topocomm-class.html#inedges mpi4py.MPI.Comm.Ireduce_scatter mpi4py.MPI.Comm-class.html#Ireduce_scatter mpi4py.MPI.Comm.Send_init mpi4py.MPI.Comm-class.html#Send_init mpi4py.MPI.Comm.Get_group mpi4py.MPI.Comm-class.html#Get_group mpi4py.MPI.Comm.Recv_init mpi4py.MPI.Comm-class.html#Recv_init mpi4py.MPI.Topocomm.Neighbor_alltoallv mpi4py.MPI.Topocomm-class.html#Neighbor_alltoallv mpi4py.MPI.Topocomm.Neighbor_alltoallw mpi4py.MPI.Topocomm-class.html#Neighbor_alltoallw mpi4py.MPI.Topocomm.Ineighbor_allgatherv mpi4py.MPI.Topocomm-class.html#Ineighbor_allgatherv mpi4py.MPI.Comm.improbe mpi4py.MPI.Comm-class.html#improbe mpi4py.MPI.Comm.Set_errhandler mpi4py.MPI.Comm-class.html#Set_errhandler mpi4py.MPI.Topocomm.indegree mpi4py.MPI.Topocomm-class.html#indegree mpi4py.MPI.Comm.Probe mpi4py.MPI.Comm-class.html#Probe mpi4py.MPI.Comm.Reduce mpi4py.MPI.Comm-class.html#Reduce mpi4py.MPI.Intracomm.Exscan mpi4py.MPI.Intracomm-class.html#Exscan mpi4py.MPI.Topocomm.neighbor_allgather mpi4py.MPI.Topocomm-class.html#neighbor_allgather mpi4py.MPI.Topocomm.Ineighbor_alltoallv mpi4py.MPI.Topocomm-class.html#Ineighbor_alltoallv mpi4py.MPI.Intracomm.Create_dist_graph mpi4py.MPI.Intracomm-class.html#Create_dist_graph mpi4py.MPI.Comm.Ialltoallv mpi4py.MPI.Comm-class.html#Ialltoallv mpi4py.MPI.Comm.Is_inter mpi4py.MPI.Comm-class.html#Is_inter mpi4py.MPI.Comm.is_intra mpi4py.MPI.Comm-class.html#is_intra mpi4py.MPI.Comm.Ialltoallw mpi4py.MPI.Comm-class.html#Ialltoallw mpi4py.MPI.Win mpi4py.MPI.Win-class.html mpi4py.MPI.Win.Set_name mpi4py.MPI.Win-class.html#Set_name mpi4py.MPI.Win.Allocate mpi4py.MPI.Win-class.html#Allocate mpi4py.MPI.Win.Rput mpi4py.MPI.Win-class.html#Rput mpi4py.MPI.Win.Set_attr mpi4py.MPI.Win-class.html#Set_attr mpi4py.MPI.Win.__ne__ mpi4py.MPI.Win-class.html#__ne__ mpi4py.MPI.Win.Create mpi4py.MPI.Win-class.html#Create mpi4py.MPI.Win.Compare_and_swap mpi4py.MPI.Win-class.html#Compare_and_swap mpi4py.MPI.Win.Get_name mpi4py.MPI.Win-class.html#Get_name mpi4py.MPI.Win.Create_keyval mpi4py.MPI.Win-class.html#Create_keyval mpi4py.MPI.Win.Attach mpi4py.MPI.Win-class.html#Attach mpi4py.MPI.Win.Free mpi4py.MPI.Win-class.html#Free mpi4py.MPI.Win.Set_info mpi4py.MPI.Win-class.html#Set_info mpi4py.MPI.Win.Allocate_shared mpi4py.MPI.Win-class.html#Allocate_shared mpi4py.MPI.Win.__lt__ mpi4py.MPI.Win-class.html#__lt__ mpi4py.MPI.Win.Get_errhandler mpi4py.MPI.Win-class.html#Get_errhandler mpi4py.MPI.Win.flavor mpi4py.MPI.Win-class.html#flavor mpi4py.MPI.Win.Flush_all mpi4py.MPI.Win-class.html#Flush_all mpi4py.MPI.Win.group mpi4py.MPI.Win-class.html#group mpi4py.MPI.Win.__new__ mpi4py.MPI.Win-class.html#__new__ mpi4py.MPI.Win.Get mpi4py.MPI.Win-class.html#Get mpi4py.MPI.Win.f2py mpi4py.MPI.Win-class.html#f2py mpi4py.MPI.Win.Delete_attr mpi4py.MPI.Win-class.html#Delete_attr mpi4py.MPI.Win.Fetch_and_op mpi4py.MPI.Win-class.html#Fetch_and_op mpi4py.MPI.Win.Rget mpi4py.MPI.Win-class.html#Rget mpi4py.MPI.Win.Get_info mpi4py.MPI.Win-class.html#Get_info mpi4py.MPI.Win.Fence mpi4py.MPI.Win-class.html#Fence mpi4py.MPI.Win.Test mpi4py.MPI.Win-class.html#Test mpi4py.MPI.Win.Call_errhandler mpi4py.MPI.Win-class.html#Call_errhandler mpi4py.MPI.Win.Put mpi4py.MPI.Win-class.html#Put mpi4py.MPI.Win.py2f mpi4py.MPI.Win-class.html#py2f mpi4py.MPI.Win.Post mpi4py.MPI.Win-class.html#Post mpi4py.MPI.Win.Detach mpi4py.MPI.Win-class.html#Detach mpi4py.MPI.Win.Get_attr mpi4py.MPI.Win-class.html#Get_attr mpi4py.MPI.Win.tomemory mpi4py.MPI.Win-class.html#tomemory mpi4py.MPI.Win.Wait mpi4py.MPI.Win-class.html#Wait mpi4py.MPI.Win.Flush_local_all mpi4py.MPI.Win-class.html#Flush_local_all mpi4py.MPI.Win.Get_group mpi4py.MPI.Win-class.html#Get_group mpi4py.MPI.Win.Rget_accumulate mpi4py.MPI.Win-class.html#Rget_accumulate mpi4py.MPI.Win.Accumulate mpi4py.MPI.Win-class.html#Accumulate mpi4py.MPI.Win.Shared_query mpi4py.MPI.Win-class.html#Shared_query mpi4py.MPI.Win.__gt__ mpi4py.MPI.Win-class.html#__gt__ mpi4py.MPI.Win.Unlock_all mpi4py.MPI.Win-class.html#Unlock_all mpi4py.MPI.Win.__eq__ mpi4py.MPI.Win-class.html#__eq__ mpi4py.MPI.Win.Complete mpi4py.MPI.Win-class.html#Complete mpi4py.MPI.Win.info mpi4py.MPI.Win-class.html#info mpi4py.MPI.Win.Lock_all mpi4py.MPI.Win-class.html#Lock_all mpi4py.MPI.Win.Get_accumulate mpi4py.MPI.Win-class.html#Get_accumulate mpi4py.MPI.Win.__nonzero__ mpi4py.MPI.Win-class.html#__nonzero__ mpi4py.MPI.Win.name mpi4py.MPI.Win-class.html#name mpi4py.MPI.Win.Set_errhandler mpi4py.MPI.Win-class.html#Set_errhandler mpi4py.MPI.Win.Start mpi4py.MPI.Win-class.html#Start mpi4py.MPI.Win.Lock mpi4py.MPI.Win-class.html#Lock mpi4py.MPI.Win.Raccumulate mpi4py.MPI.Win-class.html#Raccumulate mpi4py.MPI.Win.Sync mpi4py.MPI.Win-class.html#Sync mpi4py.MPI.Win.Create_dynamic mpi4py.MPI.Win-class.html#Create_dynamic mpi4py.MPI.Win.Unlock mpi4py.MPI.Win-class.html#Unlock mpi4py.MPI.Win.__le__ mpi4py.MPI.Win-class.html#__le__ mpi4py.MPI.Win.Flush mpi4py.MPI.Win-class.html#Flush mpi4py.MPI.Win.Free_keyval mpi4py.MPI.Win-class.html#Free_keyval mpi4py.MPI.Win.model mpi4py.MPI.Win-class.html#model mpi4py.MPI.Win.attrs mpi4py.MPI.Win-class.html#attrs mpi4py.MPI.Win.__ge__ mpi4py.MPI.Win-class.html#__ge__ mpi4py.MPI.Win.Flush_local mpi4py.MPI.Win-class.html#Flush_local mpi4py.MPI.memory mpi4py.MPI.memory-class.html mpi4py.MPI.memory.__delitem__ mpi4py.MPI.memory-class.html#__delitem__ mpi4py.MPI.memory.frombuffer mpi4py.MPI.memory-class.html#frombuffer mpi4py.MPI.memory.__new__ mpi4py.MPI.memory-class.html#__new__ mpi4py.MPI.memory.__getitem__ mpi4py.MPI.memory-class.html#__getitem__ mpi4py.MPI.memory.tobytes mpi4py.MPI.memory-class.html#tobytes mpi4py.MPI.memory.__setitem__ mpi4py.MPI.memory-class.html#__setitem__ mpi4py.MPI.memory.readonly mpi4py.MPI.memory-class.html#readonly mpi4py.MPI.memory.nbytes mpi4py.MPI.memory-class.html#nbytes mpi4py.MPI.memory.address mpi4py.MPI.memory-class.html#address mpi4py.MPI.memory.release mpi4py.MPI.memory-class.html#release mpi4py.MPI.memory.fromaddress mpi4py.MPI.memory-class.html#fromaddress mpi4py.MPI.memory.__len__ mpi4py.MPI.memory-class.html#__len__ mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Comm-class.html0000664000175000017500000030167513560002764022745 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Comm
Package mpi4py :: Module MPI :: Class Comm
[hide private]
[frames] | no frames]

type Comm

Known Subclasses:

Communicator
Instance Methods [hide private]
 
Abort(self, int errorcode=0)
Terminate MPI execution environment
 
Allgather(self, sendbuf, recvbuf)
Gather to All, gather data from all processes and distribute it to all other processes in a group
 
Allgatherv(self, sendbuf, recvbuf)
Gather to All Vector, gather data from all processes and distribute it to all other processes in a group providing different amount of data and displacements
 
Allreduce(self, sendbuf, recvbuf, Op op=SUM)
All Reduce
 
Alltoall(self, sendbuf, recvbuf)
All to All Scatter/Gather, send data from all to all processes in a group
 
Alltoallv(self, sendbuf, recvbuf)
All to All Scatter/Gather Vector, send data from all to all processes in a group providing different amount of data and displacements
 
Alltoallw(self, sendbuf, recvbuf)
Generalized All-to-All communication allowing different counts, displacements and datatypes for each partner
 
Barrier(self)
Barrier synchronization
 
Bcast(self, buf, int root=0)
Broadcast a message from one process to all other processes in a group
 
Bsend(self, buf, int dest, int tag=0)
Blocking send in buffered mode
 
Bsend_init(self, buf, int dest, int tag=0)
Persistent request for a send in buffered mode
 
Call_errhandler(self, int errorcode)
Call the error handler installed on a communicator
 
Clone(self)
Clone an existing communicator
 
Compare(type cls, Comm comm1, Comm comm2)
Compare two communicators
 
Create(self, Group group)
Create communicator from group
 
Create_group(self, Group group, int tag=0)
Create communicator from group
 
Create_keyval(type cls, copy_fn=None, delete_fn=None, nopython=False)
Create a new attribute key for communicators
 
Delete_attr(self, int keyval)
Delete attribute value associated with a key
 
Disconnect(self)
Disconnect from a communicator
 
Dup(self, Info info=None)
Duplicate an existing communicator
 
Dup_with_info(self, Info info)
Duplicate an existing communicator
 
Free(self)
Free a communicator
 
Free_keyval(type cls, int keyval)
Free and attribute key for communicators
 
Gather(self, sendbuf, recvbuf, int root=0)
Gather together values from a group of processes
 
Gatherv(self, sendbuf, recvbuf, int root=0)
Gather Vector, gather data to one process from all other processes in a group providing different amount of data and displacements at the receiving sides
 
Get_attr(self, int keyval)
Retrieve attribute value by key
 
Get_errhandler(self)
Get the error handler for a communicator
 
Get_group(self)
Access the group associated with a communicator
 
Get_info(self)
Return the hints for a communicator that are currently in use
 
Get_name(self)
Get the print name for this communicator
 
Get_parent(type cls)
Return the parent intercommunicator for this process
 
Get_rank(self)
Return the rank of this process in a communicator
 
Get_size(self)
Return the number of processes in a communicator
 
Get_topology(self)
Determine the type of topology (if any) associated with a communicator
 
Iallgather(self, sendbuf, recvbuf)
Nonblocking Gather to All
 
Iallgatherv(self, sendbuf, recvbuf)
Nonblocking Gather to All Vector
 
Iallreduce(self, sendbuf, recvbuf, Op op=SUM)
Nonblocking All Reduce
 
Ialltoall(self, sendbuf, recvbuf)
Nonblocking All to All Scatter/Gather
 
Ialltoallv(self, sendbuf, recvbuf)
Nonblocking All to All Scatter/Gather Vector
 
Ialltoallw(self, sendbuf, recvbuf)
Nonblocking Generalized All-to-All
 
Ibarrier(self)
Nonblocking Barrier
 
Ibcast(self, buf, int root=0)
Nonblocking Broadcast
 
Ibsend(self, buf, int dest, int tag=0)
Nonblocking send in buffered mode
 
Idup(self)
Nonblocking duplicate an existing communicator
 
Igather(self, sendbuf, recvbuf, int root=0)
Nonblocking Gather
 
Igatherv(self, sendbuf, recvbuf, int root=0)
Nonblocking Gather Vector
 
Improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Nonblocking test for a matched message
 
Iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Nonblocking test for a message
 
Irecv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG)
Nonblocking receive
 
Ireduce(self, sendbuf, recvbuf, Op op=SUM, int root=0)
Nonblocking Reduce
 
Ireduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM)
Nonblocking Reduce-Scatter (vector version)
 
Ireduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM)
Nonblocking Reduce-Scatter Block (regular, non-vector version)
 
Irsend(self, buf, int dest, int tag=0)
Nonblocking send in ready mode
 
Is_inter(self)
Test to see if a comm is an intercommunicator
 
Is_intra(self)
Test to see if a comm is an intracommunicator
 
Iscatter(self, sendbuf, recvbuf, int root=0)
Nonblocking Scatter
 
Iscatterv(self, sendbuf, recvbuf, int root=0)
Nonblocking Scatter Vector
 
Isend(self, buf, int dest, int tag=0)
Nonblocking send
 
Issend(self, buf, int dest, int tag=0)
Nonblocking send in synchronous mode
 
Join(type cls, int fd)
Create a intercommunicator by joining two processes connected by a socket
 
Mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Blocking test for a matched message
 
Probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Blocking test for a message
 
Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Blocking receive
 
Recv_init(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG)
Create a persistent request for a receive
 
Reduce(self, sendbuf, recvbuf, Op op=SUM, int root=0)
Reduce
 
Reduce_scatter(self, sendbuf, recvbuf, recvcounts=None, Op op=SUM)
Reduce-Scatter (vector version)
 
Reduce_scatter_block(self, sendbuf, recvbuf, Op op=SUM)
Reduce-Scatter Block (regular, non-vector version)
 
Rsend(self, buf, int dest, int tag=0)
Blocking send in ready mode
 
Rsend_init(self, buf, int dest, int tag=0)
Persistent request for a send in ready mode
 
Scatter(self, sendbuf, recvbuf, int root=0)
Scatter data from one process to all other processes in a group
 
Scatterv(self, sendbuf, recvbuf, int root=0)
Scatter Vector, scatter data from one process to all other processes in a group providing different amount of data and displacements at the sending side
 
Send(self, buf, int dest, int tag=0)
Blocking send
 
Send_init(self, buf, int dest, int tag=0)
Create a persistent request for a standard send
 
Sendrecv(self, sendbuf, int dest, int sendtag=0, recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None)
Send and receive a message
 
Sendrecv_replace(self, buf, int dest, int sendtag=0, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None)
Send and receive a message
 
Set_attr(self, int keyval, attrval)
Store attribute value associated with a key
 
Set_errhandler(self, Errhandler errhandler)
Set the error handler for a communicator
 
Set_info(self, Info info)
Set new values for the hints associated with a communicator
 
Set_name(self, name)
Set the print name for this communicator
 
Split(self, int color=0, int key=0)
Split communicator by color and key
 
Split_type(self, int split_type, int key=0, Info info=INFO_NULL)
Split communicator by color and key
 
Ssend(self, buf, int dest, int tag=0)
Blocking send in synchronous mode
 
Ssend_init(self, buf, int dest, int tag=0)
Persistent request for a send in synchronous mode
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
allgather(self, sendobj)
Gather to All
 
allreduce(self, sendobj, op=SUM)
Reduce to All
 
alltoall(self, sendobj)
All to All Scatter/Gather
 
barrier(self)
Barrier
 
bcast(self, obj, int root=0)
Broadcast
 
bsend(self, obj, int dest, int tag=0)
Send in buffered mode
 
f2py(type cls, arg)
 
gather(self, sendobj, int root=0)
Gather
 
ibsend(self, obj, int dest, int tag=0)
Nonblocking send in buffered mode
 
improbe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Nonblocking test for a matched message
 
iprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Nonblocking test for a message
 
irecv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG)
Nonblocking receive
 
isend(self, obj, int dest, int tag=0)
Nonblocking send
 
issend(self, obj, int dest, int tag=0)
Nonblocking send in synchronous mode
 
mprobe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Blocking test for a matched message
 
probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Blocking test for a message
 
py2f(self)
 
recv(self, buf=None, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Receive
 
reduce(self, sendobj, op=SUM, int root=0)
Reduce
 
scatter(self, sendobj, int root=0)
Scatter
 
send(self, obj, int dest, int tag=0)
Send
 
sendrecv(self, sendobj, int dest, int sendtag=0, recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None)
Send and Receive
 
ssend(self, obj, int dest, int tag=0)
Send in synchronous mode
Properties [hide private]
  group
communicator group
  info
communicator info
  is_inter
is intercommunicator
  is_intra
is intracommunicator
  is_topo
is a topology communicator
  name
communicator name
  rank
rank of this process in communicator
  size
number of processes in communicator
  topology
communicator topology type
Method Details [hide private]

Abort(self, int errorcode=0)

 

Terminate MPI execution environment

This is a direct call, use it with care!!!.

Probe(self, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)

 

Blocking test for a message

This function blocks until the message arrives.

Recv(self, buf, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)

 

Blocking receive

This function blocks until the message is received

Send(self, buf, int dest, int tag=0)

 

Blocking send

This function may block until the message is received. Whether or not Send blocks depends on several factors and is implementation dependent

Sendrecv(self, sendbuf, int dest, int sendtag=0, recvbuf=None, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None)

 

Send and receive a message

This function is guaranteed not to deadlock in situations where pairs of blocking sends and receives may deadlock.A common mistake when using this function is to mismatch the tags with the source and destination ranks, which can result in deadlock.

Sendrecv_replace(self, buf, int dest, int sendtag=0, int source=ANY_SOURCE, int recvtag=ANY_TAG, Status status=None)

 

Send and receive a message

This function is guaranteed not to deadlock in situations where pairs of blocking sends and receives may deadlock.A common mistake when using this function is to mismatch the tags with the source and destination ranks, which can result in deadlock.

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/class-tree.html0000664000175000017500000002001513560002764021126 0ustar dalcinldalcinl00000000000000 Class Hierarchy
 
[hide private]
[frames] | no frames]
[ Module Hierarchy | Class Hierarchy ]

Class Hierarchy

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Info-class.html0000664000175000017500000006112513560002764022736 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Info
Package mpi4py :: Module MPI :: Class Info
[hide private]
[frames] | no frames]

type Info


Info
Instance Methods [hide private]
 
Create(type cls)
Create a new, empty info object
 
Delete(self, key)
Remove a (key, value) pair from info
 
Dup(self)
Duplicate an existing info object, creating a new object, with the same (key, value) pairs and the same ordering of keys
 
Free(self)
Free a info object
 
Get(self, key, int maxlen=-1)
Retrieve the value associated with a key
 
Get_nkeys(self)
Return the number of currently defined keys in info
 
Get_nthkey(self, int n)
Return the nth defined key in info.
 
Set(self, key, value)
Add the (key, value) pair to info, and overrides the value if a value for the same key was previously set
 
__contains__(y)
y in x
 
__delitem__(y)
del x[y]
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__getitem__(y)
x[y]
 
__gt__(y)
x>y
 
__iter__() <==> iter(x)
 
__le__(y)
x<=y
 
__len__() <==> len(x)
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
__setitem__(i, y)
x[i]=y
 
clear(self)
info clear
 
copy(self)
info copy
 
f2py(type cls, arg)
 
get(self, key, default=None)
info get
 
items(self)
info items
 
keys(self)
info keys
 
py2f(self)
 
update(self, other=(), **kwds)
info update
 
values(self)
info values
Method Details [hide private]

Get_nthkey(self, int n)

 
Return the nth defined key in info. Keys are numbered in the range [0, N) where N is the value returned by Info.Get\_nkeys()

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Win-class.html0000664000175000017500000013623713560002764022607 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Win
Package mpi4py :: Module MPI :: Class Win
[hide private]
[frames] | no frames]

type Win


Window
Instance Methods [hide private]
 
Accumulate(self, origin, int target_rank, target=None, Op op=SUM)
Accumulate data into the target process
 
Allocate(type cls, Aint size, int disp_unit=1, Info info=INFO_NULL, Intracomm comm=COMM_SELF)
Create an window object for one-sided communication
 
Allocate_shared(type cls, Aint size, int disp_unit=1, Info info=INFO_NULL, Intracomm comm=COMM_SELF)
Create an window object for one-sided communication
 
Attach(self, memory)
Attach a local memory region
 
Call_errhandler(self, int errorcode)
Call the error handler installed on a window
 
Compare_and_swap(self, origin, compare, result, int target_rank, Aint target_disp=0)
Perform one-sided atomic compare-and-swap
 
Complete(self)
Completes an RMA operations begun after an Win.Start()
 
Create(type cls, memory, int disp_unit=1, Info info=INFO_NULL, Intracomm comm=COMM_SELF)
Create an window object for one-sided communication
 
Create_dynamic(type cls, Info info=INFO_NULL, Intracomm comm=COMM_SELF)
Create an window object for one-sided communication
 
Create_keyval(type cls, copy_fn=None, delete_fn=None, nopython=False)
Create a new attribute key for windows
 
Delete_attr(self, int keyval)
Delete attribute value associated with a key
 
Detach(self, memory)
Detach a local memory region
 
Fence(self, int assertion=0)
Perform an MPI fence synchronization on a window
 
Fetch_and_op(self, origin, result, int target_rank, Aint target_disp=0, Op op=SUM)
Perform one-sided read-modify-write
 
Flush(self, int rank)
Complete all outstanding RMA operations at the given target
 
Flush_all(self)
Complete all outstanding RMA operations at all targets
 
Flush_local(self, int rank)
Complete locally all outstanding RMA operations at the given target
 
Flush_local_all(self)
Complete locally all outstanding RMA opera- tions at all targets
 
Free(self)
Free a window
 
Free_keyval(type cls, int keyval)
Free and attribute key for windows
 
Get(self, origin, int target_rank, target=None)
Get data from a memory window on a remote process.
 
Get_accumulate(self, origin, result, int target_rank, target=None, Op op=SUM)
Fetch-and-accumulate data into the target process
 
Get_attr(self, int keyval)
Retrieve attribute value by key
 
Get_errhandler(self)
Get the error handler for a window
 
Get_group(self)
Return a duplicate of the group of the communicator used to create the window
 
Get_info(self)
Return the hints for a windows that are currently in use
 
Get_name(self)
Get the print name associated with the window
 
Lock(self, int rank, int lock_type=LOCK_EXCLUSIVE, int assertion=0)
Begin an RMA access epoch at the target process
 
Lock_all(self, int assertion=0)
Begin an RMA access epoch at all processes
 
Post(self, Group group, int assertion=0)
Start an RMA exposure epoch
 
Put(self, origin, int target_rank, target=None)
Put data into a memory window on a remote process.
 
Raccumulate(self, origin, int target_rank, target=None, Op op=SUM)
Fetch-and-accumulate data into the target process
 
Rget(self, origin, int target_rank, target=None)
Get data from a memory window on a remote process.
 
Rget_accumulate(self, origin, result, int target_rank, target=None, Op op=SUM)
Accumulate data into the target process using remote memory access.
 
Rput(self, origin, int target_rank, target=None)
Put data into a memory window on a remote process.
 
Set_attr(self, int keyval, attrval)
Store attribute value associated with a key
 
Set_errhandler(self, Errhandler errhandler)
Set the error handler for a window
 
Set_info(self, Info info)
Set new values for the hints associated with a window
 
Set_name(self, name)
Set the print name associated with the window
 
Shared_query(self, int rank)
Query the process-local address for remote memory segments created with Win.Allocate\_shared()
 
Start(self, Group group, int assertion=0)
Start an RMA access epoch for MPI
 
Sync(self)
Synchronize public and private copies of the given window
 
Test(self)
Test whether an RMA exposure epoch has completed
 
Unlock(self, int rank)
Complete an RMA access epoch at the target process
 
Unlock_all(self)
Complete an RMA access epoch at all processes
 
Wait(self)
Complete an RMA exposure epoch begun with Win.Post()
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
f2py(type cls, arg)
 
py2f(self)
 
tomemory(self)
Return window memory buffer
Properties [hide private]
  attrs
window attributes
  flavor
window create flavor
  group
window group
  info
window info
  model
window memory model
  name
window name
Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/identifier-index.html0000664000175000017500000060627213560002764022332 0ustar dalcinldalcinl00000000000000 Identifier Index
 
[hide private]
[frames] | no frames]

Identifier Index

[ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ ]

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

_



mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Status-class.html0000664000175000017500000005207313560002764023330 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Status
Package mpi4py :: Module MPI :: Class Status
[hide private]
[frames] | no frames]

type Status


Status
Instance Methods [hide private]
 
Get_count(self, Datatype datatype=BYTE)
Get the number of top level elements
 
Get_elements(self, Datatype datatype)
Get the number of basic elements in a datatype
 
Get_error(self)
Get message error
 
Get_source(self)
Get message source
 
Get_tag(self)
Get message tag
 
Is_cancelled(self)
Test to see if a request was cancelled
 
Set_cancelled(self, bool flag)
Set the cancelled state associated with a status
 
Set_elements(self, Datatype datatype, Count count)
Set the number of elements in a status
 
Set_error(self, int error)
Set message error
 
Set_source(self, int source)
Set message source
 
Set_tag(self, int tag)
Set message tag
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
f2py(type cls, arg)
 
py2f(self)
Properties [hide private]
  cancelled
cancelled state
  count
byte count
  error
error
  source
source
  tag
tag
Method Details [hide private]

Set_cancelled(self, bool flag)

 

Set the cancelled state associated with a status

This should be only used when implementing query callback functions for generalized requests

Set_elements(self, Datatype datatype, Count count)

 

Set the number of elements in a status

This should be only used when implementing query callback functions for generalized requests

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/index.html0000664000175000017500000000111113560002764020167 0ustar dalcinldalcinl00000000000000 MPI for Python mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Exception-class.html0000664000175000017500000005512213560002764024001 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Exception
Package mpi4py :: Module MPI :: Class Exception
[hide private]
[frames] | no frames]

type Exception


Exception
Instance Methods [hide private]
 
Get_error_class(self)
Error class
 
Get_error_code(self)
Error code
 
Get_error_string(self)
Error string
 
__bool__(self)
 
__eq__(self, error)
 
__ge__(self, error)
 
__gt__(self, error)
 
__hash__(self)
 
__init__(self, int ierr=0)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__int__(self)
 
__le__(self, error)
 
__lt__(self, error)
 
__ne__(self, error)
 
__nonzero__(self)
 
__repr__(self)
 
__str__(self)

Inherited from exceptions.RuntimeError: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __setattr__, __setstate__, __unicode__

Class Variables [hide private]
  __qualname__ = 'Exception'
Properties [hide private]
  error_class
error class
  error_code
error code
  error_string
error string

Inherited from exceptions.BaseException: args, message

Method Details [hide private]

__hash__(self)
(Hashing function)

 
Overrides: object.__hash__

__init__(self, int ierr=0)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: exceptions.BaseException.__init__

__repr__(self)
(Representation operator)

 
Overrides: exceptions.BaseException.__repr__

__str__(self)
(Informal representation operator)

 
Overrides: exceptions.BaseException.__str__

Property Details [hide private]

error_class

error class
Get Method:
Get_error_class(self) - Error class

error_code

error code
Get Method:
Get_error_code(self) - Error code

error_string

error string
Get Method:
Get_error_string(self) - Error string

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.memory-class.html0000664000175000017500000003332013560002764023347 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.memory
Package mpi4py :: Module MPI :: Class memory
[hide private]
[frames] | no frames]

type memory


Memory
Instance Methods [hide private]
 
__delitem__(y)
del x[y]
 
__getitem__(y)
x[y]
 
__len__() <==> len(x)
a new object with type S, a subtype of T
__new__(S, ...)
 
__setitem__(i, y)
x[i]=y
 
release(self)
Release the underlying buffer exposed by the memory object
 
tobytes(self)
Return the data in the buffer as a byte string
Static Methods [hide private]
 
fromaddress(address, nbytes, bool readonly=False)
Memory from address and size in bytes
 
frombuffer(obj, bool readonly=False)
Memory from buffer-like object
Properties [hide private]
  address
Memory address
  nbytes
Memory size (in bytes)
  readonly
Boolean indicating whether the memory is read-only
Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.File-class.html0000664000175000017500000015200513560002764022720 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.File
Package mpi4py :: Module MPI :: Class File
[hide private]
[frames] | no frames]

type File


File
Instance Methods [hide private]
 
Call_errhandler(self, int errorcode)
Call the error handler installed on a file
 
Close(self)
Close a file
 
Delete(type cls, filename, Info info=INFO_NULL)
Delete a file
 
Get_amode(self)
Return the file access mode
 
Get_atomicity(self)
Return the atomicity mode
 
Get_byte_offset(self, Offset offset)
Returns the absolute byte position in the file corresponding to 'offset' etypes relative to the current view
 
Get_errhandler(self)
Get the error handler for a file
 
Get_group(self)
Return the group of processes that opened the file
 
Get_info(self)
Return the hints for a file that that are currently in use
 
Get_position(self)
Return the current position of the individual file pointer in etype units relative to the current view
 
Get_position_shared(self)
Return the current position of the shared file pointer in etype units relative to the current view
 
Get_size(self)
Return the file size
 
Get_type_extent(self, Datatype datatype)
Return the extent of datatype in the file
 
Get_view(self)
Return the file view
 
Iread(self, buf)
Nonblocking read using individual file pointer
 
Iread_all(self, buf)
Nonblocking collective read using individual file pointer
 
Iread_at(self, Offset offset, buf)
Nonblocking read using explicit offset
 
Iread_at_all(self, Offset offset, buf)
Nonblocking collective read using explicit offset
 
Iread_shared(self, buf)
Nonblocking read using shared file pointer
 
Iwrite(self, buf)
Nonblocking write using individual file pointer
 
Iwrite_all(self, buf)
Nonblocking collective write using individual file pointer
 
Iwrite_at(self, Offset offset, buf)
Nonblocking write using explicit offset
 
Iwrite_at_all(self, Offset offset, buf)
Nonblocking collective write using explicit offset
 
Iwrite_shared(self, buf)
Nonblocking write using shared file pointer
 
Open(type cls, Intracomm comm, filename, int amode=MODE_RDONLY, Info info=INFO_NULL)
Open a file
 
Preallocate(self, Offset size)
Preallocate storage space for a file
 
Read(self, buf, Status status=None)
Read using individual file pointer
 
Read_all(self, buf, Status status=None)
Collective read using individual file pointer
 
Read_all_begin(self, buf)
Start a split collective read using individual file pointer
 
Read_all_end(self, buf, Status status=None)
Complete a split collective read using individual file pointer
 
Read_at(self, Offset offset, buf, Status status=None)
Read using explicit offset
 
Read_at_all(self, Offset offset, buf, Status status=None)
Collective read using explicit offset
 
Read_at_all_begin(self, Offset offset, buf)
Start a split collective read using explict offset
 
Read_at_all_end(self, buf, Status status=None)
Complete a split collective read using explict offset
 
Read_ordered(self, buf, Status status=None)
Collective read using shared file pointer
 
Read_ordered_begin(self, buf)
Start a split collective read using shared file pointer
 
Read_ordered_end(self, buf, Status status=None)
Complete a split collective read using shared file pointer
 
Read_shared(self, buf, Status status=None)
Read using shared file pointer
 
Seek(self, Offset offset, int whence=SEEK_SET)
Update the individual file pointer
 
Seek_shared(self, Offset offset, int whence=SEEK_SET)
Update the shared file pointer
 
Set_atomicity(self, bool flag)
Set the atomicity mode
 
Set_errhandler(self, Errhandler errhandler)
Set the error handler for a file
 
Set_info(self, Info info)
Set new values for the hints associated with a file
 
Set_size(self, Offset size)
Sets the file size
 
Set_view(self, Offset disp=0, Datatype etype=None, Datatype filetype=None, datarep=None, Info info=INFO_NULL)
Set the file view
 
Sync(self)
Causes all previous writes to be transferred to the storage device
 
Write(self, buf, Status status=None)
Write using individual file pointer
 
Write_all(self, buf, Status status=None)
Collective write using individual file pointer
 
Write_all_begin(self, buf)
Start a split collective write using individual file pointer
 
Write_all_end(self, buf, Status status=None)
Complete a split collective write using individual file pointer
 
Write_at(self, Offset offset, buf, Status status=None)
Write using explicit offset
 
Write_at_all(self, Offset offset, buf, Status status=None)
Collective write using explicit offset
 
Write_at_all_begin(self, Offset offset, buf)
Start a split collective write using explict offset
 
Write_at_all_end(self, buf, Status status=None)
Complete a split collective write using explict offset
 
Write_ordered(self, buf, Status status=None)
Collective write using shared file pointer
 
Write_ordered_begin(self, buf)
Start a split collective write using shared file pointer
 
Write_ordered_end(self, buf, Status status=None)
Complete a split collective write using shared file pointer
 
Write_shared(self, buf, Status status=None)
Write using shared file pointer
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
f2py(type cls, arg)
 
py2f(self)
Properties [hide private]
  amode
file access mode
  atomicity
atomicity
  group
file group
  info
file info
  size
file size
Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Errhandler-class.html0000664000175000017500000003006213560002764024125 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Errhandler
Package mpi4py :: Module MPI :: Class Errhandler
[hide private]
[frames] | no frames]

type Errhandler


Error Handler
Instance Methods [hide private]
 
Free(self)
Free an error handler
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
f2py(type cls, arg)
 
py2f(self)
Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/toc-everything.html0000664000175000017500000011160613560002764022042 0ustar dalcinldalcinl00000000000000 Everything

Everything


All Classes

mpi4py.MPI.Cartcomm
mpi4py.MPI.Comm
mpi4py.MPI.Datatype
mpi4py.MPI.Distgraphcomm
mpi4py.MPI.Errhandler
mpi4py.MPI.Exception
mpi4py.MPI.File
mpi4py.MPI.Graphcomm
mpi4py.MPI.Grequest
mpi4py.MPI.Group
mpi4py.MPI.Info
mpi4py.MPI.Intercomm
mpi4py.MPI.Intracomm
mpi4py.MPI.Message
mpi4py.MPI.Op
mpi4py.MPI.Prequest
mpi4py.MPI.Request
mpi4py.MPI.Status
mpi4py.MPI.Topocomm
mpi4py.MPI.Win
mpi4py.MPI.memory

All Functions

mpi4py.MPI.Add_error_class
mpi4py.MPI.Add_error_code
mpi4py.MPI.Add_error_string
mpi4py.MPI.Aint_add
mpi4py.MPI.Aint_diff
mpi4py.MPI.Alloc_mem
mpi4py.MPI.Attach_buffer
mpi4py.MPI.Close_port
mpi4py.MPI.Compute_dims
mpi4py.MPI.Detach_buffer
mpi4py.MPI.Finalize
mpi4py.MPI.Free_mem
mpi4py.MPI.Get_address
mpi4py.MPI.Get_error_class
mpi4py.MPI.Get_error_string
mpi4py.MPI.Get_library_version
mpi4py.MPI.Get_processor_name
mpi4py.MPI.Get_version
mpi4py.MPI.Init
mpi4py.MPI.Init_thread
mpi4py.MPI.Is_finalized
mpi4py.MPI.Is_initialized
mpi4py.MPI.Is_thread_main
mpi4py.MPI.Lookup_name
mpi4py.MPI.Open_port
mpi4py.MPI.Pcontrol
mpi4py.MPI.Publish_name
mpi4py.MPI.Query_thread
mpi4py.MPI.Register_datarep
mpi4py.MPI.Unpublish_name
mpi4py.MPI.Wtick
mpi4py.MPI.Wtime
mpi4py.MPI.get_vendor

All Variables

mpi4py.MPI.AINT
mpi4py.MPI.ANY_SOURCE
mpi4py.MPI.ANY_TAG
mpi4py.MPI.APPNUM
mpi4py.MPI.BAND
mpi4py.MPI.BOOL
mpi4py.MPI.BOR
mpi4py.MPI.BOTTOM
mpi4py.MPI.BSEND_OVERHEAD
mpi4py.MPI.BXOR
mpi4py.MPI.BYTE
mpi4py.MPI.CART
mpi4py.MPI.CHAR
mpi4py.MPI.CHARACTER
mpi4py.MPI.COMBINER_CONTIGUOUS
mpi4py.MPI.COMBINER_DARRAY
mpi4py.MPI.COMBINER_DUP
mpi4py.MPI.COMBINER_F90_COMPLEX
mpi4py.MPI.COMBINER_F90_INTEGER
mpi4py.MPI.COMBINER_F90_REAL
mpi4py.MPI.COMBINER_HINDEXED
mpi4py.MPI.COMBINER_HINDEXED_BLOCK
mpi4py.MPI.COMBINER_HVECTOR
mpi4py.MPI.COMBINER_INDEXED
mpi4py.MPI.COMBINER_INDEXED_BLOCK
mpi4py.MPI.COMBINER_NAMED
mpi4py.MPI.COMBINER_RESIZED
mpi4py.MPI.COMBINER_STRUCT
mpi4py.MPI.COMBINER_SUBARRAY
mpi4py.MPI.COMBINER_VECTOR
mpi4py.MPI.COMM_NULL
mpi4py.MPI.COMM_SELF
mpi4py.MPI.COMM_TYPE_SHARED
mpi4py.MPI.COMM_WORLD
mpi4py.MPI.COMPLEX
mpi4py.MPI.COMPLEX16
mpi4py.MPI.COMPLEX32
mpi4py.MPI.COMPLEX4
mpi4py.MPI.COMPLEX8
mpi4py.MPI.CONGRUENT
mpi4py.MPI.COUNT
mpi4py.MPI.CXX_BOOL
mpi4py.MPI.CXX_DOUBLE_COMPLEX
mpi4py.MPI.CXX_FLOAT_COMPLEX
mpi4py.MPI.CXX_LONG_DOUBLE_COMPLEX
mpi4py.MPI.C_BOOL
mpi4py.MPI.C_COMPLEX
mpi4py.MPI.C_DOUBLE_COMPLEX
mpi4py.MPI.C_FLOAT_COMPLEX
mpi4py.MPI.C_LONG_DOUBLE_COMPLEX
mpi4py.MPI.DATATYPE_NULL
mpi4py.MPI.DISPLACEMENT_CURRENT
mpi4py.MPI.DISP_CUR
mpi4py.MPI.DISTRIBUTE_BLOCK
mpi4py.MPI.DISTRIBUTE_CYCLIC
mpi4py.MPI.DISTRIBUTE_DFLT_DARG
mpi4py.MPI.DISTRIBUTE_NONE
mpi4py.MPI.DIST_GRAPH
mpi4py.MPI.DOUBLE
mpi4py.MPI.DOUBLE_COMPLEX
mpi4py.MPI.DOUBLE_INT
mpi4py.MPI.DOUBLE_PRECISION
mpi4py.MPI.ERRHANDLER_NULL
mpi4py.MPI.ERRORS_ARE_FATAL
mpi4py.MPI.ERRORS_RETURN
mpi4py.MPI.ERR_ACCESS
mpi4py.MPI.ERR_AMODE
mpi4py.MPI.ERR_ARG
mpi4py.MPI.ERR_ASSERT
mpi4py.MPI.ERR_BAD_FILE
mpi4py.MPI.ERR_BASE
mpi4py.MPI.ERR_BUFFER
mpi4py.MPI.ERR_COMM
mpi4py.MPI.ERR_CONVERSION
mpi4py.MPI.ERR_COUNT
mpi4py.MPI.ERR_DIMS
mpi4py.MPI.ERR_DISP
mpi4py.MPI.ERR_DUP_DATAREP
mpi4py.MPI.ERR_FILE
mpi4py.MPI.ERR_FILE_EXISTS
mpi4py.MPI.ERR_FILE_IN_USE
mpi4py.MPI.ERR_GROUP
mpi4py.MPI.ERR_INFO
mpi4py.MPI.ERR_INFO_KEY
mpi4py.MPI.ERR_INFO_NOKEY
mpi4py.MPI.ERR_INFO_VALUE
mpi4py.MPI.ERR_INTERN
mpi4py.MPI.ERR_IN_STATUS
mpi4py.MPI.ERR_IO
mpi4py.MPI.ERR_KEYVAL
mpi4py.MPI.ERR_LASTCODE
mpi4py.MPI.ERR_LOCKTYPE
mpi4py.MPI.ERR_NAME
mpi4py.MPI.ERR_NOT_SAME
mpi4py.MPI.ERR_NO_MEM
mpi4py.MPI.ERR_NO_SPACE
mpi4py.MPI.ERR_NO_SUCH_FILE
mpi4py.MPI.ERR_OP
mpi4py.MPI.ERR_OTHER
mpi4py.MPI.ERR_PENDING
mpi4py.MPI.ERR_PORT
mpi4py.MPI.ERR_QUOTA
mpi4py.MPI.ERR_RANK
mpi4py.MPI.ERR_READ_ONLY
mpi4py.MPI.ERR_REQUEST
mpi4py.MPI.ERR_RMA_ATTACH
mpi4py.MPI.ERR_RMA_CONFLICT
mpi4py.MPI.ERR_RMA_FLAVOR
mpi4py.MPI.ERR_RMA_RANGE
mpi4py.MPI.ERR_RMA_SHARED
mpi4py.MPI.ERR_RMA_SYNC
mpi4py.MPI.ERR_ROOT
mpi4py.MPI.ERR_SERVICE
mpi4py.MPI.ERR_SIZE
mpi4py.MPI.ERR_SPAWN
mpi4py.MPI.ERR_TAG
mpi4py.MPI.ERR_TOPOLOGY
mpi4py.MPI.ERR_TRUNCATE
mpi4py.MPI.ERR_TYPE
mpi4py.MPI.ERR_UNKNOWN
mpi4py.MPI.ERR_UNSUPPORTED_DATAREP
mpi4py.MPI.ERR_UNSUPPORTED_OPERATION
mpi4py.MPI.ERR_WIN
mpi4py.MPI.FILE_NULL
mpi4py.MPI.FLOAT
mpi4py.MPI.FLOAT_INT
mpi4py.MPI.F_BOOL
mpi4py.MPI.F_COMPLEX
mpi4py.MPI.F_DOUBLE
mpi4py.MPI.F_DOUBLE_COMPLEX
mpi4py.MPI.F_FLOAT
mpi4py.MPI.F_FLOAT_COMPLEX
mpi4py.MPI.F_INT
mpi4py.MPI.GRAPH
mpi4py.MPI.GROUP_EMPTY
mpi4py.MPI.GROUP_NULL
mpi4py.MPI.HOST
mpi4py.MPI.IDENT
mpi4py.MPI.INFO_ENV
mpi4py.MPI.INFO_NULL
mpi4py.MPI.INT
mpi4py.MPI.INT16_T
mpi4py.MPI.INT32_T
mpi4py.MPI.INT64_T
mpi4py.MPI.INT8_T
mpi4py.MPI.INTEGER
mpi4py.MPI.INTEGER1
mpi4py.MPI.INTEGER16
mpi4py.MPI.INTEGER2
mpi4py.MPI.INTEGER4
mpi4py.MPI.INTEGER8
mpi4py.MPI.INT_INT
mpi4py.MPI.IN_PLACE
mpi4py.MPI.IO
mpi4py.MPI.KEYVAL_INVALID
mpi4py.MPI.LAND
mpi4py.MPI.LASTUSEDCODE
mpi4py.MPI.LB
mpi4py.MPI.LOCK_EXCLUSIVE
mpi4py.MPI.LOCK_SHARED
mpi4py.MPI.LOGICAL
mpi4py.MPI.LOGICAL1
mpi4py.MPI.LOGICAL2
mpi4py.MPI.LOGICAL4
mpi4py.MPI.LOGICAL8
mpi4py.MPI.LONG
mpi4py.MPI.LONG_DOUBLE
mpi4py.MPI.LONG_DOUBLE_INT
mpi4py.MPI.LONG_INT
mpi4py.MPI.LONG_LONG
mpi4py.MPI.LOR
mpi4py.MPI.LXOR
mpi4py.MPI.MAX
mpi4py.MPI.MAXLOC
mpi4py.MPI.MAX_DATAREP_STRING
mpi4py.MPI.MAX_ERROR_STRING
mpi4py.MPI.MAX_INFO_KEY
mpi4py.MPI.MAX_INFO_VAL
mpi4py.MPI.MAX_LIBRARY_VERSION_STRING
mpi4py.MPI.MAX_OBJECT_NAME
mpi4py.MPI.MAX_PORT_NAME
mpi4py.MPI.MAX_PROCESSOR_NAME
mpi4py.MPI.MESSAGE_NO_PROC
mpi4py.MPI.MESSAGE_NULL
mpi4py.MPI.MIN
mpi4py.MPI.MINLOC
mpi4py.MPI.MODE_APPEND
mpi4py.MPI.MODE_CREATE
mpi4py.MPI.MODE_DELETE_ON_CLOSE
mpi4py.MPI.MODE_EXCL
mpi4py.MPI.MODE_NOCHECK
mpi4py.MPI.MODE_NOPRECEDE
mpi4py.MPI.MODE_NOPUT
mpi4py.MPI.MODE_NOSTORE
mpi4py.MPI.MODE_NOSUCCEED
mpi4py.MPI.MODE_RDONLY
mpi4py.MPI.MODE_RDWR
mpi4py.MPI.MODE_SEQUENTIAL
mpi4py.MPI.MODE_UNIQUE_OPEN
mpi4py.MPI.MODE_WRONLY
mpi4py.MPI.NO_OP
mpi4py.MPI.OFFSET
mpi4py.MPI.OP_NULL
mpi4py.MPI.ORDER_C
mpi4py.MPI.ORDER_F
mpi4py.MPI.ORDER_FORTRAN
mpi4py.MPI.PACKED
mpi4py.MPI.PROC_NULL
mpi4py.MPI.PROD
mpi4py.MPI.REAL
mpi4py.MPI.REAL16
mpi4py.MPI.REAL2
mpi4py.MPI.REAL4
mpi4py.MPI.REAL8
mpi4py.MPI.REPLACE
mpi4py.MPI.REQUEST_NULL
mpi4py.MPI.ROOT
mpi4py.MPI.SEEK_CUR
mpi4py.MPI.SEEK_END
mpi4py.MPI.SEEK_SET
mpi4py.MPI.SHORT
mpi4py.MPI.SHORT_INT
mpi4py.MPI.SIGNED_CHAR
mpi4py.MPI.SIGNED_INT
mpi4py.MPI.SIGNED_LONG
mpi4py.MPI.SIGNED_LONG_LONG
mpi4py.MPI.SIGNED_SHORT
mpi4py.MPI.SIMILAR
mpi4py.MPI.SINT16_T
mpi4py.MPI.SINT32_T
mpi4py.MPI.SINT64_T
mpi4py.MPI.SINT8_T
mpi4py.MPI.SUBVERSION
mpi4py.MPI.SUCCESS
mpi4py.MPI.SUM
mpi4py.MPI.TAG_UB
mpi4py.MPI.THREAD_FUNNELED
mpi4py.MPI.THREAD_MULTIPLE
mpi4py.MPI.THREAD_SERIALIZED
mpi4py.MPI.THREAD_SINGLE
mpi4py.MPI.TWOINT
mpi4py.MPI.TYPECLASS_COMPLEX
mpi4py.MPI.TYPECLASS_INTEGER
mpi4py.MPI.TYPECLASS_REAL
mpi4py.MPI.UB
mpi4py.MPI.UINT16_T
mpi4py.MPI.UINT32_T
mpi4py.MPI.UINT64_T
mpi4py.MPI.UINT8_T
mpi4py.MPI.UNDEFINED
mpi4py.MPI.UNEQUAL
mpi4py.MPI.UNIVERSE_SIZE
mpi4py.MPI.UNSIGNED
mpi4py.MPI.UNSIGNED_CHAR
mpi4py.MPI.UNSIGNED_INT
mpi4py.MPI.UNSIGNED_LONG
mpi4py.MPI.UNSIGNED_LONG_LONG
mpi4py.MPI.UNSIGNED_SHORT
mpi4py.MPI.UNWEIGHTED
mpi4py.MPI.VERSION
mpi4py.MPI.WCHAR
mpi4py.MPI.WEIGHTS_EMPTY
mpi4py.MPI.WIN_BASE
mpi4py.MPI.WIN_CREATE_FLAVOR
mpi4py.MPI.WIN_DISP_UNIT
mpi4py.MPI.WIN_FLAVOR
mpi4py.MPI.WIN_FLAVOR_ALLOCATE
mpi4py.MPI.WIN_FLAVOR_CREATE
mpi4py.MPI.WIN_FLAVOR_DYNAMIC
mpi4py.MPI.WIN_FLAVOR_SHARED
mpi4py.MPI.WIN_MODEL
mpi4py.MPI.WIN_NULL
mpi4py.MPI.WIN_SEPARATE
mpi4py.MPI.WIN_SIZE
mpi4py.MPI.WIN_UNIFIED
mpi4py.MPI.WTIME_IS_GLOBAL
mpi4py.MPI.__pyx_capi__
mpi4py.MPI.pickle

[hide private] mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Group-class.html0000664000175000017500000005352113560002764023140 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Group
Package mpi4py :: Module MPI :: Class Group
[hide private]
[frames] | no frames]

type Group


Group
Instance Methods [hide private]
 
Compare(type cls, Group group1, Group group2)
Compare two groups
 
Difference(type cls, Group group1, Group group2)
Produce a group from the difference of two existing groups
 
Dup(self)
Duplicate a group
 
Excl(self, ranks)
Produce a group by reordering an existing group and taking only unlisted members
 
Free(self)
Free a group
 
Get_rank(self)
Return the rank of this process in a group
 
Get_size(self)
Return the size of a group
 
Incl(self, ranks)
Produce a group by reordering an existing group and taking only listed members
 
Intersect(type cls, Group group1, Group group2)
Produce a group as the intersection of two existing groups
 
Intersection(type cls, Group group1, Group group2)
Produce a group as the intersection of two existing groups
 
Range_excl(self, ranks)
Create a new group by excluding ranges of processes from an existing group
 
Range_incl(self, ranks)
Create a new group from ranges of of ranks in an existing group
 
Translate_ranks(type cls, Group group1, ranks1, Group group2=None)
Translate the ranks of processes in one group to those in another group
 
Union(type cls, Group group1, Group group2)
Produce a group by combining two existing groups
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
f2py(type cls, arg)
 
py2f(self)
Properties [hide private]
  rank
rank of this process in group
  size
number of processes in group
Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Graphcomm-class.html0000664000175000017500000006231113560002764023756 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Graphcomm
Package mpi4py :: Module MPI :: Class Graphcomm
[hide private]
[frames] | no frames]

type Graphcomm


General graph topology intracommunicator
Instance Methods [hide private]
 
Get_dims(self)
Return the number of nodes and edges
 
Get_neighbors(self, int rank)
Return list of neighbors of a process
 
Get_neighbors_count(self, int rank)
Return number of neighbors of a process
 
Get_topo(self)
Return index and edges
a new object with type S, a subtype of T
__new__(S, ...)

Inherited from Topocomm: Ineighbor_allgather, Ineighbor_allgatherv, Ineighbor_alltoall, Ineighbor_alltoallv, Ineighbor_alltoallw, Neighbor_allgather, Neighbor_allgatherv, Neighbor_alltoall, Neighbor_alltoallv, Neighbor_alltoallw, neighbor_allgather, neighbor_alltoall

Inherited from Intracomm: Accept, Cart_map, Connect, Create_cart, Create_dist_graph, Create_dist_graph_adjacent, Create_graph, Create_intercomm, Exscan, Graph_map, Iexscan, Iscan, Scan, Spawn, Spawn_multiple, exscan, scan

Inherited from Comm: Abort, Allgather, Allgatherv, Allreduce, Alltoall, Alltoallv, Alltoallw, Barrier, Bcast, Bsend, Bsend_init, Call_errhandler, Clone, Compare, Create, Create_group, Create_keyval, Delete_attr, Disconnect, Dup, Dup_with_info, Free, Free_keyval, Gather, Gatherv, Get_attr, Get_errhandler, Get_group, Get_info, Get_name, Get_parent, Get_rank, Get_size, Get_topology, Iallgather, Iallgatherv, Iallreduce, Ialltoall, Ialltoallv, Ialltoallw, Ibarrier, Ibcast, Ibsend, Idup, Igather, Igatherv, Improbe, Iprobe, Irecv, Ireduce, Ireduce_scatter, Ireduce_scatter_block, Irsend, Is_inter, Is_intra, Iscatter, Iscatterv, Isend, Issend, Join, Mprobe, Probe, Recv, Recv_init, Reduce, Reduce_scatter, Reduce_scatter_block, Rsend, Rsend_init, Scatter, Scatterv, Send, Send_init, Sendrecv, Sendrecv_replace, Set_attr, Set_errhandler, Set_info, Set_name, Split, Split_type, Ssend, Ssend_init, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, allgather, allreduce, alltoall, barrier, bcast, bsend, f2py, gather, ibsend, improbe, iprobe, irecv, isend, issend, mprobe, probe, py2f, recv, reduce, scatter, send, sendrecv, ssend

Properties [hide private]
  dims
number of nodes and edges
  edges
edges
  index
index
  nedges
number of edges
  neighbors
neighbors
  nneighbors
number of neighbors
  nnodes
number of nodes
  topo
topology information

Inherited from Topocomm: degrees, indegree, inedges, inoutedges, outdegree, outedges

Inherited from Comm: group, info, is_inter, is_intra, is_topo, name, rank, size, topology

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: Comm.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Message-class.html0000664000175000017500000004341313560002764023427 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Message
Package mpi4py :: Module MPI :: Class Message
[hide private]
[frames] | no frames]

type Message


Message
Instance Methods [hide private]
 
Iprobe(type cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Nonblocking test for a matched message
 
Irecv(self, buf)
Nonblocking receive of matched message
 
Probe(type cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Blocking test for a matched message
 
Recv(self, buf, Status status=None)
Blocking receive of matched message
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
f2py(type cls, arg)
 
iprobe(type cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Nonblocking test for a matched message
 
irecv(self)
Nonblocking receive of matched message
 
probe(type cls, Comm comm, int source=ANY_SOURCE, int tag=ANY_TAG, Status status=None)
Blocking test for a matched message
 
py2f(self)
 
recv(self, Status status=None)
Blocking receive of matched message
Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Intracomm-class.html0000664000175000017500000007723213560002764024002 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Intracomm
Package mpi4py :: Module MPI :: Class Intracomm
[hide private]
[frames] | no frames]

type Intracomm

Known Subclasses:

Intracommunicator
Instance Methods [hide private]
 
Accept(self, port_name, Info info=INFO_NULL, int root=0)
Accept a request to form a new intercommunicator
 
Cart_map(self, dims, periods=None)
Return an optimal placement for the calling process on the physical machine
 
Connect(self, port_name, Info info=INFO_NULL, int root=0)
Make a request to form a new intercommunicator
 
Create_cart(self, dims, periods=None, bool reorder=False)
Create cartesian communicator
 
Create_dist_graph(self, sources, degrees, destinations, weights=None, Info info=INFO_NULL, bool reorder=False)
Create distributed graph communicator
 
Create_dist_graph_adjacent(self, sources, destinations, sourceweights=None, destweights=None, Info info=INFO_NULL, bool reorder=False)
Create distributed graph communicator
 
Create_graph(self, index, edges, bool reorder=False)
Create graph communicator
 
Create_intercomm(self, int local_leader, Intracomm peer_comm, int remote_leader, int tag=0)
Create intercommunicator
 
Exscan(self, sendbuf, recvbuf, Op op=SUM)
Exclusive Scan
 
Graph_map(self, index, edges)
Return an optimal placement for the calling process on the physical machine
 
Iexscan(self, sendbuf, recvbuf, Op op=SUM)
Inclusive Scan
 
Iscan(self, sendbuf, recvbuf, Op op=SUM)
Inclusive Scan
 
Scan(self, sendbuf, recvbuf, Op op=SUM)
Inclusive Scan
 
Spawn(self, command, args=None, int maxprocs=1, Info info=INFO_NULL, int root=0, errcodes=None)
Spawn instances of a single MPI application
 
Spawn_multiple(self, command, args=None, maxprocs=None, info=INFO_NULL, int root=0, errcodes=None)
Spawn instances of multiple MPI applications
a new object with type S, a subtype of T
__new__(S, ...)
 
exscan(self, sendobj, op=SUM)
Exclusive Scan
 
scan(self, sendobj, op=SUM)
Inclusive Scan

Inherited from Comm: Abort, Allgather, Allgatherv, Allreduce, Alltoall, Alltoallv, Alltoallw, Barrier, Bcast, Bsend, Bsend_init, Call_errhandler, Clone, Compare, Create, Create_group, Create_keyval, Delete_attr, Disconnect, Dup, Dup_with_info, Free, Free_keyval, Gather, Gatherv, Get_attr, Get_errhandler, Get_group, Get_info, Get_name, Get_parent, Get_rank, Get_size, Get_topology, Iallgather, Iallgatherv, Iallreduce, Ialltoall, Ialltoallv, Ialltoallw, Ibarrier, Ibcast, Ibsend, Idup, Igather, Igatherv, Improbe, Iprobe, Irecv, Ireduce, Ireduce_scatter, Ireduce_scatter_block, Irsend, Is_inter, Is_intra, Iscatter, Iscatterv, Isend, Issend, Join, Mprobe, Probe, Recv, Recv_init, Reduce, Reduce_scatter, Reduce_scatter_block, Rsend, Rsend_init, Scatter, Scatterv, Send, Send_init, Sendrecv, Sendrecv_replace, Set_attr, Set_errhandler, Set_info, Set_name, Split, Split_type, Ssend, Ssend_init, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, allgather, allreduce, alltoall, barrier, bcast, bsend, f2py, gather, ibsend, improbe, iprobe, irecv, isend, issend, mprobe, probe, py2f, recv, reduce, scatter, send, sendrecv, ssend

Properties [hide private]

Inherited from Comm: group, info, is_inter, is_intra, is_topo, name, rank, size, topology

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: Comm.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI-module.html0000664000175000017500000042363413560002764022233 0ustar dalcinldalcinl00000000000000 mpi4py.MPI
Package mpi4py :: Module MPI
[hide private]
[frames] | no frames]

Module MPI

Message Passing Interface
Classes [hide private]
Cartcomm
Cartesian topology intracommunicator
Comm
Communicator
Datatype
Datatype
Distgraphcomm
Distributed graph topology intracommunicator
Errhandler
Error Handler
Exception
Exception
File
File
Graphcomm
General graph topology intracommunicator
Grequest
Generalized request
Group
Group
Info
Info
Intercomm
Intercommunicator
Intracomm
Intracommunicator
Message
Message
Op
Op
Prequest
Persistent request
Request
Request
Status
Status
Topocomm
Topology intracommunicator
Win
Window
memory
Memory
Functions [hide private]
 
Add_error_class()
Add an error class to the known error classes
 
Add_error_code(int errorclass)
Add an error code to an error class
 
Add_error_string(int errorcode, string)
Associate an error string with an error class or errorcode
 
Aint_add(Aint base, Aint disp)
Return the sum of base address and displacement
 
Aint_diff(Aint addr1, Aint addr2)
Return the difference between absolute addresses
 
Alloc_mem(Aint size, Info info=INFO_NULL)
Allocate memory for message passing and RMA
 
Attach_buffer(buf)
Attach a user-provided buffer for sending in buffered mode
 
Close_port(port_name)
Close a port
 
Compute_dims(int nnodes, dims)
Return a balanced distribution of processes per coordinate direction
 
Detach_buffer()
Remove an existing attached buffer
 
Finalize()
Terminate the MPI execution environment
 
Free_mem(mem)
Free memory allocated with Alloc\_mem()
 
Get_address(location)
Get the address of a location in memory
 
Get_error_class(int errorcode)
Convert an error code into an error class
 
Get_error_string(int errorcode)
Return the error string for a given error class or error code
 
Get_library_version()
Obtain the version string of the MPI library
 
Get_processor_name()
Obtain the name of the calling processor
 
Get_version()
Obtain the version number of the MPI standard supported by the implementation as a tuple (version, subversion)
 
Init()
Initialize the MPI execution environment
 
Init_thread(int required=THREAD_MULTIPLE)
Initialize the MPI execution environment
 
Is_finalized()
Indicates whether Finalize has completed
 
Is_initialized()
Indicates whether Init has been called
 
Is_thread_main()
Indicate whether this thread called Init or Init_thread
 
Lookup_name(service_name, info=INFO_NULL)
Lookup a port name given a service name
 
Open_port(Info info=INFO_NULL)
Return an address that can be used to establish connections between groups of MPI processes
 
Pcontrol(int level)
Control profiling
 
Publish_name(service_name, port_name, info=INFO_NULL)
Publish a service name
 
Query_thread()
Return the level of thread support provided by the MPI library
 
Register_datarep(datarep, read_fn, write_fn, extent_fn)
Register user-defined data representations
 
Unpublish_name(service_name, port_name, info=INFO_NULL)
Unpublish a service name
 
Wtick()
Return the resolution of Wtime
 
Wtime()
Return an elapsed time on the calling processor
 
_addressof(arg)
Memory address of the underlying MPI handle
 
_handleof(arg)
Unsigned integer value with the underlying MPI handle
 
_lock_table(Comm comm)
Internal communicator lock table
 
_set_abort_status(status)
Helper for python -m mpi4py.run ...
 
_sizeof(arg)
Size in bytes of the underlying MPI handle
 
_typecode(Datatype datatype)
Map MPI datatype to typecode string
 
get_vendor()
Infomation about the underlying MPI implementation
Variables [hide private]
  AINT = <mpi4py.MPI.Datatype object at 0x7fb10d9841c8>
  ANY_SOURCE = -2
  ANY_TAG = -1
  APPNUM = 1681915917
  BAND = <mpi4py.MPI.Op object at 0x7fb1008d64b8>
  BOOL = <mpi4py.MPI.Datatype object at 0x7fb10d984378>
  BOR = <mpi4py.MPI.Op object at 0x7fb1008d64e0>
  BOTTOM = 0
  BSEND_OVERHEAD = 96
  BXOR = <mpi4py.MPI.Op object at 0x7fb1008d6580>
  BYTE = <mpi4py.MPI.Datatype object at 0x7fb10d9841b0>
  CART = 2
  CHAR = <mpi4py.MPI.Datatype object at 0x7fb10d984210>
  CHARACTER = <mpi4py.MPI.Datatype object at 0x7fb10d9845a0>
  COMBINER_CONTIGUOUS = 3
  COMBINER_DARRAY = 14
  COMBINER_DUP = 2
  COMBINER_F90_COMPLEX = 16
  COMBINER_F90_INTEGER = 17
  COMBINER_F90_REAL = 15
  COMBINER_HINDEXED = 9
  COMBINER_HINDEXED_BLOCK = 19
  COMBINER_HVECTOR = 6
  COMBINER_INDEXED = 7
  COMBINER_INDEXED_BLOCK = 10
  COMBINER_NAMED = 1
  COMBINER_RESIZED = 18
  COMBINER_STRUCT = 12
  COMBINER_SUBARRAY = 13
  COMBINER_VECTOR = 4
  COMM_NULL = <mpi4py.MPI.Comm object at 0x7fb10d984840>
  COMM_SELF = <mpi4py.MPI.Intracomm object at 0x7fb10d984858>
  COMM_TYPE_SHARED = 1
  COMM_WORLD = <mpi4py.MPI.Intracomm object at 0x7fb10d984870>
  COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d984618>
  COMPLEX16 = <mpi4py.MPI.Datatype object at 0x7fb10d9847b0>
  COMPLEX32 = <mpi4py.MPI.Datatype object at 0x7fb10d9847c8>
  COMPLEX4 = <mpi4py.MPI.Datatype object at 0x7fb10d984780>
  COMPLEX8 = <mpi4py.MPI.Datatype object at 0x7fb10d984798>
  CONGRUENT = 1
  COUNT = <mpi4py.MPI.Datatype object at 0x7fb10d9841f8>
  CXX_BOOL = <mpi4py.MPI.Datatype object at 0x7fb10d9844b0>
  CXX_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d98...
  CXX_FLOAT_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d984...
  CXX_LONG_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb...
  C_BOOL = <mpi4py.MPI.Datatype object at 0x7fb10d984378>
  C_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d984450>
  C_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d984480>
  C_FLOAT_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d984468>
  C_LONG_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10...
  DATATYPE_NULL = <mpi4py.MPI.Datatype object at 0x7fb10d984150>
  DISPLACEMENT_CURRENT = -54278278
  DISP_CUR = -54278278
  DISTRIBUTE_BLOCK = 121
  DISTRIBUTE_CYCLIC = 122
  DISTRIBUTE_DFLT_DARG = -49767
  DISTRIBUTE_NONE = 123
  DIST_GRAPH = 3
  DOUBLE = <mpi4py.MPI.Datatype object at 0x7fb10d984348>
  DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d984630>
  DOUBLE_INT = <mpi4py.MPI.Datatype object at 0x7fb10d984570>
  DOUBLE_PRECISION = <mpi4py.MPI.Datatype object at 0x7fb10d984600>
  ERRHANDLER_NULL = <mpi4py.MPI.Errhandler object at 0x7fb10d984...
  ERRORS_ARE_FATAL = <mpi4py.MPI.Errhandler object at 0x7fb10d98...
  ERRORS_RETURN = <mpi4py.MPI.Errhandler object at 0x7fb10d984120>
  ERR_ACCESS = 20
  ERR_AMODE = 21
  ERR_ARG = 12
  ERR_ASSERT = 53
  ERR_BAD_FILE = 22
  ERR_BASE = 46
  ERR_BUFFER = 1
  ERR_COMM = 5
  ERR_CONVERSION = 23
  ERR_COUNT = 2
  ERR_DIMS = 11
  ERR_DISP = 52
  ERR_DUP_DATAREP = 24
  ERR_FILE = 27
  ERR_FILE_EXISTS = 25
  ERR_FILE_IN_USE = 26
  ERR_GROUP = 8
  ERR_INFO = 28
  ERR_INFO_KEY = 29
  ERR_INFO_NOKEY = 31
  ERR_INFO_VALUE = 30
  ERR_INTERN = 16
  ERR_IN_STATUS = 17
  ERR_IO = 32
  ERR_KEYVAL = 48
  ERR_LASTCODE = 1073741823
  ERR_LOCKTYPE = 47
  ERR_NAME = 33
  ERR_NOT_SAME = 35
  ERR_NO_MEM = 34
  ERR_NO_SPACE = 36
  ERR_NO_SUCH_FILE = 37
  ERR_OP = 9
  ERR_OTHER = 15
  ERR_PENDING = 18
  ERR_PORT = 38
  ERR_QUOTA = 39
  ERR_RANK = 6
  ERR_READ_ONLY = 40
  ERR_REQUEST = 19
  ERR_RMA_ATTACH = 56
  ERR_RMA_CONFLICT = 49
  ERR_RMA_FLAVOR = 58
  ERR_RMA_RANGE = 55
  ERR_RMA_SHARED = 57
  ERR_RMA_SYNC = 50
  ERR_ROOT = 7
  ERR_SERVICE = 41
  ERR_SIZE = 51
  ERR_SPAWN = 42
  ERR_TAG = 4
  ERR_TOPOLOGY = 10
  ERR_TRUNCATE = 14
  ERR_TYPE = 3
  ERR_UNKNOWN = 13
  ERR_UNSUPPORTED_DATAREP = 43
  ERR_UNSUPPORTED_OPERATION = 44
  ERR_WIN = 45
  FILE_NULL = <mpi4py.MPI.File object at 0x7fb10d9850b0>
  FLOAT = <mpi4py.MPI.Datatype object at 0x7fb10d984330>
  FLOAT_INT = <mpi4py.MPI.Datatype object at 0x7fb10d984558>
  F_BOOL = <mpi4py.MPI.Datatype object at 0x7fb10d9845b8>
  F_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d984618>
  F_DOUBLE = <mpi4py.MPI.Datatype object at 0x7fb10d984600>
  F_DOUBLE_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d984630>
  F_FLOAT = <mpi4py.MPI.Datatype object at 0x7fb10d9845e8>
  F_FLOAT_COMPLEX = <mpi4py.MPI.Datatype object at 0x7fb10d984618>
  F_INT = <mpi4py.MPI.Datatype object at 0x7fb10d9845d0>
  GRAPH = 1
  GROUP_EMPTY = <mpi4py.MPI.Group object at 0x7fb10d984828>
  GROUP_NULL = <mpi4py.MPI.Group object at 0x7fb10d984810>
  HOST = 1681915907
  IDENT = 0
  INFO_ENV = <mpi4py.MPI.Info object at 0x7fb10d9847f8>
  INFO_NULL = <mpi4py.MPI.Info object at 0x7fb10d9847e0>
  INT = <mpi4py.MPI.Datatype object at 0x7fb10d984270>
  INT16_T = <mpi4py.MPI.Datatype object at 0x7fb10d9843a8>
  INT32_T = <mpi4py.MPI.Datatype object at 0x7fb10d9843c0>
  INT64_T = <mpi4py.MPI.Datatype object at 0x7fb10d9843d8>
  INT8_T = <mpi4py.MPI.Datatype object at 0x7fb10d984390>
  INTEGER = <mpi4py.MPI.Datatype object at 0x7fb10d9845d0>
  INTEGER1 = <mpi4py.MPI.Datatype object at 0x7fb10d9846a8>
  INTEGER16 = <mpi4py.MPI.Datatype object at 0x7fb10d984708>
  INTEGER2 = <mpi4py.MPI.Datatype object at 0x7fb10d9846c0>
  INTEGER4 = <mpi4py.MPI.Datatype object at 0x7fb10d9846d8>
  INTEGER8 = <mpi4py.MPI.Datatype object at 0x7fb10d9846f0>
  INT_INT = <mpi4py.MPI.Datatype object at 0x7fb10d984528>
  IN_PLACE = -1
  IO = 1681915909
  KEYVAL_INVALID = 603979776
  LAND = <mpi4py.MPI.Op object at 0x7fb1008d6490>
  LASTUSEDCODE = 1681915915
  LB = <mpi4py.MPI.Datatype object at 0x7fb10d984180>
  LOCK_EXCLUSIVE = 234
  LOCK_SHARED = 235
  LOGICAL = <mpi4py.MPI.Datatype object at 0x7fb10d9845b8>
  LOGICAL1 = <mpi4py.MPI.Datatype object at 0x7fb10d984648>
  LOGICAL2 = <mpi4py.MPI.Datatype object at 0x7fb10d984660>
  LOGICAL4 = <mpi4py.MPI.Datatype object at 0x7fb10d984678>
  LOGICAL8 = <mpi4py.MPI.Datatype object at 0x7fb10d984690>
  LONG = <mpi4py.MPI.Datatype object at 0x7fb10d984288>
  LONG_DOUBLE = <mpi4py.MPI.Datatype object at 0x7fb10d984360>
  LONG_DOUBLE_INT = <mpi4py.MPI.Datatype object at 0x7fb10d984588>
  LONG_INT = <mpi4py.MPI.Datatype object at 0x7fb10d984540>
  LONG_LONG = <mpi4py.MPI.Datatype object at 0x7fb10d9842a0>
  LOR = <mpi4py.MPI.Op object at 0x7fb1008d6238>
  LXOR = <mpi4py.MPI.Op object at 0x7fb1008d6558>
  MAX = <mpi4py.MPI.Op object at 0x7fb1008d63f0>
  MAXLOC = <mpi4py.MPI.Op object at 0x7fb1008d65d0>
  MAX_DATAREP_STRING = 128
  MAX_ERROR_STRING = 512
  MAX_INFO_KEY = 255
  MAX_INFO_VAL = 1024
  MAX_LIBRARY_VERSION_STRING = 8192
  MAX_OBJECT_NAME = 128
  MAX_PORT_NAME = 256
  MAX_PROCESSOR_NAME = 128
  MESSAGE_NO_PROC = <mpi4py.MPI.Message object at 0x7fb1008e02d0>
  MESSAGE_NULL = <mpi4py.MPI.Message object at 0x7fb1008e0290>
  MIN = <mpi4py.MPI.Op object at 0x7fb1008d6418>
  MINLOC = <mpi4py.MPI.Op object at 0x7fb1008d65a8>
  MODE_APPEND = 128
  MODE_CREATE = 1
  MODE_DELETE_ON_CLOSE = 16
  MODE_EXCL = 64
  MODE_NOCHECK = 1024
  MODE_NOPRECEDE = 8192
  MODE_NOPUT = 4096
  MODE_NOSTORE = 2048
  MODE_NOSUCCEED = 16384
  MODE_RDONLY = 2
  MODE_RDWR = 8
  MODE_SEQUENTIAL = 256
  MODE_UNIQUE_OPEN = 32
  MODE_WRONLY = 4
  NO_OP = <mpi4py.MPI.Op object at 0x7fb1008d6620>
  OFFSET = <mpi4py.MPI.Datatype object at 0x7fb10d9841e0>
  OP_NULL = <mpi4py.MPI.Op object at 0x7fb1008d63c8>
  ORDER_C = 56
  ORDER_F = 57
  ORDER_FORTRAN = 57
  PACKED = <mpi4py.MPI.Datatype object at 0x7fb10d984198>
  PROC_NULL = -1
  PROD = <mpi4py.MPI.Op object at 0x7fb1008d6468>
  REAL = <mpi4py.MPI.Datatype object at 0x7fb10d9845e8>
  REAL16 = <mpi4py.MPI.Datatype object at 0x7fb10d984768>
  REAL2 = <mpi4py.MPI.Datatype object at 0x7fb10d984720>
  REAL4 = <mpi4py.MPI.Datatype object at 0x7fb10d984738>
  REAL8 = <mpi4py.MPI.Datatype object at 0x7fb10d984750>
  REPLACE = <mpi4py.MPI.Op object at 0x7fb1008d65f8>
  REQUEST_NULL = <mpi4py.MPI.Request object at 0x7fb1008e0250>
  ROOT = -3
  SEEK_CUR = 602
  SEEK_END = 604
  SEEK_SET = 600
  SHORT = <mpi4py.MPI.Datatype object at 0x7fb10d984258>
  SHORT_INT = <mpi4py.MPI.Datatype object at 0x7fb10d984510>
  SIGNED_CHAR = <mpi4py.MPI.Datatype object at 0x7fb10d984240>
  SIGNED_INT = <mpi4py.MPI.Datatype object at 0x7fb10d984270>
  SIGNED_LONG = <mpi4py.MPI.Datatype object at 0x7fb10d984288>
  SIGNED_LONG_LONG = <mpi4py.MPI.Datatype object at 0x7fb10d9842a0>
  SIGNED_SHORT = <mpi4py.MPI.Datatype object at 0x7fb10d984258>
  SIMILAR = 2
  SINT16_T = <mpi4py.MPI.Datatype object at 0x7fb10d9843a8>
  SINT32_T = <mpi4py.MPI.Datatype object at 0x7fb10d9843c0>
  SINT64_T = <mpi4py.MPI.Datatype object at 0x7fb10d9843d8>
  SINT8_T = <mpi4py.MPI.Datatype object at 0x7fb10d984390>
  SUBVERSION = 1
  SUCCESS = 0
  SUM = <mpi4py.MPI.Op object at 0x7fb1008d6440>
  TAG_UB = 1681915905
  THREAD_FUNNELED = 1
  THREAD_MULTIPLE = 3
  THREAD_SERIALIZED = 2
  THREAD_SINGLE = 0
  TWOINT = <mpi4py.MPI.Datatype object at 0x7fb10d984528>
  TYPECLASS_COMPLEX = 3
  TYPECLASS_INTEGER = 2
  TYPECLASS_REAL = 1
  UB = <mpi4py.MPI.Datatype object at 0x7fb10d984168>
  UINT16_T = <mpi4py.MPI.Datatype object at 0x7fb10d984408>
  UINT32_T = <mpi4py.MPI.Datatype object at 0x7fb10d984420>
  UINT64_T = <mpi4py.MPI.Datatype object at 0x7fb10d984438>
  UINT8_T = <mpi4py.MPI.Datatype object at 0x7fb10d9843f0>
  UNDEFINED = -32766
  UNEQUAL = 3
  UNIVERSE_SIZE = 1681915913
  UNSIGNED = <mpi4py.MPI.Datatype object at 0x7fb10d9842e8>
  UNSIGNED_CHAR = <mpi4py.MPI.Datatype object at 0x7fb10d9842b8>
  UNSIGNED_INT = <mpi4py.MPI.Datatype object at 0x7fb10d9842e8>
  UNSIGNED_LONG = <mpi4py.MPI.Datatype object at 0x7fb10d984300>
  UNSIGNED_LONG_LONG = <mpi4py.MPI.Datatype object at 0x7fb10d98...
  UNSIGNED_SHORT = <mpi4py.MPI.Datatype object at 0x7fb10d9842d0>
  UNWEIGHTED = 140398193181888
  VERSION = 3
  WCHAR = <mpi4py.MPI.Datatype object at 0x7fb10d984228>
  WEIGHTS_EMPTY = 140398193181884
  WIN_BASE = 1711276033
  WIN_CREATE_FLAVOR = 1711276039
  WIN_DISP_UNIT = 1711276037
  WIN_FLAVOR = 1711276039
  WIN_FLAVOR_ALLOCATE = 2
  WIN_FLAVOR_CREATE = 1
  WIN_FLAVOR_DYNAMIC = 3
  WIN_FLAVOR_SHARED = 4
  WIN_MODEL = 1711276041
  WIN_NULL = <mpi4py.MPI.Win object at 0x7fb1008e0310>
  WIN_SEPARATE = 1
  WIN_SIZE = 1711276035
  WIN_UNIFIED = 2
  WTIME_IS_GLOBAL = 1681915911
  __pyx_capi__ = {'PyMPIComm_Get': <capsule object "MPI_Comm *(P...
  _keyval_registry = {'Comm': {}, 'Datatype': {}, 'Win': {}}
  _typedict = {'?': <mpi4py.MPI.Datatype object at 0x7fb10d98437...
  _typedict_c = {'?': <mpi4py.MPI.Datatype object at 0x7fb10d984...
  _typedict_f = {'?': <mpi4py.MPI.Datatype object at 0x7fb10d984...
  pickle = <mpi4py.MPI.Pickle object at 0x7fb1008d5870>
Function Details [hide private]

get_vendor()

 
Infomation about the underlying MPI implementation
Returns:
  • a string with the name of the MPI implementation
  • an integer 3-tuple version (major, minor, micro)

Variables Details [hide private]

CXX_DOUBLE_COMPLEX

Value:
<mpi4py.MPI.Datatype object at 0x7fb10d9844e0>

CXX_FLOAT_COMPLEX

Value:
<mpi4py.MPI.Datatype object at 0x7fb10d9844c8>

CXX_LONG_DOUBLE_COMPLEX

Value:
<mpi4py.MPI.Datatype object at 0x7fb10d9844f8>

C_LONG_DOUBLE_COMPLEX

Value:
<mpi4py.MPI.Datatype object at 0x7fb10d984498>

ERRHANDLER_NULL

Value:
<mpi4py.MPI.Errhandler object at 0x7fb10d984108>

ERRORS_ARE_FATAL

Value:
<mpi4py.MPI.Errhandler object at 0x7fb10d984138>

UNSIGNED_LONG_LONG

Value:
<mpi4py.MPI.Datatype object at 0x7fb10d984318>

__pyx_capi__

Value:
{'PyMPIComm_Get': <capsule object "MPI_Comm *(PyObject *)" at 0x7fb10d\
8eede0>,
 'PyMPIComm_New': <capsule object "PyObject *(MPI_Comm)" at 0x7fb10d8e\
edb0>,
 'PyMPIDatatype_Get': <capsule object "MPI_Datatype *(PyObject *)" at \
0x7fb10d8eeae0>,
 'PyMPIDatatype_New': <capsule object "PyObject *(MPI_Datatype)" at 0x\
7fb10d8eeab0>,
...

_typedict

Value:
{'?': <mpi4py.MPI.Datatype object at 0x7fb10d984378>,
 'B': <mpi4py.MPI.Datatype object at 0x7fb10d9842b8>,
 'D': <mpi4py.MPI.Datatype object at 0x7fb10d984480>,
 'F': <mpi4py.MPI.Datatype object at 0x7fb10d984468>,
 'G': <mpi4py.MPI.Datatype object at 0x7fb10d984498>,
 'H': <mpi4py.MPI.Datatype object at 0x7fb10d9842d0>,
 'I': <mpi4py.MPI.Datatype object at 0x7fb10d9842e8>,
 'L': <mpi4py.MPI.Datatype object at 0x7fb10d984300>,
...

_typedict_c

Value:
{'?': <mpi4py.MPI.Datatype object at 0x7fb10d984378>,
 'B': <mpi4py.MPI.Datatype object at 0x7fb10d9842b8>,
 'D': <mpi4py.MPI.Datatype object at 0x7fb10d984480>,
 'F': <mpi4py.MPI.Datatype object at 0x7fb10d984468>,
 'G': <mpi4py.MPI.Datatype object at 0x7fb10d984498>,
 'H': <mpi4py.MPI.Datatype object at 0x7fb10d9842d0>,
 'I': <mpi4py.MPI.Datatype object at 0x7fb10d9842e8>,
 'L': <mpi4py.MPI.Datatype object at 0x7fb10d984300>,
...

_typedict_f

Value:
{'?': <mpi4py.MPI.Datatype object at 0x7fb10d9845b8>,
 'c': <mpi4py.MPI.Datatype object at 0x7fb10d984618>,
 'c16': <mpi4py.MPI.Datatype object at 0x7fb10d9847b0>,
 'c32': <mpi4py.MPI.Datatype object at 0x7fb10d9847c8>,
 'c8': <mpi4py.MPI.Datatype object at 0x7fb10d984798>,
 'd': <mpi4py.MPI.Datatype object at 0x7fb10d984600>,
 'i': <mpi4py.MPI.Datatype object at 0x7fb10d9845d0>,
 'i1': <mpi4py.MPI.Datatype object at 0x7fb10d9846a8>,
...

mpi4py-3.0.3/docs/apiref/epydoc.js0000664000175000017500000002452513560002763020030 0ustar dalcinldalcinl00000000000000function toggle_private() { // Search for any private/public links on this page. Store // their old text in "cmd," so we will know what action to // take; and change their text to the opposite action. var cmd = "?"; var elts = document.getElementsByTagName("a"); for(var i=0; i...
"; elt.innerHTML = s; } } function toggle(id) { elt = document.getElementById(id+"-toggle"); if (elt.innerHTML == "-") collapse(id); else expand(id); return false; } function highlight(id) { var elt = document.getElementById(id+"-def"); if (elt) elt.className = "py-highlight-hdr"; var elt = document.getElementById(id+"-expanded"); if (elt) elt.className = "py-highlight"; var elt = document.getElementById(id+"-collapsed"); if (elt) elt.className = "py-highlight"; } function num_lines(s) { var n = 1; var pos = s.indexOf("\n"); while ( pos > 0) { n += 1; pos = s.indexOf("\n", pos+1); } return n; } // Collapse all blocks that mave more than `min_lines` lines. function collapse_all(min_lines) { var elts = document.getElementsByTagName("div"); for (var i=0; i 0) if (elt.id.substring(split, elt.id.length) == "-expanded") if (num_lines(elt.innerHTML) > min_lines) collapse(elt.id.substring(0, split)); } } function expandto(href) { var start = href.indexOf("#")+1; if (start != 0 && start != href.length) { if (href.substring(start, href.length) != "-") { collapse_all(4); pos = href.indexOf(".", start); while (pos != -1) { var id = href.substring(start, pos); expand(id); pos = href.indexOf(".", pos+1); } var id = href.substring(start, href.length); expand(id); highlight(id); } } } function kill_doclink(id) { var parent = document.getElementById(id); parent.removeChild(parent.childNodes.item(0)); } function auto_kill_doclink(ev) { if (!ev) var ev = window.event; if (!this.contains(ev.toElement)) { var parent = document.getElementById(this.parentID); parent.removeChild(parent.childNodes.item(0)); } } function doclink(id, name, targets_id) { var elt = document.getElementById(id); // If we already opened the box, then destroy it. // (This case should never occur, but leave it in just in case.) if (elt.childNodes.length > 1) { elt.removeChild(elt.childNodes.item(0)); } else { // The outer box: relative + inline positioning. var box1 = document.createElement("div"); box1.style.position = "relative"; box1.style.display = "inline"; box1.style.top = 0; box1.style.left = 0; // A shadow for fun var shadow = document.createElement("div"); shadow.style.position = "absolute"; shadow.style.left = "-1.3em"; shadow.style.top = "-1.3em"; shadow.style.background = "#404040"; // The inner box: absolute positioning. var box2 = document.createElement("div"); box2.style.position = "relative"; box2.style.border = "1px solid #a0a0a0"; box2.style.left = "-.2em"; box2.style.top = "-.2em"; box2.style.background = "white"; box2.style.padding = ".3em .4em .3em .4em"; box2.style.fontStyle = "normal"; box2.onmouseout=auto_kill_doclink; box2.parentID = id; // Get the targets var targets_elt = document.getElementById(targets_id); var targets = targets_elt.getAttribute("targets"); var links = ""; target_list = targets.split(","); for (var i=0; i" + target[0] + ""; } // Put it all together. elt.insertBefore(box1, elt.childNodes.item(0)); //box1.appendChild(box2); box1.appendChild(shadow); shadow.appendChild(box2); box2.innerHTML = "Which "+name+" do you want to see documentation for?" + ""; } return false; } function get_anchor() { var href = location.href; var start = href.indexOf("#")+1; if ((start != 0) && (start != href.length)) return href.substring(start, href.length); } function redirect_url(dottedName) { // Scan through each element of the "pages" list, and check // if "name" matches with any of them. for (var i=0; i-m" or "-c"; // extract the portion & compare it to dottedName. var pagename = pages[i].substring(0, pages[i].length-2); if (pagename == dottedName.substring(0,pagename.length)) { // We've found a page that matches `dottedName`; // construct its URL, using leftover `dottedName` // content to form an anchor. var pagetype = pages[i].charAt(pages[i].length-1); var url = pagename + ((pagetype=="m")?"-module.html": "-class.html"); if (dottedName.length > pagename.length) url += "#" + dottedName.substring(pagename.length+1, dottedName.length); return url; } } } mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Distgraphcomm-class.html0000664000175000017500000005401613560002764024645 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Distgraphcomm
Package mpi4py :: Module MPI :: Class Distgraphcomm
[hide private]
[frames] | no frames]

type Distgraphcomm


Distributed graph topology intracommunicator
Instance Methods [hide private]
 
Get_dist_neighbors(self)
Return adjacency information for a distributed graph topology
 
Get_dist_neighbors_count(self)
Return adjacency information for a distributed graph topology
a new object with type S, a subtype of T
__new__(S, ...)

Inherited from Topocomm: Ineighbor_allgather, Ineighbor_allgatherv, Ineighbor_alltoall, Ineighbor_alltoallv, Ineighbor_alltoallw, Neighbor_allgather, Neighbor_allgatherv, Neighbor_alltoall, Neighbor_alltoallv, Neighbor_alltoallw, neighbor_allgather, neighbor_alltoall

Inherited from Intracomm: Accept, Cart_map, Connect, Create_cart, Create_dist_graph, Create_dist_graph_adjacent, Create_graph, Create_intercomm, Exscan, Graph_map, Iexscan, Iscan, Scan, Spawn, Spawn_multiple, exscan, scan

Inherited from Comm: Abort, Allgather, Allgatherv, Allreduce, Alltoall, Alltoallv, Alltoallw, Barrier, Bcast, Bsend, Bsend_init, Call_errhandler, Clone, Compare, Create, Create_group, Create_keyval, Delete_attr, Disconnect, Dup, Dup_with_info, Free, Free_keyval, Gather, Gatherv, Get_attr, Get_errhandler, Get_group, Get_info, Get_name, Get_parent, Get_rank, Get_size, Get_topology, Iallgather, Iallgatherv, Iallreduce, Ialltoall, Ialltoallv, Ialltoallw, Ibarrier, Ibcast, Ibsend, Idup, Igather, Igatherv, Improbe, Iprobe, Irecv, Ireduce, Ireduce_scatter, Ireduce_scatter_block, Irsend, Is_inter, Is_intra, Iscatter, Iscatterv, Isend, Issend, Join, Mprobe, Probe, Recv, Recv_init, Reduce, Reduce_scatter, Reduce_scatter_block, Rsend, Rsend_init, Scatter, Scatterv, Send, Send_init, Sendrecv, Sendrecv_replace, Set_attr, Set_errhandler, Set_info, Set_name, Split, Split_type, Ssend, Ssend_init, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, allgather, allreduce, alltoall, barrier, bcast, bsend, f2py, gather, ibsend, improbe, iprobe, irecv, isend, issend, mprobe, probe, py2f, recv, reduce, scatter, send, sendrecv, ssend

Properties [hide private]

Inherited from Topocomm: degrees, indegree, inedges, inoutedges, outdegree, outedges

Inherited from Comm: group, info, is_inter, is_intra, is_topo, name, rank, size, topology

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: Comm.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Prequest-class.html0000664000175000017500000002426413560002764023656 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Prequest
Package mpi4py :: Module MPI :: Class Prequest
[hide private]
[frames] | no frames]

type Prequest


Persistent request
Instance Methods [hide private]
 
Start(self)
Initiate a communication with a persistent request
 
Startall(type cls, requests)
Start a collection of persistent requests
a new object with type S, a subtype of T
__new__(S, ...)

Inherited from Request: Cancel, Free, Get_status, Test, Testall, Testany, Testsome, Wait, Waitall, Waitany, Waitsome, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, f2py, py2f, test, testall, testany, wait, waitall, waitany

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: Request.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Topocomm-class.html0000664000175000017500000007153013560002764023641 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Topocomm
Package mpi4py :: Module MPI :: Class Topocomm
[hide private]
[frames] | no frames]

type Topocomm

Known Subclasses:

Topology intracommunicator
Instance Methods [hide private]
 
Ineighbor_allgather(self, sendbuf, recvbuf)
Nonblocking Neighbor Gather to All
 
Ineighbor_allgatherv(self, sendbuf, recvbuf)
Nonblocking Neighbor Gather to All Vector
 
Ineighbor_alltoall(self, sendbuf, recvbuf)
Nonblocking Neighbor All-to-All
 
Ineighbor_alltoallv(self, sendbuf, recvbuf)
Nonblocking Neighbor All-to-All Vector
 
Ineighbor_alltoallw(self, sendbuf, recvbuf)
Nonblocking Neighbor All-to-All Generalized
 
Neighbor_allgather(self, sendbuf, recvbuf)
Neighbor Gather to All
 
Neighbor_allgatherv(self, sendbuf, recvbuf)
Neighbor Gather to All Vector
 
Neighbor_alltoall(self, sendbuf, recvbuf)
Neighbor All-to-All
 
Neighbor_alltoallv(self, sendbuf, recvbuf)
Neighbor All-to-All Vector
 
Neighbor_alltoallw(self, sendbuf, recvbuf)
Neighbor All-to-All Generalized
a new object with type S, a subtype of T
__new__(S, ...)
 
neighbor_allgather(self, sendobj)
Neighbor Gather to All
 
neighbor_alltoall(self, sendobj)
Neighbor All to All Scatter/Gather

Inherited from Intracomm: Accept, Cart_map, Connect, Create_cart, Create_dist_graph, Create_dist_graph_adjacent, Create_graph, Create_intercomm, Exscan, Graph_map, Iexscan, Iscan, Scan, Spawn, Spawn_multiple, exscan, scan

Inherited from Comm: Abort, Allgather, Allgatherv, Allreduce, Alltoall, Alltoallv, Alltoallw, Barrier, Bcast, Bsend, Bsend_init, Call_errhandler, Clone, Compare, Create, Create_group, Create_keyval, Delete_attr, Disconnect, Dup, Dup_with_info, Free, Free_keyval, Gather, Gatherv, Get_attr, Get_errhandler, Get_group, Get_info, Get_name, Get_parent, Get_rank, Get_size, Get_topology, Iallgather, Iallgatherv, Iallreduce, Ialltoall, Ialltoallv, Ialltoallw, Ibarrier, Ibcast, Ibsend, Idup, Igather, Igatherv, Improbe, Iprobe, Irecv, Ireduce, Ireduce_scatter, Ireduce_scatter_block, Irsend, Is_inter, Is_intra, Iscatter, Iscatterv, Isend, Issend, Join, Mprobe, Probe, Recv, Recv_init, Reduce, Reduce_scatter, Reduce_scatter_block, Rsend, Rsend_init, Scatter, Scatterv, Send, Send_init, Sendrecv, Sendrecv_replace, Set_attr, Set_errhandler, Set_info, Set_name, Split, Split_type, Ssend, Ssend_init, __eq__, __ge__, __gt__, __le__, __lt__, __ne__, __nonzero__, allgather, allreduce, alltoall, barrier, bcast, bsend, f2py, gather, ibsend, improbe, iprobe, irecv, isend, issend, mprobe, probe, py2f, recv, reduce, scatter, send, sendrecv, ssend

Properties [hide private]
  degrees
number of incoming and outgoing neighbors
  indegree
number of incoming neighbors
  inedges
incoming neighbors
  inoutedges
incoming and outgoing neighbors
  outdegree
number of outgoing neighbors
  outedges
outgoing neighbors

Inherited from Comm: group, info, is_inter, is_intra, is_topo, name, rank, size, topology

Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: Comm.__new__

mpi4py-3.0.3/docs/apiref/mpi4py-pysrc.html0000664000175000017500000012037113560002764021452 0ustar dalcinldalcinl00000000000000 mpi4py
Package mpi4py
[hide private]
[frames] | no frames]

Source Code for Package mpi4py

  1  # Author:  Lisandro Dalcin 
  2  # Contact: dalcinl@gmail.com 
  3  """ 
  4  This is the **MPI for Python** package. 
  5   
  6  What is *MPI*? 
  7  ============== 
  8   
  9  The *Message Passing Interface*, is a standardized and portable 
 10  message-passing system designed to function on a wide variety of 
 11  parallel computers. The standard defines the syntax and semantics of 
 12  library routines and allows users to write portable programs in the 
 13  main scientific programming languages (Fortran, C, or C++). Since 
 14  its release, the MPI specification has become the leading standard 
 15  for message-passing libraries for parallel computers. 
 16   
 17  What is *MPI for Python*? 
 18  ========================= 
 19   
 20  *MPI for Python* provides MPI bindings for the Python programming 
 21  language, allowing any Python program to exploit multiple processors. 
 22  This package is constructed on top of the MPI-1/2 specifications and 
 23  provides an object oriented interface which closely follows MPI-2 C++ 
 24  bindings. 
 25  """ 
 26   
 27  __version__ = '3.0.3' 
 28  __author__ = 'Lisandro Dalcin' 
 29  __credits__ = 'MPI Forum, MPICH Team, Open MPI Team' 
 30   
 31   
 32  __all__ = ['MPI'] 
 33   
 34   
35 -def get_include():
36 """Return the directory in the package that contains header files. 37 38 Extension modules that need to compile against mpi4py should use 39 this function to locate the appropriate include directory. Using 40 Python distutils (or perhaps NumPy distutils):: 41 42 import mpi4py 43 Extension('extension_name', ... 44 include_dirs=[..., mpi4py.get_include()]) 45 46 """ 47 from os.path import join, dirname 48 return join(dirname(__file__), 'include')
49 50
51 -def get_config():
52 """Return a dictionary with information about MPI.""" 53 from os.path import join, dirname 54 try: 55 from configparser import ConfigParser 56 except ImportError: # pragma: no cover 57 from ConfigParser import ConfigParser 58 parser = ConfigParser() 59 parser.read(join(dirname(__file__), 'mpi.cfg')) 60 return dict(parser.items('mpi'))
61 62
63 -def rc(**kargs): # pylint: disable=invalid-name
64 """Runtime configuration options. 65 66 Parameters 67 ---------- 68 initialize : bool 69 Automatic MPI initialization at import (default: True). 70 threads : bool 71 Request for thread support (default: True). 72 thread_level : {'multiple', 'serialized', 'funneled', 'single'} 73 Level of thread support to request (default: 'multiple'). 74 finalize : None or bool 75 Automatic MPI finalization at exit (default: None). 76 fast_reduce : bool 77 Use tree-based reductions for objects (default: True). 78 recv_mprobe : bool 79 Use matched probes to receive objects (default: True). 80 errors : {'exception', 'default', 'fatal'} 81 Error handling policy (default: 'exception'). 82 83 """ 84 for key in kargs: 85 if not hasattr(rc, key): 86 raise TypeError("unexpected argument '{0}'".format(key)) 87 for key, value in kargs.items(): 88 setattr(rc, key, value) 89 90 rc.initialize = True 91 rc.threads = True 92 rc.thread_level = 'multiple' 93 rc.finalize = None 94 rc.fast_reduce = True 95 rc.recv_mprobe = True 96 rc.errors = 'exception' 97 __import__('sys').modules[__name__ + '.rc'] = rc 98 99
100 -def profile(name, **kargs):
101 """Support for the MPI profiling interface. 102 103 Parameters 104 ---------- 105 name : str 106 Name of the profiler library to load. 107 path : list of str, optional 108 Additional paths to search for the profiler. 109 logfile : str, optional 110 Filename prefix for dumping profiler output. 111 112 """ 113 import sys 114 import os 115 from .dl import dlopen, dlerror, RTLD_NOW, RTLD_GLOBAL 116 117 def lookup_dylib(name, path): 118 # pylint: disable=missing-docstring 119 pattern = [] 120 if sys.platform.startswith('win'): # pragma: no cover 121 pattern.append(('', '.dll')) 122 elif sys.platform == 'darwin': # pragma: no cover 123 pattern.append(('lib', '.dylib')) 124 elif os.name == 'posix': # pragma: no cover 125 pattern.append(('lib', '.so')) 126 pattern.append(('', '')) 127 for pth in path: 128 for (lib, dso) in pattern: 129 filename = os.path.join(pth, lib + name + dso) 130 if os.path.isfile(filename): 131 return os.path.abspath(filename) 132 return None
133 134 logfile = kargs.pop('logfile', None) 135 if logfile: 136 if name in ('mpe',): 137 if 'MPE_LOGFILE_PREFIX' not in os.environ: 138 os.environ['MPE_LOGFILE_PREFIX'] = logfile 139 if name in ('vt', 'vt-mpi', 'vt-hyb'): 140 if 'VT_FILE_PREFIX' not in os.environ: 141 os.environ['VT_FILE_PREFIX'] = logfile 142 143 path = kargs.pop('path', []) 144 if isinstance(path, str): 145 path = [path] 146 else: 147 path = list(path) 148 prefix = os.path.dirname(__file__) 149 path.append(os.path.join(prefix, 'lib-pmpi')) 150 filename = lookup_dylib(name, path) 151 if filename is None: 152 raise ValueError("profiler '{0}' not found".format(name)) 153 154 handle = dlopen(filename, RTLD_NOW | RTLD_GLOBAL) 155 if handle: 156 profile.registry.append((name, (handle, filename))) 157 else: 158 from warnings import warn 159 warn(dlerror()) 160 161 profile.registry = [] 162

mpi4py-3.0.3/docs/apiref/module-tree.html0000664000175000017500000001037713560002764021320 0ustar dalcinldalcinl00000000000000 Module Hierarchy
 
[hide private]
[frames] | no frames]
[ Module Hierarchy | Class Hierarchy ]

Module Hierarchy

  • mpi4py: This is the MPI for Python package.
mpi4py-3.0.3/docs/apiref/epydoc.css0000664000175000017500000003735113560002763020205 0ustar dalcinldalcinl00000000000000 /* Epydoc CSS Stylesheet * * This stylesheet can be used to customize the appearance of epydoc's * HTML output. * */ /* Default Colors & Styles * - Set the default foreground & background color with 'body'; and * link colors with 'a:link' and 'a:visited'. * - Use bold for decision list terms. * - The heading styles defined here are used for headings *within* * docstring descriptions. All headings used by epydoc itself use * either class='epydoc' or class='toc' (CSS styles for both * defined below). */ body { background: #ffffff; color: #000000; } p { margin-top: 0.5em; margin-bottom: 0.5em; } a:link { color: #0000ff; } a:visited { color: #204080; } dt { font-weight: bold; } h1 { font-size: +140%; font-style: italic; font-weight: bold; } h2 { font-size: +125%; font-style: italic; font-weight: bold; } h3 { font-size: +110%; font-style: italic; font-weight: normal; } code { font-size: 100%; } /* N.B.: class, not pseudoclass */ a.link { font-family: monospace; } /* Page Header & Footer * - The standard page header consists of a navigation bar (with * pointers to standard pages such as 'home' and 'trees'); a * breadcrumbs list, which can be used to navigate to containing * classes or modules; options links, to show/hide private * variables and to show/hide frames; and a page title (using *

). The page title may be followed by a link to the * corresponding source code (using 'span.codelink'). * - The footer consists of a navigation bar, a timestamp * (if --include-timestamp was passed), and a pointer to epydoc's homepage. */ h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } h2.epydoc { font-size: +130%; font-weight: bold; } h3.epydoc { font-size: +115%; font-weight: bold; margin-top: 0.2em; } td h3.epydoc { font-size: +115%; font-weight: bold; margin-bottom: 0; } table.navbar { background: #a0c0ff; color: #000000; border: 2px groove #c0d0d0; } table.navbar table { color: #000000; } th.navbar-select { background: #70b0ff; color: #000000; } table.navbar a { text-decoration: none; } table.navbar a:link { color: #0000ff; } table.navbar a:visited { color: #204080; } span.breadcrumbs { font-size: 85%; font-weight: bold; } span.options { font-size: 70%; } span.codelink { font-size: 85%; } td.footer { font-size: 85%; } /* Table Headers * - Each summary table and details section begins with a 'header' * row. This row contains a section title (marked by * 'span.table-header') as well as a show/hide private link * (marked by 'span.options', defined above). * - Summary tables that contain user-defined groups mark those * groups using 'group header' rows. */ td.table-header { background: #70b0ff; color: #000000; border: 1px solid #608090; } td.table-header table { color: #000000; } td.table-header table a:link { color: #0000ff; } td.table-header table a:visited { color: #204080; } span.table-header { font-size: 120%; font-weight: bold; } th.group-header { background: #c0e0f8; color: #000000; text-align: left; font-style: italic; font-size: 115%; border: 1px solid #608090; } /* Summary Tables (functions, variables, etc) * - Each object is described by a single row of the table with * two cells. The left cell gives the object's type, and is * marked with 'code.summary-type'. The right cell gives the * object's name and a summary description. * - CSS styles for the table's header and group headers are * defined above, under 'Table Headers' */ table.summary { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; margin-bottom: 0.5em; } td.summary { border: 1px solid #608090; } code.summary-type { font-size: 85%; } table.summary a:link { color: #0000ff; } table.summary a:visited { color: #204080; } /* Details Tables (functions, variables, etc) * - Each object is described in its own div. * - A single-row summary table w/ table-header is used as * a header for each details section (CSS style for table-header * is defined above, under 'Table Headers'). */ table.details { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; margin: .2em 0 0 0; } table.details table { color: #000000; } table.details a:link { color: #0000ff; } table.details a:visited { color: #204080; } /* Fields */ dl.fields { margin-left: 2em; margin-top: 1em; margin-bottom: 1em; } dl.fields dd ul { margin-left: 0em; padding-left: 0em; } dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; } div.fields { margin-left: 2em; } div.fields p { margin-bottom: 0.5em; } /* Index tables (identifier index, term index, etc) * - link-index is used for indices containing lists of links * (namely, the identifier index & term index). * - index-where is used in link indices for the text indicating * the container/source for each link. * - metadata-index is used for indices containing metadata * extracted from fields (namely, the bug index & todo index). */ table.link-index { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; } td.link-index { border-width: 0px; } table.link-index a:link { color: #0000ff; } table.link-index a:visited { color: #204080; } span.index-where { font-size: 70%; } table.metadata-index { border-collapse: collapse; background: #e8f0f8; color: #000000; border: 1px solid #608090; margin: .2em 0 0 0; } td.metadata-index { border-width: 1px; border-style: solid; } table.metadata-index a:link { color: #0000ff; } table.metadata-index a:visited { color: #204080; } /* Function signatures * - sig* is used for the signature in the details section. * - .summary-sig* is used for the signature in the summary * table, and when listing property accessor functions. * */ .sig-name { color: #006080; } .sig-arg { color: #008060; } .sig-default { color: #602000; } .summary-sig { font-family: monospace; } .summary-sig-name { color: #006080; font-weight: bold; } table.summary a.summary-sig-name:link { color: #006080; font-weight: bold; } table.summary a.summary-sig-name:visited { color: #006080; font-weight: bold; } .summary-sig-arg { color: #006040; } .summary-sig-default { color: #501800; } /* Subclass list */ ul.subclass-list { display: inline; margin: 0; padding: 0; } ul.subclass-list li { display: inline; margin: 0; padding: 0; } /* To render variables, classes etc. like functions */ table.summary .summary-name { color: #006080; font-weight: bold; font-family: monospace; } table.summary a.summary-name:link { color: #006080; font-weight: bold; font-family: monospace; } table.summary a.summary-name:visited { color: #006080; font-weight: bold; font-family: monospace; } /* Variable values * - In the 'variable details' sections, each varaible's value is * listed in a 'pre.variable' box. The width of this box is * restricted to 80 chars; if the value's repr is longer than * this it will be wrapped, using a backslash marked with * class 'variable-linewrap'. If the value's repr is longer * than 3 lines, the rest will be ellided; and an ellipsis * marker ('...' marked with 'variable-ellipsis') will be used. * - If the value is a string, its quote marks will be marked * with 'variable-quote'. * - If the variable is a regexp, it is syntax-highlighted using * the re* CSS classes. */ pre.variable { padding: .5em; margin: 0; background: #dce4ec; color: #000000; border: 1px solid #708890; } .variable-linewrap { color: #604000; font-weight: bold; } .variable-ellipsis { color: #604000; font-weight: bold; } .variable-quote { color: #604000; font-weight: bold; } .variable-group { color: #008000; font-weight: bold; } .variable-op { color: #604000; font-weight: bold; } .variable-string { color: #006030; } .variable-unknown { color: #a00000; font-weight: bold; } .re { color: #000000; } .re-char { color: #006030; } .re-op { color: #600000; } .re-group { color: #003060; } .re-ref { color: #404040; } /* Base tree * - Used by class pages to display the base class hierarchy. */ pre.base-tree { font-size: 80%; margin: 0; } /* Frames-based table of contents headers * - Consists of two frames: one for selecting modules; and * the other listing the contents of the selected module. * - h1.toc is used for each frame's heading * - h2.toc is used for subheadings within each frame. */ h1.toc { text-align: center; font-size: 105%; margin: 0; font-weight: bold; padding: 0; } h2.toc { font-size: 100%; font-weight: bold; margin: 0.5em 0 0 -0.3em; } /* Syntax Highlighting for Source Code * - doctest examples are displayed in a 'pre.py-doctest' block. * If the example is in a details table entry, then it will use * the colors specified by the 'table pre.py-doctest' line. * - Source code listings are displayed in a 'pre.py-src' block. * Each line is marked with 'span.py-line' (used to draw a line * down the left margin, separating the code from the line * numbers). Line numbers are displayed with 'span.py-lineno'. * The expand/collapse block toggle button is displayed with * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not * modify the font size of the text.) * - If a source code page is opened with an anchor, then the * corresponding code block will be highlighted. The code * block's header is highlighted with 'py-highlight-hdr'; and * the code block's body is highlighted with 'py-highlight'. * - The remaining py-* classes are used to perform syntax * highlighting (py-string for string literals, py-name for names, * etc.) */ pre.py-doctest { padding: .5em; margin: 1em; background: #e8f0f8; color: #000000; border: 1px solid #708890; } table pre.py-doctest { background: #dce4ec; color: #000000; } pre.py-src { border: 2px solid #000000; background: #f0f0f0; color: #000000; } .py-line { border-left: 2px solid #000000; margin-left: .2em; padding-left: .4em; } .py-lineno { font-style: italic; font-size: 90%; padding-left: .5em; } a.py-toggle { text-decoration: none; } div.py-highlight-hdr { border-top: 2px solid #000000; border-bottom: 2px solid #000000; background: #d8e8e8; } div.py-highlight { border-bottom: 2px solid #000000; background: #d0e0e0; } .py-prompt { color: #005050; font-weight: bold;} .py-more { color: #005050; font-weight: bold;} .py-string { color: #006030; } .py-comment { color: #003060; } .py-keyword { color: #600000; } .py-output { color: #404040; } .py-name { color: #000050; } .py-name:link { color: #000050 !important; } .py-name:visited { color: #000050 !important; } .py-number { color: #005000; } .py-defname { color: #000060; font-weight: bold; } .py-def-name { color: #000060; font-weight: bold; } .py-base-class { color: #000060; } .py-param { color: #000060; } .py-docstring { color: #006030; } .py-decorator { color: #804020; } /* Use this if you don't want links to names underlined: */ /*a.py-name { text-decoration: none; }*/ /* Graphs & Diagrams * - These CSS styles are used for graphs & diagrams generated using * Graphviz dot. 'img.graph-without-title' is used for bare * diagrams (to remove the border created by making the image * clickable). */ img.graph-without-title { border: none; } img.graph-with-title { border: 1px solid #000000; } span.graph-title { font-weight: bold; } span.graph-caption { } /* General-purpose classes * - 'p.indent-wrapped-lines' defines a paragraph whose first line * is not indented, but whose subsequent lines are. * - The 'nomargin-top' class is used to remove the top margin (e.g. * from lists). The 'nomargin' class is used to remove both the * top and bottom margin (but not the left or right margin -- * for lists, that would cause the bullets to disappear.) */ p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; margin: 0; } .nomargin-top { margin-top: 0; } .nomargin { margin-top: 0; margin-bottom: 0; } /* HTML Log */ div.log-block { padding: 0; margin: .5em 0 .5em 0; background: #e8f0f8; color: #000000; border: 1px solid #000000; } div.log-error { padding: .1em .3em .1em .3em; margin: 4px; background: #ffb0b0; color: #000000; border: 1px solid #000000; } div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; background: #ffffb0; color: #000000; border: 1px solid #000000; } div.log-info { padding: .1em .3em .1em .3em; margin: 4px; background: #b0ffb0; color: #000000; border: 1px solid #000000; } h2.log-hdr { background: #70b0ff; color: #000000; margin: 0; padding: 0em 0.5em 0em 0.5em; border-bottom: 1px solid #000000; font-size: 110%; } p.log { font-weight: bold; margin: .5em 0 .5em 0; } tr.opt-changed { color: #000000; font-weight: bold; } tr.opt-default { color: #606060; } pre.log { margin: 0; padding: 0; padding-left: 1em; } mpi4py-3.0.3/docs/apiref/toc-mpi4py.MPI-module.html0000664000175000017500000010132113560002764023000 0ustar dalcinldalcinl00000000000000 MPI

Module MPI


Classes

Cartcomm
Comm
Datatype
Distgraphcomm
Errhandler
Exception
File
Graphcomm
Grequest
Group
Info
Intercomm
Intracomm
Message
Op
Prequest
Request
Status
Topocomm
Win
memory

Functions

Add_error_class
Add_error_code
Add_error_string
Aint_add
Aint_diff
Alloc_mem
Attach_buffer
Close_port
Compute_dims
Detach_buffer
Finalize
Free_mem
Get_address
Get_error_class
Get_error_string
Get_library_version
Get_processor_name
Get_version
Init
Init_thread
Is_finalized
Is_initialized
Is_thread_main
Lookup_name
Open_port
Pcontrol
Publish_name
Query_thread
Register_datarep
Unpublish_name
Wtick
Wtime
get_vendor

Variables

AINT
ANY_SOURCE
ANY_TAG
APPNUM
BAND
BOOL
BOR
BOTTOM
BSEND_OVERHEAD
BXOR
BYTE
CART
CHAR
CHARACTER
COMBINER_CONTIGUOUS
COMBINER_DARRAY
COMBINER_DUP
COMBINER_F90_COMPLEX
COMBINER_F90_INTEGER
COMBINER_F90_REAL
COMBINER_HINDEXED
COMBINER_HINDEXED_BLOCK
COMBINER_HVECTOR
COMBINER_INDEXED
COMBINER_INDEXED_BLOCK
COMBINER_NAMED
COMBINER_RESIZED
COMBINER_STRUCT
COMBINER_SUBARRAY
COMBINER_VECTOR
COMM_NULL
COMM_SELF
COMM_TYPE_SHARED
COMM_WORLD
COMPLEX
COMPLEX16
COMPLEX32
COMPLEX4
COMPLEX8
CONGRUENT
COUNT
CXX_BOOL
CXX_DOUBLE_COMPLEX
CXX_FLOAT_COMPLEX
CXX_LONG_DOUBLE_COMPLEX
C_BOOL
C_COMPLEX
C_DOUBLE_COMPLEX
C_FLOAT_COMPLEX
C_LONG_DOUBLE_COMPLEX
DATATYPE_NULL
DISPLACEMENT_CURRENT
DISP_CUR
DISTRIBUTE_BLOCK
DISTRIBUTE_CYCLIC
DISTRIBUTE_DFLT_DARG
DISTRIBUTE_NONE
DIST_GRAPH
DOUBLE
DOUBLE_COMPLEX
DOUBLE_INT
DOUBLE_PRECISION
ERRHANDLER_NULL
ERRORS_ARE_FATAL
ERRORS_RETURN
ERR_ACCESS
ERR_AMODE
ERR_ARG
ERR_ASSERT
ERR_BAD_FILE
ERR_BASE
ERR_BUFFER
ERR_COMM
ERR_CONVERSION
ERR_COUNT
ERR_DIMS
ERR_DISP
ERR_DUP_DATAREP
ERR_FILE
ERR_FILE_EXISTS
ERR_FILE_IN_USE
ERR_GROUP
ERR_INFO
ERR_INFO_KEY
ERR_INFO_NOKEY
ERR_INFO_VALUE
ERR_INTERN
ERR_IN_STATUS
ERR_IO
ERR_KEYVAL
ERR_LASTCODE
ERR_LOCKTYPE
ERR_NAME
ERR_NOT_SAME
ERR_NO_MEM
ERR_NO_SPACE
ERR_NO_SUCH_FILE
ERR_OP
ERR_OTHER
ERR_PENDING
ERR_PORT
ERR_QUOTA
ERR_RANK
ERR_READ_ONLY
ERR_REQUEST
ERR_RMA_ATTACH
ERR_RMA_CONFLICT
ERR_RMA_FLAVOR
ERR_RMA_RANGE
ERR_RMA_SHARED
ERR_RMA_SYNC
ERR_ROOT
ERR_SERVICE
ERR_SIZE
ERR_SPAWN
ERR_TAG
ERR_TOPOLOGY
ERR_TRUNCATE
ERR_TYPE
ERR_UNKNOWN
ERR_UNSUPPORTED_DATAREP
ERR_UNSUPPORTED_OPERATION
ERR_WIN
FILE_NULL
FLOAT
FLOAT_INT
F_BOOL
F_COMPLEX
F_DOUBLE
F_DOUBLE_COMPLEX
F_FLOAT
F_FLOAT_COMPLEX
F_INT
GRAPH
GROUP_EMPTY
GROUP_NULL
HOST
IDENT
INFO_ENV
INFO_NULL
INT
INT16_T
INT32_T
INT64_T
INT8_T
INTEGER
INTEGER1
INTEGER16
INTEGER2
INTEGER4
INTEGER8
INT_INT
IN_PLACE
IO
KEYVAL_INVALID
LAND
LASTUSEDCODE
LB
LOCK_EXCLUSIVE
LOCK_SHARED
LOGICAL
LOGICAL1
LOGICAL2
LOGICAL4
LOGICAL8
LONG
LONG_DOUBLE
LONG_DOUBLE_INT
LONG_INT
LONG_LONG
LOR
LXOR
MAX
MAXLOC
MAX_DATAREP_STRING
MAX_ERROR_STRING
MAX_INFO_KEY
MAX_INFO_VAL
MAX_LIBRARY_VERSION_STRING
MAX_OBJECT_NAME
MAX_PORT_NAME
MAX_PROCESSOR_NAME
MESSAGE_NO_PROC
MESSAGE_NULL
MIN
MINLOC
MODE_APPEND
MODE_CREATE
MODE_DELETE_ON_CLOSE
MODE_EXCL
MODE_NOCHECK
MODE_NOPRECEDE
MODE_NOPUT
MODE_NOSTORE
MODE_NOSUCCEED
MODE_RDONLY
MODE_RDWR
MODE_SEQUENTIAL
MODE_UNIQUE_OPEN
MODE_WRONLY
NO_OP
OFFSET
OP_NULL
ORDER_C
ORDER_F
ORDER_FORTRAN
PACKED
PROC_NULL
PROD
REAL
REAL16
REAL2
REAL4
REAL8
REPLACE
REQUEST_NULL
ROOT
SEEK_CUR
SEEK_END
SEEK_SET
SHORT
SHORT_INT
SIGNED_CHAR
SIGNED_INT
SIGNED_LONG
SIGNED_LONG_LONG
SIGNED_SHORT
SIMILAR
SINT16_T
SINT32_T
SINT64_T
SINT8_T
SUBVERSION
SUCCESS
SUM
TAG_UB
THREAD_FUNNELED
THREAD_MULTIPLE
THREAD_SERIALIZED
THREAD_SINGLE
TWOINT
TYPECLASS_COMPLEX
TYPECLASS_INTEGER
TYPECLASS_REAL
UB
UINT16_T
UINT32_T
UINT64_T
UINT8_T
UNDEFINED
UNEQUAL
UNIVERSE_SIZE
UNSIGNED
UNSIGNED_CHAR
UNSIGNED_INT
UNSIGNED_LONG
UNSIGNED_LONG_LONG
UNSIGNED_SHORT
UNWEIGHTED
VERSION
WCHAR
WEIGHTS_EMPTY
WIN_BASE
WIN_CREATE_FLAVOR
WIN_DISP_UNIT
WIN_FLAVOR
WIN_FLAVOR_ALLOCATE
WIN_FLAVOR_CREATE
WIN_FLAVOR_DYNAMIC
WIN_FLAVOR_SHARED
WIN_MODEL
WIN_NULL
WIN_SEPARATE
WIN_SIZE
WIN_UNIFIED
WTIME_IS_GLOBAL
__pyx_capi__
pickle

[hide private] mpi4py-3.0.3/docs/apiref/help.html0000664000175000017500000002603213560002764020021 0ustar dalcinldalcinl00000000000000 Help
 
[hide private]
[frames] | no frames]

API Documentation

This document contains the API (Application Programming Interface) documentation for MPI for Python. Documentation for the Python objects defined by the project is divided into separate pages for each package, module, and class. The API documentation also includes two pages containing information about the project as a whole: a trees page, and an index page.

Object Documentation

Each Package Documentation page contains:

  • A description of the package.
  • A list of the modules and sub-packages contained by the package.
  • A summary of the classes defined by the package.
  • A summary of the functions defined by the package.
  • A summary of the variables defined by the package.
  • A detailed description of each function defined by the package.
  • A detailed description of each variable defined by the package.

Each Module Documentation page contains:

  • A description of the module.
  • A summary of the classes defined by the module.
  • A summary of the functions defined by the module.
  • A summary of the variables defined by the module.
  • A detailed description of each function defined by the module.
  • A detailed description of each variable defined by the module.

Each Class Documentation page contains:

  • A class inheritance diagram.
  • A list of known subclasses.
  • A description of the class.
  • A summary of the methods defined by the class.
  • A summary of the instance variables defined by the class.
  • A summary of the class (static) variables defined by the class.
  • A detailed description of each method defined by the class.
  • A detailed description of each instance variable defined by the class.
  • A detailed description of each class (static) variable defined by the class.

Project Documentation

The Trees page contains the module and class hierarchies:

  • The module hierarchy lists every package and module, with modules grouped into packages. At the top level, and within each package, modules and sub-packages are listed alphabetically.
  • The class hierarchy lists every class, grouped by base class. If a class has more than one base class, then it will be listed under each base class. At the top level, and under each base class, classes are listed alphabetically.

The Index page contains indices of terms and identifiers:

  • The term index lists every term indexed by any object's documentation. For each term, the index provides links to each place where the term is indexed.
  • The identifier index lists the (short) name of every package, module, class, method, function, variable, and parameter. For each identifier, the index provides a short description, and a link to its documentation.

The Table of Contents

The table of contents occupies the two frames on the left side of the window. The upper-left frame displays the project contents, and the lower-left frame displays the module contents:

Project
Contents
...
API
Documentation
Frame


Module
Contents
 
...
 

The project contents frame contains a list of all packages and modules that are defined by the project. Clicking on an entry will display its contents in the module contents frame. Clicking on a special entry, labeled "Everything," will display the contents of the entire project.

The module contents frame contains a list of every submodule, class, type, exception, function, and variable defined by a module or package. Clicking on an entry will display its documentation in the API documentation frame. Clicking on the name of the module, at the top of the frame, will display the documentation for the module itself.

The "frames" and "no frames" buttons below the top navigation bar can be used to control whether the table of contents is displayed or not.

The Navigation Bar

A navigation bar is located at the top and bottom of every page. It indicates what type of page you are currently viewing, and allows you to go to related pages. The following table describes the labels on the navigation bar. Note that not some labels (such as [Parent]) are not displayed on all pages.

Label Highlighted when... Links to...
[Parent] (never highlighted) the parent of the current package
[Package] viewing a package the package containing the current object
[Module] viewing a module the module containing the current object
[Class] viewing a class the class containing the current object
[Trees] viewing the trees page the trees page
[Index] viewing the index page the index page
[Help] viewing the help page the help page

The "show private" and "hide private" buttons below the top navigation bar can be used to control whether documentation for private objects is displayed. Private objects are usually defined as objects whose (short) names begin with a single underscore, but do not end with an underscore. For example, "_x", "__pprint", and "epydoc.epytext._tokenize" are private objects; but "re.sub", "__init__", and "type_" are not. However, if a module defines the "__all__" variable, then its contents are used to decide which objects are private.

If --include-timestamp was passed, a timestamp below the bottom navigation bar indicates when each page was last updated.

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Request-class.html0000664000175000017500000005713313560002764023477 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Request
Package mpi4py :: Module MPI :: Class Request
[hide private]
[frames] | no frames]

type Request

Known Subclasses:

Request
Instance Methods [hide private]
 
Cancel(self)
Cancel a communication request
 
Free(self)
Free a communication request
 
Get_status(self, Status status=None)
Non-destructive test for the completion of a request
 
Test(self, Status status=None)
Test for the completion of a send or receive
 
Testall(type cls, requests, statuses=None)
Test for completion of all previously initiated requests
 
Testany(type cls, requests, Status status=None)
Test for completion of any previously initiated request
 
Testsome(type cls, requests, statuses=None)
Test for completion of some previously initiated requests
 
Wait(self, Status status=None)
Wait for a send or receive to complete
 
Waitall(type cls, requests, statuses=None)
Wait for all previously initiated requests to complete
 
Waitany(type cls, requests, Status status=None)
Wait for any previously initiated request to complete
 
Waitsome(type cls, requests, statuses=None)
Wait for some previously initiated requests to complete
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
f2py(type cls, arg)
 
py2f(self)
 
test(self, Status status=None)
Test for the completion of a send or receive
 
testall(type cls, requests, statuses=None)
Test for completion of all previously initiated requests
 
testany(type cls, requests, Status status=None)
Test for completion of any previously initiated request
 
wait(self, Status status=None)
Wait for a send or receive to complete
 
waitall(type cls, requests, statuses=None)
Wait for all previously initiated requests to complete
 
waitany(type cls, requests, Status status=None)
Wait for any previously initiated request to complete
Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/apiref/mpi4py.MPI.Datatype-class.html0000664000175000017500000012522613560002764023621 0ustar dalcinldalcinl00000000000000 mpi4py.MPI.Datatype
Package mpi4py :: Module MPI :: Class Datatype
[hide private]
[frames] | no frames]

type Datatype


Datatype
Instance Methods [hide private]
 
Commit(self)
Commit the datatype
 
Create_contiguous(self, int count)
Create a contiguous datatype
 
Create_darray(self, int size, int rank, gsizes, distribs, dargs, psizes, int order=ORDER_C)
Create a datatype representing an HPF-like distributed array on Cartesian process grids
 
Create_dup(self)
Duplicate a datatype
 
Create_f90_complex(type cls, int p, int r)
Return a bounded complex datatype
 
Create_f90_integer(type cls, int r)
Return a bounded integer datatype
 
Create_f90_real(type cls, int p, int r)
Return a bounded real datatype
 
Create_hindexed(self, blocklengths, displacements)
Create an indexed datatype with displacements in bytes
 
Create_hindexed_block(self, int blocklength, displacements)
Create an indexed datatype with constant-sized blocks and displacements in bytes
 
Create_hvector(self, int count, int blocklength, Aint stride)
Create a vector (strided) datatype
 
Create_indexed(self, blocklengths, displacements)
Create an indexed datatype
 
Create_indexed_block(self, int blocklength, displacements)
Create an indexed datatype with constant-sized blocks
 
Create_keyval(type cls, copy_fn=None, delete_fn=None, nopython=False)
Create a new attribute key for datatypes
 
Create_resized(self, Aint lb, Aint extent)
Create a datatype with a new lower bound and extent
 
Create_struct(type cls, blocklengths, displacements, datatypes)
Create an datatype from a general set of block sizes, displacements and datatypes
 
Create_subarray(self, sizes, subsizes, starts, int order=ORDER_C)
Create a datatype for a subarray of a regular, multidimensional array
 
Create_vector(self, int count, int blocklength, int stride)
Create a vector (strided) datatype
 
Delete_attr(self, int keyval)
Delete attribute value associated with a key
 
Dup(self)
Duplicate a datatype
 
Free(self)
Free the datatype
 
Free_keyval(type cls, int keyval)
Free and attribute key for datatypes
 
Get_attr(self, int keyval)
Retrieve attribute value by key
 
Get_contents(self)
Retrieve the actual arguments used in the call that created a datatype
 
Get_envelope(self)
Return information on the number and type of input arguments used in the call that created a datatype
 
Get_extent(self)
Return lower bound and extent of datatype
 
Get_name(self)
Get the print name for this datatype
 
Get_size(self)
Return the number of bytes occupied by entries in the datatype
 
Get_true_extent(self)
Return the true lower bound and extent of a datatype
 
Match_size(type cls, int typeclass, int size)
Find a datatype matching a specified size in bytes
 
Pack(self, inbuf, outbuf, int position, Comm comm)
Pack into contiguous memory according to datatype.
 
Pack_external(self, datarep, inbuf, outbuf, Aint position)
Pack into contiguous memory according to datatype, using a portable data representation (external32).
 
Pack_external_size(self, datarep, int count)
Returns the upper bound on the amount of space (in bytes) needed to pack a message according to datatype, using a portable data representation (external32).
 
Pack_size(self, int count, Comm comm)
Returns the upper bound on the amount of space (in bytes) needed to pack a message according to datatype.
 
Resized(self, Aint lb, Aint extent)
Create a datatype with a new lower bound and extent
 
Set_attr(self, int keyval, attrval)
Store attribute value associated with a key
 
Set_name(self, name)
Set the print name for this datatype
 
Unpack(self, inbuf, int position, outbuf, Comm comm)
Unpack from contiguous memory according to datatype.
 
Unpack_external(self, datarep, inbuf, Aint position, outbuf)
Unpack from contiguous memory according to datatype, using a portable data representation (external32).
 
__eq__(y)
x==y
 
__ge__(y)
x>=y
 
__gt__(y)
x>y
 
__le__(y)
x<=y
 
__lt__(y)
x<y
 
__ne__(y)
x!=y
a new object with type S, a subtype of T
__new__(S, ...)
 
__nonzero__()
x != 0
 
decode(self)
Convenience method for decoding a datatype
 
f2py(type cls, arg)
 
py2f(self)
Properties [hide private]
  combiner
datatype combiner
  contents
datatype contents
  envelope
datatype envelope
  extent
extent
  is_named
is a named datatype
  is_predefined
is a predefined datatype
  lb
lower bound
  name
datatype name
  size
size (in bytes)
  true_extent
true extent
  true_lb
true lower bound
  true_ub
true upper bound
  ub
upper bound
Method Details [hide private]

__new__(S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

mpi4py-3.0.3/docs/CHANGES.html0000664000175000017500000007137013560002761016675 0ustar dalcinldalcinl00000000000000 CHANGES: MPI for Python

CHANGES: MPI for Python

Author: Lisandro Dalcin
Contact: dalcinl@gmail.com

Release 3.0.3 [2019-11-04]

  • Regenerate Cython wrappers to support Python 3.8.

Release 3.0.2 [2019-06-11]

  • Bug fixes:

    • Fix handling of readonly buffers in support for Python 2 legacy buffer interface. The issue triggers only when using a buffer-like object that is readonly and does not export the new Python 3 buffer interface.

    • Fix build issues with Open MPI 4.0.x series related to removal of many MPI-1 symbols deprecated in MPI-2 and removed in MPI-3.

    • Minor documentation fixes.

Release 3.0.1 [2019-02-15]

  • Bug fixes:

    • Fix Comm.scatter() and other collectives corrupting input send list. Add safety measures to prevent related issues in global reduction operations.

    • Fix error-checking code for counts in Op.Reduce_local().

  • Enhancements:

    • Map size-specific Python/NumPy typecodes to MPI datatypes.

    • Allow partial specification of target list/tuple arguments in the various Win RMA methods.

    • Workaround for removal of MPI_{LB|UB} in Open MPI 4.0.

    • Support for Microsoft MPI v10.0.

Release 3.0.0 [2017-11-08]

  • New features:

    • mpi4py.futures: Execute computations asynchronously using a pool of MPI processes. This package is based on concurrent.futures from the Python standard library.

    • mpi4py.run: Run Python code and abort execution in case of unhandled exceptions to prevent deadlocks.

    • mpi4py.bench: Run basic MPI benchmarks and tests.

  • Enhancements:

    • Lowercase, pickle-based collective communication calls are now thread-safe through the use of fine-grained locking.

    • The MPI module now exposes a memory type which is a lightweight variant of the builtin memoryview type, but exposes both the legacy Python 2 and the modern Python 3 buffer interface under a Python 2 runtime.

    • The MPI.Comm.Alltoallw() method now uses count=1 and displ=0 as defaults, assuming that messages are specified through user-defined datatypes.

    • The Request.Wait[all]() methods now return True to match the interface of Request.Test[all]().

    • The Win class now implements the Python buffer interface.

  • Backward-incompatible changes:

    • The buf argument of the MPI.Comm.recv() method is deprecated, passing anything but None emits a warning.

    • The MPI.Win.memory property was removed, use the MPI.Win.tomemory() method instead.

    • Executing python -m mpi4py in the command line is now equivalent to python -m mpi4py.run. For the former behavior, use python -m mpi4py.bench.

    • Python 2.6 and 3.2 are no longer supported. The mpi4py.MPI module may still build and partially work, but other pure-Python modules under the mpi4py namespace will not.

    • Windows: Remove support for legacy MPICH2, Open MPI, and DeinoMPI.

Release 2.0.0 [2015-10-18]

  • Support for MPI-3 features.

    • Matched probes and receives.

    • Nonblocking collectives.

    • Neighborhood collectives.

    • New communicator constructors.

    • Request-based RMA operations.

    • New RMA communication and synchronisation calls.

    • New window constructors.

    • New datatype constructor.

    • New C++ boolean and floating complex datatypes.

  • Support for MPI-2 features not included in previous releases.

    • Generalized All-to-All collective (Comm.Alltoallw())

    • User-defined data representations (Register_datarep())

  • New scalable implementation of reduction operations for Python objects. This code is based on binomial tree algorithms using point-to-point communication and duplicated communicator contexts. To disable this feature, use mpi4py.rc.fast_reduce = False.

  • Backward-incompatible changes:

    • Python 2.4, 2.5, 3.0 and 3.1 are no longer supported.

    • Default MPI error handling policies are overriden. After import, mpi4py sets the ERRORS_RETURN error handler in COMM_SELF and COMM_WORLD, as well as any new Comm, Win, or File instance created through mpi4py, thus effectively ignoring the MPI rules about error handler inheritance. This way, MPI errors translate to Python exceptions. To disable this behavior and use the standard MPI error handling rules, use mpi4py.rc.errors = 'default'.

    • Change signature of all send methods, dest is a required argument.

    • Change signature of all receive and probe methods, source defaults to ANY_SOURCE, tag defaults to ANY_TAG.

    • Change signature of send lowercase-spelling methods, obj arguments are not mandatory.

    • Change signature of recv lowercase-spelling methods, renamed 'obj' arguments to 'buf'.

    • Change Request.Waitsome() and Request.Testsome() to return None or list.

    • Change signature of all lowercase-spelling collectives, sendobj arguments are now mandatory, recvobj arguments were removed.

    • Reduction operations MAXLOC and MINLOC are no longer special-cased in lowercase-spelling methods Comm.[all]reduce() and Comm.[ex]scan(), the input object must be specified as a tuple (obj, location).

    • Change signature of name publishing functions. The new signatures are Publish_name(service_name, port_name, info=INFO_NULL) and Unpublish_name(service_name, port_name, info=INFO_NULL)`.

    • Win instances now cache Python objects exposing memory by keeping references instead of using MPI attribute caching.

    • Change signature of Win.Lock(). The new signature is Win.Lock(rank, lock_type=LOCK_EXCLUSIVE, assertion=0).

    • Move Cartcomm.Map() to Intracomm.Cart_map().

    • Move Graphcomm.Map() to Intracomm.Graph_map().

    • Remove the mpi4py.MPE module.

    • Rename the Cython definition file for use with cimport statement from mpi_c.pxd to libmpi.pxd.

Release 1.3.1 [2013-08-07]

  • Regenerate C wrappers with Cython 0.19.1 to support Python 3.3.

  • Install *.pxd files in <site-packages>/mpi4py to ease the support for Cython's cimport statement in code requiring to access mpi4py internals.

  • As a side-effect of using Cython 0.19.1, ancient Python 2.3 is no longer supported. If you really need it, you can install an older Cython and run python setup.py build_src --force.

Release 1.3 [2012-01-20]

  • Now Comm.recv() accept a buffer to receive the message.

  • Add Comm.irecv() and Request.{wait|test}[any|all]().

  • Add Intracomm.Spawn_multiple().

  • Better buffer handling for PEP 3118 and legacy buffer interfaces.

  • Add support for attribute attribute caching on communicators, datatypes and windows.

  • Install MPI-enabled Python interpreter as <path>/mpi4py/bin/python-mpi.

  • Windows: Support for building with Open MPI.

Release 1.2.2 [2010-09-13]

  • Add mpi4py.get_config() to retrieve information (compiler wrappers, includes, libraries, etc) about the MPI implementation employed to build mpi4py.

  • Workaround Python libraries with missing GILState-related API calls in case of non-threaded Python builds.

  • Windows: look for MPICH2, DeinoMPI, Microsoft HPC Pack at their default install locations under %ProgramFiles.

  • MPE: fix hacks related to old API's, these hacks are broken when MPE is built with a MPI implementations other than MPICH2.

  • HP-MPI: fix for missing Fortran datatypes, use dlopen() to load the MPI shared library before MPI_Init()

  • Many distutils-related fixes, cleanup, and enhancements, better logics to find MPI compiler wrappers.

  • Support for pip install mpi4py.

Release 1.2.1 [2010-02-26]

  • Fix declaration in Cython include file. This declaration, while valid for Cython, broke the simple-minded parsing used in conf/mpidistutils.py to implement configure-tests for availability of MPI symbols.

  • Update SWIG support and make it compatible with Python 3. Also generate an warning for SWIG < 1.3.28.

  • Fix distutils-related issues in Mac OS X. Now ARCHFLAGS environment variable is honored of all Python's config/Makefile variables.

  • Fix issues with Open MPI < 1.4.2 releated to error checking and MPI_XXX_NULL handles.

Release 1.2 [2009-12-29]

  • Automatic MPI datatype discovery for NumPy arrays and PEP-3118 buffers. Now buffer-like objects can be messaged directly, it is no longer required to explicitly pass a 2/3-list/tuple like [data, MPI.DOUBLE], or [data, count, MPI.DOUBLE]. Only basic types are supported, i.e., all C/C99-native signed/unsigned integral types and single/double precision real/complex floating types. Many thanks to Eilif Muller for the initial feedback.

  • Nonblocking send of pickled Python objects. Many thanks to Andreas Kloeckner for the initial patch and enlightening discussion about this enhancement.

  • Request instances now hold a reference to the Python object exposing the buffer involved in point-to-point communication or parallel I/O. Many thanks to Andreas Kloeckner for the initial feedback.

  • Support for logging of user-defined states and events using MPE. Runtime (i.e., without requiring a recompile!) activation of logging of all MPI calls is supported in POSIX platforms implementing dlopen().

  • Support for all the new features in MPI-2.2 (new C99 and F90 datatypes, distributed graph topology, local reduction operation, and other minor enhancements).

  • Fix the annoying issues related to Open MPI and Python dynamic loading of extension modules in platforms supporting dlopen().

  • Fix SLURM dynamic loading issues on SiCortex. Many thanks to Ian Langmore for providing me shell access.

Release 1.1.0 [2009-06-06]

  • Fix bug in Comm.Iprobe() that caused segfaults as Python C-API calls were issued with the GIL released (issue #2).

  • Add Comm.bsend() and Comm.ssend() for buffered and synchronous send semantics when communicating general Python objects.

  • Now the call Info.Get(key) return a single value (i.e, instead of a 2-tuple); this value is None if key is not in the Info object, or a string otherwise. Previously, the call redundantly returned (None, False) for missing key-value pairs; None is enough to signal a missing entry.

  • Add support for parametrized Fortran datatypes.

  • Add support for decoding user-defined datatypes.

  • Add support for user-defined reduction operations on memory buffers. However, at most 16 user-defined reduction operations can be created. Ask the author for more room if you need it.

Release 1.0.0 [2009-03-20]

This is the fist release of the all-new, Cython-based, implementation of MPI for Python. Unfortunately, this implementation is not backward-compatible with the previous one. The list below summarizes the more important changes that can impact user codes.

  • Some communication calls had overloaded functionality. Now there is a clear distinction between communication of general Python object with pickle, and (fast, near C-speed) communication of buffer-like objects (e.g., NumPy arrays).

    • for communicating general Python objects, you have to use all-lowercase methods, like send(), recv(), bcast(), etc.

    • for communicating array data, you have to use Send(), Recv(), Bcast(), etc. methods. Buffer arguments to these calls must be explicitly specified by using a 2/3-list/tuple like [data, MPI.DOUBLE], or [data, count, MPI.DOUBLE] (the former one uses the byte-size of data and the extent of the MPI datatype to define the count).

  • Indexing a communicator with an integer returned a special object associating the communication with a target rank, alleviating you from specifying source/destination/root arguments in point-to-point and collective communications. This functionality is no longer available, expressions like:

    MPI.COMM_WORLD[0].Send(...)
    MPI.COMM_WORLD[0].Recv(...)
    MPI.COMM_WORLD[0].Bcast(...)
    

    have to be replaced by:

    MPI.COMM_WORLD.Send(..., dest=0)
    MPI.COMM_WORLD.Recv(..., source=0)
    MPI.COMM_WORLD.Bcast(..., root=0)
    
  • Automatic MPI initialization (i.e., at import time) requests the maximum level of MPI thread support (i.e., it is done by calling MPI_Init_thread() and passing MPI_THREAD_MULTIPLE). In case you need to change this behavior, you can tweak the contents of the mpi4py.rc module.

  • In order to obtain the values of predefined attributes attached to the world communicator, now you have to use the Get_attr() method on the MPI.COMM_WORLD instance:

    tag_ub = MPI.COMM_WORLD.Get_attr(MPI.TAG_UB)
    
  • In the previous implementation, MPI.COMM_WORLD and MPI.COMM_SELF were associated to duplicates of the (C-level) MPI_COMM_WORLD and MPI_COMM_SELF predefined communicator handles. Now this is no longer the case, MPI.COMM_WORLD and MPI.COMM_SELF proxies the actual MPI_COMM_WORLD and MPI_COMM_SELF handles.

  • Convenience aliases MPI.WORLD and MPI.SELF were removed. Use instead MPI.COMM_WORLD and MPI.COMM_SELF.

  • Convenience constants MPI.WORLD_SIZE and MPI.WORLD_RANK were removed. Use instead MPI.COMM_WORLD.Get_size() and MPI.COMM_WORLD.Get_rank().

mpi4py-3.0.3/docs/mpi4py.bib0000644000175000017500000000211013200562156016617 0ustar dalcinldalcinl00000000000000@article{Dalcin2011, title = "Parallel distributed computing using Python", journal = "Advances in Water Resources", volume = "34", number = "9", pages = "1124--1139", year = "2011", issn = "0309-1708", doi = "http://dx.doi.org/10.1016/j.advwatres.2011.04.013", author = "Lisandro D. Dalcin and Rodrigo R. Paz and Pablo A. Kler and Alejandro Cosimo", } @article{mpi4py2008, title = "MPI for Python: Performance improvements and MPI-2 extensions", journal = "Journal of Parallel and Distributed Computing", volume = "68", number = "5", pages = "655--662", year = "2008", issn = "0743-7315", doi = "http://dx.doi.org/10.1016/j.jpdc.2007.09.005", author = "Lisandro Dalcin and Rodrigo Paz and Mario Storti and Jorge D'Elia", } @article{mpi4py2005, title = "MPI for Python", journal = "Journal of Parallel and Distributed Computing", author = "Lisandro Dalcin and Rodrigo Paz and Mario Storti", volume = "65", number = "9", pages = "1108--1115", year = "2005", issn = "0743-7315", doi = "http://dx.doi.org/10.1016/j.jpdc.2005.03.010", author = "Lisandro Dalcin and Rodrigo Paz and Mario Storti", } mpi4py-3.0.3/docs/index.rst0000664000175000017500000000430313426006675016601 0ustar dalcinldalcinl00000000000000============== MPI for Python ============== :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com Online Documentation -------------------- Hosted at *Read the Docs* [http://mpi4py.readthedocs.org/]: .. image:: https://readthedocs.org/projects/mpi4py/badge/?version=stable :target: https://mpi4py.readthedocs.org/stable/ .. image:: https://readthedocs.org/projects/mpi4py/badge/?version=latest :target: https://mpi4py.readthedocs.org/latest/ Hosted at *Bitbucket* [https://mpi4py.bitbucket.io/]: + `User Manual (HTML)`_ (generated with Sphinx_). + `User Manual (PDF)`_ (generated with Sphinx_). + `API Reference`_ (generated with Epydoc_). .. _User Manual (HTML): usrman/index.html .. _User Manual (PDF): mpi4py.pdf .. _API Reference: apiref/index.html .. _Sphinx: http://sphinx-doc.org/ .. _Epydoc: http://epydoc.sourceforge.net/ Discussion and Support ---------------------- Hosted at Google Groups: + Group Page: http://groups.google.com/group/mpi4py + Mailing List: mpi4py@googlegroups.com Downloads and Development ------------------------- Hosted at Bitbucket: + Project Site: https://bitbucket.org/mpi4py/mpi4py + Source Releases: https://bitbucket.org/mpi4py/mpi4py/downloads + Issue Tracker: https://bitbucket.org/mpi4py/mpi4py/issues + Git Repository: https://bitbucket.org/mpi4py/mpi4py.git Citations --------- + L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 + L. Dalcin, R. Paz, M. Storti, and J. D'Elia, *MPI for Python: performance improvements and MPI-2 extensions*, Journal of Parallel and Distributed Computing, 68(5):655-662, 2008. http://dx.doi.org/10.1016/j.jpdc.2007.09.005 + L. Dalcin, R. Paz, and M. Storti, *MPI for Python*, Journal of Parallel and Distributed Computing, 65(9):1108-1115, 2005. http://dx.doi.org/10.1016/j.jpdc.2005.03.010 Acknowledgments --------------- This project was partially supported by the Extreme Computing Research Center (ECRC), Division of Computer, Electrical, and Mathematical Sciences & Engineering (CEMSE), King Abdullah University of Science and Technology (KAUST). mpi4py-3.0.3/docs/source/0000775000175000017500000000000013560002767016235 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/docs/source/usrman/0000775000175000017500000000000013560002767017542 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/docs/source/usrman/citing.rst0000644000175000017500000000137712750576064021565 0ustar dalcinldalcinl00000000000000Citation ======== If MPI for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * L. Dalcin, R. Paz, M. Storti, and J. D'Elia, *MPI for Python: performance improvements and MPI-2 extensions*, Journal of Parallel and Distributed Computing, 68(5):655-662, 2008. http://dx.doi.org/10.1016/j.jpdc.2007.09.005 * L. Dalcin, R. Paz, and M. Storti, *MPI for Python*, Journal of Parallel and Distributed Computing, 65(9):1108-1115, 2005. http://dx.doi.org/10.1016/j.jpdc.2005.03.010 mpi4py-3.0.3/docs/source/usrman/Makefile0000644000175000017500000000113713200562156021174 0ustar dalcinldalcinl00000000000000# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = python -msphinx SPHINXPROJ = mpi4py SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) mpi4py-3.0.3/docs/source/usrman/mpi4py.futures.rst0000664000175000017500000005233413477641753023234 0ustar dalcinldalcinl00000000000000mpi4py.futures ============== .. module:: mpi4py.futures :synopsis: Execute computations concurrently using MPI processes. .. versionadded:: 3.0.0 This package provides a high-level interface for asynchronously executing callables on a pool of worker processes using MPI for inter-process communication. concurrent.futures ------------------ The :mod:`mpi4py.futures` package is based on :mod:`concurrent.futures` from the Python standard library. More precisely, :mod:`mpi4py.futures` provides the :class:`MPIPoolExecutor` class as a concrete implementation of the abstract class :class:`~concurrent.futures.Executor`. The :meth:`~concurrent.futures.Executor.submit` interface schedules a callable to be executed asynchronously and returns a :class:`~concurrent.futures.Future` object representing the execution of the callable. :class:`~concurrent.futures.Future` instances can be queried for the call result or exception. Sets of :class:`~concurrent.futures.Future` instances can be passed to the :func:`~concurrent.futures.wait` and :func:`~concurrent.futures.as_completed` functions. .. note:: The :mod:`concurrent.futures` package was introduced in Python 3.2. A `backport `_ targeting Python 2.7 is available on `PyPI `_. The :mod:`mpi4py.futures` package uses :mod:`concurrent.futures` if available, either from the Python 3 standard library or the Python 2.7 backport if installed. Otherwise, :mod:`mpi4py.futures` uses a bundled copy of core functionality backported from Python 3.5 to work with Python 2.7. .. _futures-repo: https://github.com/agronholm/pythonfutures .. _futures-pypi: https://pypi.python.org/pypi/futures .. seealso:: Module :mod:`concurrent.futures` Documentation of the :mod:`concurrent.futures` standard module. MPIPoolExecutor --------------- The :class:`MPIPoolExecutor` class uses a pool of MPI processes to execute calls asynchronously. By performing computations in separate processes, it allows to side-step the :term:`Global Interpreter Lock` but also means that only picklable objects can be executed and returned. The ``__main__`` module must be importable by worker processes, thus :class:`MPIPoolExecutor` instances may not work in the interactive interpreter. :class:`MPIPoolExecutor` takes advantage of the dynamic process management features introduced in the MPI-2 standard. In particular, the :func:`MPI.Intracomm.Spawn` method of :func:`MPI.COMM_SELF` is used in the master (or parent) process to spawn new worker (or child) processes running a Python interpreter. The master process uses a separate thread (one for each :class:`MPIPoolExecutor` instance) to communicate back and forth with the workers. The worker processes serve the execution of tasks in the main (and only) thread until they are signaled for completion. .. note:: The worker processes must import the main script in order to *unpickle* any callable defined in the :mod:`__main__` module and submitted from the master process. Furthermore, the callables may need access to other global variables. At the worker processes,:mod:`mpi4py.futures` executes the main script code (using the :mod:`runpy` module) under the :mod:`__worker__` namespace to define the :mod:`__main__` module. The :mod:`__main__` and :mod:`__worker__` modules are added to :data:`sys.modules` (both at the master and worker processes) to ensure proper *pickling* and *unpickling*. .. warning:: During the initial import phase at the workers, the main script cannot create and use new :class:`MPIPoolExecutor` instances. Otherwise, each worker would attempt to spawn a new pool of workers, leading to infinite recursion. :mod:`mpi4py.futures` detects such recursive attempts to spawn new workers and aborts the MPI execution environment. As the main script code is run under the :mod:`__worker__` namespace, the easiest way to avoid spawn recursion is using the idiom :code:`if __name__ == '__main__': ...` in the main script. .. class:: MPIPoolExecutor(max_workers=None, **kwargs) An :class:`~concurrent.futures.Executor` subclass that executes calls asynchronously using a pool of at most *max_workers* processes. If *max_workers* is ``None`` or not given, its value is determined from the :envvar:`MPI4PY_MAX_WORKERS` environment variable if set, or the MPI universe size if set, otherwise a single worker process is spawned. If *max_workers* is lower than or equal to ``0``, then a :exc:`ValueError` will be raised. Other parameters: * *python_exe*: Path to the Python interpreter executable used to spawn worker processes, otherwise :data:`sys.executable` is used. * *python_args*: :class:`list` or iterable with additional command line flags to pass to the Python executable. Command line flags determined from inspection of :data:`sys.flags`, :data:`sys.warnoptions` and :data:`sys._xoptions` in are passed unconditionally. * *mpi_info*: :class:`dict` or iterable yielding ``(key, value)`` pairs. These ``(key, value)`` pairs are passed (through an :class:`MPI.Info` object) to the :meth:`MPI.Intracomm.Spawn` call used to spawn worker processes. This mechanism allows telling the MPI runtime system where and how to start the processes. Check the documentation of the backend MPI implementation about the set of keys it interprets and the corresponding format for values. * *globals*: :class:`dict` or iterable yielding ``(name, value)`` pairs to initialize the main module namespace in worker processes. * *main*: If set to ``False``, do not import the ``__main__`` module in worker processes. Setting *main* to ``False`` prevents worker processes from accessing definitions in the parent ``__main__`` namespace. * *path*: :class:`list` or iterable with paths to append to :data:`sys.path` in worker processes to extend the :ref:`module search path `. * *wdir*: Path to set the current working directory in worker processes using :func:`os.chdir()`. The initial working directory is set by the MPI implementation. Quality MPI implementations should honor a ``wdir`` info key passed through *mpi_info*, although such feature is not mandatory. * *env*: :class:`dict` or iterable yielding ``(name, value)`` pairs with environment variables to update :data:`os.environ` in worker processes. The initial environment is set by the MPI implementation. MPI implementations may allow setting the initial environment through *mpi_info*, however such feature is not required nor recommended by the MPI standard. .. method:: submit(func, *args, **kwargs) Schedule the callable, *func*, to be executed as ``func(*args, **kwargs)`` and returns a :class:`~concurrent.futures.Future` object representing the execution of the callable. :: executor = MPIPoolExecutor(max_workers=1) future = executor.submit(pow, 321, 1234) print(future.result()) .. method:: map(func, *iterables, timeout=None, chunksize=1, **kwargs) Equivalent to :func:`map(func, *iterables) ` except *func* is executed asynchronously and several calls to *func* may be made concurrently, out-of-order, in separate processes. The returned iterator raises a :exc:`~concurrent.futures.TimeoutError` if :meth:`~iterator.__next__` is called and the result isn't available after *timeout* seconds from the original call to :meth:`~MPIPoolExecutor.map`. *timeout* can be an int or a float. If *timeout* is not specified or ``None``, there is no limit to the wait time. If a call raises an exception, then that exception will be raised when its value is retrieved from the iterator. This method chops *iterables* into a number of chunks which it submits to the pool as separate tasks. The (approximate) size of these chunks can be specified by setting *chunksize* to a positive integer. For very long iterables, using a large value for *chunksize* can significantly improve performance compared to the default size of one. By default, the returned iterator yields results in-order, waiting for successive tasks to complete . This behavior can be changed by passing the keyword argument *unordered* as ``True``, then the result iterator will yield a result as soon as any of the tasks complete. :: executor = MPIPoolExecutor(max_workers=3) for result in executor.map(pow, [2]*32, range(32)): print(result) .. method:: starmap(func, iterable, timeout=None, chunksize=1, **kwargs) Equivalent to :func:`itertools.starmap(func, iterable) `. Used instead of :meth:`~MPIPoolExecutor.map` when argument parameters are already grouped in tuples from a single iterable (the data has been "pre-zipped"). :func:`map(func, *iterable) ` is equivalent to :func:`starmap(func, zip(*iterable)) `. :: executor = MPIPoolExecutor(max_workers=3) iterable = ((2, n) for n in range(32)) for result in executor.starmap(pow, iterable): print(result) .. method:: shutdown(wait=True) Signal the executor that it should free any resources that it is using when the currently pending futures are done executing. Calls to :meth:`~MPIPoolExecutor.submit` and :meth:`~MPIPoolExecutor.map` made after :meth:`~MPIPoolExecutor.shutdown` will raise :exc:`RuntimeError`. If *wait* is ``True`` then this method will not return until all the pending futures are done executing and the resources associated with the executor have been freed. If *wait* is ``False`` then this method will return immediately and the resources associated with the executor will be freed when all pending futures are done executing. Regardless of the value of *wait*, the entire Python program will not exit until all pending futures are done executing. You can avoid having to call this method explicitly if you use the :keyword:`with` statement, which will shutdown the executor instance (waiting as if :meth:`~MPIPoolExecutor.shutdown` were called with *wait* set to ``True``). :: import time with MPIPoolExecutor(max_workers=1) as executor: future = executor.submit(time.sleep, 2) assert future.done() .. method:: bootup(wait=True) Signal the executor that it should allocate eagerly any required resources (in particular, MPI worker processes). If *wait* is ``True``, then :meth:`~MPIPoolExecutor.bootup` will not return until the executor resources are ready to process submissions. Resources are automatically allocated in the first call to :meth:`~MPIPoolExecutor.submit`, thus calling :meth:`~MPIPoolExecutor.bootup` explicitly is seldom needed. .. note:: As the master process uses a separate thread to perform MPI communication with the workers, the backend MPI implementation should provide support for :const:`MPI.THREAD_MULTIPLE`. However, some popular MPI implementations do not support yet concurrent MPI calls from multiple threads. Additionally, users may decide to initialize MPI with a lower level of thread support. If the level of thread support in the backend MPI is less than :const:`MPI.THREAD_MULTIPLE`, :mod:`mpi4py.futures` will use a global lock to serialize MPI calls. If the level of thread support is less than :const:`MPI.THREAD_SERIALIZED`, :mod:`mpi4py.futures` will emit a :exc:`RuntimeWarning`. .. warning:: If the level of thread support in the backend MPI is less than :const:`MPI.THREAD_SERIALIZED` (i.e, it is either :const:`MPI.THREAD_SINGLE` or :const:`MPI.THREAD_FUNNELED`), in theory :mod:`mpi4py.futures` cannot be used. Rather than raising an exception, :mod:`mpi4py.futures` emits a warning and takes a "cross-fingers" attitude to continue execution in the hope that serializing MPI calls with a global lock will actually work. MPICommExecutor --------------- Legacy MPI-1 implementations (as well as some vendor MPI-2 implementations) do not support the dynamic process management features introduced in the MPI-2 standard. Additionally, job schedulers and batch systems in supercomputing facilities may pose additional complications to applications using the :c:func:`MPI_Comm_spawn` routine. With these issues in mind, :mod:`mpi4py.futures` supports an additonal, more traditional, SPMD-like usage pattern requiring MPI-1 calls only. Python applications are started the usual way, e.g., using the :program:`mpiexec` command. Python code should make a collective call to the :class:`MPICommExecutor` context manager to partition the set of MPI processes within a MPI communicator in one master processes and many workers processes. The master process gets access to an :class:`MPIPoolExecutor` instance to submit tasks. Meanwhile, the worker process follow a different execution path and team-up to execute the tasks submitted from the master. Besides alleviating the lack of dynamic process managment features in legacy MPI-1 or partial MPI-2 implementations, the :class:`MPICommExecutor` context manager may be useful in classic MPI-based Python applications willing to take advantage of the simple, task-based, master/worker approach available in the :mod:`mpi4py.futures` package. .. class:: MPICommExecutor(comm=None, root=0) Context manager for :class:`MPIPoolExecutor`. This context manager splits a MPI (intra)communicator *comm* (defaults to :const:`MPI.COMM_WORLD` if not provided or ``None``) in two disjoint sets: a single master process (with rank *root* in *comm*) and the remaining worker processes. These sets are then connected through an intercommunicator. The target of the :keyword:`with` statement is assigned either an :class:`MPIPoolExecutor` instance (at the master) or ``None`` (at the workers). :: from mpi4py import MPI from mpi4py.futures import MPICommExecutor with MPICommExecutor(MPI.COMM_WORLD, root=0) as executor: if executor is not None: future = executor.submit(abs, -42) assert future.result() == 42 answer = set(executor.map(abs, [-42, 42])) assert answer == {42} .. warning:: If :class:`MPICommExecutor` is passed a communicator of size one (e.g., :const:`MPI.COMM_SELF`), then the executor instace assigned to the target of the :keyword:`with` statement will execute all submitted tasks in a single worker thread, thus ensuring that task execution still progress asynchronously. However, the :term:`GIL` will prevent the main and worker threads from running concurrently in multicore processors. Moreover, the thread context switching may harm noticeably the performance of CPU-bound tasks. In case of I/O-bound tasks, the :term:`GIL` is not usually an issue, however, as a single worker thread is used, it progress one task at a time. We advice against using :class:`MPICommExecutor` with communicators of size one and suggest refactoring your code to use instead a :class:`~concurrent.futures.ThreadPoolExecutor`. Command line ------------ Recalling the issues related to the lack of support for dynamic process managment features in MPI implementations, :mod:`mpi4py.futures` supports an alternative usage pattern where Python code (either from scripts, modules, or zip files) is run under command line control of the :mod:`mpi4py.futures` package by passing :samp:`-m mpi4py.futures` to the :program:`python` executable. The ``mpi4py.futures`` invocation should be passed a *pyfile* path to a script (or a zipfile/directory containing a :file:`__main__.py` file). Additionally, ``mpi4py.futures`` accepts :samp:`-m {mod}` to execute a module named *mod*, :samp:`-c {cmd}` to execute a command string *cmd*, or even :samp:`-` to read commands from standard input (:data:`sys.stdin`). Summarizing, :samp:`mpi4py.futures` can be invoked in the following ways: * :samp:`$ mpiexec -n {numprocs} python -m mpi4py.futures {pyfile} [arg] ...` * :samp:`$ mpiexec -n {numprocs} python -m mpi4py.futures -m {mod} [arg] ...` * :samp:`$ mpiexec -n {numprocs} python -m mpi4py.futures -c {cmd} [arg] ...` * :samp:`$ mpiexec -n {numprocs} python -m mpi4py.futures - [arg] ...` Before starting the main script execution, :mod:`mpi4py.futures` splits :const:`MPI.COMM_WORLD` in one master (the process with rank 0 in :const:`MPI.COMM_WORLD`) and 16 workers and connect them through an MPI intercommunicator. Afterwards, the master process proceeds with the execution of the user script code, which eventually creates :class:`MPIPoolExecutor` instances to submit tasks. Meanwhile, the worker processes follow a different execution path to serve the master. Upon successful termination of the main script at the master, the entire MPI execution environment exists gracefully. In case of any unhandled exception in the main script, the master process calls :code:`MPI.COMM_WORLD.Abort(1)` to prevent deadlocks and force termination of entire MPI execution environment. .. warning:: Running scripts under command line control of :mod:`mpi4py.futures` is quite similar to executing a single-process application that spawn additional workers as required. However, there is a very important difference users should be aware of. All :class:`~MPIPoolExecutor` instances created at the master will share the pool of workers. Tasks submitted at the master from many different executors will be scheduled for execution in random order as soon as a worker is idle. Any executor can easily starve all the workers (e.g., by calling :func:`MPIPoolExecutor.map` with long iterables). If that ever happens, submissions from other executors will not be serviced until free workers are available. .. seealso:: :ref:`python:using-on-cmdline` Documentation on Python command line interface. Examples -------- The following :file:`julia.py` script computes the `Julia set`_ and dumps an image to disk in binary `PGM`_ format. The code starts by importing :class:`MPIPoolExecutor` from the :mod:`mpi4py.futures` package. Next, some global constants and functions implement the computation of the Julia set. The computations are protected with the standard :code:`if __name__ == '__main__': ...` idiom. The image is computed by whole scanlines submitting all these tasks at once using the :class:`~MPIPoolExecutor.map` method. The result iterator yields scanlines in-order as the tasks complete. Finally, each scanline is dumped to disk. .. _`Julia set`: https://en.wikipedia.org/wiki/Julia_set .. _`PGM`: http://netpbm.sourceforge.net/doc/pgm.html .. code-block:: python :name: julia-py :caption: :file:`julia.py` :emphasize-lines: 1,26,28,29 :linenos: from mpi4py.futures import MPIPoolExecutor x0, x1, w = -2.0, +2.0, 640*2 y0, y1, h = -1.5, +1.5, 480*2 dx = (x1 - x0) / w dy = (y1 - y0) / h c = complex(0, 0.65) def julia(x, y): z = complex(x, y) n = 255 while abs(z) < 3 and n > 1: z = z**2 + c n -= 1 return n def julia_line(k): line = bytearray(w) y = y1 - k * dy for j in range(w): x = x0 + j * dx line[j] = julia(x, y) return line if __name__ == '__main__': with MPIPoolExecutor() as executor: image = executor.map(julia_line, range(h)) with open('julia.pgm', 'wb') as f: f.write(b'P5 %d %d %d\n' % (w, h, 255)) for line in image: f.write(line) The recommended way to execute the script is using the :program:`mpiexec` command specifying one MPI process and (optional but recommended) the desired MPI universe size [#]_. :: $ mpiexec -n 1 -usize 17 python julia.py The :program:`mpiexec` command launches a single MPI process (the master) running the Python interpreter and executing the main script. When required, :mod:`mpi4py.futures` spawns 16 additional MPI processes (the children) to dynamically allocate the pool of workers. The master submits tasks to the children and waits for the results. The children receive incoming tasks, execute them, and send back the results to the master. Alternatively, users may decide to execute the script in a more traditional way, that is, all the MPI process are started at once. The user script is run under command line control of :mod:`mpi4py.futures` passing the :ref:`-m ` flag to the :program:`python` executable. :: $ mpiexec -n 17 python -m mpi4py.futures julia.py As explained previously, the 17 processes are partitioned in one master and 16 workers. The master process executes the main script while the workers execute the tasks submitted from the master. .. [#] This :program:`mpiexec` invocation example using the ``-usize`` flag (alternatively, setting the :envvar:`MPIEXEC_UNIVERSE_SIZE` environment variable) assumes the backend MPI implementation is an MPICH derivative using the Hydra process manager. In the Open MPI implementation, the MPI universe size can be specified by setting the :envvar:`OMPI_UNIVERSE_SIZE` environment variable to a positive integer. Check the documentation of your actual MPI implementation and/or batch system for the ways to specify the desired MPI universe size. .. Local variables: .. fill-column: 79 .. End: mpi4py-3.0.3/docs/source/usrman/toctree.txt0000644000175000017500000000025213200562156021737 0ustar dalcinldalcinl00000000000000.. toctree:: :maxdepth: 2 intro overview tutorial mpi4py.futures mpi4py.run citing install appendix .. Local Variables: .. mode: rst .. End: mpi4py-3.0.3/docs/source/usrman/appendix.rst0000644000175000017500000000766513200562156022112 0ustar dalcinldalcinl00000000000000Appendix ======== .. _python-mpi: MPI-enabled Python interpreter ------------------------------ .. warning:: These days it is no longer required to use the MPI-enabled Python interpreter in most cases, and, therefore, is not built by default anymore because it is too difficult to reliably build a Python interpreter across different distributions. If you know that you still **really** need it, see below on how to use the `build_exe` and `install_exe` commands. Some MPI-1 implementations (notably, MPICH 1) **do require** the actual command line arguments to be passed at the time :c:func:`MPI_Init()` is called. In this case, you will need to use a re-built, MPI-enabled, Python interpreter binary executable. A basic implementation (targeting Python 2.X) of what is required is shown below: .. sourcecode:: c #include #include int main(int argc, char *argv[]) { int status, flag; MPI_Init(&argc, &argv); status = Py_Main(argc, argv); MPI_Finalized(&flag); if (!flag) MPI_Finalize(); return status; } The source code above is straightforward; compiling it should also be. However, the linking step is more tricky: special flags have to be passed to the linker depending on your platform. In order to alleviate you for such low-level details, *MPI for Python* provides some pure-distutils based support to build and install an MPI-enabled Python interpreter executable:: $ cd mpi4py-X.X.X $ python setup.py build_exe [--mpi=|--mpicc=/path/to/mpicc] $ [sudo] python setup.py install_exe [--install-dir=$HOME/bin] After the above steps you should have the MPI-enabled interpreter installed as :file:`{prefix}/bin/python{X}.{X}-mpi` (or :file:`$HOME/bin/python{X}.{X}-mpi`). Assuming that :file:`{prefix}/bin` (or :file:`$HOME/bin`) is listed on your :envvar:`PATH`, you should be able to enter your MPI-enabled Python interactively, for example:: $ python2.7-mpi Python 2.7.8 (default, Nov 10 2014, 08:19:18) [GCC 4.9.2 20141101 (Red Hat 4.9.2-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.executable '/usr/bin/python2.7-mpi' >>> .. _building-mpi: Building MPI from sources ------------------------- In the list below you have some executive instructions for building some of the open-source MPI implementations out there with support for shared/dynamic libraries on POSIX environments. + *MPICH* :: $ tar -zxf mpich-X.X.X.tar.gz $ cd mpich-X.X.X $ ./configure --enable-shared --prefix=/usr/local/mpich $ make $ make install + *Open MPI* :: $ tar -zxf openmpi-X.X.X tar.gz $ cd openmpi-X.X.X $ ./configure --prefix=/usr/local/openmpi $ make all $ make install + *MPICH 1* :: $ tar -zxf mpich-X.X.X.tar.gz $ cd mpich-X.X.X $ ./configure --enable-sharedlib --prefix=/usr/local/mpich1 $ make $ make install Perhaps you will need to set the :envvar:`LD_LIBRARY_PATH` environment variable (using :command:`export`, :command:`setenv` or what applies to your system) pointing to the directory containing the MPI libraries . In case of getting runtime linking errors when running MPI programs, the following lines can be added to the user login shell script (:file:`.profile`, :file:`.bashrc`, etc.). - *MPICH* :: MPI_DIR=/usr/local/mpich export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH - *Open MPI* :: MPI_DIR=/usr/local/openmpi export LD_LIBRARY_PATH=$MPI_DIR/lib:$LD_LIBRARY_PATH - *MPICH 1* :: MPI_DIR=/usr/local/mpich1 export LD_LIBRARY_PATH=$MPI_DIR/lib/shared:$LD_LIBRARY_PATH: export MPICH_USE_SHLIB=yes .. warning:: MPICH 1 support for dynamic libraries is not completely transparent. Users should set the environment variable :envvar:`MPICH_USE_SHLIB` to ``yes`` in order to avoid link problems when using the :program:`mpicc` compiler wrapper. mpi4py-3.0.3/docs/source/usrman/install.rst0000644000175000017500000001326313200562156021737 0ustar dalcinldalcinl00000000000000Installation ============ Requirements ------------ You need to have the following software properly installed in order to build *MPI for Python*: * A working MPI implementation, preferably supporting MPI-3 and built with shared/dynamic libraries. .. note:: If you want to build some MPI implementation from sources, check the instructions at :ref:`building-mpi` in the appendix. * Python 2.7, 3.3 or above. .. note:: Some MPI-1 implementations **do require** the actual command line arguments to be passed in :c:func:`MPI_Init()`. In this case, you will need to use a rebuilt, MPI-enabled, Python interpreter executable. *MPI for Python* has some support for alleviating you from this task. Check the instructions at :ref:`python-mpi` in the appendix. Using **pip** or **easy_install** --------------------------------- If you already have a working MPI (either if you installed it from sources or by using a pre-built package from your favourite GNU/Linux distribution) and the :program:`mpicc` compiler wrapper is on your search path, you can use :program:`pip`:: $ [sudo] pip install mpi4py or alternatively *setuptools* :program:`easy_install` (deprecated):: $ [sudo] easy_install mpi4py .. note:: If the :program:`mpicc` compiler wrapper is not on your search path (or if it has a different name) you can use :program:`env` to pass the environment variable :envvar:`MPICC` providing the full path to the MPI compiler wrapper executable:: $ [sudo] env MPICC=/path/to/mpicc pip install mpi4py $ [sudo] env MPICC=/path/to/mpicc easy_install mpi4py Using **distutils** ------------------- The *MPI for Python* package is available for download at the project website generously hosted by Bitbucket. You can use :program:`curl` or :program:`wget` to get a release tarball. * Using :program:`curl`:: $ curl -O https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-X.Y.tar.gz * Using :program:`wget`:: $ wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-X.Y.tar.gz After unpacking the release tarball:: $ tar -zxf mpi4py-X.Y.tar.gz $ cd mpi4py-X.Y the package is ready for building. *MPI for Python* uses a standard distutils-based build system. However, some distutils commands (like *build*) have additional options: .. cmdoption:: --mpicc= Lets you specify a special location or name for the :program:`mpicc` compiler wrapper. .. cmdoption:: --mpi= Lets you pass a section with MPI configuration within a special configuration file. .. cmdoption:: --configure Runs exhaustive tests for checking about missing MPI types, constants, and functions. This option should be passed in order to build *MPI for Python* against old MPI-1 or MPI-2 implementations, possibly providing a subset of MPI-3. If you use a MPI implementation providing a :program:`mpicc` compiler wrapper (e.g., MPICH, Open MPI), it will be used for compilation and linking. This is the preferred and easiest way of building *MPI for Python*. If :program:`mpicc` is located somewhere in your search path, simply run the *build* command:: $ python setup.py build If :program:`mpicc` is not in your search path or the compiler wrapper has a different name, you can run the *build* command specifying its location:: $ python setup.py build --mpicc=/where/you/have/mpicc Alternatively, you can provide all the relevant information about your MPI implementation by editing the file called :file:`mpi.cfg`. You can use the default section ``[mpi]`` or add a new, custom section, for example ``[other_mpi]`` (see the examples provided in the :file:`mpi.cfg` file as a starting point to write your own section):: [mpi] include_dirs = /usr/local/mpi/include libraries = mpi library_dirs = /usr/local/mpi/lib runtime_library_dirs = /usr/local/mpi/lib [other_mpi] include_dirs = /opt/mpi/include ... libraries = mpi ... library_dirs = /opt/mpi/lib ... runtime_library_dirs = /op/mpi/lib ... ... and then run the *build* command, perhaps specifying you custom configuration section:: $ python setup.py build --mpi=other_mpi After building, the package is ready for install. If you have root privileges (either by log-in as the root user of by using :command:`sudo`) and you want to install *MPI for Python* in your system for all users, just do:: $ python setup.py install The previous steps will install the :mod:`mpi4py` package at standard location :file:`{prefix}/lib/python{X}.{X}/site-packages`. If you do not have root privileges or you want to install *MPI for Python* for your private use, just do:: $ python setup.py install --user Testing ------- To quickly test the installation:: $ mpiexec -n 5 python -m mpi4py.bench helloworld Hello, World! I am process 0 of 5 on localhost. Hello, World! I am process 1 of 5 on localhost. Hello, World! I am process 2 of 5 on localhost. Hello, World! I am process 3 of 5 on localhost. Hello, World! I am process 4 of 5 on localhost. If you installed from source, issuing at the command line:: $ mpiexec -n 5 python demo/helloworld.py or (in the case of ancient MPI-1 implementations):: $ mpirun -np 5 python `pwd`/demo/helloworld.py will launch a five-process run of the Python interpreter and run the test script :file:`demo/helloworld.py` from the source distribution. You can also run all the *unittest* scripts:: $ mpiexec -n 5 python test/runtests.py or, if you have nose_ unit testing framework installed:: $ mpiexec -n 5 nosetests -w test .. _nose: http://nose.readthedocs.io/ or, if you have `py.test`_ unit testing framework installed:: $ mpiexec -n 5 py.test test/ .. _py.test: http://docs.pytest.org/ mpi4py-3.0.3/docs/source/usrman/overview.rst0000644000175000017500000005232613200562156022142 0ustar dalcinldalcinl00000000000000Overview ======== MPI for Python provides an object oriented approach to message passing which grounds on the standard MPI-2 C++ bindings. The interface was designed with focus in translating MPI syntax and semantics of standard MPI-2 bindings for C++ to Python. Any user of the standard C/C++ MPI bindings should be able to use this module without need of learning a new interface. Communicating Python Objects and Array Data ------------------------------------------- The Python standard library supports different mechanisms for data persistence. Many of them rely on disk storage, but *pickling* and *marshaling* can also work with memory buffers. The :mod:`pickle` modules provide user-extensible facilities to serialize general Python objects using ASCII or binary formats. The :mod:`marshal` module provides facilities to serialize built-in Python objects using a binary format specific to Python, but independent of machine architecture issues. *MPI for Python* can communicate any built-in or user-defined Python object taking advantage of the features provided by the :mod:`pickle` module. These facilities will be routinely used to build binary representations of objects to communicate (at sending processes), and restoring them back (at receiving processes). Although simple and general, the serialization approach (i.e., *pickling* and *unpickling*) previously discussed imposes important overheads in memory as well as processor usage, especially in the scenario of objects with large memory footprints being communicated. Pickling general Python objects, ranging from primitive or container built-in types to user-defined classes, necessarily requires computer resources. Processing is also needed for dispatching the appropriate serialization method (that depends on the type of the object) and doing the actual packing. Additional memory is always needed, and if its total amount is not known *a priori*, many reallocations can occur. Indeed, in the case of large numeric arrays, this is certainly unacceptable and precludes communication of objects occupying half or more of the available memory resources. *MPI for Python* supports direct communication of any object exporting the single-segment buffer interface. This interface is a standard Python mechanism provided by some types (e.g., strings and numeric arrays), allowing access in the C side to a contiguous memory buffer (i.e., address and length) containing the relevant data. This feature, in conjunction with the capability of constructing user-defined MPI datatypes describing complicated memory layouts, enables the implementation of many algorithms involving multidimensional numeric arrays (e.g., image processing, fast Fourier transforms, finite difference schemes on structured Cartesian grids) directly in Python, with negligible overhead, and almost as fast as compiled Fortran, C, or C++ codes. Communicators ------------- In *MPI for Python*, :class:`MPI.Comm` is the base class of communicators. The :class:`MPI.Intracomm` and :class:`MPI.Intercomm` classes are sublcasses of the :class:`MPI.Comm` class. The :meth:`MPI.Comm.Is_inter` method (and :meth:`MPI.Comm.Is_intra`, provided for convenience but not part of the MPI specification) is defined for communicator objects and can be used to determine the particular communicator class. The two predefined intracommunicator instances are available: :const:`MPI.COMM_SELF` and :const:`MPI.COMM_WORLD`. From them, new communicators can be created as needed. The number of processes in a communicator and the calling process rank can be respectively obtained with methods :meth:`MPI.Comm.Get_size` and :meth:`MPI.Comm.Get_rank`. The associated process group can be retrieved from a communicator by calling the :meth:`MPI.Comm.Get_group` method, which returns an instance of the :class:`MPI.Group` class. Set operations with :class:`MPI.Group` objects like like :meth:`MPI.Group.Union`, :meth:`MPI.Group.Intersect` and :meth:`MPI.Group.Difference` are fully supported, as well as the creation of new communicators from these groups using :meth:`MPI.Comm.Create` and :meth:`MPI.Comm.Create_group`. New communicator instances can be obtained with the :meth:`MPI.Comm.Clone`, :meth:`MPI.Comm.Dup` and :meth:`MPI.Comm.Split` methods, as well methods :meth:`MPI.Intracomm.Create_intercomm` and :meth:`MPI.Intercomm.Merge`. Virtual topologies (:class:`MPI.Cartcomm`, :class:`MPI.Graphcomm` and :class:`MPI.Distgraphcomm` classes, which are specializations of the :class:`MPI.Intracomm` class) are fully supported. New instances can be obtained from intracommunicator instances with factory methods :meth:`MPI.Intracomm.Create_cart` and :meth:`MPI.Intracomm.Create_graph`. Point-to-Point Communications ----------------------------- Point to point communication is a fundamental capability of message passing systems. This mechanism enables the transmission of data between a pair of processes, one side sending, the other receiving. MPI provides a set of *send* and *receive* functions allowing the communication of *typed* data with an associated *tag*. The type information enables the conversion of data representation from one architecture to another in the case of heterogeneous computing environments; additionally, it allows the representation of non-contiguous data layouts and user-defined datatypes, thus avoiding the overhead of (otherwise unavoidable) packing/unpacking operations. The tag information allows selectivity of messages at the receiving end. Blocking Communications ^^^^^^^^^^^^^^^^^^^^^^^ MPI provides basic send and receive functions that are *blocking*. These functions block the caller until the data buffers involved in the communication can be safely reused by the application program. In *MPI for Python*, the :meth:`MPI.Comm.Send`, :meth:`MPI.Comm.Recv` and :meth:`MPI.Comm.Sendrecv` methods of communicator objects provide support for blocking point-to-point communications within :class:`MPI.Intracomm` and :class:`MPI.Intercomm` instances. These methods can communicate memory buffers. The variants :meth:`MPI.Comm.send`, :meth:`MPI.Comm.recv` and :meth:`MPI.Comm.sendrecv` can communicate general Python objects. Nonblocking Communications ^^^^^^^^^^^^^^^^^^^^^^^^^^ On many systems, performance can be significantly increased by overlapping communication and computation. This is particularly true on systems where communication can be executed autonomously by an intelligent, dedicated communication controller. MPI provides *nonblocking* send and receive functions. They allow the possible overlap of communication and computation. Non-blocking communication always come in two parts: posting functions, which begin the requested operation; and test-for-completion functions, which allow to discover whether the requested operation has completed. In *MPI for Python*, the :meth:`MPI.Comm.Isend` and :meth:`MPI.Comm.Irecv` methods initiate send and receive operations, respectively. These methods return a :class:`MPI.Request` instance, uniquely identifying the started operation. Its completion can be managed using the :meth:`MPI.Request.Test`, :meth:`MPI.Request.Wait` and :meth:`MPI.Request.Cancel` methods. The management of :class:`MPI.Request` objects and associated memory buffers involved in communication requires a careful, rather low-level coordination. Users must ensure that objects exposing their memory buffers are not accessed at the Python level while they are involved in nonblocking message-passing operations. Persistent Communications ^^^^^^^^^^^^^^^^^^^^^^^^^ Often a communication with the same argument list is repeatedly executed within an inner loop. In such cases, communication can be further optimized by using persistent communication, a particular case of nonblocking communication allowing the reduction of the overhead between processes and communication controllers. Furthermore , this kind of optimization can also alleviate the extra call overheads associated to interpreted, dynamic languages like Python. In *MPI for Python*, the :meth:`MPI.Comm.Send_init` and :meth:`MPI.Comm.Recv_init` methods create persistent requests for a send and receive operation, respectively. These methods return an instance of the :class:`MPI.Prequest` class, a subclass of the :class:`MPI.Request` class. The actual communication can be effectively started using the :meth:`MPI.Prequest.Start` method, and its completion can be managed as previously described. Collective Communications -------------------------- Collective communications allow the transmittal of data between multiple processes of a group simultaneously. The syntax and semantics of collective functions is consistent with point-to-point communication. Collective functions communicate *typed* data, but messages are not paired with an associated *tag*; selectivity of messages is implied in the calling order. Additionally, collective functions come in blocking versions only. The more commonly used collective communication operations are the following. * Barrier synchronization across all group members. * Global communication functions + Broadcast data from one member to all members of a group. + Gather data from all members to one member of a group. + Scatter data from one member to all members of a group. * Global reduction operations such as sum, maximum, minimum, etc. In *MPI for Python*, the :meth:`MPI.Comm.Bcast`, :meth:`MPI.Comm.Scatter`, :meth:`MPI.Comm.Gather`, :meth:`MPI.Comm.Allgather`, and :meth:`MPI.Comm.Alltoall` :meth:`MPI.Comm.Alltoallw` methods provide support for collective communications of memory buffers. The lower-case variants :meth:`MPI.Comm.bcast`, :meth:`MPI.Comm.scatter`, :meth:`MPI.Comm.gather`, :meth:`MPI.Comm.allgather` and :meth:`MPI.Comm.alltoall` can communicate general Python objects. The vector variants (which can communicate different amounts of data to each process) :meth:`MPI.Comm.Scatterv`, :meth:`MPI.Comm.Gatherv`, :meth:`MPI.Comm.Allgatherv`, :meth:`MPI.Comm.Alltoallv` and :meth:`MPI.Comm.Alltoallw` are also supported, they can only communicate objects exposing memory buffers. Global reduction operations on memory buffers are accessible through the :meth:`MPI.Comm.Reduce`, `MPI.Comm.Reduce_scatter`, :meth:`MPI.Comm.Allreduce`, :meth:`MPI.Intracomm.Scan` and :meth:`MPI.Intracomm.Exscan` methods. The lower-case variants :meth:`MPI.Comm.reduce`, :meth:`MPI.Comm.allreduce`, :meth:`MPI.Intracomm.scan` and :meth:`MPI.Intracomm.exscan` can communicate general Python objects; however, the actual required reduction computations are performed sequentially at some process. All the predefined (i.e., :const:`MPI.SUM`, :const:`MPI.PROD`, :const:`MPI.MAX`, etc.) reduction operations can be applied. Dynamic Process Management -------------------------- In the context of the MPI-1 specification, a parallel application is static; that is, no processes can be added to or deleted from a running application after it has been started. Fortunately, this limitation was addressed in MPI-2. The new specification added a process management model providing a basic interface between an application and external resources and process managers. This MPI-2 extension can be really useful, especially for sequential applications built on top of parallel modules, or parallel applications with a client/server model. The MPI-2 process model provides a mechanism to create new processes and establish communication between them and the existing MPI application. It also provides mechanisms to establish communication between two existing MPI applications, even when one did not *start* the other. In *MPI for Python*, new independent process groups can be created by calling the :meth:`MPI.Intracomm.Spawn` method within an intracommunicator. This call returns a new intercommunicator (i.e., an :class:`MPI.Intercomm` instance) at the parent process group. The child process group can retrieve the matching intercommunicator by calling the :meth:`MPI.Comm.Get_parent` class method. At each side, the new intercommunicator can be used to perform point to point and collective communications between the parent and child groups of processes. Alternatively, disjoint groups of processes can establish communication using a client/server approach. Any server application must first call the :func:`MPI.Open_port` function to open a *port* and the :func:`MPI.Publish_name` function to publish a provided *service*, and next call the :meth:`MPI.Intracomm.Accept` method. Any client applications can first find a published *service* by calling the :func:`MPI.Lookup_name` function, which returns the *port* where a server can be contacted; and next call the :meth:`MPI.Intracomm.Connect` method. Both :meth:`MPI.Intracomm.Accept` and :meth:`MPI.Intracomm.Connect` methods return an :class:`MPI.Intercomm` instance. When connection between client/server processes is no longer needed, all of them must cooperatively call the :meth:`MPI.Comm.Disconnect` method. Additionally, server applications should release resources by calling the :func:`MPI.Unpublish_name` and :func:`MPI.Close_port` functions. One-Sided Communications ------------------------ One-sided communications (also called *Remote Memory Access*, *RMA*) supplements the traditional two-sided, send/receive based MPI communication model with a one-sided, put/get based interface. One-sided communication that can take advantage of the capabilities of highly specialized network hardware. Additionally, this extension lowers latency and software overhead in applications written using a shared-memory-like paradigm. The MPI specification revolves around the use of objects called *windows*; they intuitively specify regions of a process's memory that have been made available for remote read and write operations. The published memory blocks can be accessed through three functions for put (remote send), get (remote write), and accumulate (remote update or reduction) data items. A much larger number of functions support different synchronization styles; the semantics of these synchronization operations are fairly complex. In *MPI for Python*, one-sided operations are available by using instances of the :class:`MPI.Win` class. New window objects are created by calling the :meth:`MPI.Win.Create` method at all processes within a communicator and specifying a memory buffer . When a window instance is no longer needed, the :meth:`MPI.Win.Free` method should be called. The three one-sided MPI operations for remote write, read and reduction are available through calling the methods :meth:`MPI.Win.Put`, :meth:`MPI.Win.Get()`, and :meth:`MPI.Win.Accumulate` respectively within a :class:`Win` instance. These methods need an integer rank identifying the target process and an integer offset relative the base address of the remote memory block being accessed. The one-sided operations read, write, and reduction are implicitly nonblocking, and must be synchronized by using two primary modes. Active target synchronization requires the origin process to call the :meth:`MPI.Win.Start` and :meth:`MPI.Win.Complete` methods at the origin process, and target process cooperates by calling the :meth:`MPI.Win.Post` and :meth:`MPI.Win.Wait` methods. There is also a collective variant provided by the :meth:`MPI.Win.Fence` method. Passive target synchronization is more lenient, only the origin process calls the :meth:`MPI.Win.Lock` and :meth:`MPI.Win.Unlock` methods. Locks are used to protect remote accesses to the locked remote window and to protect local load/store accesses to a locked local window. Parallel Input/Output --------------------- The POSIX standard provides a model of a widely portable file system. However, the optimization needed for parallel input/output cannot be achieved with this generic interface. In order to ensure efficiency and scalability, the underlying parallel input/output system must provide a high-level interface supporting partitioning of file data among processes and a collective interface supporting complete transfers of global data structures between process memories and files. Additionally, further efficiencies can be gained via support for asynchronous input/output, strided accesses to data, and control over physical file layout on storage devices. This scenario motivated the inclusion in the MPI-2 standard of a custom interface in order to support more elaborated parallel input/output operations. The MPI specification for parallel input/output revolves around the use objects called *files*. As defined by MPI, files are not just contiguous byte streams. Instead, they are regarded as ordered collections of *typed* data items. MPI supports sequential or random access to any integral set of these items. Furthermore, files are opened collectively by a group of processes. The common patterns for accessing a shared file (broadcast, scatter, gather, reduction) is expressed by using user-defined datatypes. Compared to the communication patterns of point-to-point and collective communications, this approach has the advantage of added flexibility and expressiveness. Data access operations (read and write) are defined for different kinds of positioning (using explicit offsets, individual file pointers, and shared file pointers), coordination (non-collective and collective), and synchronism (blocking, nonblocking, and split collective with begin/end phases). In *MPI for Python*, all MPI input/output operations are performed through instances of the :class:`MPI.File` class. File handles are obtained by calling the :meth:`MPI.File.Open` method at all processes within a communicator and providing a file name and the intended access mode. After use, they must be closed by calling the :meth:`MPI.File.Close` method. Files even can be deleted by calling method :meth:`MPI.File.Delete`. After creation, files are typically associated with a per-process *view*. The view defines the current set of data visible and accessible from an open file as an ordered set of elementary datatypes. This data layout can be set and queried with the :meth:`MPI.File.Set_view` and :meth:`MPI.File.Get_view` methods respectively. Actual input/output operations are achieved by many methods combining read and write calls with different behavior regarding positioning, coordination, and synchronism. Summing up, *MPI for Python* provides the thirty (30) methods defined in MPI-2 for reading from or writing to files using explicit offsets or file pointers (individual or shared), in blocking or nonblocking and collective or noncollective versions. Environmental Management ------------------------ Initialization and Exit ^^^^^^^^^^^^^^^^^^^^^^^ Module functions :func:`MPI.Init` or :func:`MPI.Init_thread` and :func:`MPI.Finalize` provide MPI initialization and finalization respectively. Module functions :func:`MPI.Is_initialized()` and :func:`MPI.Is_finalized()` provide the respective tests for initialization and finalization. .. note:: :c:func:`MPI_Init()` or :c:func:`MPI_Init_thread()` is actually called when you import the :mod:`MPI` module from the :mod:`mpi4py` package, but only if MPI is not already initialized. In such case, calling :func:`MPI.Init` or :func:`MPI.Init_thread` from Python is expected to generate an MPI error, and in turn an exception will be raised. .. note:: :c:func:`MPI_Finalize()` is registered (by using Python C/API function :c:func:`Py_AtExit()`) for being automatically called when Python processes exit, but only if :mod:`mpi4py` actually initialized MPI. Therefore, there is no need to call :func:`MPI.Finalize()` from Python to ensure MPI finalization. Implementation Information ^^^^^^^^^^^^^^^^^^^^^^^^^^ * The MPI version number can be retrieved from module function :func:`MPI.Get_version`. It returns a two-integer tuple ``(version,subversion)``. * The :func:`MPI.Get_processor_name` function can be used to access the processor name. * The values of predefined attributes attached to the world communicator can be obtained by calling the :meth:`MPI.Comm.Get_attr` method within the :const:`MPI.COMM_WORLD` instance. Timers ^^^^^^ MPI timer functionalities are available through the :func:`MPI.Wtime` and :func:`MPI.Wtick` functions. Error Handling ^^^^^^^^^^^^^^ In order facilitate handle sharing with other Python modules interfacing MPI-based parallel libraries, the predefined MPI error handlers :const:`MPI.ERRORS_RETURN` and :const:`MPI.ERRORS_ARE_FATAL` can be assigned to and retrieved from communicators, windows and files using methods :meth:`MPI.{Comm|Win|File}.Set_errhandler` and :meth:`MPI.{Comm|Win|File}.Get_errhandler`. When the predefined error handler :const:`MPI.ERRORS_RETURN` is set, errors returned from MPI calls within Python code will raise an instance of the exception class :exc:`MPI.Exception`, which is a subclass of the standard Python exception :exc:`RuntimeError`. .. note:: After import, mpi4py overrides the default MPI rules governing inheritance of error handlers. The :const:`MPI.ERRORS_RETURN` error handler is set in the predefined :const:`MPI.COMM_SELF` and :const:`MPI.COMM_WORLD` communicators, as well as any new :class:`MPI.Comm`, :class:`MPI.Win`, or :class:`MPI.File` instance created through mpi4py. If you ever pass such handles to C/C++/Fortran library code, it is recommended to set the :const:`MPI.ERRORS_ARE_FATAL` error handler on them to ensure MPI errors do not pass silently. .. warning:: Importing with ``from mpi4py.MPI import *`` will cause a name clashing with the standard Python :exc:`Exception` base class. mpi4py-3.0.3/docs/source/usrman/tutorial.rst0000644000175000017500000002414613200562156022136 0ustar dalcinldalcinl00000000000000.. _tutorial: Tutorial ======== .. warning:: Under construction. Contributions very welcome! *MPI for Python* supports convenient, *pickle*-based communication of generic Python object as well as fast, near C-speed, direct array data communication of buffer-provider objects (e.g., NumPy arrays). * Communication of generic Python objects You have to use **all-lowercase** methods (of the :class:`Comm` class), like :meth:`send()`, :meth:`recv()`, :meth:`bcast()`. An object to be sent is passed as a paramenter to the communication call, and the received object is simply the return value. The :meth:`isend()` and :meth:`irecv` methods return :class:`Request` instances; completion of these methods can be managed using the :meth:`test` and :meth:`wait` methods of the :class:`Request` class. The :meth:`recv` and :meth:`irecv` methods may be passed a buffer object that can be repeatedly used to receive messages avoiding internal memory allocation. This buffer must be sufficiently large to accommodate the transmitted messages; hence, any buffer passed to :meth:`recv` or :meth:`irecv` must be at least as long as the *pickled* data transmitted to the receiver. Collective calls like :meth:`scatter()`, :meth:`gather()`, :meth:`allgather()`, :meth:`alltoall()` expect a single value or a sequence of :attr:`Comm.size` elements at the root or all process. They return a single value, a list of :attr:`Comm.size` elements, or :const:`None`. * Communication of buffer-like objects You have to use method names starting with an **upper-case** letter (of the :class:`Comm` class), like :meth:`Send()`, :meth:`Recv()`, :meth:`Bcast()`, :meth:`Scatter()`, :meth:`Gather()`. In general, buffer arguments to these calls must be explicitly specified by using a 2/3-list/tuple like ``[data, MPI.DOUBLE]``, or ``[data, count, MPI.DOUBLE]`` (the former one uses the byte-size of ``data`` and the extent of the MPI datatype to define ``count``). For vector collectives communication operations like :meth:`Scatterv()` and :meth:`Gatherv()`, buffer arguments are specified as ``[data, count, displ, datatype]``, where ``count`` and ``displ`` are sequences of integral values. Automatic MPI datatype discovery for NumPy arrays and PEP-3118 buffers is supported, but limited to basic C types (all C/C99-native signed/unsigned integral types and single/double precision real/complex floating types) and availability of matching datatypes in the underlying MPI implementation. In this case, the buffer-provider object can be passed directly as a buffer argument, the count and MPI datatype will be inferred. Running Python scripts with MPI ------------------------------- Most MPI programs can be run with the command :program:`mpiexec`. In practice, running Python programs looks like:: $ mpiexec -n 4 python script.py to run the program with 4 processors. Point-to-Point Communication ---------------------------- * Python objects (:mod:`pickle` under the hood):: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = {'a': 7, 'b': 3.14} comm.send(data, dest=1, tag=11) elif rank == 1: data = comm.recv(source=0, tag=11) * Python objects with non-blocking communication:: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = {'a': 7, 'b': 3.14} req = comm.isend(data, dest=1, tag=11) req.wait() elif rank == 1: req = comm.irecv(source=0, tag=11) data = req.wait() * NumPy arrays (the fast way!):: from mpi4py import MPI import numpy comm = MPI.COMM_WORLD rank = comm.Get_rank() # passing MPI datatypes explicitly if rank == 0: data = numpy.arange(1000, dtype='i') comm.Send([data, MPI.INT], dest=1, tag=77) elif rank == 1: data = numpy.empty(1000, dtype='i') comm.Recv([data, MPI.INT], source=0, tag=77) # automatic MPI datatype discovery if rank == 0: data = numpy.arange(100, dtype=numpy.float64) comm.Send(data, dest=1, tag=13) elif rank == 1: data = numpy.empty(100, dtype=numpy.float64) comm.Recv(data, source=0, tag=13) Collective Communication ------------------------ * Broadcasting a Python dictionary:: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = {'key1' : [7, 2.72, 2+3j], 'key2' : ( 'abc', 'xyz')} else: data = None data = comm.bcast(data, root=0) * Scattering Python objects:: from mpi4py import MPI comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() if rank == 0: data = [(i+1)**2 for i in range(size)] else: data = None data = comm.scatter(data, root=0) assert data == (rank+1)**2 * Gathering Python objects:: from mpi4py import MPI comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() data = (rank+1)**2 data = comm.gather(data, root=0) if rank == 0: for i in range(size): assert data[i] == (i+1)**2 else: assert data is None * Broadcasting a NumPy array:: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD rank = comm.Get_rank() if rank == 0: data = np.arange(100, dtype='i') else: data = np.empty(100, dtype='i') comm.Bcast(data, root=0) for i in range(100): assert data[i] == i * Scattering NumPy arrays:: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() sendbuf = None if rank == 0: sendbuf = np.empty([size, 100], dtype='i') sendbuf.T[:,:] = range(size) recvbuf = np.empty(100, dtype='i') comm.Scatter(sendbuf, recvbuf, root=0) assert np.allclose(recvbuf, rank) * Gathering NumPy arrays:: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() sendbuf = np.zeros(100, dtype='i') + rank recvbuf = None if rank == 0: recvbuf = np.empty([size, 100], dtype='i') comm.Gather(sendbuf, recvbuf, root=0) if rank == 0: for i in range(size): assert np.allclose(recvbuf[i,:], i) * Parallel matrix-vector product:: from mpi4py import MPI import numpy def matvec(comm, A, x): m = A.shape[0] # local rows p = comm.Get_size() xg = numpy.zeros(m*p, dtype='d') comm.Allgather([x, MPI.DOUBLE], [xg, MPI.DOUBLE]) y = numpy.dot(A, xg) return y MPI-IO ------ * Collective I/O with NumPy arrays:: from mpi4py import MPI import numpy as np amode = MPI.MODE_WRONLY|MPI.MODE_CREATE comm = MPI.COMM_WORLD fh = MPI.File.Open(comm, "./datafile.contig", amode) buffer = np.empty(10, dtype=np.int) buffer[:] = comm.Get_rank() offset = comm.Get_rank()*buffer.nbytes fh.Write_at_all(offset, buffer) fh.Close() * Non-contiguous Collective I/O with NumPy arrays and datatypes:: from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD rank = comm.Get_rank() size = comm.Get_size() amode = MPI.MODE_WRONLY|MPI.MODE_CREATE fh = MPI.File.Open(comm, "./datafile.noncontig", amode) item_count = 10 buffer = np.empty(item_count, dtype='i') buffer[:] = rank filetype = MPI.INT.Create_vector(item_count, 1, size) filetype.Commit() displacement = MPI.INT.Get_size()*rank fh.Set_view(displacement, filetype=filetype) fh.Write_all(buffer) filetype.Free() fh.Close() Dynamic Process Management -------------------------- * Compute Pi - Master (or parent, or client) side:: #!/usr/bin/env python from mpi4py import MPI import numpy import sys comm = MPI.COMM_SELF.Spawn(sys.executable, args=['cpi.py'], maxprocs=5) N = numpy.array(100, 'i') comm.Bcast([N, MPI.INT], root=MPI.ROOT) PI = numpy.array(0.0, 'd') comm.Reduce(None, [PI, MPI.DOUBLE], op=MPI.SUM, root=MPI.ROOT) print(PI) comm.Disconnect() * Compute Pi - Worker (or child, or server) side:: #!/usr/bin/env python from mpi4py import MPI import numpy comm = MPI.Comm.Get_parent() size = comm.Get_size() rank = comm.Get_rank() N = numpy.array(0, dtype='i') comm.Bcast([N, MPI.INT], root=0) h = 1.0 / N; s = 0.0 for i in range(rank, N, size): x = h * (i + 0.5) s += 4.0 / (1.0 + x**2) PI = numpy.array(s * h, dtype='d') comm.Reduce([PI, MPI.DOUBLE], None, op=MPI.SUM, root=0) comm.Disconnect() Wrapping with SWIG ------------------ * C source: .. sourcecode:: c /* file: helloworld.c */ void sayhello(MPI_Comm comm) { int size, rank; MPI_Comm_size(comm, &size); MPI_Comm_rank(comm, &rank); printf("Hello, World! " "I am process %d of %d.\n", rank, size); } * SWIG interface file: .. sourcecode:: c // file: helloworld.i %module helloworld %{ #include #include "helloworld.c" }% %include mpi4py/mpi4py.i %mpi4py_typemap(Comm, MPI_Comm); void sayhello(MPI_Comm comm); * Try it in the Python prompt:: >>> from mpi4py import MPI >>> import helloworld >>> helloworld.sayhello(MPI.COMM_WORLD) Hello, World! I am process 0 of 1. Wrapping with F2Py ------------------ * Fortran 90 source: .. sourcecode:: fortran ! file: helloworld.f90 subroutine sayhello(comm) use mpi implicit none integer :: comm, rank, size, ierr call MPI_Comm_size(comm, size, ierr) call MPI_Comm_rank(comm, rank, ierr) print *, 'Hello, World! I am process ',rank,' of ',size,'.' end subroutine sayhello * Compiling example using f2py :: $ f2py -c --f90exec=mpif90 helloworld.f90 -m helloworld * Try it in the Python prompt:: >>> from mpi4py import MPI >>> import helloworld >>> fcomm = MPI.COMM_WORLD.py2f() >>> helloworld.sayhello(fcomm) Hello, World! I am process 0 of 1. mpi4py-3.0.3/docs/source/usrman/manual.rst0000644000175000017500000000012312523721016021534 0ustar dalcinldalcinl00000000000000MPI for Python ============== .. include:: abstract.txt .. include:: toctree.txt mpi4py-3.0.3/docs/source/usrman/mpi4py.run.rst0000664000175000017500000001054213444376256022333 0ustar dalcinldalcinl00000000000000mpi4py.run ========== .. module:: mpi4py.run :synopsis: Run Python code using ``-m mpi4py``. .. versionadded:: 3.0.0 At import time, :mod:`mpi4py` initializes the MPI execution environment calling :c:func:`MPI_Init_thread` and installs an exit hook to automatically call :c:func:`MPI_Finalize` just before the Python process terminates. Additionally, :mod:`mpi4py` overrides the default :const:`MPI.ERRORS_ARE_FATAL` error handler in favor of :const:`MPI.ERRORS_RETURN`, which allows translating MPI errors in Python exceptions. These departures from standard MPI behavior may be controversial, but are quite convenient within the highly dynamic Python programming environment. Third-party code using :mod:`mpi4py` can just ``from mpi4py import MPI`` and perform MPI calls without the tedious initialization/finalization handling. MPI errors, once translated automatically to Python exceptions, can be dealt with the common :keyword:`try`...\ :keyword:`except`...\ :keyword:`finally` clauses; unhandled MPI exceptions will print a traceback which helps in locating problems in source code. Unfortunately, the interplay of automatic MPI finalization and unhandled exceptions may lead to deadlocks. In unattended runs, these deadlocks will drain the battery of your laptop, or burn precious allocation hours in your supercomputing facility. Consider the following snippet of Python code. Assume this code is stored in a standard Python script file and run with :command:`mpiexec` in two or more processes. :: from mpi4py import MPI assert MPI.COMM_WORLD.Get_size() > 1 rank = MPI.COMM_WORLD.Get_rank() if rank == 0: 1/0 MPI.COMM_WORLD.send(None, dest=1, tag=42) elif rank == 1: MPI.COMM_WORLD.recv(source=0, tag=42) Process 0 raises :exc:`ZeroDivisionError` exception before performing a send call to process 1. As the exception is not handled, the Python interpreter running in process 0 will proceed to exit with non-zero status. However, as :mod:`mpi4py` installed a finalizer hook to call :c:func:`MPI_Finalize` before exit, process 0 will block waiting for other processes to also enter the :c:func:`MPI_Finalize` call. Meanwhile, process 1 will block waiting for a message to arrive from process 0, thus never reaching to :c:func:`MPI_Finalize`. The whole MPI execution environment is irremediably in a deadlock state. To alleviate this issue, :mod:`mpi4py` offers a simple, alternative command line execution mechanism based on using the :ref:`-m ` flag and implemented with the :mod:`runpy` module. To use this features, Python code should be run passing ``-m mpi4py`` in the command line invoking the Python interpreter. In case of unhandled exceptions, the finalizer hook will call :c:func:`MPI_Abort` on the :c:data:`MPI_COMM_WORLD` communicator, thus effectively aborting the MPI execution environment. .. warning:: When a process is forced to abort, resources (e.g. open files) are not cleaned-up and any registered finalizers (either with the :mod:`atexit` module, the Python C/API function :c:func:`Py_AtExit()`, or even the C standard library function :c:func:`atexit`) will not be executed. Thus, aborting execution is an extremely impolite way of ensuring process termination. However, MPI provides no other mechanism to recover from a deadlock state. Interface options ----------------- The use of ``-m mpi4py`` to execute Python code on the command line resembles that of the Python interpreter. * :samp:`mpiexec -n {numprocs} python -m mpi4py {pyfile} [arg] ...` * :samp:`mpiexec -n {numprocs} python -m mpi4py -m {mod} [arg] ...` * :samp:`mpiexec -n {numprocs} python -m mpi4py -c {cmd} [arg] ...` * :samp:`mpiexec -n {numprocs} python -m mpi4py - [arg] ...` .. describe:: Execute the Python code contained in *pyfile*, which must be a filesystem path referring to either a Python file, a directory containing a :file:`__main__.py` file, or a zipfile containing a :file:`__main__.py` file. .. cmdoption:: -m Search :data:`sys.path` for the named module *mod* and execute its contents. .. cmdoption:: -c Execute the Python code in the *cmd* string command. .. describe:: - Read commands from standard input (:data:`sys.stdin`). .. seealso:: :ref:`python:using-on-cmdline` Documentation on Python command line interface. .. Local variables: .. fill-column: 79 .. End: mpi4py-3.0.3/docs/source/usrman/conf.py0000644000175000017500000001417513431513716021045 0ustar dalcinldalcinl00000000000000# -*- coding: utf-8 -*- # # MPI for Python documentation build configuration file, created by # sphinx-quickstart on Sun Oct 1 17:50:06 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import os # import sys # sys.path.insert(0, os.path.abspath('.')) def get_version(): import sys, os, re here = os.path.dirname(__file__) pardir = [os.path.pardir] * 3 topdir = os.path.join(here, *pardir) srcdir = os.path.join(topdir, 'src') with open(os.path.join(srcdir, 'mpi4py', '__init__.py')) as f: m = re.search(r"__version__\s*=\s*'(.*)'", f.read()) return m.groups()[0] pkg_version = get_version() # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['sphinx.ext.intersphinx'] # Add any paths that contain templates here, relative to this directory. # templates_path = ['_templates'] templates_path = [] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. package = 'mpi4py' project = u'MPI for Python' copyright = u'2019, Lisandro Dalcin' author = u'Lisandro Dalcin' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = pkg_version[:3] # The full version, including alpha/beta/rc tags. release = pkg_version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # # html_theme_options = {} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ['_static'] html_static_path = [] # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # This is required for the alabaster theme # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars # html_sidebars = { # '**': [ # 'about.html', # 'navigation.html', # 'relations.html', # needs 'show_related': True theme option to display # 'searchbox.html', # 'donate.html', # ] # } # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. htmlhelp_basename = package+'-man' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', 'papersize': 'a4', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('manual', package+'.tex', project, author, 'howto'), ] # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, package, project, [author], 1) ] # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, package, project, author, package, project+'.', 'Miscellaneous'), ] # -- Options for Epub output ---------------------------------------------- # Bibliographic Dublin Core info. epub_title = project epub_author = author epub_publisher = author epub_copyright = copyright # The unique identifier of the text. This can be a ISBN number # or the project homepage. # # epub_identifier = '' # A unique identification for the text. # # epub_uid = '' # A list of files that should not be packed into the epub file. epub_exclude_files = ['search.html'] # Example configuration for intersphinx: refer to the Python standard library. # intersphinx_mapping = {'https://docs.python.org/': None} intersphinx_mapping = {'python': ('https://docs.python.org/3/', None)} mpi4py-3.0.3/docs/source/usrman/abstract.txt0000644000175000017500000000140512750576064022112 0ustar dalcinldalcinl00000000000000.. topic:: Abstract This document describes the *MPI for Python* package. *MPI for Python* provides bindings of the *Message Passing Interface* (MPI) standard for the Python programming language, allowing any Python program to exploit multiple processors. This package is constructed on top of the MPI-1/2/3 specifications and provides an object oriented interface which resembles the MPI-2 C++ bindings. It supports point-to-point (sends, receives) and collective (broadcasts, scatters, gathers) communications of any *picklable* Python object, as well as optimized communications of Python object exposing the single-segment buffer interface (NumPy arrays, builtin bytes/string/array objects) .. Local Variables: .. mode: rst .. End: mpi4py-3.0.3/docs/source/usrman/intro.rst0000644000175000017500000002311313200562156021417 0ustar dalcinldalcinl00000000000000Introduction ============ Over the last years, high performance computing has become an affordable resource to many more researchers in the scientific community than ever before. The conjunction of quality open source software and commodity hardware strongly influenced the now widespread popularity of Beowulf_ class clusters and cluster of workstations. Among many parallel computational models, message-passing has proven to be an effective one. This paradigm is specially suited for (but not limited to) distributed memory architectures and is used in today's most demanding scientific and engineering application related to modeling, simulation, design, and signal processing. However, portable message-passing parallel programming used to be a nightmare in the past because of the many incompatible options developers were faced to. Fortunately, this situation definitely changed after the MPI Forum released its standard specification. High performance computing is traditionally associated with software development using compiled languages. However, in typical applications programs, only a small part of the code is time-critical enough to require the efficiency of compiled languages. The rest of the code is generally related to memory management, error handling, input/output, and user interaction, and those are usually the most error prone and time-consuming lines of code to write and debug in the whole development process. Interpreted high-level languages can be really advantageous for this kind of tasks. For implementing general-purpose numerical computations, MATLAB [#]_ is the dominant interpreted programming language. In the open source side, Octave and Scilab are well known, freely distributed software packages providing compatibility with the MATLAB language. In this work, we present MPI for Python, a new package enabling applications to exploit multiple processors using standard MPI "look and feel" in Python scripts. .. [#] MATLAB is a registered trademark of The MathWorks, Inc. What is MPI? ------------ MPI_, [mpi-using]_ [mpi-ref]_ the *Message Passing Interface*, is a standardized and portable message-passing system designed to function on a wide variety of parallel computers. The standard defines the syntax and semantics of library routines and allows users to write portable programs in the main scientific programming languages (Fortran, C, or C++). Since its release, the MPI specification [mpi-std1]_ [mpi-std2]_ has become the leading standard for message-passing libraries for parallel computers. Implementations are available from vendors of high-performance computers and from well known open source projects like MPICH_ [mpi-mpich]_ and `Open MPI`_ [mpi-openmpi]_. What is Python? --------------- Python_ is a modern, easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming with dynamic typing and dynamic binding. It supports modules and packages, which encourages program modularity and code reuse. Python's elegant syntax, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed. It is easily extended with new functions and data types implemented in C or C++. Python is also suitable as an extension language for customizable applications. Python is an ideal candidate for writing the higher-level parts of large-scale scientific applications [Hinsen97]_ and driving simulations in parallel architectures [Beazley97]_ like clusters of PC's or SMP's. Python codes are quickly developed, easily maintained, and can achieve a high degree of integration with other libraries written in compiled languages. Related Projects ---------------- As this work started and evolved, some ideas were borrowed from well known MPI and Python related open source projects from the Internet. * `OOMPI`_ + It has not relation with Python, but is an excellent object oriented approach to MPI. + It is a C++ class library specification layered on top of the C bindings that encapsulates MPI into a functional class hierarchy. + It provides a flexible and intuitive interface by adding some abstractions, like *Ports* and *Messages*, which enrich and simplify the syntax. * `Pypar`_ + Its interface is rather minimal. There is no support for communicators or process topologies. + It does not require the Python interpreter to be modified or recompiled, but does not permit interactive parallel runs. + General (*picklable*) Python objects of any type can be communicated. There is good support for numeric arrays, practically full MPI bandwidth can be achieved. * `pyMPI`_ + It rebuilds the Python interpreter providing a built-in module for message passing. It does permit interactive parallel runs, which are useful for learning and debugging. + It provides an interface suitable for basic parallel programing. There is not full support for defining new communicators or process topologies. + General (picklable) Python objects can be messaged between processors. There is not support for numeric arrays. * `Scientific Python`_ + It provides a collection of Python modules that are useful for scientific computing. + There is an interface to MPI and BSP (*Bulk Synchronous Parallel programming*). + The interface is simple but incomplete and does not resemble the MPI specification. There is support for numeric arrays. Additionally, we would like to mention some available tools for scientific computing and software development with Python. + `NumPy`_ is a package that provides array manipulation and computational capabilities similar to those found in IDL, MATLAB, or Octave. Using NumPy, it is possible to write many efficient numerical data processing applications directly in Python without using any C, C++ or Fortran code. + `SciPy`_ is an open source library of scientific tools for Python, gathering a variety of high level science and engineering modules together as a single package. It includes modules for graphics and plotting, optimization, integration, special functions, signal and image processing, genetic algorithms, ODE solvers, and others. + `Cython`_ is a language that makes writing C extensions for the Python language as easy as Python itself. The Cython language is very close to the Python language, but Cython additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code. This makes Cython the ideal language for wrapping for external C libraries, and for fast C modules that speed up the execution of Python code. + `SWIG`_ is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages like Perl, Tcl/Tk, Ruby and Python. Issuing header files to SWIG is the simplest approach to interfacing C/C++ libraries from a Python module. .. External Links .. .............. .. _MPI: http://mpi-forum.org/ .. _MPICH: https://www.mpich.org/ .. _Open MPI: https://www.open-mpi.org/ .. _Beowulf: http://www.beowulf.org/ .. _Python: https://www.python.org/ .. _NumPy: http://www.numpy.org/ .. _SciPy: https://www.scipy.org/ .. _Cython: http://cython.org/ .. _SWIG: http://www.swig.org/ .. _OOMPI: http://www.osl.iu.edu/research/oompi/overview.php .. _Pypar: https://github.com/daleroberts/pypar .. _pyMPI: https://sourceforge.net/projects/pympi/ .. _Scientific Python: http://dirac.cnrs-orleans.fr/plone/software/scientificpython/ .. References .. .......... .. [mpi-std1] MPI Forum. MPI: A Message Passing Interface Standard. International Journal of Supercomputer Applications, volume 8, number 3-4, pages 159-416, 1994. .. [mpi-std2] MPI Forum. MPI: A Message Passing Interface Standard. High Performance Computing Applications, volume 12, number 1-2, pages 1-299, 1998. .. [mpi-using] William Gropp, Ewing Lusk, and Anthony Skjellum. Using MPI: portable parallel programming with the message-passing interface. MIT Press, 1994. .. [mpi-ref] Mark Snir, Steve Otto, Steven Huss-Lederman, David Walker, and Jack Dongarra. MPI - The Complete Reference, volume 1, The MPI Core. MIT Press, 2nd. edition, 1998. .. [mpi-mpich] W. Gropp, E. Lusk, N. Doss, and A. Skjellum. A high-performance, portable implementation of the MPI message passing interface standard. Parallel Computing, 22(6):789-828, September 1996. .. [mpi-openmpi] Edgar Gabriel, Graham E. Fagg, George Bosilca, Thara Angskun, Jack J. Dongarra, Jeffrey M. Squyres, Vishal Sahay, Prabhanjan Kambadur, Brian Barrett, Andrew Lumsdaine, Ralph H. Castain, David J. Daniel, Richard L. Graham, and Timothy S. Woodall. Open MPI: Goals, Concept, and Design of a Next Generation MPI Implementation. In Proceedings, 11th European PVM/MPI Users' Group Meeting, Budapest, Hungary, September 2004. .. [Hinsen97] Konrad Hinsen. The Molecular Modelling Toolkit: a case study of a large scientific application in Python. In Proceedings of the 6th International Python Conference, pages 29-35, San Jose, Ca., October 1997. .. [Beazley97] David M. Beazley and Peter S. Lomdahl. Feeding a large-scale physics application to Python. In Proceedings of the 6th International Python Conference, pages 21-29, San Jose, Ca., October 1997. mpi4py-3.0.3/docs/source/usrman/make.bat0000644000175000017500000000144413200562156021142 0ustar dalcinldalcinl00000000000000@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=python -msphinx ) set SOURCEDIR=. set BUILDDIR=_build set SPHINXPROJ=mpi4py if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The Sphinx module was not found. Make sure you have Sphinx installed, echo.then set the SPHINXBUILD environment variable to point to the full echo.path of the 'sphinx-build' executable. Alternatively you may add the echo.Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% :end popd mpi4py-3.0.3/docs/source/usrman/index.rst0000644000175000017500000000054013200562156021372 0ustar dalcinldalcinl00000000000000MPI for Python ============== :Author: Lisandro Dalcin :Contact: dalcinl@gmail.com :Web Site: https://bitbucket.org/mpi4py/mpi4py :Date: |today| .. include:: abstract.txt Contents ======== .. include:: toctree.txt .. Indices and tables .. ================== .. .. * :ref:`genindex` .. * :ref:`modindex` .. * :ref:`search` mpi4py-3.0.3/mpi4py.egg-info/0000775000175000017500000000000013560002767016721 5ustar dalcinldalcinl00000000000000mpi4py-3.0.3/mpi4py.egg-info/PKG-INFO0000664000175000017500000001416713560002767020027 0ustar dalcinldalcinl00000000000000Metadata-Version: 1.2 Name: mpi4py Version: 3.0.3 Summary: Python bindings for MPI Home-page: https://bitbucket.org/mpi4py/mpi4py/ Author: Lisandro Dalcin Author-email: dalcinl@gmail.com Maintainer: Lisandro Dalcin Maintainer-email: dalcinl@gmail.com License: BSD Download-URL: https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-3.0.3.tar.gz Description: MPI for Python ============== This package provides Python bindings for the **Message Passing Interface** (MPI_) standard. It is implemented on top of the MPI-1/2/3 specification and exposes an API which grounds on the standard MPI-2 C++ bindings. .. _MPI: http://www.mpi-forum.org/ Features -------- This package supports: * Convenient communication of any *picklable* Python object + point-to-point (send & receive) + collective (broadcast, scatter & gather, reductions) * Fast communication of Python object exposing the *Python buffer interface* (NumPy arrays, builtin bytes/string/array objects) + point-to-point (blocking/nonbloking/persistent send & receive) + collective (broadcast, block/vector scatter & gather, reductions) * Process groups and communication domains + Creation of new intra/inter communicators + Cartesian & graph topologies * Parallel input/output: + read & write + blocking/nonbloking & collective/noncollective + individual/shared file pointers & explicit offset * Dynamic process management + spawn & spawn multiple + accept/connect + name publishing & lookup * One-sided operations + remote memory access (put, get, accumulate) + passive target syncronization (start/complete & post/wait) + active target syncronization (lock & unlock) Install ------- Once you have a working MPI implementation and the ``mpicc`` compiler wrapper is on your search path, you can install this package * using ``pip``:: $ pip install mpi4py * using ``easy_install`` (deprecated):: $ easy_install mpi4py You can also install the in-development version of mpi4py * using ``pip``:: $ pip install git+https://bitbucket.org/mpi4py/mpi4py or:: $ pip install https://bitbucket.org/mpi4py/mpi4py/get/master.tar.gz * using ``easy_install`` (deprecated):: $ easy_install git+https://bitbucket.org/mpi4py/mpi4py or:: $ easy_install https://bitbucket.org/mpi4py/mpi4py/get/master.tar.gz You can also install it directly on Fedora (as well as RHEL and their derivatives using the EPEL software repository) * using ``dnf`` and the ``mpich`` package on ``x86_64``:: $ dnf install mpi4py-mpich * using ``dnf`` and the ``openmpi`` package on ``x86_64``:: $ dnf install mpi4py-openmpi Please remember to load the correct module for your choosen MPI environment * for ``mpich`` package on ``x86_64`` do:: $ module load mpi/mpich-x86_64 $ python -c "import mpi4py" * for ``openmpi`` package on ``x86_64`` do:: $ module load mpi/openmpi-x86_64 $ python -c "import mpi4py" Citations --------- If MPI for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project. * L. Dalcin, P. Kler, R. Paz, and A. Cosimo, *Parallel Distributed Computing using Python*, Advances in Water Resources, 34(9):1124-1139, 2011. http://dx.doi.org/10.1016/j.advwatres.2011.04.013 * L. Dalcin, R. Paz, M. Storti, and J. D'Elia, *MPI for Python: performance improvements and MPI-2 extensions*, Journal of Parallel and Distributed Computing, 68(5):655-662, 2008. http://dx.doi.org/10.1016/j.jpdc.2007.09.005 * L. Dalcin, R. Paz, and M. Storti, *MPI for Python*, Journal of Parallel and Distributed Computing, 65(9):1108-1115, 2005. http://dx.doi.org/10.1016/j.jpdc.2005.03.010 Keywords: scientific computing,parallel computing,message passing interface,MPI Platform: Mac OS X Platform: Linux Platform: Solaris Platform: Unix Platform: Windows Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Science/Research Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: MacOS :: MacOS X Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: POSIX Classifier: Operating System :: POSIX :: Linux Classifier: Operating System :: POSIX :: SunOS/Solaris Classifier: Operating System :: Unix Classifier: Programming Language :: C Classifier: Programming Language :: Cython Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Scientific/Engineering Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: System :: Distributed Computing Provides: mpi4py mpi4py-3.0.3/mpi4py.egg-info/dependency_links.txt0000664000175000017500000000000113560002767022767 0ustar dalcinldalcinl00000000000000 mpi4py-3.0.3/mpi4py.egg-info/top_level.txt0000664000175000017500000000000713560002767021450 0ustar dalcinldalcinl00000000000000mpi4py mpi4py-3.0.3/mpi4py.egg-info/SOURCES.txt0000664000175000017500000002625213560002767020614 0ustar dalcinldalcinl00000000000000CHANGES.rst DESCRIPTION.rst LICENSE.rst MANIFEST.in README.rst mpi.cfg setup.cfg setup.py conf/CMakeLists.txt conf/coverage-helper.py conf/coverage.sh conf/cythonize.bat conf/cythonize.py conf/cythonize.sh conf/epydoc.cfg conf/epydocify.py conf/mpiconfig.py conf/mpidistutils.py conf/mpiregexes.py conf/mpiscanner.py demo/README.txt demo/helloworld.c demo/helloworld.cxx demo/helloworld.f08 demo/helloworld.f90 demo/helloworld.py demo/makefile demo/osu_allgather.py demo/osu_alltoall.py demo/osu_alltoallv.py demo/osu_barrier.py demo/osu_bcast.py demo/osu_bibw.py demo/osu_bw.py demo/osu_gather.py demo/osu_latency.py demo/osu_multi_lat.py demo/osu_scatter.py demo/python-config demo/compute-pi/README.txt demo/compute-pi/cpi-cco.py demo/compute-pi/cpi-dpm.py demo/compute-pi/cpi-rma.py demo/compute-pi/makefile demo/cython/helloworld.pyx demo/cython/makefile demo/cython/mpi-compat.h demo/embedding/helloworld.c demo/embedding/makefile demo/futures/makefile demo/futures/perf_crawl.py demo/futures/perf_primes.py demo/futures/run_crawl.py demo/futures/run_julia.py demo/futures/run_mandelbrot.py demo/futures/run_primes.py demo/futures/test_futures.py demo/futures/test_service.py demo/futures/test_service.sh demo/init-fini/makefile demo/init-fini/runtests.bat demo/init-fini/runtests.sh demo/init-fini/test_0.py demo/init-fini/test_1.py demo/init-fini/test_2a.py demo/init-fini/test_2b.py demo/init-fini/test_3.py demo/init-fini/test_4.py demo/init-fini/test_5.py demo/libmpi-cffi/apigen.py demo/libmpi-cffi/build.py demo/libmpi-cffi/makefile demo/libmpi-cffi/test_helloworld.py demo/libmpi-cffi/test_latency.py demo/libmpi-cffi/test_ringtest.py demo/mandelbrot/makefile demo/mandelbrot/mandelbrot-master.py demo/mandelbrot/mandelbrot-seq.py demo/mandelbrot/mandelbrot-worker.f90 demo/mandelbrot/mandelbrot.py demo/mpe-logging/cpilog.py demo/mpe-logging/makefile demo/mpe-logging/ring.py demo/mpe-logging/threads.py demo/mpi-ref-v1/README.txt demo/mpi-ref-v1/ex-2.01.py demo/mpi-ref-v1/ex-2.08.py demo/mpi-ref-v1/ex-2.16.py demo/mpi-ref-v1/ex-2.29.py demo/mpi-ref-v1/ex-2.32.py demo/mpi-ref-v1/ex-2.34.py demo/mpi-ref-v1/ex-2.35.py demo/mpi-ref-v1/ex-3.01.py demo/mpi-ref-v1/ex-3.02.py demo/mpi-ref-v1/ex-3.03.py demo/mpi-ref-v1/ex-3.04.py demo/mpi-ref-v1/ex-3.05.py demo/mpi-ref-v1/ex-3.06.py demo/mpi-ref-v1/ex-3.07.py demo/mpi-ref-v1/ex-3.08.py demo/mpi-ref-v1/ex-3.09.py demo/mpi-ref-v1/ex-3.11.py demo/mpi-ref-v1/ex-3.12.py demo/mpi-ref-v1/ex-3.13.py demo/mpi-ref-v1/makefile demo/mpi-ref-v1/runtests.bat demo/mpi-ref-v1/runtests.sh demo/nxtval/makefile demo/nxtval/nxtval-dynproc.py demo/nxtval/nxtval-mpi3.py demo/nxtval/nxtval-onesided.py demo/nxtval/nxtval-scalable.py demo/nxtval/nxtval-threads.py demo/nxtval/runtests.bat demo/nxtval/runtests.sh demo/reductions/makefile demo/reductions/reductions.py demo/reductions/runtests.bat demo/reductions/runtests.sh demo/reductions/test_reductions.py demo/sequential/makefile demo/sequential/runtests.bat demo/sequential/runtests.sh demo/sequential/seq.py demo/sequential/test_seq.py demo/spawning/cpi-master.c demo/spawning/cpi-master.cxx demo/spawning/cpi-master.f90 demo/spawning/cpi-master.py demo/spawning/cpi-worker.c demo/spawning/cpi-worker.cxx demo/spawning/cpi-worker.f90 demo/spawning/cpi-worker.py demo/spawning/makefile demo/test-run/makefile demo/test-run/run-script.py demo/test-run/test_run.py demo/threads/makefile demo/threads/sendrecv.py demo/vampirtrace/cpilog.py demo/vampirtrace/makefile demo/vampirtrace/ring.py demo/vampirtrace/threads.py demo/wrap-boost/helloworld.cxx demo/wrap-boost/makefile demo/wrap-boost/test.py demo/wrap-c/helloworld.c demo/wrap-c/makefile demo/wrap-c/test.py demo/wrap-cffi/helloworld.c demo/wrap-cffi/helloworld.py demo/wrap-cffi/makefile demo/wrap-cffi/test.py demo/wrap-ctypes/helloworld.c demo/wrap-ctypes/helloworld.py demo/wrap-ctypes/makefile demo/wrap-ctypes/test.py demo/wrap-cython/helloworld.pyx demo/wrap-cython/makefile demo/wrap-cython/mpi-compat.h demo/wrap-cython/test.py demo/wrap-f2py/helloworld.f90 demo/wrap-f2py/makefile demo/wrap-f2py/test.py demo/wrap-swig/helloworld.i demo/wrap-swig/makefile demo/wrap-swig/test.py docs/CHANGES.html docs/LICENSE.html docs/index.html docs/index.rst docs/mpi4py.1 docs/mpi4py.bib docs/mpi4py.info docs/mpi4py.pdf docs/apiref/api-objects.txt docs/apiref/class-tree.html docs/apiref/crarr.png docs/apiref/epydoc.css docs/apiref/epydoc.js docs/apiref/frames.html docs/apiref/help.html docs/apiref/identifier-index.html docs/apiref/index.html docs/apiref/module-tree.html docs/apiref/mpi4py-module.html docs/apiref/mpi4py-pysrc.html docs/apiref/mpi4py.MPI-module.html docs/apiref/mpi4py.MPI.Cartcomm-class.html docs/apiref/mpi4py.MPI.Comm-class.html docs/apiref/mpi4py.MPI.Datatype-class.html docs/apiref/mpi4py.MPI.Distgraphcomm-class.html docs/apiref/mpi4py.MPI.Errhandler-class.html docs/apiref/mpi4py.MPI.Exception-class.html docs/apiref/mpi4py.MPI.File-class.html docs/apiref/mpi4py.MPI.Graphcomm-class.html docs/apiref/mpi4py.MPI.Grequest-class.html docs/apiref/mpi4py.MPI.Group-class.html docs/apiref/mpi4py.MPI.Info-class.html docs/apiref/mpi4py.MPI.Intercomm-class.html docs/apiref/mpi4py.MPI.Intracomm-class.html docs/apiref/mpi4py.MPI.Message-class.html docs/apiref/mpi4py.MPI.Op-class.html docs/apiref/mpi4py.MPI.Prequest-class.html docs/apiref/mpi4py.MPI.Request-class.html docs/apiref/mpi4py.MPI.Status-class.html docs/apiref/mpi4py.MPI.Topocomm-class.html docs/apiref/mpi4py.MPI.Win-class.html docs/apiref/mpi4py.MPI.memory-class.html docs/apiref/redirect.html docs/apiref/toc-everything.html docs/apiref/toc-mpi4py-module.html docs/apiref/toc-mpi4py.MPI-module.html docs/apiref/toc.html docs/source/usrman/Makefile docs/source/usrman/abstract.txt docs/source/usrman/appendix.rst docs/source/usrman/citing.rst docs/source/usrman/conf.py docs/source/usrman/index.rst docs/source/usrman/install.rst docs/source/usrman/intro.rst docs/source/usrman/make.bat docs/source/usrman/manual.rst docs/source/usrman/mpi4py.futures.rst docs/source/usrman/mpi4py.run.rst docs/source/usrman/overview.rst docs/source/usrman/toctree.txt docs/source/usrman/tutorial.rst docs/usrman/appendix.html docs/usrman/citing.html docs/usrman/genindex.html docs/usrman/index.html docs/usrman/install.html docs/usrman/intro.html docs/usrman/manual.html docs/usrman/mpi4py.futures.html docs/usrman/mpi4py.run.html docs/usrman/objects.inv docs/usrman/overview.html docs/usrman/py-modindex.html docs/usrman/search.html docs/usrman/searchindex.js docs/usrman/tutorial.html docs/usrman/_sources/appendix.rst.txt docs/usrman/_sources/citing.rst.txt docs/usrman/_sources/index.rst.txt docs/usrman/_sources/install.rst.txt docs/usrman/_sources/intro.rst.txt docs/usrman/_sources/manual.rst.txt docs/usrman/_sources/mpi4py.futures.rst.txt docs/usrman/_sources/mpi4py.run.rst.txt docs/usrman/_sources/overview.rst.txt docs/usrman/_sources/tutorial.rst.txt docs/usrman/_static/ajax-loader.gif docs/usrman/_static/basic.css docs/usrman/_static/classic.css docs/usrman/_static/comment-bright.png docs/usrman/_static/comment-close.png docs/usrman/_static/comment.png docs/usrman/_static/default.css docs/usrman/_static/doctools.js docs/usrman/_static/documentation_options.js docs/usrman/_static/down-pressed.png docs/usrman/_static/down.png docs/usrman/_static/file.png docs/usrman/_static/jquery-3.2.1.js docs/usrman/_static/jquery.js docs/usrman/_static/language_data.js docs/usrman/_static/minus.png docs/usrman/_static/plus.png docs/usrman/_static/pygments.css docs/usrman/_static/searchtools.js docs/usrman/_static/sidebar.js docs/usrman/_static/underscore-1.3.1.js docs/usrman/_static/underscore.js docs/usrman/_static/up-pressed.png docs/usrman/_static/up.png docs/usrman/_static/websupport.js mpi4py.egg-info/PKG-INFO mpi4py.egg-info/SOURCES.txt mpi4py.egg-info/dependency_links.txt mpi4py.egg-info/not-zip-safe mpi4py.egg-info/top_level.txt src/MPI.c src/atimport.h src/dynload.c src/dynload.h src/mpi4py.MPI.c src/mpi4py.MPI.pyx src/msvcfix.h src/pycompat.h src/pympicommctx.h src/pympivendor.h src/python.c src/lib-mpi/compat.h src/lib-mpi/config.h src/lib-mpi/fallback.h src/lib-mpi/missing.h src/lib-mpi/compat/lammpi.h src/lib-mpi/compat/mpich1.h src/lib-mpi/compat/mpich2.h src/lib-mpi/compat/mpich3.h src/lib-mpi/compat/msmpi.h src/lib-mpi/compat/openmpi.h src/lib-mpi/compat/pcmpi.h src/lib-mpi/compat/sicortex.h src/lib-mpi/config/mpi-11.h src/lib-mpi/config/mpi-12.h src/lib-mpi/config/mpi-20.h src/lib-mpi/config/mpi-22.h src/lib-mpi/config/mpi-30.h src/lib-mpi/config/mpi-31.h src/lib-mpi/config/mpich2-io.h src/lib-mpi/config/mpich2.h src/lib-mpi/config/mpich3-io.h src/lib-mpi/config/mpich3.h src/lib-mpi/config/msmpi.h src/lib-mpi/config/openmpi-io.h src/lib-mpi/config/openmpi.h src/lib-mpi/config/unknown.h src/lib-pmpi/mpe.c src/lib-pmpi/vt-hyb.c src/lib-pmpi/vt-mpi.c src/lib-pmpi/vt.c src/lib-pmpi/vt.h src/mpi4py/MPI.pxd src/mpi4py/__init__.pxd src/mpi4py/__init__.py src/mpi4py/__main__.py src/mpi4py/bench.py src/mpi4py/libmpi.pxd src/mpi4py/run.py src/mpi4py/MPI/CAPI.pxi src/mpi4py/MPI/Comm.pyx src/mpi4py/MPI/Datatype.pyx src/mpi4py/MPI/Errhandler.pyx src/mpi4py/MPI/Exception.pyx src/mpi4py/MPI/ExceptionC.pyx src/mpi4py/MPI/ExceptionP.pyx src/mpi4py/MPI/File.pyx src/mpi4py/MPI/Group.pyx src/mpi4py/MPI/Info.pyx src/mpi4py/MPI/MPI.pyx src/mpi4py/MPI/Message.pyx src/mpi4py/MPI/Op.pyx src/mpi4py/MPI/Request.pyx src/mpi4py/MPI/Status.pyx src/mpi4py/MPI/Win.pyx src/mpi4py/MPI/asarray.pxi src/mpi4py/MPI/asbuffer.pxi src/mpi4py/MPI/asmemory.pxi src/mpi4py/MPI/asstring.pxi src/mpi4py/MPI/atimport.pxi src/mpi4py/MPI/attrimpl.pxi src/mpi4py/MPI/commimpl.pxi src/mpi4py/MPI/drepimpl.pxi src/mpi4py/MPI/helpers.pxi src/mpi4py/MPI/mpierrhdl.pxi src/mpi4py/MPI/msgbuffer.pxi src/mpi4py/MPI/msgpickle.pxi src/mpi4py/MPI/opimpl.pxi src/mpi4py/MPI/reqimpl.pxi src/mpi4py/MPI/stdlib.pxi src/mpi4py/MPI/typemap.pxi src/mpi4py/MPI/typestr.pxi src/mpi4py/MPI/winimpl.pxi src/mpi4py/futures/__init__.py src/mpi4py/futures/__main__.py src/mpi4py/futures/_base.py src/mpi4py/futures/_lib.py src/mpi4py/futures/aplus.py src/mpi4py/futures/pool.py src/mpi4py/futures/server.py src/mpi4py/include/mpi4py/mpi.pxi src/mpi4py/include/mpi4py/mpi4py.MPI.h src/mpi4py/include/mpi4py/mpi4py.MPI_api.h src/mpi4py/include/mpi4py/mpi4py.h src/mpi4py/include/mpi4py/mpi4py.i test/arrayimpl.py test/mpiunittest.py test/runtests.py test/spawn_child.py test/test_address.py test/test_attributes.py test/test_cco_buf.py test/test_cco_nb_buf.py test/test_cco_nb_vec.py test/test_cco_ngh_buf.py test/test_cco_ngh_obj.py test/test_cco_obj.py test/test_cco_obj_inter.py test/test_cco_vec.py test/test_cffi.py test/test_comm.py test/test_comm_inter.py test/test_comm_topo.py test/test_ctypes.py test/test_datatype.py test/test_dl.py test/test_doc.py test/test_dynproc.py test/test_environ.py test/test_errhandler.py test/test_errorcode.py test/test_exceptions.py test/test_file.py test/test_fortran.py test/test_grequest.py test/test_group.py test/test_info.py test/test_io.py test/test_memory.py test/test_mpimem.py test/test_msgspec.py test/test_msgzero.py test/test_objmodel.py test/test_op.py test/test_p2p_buf.py test/test_p2p_buf_matched.py test/test_p2p_obj.py test/test_p2p_obj_matched.py test/test_pack.py test/test_pickle.py test/test_rc.py test/test_request.py test/test_rma.py test/test_rma_nb.py test/test_spawn.py test/test_status.py test/test_subclass.py test/test_threads.py test/test_win.pympi4py-3.0.3/mpi4py.egg-info/not-zip-safe0000664000175000017500000000000113557771121021152 0ustar dalcinldalcinl00000000000000 mpi4py-3.0.3/setup.cfg0000644000175000017500000000072413560002767015627 0ustar dalcinldalcinl00000000000000[config] [build] debug = 0 [sdist] force_manifest = 1 [nosetests] where = test [pytest] testpaths = test [flake8] ignore = F401 exclude = _[a-z]*.py [pycodestyle] ignore = E203,E305,E306,E722 exclude = */futures/_base.py [pydocstyle] match = (?!_[a-z]).*\.py add_ignore = D402 [coverage:run] parallel = True branch = True source = mpi4py omit = */mpi4py/futures/_base.py [coverage:paths] source = src/mpi4py */mpi4py [egg_info] tag_build = tag_date = 0